vendor.js 1.5 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185451864518745188451894519045191451924519345194451954519645197451984519945200452014520245203452044520545206452074520845209452104521145212452134521445215452164521745218452194522045221452224522345224452254522645227452284522945230452314523245233452344523545236452374523845239452404524145242452434524445245452464524745248452494525045251452524525345254452554525645257452584525945260452614526245263452644526545266452674526845269452704527145272452734527445275452764527745278452794528045281452824528345284452854528645287452884528945290452914529245293452944529545296452974529845299453004530145302453034530445305453064530745308453094531045311453124531345314453154531645317453184531945320453214532245323453244532545326453274532845329453304533145332453334533445335453364533745338453394534045341453424534345344453454534645347453484534945350453514535245353453544535545356453574535845359453604536145362453634536445365453664536745368453694537045371453724537345374453754537645377453784537945380453814538245383453844538545386453874538845389453904539145392453934539445395453964539745398453994540045401454024540345404454054540645407454084540945410454114541245413454144541545416454174541845419454204542145422454234542445425454264542745428454294543045431454324543345434454354543645437454384543945440454414544245443454444544545446454474544845449454504545145452454534545445455454564545745458454594546045461454624546345464454654546645467454684546945470454714547245473454744547545476454774547845479454804548145482454834548445485454864548745488454894549045491454924549345494454954549645497454984549945500455014550245503455044550545506455074550845509455104551145512455134551445515455164551745518455194552045521455224552345524455254552645527455284552945530455314553245533455344553545536455374553845539455404554145542455434554445545455464554745548455494555045551455524555345554455554555645557455584555945560455614556245563455644556545566455674556845569455704557145572455734557445575455764557745578455794558045581455824558345584455854558645587455884558945590455914559245593455944559545596455974559845599456004560145602456034560445605456064560745608456094561045611456124561345614456154561645617456184561945620456214562245623456244562545626456274562845629456304563145632456334563445635456364563745638456394564045641456424564345644456454564645647456484564945650456514565245653456544565545656456574565845659456604566145662456634566445665456664566745668456694567045671456724567345674456754567645677456784567945680456814568245683456844568545686456874568845689456904569145692456934569445695456964569745698456994570045701457024570345704457054570645707457084570945710457114571245713457144571545716457174571845719457204572145722457234572445725457264572745728457294573045731457324573345734457354573645737457384573945740457414574245743457444574545746457474574845749457504575145752457534575445755457564575745758457594576045761457624576345764457654576645767457684576945770457714577245773457744577545776457774577845779457804578145782457834578445785457864578745788457894579045791457924579345794457954579645797457984579945800458014580245803458044580545806458074580845809458104581145812458134581445815458164581745818458194582045821458224582345824458254582645827458284582945830458314583245833458344583545836458374583845839458404584145842458434584445845458464584745848458494585045851458524585345854458554585645857458584585945860458614586245863458644586545866458674586845869458704587145872458734587445875458764587745878458794588045881458824588345884458854588645887458884588945890458914589245893458944589545896458974589845899459004590145902459034590445905459064590745908459094591045911459124591345914459154591645917459184591945920459214592245923459244592545926459274592845929459304593145932459334593445935459364593745938459394594045941459424594345944459454594645947459484594945950459514595245953459544595545956459574595845959459604596145962459634596445965459664596745968459694597045971459724597345974459754597645977459784597945980459814598245983459844598545986459874598845989459904599145992459934599445995459964599745998459994600046001460024600346004460054600646007460084600946010460114601246013460144601546016460174601846019460204602146022460234602446025460264602746028460294603046031460324603346034460354603646037460384603946040460414604246043460444604546046460474604846049460504605146052460534605446055460564605746058460594606046061460624606346064460654606646067460684606946070460714607246073460744607546076460774607846079460804608146082460834608446085460864608746088460894609046091460924609346094460954609646097460984609946100461014610246103461044610546106461074610846109461104611146112461134611446115461164611746118461194612046121461224612346124461254612646127461284612946130461314613246133461344613546136461374613846139461404614146142461434614446145461464614746148461494615046151461524615346154461554615646157461584615946160461614616246163461644616546166461674616846169461704617146172461734617446175461764617746178461794618046181461824618346184461854618646187461884618946190461914619246193461944619546196461974619846199462004620146202462034620446205462064620746208462094621046211462124621346214462154621646217462184621946220462214622246223462244622546226462274622846229462304623146232462334623446235462364623746238462394624046241462424624346244462454624646247462484624946250462514625246253462544625546256462574625846259462604626146262462634626446265462664626746268462694627046271462724627346274462754627646277462784627946280462814628246283462844628546286462874628846289462904629146292462934629446295462964629746298462994630046301463024630346304463054630646307463084630946310463114631246313463144631546316463174631846319463204632146322463234632446325463264632746328463294633046331463324633346334463354633646337463384633946340463414634246343463444634546346463474634846349463504635146352463534635446355463564635746358463594636046361463624636346364463654636646367463684636946370463714637246373463744637546376463774637846379463804638146382463834638446385463864638746388463894639046391463924639346394463954639646397463984639946400464014640246403464044640546406464074640846409464104641146412464134641446415464164641746418464194642046421464224642346424464254642646427464284642946430464314643246433464344643546436464374643846439464404644146442464434644446445464464644746448464494645046451464524645346454464554645646457464584645946460464614646246463464644646546466464674646846469464704647146472464734647446475464764647746478464794648046481464824648346484464854648646487464884648946490464914649246493464944649546496464974649846499465004650146502465034650446505465064650746508465094651046511465124651346514465154651646517465184651946520465214652246523465244652546526465274652846529465304653146532465334653446535465364653746538465394654046541465424654346544465454654646547465484654946550465514655246553465544655546556465574655846559465604656146562465634656446565465664656746568465694657046571465724657346574465754657646577465784657946580465814658246583465844658546586465874658846589465904659146592465934659446595465964659746598465994660046601466024660346604466054660646607466084660946610466114661246613466144661546616466174661846619466204662146622466234662446625466264662746628466294663046631466324663346634466354663646637466384663946640466414664246643466444664546646466474664846649466504665146652466534665446655466564665746658466594666046661466624666346664466654666646667466684666946670466714667246673466744667546676466774667846679466804668146682466834668446685466864668746688466894669046691466924669346694466954669646697466984669946700467014670246703467044670546706467074670846709467104671146712467134671446715467164671746718467194672046721467224672346724467254672646727467284672946730467314673246733467344673546736467374673846739467404674146742467434674446745467464674746748467494675046751467524675346754467554675646757467584675946760467614676246763467644676546766467674676846769467704677146772467734677446775467764677746778467794678046781467824678346784467854678646787467884678946790467914679246793467944679546796467974679846799468004680146802468034680446805468064680746808468094681046811468124681346814468154681646817468184681946820468214682246823468244682546826468274682846829468304683146832468334683446835468364683746838468394684046841468424684346844468454684646847468484684946850468514685246853468544685546856468574685846859468604686146862468634686446865468664686746868468694687046871468724687346874468754687646877468784687946880468814688246883468844688546886468874688846889468904689146892468934689446895468964689746898468994690046901469024690346904469054690646907469084690946910469114691246913469144691546916469174691846919469204692146922469234692446925469264692746928469294693046931469324693346934469354693646937469384693946940469414694246943469444694546946469474694846949469504695146952469534695446955469564695746958469594696046961469624696346964469654696646967469684696946970469714697246973469744697546976469774697846979469804698146982469834698446985469864698746988469894699046991469924699346994469954699646997469984699947000470014700247003470044700547006470074700847009470104701147012470134701447015470164701747018470194702047021470224702347024470254702647027470284702947030470314703247033470344703547036470374703847039470404704147042470434704447045470464704747048470494705047051470524705347054470554705647057470584705947060470614706247063470644706547066470674706847069470704707147072470734707447075470764707747078470794708047081470824708347084470854708647087470884708947090470914709247093470944709547096470974709847099471004710147102471034710447105471064710747108471094711047111471124711347114471154711647117471184711947120471214712247123471244712547126471274712847129471304713147132471334713447135471364713747138471394714047141471424714347144471454714647147471484714947150471514715247153471544715547156471574715847159471604716147162471634716447165471664716747168471694717047171471724717347174471754717647177471784717947180471814718247183471844718547186471874718847189471904719147192471934719447195471964719747198471994720047201472024720347204472054720647207472084720947210472114721247213472144721547216472174721847219472204722147222472234722447225472264722747228472294723047231472324723347234472354723647237472384723947240472414724247243472444724547246472474724847249472504725147252472534725447255472564725747258472594726047261472624726347264472654726647267472684726947270472714727247273472744727547276472774727847279472804728147282472834728447285472864728747288472894729047291472924729347294472954729647297472984729947300473014730247303473044730547306473074730847309473104731147312473134731447315473164731747318473194732047321473224732347324473254732647327473284732947330473314733247333473344733547336473374733847339473404734147342473434734447345473464734747348473494735047351473524735347354473554735647357473584735947360473614736247363473644736547366473674736847369473704737147372473734737447375473764737747378473794738047381473824738347384473854738647387473884738947390473914739247393473944739547396473974739847399474004740147402474034740447405474064740747408474094741047411474124741347414474154741647417474184741947420474214742247423474244742547426474274742847429474304743147432474334743447435474364743747438474394744047441474424744347444474454744647447474484744947450474514745247453474544745547456474574745847459474604746147462474634746447465474664746747468474694747047471474724747347474474754747647477474784747947480474814748247483474844748547486474874748847489474904749147492474934749447495474964749747498474994750047501475024750347504475054750647507475084750947510475114751247513475144751547516475174751847519475204752147522475234752447525475264752747528475294753047531475324753347534475354753647537475384753947540475414754247543475444754547546475474754847549475504755147552475534755447555475564755747558475594756047561475624756347564475654756647567475684756947570475714757247573475744757547576475774757847579475804758147582475834758447585475864758747588475894759047591475924759347594475954759647597475984759947600476014760247603476044760547606476074760847609476104761147612476134761447615476164761747618476194762047621476224762347624476254762647627476284762947630476314763247633476344763547636476374763847639476404764147642476434764447645476464764747648476494765047651476524765347654476554765647657476584765947660476614766247663476644766547666476674766847669476704767147672476734767447675476764767747678476794768047681476824768347684476854768647687476884768947690476914769247693476944769547696476974769847699477004770147702477034770447705477064770747708477094771047711477124771347714477154771647717477184771947720477214772247723477244772547726477274772847729477304773147732477334773447735477364773747738477394774047741477424774347744477454774647747477484774947750477514775247753477544775547756477574775847759477604776147762477634776447765477664776747768477694777047771477724777347774477754777647777477784777947780477814778247783477844778547786477874778847789477904779147792477934779447795477964779747798477994780047801478024780347804478054780647807478084780947810478114781247813478144781547816478174781847819478204782147822478234782447825478264782747828478294783047831478324783347834478354783647837478384783947840478414784247843478444784547846478474784847849478504785147852478534785447855478564785747858478594786047861478624786347864478654786647867478684786947870478714787247873478744787547876478774787847879478804788147882478834788447885478864788747888478894789047891478924789347894478954789647897478984789947900479014790247903479044790547906479074790847909479104791147912479134791447915479164791747918479194792047921479224792347924479254792647927479284792947930479314793247933479344793547936479374793847939479404794147942479434794447945479464794747948479494795047951479524795347954479554795647957479584795947960479614796247963479644796547966479674796847969479704797147972479734797447975479764797747978479794798047981479824798347984479854798647987479884798947990479914799247993479944799547996479974799847999480004800148002480034800448005480064800748008480094801048011480124801348014480154801648017480184801948020480214802248023480244802548026480274802848029480304803148032480334803448035480364803748038480394804048041480424804348044480454804648047480484804948050480514805248053480544805548056480574805848059480604806148062480634806448065480664806748068480694807048071480724807348074480754807648077480784807948080480814808248083480844808548086480874808848089480904809148092480934809448095480964809748098480994810048101481024810348104481054810648107481084810948110481114811248113481144811548116481174811848119481204812148122481234812448125481264812748128481294813048131481324813348134481354813648137481384813948140481414814248143481444814548146481474814848149481504815148152481534815448155481564815748158481594816048161481624816348164481654816648167481684816948170481714817248173481744817548176481774817848179481804818148182481834818448185481864818748188481894819048191481924819348194481954819648197481984819948200482014820248203482044820548206482074820848209482104821148212482134821448215482164821748218482194822048221482224822348224482254822648227482284822948230482314823248233482344823548236482374823848239482404824148242482434824448245482464824748248482494825048251482524825348254482554825648257482584825948260482614826248263482644826548266482674826848269482704827148272482734827448275482764827748278482794828048281482824828348284482854828648287482884828948290482914829248293482944829548296482974829848299483004830148302483034830448305483064830748308483094831048311483124831348314483154831648317483184831948320483214832248323483244832548326483274832848329483304833148332483334833448335483364833748338483394834048341483424834348344483454834648347483484834948350483514835248353483544835548356483574835848359483604836148362483634836448365483664836748368483694837048371483724837348374483754837648377483784837948380483814838248383483844838548386483874838848389483904839148392483934839448395483964839748398483994840048401484024840348404484054840648407484084840948410484114841248413484144841548416484174841848419484204842148422484234842448425484264842748428484294843048431484324843348434484354843648437484384843948440484414844248443484444844548446484474844848449484504845148452484534845448455484564845748458484594846048461484624846348464484654846648467484684846948470484714847248473484744847548476484774847848479484804848148482484834848448485484864848748488484894849048491484924849348494484954849648497484984849948500485014850248503485044850548506485074850848509485104851148512485134851448515485164851748518485194852048521485224852348524485254852648527485284852948530485314853248533485344853548536485374853848539485404854148542485434854448545485464854748548485494855048551485524855348554485554855648557485584855948560485614856248563485644856548566485674856848569485704857148572485734857448575485764857748578485794858048581485824858348584485854858648587485884858948590485914859248593485944859548596485974859848599486004860148602486034860448605486064860748608486094861048611486124861348614486154861648617486184861948620486214862248623486244862548626486274862848629486304863148632486334863448635486364863748638486394864048641486424864348644486454864648647486484864948650486514865248653486544865548656486574865848659486604866148662486634866448665486664866748668486694867048671486724867348674486754867648677486784867948680486814868248683486844868548686486874868848689486904869148692486934869448695486964869748698486994870048701487024870348704487054870648707487084870948710487114871248713487144871548716487174871848719487204872148722487234872448725487264872748728487294873048731487324873348734487354873648737487384873948740487414874248743487444874548746487474874848749487504875148752487534875448755487564875748758487594876048761487624876348764487654876648767487684876948770487714877248773487744877548776487774877848779487804878148782487834878448785487864878748788487894879048791487924879348794487954879648797487984879948800488014880248803488044880548806488074880848809488104881148812488134881448815488164881748818488194882048821488224882348824488254882648827488284882948830488314883248833488344883548836488374883848839488404884148842488434884448845488464884748848488494885048851488524885348854488554885648857488584885948860488614886248863488644886548866488674886848869488704887148872488734887448875488764887748878488794888048881488824888348884488854888648887488884888948890488914889248893488944889548896488974889848899489004890148902489034890448905489064890748908489094891048911489124891348914489154891648917489184891948920489214892248923489244892548926489274892848929489304893148932489334893448935489364893748938489394894048941489424894348944489454894648947489484894948950489514895248953489544895548956489574895848959489604896148962489634896448965489664896748968489694897048971489724897348974489754897648977489784897948980489814898248983489844898548986489874898848989489904899148992489934899448995489964899748998489994900049001490024900349004490054900649007490084900949010490114901249013490144901549016490174901849019490204902149022490234902449025490264902749028490294903049031490324903349034490354903649037490384903949040490414904249043490444904549046490474904849049490504905149052490534905449055490564905749058490594906049061490624906349064490654906649067490684906949070490714907249073490744907549076490774907849079490804908149082490834908449085490864908749088490894909049091490924909349094490954909649097490984909949100491014910249103491044910549106491074910849109491104911149112491134911449115491164911749118491194912049121491224912349124491254912649127491284912949130491314913249133491344913549136491374913849139491404914149142491434914449145491464914749148491494915049151491524915349154491554915649157491584915949160491614916249163491644916549166491674916849169491704917149172491734917449175491764917749178491794918049181491824918349184491854918649187491884918949190491914919249193491944919549196491974919849199492004920149202492034920449205492064920749208492094921049211492124921349214492154921649217492184921949220492214922249223492244922549226492274922849229492304923149232492334923449235492364923749238492394924049241492424924349244492454924649247492484924949250492514925249253492544925549256492574925849259492604926149262492634926449265492664926749268492694927049271492724927349274492754927649277492784927949280492814928249283492844928549286492874928849289492904929149292492934929449295492964929749298492994930049301493024930349304493054930649307493084930949310493114931249313493144931549316493174931849319493204932149322493234932449325493264932749328493294933049331493324933349334493354933649337493384933949340493414934249343493444934549346493474934849349493504935149352493534935449355493564935749358493594936049361493624936349364493654936649367493684936949370493714937249373493744937549376493774937849379493804938149382493834938449385493864938749388493894939049391493924939349394493954939649397493984939949400494014940249403494044940549406494074940849409494104941149412494134941449415494164941749418494194942049421494224942349424494254942649427494284942949430494314943249433494344943549436494374943849439494404944149442494434944449445494464944749448494494945049451494524945349454494554945649457494584945949460494614946249463494644946549466494674946849469494704947149472494734947449475494764947749478494794948049481494824948349484494854948649487494884948949490494914949249493494944949549496494974949849499495004950149502495034950449505495064950749508495094951049511495124951349514495154951649517495184951949520495214952249523495244952549526495274952849529495304953149532495334953449535495364953749538495394954049541495424954349544495454954649547495484954949550495514955249553495544955549556495574955849559495604956149562495634956449565495664956749568495694957049571495724957349574495754957649577495784957949580495814958249583495844958549586495874958849589495904959149592495934959449595495964959749598495994960049601496024960349604496054960649607496084960949610496114961249613496144961549616496174961849619496204962149622496234962449625496264962749628496294963049631496324963349634496354963649637496384963949640496414964249643496444964549646496474964849649496504965149652496534965449655496564965749658496594966049661496624966349664496654966649667496684966949670496714967249673496744967549676496774967849679496804968149682496834968449685496864968749688496894969049691496924969349694496954969649697496984969949700497014970249703497044970549706497074970849709497104971149712497134971449715497164971749718497194972049721497224972349724497254972649727497284972949730497314973249733497344973549736497374973849739497404974149742497434974449745497464974749748497494975049751497524975349754497554975649757497584975949760497614976249763497644976549766497674976849769497704977149772497734977449775497764977749778497794978049781497824978349784497854978649787497884978949790497914979249793497944979549796497974979849799498004980149802498034980449805498064980749808498094981049811498124981349814498154981649817498184981949820498214982249823498244982549826498274982849829498304983149832498334983449835498364983749838498394984049841498424984349844498454984649847498484984949850498514985249853498544985549856498574985849859498604986149862498634986449865498664986749868498694987049871498724987349874498754987649877498784987949880498814988249883498844988549886498874988849889498904989149892498934989449895498964989749898498994990049901499024990349904499054990649907499084990949910499114991249913499144991549916499174991849919499204992149922499234992449925499264992749928499294993049931499324993349934499354993649937499384993949940499414994249943499444994549946499474994849949499504995149952499534995449955499564995749958499594996049961499624996349964499654996649967499684996949970499714997249973499744997549976499774997849979499804998149982499834998449985499864998749988499894999049991499924999349994499954999649997499984999950000500015000250003500045000550006500075000850009500105001150012500135001450015500165001750018500195002050021500225002350024500255002650027500285002950030500315003250033500345003550036500375003850039500405004150042500435004450045500465004750048500495005050051500525005350054500555005650057500585005950060500615006250063500645006550066500675006850069500705007150072500735007450075500765007750078500795008050081500825008350084500855008650087500885008950090500915009250093500945009550096500975009850099501005010150102501035010450105501065010750108501095011050111501125011350114501155011650117501185011950120501215012250123501245012550126501275012850129501305013150132501335013450135501365013750138501395014050141501425014350144501455014650147501485014950150501515015250153501545015550156501575015850159501605016150162501635016450165501665016750168501695017050171501725017350174501755017650177501785017950180501815018250183501845018550186501875018850189501905019150192501935019450195501965019750198501995020050201502025020350204502055020650207502085020950210502115021250213502145021550216502175021850219502205022150222502235022450225502265022750228502295023050231502325023350234502355023650237502385023950240502415024250243502445024550246502475024850249502505025150252502535025450255502565025750258502595026050261502625026350264502655026650267502685026950270502715027250273502745027550276502775027850279502805028150282502835028450285502865028750288502895029050291502925029350294502955029650297502985029950300503015030250303503045030550306503075030850309503105031150312503135031450315503165031750318503195032050321503225032350324503255032650327503285032950330503315033250333503345033550336503375033850339503405034150342503435034450345503465034750348503495035050351503525035350354503555035650357503585035950360503615036250363503645036550366503675036850369503705037150372503735037450375503765037750378503795038050381503825038350384503855038650387503885038950390503915039250393503945039550396503975039850399504005040150402504035040450405504065040750408504095041050411504125041350414504155041650417504185041950420504215042250423504245042550426504275042850429504305043150432504335043450435504365043750438504395044050441504425044350444504455044650447504485044950450504515045250453504545045550456504575045850459504605046150462504635046450465504665046750468504695047050471504725047350474504755047650477504785047950480504815048250483504845048550486504875048850489504905049150492504935049450495504965049750498504995050050501505025050350504505055050650507505085050950510505115051250513505145051550516505175051850519505205052150522505235052450525505265052750528505295053050531505325053350534505355053650537505385053950540505415054250543505445054550546505475054850549505505055150552505535055450555505565055750558505595056050561505625056350564505655056650567505685056950570505715057250573505745057550576505775057850579505805058150582505835058450585505865058750588505895059050591505925059350594505955059650597505985059950600506015060250603506045060550606506075060850609506105061150612506135061450615506165061750618506195062050621506225062350624506255062650627506285062950630506315063250633506345063550636506375063850639506405064150642506435064450645506465064750648506495065050651506525065350654506555065650657506585065950660506615066250663506645066550666506675066850669506705067150672506735067450675506765067750678506795068050681506825068350684506855068650687506885068950690506915069250693506945069550696506975069850699507005070150702507035070450705507065070750708507095071050711507125071350714507155071650717507185071950720507215072250723507245072550726507275072850729507305073150732507335073450735507365073750738507395074050741507425074350744507455074650747507485074950750507515075250753507545075550756507575075850759507605076150762507635076450765507665076750768507695077050771507725077350774507755077650777507785077950780507815078250783507845078550786507875078850789507905079150792507935079450795507965079750798507995080050801508025080350804508055080650807508085080950810508115081250813508145081550816508175081850819508205082150822508235082450825508265082750828508295083050831508325083350834508355083650837508385083950840508415084250843508445084550846508475084850849508505085150852508535085450855508565085750858508595086050861508625086350864508655086650867508685086950870508715087250873508745087550876508775087850879508805088150882508835088450885508865088750888508895089050891508925089350894508955089650897508985089950900509015090250903509045090550906509075090850909509105091150912509135091450915509165091750918509195092050921509225092350924509255092650927509285092950930509315093250933509345093550936509375093850939509405094150942509435094450945509465094750948509495095050951509525095350954509555095650957509585095950960509615096250963509645096550966509675096850969509705097150972509735097450975509765097750978509795098050981509825098350984509855098650987509885098950990509915099250993509945099550996509975099850999510005100151002510035100451005510065100751008510095101051011510125101351014510155101651017510185101951020510215102251023510245102551026510275102851029510305103151032510335103451035510365103751038510395104051041510425104351044510455104651047510485104951050510515105251053510545105551056510575105851059510605106151062510635106451065510665106751068510695107051071510725107351074510755107651077510785107951080510815108251083510845108551086510875108851089510905109151092510935109451095510965109751098510995110051101511025110351104511055110651107511085110951110511115111251113511145111551116511175111851119511205112151122511235112451125511265112751128511295113051131511325113351134511355113651137511385113951140511415114251143511445114551146511475114851149511505115151152511535115451155511565115751158511595116051161511625116351164511655116651167511685116951170511715117251173511745117551176511775117851179511805118151182511835118451185511865118751188511895119051191511925119351194511955119651197511985119951200512015120251203512045120551206512075120851209512105121151212512135121451215512165121751218512195122051221512225122351224512255122651227512285122951230512315123251233512345123551236512375123851239512405124151242512435124451245512465124751248512495125051251512525125351254512555125651257512585125951260512615126251263512645126551266512675126851269512705127151272512735127451275512765127751278512795128051281512825128351284512855128651287512885128951290512915129251293512945129551296512975129851299513005130151302513035130451305513065130751308513095131051311513125131351314513155131651317513185131951320513215132251323513245132551326513275132851329513305133151332513335133451335513365133751338513395134051341513425134351344513455134651347513485134951350513515135251353513545135551356513575135851359513605136151362513635136451365513665136751368513695137051371513725137351374513755137651377513785137951380513815138251383513845138551386513875138851389513905139151392513935139451395513965139751398513995140051401514025140351404514055140651407514085140951410514115141251413514145141551416514175141851419514205142151422514235142451425514265142751428514295143051431514325143351434514355143651437514385143951440514415144251443514445144551446514475144851449514505145151452514535145451455514565145751458514595146051461514625146351464514655146651467514685146951470514715147251473514745147551476514775147851479514805148151482514835148451485514865148751488514895149051491514925149351494514955149651497514985149951500515015150251503515045150551506515075150851509515105151151512515135151451515515165151751518515195152051521515225152351524515255152651527515285152951530515315153251533515345153551536515375153851539515405154151542515435154451545515465154751548515495155051551515525155351554515555155651557515585155951560515615156251563515645156551566515675156851569515705157151572515735157451575515765157751578515795158051581515825158351584515855158651587515885158951590515915159251593515945159551596515975159851599516005160151602516035160451605516065160751608516095161051611516125161351614516155161651617516185161951620516215162251623516245162551626516275162851629516305163151632516335163451635516365163751638516395164051641516425164351644516455164651647516485164951650516515165251653516545165551656516575165851659516605166151662516635166451665516665166751668516695167051671516725167351674516755167651677516785167951680516815168251683516845168551686516875168851689516905169151692516935169451695516965169751698516995170051701517025170351704517055170651707517085170951710517115171251713517145171551716517175171851719517205172151722517235172451725517265172751728517295173051731517325173351734517355173651737517385173951740517415174251743517445174551746517475174851749517505175151752517535175451755517565175751758517595176051761517625176351764517655176651767517685176951770517715177251773517745177551776517775177851779517805178151782517835178451785517865178751788517895179051791517925179351794517955179651797517985179951800518015180251803518045180551806518075180851809518105181151812518135181451815518165181751818518195182051821518225182351824518255182651827518285182951830518315183251833518345183551836518375183851839518405184151842518435184451845518465184751848518495185051851518525185351854518555185651857518585185951860518615186251863518645186551866518675186851869518705187151872518735187451875518765187751878518795188051881518825188351884518855188651887518885188951890518915189251893518945189551896518975189851899519005190151902519035190451905519065190751908519095191051911519125191351914519155191651917519185191951920519215192251923519245192551926519275192851929519305193151932519335193451935519365193751938519395194051941519425194351944519455194651947519485194951950519515195251953519545195551956519575195851959519605196151962519635196451965519665196751968519695197051971519725197351974519755197651977519785197951980519815198251983519845198551986519875198851989519905199151992519935199451995519965199751998519995200052001520025200352004520055200652007520085200952010520115201252013520145201552016520175201852019520205202152022520235202452025520265202752028520295203052031520325203352034520355203652037520385203952040520415204252043520445204552046520475204852049520505205152052520535205452055520565205752058520595206052061520625206352064520655206652067520685206952070520715207252073520745207552076520775207852079520805208152082520835208452085520865208752088520895209052091520925209352094520955209652097520985209952100521015210252103521045210552106521075210852109521105211152112521135211452115521165211752118521195212052121521225212352124521255212652127521285212952130521315213252133521345213552136521375213852139521405214152142521435214452145521465214752148521495215052151521525215352154521555215652157521585215952160521615216252163521645216552166521675216852169521705217152172521735217452175521765217752178521795218052181521825218352184521855218652187521885218952190521915219252193521945219552196521975219852199522005220152202522035220452205522065220752208522095221052211522125221352214522155221652217522185221952220522215222252223522245222552226522275222852229522305223152232522335223452235522365223752238522395224052241522425224352244522455224652247522485224952250522515225252253522545225552256522575225852259522605226152262522635226452265522665226752268522695227052271522725227352274522755227652277522785227952280522815228252283522845228552286522875228852289522905229152292522935229452295522965229752298522995230052301523025230352304523055230652307523085230952310523115231252313523145231552316523175231852319523205232152322523235232452325523265232752328523295233052331523325233352334523355233652337523385233952340523415234252343523445234552346523475234852349523505235152352523535235452355523565235752358523595236052361523625236352364523655236652367523685236952370523715237252373523745237552376523775237852379523805238152382523835238452385523865238752388523895239052391523925239352394523955239652397523985239952400524015240252403524045240552406524075240852409524105241152412524135241452415524165241752418524195242052421524225242352424524255242652427524285242952430524315243252433524345243552436524375243852439524405244152442524435244452445524465244752448524495245052451524525245352454524555245652457524585245952460524615246252463524645246552466524675246852469524705247152472524735247452475524765247752478524795248052481524825248352484524855248652487524885248952490524915249252493524945249552496524975249852499525005250152502525035250452505525065250752508525095251052511525125251352514525155251652517525185251952520525215252252523525245252552526525275252852529525305253152532525335253452535525365253752538525395254052541525425254352544525455254652547525485254952550525515255252553525545255552556525575255852559525605256152562525635256452565525665256752568525695257052571525725257352574525755257652577525785257952580525815258252583525845258552586525875258852589525905259152592525935259452595525965259752598525995260052601526025260352604526055260652607526085260952610526115261252613526145261552616526175261852619526205262152622526235262452625526265262752628526295263052631526325263352634526355263652637526385263952640526415264252643526445264552646526475264852649526505265152652526535265452655526565265752658526595266052661526625266352664526655266652667526685266952670526715267252673526745267552676526775267852679526805268152682526835268452685526865268752688526895269052691526925269352694526955269652697526985269952700527015270252703527045270552706527075270852709527105271152712527135271452715527165271752718527195272052721527225272352724527255272652727527285272952730527315273252733527345273552736527375273852739527405274152742527435274452745527465274752748527495275052751527525275352754527555275652757527585275952760527615276252763527645276552766527675276852769527705277152772527735277452775527765277752778527795278052781527825278352784527855278652787527885278952790527915279252793527945279552796527975279852799528005280152802528035280452805528065280752808528095281052811528125281352814528155281652817528185281952820528215282252823528245282552826528275282852829528305283152832528335283452835528365283752838528395284052841528425284352844528455284652847528485284952850528515285252853528545285552856528575285852859528605286152862528635286452865528665286752868528695287052871528725287352874528755287652877528785287952880528815288252883528845288552886528875288852889528905289152892528935289452895528965289752898528995290052901529025290352904529055290652907529085290952910529115291252913529145291552916529175291852919529205292152922529235292452925529265292752928529295293052931529325293352934529355293652937529385293952940529415294252943529445294552946529475294852949529505295152952529535295452955529565295752958529595296052961529625296352964529655296652967529685296952970529715297252973529745297552976529775297852979529805298152982529835298452985529865298752988529895299052991529925299352994529955299652997529985299953000530015300253003530045300553006530075300853009530105301153012530135301453015530165301753018530195302053021530225302353024530255302653027530285302953030530315303253033530345303553036530375303853039530405304153042530435304453045530465304753048530495305053051530525305353054530555305653057530585305953060530615306253063530645306553066530675306853069530705307153072530735307453075530765307753078530795308053081530825308353084530855308653087530885308953090530915309253093530945309553096530975309853099531005310153102531035310453105531065310753108531095311053111531125311353114531155311653117531185311953120531215312253123531245312553126531275312853129531305313153132531335313453135531365313753138531395314053141531425314353144531455314653147531485314953150531515315253153531545315553156531575315853159531605316153162531635316453165531665316753168531695317053171531725317353174531755317653177531785317953180531815318253183531845318553186531875318853189531905319153192531935319453195531965319753198531995320053201532025320353204532055320653207532085320953210532115321253213532145321553216532175321853219532205322153222532235322453225532265322753228532295323053231532325323353234532355323653237532385323953240532415324253243532445324553246532475324853249532505325153252532535325453255532565325753258532595326053261532625326353264532655326653267532685326953270532715327253273532745327553276532775327853279532805328153282532835328453285532865328753288532895329053291532925329353294532955329653297532985329953300533015330253303533045330553306533075330853309533105331153312533135331453315533165331753318533195332053321533225332353324533255332653327533285332953330533315333253333533345333553336533375333853339533405334153342533435334453345533465334753348533495335053351533525335353354533555335653357533585335953360533615336253363533645336553366533675336853369533705337153372533735337453375533765337753378533795338053381533825338353384533855338653387533885338953390533915339253393533945339553396533975339853399534005340153402534035340453405534065340753408534095341053411534125341353414534155341653417534185341953420534215342253423534245342553426534275342853429534305343153432534335343453435534365343753438534395344053441534425344353444534455344653447534485344953450534515345253453534545345553456534575345853459534605346153462534635346453465534665346753468534695347053471534725347353474534755347653477534785347953480534815348253483534845348553486534875348853489534905349153492534935349453495534965349753498534995350053501535025350353504535055350653507535085350953510535115351253513535145351553516535175351853519535205352153522535235352453525535265352753528535295353053531535325353353534535355353653537535385353953540535415354253543535445354553546535475354853549535505355153552535535355453555535565355753558535595356053561535625356353564535655356653567535685356953570535715357253573535745357553576535775357853579535805358153582535835358453585535865358753588535895359053591535925359353594535955359653597535985359953600536015360253603536045360553606536075360853609536105361153612536135361453615536165361753618536195362053621536225362353624536255362653627536285362953630536315363253633536345363553636536375363853639536405364153642536435364453645536465364753648536495365053651536525365353654536555365653657536585365953660536615366253663536645366553666536675366853669536705367153672536735367453675536765367753678536795368053681536825368353684536855368653687536885368953690536915369253693536945369553696536975369853699537005370153702537035370453705537065370753708537095371053711537125371353714537155371653717537185371953720537215372253723537245372553726537275372853729537305373153732537335373453735537365373753738537395374053741537425374353744537455374653747537485374953750537515375253753537545375553756537575375853759537605376153762537635376453765537665376753768537695377053771537725377353774537755377653777537785377953780537815378253783537845378553786537875378853789537905379153792537935379453795537965379753798537995380053801538025380353804538055380653807538085380953810538115381253813538145381553816538175381853819538205382153822538235382453825538265382753828538295383053831538325383353834538355383653837538385383953840538415384253843538445384553846538475384853849538505385153852538535385453855538565385753858538595386053861538625386353864538655386653867538685386953870538715387253873538745387553876538775387853879538805388153882538835388453885538865388753888538895389053891538925389353894538955389653897538985389953900539015390253903539045390553906539075390853909539105391153912539135391453915539165391753918539195392053921539225392353924539255392653927539285392953930539315393253933539345393553936539375393853939539405394153942539435394453945539465394753948539495395053951539525395353954539555395653957539585395953960539615396253963539645396553966539675396853969539705397153972539735397453975539765397753978539795398053981539825398353984539855398653987539885398953990539915399253993539945399553996539975399853999540005400154002540035400454005540065400754008540095401054011540125401354014540155401654017540185401954020540215402254023540245402554026540275402854029540305403154032540335403454035540365403754038540395404054041540425404354044540455404654047540485404954050540515405254053540545405554056540575405854059540605406154062540635406454065540665406754068540695407054071540725407354074540755407654077540785407954080540815408254083540845408554086540875408854089540905409154092540935409454095540965409754098540995410054101541025410354104541055410654107541085410954110541115411254113541145411554116541175411854119541205412154122541235412454125541265412754128541295413054131541325413354134541355413654137541385413954140541415414254143541445414554146541475414854149541505415154152541535415454155541565415754158541595416054161541625416354164541655416654167541685416954170541715417254173541745417554176541775417854179541805418154182541835418454185541865418754188541895419054191541925419354194541955419654197541985419954200542015420254203542045420554206542075420854209542105421154212542135421454215542165421754218542195422054221542225422354224542255422654227542285422954230542315423254233542345423554236542375423854239542405424154242542435424454245542465424754248542495425054251542525425354254542555425654257542585425954260542615426254263542645426554266542675426854269542705427154272542735427454275542765427754278542795428054281542825428354284542855428654287542885428954290542915429254293542945429554296542975429854299543005430154302543035430454305543065430754308543095431054311543125431354314543155431654317543185431954320543215432254323543245432554326543275432854329543305433154332543335433454335543365433754338543395434054341543425434354344543455434654347543485434954350543515435254353543545435554356543575435854359543605436154362543635436454365543665436754368543695437054371543725437354374543755437654377543785437954380543815438254383543845438554386543875438854389543905439154392543935439454395543965439754398543995440054401544025440354404544055440654407544085440954410544115441254413544145441554416544175441854419544205442154422544235442454425544265442754428544295443054431544325443354434544355443654437544385443954440544415444254443544445444554446544475444854449544505445154452544535445454455544565445754458544595446054461544625446354464544655446654467544685446954470544715447254473544745447554476544775447854479544805448154482544835448454485544865448754488544895449054491544925449354494544955449654497544985449954500545015450254503545045450554506545075450854509545105451154512545135451454515545165451754518545195452054521545225452354524545255452654527545285452954530545315453254533545345453554536545375453854539545405454154542545435454454545545465454754548545495455054551545525455354554545555455654557545585455954560545615456254563545645456554566545675456854569545705457154572545735457454575545765457754578545795458054581545825458354584545855458654587545885458954590545915459254593545945459554596545975459854599546005460154602546035460454605546065460754608546095461054611546125461354614546155461654617546185461954620546215462254623546245462554626546275462854629546305463154632546335463454635546365463754638546395464054641546425464354644546455464654647546485464954650546515465254653546545465554656546575465854659546605466154662546635466454665546665466754668546695467054671546725467354674546755467654677546785467954680546815468254683546845468554686546875468854689546905469154692546935469454695546965469754698546995470054701547025470354704547055470654707547085470954710547115471254713547145471554716547175471854719547205472154722547235472454725547265472754728547295473054731547325473354734547355473654737547385473954740547415474254743547445474554746547475474854749547505475154752547535475454755547565475754758547595476054761547625476354764547655476654767547685476954770547715477254773547745477554776547775477854779547805478154782547835478454785547865478754788547895479054791547925479354794547955479654797547985479954800548015480254803548045480554806548075480854809548105481154812548135481454815548165481754818548195482054821548225482354824548255482654827548285482954830548315483254833548345483554836548375483854839548405484154842548435484454845548465484754848548495485054851548525485354854548555485654857548585485954860548615486254863548645486554866548675486854869548705487154872548735487454875548765487754878548795488054881548825488354884548855488654887548885488954890548915489254893548945489554896548975489854899549005490154902549035490454905549065490754908549095491054911549125491354914549155491654917549185491954920549215492254923549245492554926549275492854929549305493154932549335493454935549365493754938549395494054941549425494354944549455494654947549485494954950549515495254953549545495554956549575495854959549605496154962549635496454965549665496754968549695497054971549725497354974549755497654977549785497954980549815498254983549845498554986549875498854989549905499154992549935499454995549965499754998549995500055001550025500355004550055500655007550085500955010550115501255013550145501555016550175501855019550205502155022550235502455025550265502755028550295503055031550325503355034550355503655037550385503955040550415504255043550445504555046550475504855049550505505155052550535505455055550565505755058550595506055061550625506355064550655506655067550685506955070550715507255073550745507555076550775507855079550805508155082550835508455085550865508755088550895509055091550925509355094550955509655097550985509955100551015510255103551045510555106551075510855109551105511155112551135511455115551165511755118551195512055121551225512355124551255512655127551285512955130551315513255133551345513555136551375513855139551405514155142551435514455145551465514755148551495515055151551525515355154551555515655157551585515955160551615516255163551645516555166551675516855169551705517155172551735517455175551765517755178551795518055181551825518355184551855518655187551885518955190551915519255193551945519555196551975519855199552005520155202552035520455205552065520755208552095521055211552125521355214552155521655217552185521955220552215522255223552245522555226552275522855229552305523155232552335523455235552365523755238552395524055241552425524355244552455524655247552485524955250552515525255253552545525555256552575525855259552605526155262552635526455265552665526755268552695527055271552725527355274552755527655277552785527955280552815528255283552845528555286552875528855289552905529155292552935529455295552965529755298552995530055301553025530355304553055530655307553085530955310553115531255313553145531555316553175531855319553205532155322553235532455325553265532755328553295533055331553325533355334553355533655337553385533955340553415534255343553445534555346553475534855349553505535155352553535535455355553565535755358553595536055361553625536355364553655536655367553685536955370553715537255373553745537555376553775537855379553805538155382553835538455385553865538755388553895539055391553925539355394553955539655397553985539955400554015540255403554045540555406554075540855409554105541155412554135541455415554165541755418554195542055421554225542355424554255542655427554285542955430554315543255433554345543555436554375543855439554405544155442554435544455445554465544755448554495545055451554525545355454554555545655457554585545955460554615546255463554645546555466554675546855469554705547155472554735547455475554765547755478554795548055481554825548355484554855548655487554885548955490554915549255493554945549555496554975549855499555005550155502555035550455505555065550755508555095551055511555125551355514555155551655517555185551955520555215552255523555245552555526555275552855529555305553155532555335553455535555365553755538555395554055541555425554355544555455554655547555485554955550555515555255553555545555555556555575555855559555605556155562555635556455565555665556755568555695557055571555725557355574555755557655577555785557955580555815558255583555845558555586555875558855589555905559155592555935559455595555965559755598555995560055601556025560355604556055560655607556085560955610556115561255613556145561555616556175561855619556205562155622556235562455625556265562755628556295563055631556325563355634556355563655637556385563955640556415564255643556445564555646556475564855649556505565155652556535565455655556565565755658556595566055661556625566355664556655566655667556685566955670556715567255673556745567555676556775567855679556805568155682556835568455685556865568755688556895569055691556925569355694556955569655697556985569955700557015570255703557045570555706557075570855709557105571155712557135571455715557165571755718557195572055721557225572355724557255572655727557285572955730557315573255733557345573555736557375573855739557405574155742557435574455745557465574755748557495575055751557525575355754557555575655757557585575955760557615576255763557645576555766557675576855769557705577155772557735577455775557765577755778557795578055781557825578355784557855578655787557885578955790557915579255793557945579555796557975579855799558005580155802558035580455805558065580755808558095581055811558125581355814558155581655817558185581955820558215582255823558245582555826558275582855829558305583155832558335583455835558365583755838558395584055841558425584355844558455584655847558485584955850558515585255853558545585555856558575585855859558605586155862558635586455865558665586755868558695587055871558725587355874558755587655877558785587955880558815588255883558845588555886558875588855889558905589155892558935589455895558965589755898558995590055901559025590355904559055590655907559085590955910559115591255913559145591555916559175591855919559205592155922559235592455925559265592755928559295593055931559325593355934559355593655937559385593955940559415594255943559445594555946559475594855949559505595155952559535595455955559565595755958559595596055961559625596355964559655596655967559685596955970559715597255973559745597555976559775597855979559805598155982559835598455985559865598755988559895599055991559925599355994559955599655997559985599956000560015600256003560045600556006560075600856009560105601156012560135601456015560165601756018560195602056021560225602356024560255602656027560285602956030560315603256033560345603556036560375603856039560405604156042560435604456045560465604756048560495605056051560525605356054560555605656057560585605956060560615606256063560645606556066560675606856069560705607156072560735607456075560765607756078560795608056081560825608356084560855608656087560885608956090560915609256093560945609556096560975609856099561005610156102561035610456105561065610756108561095611056111561125611356114561155611656117561185611956120561215612256123561245612556126561275612856129561305613156132561335613456135561365613756138561395614056141561425614356144561455614656147561485614956150561515615256153561545615556156561575615856159561605616156162561635616456165561665616756168561695617056171561725617356174561755617656177561785617956180561815618256183561845618556186561875618856189561905619156192561935619456195561965619756198561995620056201562025620356204562055620656207562085620956210562115621256213562145621556216562175621856219562205622156222562235622456225562265622756228562295623056231562325623356234562355623656237562385623956240562415624256243562445624556246562475624856249562505625156252562535625456255562565625756258562595626056261562625626356264562655626656267562685626956270562715627256273562745627556276562775627856279562805628156282562835628456285562865628756288562895629056291562925629356294562955629656297562985629956300563015630256303563045630556306563075630856309563105631156312563135631456315563165631756318563195632056321563225632356324563255632656327563285632956330563315633256333563345633556336563375633856339563405634156342563435634456345563465634756348563495635056351563525635356354563555635656357563585635956360563615636256363563645636556366563675636856369563705637156372563735637456375563765637756378563795638056381563825638356384563855638656387563885638956390563915639256393563945639556396563975639856399564005640156402564035640456405564065640756408564095641056411564125641356414564155641656417564185641956420564215642256423564245642556426564275642856429564305643156432564335643456435564365643756438564395644056441564425644356444564455644656447564485644956450564515645256453564545645556456564575645856459564605646156462564635646456465564665646756468564695647056471564725647356474564755647656477564785647956480564815648256483564845648556486564875648856489564905649156492564935649456495564965649756498564995650056501565025650356504565055650656507565085650956510565115651256513565145651556516565175651856519565205652156522565235652456525565265652756528565295653056531565325653356534565355653656537565385653956540565415654256543565445654556546565475654856549565505655156552565535655456555565565655756558565595656056561565625656356564565655656656567565685656956570565715657256573565745657556576565775657856579565805658156582565835658456585565865658756588565895659056591565925659356594565955659656597565985659956600566015660256603566045660556606566075660856609566105661156612566135661456615566165661756618566195662056621566225662356624566255662656627566285662956630566315663256633566345663556636566375663856639566405664156642566435664456645566465664756648566495665056651566525665356654566555665656657566585665956660566615666256663566645666556666566675666856669566705667156672566735667456675566765667756678566795668056681566825668356684566855668656687566885668956690566915669256693566945669556696566975669856699567005670156702567035670456705567065670756708567095671056711567125671356714567155671656717567185671956720567215672256723567245672556726567275672856729567305673156732567335673456735567365673756738567395674056741567425674356744567455674656747567485674956750567515675256753567545675556756567575675856759567605676156762567635676456765567665676756768567695677056771567725677356774567755677656777567785677956780567815678256783567845678556786567875678856789567905679156792567935679456795567965679756798567995680056801568025680356804568055680656807568085680956810568115681256813568145681556816568175681856819568205682156822568235682456825568265682756828568295683056831568325683356834568355683656837568385683956840568415684256843568445684556846568475684856849568505685156852568535685456855568565685756858568595686056861568625686356864568655686656867568685686956870568715687256873568745687556876568775687856879568805688156882568835688456885568865688756888568895689056891568925689356894568955689656897568985689956900569015690256903569045690556906569075690856909569105691156912569135691456915569165691756918569195692056921569225692356924569255692656927569285692956930569315693256933569345693556936569375693856939569405694156942569435694456945569465694756948569495695056951569525695356954569555695656957569585695956960569615696256963569645696556966569675696856969569705697156972569735697456975569765697756978569795698056981569825698356984569855698656987569885698956990569915699256993569945699556996569975699856999570005700157002570035700457005570065700757008570095701057011570125701357014570155701657017570185701957020570215702257023570245702557026570275702857029570305703157032570335703457035570365703757038570395704057041570425704357044570455704657047570485704957050570515705257053570545705557056570575705857059570605706157062570635706457065570665706757068570695707057071570725707357074570755707657077570785707957080570815708257083570845708557086570875708857089570905709157092570935709457095570965709757098570995710057101571025710357104571055710657107571085710957110571115711257113571145711557116571175711857119571205712157122571235712457125571265712757128571295713057131571325713357134571355713657137571385713957140571415714257143571445714557146571475714857149571505715157152571535715457155571565715757158571595716057161571625716357164571655716657167571685716957170571715717257173571745717557176571775717857179571805718157182571835718457185571865718757188571895719057191571925719357194571955719657197571985719957200572015720257203572045720557206572075720857209572105721157212
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 100:
  53. /*!**************************************************************!*\
  54. !*** ./node_modules/readable-stream/lib/_stream_writable.js ***!
  55. \**************************************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. "use strict";
  59. /* WEBPACK VAR INJECTION */(function(process, global) {// Copyright Joyent, Inc. and other Node contributors.
  60. //
  61. // Permission is hereby granted, free of charge, to any person obtaining a
  62. // copy of this software and associated documentation files (the
  63. // "Software"), to deal in the Software without restriction, including
  64. // without limitation the rights to use, copy, modify, merge, publish,
  65. // distribute, sublicense, and/or sell copies of the Software, and to permit
  66. // persons to whom the Software is furnished to do so, subject to the
  67. // following conditions:
  68. //
  69. // The above copyright notice and this permission notice shall be included
  70. // in all copies or substantial portions of the Software.
  71. //
  72. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  73. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  74. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  75. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  76. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  77. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  78. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  79. // A bit simpler than readable streams.
  80. // Implement an async ._write(chunk, encoding, cb), and it'll handle all
  81. // the drain event emission and buffering.
  82. /*<replacement>*/
  83. var pna = __webpack_require__(/*! process-nextick-args */ 91);
  84. /*</replacement>*/
  85. module.exports = Writable;
  86. /* <replacement> */
  87. function WriteReq(chunk, encoding, cb) {
  88. this.chunk = chunk;
  89. this.encoding = encoding;
  90. this.callback = cb;
  91. this.next = null;
  92. }
  93. // It seems a linked list but it is not
  94. // there will be only 2 of these for each stream
  95. function CorkedRequest(state) {
  96. var _this = this;
  97. this.next = null;
  98. this.entry = null;
  99. this.finish = function () {
  100. onCorkedFinish(_this, state);
  101. };
  102. }
  103. /* </replacement> */
  104. /*<replacement>*/
  105. var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
  106. /*</replacement>*/
  107. /*<replacement>*/
  108. var Duplex;
  109. /*</replacement>*/
  110. Writable.WritableState = WritableState;
  111. /*<replacement>*/
  112. var util = Object.create(__webpack_require__(/*! core-util-is */ 94));
  113. util.inherits = __webpack_require__(/*! inherits */ 86);
  114. /*</replacement>*/
  115. /*<replacement>*/
  116. var internalUtil = {
  117. deprecate: __webpack_require__(/*! util-deprecate */ 101)
  118. };
  119. /*</replacement>*/
  120. /*<replacement>*/
  121. var Stream = __webpack_require__(/*! ./internal/streams/stream */ 93);
  122. /*</replacement>*/
  123. /*<replacement>*/
  124. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer;
  125. var OurUint8Array = global.Uint8Array || function () {};
  126. function _uint8ArrayToBuffer(chunk) {
  127. return Buffer.from(chunk);
  128. }
  129. function _isUint8Array(obj) {
  130. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  131. }
  132. /*</replacement>*/
  133. var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ 98);
  134. util.inherits(Writable, Stream);
  135. function nop() {}
  136. function WritableState(options, stream) {
  137. Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ 99);
  138. options = options || {};
  139. // Duplex streams are both readable and writable, but share
  140. // the same options object.
  141. // However, some cases require setting options to different
  142. // values for the readable and the writable sides of the duplex stream.
  143. // These options can be provided separately as readableXXX and writableXXX.
  144. var isDuplex = stream instanceof Duplex;
  145. // object stream flag to indicate whether or not this stream
  146. // contains buffers or objects.
  147. this.objectMode = !!options.objectMode;
  148. if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
  149. // the point at which write() starts returning false
  150. // Note: 0 is a valid value, means that we always return false if
  151. // the entire buffer is not flushed immediately on write()
  152. var hwm = options.highWaterMark;
  153. var writableHwm = options.writableHighWaterMark;
  154. var defaultHwm = this.objectMode ? 16 : 16 * 1024;
  155. if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
  156. // cast to ints.
  157. this.highWaterMark = Math.floor(this.highWaterMark);
  158. // if _final has been called
  159. this.finalCalled = false;
  160. // drain event flag.
  161. this.needDrain = false;
  162. // at the start of calling end()
  163. this.ending = false;
  164. // when end() has been called, and returned
  165. this.ended = false;
  166. // when 'finish' is emitted
  167. this.finished = false;
  168. // has it been destroyed
  169. this.destroyed = false;
  170. // should we decode strings into buffers before passing to _write?
  171. // this is here so that some node-core streams can optimize string
  172. // handling at a lower level.
  173. var noDecode = options.decodeStrings === false;
  174. this.decodeStrings = !noDecode;
  175. // Crypto is kind of old and crusty. Historically, its default string
  176. // encoding is 'binary' so we have to make this configurable.
  177. // Everything else in the universe uses 'utf8', though.
  178. this.defaultEncoding = options.defaultEncoding || 'utf8';
  179. // not an actual buffer we keep track of, but a measurement
  180. // of how much we're waiting to get pushed to some underlying
  181. // socket or file.
  182. this.length = 0;
  183. // a flag to see when we're in the middle of a write.
  184. this.writing = false;
  185. // when true all writes will be buffered until .uncork() call
  186. this.corked = 0;
  187. // a flag to be able to tell if the onwrite cb is called immediately,
  188. // or on a later tick. We set this to true at first, because any
  189. // actions that shouldn't happen until "later" should generally also
  190. // not happen before the first write call.
  191. this.sync = true;
  192. // a flag to know if we're processing previously buffered items, which
  193. // may call the _write() callback in the same tick, so that we don't
  194. // end up in an overlapped onwrite situation.
  195. this.bufferProcessing = false;
  196. // the callback that's passed to _write(chunk,cb)
  197. this.onwrite = function (er) {
  198. onwrite(stream, er);
  199. };
  200. // the callback that the user supplies to write(chunk,encoding,cb)
  201. this.writecb = null;
  202. // the amount that is being written when _write is called.
  203. this.writelen = 0;
  204. this.bufferedRequest = null;
  205. this.lastBufferedRequest = null;
  206. // number of pending user-supplied write callbacks
  207. // this must be 0 before 'finish' can be emitted
  208. this.pendingcb = 0;
  209. // emit prefinish if the only thing we're waiting for is _write cbs
  210. // This is relevant for synchronous Transform streams
  211. this.prefinished = false;
  212. // True if the error was already emitted and should not be thrown again
  213. this.errorEmitted = false;
  214. // count buffered requests
  215. this.bufferedRequestCount = 0;
  216. // allocate the first CorkedRequest, there is always
  217. // one allocated and free to use, and we maintain at most two
  218. this.corkedRequestsFree = new CorkedRequest(this);
  219. }
  220. WritableState.prototype.getBuffer = function getBuffer() {
  221. var current = this.bufferedRequest;
  222. var out = [];
  223. while (current) {
  224. out.push(current);
  225. current = current.next;
  226. }
  227. return out;
  228. };
  229. (function () {
  230. try {
  231. Object.defineProperty(WritableState.prototype, 'buffer', {
  232. get: internalUtil.deprecate(function () {
  233. return this.getBuffer();
  234. }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
  235. });
  236. } catch (_) {}
  237. })();
  238. // Test _writableState for inheritance to account for Duplex streams,
  239. // whose prototype chain only points to Readable.
  240. var realHasInstance;
  241. if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
  242. realHasInstance = Function.prototype[Symbol.hasInstance];
  243. Object.defineProperty(Writable, Symbol.hasInstance, {
  244. value: function (object) {
  245. if (realHasInstance.call(this, object)) return true;
  246. if (this !== Writable) return false;
  247. return object && object._writableState instanceof WritableState;
  248. }
  249. });
  250. } else {
  251. realHasInstance = function (object) {
  252. return object instanceof this;
  253. };
  254. }
  255. function Writable(options) {
  256. Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ 99);
  257. // Writable ctor is applied to Duplexes, too.
  258. // `realHasInstance` is necessary because using plain `instanceof`
  259. // would return false, as no `_writableState` property is attached.
  260. // Trying to use the custom `instanceof` for Writable here will also break the
  261. // Node.js LazyTransform implementation, which has a non-trivial getter for
  262. // `_writableState` that would lead to infinite recursion.
  263. if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
  264. return new Writable(options);
  265. }
  266. this._writableState = new WritableState(options, this);
  267. // legacy.
  268. this.writable = true;
  269. if (options) {
  270. if (typeof options.write === 'function') this._write = options.write;
  271. if (typeof options.writev === 'function') this._writev = options.writev;
  272. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  273. if (typeof options.final === 'function') this._final = options.final;
  274. }
  275. Stream.call(this);
  276. }
  277. // Otherwise people can pipe Writable streams, which is just wrong.
  278. Writable.prototype.pipe = function () {
  279. this.emit('error', new Error('Cannot pipe, not readable'));
  280. };
  281. function writeAfterEnd(stream, cb) {
  282. var er = new Error('write after end');
  283. // TODO: defer error events consistently everywhere, not just the cb
  284. stream.emit('error', er);
  285. pna.nextTick(cb, er);
  286. }
  287. // Checks that a user-supplied chunk is valid, especially for the particular
  288. // mode the stream is in. Currently this means that `null` is never accepted
  289. // and undefined/non-string values are only allowed in object mode.
  290. function validChunk(stream, state, chunk, cb) {
  291. var valid = true;
  292. var er = false;
  293. if (chunk === null) {
  294. er = new TypeError('May not write null values to stream');
  295. } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  296. er = new TypeError('Invalid non-string/buffer chunk');
  297. }
  298. if (er) {
  299. stream.emit('error', er);
  300. pna.nextTick(cb, er);
  301. valid = false;
  302. }
  303. return valid;
  304. }
  305. Writable.prototype.write = function (chunk, encoding, cb) {
  306. var state = this._writableState;
  307. var ret = false;
  308. var isBuf = !state.objectMode && _isUint8Array(chunk);
  309. if (isBuf && !Buffer.isBuffer(chunk)) {
  310. chunk = _uint8ArrayToBuffer(chunk);
  311. }
  312. if (typeof encoding === 'function') {
  313. cb = encoding;
  314. encoding = null;
  315. }
  316. if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
  317. if (typeof cb !== 'function') cb = nop;
  318. if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
  319. state.pendingcb++;
  320. ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
  321. }
  322. return ret;
  323. };
  324. Writable.prototype.cork = function () {
  325. var state = this._writableState;
  326. state.corked++;
  327. };
  328. Writable.prototype.uncork = function () {
  329. var state = this._writableState;
  330. if (state.corked) {
  331. state.corked--;
  332. if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
  333. }
  334. };
  335. Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
  336. // node::ParseEncoding() requires lower case.
  337. if (typeof encoding === 'string') encoding = encoding.toLowerCase();
  338. if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
  339. this._writableState.defaultEncoding = encoding;
  340. return this;
  341. };
  342. function decodeChunk(state, chunk, encoding) {
  343. if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
  344. chunk = Buffer.from(chunk, encoding);
  345. }
  346. return chunk;
  347. }
  348. Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
  349. // making it explicit this property is not enumerable
  350. // because otherwise some prototype manipulation in
  351. // userland will fail
  352. enumerable: false,
  353. get: function () {
  354. return this._writableState.highWaterMark;
  355. }
  356. });
  357. // if we're already writing something, then just put this
  358. // in the queue, and wait our turn. Otherwise, call _write
  359. // If we return false, then we need a drain event, so set that flag.
  360. function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
  361. if (!isBuf) {
  362. var newChunk = decodeChunk(state, chunk, encoding);
  363. if (chunk !== newChunk) {
  364. isBuf = true;
  365. encoding = 'buffer';
  366. chunk = newChunk;
  367. }
  368. }
  369. var len = state.objectMode ? 1 : chunk.length;
  370. state.length += len;
  371. var ret = state.length < state.highWaterMark;
  372. // we must ensure that previous needDrain will not be reset to false.
  373. if (!ret) state.needDrain = true;
  374. if (state.writing || state.corked) {
  375. var last = state.lastBufferedRequest;
  376. state.lastBufferedRequest = {
  377. chunk: chunk,
  378. encoding: encoding,
  379. isBuf: isBuf,
  380. callback: cb,
  381. next: null
  382. };
  383. if (last) {
  384. last.next = state.lastBufferedRequest;
  385. } else {
  386. state.bufferedRequest = state.lastBufferedRequest;
  387. }
  388. state.bufferedRequestCount += 1;
  389. } else {
  390. doWrite(stream, state, false, len, chunk, encoding, cb);
  391. }
  392. return ret;
  393. }
  394. function doWrite(stream, state, writev, len, chunk, encoding, cb) {
  395. state.writelen = len;
  396. state.writecb = cb;
  397. state.writing = true;
  398. state.sync = true;
  399. if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
  400. state.sync = false;
  401. }
  402. function onwriteError(stream, state, sync, er, cb) {
  403. --state.pendingcb;
  404. if (sync) {
  405. // defer the callback if we are being called synchronously
  406. // to avoid piling up things on the stack
  407. pna.nextTick(cb, er);
  408. // this can emit finish, and it will always happen
  409. // after error
  410. pna.nextTick(finishMaybe, stream, state);
  411. stream._writableState.errorEmitted = true;
  412. stream.emit('error', er);
  413. } else {
  414. // the caller expect this to happen before if
  415. // it is async
  416. cb(er);
  417. stream._writableState.errorEmitted = true;
  418. stream.emit('error', er);
  419. // this can emit finish, but finish must
  420. // always follow error
  421. finishMaybe(stream, state);
  422. }
  423. }
  424. function onwriteStateUpdate(state) {
  425. state.writing = false;
  426. state.writecb = null;
  427. state.length -= state.writelen;
  428. state.writelen = 0;
  429. }
  430. function onwrite(stream, er) {
  431. var state = stream._writableState;
  432. var sync = state.sync;
  433. var cb = state.writecb;
  434. onwriteStateUpdate(state);
  435. if (er) onwriteError(stream, state, sync, er, cb);else {
  436. // Check if we're actually ready to finish, but don't emit yet
  437. var finished = needFinish(state);
  438. if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
  439. clearBuffer(stream, state);
  440. }
  441. if (sync) {
  442. /*<replacement>*/
  443. asyncWrite(afterWrite, stream, state, finished, cb);
  444. /*</replacement>*/
  445. } else {
  446. afterWrite(stream, state, finished, cb);
  447. }
  448. }
  449. }
  450. function afterWrite(stream, state, finished, cb) {
  451. if (!finished) onwriteDrain(stream, state);
  452. state.pendingcb--;
  453. cb();
  454. finishMaybe(stream, state);
  455. }
  456. // Must force callback to be called on nextTick, so that we don't
  457. // emit 'drain' before the write() consumer gets the 'false' return
  458. // value, and has a chance to attach a 'drain' listener.
  459. function onwriteDrain(stream, state) {
  460. if (state.length === 0 && state.needDrain) {
  461. state.needDrain = false;
  462. stream.emit('drain');
  463. }
  464. }
  465. // if there's something in the buffer waiting, then process it
  466. function clearBuffer(stream, state) {
  467. state.bufferProcessing = true;
  468. var entry = state.bufferedRequest;
  469. if (stream._writev && entry && entry.next) {
  470. // Fast case, write everything using _writev()
  471. var l = state.bufferedRequestCount;
  472. var buffer = new Array(l);
  473. var holder = state.corkedRequestsFree;
  474. holder.entry = entry;
  475. var count = 0;
  476. var allBuffers = true;
  477. while (entry) {
  478. buffer[count] = entry;
  479. if (!entry.isBuf) allBuffers = false;
  480. entry = entry.next;
  481. count += 1;
  482. }
  483. buffer.allBuffers = allBuffers;
  484. doWrite(stream, state, true, state.length, buffer, '', holder.finish);
  485. // doWrite is almost always async, defer these to save a bit of time
  486. // as the hot path ends with doWrite
  487. state.pendingcb++;
  488. state.lastBufferedRequest = null;
  489. if (holder.next) {
  490. state.corkedRequestsFree = holder.next;
  491. holder.next = null;
  492. } else {
  493. state.corkedRequestsFree = new CorkedRequest(state);
  494. }
  495. state.bufferedRequestCount = 0;
  496. } else {
  497. // Slow case, write chunks one-by-one
  498. while (entry) {
  499. var chunk = entry.chunk;
  500. var encoding = entry.encoding;
  501. var cb = entry.callback;
  502. var len = state.objectMode ? 1 : chunk.length;
  503. doWrite(stream, state, false, len, chunk, encoding, cb);
  504. entry = entry.next;
  505. state.bufferedRequestCount--;
  506. // if we didn't call the onwrite immediately, then
  507. // it means that we need to wait until it does.
  508. // also, that means that the chunk and cb are currently
  509. // being processed, so move the buffer counter past them.
  510. if (state.writing) {
  511. break;
  512. }
  513. }
  514. if (entry === null) state.lastBufferedRequest = null;
  515. }
  516. state.bufferedRequest = entry;
  517. state.bufferProcessing = false;
  518. }
  519. Writable.prototype._write = function (chunk, encoding, cb) {
  520. cb(new Error('_write() is not implemented'));
  521. };
  522. Writable.prototype._writev = null;
  523. Writable.prototype.end = function (chunk, encoding, cb) {
  524. var state = this._writableState;
  525. if (typeof chunk === 'function') {
  526. cb = chunk;
  527. chunk = null;
  528. encoding = null;
  529. } else if (typeof encoding === 'function') {
  530. cb = encoding;
  531. encoding = null;
  532. }
  533. if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
  534. // .end() fully uncorks
  535. if (state.corked) {
  536. state.corked = 1;
  537. this.uncork();
  538. }
  539. // ignore unnecessary end() calls.
  540. if (!state.ending && !state.finished) endWritable(this, state, cb);
  541. };
  542. function needFinish(state) {
  543. return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
  544. }
  545. function callFinal(stream, state) {
  546. stream._final(function (err) {
  547. state.pendingcb--;
  548. if (err) {
  549. stream.emit('error', err);
  550. }
  551. state.prefinished = true;
  552. stream.emit('prefinish');
  553. finishMaybe(stream, state);
  554. });
  555. }
  556. function prefinish(stream, state) {
  557. if (!state.prefinished && !state.finalCalled) {
  558. if (typeof stream._final === 'function') {
  559. state.pendingcb++;
  560. state.finalCalled = true;
  561. pna.nextTick(callFinal, stream, state);
  562. } else {
  563. state.prefinished = true;
  564. stream.emit('prefinish');
  565. }
  566. }
  567. }
  568. function finishMaybe(stream, state) {
  569. var need = needFinish(state);
  570. if (need) {
  571. prefinish(stream, state);
  572. if (state.pendingcb === 0) {
  573. state.finished = true;
  574. stream.emit('finish');
  575. }
  576. }
  577. return need;
  578. }
  579. function endWritable(stream, state, cb) {
  580. state.ending = true;
  581. finishMaybe(stream, state);
  582. if (cb) {
  583. if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
  584. }
  585. state.ended = true;
  586. stream.writable = false;
  587. }
  588. function onCorkedFinish(corkReq, state, err) {
  589. var entry = corkReq.entry;
  590. corkReq.entry = null;
  591. while (entry) {
  592. var cb = entry.callback;
  593. state.pendingcb--;
  594. cb(err);
  595. entry = entry.next;
  596. }
  597. if (state.corkedRequestsFree) {
  598. state.corkedRequestsFree.next = corkReq;
  599. } else {
  600. state.corkedRequestsFree = corkReq;
  601. }
  602. }
  603. Object.defineProperty(Writable.prototype, 'destroyed', {
  604. get: function () {
  605. if (this._writableState === undefined) {
  606. return false;
  607. }
  608. return this._writableState.destroyed;
  609. },
  610. set: function (value) {
  611. // we ignore the value if the stream
  612. // has not been initialized yet
  613. if (!this._writableState) {
  614. return;
  615. }
  616. // backward compatibility, the user is explicitly
  617. // managing destroyed
  618. this._writableState.destroyed = value;
  619. }
  620. });
  621. Writable.prototype.destroy = destroyImpl.destroy;
  622. Writable.prototype._undestroy = destroyImpl.undestroy;
  623. Writable.prototype._destroy = function (err, cb) {
  624. this.end();
  625. cb(err);
  626. };
  627. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node-libs-browser/mock/process.js */ 78), __webpack_require__(/*! ./../../webpack/buildin/global.js */ 3)))
  628. /***/ }),
  629. /***/ 101:
  630. /*!************************************************!*\
  631. !*** ./node_modules/util-deprecate/browser.js ***!
  632. \************************************************/
  633. /*! no static exports found */
  634. /***/ (function(module, exports, __webpack_require__) {
  635. /* WEBPACK VAR INJECTION */(function(global) {
  636. /**
  637. * Module exports.
  638. */
  639. module.exports = deprecate;
  640. /**
  641. * Mark that a method should not be used.
  642. * Returns a modified function which warns once by default.
  643. *
  644. * If `localStorage.noDeprecation = true` is set, then it is a no-op.
  645. *
  646. * If `localStorage.throwDeprecation = true` is set, then deprecated functions
  647. * will throw an Error when invoked.
  648. *
  649. * If `localStorage.traceDeprecation = true` is set, then deprecated functions
  650. * will invoke `console.trace()` instead of `console.error()`.
  651. *
  652. * @param {Function} fn - the function to deprecate
  653. * @param {String} msg - the string to print to the console when `fn` is invoked
  654. * @returns {Function} a new "deprecated" version of `fn`
  655. * @api public
  656. */
  657. function deprecate (fn, msg) {
  658. if (config('noDeprecation')) {
  659. return fn;
  660. }
  661. var warned = false;
  662. function deprecated() {
  663. if (!warned) {
  664. if (config('throwDeprecation')) {
  665. throw new Error(msg);
  666. } else if (config('traceDeprecation')) {
  667. console.trace(msg);
  668. } else {
  669. console.warn(msg);
  670. }
  671. warned = true;
  672. }
  673. return fn.apply(this, arguments);
  674. }
  675. return deprecated;
  676. }
  677. /**
  678. * Checks `localStorage` for boolean values for the given `name`.
  679. *
  680. * @param {String} name
  681. * @returns {Boolean}
  682. * @api private
  683. */
  684. function config (name) {
  685. // accessing global.localStorage can trigger a DOMException in sandboxed iframes
  686. try {
  687. if (!global.localStorage) return false;
  688. } catch (_) {
  689. return false;
  690. }
  691. var val = global.localStorage[name];
  692. if (null == val) return false;
  693. return String(val).toLowerCase() === 'true';
  694. }
  695. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 3)))
  696. /***/ }),
  697. /***/ 102:
  698. /*!***********************************************************!*\
  699. !*** ./node_modules/string_decoder/lib/string_decoder.js ***!
  700. \***********************************************************/
  701. /*! no static exports found */
  702. /***/ (function(module, exports, __webpack_require__) {
  703. "use strict";
  704. // Copyright Joyent, Inc. and other Node contributors.
  705. //
  706. // Permission is hereby granted, free of charge, to any person obtaining a
  707. // copy of this software and associated documentation files (the
  708. // "Software"), to deal in the Software without restriction, including
  709. // without limitation the rights to use, copy, modify, merge, publish,
  710. // distribute, sublicense, and/or sell copies of the Software, and to permit
  711. // persons to whom the Software is furnished to do so, subject to the
  712. // following conditions:
  713. //
  714. // The above copyright notice and this permission notice shall be included
  715. // in all copies or substantial portions of the Software.
  716. //
  717. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  718. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  719. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  720. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  721. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  722. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  723. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  724. /*<replacement>*/
  725. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer;
  726. /*</replacement>*/
  727. var isEncoding = Buffer.isEncoding || function (encoding) {
  728. encoding = '' + encoding;
  729. switch (encoding && encoding.toLowerCase()) {
  730. case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
  731. return true;
  732. default:
  733. return false;
  734. }
  735. };
  736. function _normalizeEncoding(enc) {
  737. if (!enc) return 'utf8';
  738. var retried;
  739. while (true) {
  740. switch (enc) {
  741. case 'utf8':
  742. case 'utf-8':
  743. return 'utf8';
  744. case 'ucs2':
  745. case 'ucs-2':
  746. case 'utf16le':
  747. case 'utf-16le':
  748. return 'utf16le';
  749. case 'latin1':
  750. case 'binary':
  751. return 'latin1';
  752. case 'base64':
  753. case 'ascii':
  754. case 'hex':
  755. return enc;
  756. default:
  757. if (retried) return; // undefined
  758. enc = ('' + enc).toLowerCase();
  759. retried = true;
  760. }
  761. }
  762. };
  763. // Do not cache `Buffer.isEncoding` when checking encoding names as some
  764. // modules monkey-patch it to support additional encodings
  765. function normalizeEncoding(enc) {
  766. var nenc = _normalizeEncoding(enc);
  767. if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
  768. return nenc || enc;
  769. }
  770. // StringDecoder provides an interface for efficiently splitting a series of
  771. // buffers into a series of JS strings without breaking apart multi-byte
  772. // characters.
  773. exports.StringDecoder = StringDecoder;
  774. function StringDecoder(encoding) {
  775. this.encoding = normalizeEncoding(encoding);
  776. var nb;
  777. switch (this.encoding) {
  778. case 'utf16le':
  779. this.text = utf16Text;
  780. this.end = utf16End;
  781. nb = 4;
  782. break;
  783. case 'utf8':
  784. this.fillLast = utf8FillLast;
  785. nb = 4;
  786. break;
  787. case 'base64':
  788. this.text = base64Text;
  789. this.end = base64End;
  790. nb = 3;
  791. break;
  792. default:
  793. this.write = simpleWrite;
  794. this.end = simpleEnd;
  795. return;
  796. }
  797. this.lastNeed = 0;
  798. this.lastTotal = 0;
  799. this.lastChar = Buffer.allocUnsafe(nb);
  800. }
  801. StringDecoder.prototype.write = function (buf) {
  802. if (buf.length === 0) return '';
  803. var r;
  804. var i;
  805. if (this.lastNeed) {
  806. r = this.fillLast(buf);
  807. if (r === undefined) return '';
  808. i = this.lastNeed;
  809. this.lastNeed = 0;
  810. } else {
  811. i = 0;
  812. }
  813. if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
  814. return r || '';
  815. };
  816. StringDecoder.prototype.end = utf8End;
  817. // Returns only complete characters in a Buffer
  818. StringDecoder.prototype.text = utf8Text;
  819. // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
  820. StringDecoder.prototype.fillLast = function (buf) {
  821. if (this.lastNeed <= buf.length) {
  822. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
  823. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  824. }
  825. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
  826. this.lastNeed -= buf.length;
  827. };
  828. // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
  829. // continuation byte. If an invalid byte is detected, -2 is returned.
  830. function utf8CheckByte(byte) {
  831. if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
  832. return byte >> 6 === 0x02 ? -1 : -2;
  833. }
  834. // Checks at most 3 bytes at the end of a Buffer in order to detect an
  835. // incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
  836. // needed to complete the UTF-8 character (if applicable) are returned.
  837. function utf8CheckIncomplete(self, buf, i) {
  838. var j = buf.length - 1;
  839. if (j < i) return 0;
  840. var nb = utf8CheckByte(buf[j]);
  841. if (nb >= 0) {
  842. if (nb > 0) self.lastNeed = nb - 1;
  843. return nb;
  844. }
  845. if (--j < i || nb === -2) return 0;
  846. nb = utf8CheckByte(buf[j]);
  847. if (nb >= 0) {
  848. if (nb > 0) self.lastNeed = nb - 2;
  849. return nb;
  850. }
  851. if (--j < i || nb === -2) return 0;
  852. nb = utf8CheckByte(buf[j]);
  853. if (nb >= 0) {
  854. if (nb > 0) {
  855. if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
  856. }
  857. return nb;
  858. }
  859. return 0;
  860. }
  861. // Validates as many continuation bytes for a multi-byte UTF-8 character as
  862. // needed or are available. If we see a non-continuation byte where we expect
  863. // one, we "replace" the validated continuation bytes we've seen so far with
  864. // a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
  865. // behavior. The continuation byte check is included three times in the case
  866. // where all of the continuation bytes for a character exist in the same buffer.
  867. // It is also done this way as a slight performance increase instead of using a
  868. // loop.
  869. function utf8CheckExtraBytes(self, buf, p) {
  870. if ((buf[0] & 0xC0) !== 0x80) {
  871. self.lastNeed = 0;
  872. return '\ufffd';
  873. }
  874. if (self.lastNeed > 1 && buf.length > 1) {
  875. if ((buf[1] & 0xC0) !== 0x80) {
  876. self.lastNeed = 1;
  877. return '\ufffd';
  878. }
  879. if (self.lastNeed > 2 && buf.length > 2) {
  880. if ((buf[2] & 0xC0) !== 0x80) {
  881. self.lastNeed = 2;
  882. return '\ufffd';
  883. }
  884. }
  885. }
  886. }
  887. // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
  888. function utf8FillLast(buf) {
  889. var p = this.lastTotal - this.lastNeed;
  890. var r = utf8CheckExtraBytes(this, buf, p);
  891. if (r !== undefined) return r;
  892. if (this.lastNeed <= buf.length) {
  893. buf.copy(this.lastChar, p, 0, this.lastNeed);
  894. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  895. }
  896. buf.copy(this.lastChar, p, 0, buf.length);
  897. this.lastNeed -= buf.length;
  898. }
  899. // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
  900. // partial character, the character's bytes are buffered until the required
  901. // number of bytes are available.
  902. function utf8Text(buf, i) {
  903. var total = utf8CheckIncomplete(this, buf, i);
  904. if (!this.lastNeed) return buf.toString('utf8', i);
  905. this.lastTotal = total;
  906. var end = buf.length - (total - this.lastNeed);
  907. buf.copy(this.lastChar, 0, end);
  908. return buf.toString('utf8', i, end);
  909. }
  910. // For UTF-8, a replacement character is added when ending on a partial
  911. // character.
  912. function utf8End(buf) {
  913. var r = buf && buf.length ? this.write(buf) : '';
  914. if (this.lastNeed) return r + '\ufffd';
  915. return r;
  916. }
  917. // UTF-16LE typically needs two bytes per character, but even if we have an even
  918. // number of bytes available, we need to check if we end on a leading/high
  919. // surrogate. In that case, we need to wait for the next two bytes in order to
  920. // decode the last character properly.
  921. function utf16Text(buf, i) {
  922. if ((buf.length - i) % 2 === 0) {
  923. var r = buf.toString('utf16le', i);
  924. if (r) {
  925. var c = r.charCodeAt(r.length - 1);
  926. if (c >= 0xD800 && c <= 0xDBFF) {
  927. this.lastNeed = 2;
  928. this.lastTotal = 4;
  929. this.lastChar[0] = buf[buf.length - 2];
  930. this.lastChar[1] = buf[buf.length - 1];
  931. return r.slice(0, -1);
  932. }
  933. }
  934. return r;
  935. }
  936. this.lastNeed = 1;
  937. this.lastTotal = 2;
  938. this.lastChar[0] = buf[buf.length - 1];
  939. return buf.toString('utf16le', i, buf.length - 1);
  940. }
  941. // For UTF-16LE we do not explicitly append special replacement characters if we
  942. // end on a partial character, we simply let v8 handle that.
  943. function utf16End(buf) {
  944. var r = buf && buf.length ? this.write(buf) : '';
  945. if (this.lastNeed) {
  946. var end = this.lastTotal - this.lastNeed;
  947. return r + this.lastChar.toString('utf16le', 0, end);
  948. }
  949. return r;
  950. }
  951. function base64Text(buf, i) {
  952. var n = (buf.length - i) % 3;
  953. if (n === 0) return buf.toString('base64', i);
  954. this.lastNeed = 3 - n;
  955. this.lastTotal = 3;
  956. if (n === 1) {
  957. this.lastChar[0] = buf[buf.length - 1];
  958. } else {
  959. this.lastChar[0] = buf[buf.length - 2];
  960. this.lastChar[1] = buf[buf.length - 1];
  961. }
  962. return buf.toString('base64', i, buf.length - n);
  963. }
  964. function base64End(buf) {
  965. var r = buf && buf.length ? this.write(buf) : '';
  966. if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
  967. return r;
  968. }
  969. // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
  970. function simpleWrite(buf) {
  971. return buf.toString(this.encoding);
  972. }
  973. function simpleEnd(buf) {
  974. return buf && buf.length ? this.write(buf) : '';
  975. }
  976. /***/ }),
  977. /***/ 103:
  978. /*!***************************************************************!*\
  979. !*** ./node_modules/readable-stream/lib/_stream_transform.js ***!
  980. \***************************************************************/
  981. /*! no static exports found */
  982. /***/ (function(module, exports, __webpack_require__) {
  983. "use strict";
  984. // Copyright Joyent, Inc. and other Node contributors.
  985. //
  986. // Permission is hereby granted, free of charge, to any person obtaining a
  987. // copy of this software and associated documentation files (the
  988. // "Software"), to deal in the Software without restriction, including
  989. // without limitation the rights to use, copy, modify, merge, publish,
  990. // distribute, sublicense, and/or sell copies of the Software, and to permit
  991. // persons to whom the Software is furnished to do so, subject to the
  992. // following conditions:
  993. //
  994. // The above copyright notice and this permission notice shall be included
  995. // in all copies or substantial portions of the Software.
  996. //
  997. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  998. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  999. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  1000. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  1001. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  1002. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  1003. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  1004. // a transform stream is a readable/writable stream where you do
  1005. // something with the data. Sometimes it's called a "filter",
  1006. // but that's not a great name for it, since that implies a thing where
  1007. // some bits pass through, and others are simply ignored. (That would
  1008. // be a valid example of a transform, of course.)
  1009. //
  1010. // While the output is causally related to the input, it's not a
  1011. // necessarily symmetric or synchronous transformation. For example,
  1012. // a zlib stream might take multiple plain-text writes(), and then
  1013. // emit a single compressed chunk some time in the future.
  1014. //
  1015. // Here's how this works:
  1016. //
  1017. // The Transform stream has all the aspects of the readable and writable
  1018. // stream classes. When you write(chunk), that calls _write(chunk,cb)
  1019. // internally, and returns false if there's a lot of pending writes
  1020. // buffered up. When you call read(), that calls _read(n) until
  1021. // there's enough pending readable data buffered up.
  1022. //
  1023. // In a transform stream, the written data is placed in a buffer. When
  1024. // _read(n) is called, it transforms the queued up data, calling the
  1025. // buffered _write cb's as it consumes chunks. If consuming a single
  1026. // written chunk would result in multiple output chunks, then the first
  1027. // outputted bit calls the readcb, and subsequent chunks just go into
  1028. // the read buffer, and will cause it to emit 'readable' if necessary.
  1029. //
  1030. // This way, back-pressure is actually determined by the reading side,
  1031. // since _read has to be called to start processing a new chunk. However,
  1032. // a pathological inflate type of transform can cause excessive buffering
  1033. // here. For example, imagine a stream where every byte of input is
  1034. // interpreted as an integer from 0-255, and then results in that many
  1035. // bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
  1036. // 1kb of data being output. In this case, you could write a very small
  1037. // amount of input, and end up with a very large amount of output. In
  1038. // such a pathological inflating mechanism, there'd be no way to tell
  1039. // the system to stop doing the transform. A single 4MB write could
  1040. // cause the system to run out of memory.
  1041. //
  1042. // However, even in such a pathological case, only a single written chunk
  1043. // would be consumed, and then the rest would wait (un-transformed) until
  1044. // the results of the previous transformed chunk were consumed.
  1045. module.exports = Transform;
  1046. var Duplex = __webpack_require__(/*! ./_stream_duplex */ 99);
  1047. /*<replacement>*/
  1048. var util = Object.create(__webpack_require__(/*! core-util-is */ 94));
  1049. util.inherits = __webpack_require__(/*! inherits */ 86);
  1050. /*</replacement>*/
  1051. util.inherits(Transform, Duplex);
  1052. function afterTransform(er, data) {
  1053. var ts = this._transformState;
  1054. ts.transforming = false;
  1055. var cb = ts.writecb;
  1056. if (!cb) {
  1057. return this.emit('error', new Error('write callback called multiple times'));
  1058. }
  1059. ts.writechunk = null;
  1060. ts.writecb = null;
  1061. if (data != null) // single equals check for both `null` and `undefined`
  1062. this.push(data);
  1063. cb(er);
  1064. var rs = this._readableState;
  1065. rs.reading = false;
  1066. if (rs.needReadable || rs.length < rs.highWaterMark) {
  1067. this._read(rs.highWaterMark);
  1068. }
  1069. }
  1070. function Transform(options) {
  1071. if (!(this instanceof Transform)) return new Transform(options);
  1072. Duplex.call(this, options);
  1073. this._transformState = {
  1074. afterTransform: afterTransform.bind(this),
  1075. needTransform: false,
  1076. transforming: false,
  1077. writecb: null,
  1078. writechunk: null,
  1079. writeencoding: null
  1080. };
  1081. // start out asking for a readable event once data is transformed.
  1082. this._readableState.needReadable = true;
  1083. // we have implemented the _read method, and done the other things
  1084. // that Readable wants before the first _read call, so unset the
  1085. // sync guard flag.
  1086. this._readableState.sync = false;
  1087. if (options) {
  1088. if (typeof options.transform === 'function') this._transform = options.transform;
  1089. if (typeof options.flush === 'function') this._flush = options.flush;
  1090. }
  1091. // When the writable side finishes, then flush out anything remaining.
  1092. this.on('prefinish', prefinish);
  1093. }
  1094. function prefinish() {
  1095. var _this = this;
  1096. if (typeof this._flush === 'function') {
  1097. this._flush(function (er, data) {
  1098. done(_this, er, data);
  1099. });
  1100. } else {
  1101. done(this, null, null);
  1102. }
  1103. }
  1104. Transform.prototype.push = function (chunk, encoding) {
  1105. this._transformState.needTransform = false;
  1106. return Duplex.prototype.push.call(this, chunk, encoding);
  1107. };
  1108. // This is the part where you do stuff!
  1109. // override this function in implementation classes.
  1110. // 'chunk' is an input chunk.
  1111. //
  1112. // Call `push(newChunk)` to pass along transformed output
  1113. // to the readable side. You may call 'push' zero or more times.
  1114. //
  1115. // Call `cb(err)` when you are done with this chunk. If you pass
  1116. // an error, then that'll put the hurt on the whole operation. If you
  1117. // never call cb(), then you'll never get another chunk.
  1118. Transform.prototype._transform = function (chunk, encoding, cb) {
  1119. throw new Error('_transform() is not implemented');
  1120. };
  1121. Transform.prototype._write = function (chunk, encoding, cb) {
  1122. var ts = this._transformState;
  1123. ts.writecb = cb;
  1124. ts.writechunk = chunk;
  1125. ts.writeencoding = encoding;
  1126. if (!ts.transforming) {
  1127. var rs = this._readableState;
  1128. if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
  1129. }
  1130. };
  1131. // Doesn't matter what the args are here.
  1132. // _transform does all the work.
  1133. // That we got here means that the readable side wants more data.
  1134. Transform.prototype._read = function (n) {
  1135. var ts = this._transformState;
  1136. if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
  1137. ts.transforming = true;
  1138. this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  1139. } else {
  1140. // mark that we need a transform, so that any data that comes in
  1141. // will get processed, now that we've asked for it.
  1142. ts.needTransform = true;
  1143. }
  1144. };
  1145. Transform.prototype._destroy = function (err, cb) {
  1146. var _this2 = this;
  1147. Duplex.prototype._destroy.call(this, err, function (err2) {
  1148. cb(err2);
  1149. _this2.emit('close');
  1150. });
  1151. };
  1152. function done(stream, er, data) {
  1153. if (er) return stream.emit('error', er);
  1154. if (data != null) // single equals check for both `null` and `undefined`
  1155. stream.push(data);
  1156. // if there's nothing in the write buffer, then that means
  1157. // that nothing more will ever be provided
  1158. if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
  1159. if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
  1160. return stream.push(null);
  1161. }
  1162. /***/ }),
  1163. /***/ 104:
  1164. /*!*****************************************************************!*\
  1165. !*** ./node_modules/readable-stream/lib/_stream_passthrough.js ***!
  1166. \*****************************************************************/
  1167. /*! no static exports found */
  1168. /***/ (function(module, exports, __webpack_require__) {
  1169. "use strict";
  1170. // Copyright Joyent, Inc. and other Node contributors.
  1171. //
  1172. // Permission is hereby granted, free of charge, to any person obtaining a
  1173. // copy of this software and associated documentation files (the
  1174. // "Software"), to deal in the Software without restriction, including
  1175. // without limitation the rights to use, copy, modify, merge, publish,
  1176. // distribute, sublicense, and/or sell copies of the Software, and to permit
  1177. // persons to whom the Software is furnished to do so, subject to the
  1178. // following conditions:
  1179. //
  1180. // The above copyright notice and this permission notice shall be included
  1181. // in all copies or substantial portions of the Software.
  1182. //
  1183. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  1184. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  1185. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  1186. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  1187. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  1188. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  1189. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  1190. // a passthrough stream.
  1191. // basically just the most minimal sort of Transform stream.
  1192. // Every written chunk gets output as-is.
  1193. module.exports = PassThrough;
  1194. var Transform = __webpack_require__(/*! ./_stream_transform */ 103);
  1195. /*<replacement>*/
  1196. var util = Object.create(__webpack_require__(/*! core-util-is */ 94));
  1197. util.inherits = __webpack_require__(/*! inherits */ 86);
  1198. /*</replacement>*/
  1199. util.inherits(PassThrough, Transform);
  1200. function PassThrough(options) {
  1201. if (!(this instanceof PassThrough)) return new PassThrough(options);
  1202. Transform.call(this, options);
  1203. }
  1204. PassThrough.prototype._transform = function (chunk, encoding, cb) {
  1205. cb(null, chunk);
  1206. };
  1207. /***/ }),
  1208. /***/ 105:
  1209. /*!*****************************************!*\
  1210. !*** ./node_modules/ripemd160/index.js ***!
  1211. \*****************************************/
  1212. /*! no static exports found */
  1213. /***/ (function(module, exports, __webpack_require__) {
  1214. "use strict";
  1215. var Buffer = __webpack_require__(/*! buffer */ 81).Buffer
  1216. var inherits = __webpack_require__(/*! inherits */ 86)
  1217. var HashBase = __webpack_require__(/*! hash-base */ 88)
  1218. var ARRAY16 = new Array(16)
  1219. var zl = [
  1220. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  1221. 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
  1222. 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
  1223. 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
  1224. 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
  1225. ]
  1226. var zr = [
  1227. 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
  1228. 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
  1229. 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
  1230. 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
  1231. 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
  1232. ]
  1233. var sl = [
  1234. 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
  1235. 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
  1236. 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
  1237. 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
  1238. 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
  1239. ]
  1240. var sr = [
  1241. 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
  1242. 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
  1243. 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
  1244. 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
  1245. 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
  1246. ]
  1247. var hl = [0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e]
  1248. var hr = [0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000]
  1249. function RIPEMD160 () {
  1250. HashBase.call(this, 64)
  1251. // state
  1252. this._a = 0x67452301
  1253. this._b = 0xefcdab89
  1254. this._c = 0x98badcfe
  1255. this._d = 0x10325476
  1256. this._e = 0xc3d2e1f0
  1257. }
  1258. inherits(RIPEMD160, HashBase)
  1259. RIPEMD160.prototype._update = function () {
  1260. var words = ARRAY16
  1261. for (var j = 0; j < 16; ++j) words[j] = this._block.readInt32LE(j * 4)
  1262. var al = this._a | 0
  1263. var bl = this._b | 0
  1264. var cl = this._c | 0
  1265. var dl = this._d | 0
  1266. var el = this._e | 0
  1267. var ar = this._a | 0
  1268. var br = this._b | 0
  1269. var cr = this._c | 0
  1270. var dr = this._d | 0
  1271. var er = this._e | 0
  1272. // computation
  1273. for (var i = 0; i < 80; i += 1) {
  1274. var tl
  1275. var tr
  1276. if (i < 16) {
  1277. tl = fn1(al, bl, cl, dl, el, words[zl[i]], hl[0], sl[i])
  1278. tr = fn5(ar, br, cr, dr, er, words[zr[i]], hr[0], sr[i])
  1279. } else if (i < 32) {
  1280. tl = fn2(al, bl, cl, dl, el, words[zl[i]], hl[1], sl[i])
  1281. tr = fn4(ar, br, cr, dr, er, words[zr[i]], hr[1], sr[i])
  1282. } else if (i < 48) {
  1283. tl = fn3(al, bl, cl, dl, el, words[zl[i]], hl[2], sl[i])
  1284. tr = fn3(ar, br, cr, dr, er, words[zr[i]], hr[2], sr[i])
  1285. } else if (i < 64) {
  1286. tl = fn4(al, bl, cl, dl, el, words[zl[i]], hl[3], sl[i])
  1287. tr = fn2(ar, br, cr, dr, er, words[zr[i]], hr[3], sr[i])
  1288. } else { // if (i<80) {
  1289. tl = fn5(al, bl, cl, dl, el, words[zl[i]], hl[4], sl[i])
  1290. tr = fn1(ar, br, cr, dr, er, words[zr[i]], hr[4], sr[i])
  1291. }
  1292. al = el
  1293. el = dl
  1294. dl = rotl(cl, 10)
  1295. cl = bl
  1296. bl = tl
  1297. ar = er
  1298. er = dr
  1299. dr = rotl(cr, 10)
  1300. cr = br
  1301. br = tr
  1302. }
  1303. // update state
  1304. var t = (this._b + cl + dr) | 0
  1305. this._b = (this._c + dl + er) | 0
  1306. this._c = (this._d + el + ar) | 0
  1307. this._d = (this._e + al + br) | 0
  1308. this._e = (this._a + bl + cr) | 0
  1309. this._a = t
  1310. }
  1311. RIPEMD160.prototype._digest = function () {
  1312. // create padding and handle blocks
  1313. this._block[this._blockOffset++] = 0x80
  1314. if (this._blockOffset > 56) {
  1315. this._block.fill(0, this._blockOffset, 64)
  1316. this._update()
  1317. this._blockOffset = 0
  1318. }
  1319. this._block.fill(0, this._blockOffset, 56)
  1320. this._block.writeUInt32LE(this._length[0], 56)
  1321. this._block.writeUInt32LE(this._length[1], 60)
  1322. this._update()
  1323. // produce result
  1324. var buffer = Buffer.alloc ? Buffer.alloc(20) : new Buffer(20)
  1325. buffer.writeInt32LE(this._a, 0)
  1326. buffer.writeInt32LE(this._b, 4)
  1327. buffer.writeInt32LE(this._c, 8)
  1328. buffer.writeInt32LE(this._d, 12)
  1329. buffer.writeInt32LE(this._e, 16)
  1330. return buffer
  1331. }
  1332. function rotl (x, n) {
  1333. return (x << n) | (x >>> (32 - n))
  1334. }
  1335. function fn1 (a, b, c, d, e, m, k, s) {
  1336. return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0
  1337. }
  1338. function fn2 (a, b, c, d, e, m, k, s) {
  1339. return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + e) | 0
  1340. }
  1341. function fn3 (a, b, c, d, e, m, k, s) {
  1342. return (rotl((a + ((b | (~c)) ^ d) + m + k) | 0, s) + e) | 0
  1343. }
  1344. function fn4 (a, b, c, d, e, m, k, s) {
  1345. return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + e) | 0
  1346. }
  1347. function fn5 (a, b, c, d, e, m, k, s) {
  1348. return (rotl((a + (b ^ (c | (~d))) + m + k) | 0, s) + e) | 0
  1349. }
  1350. module.exports = RIPEMD160
  1351. /***/ }),
  1352. /***/ 106:
  1353. /*!**************************************!*\
  1354. !*** ./node_modules/sha.js/index.js ***!
  1355. \**************************************/
  1356. /*! no static exports found */
  1357. /***/ (function(module, exports, __webpack_require__) {
  1358. var exports = module.exports = function SHA (algorithm) {
  1359. algorithm = algorithm.toLowerCase()
  1360. var Algorithm = exports[algorithm]
  1361. if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)')
  1362. return new Algorithm()
  1363. }
  1364. exports.sha = __webpack_require__(/*! ./sha */ 107)
  1365. exports.sha1 = __webpack_require__(/*! ./sha1 */ 109)
  1366. exports.sha224 = __webpack_require__(/*! ./sha224 */ 110)
  1367. exports.sha256 = __webpack_require__(/*! ./sha256 */ 111)
  1368. exports.sha384 = __webpack_require__(/*! ./sha384 */ 112)
  1369. exports.sha512 = __webpack_require__(/*! ./sha512 */ 113)
  1370. /***/ }),
  1371. /***/ 107:
  1372. /*!************************************!*\
  1373. !*** ./node_modules/sha.js/sha.js ***!
  1374. \************************************/
  1375. /*! no static exports found */
  1376. /***/ (function(module, exports, __webpack_require__) {
  1377. /*
  1378. * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined
  1379. * in FIPS PUB 180-1
  1380. * This source code is derived from sha1.js of the same repository.
  1381. * The difference between SHA-0 and SHA-1 is just a bitwise rotate left
  1382. * operation was added.
  1383. */
  1384. var inherits = __webpack_require__(/*! inherits */ 86)
  1385. var Hash = __webpack_require__(/*! ./hash */ 108)
  1386. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  1387. var K = [
  1388. 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0
  1389. ]
  1390. var W = new Array(80)
  1391. function Sha () {
  1392. this.init()
  1393. this._w = W
  1394. Hash.call(this, 64, 56)
  1395. }
  1396. inherits(Sha, Hash)
  1397. Sha.prototype.init = function () {
  1398. this._a = 0x67452301
  1399. this._b = 0xefcdab89
  1400. this._c = 0x98badcfe
  1401. this._d = 0x10325476
  1402. this._e = 0xc3d2e1f0
  1403. return this
  1404. }
  1405. function rotl5 (num) {
  1406. return (num << 5) | (num >>> 27)
  1407. }
  1408. function rotl30 (num) {
  1409. return (num << 30) | (num >>> 2)
  1410. }
  1411. function ft (s, b, c, d) {
  1412. if (s === 0) return (b & c) | ((~b) & d)
  1413. if (s === 2) return (b & c) | (b & d) | (c & d)
  1414. return b ^ c ^ d
  1415. }
  1416. Sha.prototype._update = function (M) {
  1417. var W = this._w
  1418. var a = this._a | 0
  1419. var b = this._b | 0
  1420. var c = this._c | 0
  1421. var d = this._d | 0
  1422. var e = this._e | 0
  1423. for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)
  1424. for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]
  1425. for (var j = 0; j < 80; ++j) {
  1426. var s = ~~(j / 20)
  1427. var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0
  1428. e = d
  1429. d = c
  1430. c = rotl30(b)
  1431. b = a
  1432. a = t
  1433. }
  1434. this._a = (a + this._a) | 0
  1435. this._b = (b + this._b) | 0
  1436. this._c = (c + this._c) | 0
  1437. this._d = (d + this._d) | 0
  1438. this._e = (e + this._e) | 0
  1439. }
  1440. Sha.prototype._hash = function () {
  1441. var H = Buffer.allocUnsafe(20)
  1442. H.writeInt32BE(this._a | 0, 0)
  1443. H.writeInt32BE(this._b | 0, 4)
  1444. H.writeInt32BE(this._c | 0, 8)
  1445. H.writeInt32BE(this._d | 0, 12)
  1446. H.writeInt32BE(this._e | 0, 16)
  1447. return H
  1448. }
  1449. module.exports = Sha
  1450. /***/ }),
  1451. /***/ 108:
  1452. /*!*************************************!*\
  1453. !*** ./node_modules/sha.js/hash.js ***!
  1454. \*************************************/
  1455. /*! no static exports found */
  1456. /***/ (function(module, exports, __webpack_require__) {
  1457. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  1458. // prototype class for hash functions
  1459. function Hash (blockSize, finalSize) {
  1460. this._block = Buffer.alloc(blockSize)
  1461. this._finalSize = finalSize
  1462. this._blockSize = blockSize
  1463. this._len = 0
  1464. }
  1465. Hash.prototype.update = function (data, enc) {
  1466. if (typeof data === 'string') {
  1467. enc = enc || 'utf8'
  1468. data = Buffer.from(data, enc)
  1469. }
  1470. var block = this._block
  1471. var blockSize = this._blockSize
  1472. var length = data.length
  1473. var accum = this._len
  1474. for (var offset = 0; offset < length;) {
  1475. var assigned = accum % blockSize
  1476. var remainder = Math.min(length - offset, blockSize - assigned)
  1477. for (var i = 0; i < remainder; i++) {
  1478. block[assigned + i] = data[offset + i]
  1479. }
  1480. accum += remainder
  1481. offset += remainder
  1482. if ((accum % blockSize) === 0) {
  1483. this._update(block)
  1484. }
  1485. }
  1486. this._len += length
  1487. return this
  1488. }
  1489. Hash.prototype.digest = function (enc) {
  1490. var rem = this._len % this._blockSize
  1491. this._block[rem] = 0x80
  1492. // zero (rem + 1) trailing bits, where (rem + 1) is the smallest
  1493. // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize
  1494. this._block.fill(0, rem + 1)
  1495. if (rem >= this._finalSize) {
  1496. this._update(this._block)
  1497. this._block.fill(0)
  1498. }
  1499. var bits = this._len * 8
  1500. // uint32
  1501. if (bits <= 0xffffffff) {
  1502. this._block.writeUInt32BE(bits, this._blockSize - 4)
  1503. // uint64
  1504. } else {
  1505. var lowBits = (bits & 0xffffffff) >>> 0
  1506. var highBits = (bits - lowBits) / 0x100000000
  1507. this._block.writeUInt32BE(highBits, this._blockSize - 8)
  1508. this._block.writeUInt32BE(lowBits, this._blockSize - 4)
  1509. }
  1510. this._update(this._block)
  1511. var hash = this._hash()
  1512. return enc ? hash.toString(enc) : hash
  1513. }
  1514. Hash.prototype._update = function () {
  1515. throw new Error('_update must be implemented by subclass')
  1516. }
  1517. module.exports = Hash
  1518. /***/ }),
  1519. /***/ 1087:
  1520. /*!***********************************************************!*\
  1521. !*** E:/project/bigdata_WX/components/uni-icons/icons.js ***!
  1522. \***********************************************************/
  1523. /*! no static exports found */
  1524. /***/ (function(module, exports, __webpack_require__) {
  1525. "use strict";
  1526. Object.defineProperty(exports, "__esModule", {
  1527. value: true
  1528. });
  1529. exports.default = void 0;
  1530. var _default = {
  1531. 'contact': "\uE100",
  1532. 'person': "\uE101",
  1533. 'personadd': "\uE102",
  1534. 'contact-filled': "\uE130",
  1535. 'person-filled': "\uE131",
  1536. 'personadd-filled': "\uE132",
  1537. 'phone': "\uE200",
  1538. 'email': "\uE201",
  1539. 'chatbubble': "\uE202",
  1540. 'chatboxes': "\uE203",
  1541. 'phone-filled': "\uE230",
  1542. 'email-filled': "\uE231",
  1543. 'chatbubble-filled': "\uE232",
  1544. 'chatboxes-filled': "\uE233",
  1545. 'weibo': "\uE260",
  1546. 'weixin': "\uE261",
  1547. 'pengyouquan': "\uE262",
  1548. 'chat': "\uE263",
  1549. 'qq': "\uE264",
  1550. 'videocam': "\uE300",
  1551. 'camera': "\uE301",
  1552. 'mic': "\uE302",
  1553. 'location': "\uE303",
  1554. 'mic-filled': "\uE332",
  1555. 'speech': "\uE332",
  1556. 'location-filled': "\uE333",
  1557. 'micoff': "\uE360",
  1558. 'image': "\uE363",
  1559. 'map': "\uE364",
  1560. 'compose': "\uE400",
  1561. 'trash': "\uE401",
  1562. 'upload': "\uE402",
  1563. 'download': "\uE403",
  1564. 'close': "\uE404",
  1565. 'redo': "\uE405",
  1566. 'undo': "\uE406",
  1567. 'refresh': "\uE407",
  1568. 'star': "\uE408",
  1569. 'plus': "\uE409",
  1570. 'minus': "\uE410",
  1571. 'circle': "\uE411",
  1572. 'checkbox': "\uE411",
  1573. 'close-filled': "\uE434",
  1574. 'clear': "\uE434",
  1575. 'refresh-filled': "\uE437",
  1576. 'star-filled': "\uE438",
  1577. 'plus-filled': "\uE439",
  1578. 'minus-filled': "\uE440",
  1579. 'circle-filled': "\uE441",
  1580. 'checkbox-filled': "\uE442",
  1581. 'closeempty': "\uE460",
  1582. 'refreshempty': "\uE461",
  1583. 'reload': "\uE462",
  1584. 'starhalf': "\uE463",
  1585. 'spinner': "\uE464",
  1586. 'spinner-cycle': "\uE465",
  1587. 'search': "\uE466",
  1588. 'plusempty': "\uE468",
  1589. 'forward': "\uE470",
  1590. 'back': "\uE471",
  1591. 'left-nav': "\uE471",
  1592. 'checkmarkempty': "\uE472",
  1593. 'home': "\uE500",
  1594. 'navigate': "\uE501",
  1595. 'gear': "\uE502",
  1596. 'paperplane': "\uE503",
  1597. 'info': "\uE504",
  1598. 'help': "\uE505",
  1599. 'locked': "\uE506",
  1600. 'more': "\uE507",
  1601. 'flag': "\uE508",
  1602. 'home-filled': "\uE530",
  1603. 'gear-filled': "\uE532",
  1604. 'info-filled': "\uE534",
  1605. 'help-filled': "\uE535",
  1606. 'more-filled': "\uE537",
  1607. 'settings': "\uE560",
  1608. 'list': "\uE562",
  1609. 'bars': "\uE563",
  1610. 'loop': "\uE565",
  1611. 'paperclip': "\uE567",
  1612. 'eye': "\uE568",
  1613. 'arrowup': "\uE580",
  1614. 'arrowdown': "\uE581",
  1615. 'arrowleft': "\uE582",
  1616. 'arrowright': "\uE583",
  1617. 'arrowthinup': "\uE584",
  1618. 'arrowthindown': "\uE585",
  1619. 'arrowthinleft': "\uE586",
  1620. 'arrowthinright': "\uE587",
  1621. 'pulldown': "\uE588",
  1622. 'closefill': "\uE589",
  1623. 'sound': "\uE590",
  1624. 'scan': "\uE612"
  1625. };
  1626. exports.default = _default;
  1627. /***/ }),
  1628. /***/ 109:
  1629. /*!*************************************!*\
  1630. !*** ./node_modules/sha.js/sha1.js ***!
  1631. \*************************************/
  1632. /*! no static exports found */
  1633. /***/ (function(module, exports, __webpack_require__) {
  1634. /*
  1635. * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
  1636. * in FIPS PUB 180-1
  1637. * Version 2.1a Copyright Paul Johnston 2000 - 2002.
  1638. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
  1639. * Distributed under the BSD License
  1640. * See http://pajhome.org.uk/crypt/md5 for details.
  1641. */
  1642. var inherits = __webpack_require__(/*! inherits */ 86)
  1643. var Hash = __webpack_require__(/*! ./hash */ 108)
  1644. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  1645. var K = [
  1646. 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0
  1647. ]
  1648. var W = new Array(80)
  1649. function Sha1 () {
  1650. this.init()
  1651. this._w = W
  1652. Hash.call(this, 64, 56)
  1653. }
  1654. inherits(Sha1, Hash)
  1655. Sha1.prototype.init = function () {
  1656. this._a = 0x67452301
  1657. this._b = 0xefcdab89
  1658. this._c = 0x98badcfe
  1659. this._d = 0x10325476
  1660. this._e = 0xc3d2e1f0
  1661. return this
  1662. }
  1663. function rotl1 (num) {
  1664. return (num << 1) | (num >>> 31)
  1665. }
  1666. function rotl5 (num) {
  1667. return (num << 5) | (num >>> 27)
  1668. }
  1669. function rotl30 (num) {
  1670. return (num << 30) | (num >>> 2)
  1671. }
  1672. function ft (s, b, c, d) {
  1673. if (s === 0) return (b & c) | ((~b) & d)
  1674. if (s === 2) return (b & c) | (b & d) | (c & d)
  1675. return b ^ c ^ d
  1676. }
  1677. Sha1.prototype._update = function (M) {
  1678. var W = this._w
  1679. var a = this._a | 0
  1680. var b = this._b | 0
  1681. var c = this._c | 0
  1682. var d = this._d | 0
  1683. var e = this._e | 0
  1684. for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)
  1685. for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16])
  1686. for (var j = 0; j < 80; ++j) {
  1687. var s = ~~(j / 20)
  1688. var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0
  1689. e = d
  1690. d = c
  1691. c = rotl30(b)
  1692. b = a
  1693. a = t
  1694. }
  1695. this._a = (a + this._a) | 0
  1696. this._b = (b + this._b) | 0
  1697. this._c = (c + this._c) | 0
  1698. this._d = (d + this._d) | 0
  1699. this._e = (e + this._e) | 0
  1700. }
  1701. Sha1.prototype._hash = function () {
  1702. var H = Buffer.allocUnsafe(20)
  1703. H.writeInt32BE(this._a | 0, 0)
  1704. H.writeInt32BE(this._b | 0, 4)
  1705. H.writeInt32BE(this._c | 0, 8)
  1706. H.writeInt32BE(this._d | 0, 12)
  1707. H.writeInt32BE(this._e | 0, 16)
  1708. return H
  1709. }
  1710. module.exports = Sha1
  1711. /***/ }),
  1712. /***/ 11:
  1713. /*!***************************************************************!*\
  1714. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  1715. \***************************************************************/
  1716. /*! no static exports found */
  1717. /***/ (function(module, exports, __webpack_require__) {
  1718. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  1719. function _defineProperty(obj, key, value) {
  1720. key = toPropertyKey(key);
  1721. if (key in obj) {
  1722. Object.defineProperty(obj, key, {
  1723. value: value,
  1724. enumerable: true,
  1725. configurable: true,
  1726. writable: true
  1727. });
  1728. } else {
  1729. obj[key] = value;
  1730. }
  1731. return obj;
  1732. }
  1733. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1734. /***/ }),
  1735. /***/ 110:
  1736. /*!***************************************!*\
  1737. !*** ./node_modules/sha.js/sha224.js ***!
  1738. \***************************************/
  1739. /*! no static exports found */
  1740. /***/ (function(module, exports, __webpack_require__) {
  1741. /**
  1742. * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
  1743. * in FIPS 180-2
  1744. * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.
  1745. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
  1746. *
  1747. */
  1748. var inherits = __webpack_require__(/*! inherits */ 86)
  1749. var Sha256 = __webpack_require__(/*! ./sha256 */ 111)
  1750. var Hash = __webpack_require__(/*! ./hash */ 108)
  1751. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  1752. var W = new Array(64)
  1753. function Sha224 () {
  1754. this.init()
  1755. this._w = W // new Array(64)
  1756. Hash.call(this, 64, 56)
  1757. }
  1758. inherits(Sha224, Sha256)
  1759. Sha224.prototype.init = function () {
  1760. this._a = 0xc1059ed8
  1761. this._b = 0x367cd507
  1762. this._c = 0x3070dd17
  1763. this._d = 0xf70e5939
  1764. this._e = 0xffc00b31
  1765. this._f = 0x68581511
  1766. this._g = 0x64f98fa7
  1767. this._h = 0xbefa4fa4
  1768. return this
  1769. }
  1770. Sha224.prototype._hash = function () {
  1771. var H = Buffer.allocUnsafe(28)
  1772. H.writeInt32BE(this._a, 0)
  1773. H.writeInt32BE(this._b, 4)
  1774. H.writeInt32BE(this._c, 8)
  1775. H.writeInt32BE(this._d, 12)
  1776. H.writeInt32BE(this._e, 16)
  1777. H.writeInt32BE(this._f, 20)
  1778. H.writeInt32BE(this._g, 24)
  1779. return H
  1780. }
  1781. module.exports = Sha224
  1782. /***/ }),
  1783. /***/ 1109:
  1784. /*!***********************************************************!*\
  1785. !*** E:/project/bigdata_WX/uview-ui/libs/util/emitter.js ***!
  1786. \***********************************************************/
  1787. /*! no static exports found */
  1788. /***/ (function(module, exports, __webpack_require__) {
  1789. "use strict";
  1790. Object.defineProperty(exports, "__esModule", {
  1791. value: true
  1792. });
  1793. exports.default = void 0;
  1794. /**
  1795. * 递归使用 call 方式this指向
  1796. * @param componentName // 需要找的组件的名称
  1797. * @param eventName // 事件名称
  1798. * @param params // 需要传递的参数
  1799. */
  1800. function _broadcast(componentName, eventName, params) {
  1801. // 循环子节点找到名称一样的子节点 否则 递归 当前子节点
  1802. this.$children.map(function (child) {
  1803. if (componentName === child.$options.name) {
  1804. child.$emit.apply(child, [eventName].concat(params));
  1805. } else {
  1806. _broadcast.apply(child, [componentName, eventName].concat(params));
  1807. }
  1808. });
  1809. }
  1810. var _default = {
  1811. methods: {
  1812. /**
  1813. * 派发 (向上查找) (一个)
  1814. * @param componentName // 需要找的组件的名称
  1815. * @param eventName // 事件名称
  1816. * @param params // 需要传递的参数
  1817. */
  1818. dispatch: function dispatch(componentName, eventName, params) {
  1819. var parent = this.$parent || this.$root; //$parent 找到最近的父节点 $root 根节点
  1820. var name = parent.$options.name; // 获取当前组件实例的name
  1821. // 如果当前有节点 && 当前没名称 且 当前名称等于需要传进来的名称的时候就去查找当前的节点
  1822. // 循环出当前名称的一样的组件实例
  1823. while (parent && (!name || name !== componentName)) {
  1824. parent = parent.$parent;
  1825. if (parent) {
  1826. name = parent.$options.name;
  1827. }
  1828. }
  1829. // 有节点表示当前找到了name一样的实例
  1830. if (parent) {
  1831. parent.$emit.apply(parent, [eventName].concat(params));
  1832. }
  1833. },
  1834. /**
  1835. * 广播 (向下查找) (广播多个)
  1836. * @param componentName // 需要找的组件的名称
  1837. * @param eventName // 事件名称
  1838. * @param params // 需要传递的参数
  1839. */
  1840. broadcast: function broadcast(componentName, eventName, params) {
  1841. _broadcast.call(this, componentName, eventName, params);
  1842. }
  1843. }
  1844. };
  1845. exports.default = _default;
  1846. /***/ }),
  1847. /***/ 111:
  1848. /*!***************************************!*\
  1849. !*** ./node_modules/sha.js/sha256.js ***!
  1850. \***************************************/
  1851. /*! no static exports found */
  1852. /***/ (function(module, exports, __webpack_require__) {
  1853. /**
  1854. * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
  1855. * in FIPS 180-2
  1856. * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.
  1857. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
  1858. *
  1859. */
  1860. var inherits = __webpack_require__(/*! inherits */ 86)
  1861. var Hash = __webpack_require__(/*! ./hash */ 108)
  1862. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  1863. var K = [
  1864. 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
  1865. 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
  1866. 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,
  1867. 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,
  1868. 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,
  1869. 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,
  1870. 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,
  1871. 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,
  1872. 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,
  1873. 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,
  1874. 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,
  1875. 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,
  1876. 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,
  1877. 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,
  1878. 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,
  1879. 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2
  1880. ]
  1881. var W = new Array(64)
  1882. function Sha256 () {
  1883. this.init()
  1884. this._w = W // new Array(64)
  1885. Hash.call(this, 64, 56)
  1886. }
  1887. inherits(Sha256, Hash)
  1888. Sha256.prototype.init = function () {
  1889. this._a = 0x6a09e667
  1890. this._b = 0xbb67ae85
  1891. this._c = 0x3c6ef372
  1892. this._d = 0xa54ff53a
  1893. this._e = 0x510e527f
  1894. this._f = 0x9b05688c
  1895. this._g = 0x1f83d9ab
  1896. this._h = 0x5be0cd19
  1897. return this
  1898. }
  1899. function ch (x, y, z) {
  1900. return z ^ (x & (y ^ z))
  1901. }
  1902. function maj (x, y, z) {
  1903. return (x & y) | (z & (x | y))
  1904. }
  1905. function sigma0 (x) {
  1906. return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10)
  1907. }
  1908. function sigma1 (x) {
  1909. return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7)
  1910. }
  1911. function gamma0 (x) {
  1912. return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3)
  1913. }
  1914. function gamma1 (x) {
  1915. return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10)
  1916. }
  1917. Sha256.prototype._update = function (M) {
  1918. var W = this._w
  1919. var a = this._a | 0
  1920. var b = this._b | 0
  1921. var c = this._c | 0
  1922. var d = this._d | 0
  1923. var e = this._e | 0
  1924. var f = this._f | 0
  1925. var g = this._g | 0
  1926. var h = this._h | 0
  1927. for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)
  1928. for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0
  1929. for (var j = 0; j < 64; ++j) {
  1930. var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0
  1931. var T2 = (sigma0(a) + maj(a, b, c)) | 0
  1932. h = g
  1933. g = f
  1934. f = e
  1935. e = (d + T1) | 0
  1936. d = c
  1937. c = b
  1938. b = a
  1939. a = (T1 + T2) | 0
  1940. }
  1941. this._a = (a + this._a) | 0
  1942. this._b = (b + this._b) | 0
  1943. this._c = (c + this._c) | 0
  1944. this._d = (d + this._d) | 0
  1945. this._e = (e + this._e) | 0
  1946. this._f = (f + this._f) | 0
  1947. this._g = (g + this._g) | 0
  1948. this._h = (h + this._h) | 0
  1949. }
  1950. Sha256.prototype._hash = function () {
  1951. var H = Buffer.allocUnsafe(32)
  1952. H.writeInt32BE(this._a, 0)
  1953. H.writeInt32BE(this._b, 4)
  1954. H.writeInt32BE(this._c, 8)
  1955. H.writeInt32BE(this._d, 12)
  1956. H.writeInt32BE(this._e, 16)
  1957. H.writeInt32BE(this._f, 20)
  1958. H.writeInt32BE(this._g, 24)
  1959. H.writeInt32BE(this._h, 28)
  1960. return H
  1961. }
  1962. module.exports = Sha256
  1963. /***/ }),
  1964. /***/ 112:
  1965. /*!***************************************!*\
  1966. !*** ./node_modules/sha.js/sha384.js ***!
  1967. \***************************************/
  1968. /*! no static exports found */
  1969. /***/ (function(module, exports, __webpack_require__) {
  1970. var inherits = __webpack_require__(/*! inherits */ 86)
  1971. var SHA512 = __webpack_require__(/*! ./sha512 */ 113)
  1972. var Hash = __webpack_require__(/*! ./hash */ 108)
  1973. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  1974. var W = new Array(160)
  1975. function Sha384 () {
  1976. this.init()
  1977. this._w = W
  1978. Hash.call(this, 128, 112)
  1979. }
  1980. inherits(Sha384, SHA512)
  1981. Sha384.prototype.init = function () {
  1982. this._ah = 0xcbbb9d5d
  1983. this._bh = 0x629a292a
  1984. this._ch = 0x9159015a
  1985. this._dh = 0x152fecd8
  1986. this._eh = 0x67332667
  1987. this._fh = 0x8eb44a87
  1988. this._gh = 0xdb0c2e0d
  1989. this._hh = 0x47b5481d
  1990. this._al = 0xc1059ed8
  1991. this._bl = 0x367cd507
  1992. this._cl = 0x3070dd17
  1993. this._dl = 0xf70e5939
  1994. this._el = 0xffc00b31
  1995. this._fl = 0x68581511
  1996. this._gl = 0x64f98fa7
  1997. this._hl = 0xbefa4fa4
  1998. return this
  1999. }
  2000. Sha384.prototype._hash = function () {
  2001. var H = Buffer.allocUnsafe(48)
  2002. function writeInt64BE (h, l, offset) {
  2003. H.writeInt32BE(h, offset)
  2004. H.writeInt32BE(l, offset + 4)
  2005. }
  2006. writeInt64BE(this._ah, this._al, 0)
  2007. writeInt64BE(this._bh, this._bl, 8)
  2008. writeInt64BE(this._ch, this._cl, 16)
  2009. writeInt64BE(this._dh, this._dl, 24)
  2010. writeInt64BE(this._eh, this._el, 32)
  2011. writeInt64BE(this._fh, this._fl, 40)
  2012. return H
  2013. }
  2014. module.exports = Sha384
  2015. /***/ }),
  2016. /***/ 113:
  2017. /*!***************************************!*\
  2018. !*** ./node_modules/sha.js/sha512.js ***!
  2019. \***************************************/
  2020. /*! no static exports found */
  2021. /***/ (function(module, exports, __webpack_require__) {
  2022. var inherits = __webpack_require__(/*! inherits */ 86)
  2023. var Hash = __webpack_require__(/*! ./hash */ 108)
  2024. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  2025. var K = [
  2026. 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
  2027. 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
  2028. 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
  2029. 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
  2030. 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
  2031. 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
  2032. 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
  2033. 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
  2034. 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
  2035. 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
  2036. 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
  2037. 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
  2038. 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
  2039. 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
  2040. 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
  2041. 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
  2042. 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
  2043. 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
  2044. 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
  2045. 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
  2046. 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
  2047. 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
  2048. 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
  2049. 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
  2050. 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
  2051. 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
  2052. 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
  2053. 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
  2054. 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
  2055. 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
  2056. 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
  2057. 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
  2058. 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
  2059. 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
  2060. 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
  2061. 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
  2062. 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
  2063. 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
  2064. 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
  2065. 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
  2066. ]
  2067. var W = new Array(160)
  2068. function Sha512 () {
  2069. this.init()
  2070. this._w = W
  2071. Hash.call(this, 128, 112)
  2072. }
  2073. inherits(Sha512, Hash)
  2074. Sha512.prototype.init = function () {
  2075. this._ah = 0x6a09e667
  2076. this._bh = 0xbb67ae85
  2077. this._ch = 0x3c6ef372
  2078. this._dh = 0xa54ff53a
  2079. this._eh = 0x510e527f
  2080. this._fh = 0x9b05688c
  2081. this._gh = 0x1f83d9ab
  2082. this._hh = 0x5be0cd19
  2083. this._al = 0xf3bcc908
  2084. this._bl = 0x84caa73b
  2085. this._cl = 0xfe94f82b
  2086. this._dl = 0x5f1d36f1
  2087. this._el = 0xade682d1
  2088. this._fl = 0x2b3e6c1f
  2089. this._gl = 0xfb41bd6b
  2090. this._hl = 0x137e2179
  2091. return this
  2092. }
  2093. function Ch (x, y, z) {
  2094. return z ^ (x & (y ^ z))
  2095. }
  2096. function maj (x, y, z) {
  2097. return (x & y) | (z & (x | y))
  2098. }
  2099. function sigma0 (x, xl) {
  2100. return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25)
  2101. }
  2102. function sigma1 (x, xl) {
  2103. return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23)
  2104. }
  2105. function Gamma0 (x, xl) {
  2106. return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7)
  2107. }
  2108. function Gamma0l (x, xl) {
  2109. return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25)
  2110. }
  2111. function Gamma1 (x, xl) {
  2112. return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6)
  2113. }
  2114. function Gamma1l (x, xl) {
  2115. return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26)
  2116. }
  2117. function getCarry (a, b) {
  2118. return (a >>> 0) < (b >>> 0) ? 1 : 0
  2119. }
  2120. Sha512.prototype._update = function (M) {
  2121. var W = this._w
  2122. var ah = this._ah | 0
  2123. var bh = this._bh | 0
  2124. var ch = this._ch | 0
  2125. var dh = this._dh | 0
  2126. var eh = this._eh | 0
  2127. var fh = this._fh | 0
  2128. var gh = this._gh | 0
  2129. var hh = this._hh | 0
  2130. var al = this._al | 0
  2131. var bl = this._bl | 0
  2132. var cl = this._cl | 0
  2133. var dl = this._dl | 0
  2134. var el = this._el | 0
  2135. var fl = this._fl | 0
  2136. var gl = this._gl | 0
  2137. var hl = this._hl | 0
  2138. for (var i = 0; i < 32; i += 2) {
  2139. W[i] = M.readInt32BE(i * 4)
  2140. W[i + 1] = M.readInt32BE(i * 4 + 4)
  2141. }
  2142. for (; i < 160; i += 2) {
  2143. var xh = W[i - 15 * 2]
  2144. var xl = W[i - 15 * 2 + 1]
  2145. var gamma0 = Gamma0(xh, xl)
  2146. var gamma0l = Gamma0l(xl, xh)
  2147. xh = W[i - 2 * 2]
  2148. xl = W[i - 2 * 2 + 1]
  2149. var gamma1 = Gamma1(xh, xl)
  2150. var gamma1l = Gamma1l(xl, xh)
  2151. // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
  2152. var Wi7h = W[i - 7 * 2]
  2153. var Wi7l = W[i - 7 * 2 + 1]
  2154. var Wi16h = W[i - 16 * 2]
  2155. var Wi16l = W[i - 16 * 2 + 1]
  2156. var Wil = (gamma0l + Wi7l) | 0
  2157. var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0
  2158. Wil = (Wil + gamma1l) | 0
  2159. Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0
  2160. Wil = (Wil + Wi16l) | 0
  2161. Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0
  2162. W[i] = Wih
  2163. W[i + 1] = Wil
  2164. }
  2165. for (var j = 0; j < 160; j += 2) {
  2166. Wih = W[j]
  2167. Wil = W[j + 1]
  2168. var majh = maj(ah, bh, ch)
  2169. var majl = maj(al, bl, cl)
  2170. var sigma0h = sigma0(ah, al)
  2171. var sigma0l = sigma0(al, ah)
  2172. var sigma1h = sigma1(eh, el)
  2173. var sigma1l = sigma1(el, eh)
  2174. // t1 = h + sigma1 + ch + K[j] + W[j]
  2175. var Kih = K[j]
  2176. var Kil = K[j + 1]
  2177. var chh = Ch(eh, fh, gh)
  2178. var chl = Ch(el, fl, gl)
  2179. var t1l = (hl + sigma1l) | 0
  2180. var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0
  2181. t1l = (t1l + chl) | 0
  2182. t1h = (t1h + chh + getCarry(t1l, chl)) | 0
  2183. t1l = (t1l + Kil) | 0
  2184. t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0
  2185. t1l = (t1l + Wil) | 0
  2186. t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0
  2187. // t2 = sigma0 + maj
  2188. var t2l = (sigma0l + majl) | 0
  2189. var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0
  2190. hh = gh
  2191. hl = gl
  2192. gh = fh
  2193. gl = fl
  2194. fh = eh
  2195. fl = el
  2196. el = (dl + t1l) | 0
  2197. eh = (dh + t1h + getCarry(el, dl)) | 0
  2198. dh = ch
  2199. dl = cl
  2200. ch = bh
  2201. cl = bl
  2202. bh = ah
  2203. bl = al
  2204. al = (t1l + t2l) | 0
  2205. ah = (t1h + t2h + getCarry(al, t1l)) | 0
  2206. }
  2207. this._al = (this._al + al) | 0
  2208. this._bl = (this._bl + bl) | 0
  2209. this._cl = (this._cl + cl) | 0
  2210. this._dl = (this._dl + dl) | 0
  2211. this._el = (this._el + el) | 0
  2212. this._fl = (this._fl + fl) | 0
  2213. this._gl = (this._gl + gl) | 0
  2214. this._hl = (this._hl + hl) | 0
  2215. this._ah = (this._ah + ah + getCarry(this._al, al)) | 0
  2216. this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0
  2217. this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0
  2218. this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0
  2219. this._eh = (this._eh + eh + getCarry(this._el, el)) | 0
  2220. this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0
  2221. this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0
  2222. this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0
  2223. }
  2224. Sha512.prototype._hash = function () {
  2225. var H = Buffer.allocUnsafe(64)
  2226. function writeInt64BE (h, l, offset) {
  2227. H.writeInt32BE(h, offset)
  2228. H.writeInt32BE(l, offset + 4)
  2229. }
  2230. writeInt64BE(this._ah, this._al, 0)
  2231. writeInt64BE(this._bh, this._bl, 8)
  2232. writeInt64BE(this._ch, this._cl, 16)
  2233. writeInt64BE(this._dh, this._dl, 24)
  2234. writeInt64BE(this._eh, this._el, 32)
  2235. writeInt64BE(this._fh, this._fl, 40)
  2236. writeInt64BE(this._gh, this._gl, 48)
  2237. writeInt64BE(this._hh, this._hl, 56)
  2238. return H
  2239. }
  2240. module.exports = Sha512
  2241. /***/ }),
  2242. /***/ 114:
  2243. /*!*******************************************!*\
  2244. !*** ./node_modules/cipher-base/index.js ***!
  2245. \*******************************************/
  2246. /*! no static exports found */
  2247. /***/ (function(module, exports, __webpack_require__) {
  2248. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  2249. var Transform = __webpack_require__(/*! stream */ 115).Transform
  2250. var StringDecoder = __webpack_require__(/*! string_decoder */ 102).StringDecoder
  2251. var inherits = __webpack_require__(/*! inherits */ 86)
  2252. function CipherBase (hashMode) {
  2253. Transform.call(this)
  2254. this.hashMode = typeof hashMode === 'string'
  2255. if (this.hashMode) {
  2256. this[hashMode] = this._finalOrDigest
  2257. } else {
  2258. this.final = this._finalOrDigest
  2259. }
  2260. if (this._final) {
  2261. this.__final = this._final
  2262. this._final = null
  2263. }
  2264. this._decoder = null
  2265. this._encoding = null
  2266. }
  2267. inherits(CipherBase, Transform)
  2268. CipherBase.prototype.update = function (data, inputEnc, outputEnc) {
  2269. if (typeof data === 'string') {
  2270. data = Buffer.from(data, inputEnc)
  2271. }
  2272. var outData = this._update(data)
  2273. if (this.hashMode) return this
  2274. if (outputEnc) {
  2275. outData = this._toString(outData, outputEnc)
  2276. }
  2277. return outData
  2278. }
  2279. CipherBase.prototype.setAutoPadding = function () {}
  2280. CipherBase.prototype.getAuthTag = function () {
  2281. throw new Error('trying to get auth tag in unsupported state')
  2282. }
  2283. CipherBase.prototype.setAuthTag = function () {
  2284. throw new Error('trying to set auth tag in unsupported state')
  2285. }
  2286. CipherBase.prototype.setAAD = function () {
  2287. throw new Error('trying to set aad in unsupported state')
  2288. }
  2289. CipherBase.prototype._transform = function (data, _, next) {
  2290. var err
  2291. try {
  2292. if (this.hashMode) {
  2293. this._update(data)
  2294. } else {
  2295. this.push(this._update(data))
  2296. }
  2297. } catch (e) {
  2298. err = e
  2299. } finally {
  2300. next(err)
  2301. }
  2302. }
  2303. CipherBase.prototype._flush = function (done) {
  2304. var err
  2305. try {
  2306. this.push(this.__final())
  2307. } catch (e) {
  2308. err = e
  2309. }
  2310. done(err)
  2311. }
  2312. CipherBase.prototype._finalOrDigest = function (outputEnc) {
  2313. var outData = this.__final() || Buffer.alloc(0)
  2314. if (outputEnc) {
  2315. outData = this._toString(outData, outputEnc, true)
  2316. }
  2317. return outData
  2318. }
  2319. CipherBase.prototype._toString = function (value, enc, fin) {
  2320. if (!this._decoder) {
  2321. this._decoder = new StringDecoder(enc)
  2322. this._encoding = enc
  2323. }
  2324. if (this._encoding !== enc) throw new Error('can\'t switch encodings')
  2325. var out = this._decoder.write(value)
  2326. if (fin) {
  2327. out += this._decoder.end()
  2328. }
  2329. return out
  2330. }
  2331. module.exports = CipherBase
  2332. /***/ }),
  2333. /***/ 1145:
  2334. /*!*******************************************************************!*\
  2335. !*** E:/project/bigdata_WX/uview-ui/libs/util/async-validator.js ***!
  2336. \*******************************************************************/
  2337. /*! no static exports found */
  2338. /***/ (function(module, exports, __webpack_require__) {
  2339. "use strict";
  2340. /* WEBPACK VAR INJECTION */(function(process) {
  2341. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2342. Object.defineProperty(exports, "__esModule", {
  2343. value: true
  2344. });
  2345. exports.default = void 0;
  2346. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2347. function _extends() {
  2348. _extends = Object.assign || function (target) {
  2349. for (var i = 1; i < arguments.length; i++) {
  2350. var source = arguments[i];
  2351. for (var key in source) {
  2352. if (Object.prototype.hasOwnProperty.call(source, key)) {
  2353. target[key] = source[key];
  2354. }
  2355. }
  2356. }
  2357. return target;
  2358. };
  2359. return _extends.apply(this, arguments);
  2360. }
  2361. /* eslint no-console:0 */
  2362. var formatRegExp = /%[sdj%]/g;
  2363. var warning = function warning() {}; // don't print warning message when in production env or node runtime
  2364. if (typeof process !== 'undefined' && Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"云飞智控","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}) && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
  2365. warning = function warning(type, errors) {
  2366. if (typeof console !== 'undefined' && console.warn) {
  2367. if (errors.every(function (e) {
  2368. return typeof e === 'string';
  2369. })) {
  2370. console.warn(type, errors);
  2371. }
  2372. }
  2373. };
  2374. }
  2375. function convertFieldsError(errors) {
  2376. if (!errors || !errors.length) return null;
  2377. var fields = {};
  2378. errors.forEach(function (error) {
  2379. var field = error.field;
  2380. fields[field] = fields[field] || [];
  2381. fields[field].push(error);
  2382. });
  2383. return fields;
  2384. }
  2385. function format() {
  2386. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2387. args[_key] = arguments[_key];
  2388. }
  2389. var i = 1;
  2390. var f = args[0];
  2391. var len = args.length;
  2392. if (typeof f === 'function') {
  2393. return f.apply(null, args.slice(1));
  2394. }
  2395. if (typeof f === 'string') {
  2396. var str = String(f).replace(formatRegExp, function (x) {
  2397. if (x === '%%') {
  2398. return '%';
  2399. }
  2400. if (i >= len) {
  2401. return x;
  2402. }
  2403. switch (x) {
  2404. case '%s':
  2405. return String(args[i++]);
  2406. case '%d':
  2407. return Number(args[i++]);
  2408. case '%j':
  2409. try {
  2410. return JSON.stringify(args[i++]);
  2411. } catch (_) {
  2412. return '[Circular]';
  2413. }
  2414. break;
  2415. default:
  2416. return x;
  2417. }
  2418. });
  2419. for (var arg = args[i]; i < len; arg = args[++i]) {
  2420. str += " " + arg;
  2421. }
  2422. return str;
  2423. }
  2424. return f;
  2425. }
  2426. function isNativeStringType(type) {
  2427. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  2428. }
  2429. function isEmptyValue(value, type) {
  2430. if (value === undefined || value === null) {
  2431. return true;
  2432. }
  2433. if (type === 'array' && Array.isArray(value) && !value.length) {
  2434. return true;
  2435. }
  2436. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  2437. return true;
  2438. }
  2439. return false;
  2440. }
  2441. function asyncParallelArray(arr, func, callback) {
  2442. var results = [];
  2443. var total = 0;
  2444. var arrLength = arr.length;
  2445. function count(errors) {
  2446. results.push.apply(results, errors);
  2447. total++;
  2448. if (total === arrLength) {
  2449. callback(results);
  2450. }
  2451. }
  2452. arr.forEach(function (a) {
  2453. func(a, count);
  2454. });
  2455. }
  2456. function asyncSerialArray(arr, func, callback) {
  2457. var index = 0;
  2458. var arrLength = arr.length;
  2459. function next(errors) {
  2460. if (errors && errors.length) {
  2461. callback(errors);
  2462. return;
  2463. }
  2464. var original = index;
  2465. index = index + 1;
  2466. if (original < arrLength) {
  2467. func(arr[original], next);
  2468. } else {
  2469. callback([]);
  2470. }
  2471. }
  2472. next([]);
  2473. }
  2474. function flattenObjArr(objArr) {
  2475. var ret = [];
  2476. Object.keys(objArr).forEach(function (k) {
  2477. ret.push.apply(ret, objArr[k]);
  2478. });
  2479. return ret;
  2480. }
  2481. function asyncMap(objArr, option, func, callback) {
  2482. if (option.first) {
  2483. var _pending = new Promise(function (resolve, reject) {
  2484. var next = function next(errors) {
  2485. callback(errors);
  2486. return errors.length ? reject({
  2487. errors: errors,
  2488. fields: convertFieldsError(errors)
  2489. }) : resolve();
  2490. };
  2491. var flattenArr = flattenObjArr(objArr);
  2492. asyncSerialArray(flattenArr, func, next);
  2493. });
  2494. _pending["catch"](function (e) {
  2495. return e;
  2496. });
  2497. return _pending;
  2498. }
  2499. var firstFields = option.firstFields || [];
  2500. if (firstFields === true) {
  2501. firstFields = Object.keys(objArr);
  2502. }
  2503. var objArrKeys = Object.keys(objArr);
  2504. var objArrLength = objArrKeys.length;
  2505. var total = 0;
  2506. var results = [];
  2507. var pending = new Promise(function (resolve, reject) {
  2508. var next = function next(errors) {
  2509. results.push.apply(results, errors);
  2510. total++;
  2511. if (total === objArrLength) {
  2512. callback(results);
  2513. return results.length ? reject({
  2514. errors: results,
  2515. fields: convertFieldsError(results)
  2516. }) : resolve();
  2517. }
  2518. };
  2519. if (!objArrKeys.length) {
  2520. callback(results);
  2521. resolve();
  2522. }
  2523. objArrKeys.forEach(function (key) {
  2524. var arr = objArr[key];
  2525. if (firstFields.indexOf(key) !== -1) {
  2526. asyncSerialArray(arr, func, next);
  2527. } else {
  2528. asyncParallelArray(arr, func, next);
  2529. }
  2530. });
  2531. });
  2532. pending["catch"](function (e) {
  2533. return e;
  2534. });
  2535. return pending;
  2536. }
  2537. function complementError(rule) {
  2538. return function (oe) {
  2539. if (oe && oe.message) {
  2540. oe.field = oe.field || rule.fullField;
  2541. return oe;
  2542. }
  2543. return {
  2544. message: typeof oe === 'function' ? oe() : oe,
  2545. field: oe.field || rule.fullField
  2546. };
  2547. };
  2548. }
  2549. function deepMerge(target, source) {
  2550. if (source) {
  2551. for (var s in source) {
  2552. if (source.hasOwnProperty(s)) {
  2553. var value = source[s];
  2554. if ((0, _typeof2.default)(value) === 'object' && (0, _typeof2.default)(target[s]) === 'object') {
  2555. target[s] = _extends({}, target[s], {}, value);
  2556. } else {
  2557. target[s] = value;
  2558. }
  2559. }
  2560. }
  2561. }
  2562. return target;
  2563. }
  2564. /**
  2565. * Rule for validating required fields.
  2566. *
  2567. * @param rule The validation rule.
  2568. * @param value The value of the field on the source object.
  2569. * @param source The source object being validated.
  2570. * @param errors An array of errors that this rule may add
  2571. * validation errors to.
  2572. * @param options The validation options.
  2573. * @param options.messages The validation messages.
  2574. */
  2575. function required(rule, value, source, errors, options, type) {
  2576. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  2577. errors.push(format(options.messages.required, rule.fullField));
  2578. }
  2579. }
  2580. /**
  2581. * Rule for validating whitespace.
  2582. *
  2583. * @param rule The validation rule.
  2584. * @param value The value of the field on the source object.
  2585. * @param source The source object being validated.
  2586. * @param errors An array of errors that this rule may add
  2587. * validation errors to.
  2588. * @param options The validation options.
  2589. * @param options.messages The validation messages.
  2590. */
  2591. function whitespace(rule, value, source, errors, options) {
  2592. if (/^\s+$/.test(value) || value === '') {
  2593. errors.push(format(options.messages.whitespace, rule.fullField));
  2594. }
  2595. }
  2596. /* eslint max-len:0 */
  2597. var pattern = {
  2598. // http://emailregex.com/
  2599. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  2600. url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i'),
  2601. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  2602. };
  2603. var types = {
  2604. integer: function integer(value) {
  2605. return types.number(value) && parseInt(value, 10) === value;
  2606. },
  2607. "float": function float(value) {
  2608. return types.number(value) && !types.integer(value);
  2609. },
  2610. array: function array(value) {
  2611. return Array.isArray(value);
  2612. },
  2613. regexp: function regexp(value) {
  2614. if (value instanceof RegExp) {
  2615. return true;
  2616. }
  2617. try {
  2618. return !!new RegExp(value);
  2619. } catch (e) {
  2620. return false;
  2621. }
  2622. },
  2623. date: function date(value) {
  2624. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
  2625. },
  2626. number: function number(value) {
  2627. if (isNaN(value)) {
  2628. return false;
  2629. }
  2630. // 修改源码,将字符串数值先转为数值
  2631. return typeof +value === 'number';
  2632. },
  2633. object: function object(value) {
  2634. return (0, _typeof2.default)(value) === 'object' && !types.array(value);
  2635. },
  2636. method: function method(value) {
  2637. return typeof value === 'function';
  2638. },
  2639. email: function email(value) {
  2640. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  2641. },
  2642. url: function url(value) {
  2643. return typeof value === 'string' && !!value.match(pattern.url);
  2644. },
  2645. hex: function hex(value) {
  2646. return typeof value === 'string' && !!value.match(pattern.hex);
  2647. }
  2648. };
  2649. /**
  2650. * Rule for validating the type of a value.
  2651. *
  2652. * @param rule The validation rule.
  2653. * @param value The value of the field on the source object.
  2654. * @param source The source object being validated.
  2655. * @param errors An array of errors that this rule may add
  2656. * validation errors to.
  2657. * @param options The validation options.
  2658. * @param options.messages The validation messages.
  2659. */
  2660. function type(rule, value, source, errors, options) {
  2661. if (rule.required && value === undefined) {
  2662. required(rule, value, source, errors, options);
  2663. return;
  2664. }
  2665. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  2666. var ruleType = rule.type;
  2667. if (custom.indexOf(ruleType) > -1) {
  2668. if (!types[ruleType](value)) {
  2669. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  2670. } // straight typeof check
  2671. } else if (ruleType && (0, _typeof2.default)(value) !== rule.type) {
  2672. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  2673. }
  2674. }
  2675. /**
  2676. * Rule for validating minimum and maximum allowed values.
  2677. *
  2678. * @param rule The validation rule.
  2679. * @param value The value of the field on the source object.
  2680. * @param source The source object being validated.
  2681. * @param errors An array of errors that this rule may add
  2682. * validation errors to.
  2683. * @param options The validation options.
  2684. * @param options.messages The validation messages.
  2685. */
  2686. function range(rule, value, source, errors, options) {
  2687. var len = typeof rule.len === 'number';
  2688. var min = typeof rule.min === 'number';
  2689. var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  2690. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  2691. var val = value;
  2692. var key = null;
  2693. var num = typeof value === 'number';
  2694. var str = typeof value === 'string';
  2695. var arr = Array.isArray(value);
  2696. if (num) {
  2697. key = 'number';
  2698. } else if (str) {
  2699. key = 'string';
  2700. } else if (arr) {
  2701. key = 'array';
  2702. } // if the value is not of a supported type for range validation
  2703. // the validation rule rule should use the
  2704. // type property to also test for a particular type
  2705. if (!key) {
  2706. return false;
  2707. }
  2708. if (arr) {
  2709. val = value.length;
  2710. }
  2711. if (str) {
  2712. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3
  2713. val = value.replace(spRegexp, '_').length;
  2714. }
  2715. if (len) {
  2716. if (val !== rule.len) {
  2717. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  2718. }
  2719. } else if (min && !max && val < rule.min) {
  2720. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  2721. } else if (max && !min && val > rule.max) {
  2722. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  2723. } else if (min && max && (val < rule.min || val > rule.max)) {
  2724. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  2725. }
  2726. }
  2727. var ENUM = 'enum';
  2728. /**
  2729. * Rule for validating a value exists in an enumerable list.
  2730. *
  2731. * @param rule The validation rule.
  2732. * @param value The value of the field on the source object.
  2733. * @param source The source object being validated.
  2734. * @param errors An array of errors that this rule may add
  2735. * validation errors to.
  2736. * @param options The validation options.
  2737. * @param options.messages The validation messages.
  2738. */
  2739. function enumerable(rule, value, source, errors, options) {
  2740. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  2741. if (rule[ENUM].indexOf(value) === -1) {
  2742. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  2743. }
  2744. }
  2745. /**
  2746. * Rule for validating a regular expression pattern.
  2747. *
  2748. * @param rule The validation rule.
  2749. * @param value The value of the field on the source object.
  2750. * @param source The source object being validated.
  2751. * @param errors An array of errors that this rule may add
  2752. * validation errors to.
  2753. * @param options The validation options.
  2754. * @param options.messages The validation messages.
  2755. */
  2756. function pattern$1(rule, value, source, errors, options) {
  2757. if (rule.pattern) {
  2758. if (rule.pattern instanceof RegExp) {
  2759. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  2760. // flag is accidentally set to `true`, which in a validation scenario
  2761. // is not necessary and the result might be misleading
  2762. rule.pattern.lastIndex = 0;
  2763. if (!rule.pattern.test(value)) {
  2764. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  2765. }
  2766. } else if (typeof rule.pattern === 'string') {
  2767. var _pattern = new RegExp(rule.pattern);
  2768. if (!_pattern.test(value)) {
  2769. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  2770. }
  2771. }
  2772. }
  2773. }
  2774. var rules = {
  2775. required: required,
  2776. whitespace: whitespace,
  2777. type: type,
  2778. range: range,
  2779. "enum": enumerable,
  2780. pattern: pattern$1
  2781. };
  2782. /**
  2783. * Performs validation for string types.
  2784. *
  2785. * @param rule The validation rule.
  2786. * @param value The value of the field on the source object.
  2787. * @param callback The callback function.
  2788. * @param source The source object being validated.
  2789. * @param options The validation options.
  2790. * @param options.messages The validation messages.
  2791. */
  2792. function string(rule, value, callback, source, options) {
  2793. var errors = [];
  2794. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  2795. if (validate) {
  2796. if (isEmptyValue(value, 'string') && !rule.required) {
  2797. return callback();
  2798. }
  2799. rules.required(rule, value, source, errors, options, 'string');
  2800. if (!isEmptyValue(value, 'string')) {
  2801. rules.type(rule, value, source, errors, options);
  2802. rules.range(rule, value, source, errors, options);
  2803. rules.pattern(rule, value, source, errors, options);
  2804. if (rule.whitespace === true) {
  2805. rules.whitespace(rule, value, source, errors, options);
  2806. }
  2807. }
  2808. }
  2809. callback(errors);
  2810. }
  2811. /**
  2812. * Validates a function.
  2813. *
  2814. * @param rule The validation rule.
  2815. * @param value The value of the field on the source object.
  2816. * @param callback The callback function.
  2817. * @param source The source object being validated.
  2818. * @param options The validation options.
  2819. * @param options.messages The validation messages.
  2820. */
  2821. function method(rule, value, callback, source, options) {
  2822. var errors = [];
  2823. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  2824. if (validate) {
  2825. if (isEmptyValue(value) && !rule.required) {
  2826. return callback();
  2827. }
  2828. rules.required(rule, value, source, errors, options);
  2829. if (value !== undefined) {
  2830. rules.type(rule, value, source, errors, options);
  2831. }
  2832. }
  2833. callback(errors);
  2834. }
  2835. /**
  2836. * Validates a number.
  2837. *
  2838. * @param rule The validation rule.
  2839. * @param value The value of the field on the source object.
  2840. * @param callback The callback function.
  2841. * @param source The source object being validated.
  2842. * @param options The validation options.
  2843. * @param options.messages The validation messages.
  2844. */
  2845. function number(rule, value, callback, source, options) {
  2846. var errors = [];
  2847. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  2848. if (validate) {
  2849. if (value === '') {
  2850. value = undefined;
  2851. }
  2852. if (isEmptyValue(value) && !rule.required) {
  2853. return callback();
  2854. }
  2855. rules.required(rule, value, source, errors, options);
  2856. if (value !== undefined) {
  2857. rules.type(rule, value, source, errors, options);
  2858. rules.range(rule, value, source, errors, options);
  2859. }
  2860. }
  2861. callback(errors);
  2862. }
  2863. /**
  2864. * Validates a boolean.
  2865. *
  2866. * @param rule The validation rule.
  2867. * @param value The value of the field on the source object.
  2868. * @param callback The callback function.
  2869. * @param source The source object being validated.
  2870. * @param options The validation options.
  2871. * @param options.messages The validation messages.
  2872. */
  2873. function _boolean(rule, value, callback, source, options) {
  2874. var errors = [];
  2875. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  2876. if (validate) {
  2877. if (isEmptyValue(value) && !rule.required) {
  2878. return callback();
  2879. }
  2880. rules.required(rule, value, source, errors, options);
  2881. if (value !== undefined) {
  2882. rules.type(rule, value, source, errors, options);
  2883. }
  2884. }
  2885. callback(errors);
  2886. }
  2887. /**
  2888. * Validates the regular expression type.
  2889. *
  2890. * @param rule The validation rule.
  2891. * @param value The value of the field on the source object.
  2892. * @param callback The callback function.
  2893. * @param source The source object being validated.
  2894. * @param options The validation options.
  2895. * @param options.messages The validation messages.
  2896. */
  2897. function regexp(rule, value, callback, source, options) {
  2898. var errors = [];
  2899. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  2900. if (validate) {
  2901. if (isEmptyValue(value) && !rule.required) {
  2902. return callback();
  2903. }
  2904. rules.required(rule, value, source, errors, options);
  2905. if (!isEmptyValue(value)) {
  2906. rules.type(rule, value, source, errors, options);
  2907. }
  2908. }
  2909. callback(errors);
  2910. }
  2911. /**
  2912. * Validates a number is an integer.
  2913. *
  2914. * @param rule The validation rule.
  2915. * @param value The value of the field on the source object.
  2916. * @param callback The callback function.
  2917. * @param source The source object being validated.
  2918. * @param options The validation options.
  2919. * @param options.messages The validation messages.
  2920. */
  2921. function integer(rule, value, callback, source, options) {
  2922. var errors = [];
  2923. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  2924. if (validate) {
  2925. if (isEmptyValue(value) && !rule.required) {
  2926. return callback();
  2927. }
  2928. rules.required(rule, value, source, errors, options);
  2929. if (value !== undefined) {
  2930. rules.type(rule, value, source, errors, options);
  2931. rules.range(rule, value, source, errors, options);
  2932. }
  2933. }
  2934. callback(errors);
  2935. }
  2936. /**
  2937. * Validates a number is a floating point number.
  2938. *
  2939. * @param rule The validation rule.
  2940. * @param value The value of the field on the source object.
  2941. * @param callback The callback function.
  2942. * @param source The source object being validated.
  2943. * @param options The validation options.
  2944. * @param options.messages The validation messages.
  2945. */
  2946. function floatFn(rule, value, callback, source, options) {
  2947. var errors = [];
  2948. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  2949. if (validate) {
  2950. if (isEmptyValue(value) && !rule.required) {
  2951. return callback();
  2952. }
  2953. rules.required(rule, value, source, errors, options);
  2954. if (value !== undefined) {
  2955. rules.type(rule, value, source, errors, options);
  2956. rules.range(rule, value, source, errors, options);
  2957. }
  2958. }
  2959. callback(errors);
  2960. }
  2961. /**
  2962. * Validates an array.
  2963. *
  2964. * @param rule The validation rule.
  2965. * @param value The value of the field on the source object.
  2966. * @param callback The callback function.
  2967. * @param source The source object being validated.
  2968. * @param options The validation options.
  2969. * @param options.messages The validation messages.
  2970. */
  2971. function array(rule, value, callback, source, options) {
  2972. var errors = [];
  2973. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  2974. if (validate) {
  2975. if (isEmptyValue(value, 'array') && !rule.required) {
  2976. return callback();
  2977. }
  2978. rules.required(rule, value, source, errors, options, 'array');
  2979. if (!isEmptyValue(value, 'array')) {
  2980. rules.type(rule, value, source, errors, options);
  2981. rules.range(rule, value, source, errors, options);
  2982. }
  2983. }
  2984. callback(errors);
  2985. }
  2986. /**
  2987. * Validates an object.
  2988. *
  2989. * @param rule The validation rule.
  2990. * @param value The value of the field on the source object.
  2991. * @param callback The callback function.
  2992. * @param source The source object being validated.
  2993. * @param options The validation options.
  2994. * @param options.messages The validation messages.
  2995. */
  2996. function object(rule, value, callback, source, options) {
  2997. var errors = [];
  2998. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  2999. if (validate) {
  3000. if (isEmptyValue(value) && !rule.required) {
  3001. return callback();
  3002. }
  3003. rules.required(rule, value, source, errors, options);
  3004. if (value !== undefined) {
  3005. rules.type(rule, value, source, errors, options);
  3006. }
  3007. }
  3008. callback(errors);
  3009. }
  3010. var ENUM$1 = 'enum';
  3011. /**
  3012. * Validates an enumerable list.
  3013. *
  3014. * @param rule The validation rule.
  3015. * @param value The value of the field on the source object.
  3016. * @param callback The callback function.
  3017. * @param source The source object being validated.
  3018. * @param options The validation options.
  3019. * @param options.messages The validation messages.
  3020. */
  3021. function enumerable$1(rule, value, callback, source, options) {
  3022. var errors = [];
  3023. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3024. if (validate) {
  3025. if (isEmptyValue(value) && !rule.required) {
  3026. return callback();
  3027. }
  3028. rules.required(rule, value, source, errors, options);
  3029. if (value !== undefined) {
  3030. rules[ENUM$1](rule, value, source, errors, options);
  3031. }
  3032. }
  3033. callback(errors);
  3034. }
  3035. /**
  3036. * Validates a regular expression pattern.
  3037. *
  3038. * Performs validation when a rule only contains
  3039. * a pattern property but is not declared as a string type.
  3040. *
  3041. * @param rule The validation rule.
  3042. * @param value The value of the field on the source object.
  3043. * @param callback The callback function.
  3044. * @param source The source object being validated.
  3045. * @param options The validation options.
  3046. * @param options.messages The validation messages.
  3047. */
  3048. function pattern$2(rule, value, callback, source, options) {
  3049. var errors = [];
  3050. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3051. if (validate) {
  3052. if (isEmptyValue(value, 'string') && !rule.required) {
  3053. return callback();
  3054. }
  3055. rules.required(rule, value, source, errors, options);
  3056. if (!isEmptyValue(value, 'string')) {
  3057. rules.pattern(rule, value, source, errors, options);
  3058. }
  3059. }
  3060. callback(errors);
  3061. }
  3062. function date(rule, value, callback, source, options) {
  3063. var errors = [];
  3064. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3065. if (validate) {
  3066. if (isEmptyValue(value) && !rule.required) {
  3067. return callback();
  3068. }
  3069. rules.required(rule, value, source, errors, options);
  3070. if (!isEmptyValue(value)) {
  3071. var dateObject;
  3072. if (typeof value === 'number') {
  3073. dateObject = new Date(value);
  3074. } else {
  3075. dateObject = value;
  3076. }
  3077. rules.type(rule, dateObject, source, errors, options);
  3078. if (dateObject) {
  3079. rules.range(rule, dateObject.getTime(), source, errors, options);
  3080. }
  3081. }
  3082. }
  3083. callback(errors);
  3084. }
  3085. function required$1(rule, value, callback, source, options) {
  3086. var errors = [];
  3087. var type = Array.isArray(value) ? 'array' : (0, _typeof2.default)(value);
  3088. rules.required(rule, value, source, errors, options, type);
  3089. callback(errors);
  3090. }
  3091. function type$1(rule, value, callback, source, options) {
  3092. var ruleType = rule.type;
  3093. var errors = [];
  3094. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3095. if (validate) {
  3096. if (isEmptyValue(value, ruleType) && !rule.required) {
  3097. return callback();
  3098. }
  3099. rules.required(rule, value, source, errors, options, ruleType);
  3100. if (!isEmptyValue(value, ruleType)) {
  3101. rules.type(rule, value, source, errors, options);
  3102. }
  3103. }
  3104. callback(errors);
  3105. }
  3106. /**
  3107. * Performs validation for any type.
  3108. *
  3109. * @param rule The validation rule.
  3110. * @param value The value of the field on the source object.
  3111. * @param callback The callback function.
  3112. * @param source The source object being validated.
  3113. * @param options The validation options.
  3114. * @param options.messages The validation messages.
  3115. */
  3116. function any(rule, value, callback, source, options) {
  3117. var errors = [];
  3118. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3119. if (validate) {
  3120. if (isEmptyValue(value) && !rule.required) {
  3121. return callback();
  3122. }
  3123. rules.required(rule, value, source, errors, options);
  3124. }
  3125. callback(errors);
  3126. }
  3127. var validators = {
  3128. string: string,
  3129. method: method,
  3130. number: number,
  3131. "boolean": _boolean,
  3132. regexp: regexp,
  3133. integer: integer,
  3134. "float": floatFn,
  3135. array: array,
  3136. object: object,
  3137. "enum": enumerable$1,
  3138. pattern: pattern$2,
  3139. date: date,
  3140. url: type$1,
  3141. hex: type$1,
  3142. email: type$1,
  3143. required: required$1,
  3144. any: any
  3145. };
  3146. function newMessages() {
  3147. return {
  3148. "default": 'Validation error on field %s',
  3149. required: '%s is required',
  3150. "enum": '%s must be one of %s',
  3151. whitespace: '%s cannot be empty',
  3152. date: {
  3153. format: '%s date %s is invalid for format %s',
  3154. parse: '%s date could not be parsed, %s is invalid ',
  3155. invalid: '%s date %s is invalid'
  3156. },
  3157. types: {
  3158. string: '%s is not a %s',
  3159. method: '%s is not a %s (function)',
  3160. array: '%s is not an %s',
  3161. object: '%s is not an %s',
  3162. number: '%s is not a %s',
  3163. date: '%s is not a %s',
  3164. "boolean": '%s is not a %s',
  3165. integer: '%s is not an %s',
  3166. "float": '%s is not a %s',
  3167. regexp: '%s is not a valid %s',
  3168. email: '%s is not a valid %s',
  3169. url: '%s is not a valid %s',
  3170. hex: '%s is not a valid %s'
  3171. },
  3172. string: {
  3173. len: '%s must be exactly %s characters',
  3174. min: '%s must be at least %s characters',
  3175. max: '%s cannot be longer than %s characters',
  3176. range: '%s must be between %s and %s characters'
  3177. },
  3178. number: {
  3179. len: '%s must equal %s',
  3180. min: '%s cannot be less than %s',
  3181. max: '%s cannot be greater than %s',
  3182. range: '%s must be between %s and %s'
  3183. },
  3184. array: {
  3185. len: '%s must be exactly %s in length',
  3186. min: '%s cannot be less than %s in length',
  3187. max: '%s cannot be greater than %s in length',
  3188. range: '%s must be between %s and %s in length'
  3189. },
  3190. pattern: {
  3191. mismatch: '%s value %s does not match pattern %s'
  3192. },
  3193. clone: function clone() {
  3194. var cloned = JSON.parse(JSON.stringify(this));
  3195. cloned.clone = this.clone;
  3196. return cloned;
  3197. }
  3198. };
  3199. }
  3200. var messages = newMessages();
  3201. /**
  3202. * Encapsulates a validation schema.
  3203. *
  3204. * @param descriptor An object declaring validation rules
  3205. * for this schema.
  3206. */
  3207. function Schema(descriptor) {
  3208. this.rules = null;
  3209. this._messages = messages;
  3210. this.define(descriptor);
  3211. }
  3212. Schema.prototype = {
  3213. messages: function messages(_messages) {
  3214. if (_messages) {
  3215. this._messages = deepMerge(newMessages(), _messages);
  3216. }
  3217. return this._messages;
  3218. },
  3219. define: function define(rules) {
  3220. if (!rules) {
  3221. throw new Error('Cannot configure a schema with no rules');
  3222. }
  3223. if ((0, _typeof2.default)(rules) !== 'object' || Array.isArray(rules)) {
  3224. throw new Error('Rules must be an object');
  3225. }
  3226. this.rules = {};
  3227. var z;
  3228. var item;
  3229. for (z in rules) {
  3230. if (rules.hasOwnProperty(z)) {
  3231. item = rules[z];
  3232. this.rules[z] = Array.isArray(item) ? item : [item];
  3233. }
  3234. }
  3235. },
  3236. validate: function validate(source_, o, oc) {
  3237. var _this = this;
  3238. if (o === void 0) {
  3239. o = {};
  3240. }
  3241. if (oc === void 0) {
  3242. oc = function oc() {};
  3243. }
  3244. var source = source_;
  3245. var options = o;
  3246. var callback = oc;
  3247. if (typeof options === 'function') {
  3248. callback = options;
  3249. options = {};
  3250. }
  3251. if (!this.rules || Object.keys(this.rules).length === 0) {
  3252. if (callback) {
  3253. callback();
  3254. }
  3255. return Promise.resolve();
  3256. }
  3257. function complete(results) {
  3258. var i;
  3259. var errors = [];
  3260. var fields = {};
  3261. function add(e) {
  3262. if (Array.isArray(e)) {
  3263. var _errors;
  3264. errors = (_errors = errors).concat.apply(_errors, e);
  3265. } else {
  3266. errors.push(e);
  3267. }
  3268. }
  3269. for (i = 0; i < results.length; i++) {
  3270. add(results[i]);
  3271. }
  3272. if (!errors.length) {
  3273. errors = null;
  3274. fields = null;
  3275. } else {
  3276. fields = convertFieldsError(errors);
  3277. }
  3278. callback(errors, fields);
  3279. }
  3280. if (options.messages) {
  3281. var messages$1 = this.messages();
  3282. if (messages$1 === messages) {
  3283. messages$1 = newMessages();
  3284. }
  3285. deepMerge(messages$1, options.messages);
  3286. options.messages = messages$1;
  3287. } else {
  3288. options.messages = this.messages();
  3289. }
  3290. var arr;
  3291. var value;
  3292. var series = {};
  3293. var keys = options.keys || Object.keys(this.rules);
  3294. keys.forEach(function (z) {
  3295. arr = _this.rules[z];
  3296. value = source[z];
  3297. arr.forEach(function (r) {
  3298. var rule = r;
  3299. if (typeof rule.transform === 'function') {
  3300. if (source === source_) {
  3301. source = _extends({}, source);
  3302. }
  3303. value = source[z] = rule.transform(value);
  3304. }
  3305. if (typeof rule === 'function') {
  3306. rule = {
  3307. validator: rule
  3308. };
  3309. } else {
  3310. rule = _extends({}, rule);
  3311. }
  3312. rule.validator = _this.getValidationMethod(rule);
  3313. rule.field = z;
  3314. rule.fullField = rule.fullField || z;
  3315. rule.type = _this.getType(rule);
  3316. if (!rule.validator) {
  3317. return;
  3318. }
  3319. series[z] = series[z] || [];
  3320. series[z].push({
  3321. rule: rule,
  3322. value: value,
  3323. source: source,
  3324. field: z
  3325. });
  3326. });
  3327. });
  3328. var errorFields = {};
  3329. return asyncMap(series, options, function (data, doIt) {
  3330. var rule = data.rule;
  3331. var deep = (rule.type === 'object' || rule.type === 'array') && ((0, _typeof2.default)(rule.fields) === 'object' || (0, _typeof2.default)(rule.defaultField) === 'object');
  3332. deep = deep && (rule.required || !rule.required && data.value);
  3333. rule.field = data.field;
  3334. function addFullfield(key, schema) {
  3335. return _extends({}, schema, {
  3336. fullField: rule.fullField + "." + key
  3337. });
  3338. }
  3339. function cb(e) {
  3340. if (e === void 0) {
  3341. e = [];
  3342. }
  3343. var errors = e;
  3344. if (!Array.isArray(errors)) {
  3345. errors = [errors];
  3346. }
  3347. if (!options.suppressWarning && errors.length) {
  3348. Schema.warning('async-validator:', errors);
  3349. }
  3350. if (errors.length && rule.message) {
  3351. errors = [].concat(rule.message);
  3352. }
  3353. errors = errors.map(complementError(rule));
  3354. if (options.first && errors.length) {
  3355. errorFields[rule.field] = 1;
  3356. return doIt(errors);
  3357. }
  3358. if (!deep) {
  3359. doIt(errors);
  3360. } else {
  3361. // if rule is required but the target object
  3362. // does not exist fail at the rule level and don't
  3363. // go deeper
  3364. if (rule.required && !data.value) {
  3365. if (rule.message) {
  3366. errors = [].concat(rule.message).map(complementError(rule));
  3367. } else if (options.error) {
  3368. errors = [options.error(rule, format(options.messages.required, rule.field))];
  3369. } else {
  3370. errors = [];
  3371. }
  3372. return doIt(errors);
  3373. }
  3374. var fieldsSchema = {};
  3375. if (rule.defaultField) {
  3376. for (var k in data.value) {
  3377. if (data.value.hasOwnProperty(k)) {
  3378. fieldsSchema[k] = rule.defaultField;
  3379. }
  3380. }
  3381. }
  3382. fieldsSchema = _extends({}, fieldsSchema, {}, data.rule.fields);
  3383. for (var f in fieldsSchema) {
  3384. if (fieldsSchema.hasOwnProperty(f)) {
  3385. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  3386. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  3387. }
  3388. }
  3389. var schema = new Schema(fieldsSchema);
  3390. schema.messages(options.messages);
  3391. if (data.rule.options) {
  3392. data.rule.options.messages = options.messages;
  3393. data.rule.options.error = options.error;
  3394. }
  3395. schema.validate(data.value, data.rule.options || options, function (errs) {
  3396. var finalErrors = [];
  3397. if (errors && errors.length) {
  3398. finalErrors.push.apply(finalErrors, errors);
  3399. }
  3400. if (errs && errs.length) {
  3401. finalErrors.push.apply(finalErrors, errs);
  3402. }
  3403. doIt(finalErrors.length ? finalErrors : null);
  3404. });
  3405. }
  3406. }
  3407. var res;
  3408. if (rule.asyncValidator) {
  3409. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  3410. } else if (rule.validator) {
  3411. res = rule.validator(rule, data.value, cb, data.source, options);
  3412. if (res === true) {
  3413. cb();
  3414. } else if (res === false) {
  3415. cb(rule.message || rule.field + " fails");
  3416. } else if (res instanceof Array) {
  3417. cb(res);
  3418. } else if (res instanceof Error) {
  3419. cb(res.message);
  3420. }
  3421. }
  3422. if (res && res.then) {
  3423. res.then(function () {
  3424. return cb();
  3425. }, function (e) {
  3426. return cb(e);
  3427. });
  3428. }
  3429. }, function (results) {
  3430. complete(results);
  3431. });
  3432. },
  3433. getType: function getType(rule) {
  3434. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  3435. rule.type = 'pattern';
  3436. }
  3437. if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
  3438. throw new Error(format('Unknown rule type %s', rule.type));
  3439. }
  3440. return rule.type || 'string';
  3441. },
  3442. getValidationMethod: function getValidationMethod(rule) {
  3443. if (typeof rule.validator === 'function') {
  3444. return rule.validator;
  3445. }
  3446. var keys = Object.keys(rule);
  3447. var messageIndex = keys.indexOf('message');
  3448. if (messageIndex !== -1) {
  3449. keys.splice(messageIndex, 1);
  3450. }
  3451. if (keys.length === 1 && keys[0] === 'required') {
  3452. return validators.required;
  3453. }
  3454. return validators[this.getType(rule)] || false;
  3455. }
  3456. };
  3457. Schema.register = function register(type, validator) {
  3458. if (typeof validator !== 'function') {
  3459. throw new Error('Cannot register a validator by type, validator is not a function');
  3460. }
  3461. validators[type] = validator;
  3462. };
  3463. Schema.warning = warning;
  3464. Schema.messages = messages;
  3465. var _default = Schema;
  3466. exports.default = _default;
  3467. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/node-libs-browser/mock/process.js */ 78)))
  3468. /***/ }),
  3469. /***/ 115:
  3470. /*!*************************************************!*\
  3471. !*** ./node_modules/stream-browserify/index.js ***!
  3472. \*************************************************/
  3473. /*! no static exports found */
  3474. /***/ (function(module, exports, __webpack_require__) {
  3475. // Copyright Joyent, Inc. and other Node contributors.
  3476. //
  3477. // Permission is hereby granted, free of charge, to any person obtaining a
  3478. // copy of this software and associated documentation files (the
  3479. // "Software"), to deal in the Software without restriction, including
  3480. // without limitation the rights to use, copy, modify, merge, publish,
  3481. // distribute, sublicense, and/or sell copies of the Software, and to permit
  3482. // persons to whom the Software is furnished to do so, subject to the
  3483. // following conditions:
  3484. //
  3485. // The above copyright notice and this permission notice shall be included
  3486. // in all copies or substantial portions of the Software.
  3487. //
  3488. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  3489. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  3490. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  3491. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  3492. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  3493. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  3494. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  3495. module.exports = Stream;
  3496. var EE = __webpack_require__(/*! events */ 92).EventEmitter;
  3497. var inherits = __webpack_require__(/*! inherits */ 86);
  3498. inherits(Stream, EE);
  3499. Stream.Readable = __webpack_require__(/*! readable-stream/readable.js */ 89);
  3500. Stream.Writable = __webpack_require__(/*! readable-stream/writable.js */ 116);
  3501. Stream.Duplex = __webpack_require__(/*! readable-stream/duplex.js */ 117);
  3502. Stream.Transform = __webpack_require__(/*! readable-stream/transform.js */ 118);
  3503. Stream.PassThrough = __webpack_require__(/*! readable-stream/passthrough.js */ 119);
  3504. // Backwards-compat with node 0.4.x
  3505. Stream.Stream = Stream;
  3506. // old-style streams. Note that the pipe method (the only relevant
  3507. // part of this class) is overridden in the Readable class.
  3508. function Stream() {
  3509. EE.call(this);
  3510. }
  3511. Stream.prototype.pipe = function(dest, options) {
  3512. var source = this;
  3513. function ondata(chunk) {
  3514. if (dest.writable) {
  3515. if (false === dest.write(chunk) && source.pause) {
  3516. source.pause();
  3517. }
  3518. }
  3519. }
  3520. source.on('data', ondata);
  3521. function ondrain() {
  3522. if (source.readable && source.resume) {
  3523. source.resume();
  3524. }
  3525. }
  3526. dest.on('drain', ondrain);
  3527. // If the 'end' option is not supplied, dest.end() will be called when
  3528. // source gets the 'end' or 'close' events. Only dest.end() once.
  3529. if (!dest._isStdio && (!options || options.end !== false)) {
  3530. source.on('end', onend);
  3531. source.on('close', onclose);
  3532. }
  3533. var didOnEnd = false;
  3534. function onend() {
  3535. if (didOnEnd) return;
  3536. didOnEnd = true;
  3537. dest.end();
  3538. }
  3539. function onclose() {
  3540. if (didOnEnd) return;
  3541. didOnEnd = true;
  3542. if (typeof dest.destroy === 'function') dest.destroy();
  3543. }
  3544. // don't leave dangling pipes when there are errors.
  3545. function onerror(er) {
  3546. cleanup();
  3547. if (EE.listenerCount(this, 'error') === 0) {
  3548. throw er; // Unhandled stream error in pipe.
  3549. }
  3550. }
  3551. source.on('error', onerror);
  3552. dest.on('error', onerror);
  3553. // remove all the event listeners that were added.
  3554. function cleanup() {
  3555. source.removeListener('data', ondata);
  3556. dest.removeListener('drain', ondrain);
  3557. source.removeListener('end', onend);
  3558. source.removeListener('close', onclose);
  3559. source.removeListener('error', onerror);
  3560. dest.removeListener('error', onerror);
  3561. source.removeListener('end', cleanup);
  3562. source.removeListener('close', cleanup);
  3563. dest.removeListener('close', cleanup);
  3564. }
  3565. source.on('end', cleanup);
  3566. source.on('close', cleanup);
  3567. dest.on('close', cleanup);
  3568. dest.emit('pipe', source);
  3569. // Allow for unix-like usage: A.pipe(B).pipe(C)
  3570. return dest;
  3571. };
  3572. /***/ }),
  3573. /***/ 116:
  3574. /*!**********************************************************!*\
  3575. !*** ./node_modules/readable-stream/writable-browser.js ***!
  3576. \**********************************************************/
  3577. /*! no static exports found */
  3578. /***/ (function(module, exports, __webpack_require__) {
  3579. module.exports = __webpack_require__(/*! ./lib/_stream_writable.js */ 100);
  3580. /***/ }),
  3581. /***/ 117:
  3582. /*!********************************************************!*\
  3583. !*** ./node_modules/readable-stream/duplex-browser.js ***!
  3584. \********************************************************/
  3585. /*! no static exports found */
  3586. /***/ (function(module, exports, __webpack_require__) {
  3587. module.exports = __webpack_require__(/*! ./lib/_stream_duplex.js */ 99);
  3588. /***/ }),
  3589. /***/ 118:
  3590. /*!***************************************************!*\
  3591. !*** ./node_modules/readable-stream/transform.js ***!
  3592. \***************************************************/
  3593. /*! no static exports found */
  3594. /***/ (function(module, exports, __webpack_require__) {
  3595. module.exports = __webpack_require__(/*! ./readable */ 89).Transform
  3596. /***/ }),
  3597. /***/ 119:
  3598. /*!*****************************************************!*\
  3599. !*** ./node_modules/readable-stream/passthrough.js ***!
  3600. \*****************************************************/
  3601. /*! no static exports found */
  3602. /***/ (function(module, exports, __webpack_require__) {
  3603. module.exports = __webpack_require__(/*! ./readable */ 89).PassThrough
  3604. /***/ }),
  3605. /***/ 12:
  3606. /*!**************************************************************!*\
  3607. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  3608. \**************************************************************/
  3609. /*! no static exports found */
  3610. /***/ (function(module, exports, __webpack_require__) {
  3611. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  3612. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  3613. function toPropertyKey(t) {
  3614. var i = toPrimitive(t, "string");
  3615. return "symbol" == _typeof(i) ? i : String(i);
  3616. }
  3617. module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3618. /***/ }),
  3619. /***/ 120:
  3620. /*!*********************************************!*\
  3621. !*** ./node_modules/create-hmac/browser.js ***!
  3622. \*********************************************/
  3623. /*! no static exports found */
  3624. /***/ (function(module, exports, __webpack_require__) {
  3625. "use strict";
  3626. var inherits = __webpack_require__(/*! inherits */ 86)
  3627. var Legacy = __webpack_require__(/*! ./legacy */ 121)
  3628. var Base = __webpack_require__(/*! cipher-base */ 114)
  3629. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  3630. var md5 = __webpack_require__(/*! create-hash/md5 */ 122)
  3631. var RIPEMD160 = __webpack_require__(/*! ripemd160 */ 105)
  3632. var sha = __webpack_require__(/*! sha.js */ 106)
  3633. var ZEROS = Buffer.alloc(128)
  3634. function Hmac (alg, key) {
  3635. Base.call(this, 'digest')
  3636. if (typeof key === 'string') {
  3637. key = Buffer.from(key)
  3638. }
  3639. var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64
  3640. this._alg = alg
  3641. this._key = key
  3642. if (key.length > blocksize) {
  3643. var hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)
  3644. key = hash.update(key).digest()
  3645. } else if (key.length < blocksize) {
  3646. key = Buffer.concat([key, ZEROS], blocksize)
  3647. }
  3648. var ipad = this._ipad = Buffer.allocUnsafe(blocksize)
  3649. var opad = this._opad = Buffer.allocUnsafe(blocksize)
  3650. for (var i = 0; i < blocksize; i++) {
  3651. ipad[i] = key[i] ^ 0x36
  3652. opad[i] = key[i] ^ 0x5C
  3653. }
  3654. this._hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)
  3655. this._hash.update(ipad)
  3656. }
  3657. inherits(Hmac, Base)
  3658. Hmac.prototype._update = function (data) {
  3659. this._hash.update(data)
  3660. }
  3661. Hmac.prototype._final = function () {
  3662. var h = this._hash.digest()
  3663. var hash = this._alg === 'rmd160' ? new RIPEMD160() : sha(this._alg)
  3664. return hash.update(this._opad).update(h).digest()
  3665. }
  3666. module.exports = function createHmac (alg, key) {
  3667. alg = alg.toLowerCase()
  3668. if (alg === 'rmd160' || alg === 'ripemd160') {
  3669. return new Hmac('rmd160', key)
  3670. }
  3671. if (alg === 'md5') {
  3672. return new Legacy(md5, key)
  3673. }
  3674. return new Hmac(alg, key)
  3675. }
  3676. /***/ }),
  3677. /***/ 1209:
  3678. /*!************************************************************!*\
  3679. !*** E:/project/bigdata_WX/uview-ui/libs/util/province.js ***!
  3680. \************************************************************/
  3681. /*! no static exports found */
  3682. /***/ (function(module, exports, __webpack_require__) {
  3683. "use strict";
  3684. Object.defineProperty(exports, "__esModule", {
  3685. value: true
  3686. });
  3687. exports.default = void 0;
  3688. var provinceData = [{
  3689. "label": "北京市",
  3690. "value": "11"
  3691. }, {
  3692. "label": "天津市",
  3693. "value": "12"
  3694. }, {
  3695. "label": "河北省",
  3696. "value": "13"
  3697. }, {
  3698. "label": "山西省",
  3699. "value": "14"
  3700. }, {
  3701. "label": "内蒙古自治区",
  3702. "value": "15"
  3703. }, {
  3704. "label": "辽宁省",
  3705. "value": "21"
  3706. }, {
  3707. "label": "吉林省",
  3708. "value": "22"
  3709. }, {
  3710. "label": "黑龙江省",
  3711. "value": "23"
  3712. }, {
  3713. "label": "上海市",
  3714. "value": "31"
  3715. }, {
  3716. "label": "江苏省",
  3717. "value": "32"
  3718. }, {
  3719. "label": "浙江省",
  3720. "value": "33"
  3721. }, {
  3722. "label": "安徽省",
  3723. "value": "34"
  3724. }, {
  3725. "label": "福建省",
  3726. "value": "35"
  3727. }, {
  3728. "label": "江西省",
  3729. "value": "36"
  3730. }, {
  3731. "label": "山东省",
  3732. "value": "37"
  3733. }, {
  3734. "label": "河南省",
  3735. "value": "41"
  3736. }, {
  3737. "label": "湖北省",
  3738. "value": "42"
  3739. }, {
  3740. "label": "湖南省",
  3741. "value": "43"
  3742. }, {
  3743. "label": "广东省",
  3744. "value": "44"
  3745. }, {
  3746. "label": "广西壮族自治区",
  3747. "value": "45"
  3748. }, {
  3749. "label": "海南省",
  3750. "value": "46"
  3751. }, {
  3752. "label": "重庆市",
  3753. "value": "50"
  3754. }, {
  3755. "label": "四川省",
  3756. "value": "51"
  3757. }, {
  3758. "label": "贵州省",
  3759. "value": "52"
  3760. }, {
  3761. "label": "云南省",
  3762. "value": "53"
  3763. }, {
  3764. "label": "西藏自治区",
  3765. "value": "54"
  3766. }, {
  3767. "label": "陕西省",
  3768. "value": "61"
  3769. }, {
  3770. "label": "甘肃省",
  3771. "value": "62"
  3772. }, {
  3773. "label": "青海省",
  3774. "value": "63"
  3775. }, {
  3776. "label": "宁夏回族自治区",
  3777. "value": "64"
  3778. }, {
  3779. "label": "新疆维吾尔自治区",
  3780. "value": "65"
  3781. }, {
  3782. "label": "台湾",
  3783. "value": "66"
  3784. }, {
  3785. "label": "香港",
  3786. "value": "67"
  3787. }, {
  3788. "label": "澳门",
  3789. "value": "68"
  3790. }];
  3791. var _default = provinceData;
  3792. exports.default = _default;
  3793. /***/ }),
  3794. /***/ 121:
  3795. /*!********************************************!*\
  3796. !*** ./node_modules/create-hmac/legacy.js ***!
  3797. \********************************************/
  3798. /*! no static exports found */
  3799. /***/ (function(module, exports, __webpack_require__) {
  3800. "use strict";
  3801. var inherits = __webpack_require__(/*! inherits */ 86)
  3802. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  3803. var Base = __webpack_require__(/*! cipher-base */ 114)
  3804. var ZEROS = Buffer.alloc(128)
  3805. var blocksize = 64
  3806. function Hmac (alg, key) {
  3807. Base.call(this, 'digest')
  3808. if (typeof key === 'string') {
  3809. key = Buffer.from(key)
  3810. }
  3811. this._alg = alg
  3812. this._key = key
  3813. if (key.length > blocksize) {
  3814. key = alg(key)
  3815. } else if (key.length < blocksize) {
  3816. key = Buffer.concat([key, ZEROS], blocksize)
  3817. }
  3818. var ipad = this._ipad = Buffer.allocUnsafe(blocksize)
  3819. var opad = this._opad = Buffer.allocUnsafe(blocksize)
  3820. for (var i = 0; i < blocksize; i++) {
  3821. ipad[i] = key[i] ^ 0x36
  3822. opad[i] = key[i] ^ 0x5C
  3823. }
  3824. this._hash = [ipad]
  3825. }
  3826. inherits(Hmac, Base)
  3827. Hmac.prototype._update = function (data) {
  3828. this._hash.push(data)
  3829. }
  3830. Hmac.prototype._final = function () {
  3831. var h = this._alg(Buffer.concat(this._hash))
  3832. return this._alg(Buffer.concat([this._opad, h]))
  3833. }
  3834. module.exports = Hmac
  3835. /***/ }),
  3836. /***/ 1210:
  3837. /*!********************************************************!*\
  3838. !*** E:/project/bigdata_WX/uview-ui/libs/util/city.js ***!
  3839. \********************************************************/
  3840. /*! no static exports found */
  3841. /***/ (function(module, exports, __webpack_require__) {
  3842. "use strict";
  3843. Object.defineProperty(exports, "__esModule", {
  3844. value: true
  3845. });
  3846. exports.default = void 0;
  3847. var cityData = [[{
  3848. "label": "市辖区",
  3849. "value": "1101"
  3850. }], [{
  3851. "label": "市辖区",
  3852. "value": "1201"
  3853. }], [{
  3854. "label": "石家庄市",
  3855. "value": "1301"
  3856. }, {
  3857. "label": "唐山市",
  3858. "value": "1302"
  3859. }, {
  3860. "label": "秦皇岛市",
  3861. "value": "1303"
  3862. }, {
  3863. "label": "邯郸市",
  3864. "value": "1304"
  3865. }, {
  3866. "label": "邢台市",
  3867. "value": "1305"
  3868. }, {
  3869. "label": "保定市",
  3870. "value": "1306"
  3871. }, {
  3872. "label": "张家口市",
  3873. "value": "1307"
  3874. }, {
  3875. "label": "承德市",
  3876. "value": "1308"
  3877. }, {
  3878. "label": "沧州市",
  3879. "value": "1309"
  3880. }, {
  3881. "label": "廊坊市",
  3882. "value": "1310"
  3883. }, {
  3884. "label": "衡水市",
  3885. "value": "1311"
  3886. }], [{
  3887. "label": "太原市",
  3888. "value": "1401"
  3889. }, {
  3890. "label": "大同市",
  3891. "value": "1402"
  3892. }, {
  3893. "label": "阳泉市",
  3894. "value": "1403"
  3895. }, {
  3896. "label": "长治市",
  3897. "value": "1404"
  3898. }, {
  3899. "label": "晋城市",
  3900. "value": "1405"
  3901. }, {
  3902. "label": "朔州市",
  3903. "value": "1406"
  3904. }, {
  3905. "label": "晋中市",
  3906. "value": "1407"
  3907. }, {
  3908. "label": "运城市",
  3909. "value": "1408"
  3910. }, {
  3911. "label": "忻州市",
  3912. "value": "1409"
  3913. }, {
  3914. "label": "临汾市",
  3915. "value": "1410"
  3916. }, {
  3917. "label": "吕梁市",
  3918. "value": "1411"
  3919. }], [{
  3920. "label": "呼和浩特市",
  3921. "value": "1501"
  3922. }, {
  3923. "label": "包头市",
  3924. "value": "1502"
  3925. }, {
  3926. "label": "乌海市",
  3927. "value": "1503"
  3928. }, {
  3929. "label": "赤峰市",
  3930. "value": "1504"
  3931. }, {
  3932. "label": "通辽市",
  3933. "value": "1505"
  3934. }, {
  3935. "label": "鄂尔多斯市",
  3936. "value": "1506"
  3937. }, {
  3938. "label": "呼伦贝尔市",
  3939. "value": "1507"
  3940. }, {
  3941. "label": "巴彦淖尔市",
  3942. "value": "1508"
  3943. }, {
  3944. "label": "乌兰察布市",
  3945. "value": "1509"
  3946. }, {
  3947. "label": "兴安盟",
  3948. "value": "1522"
  3949. }, {
  3950. "label": "锡林郭勒盟",
  3951. "value": "1525"
  3952. }, {
  3953. "label": "阿拉善盟",
  3954. "value": "1529"
  3955. }], [{
  3956. "label": "沈阳市",
  3957. "value": "2101"
  3958. }, {
  3959. "label": "大连市",
  3960. "value": "2102"
  3961. }, {
  3962. "label": "鞍山市",
  3963. "value": "2103"
  3964. }, {
  3965. "label": "抚顺市",
  3966. "value": "2104"
  3967. }, {
  3968. "label": "本溪市",
  3969. "value": "2105"
  3970. }, {
  3971. "label": "丹东市",
  3972. "value": "2106"
  3973. }, {
  3974. "label": "锦州市",
  3975. "value": "2107"
  3976. }, {
  3977. "label": "营口市",
  3978. "value": "2108"
  3979. }, {
  3980. "label": "阜新市",
  3981. "value": "2109"
  3982. }, {
  3983. "label": "辽阳市",
  3984. "value": "2110"
  3985. }, {
  3986. "label": "盘锦市",
  3987. "value": "2111"
  3988. }, {
  3989. "label": "铁岭市",
  3990. "value": "2112"
  3991. }, {
  3992. "label": "朝阳市",
  3993. "value": "2113"
  3994. }, {
  3995. "label": "葫芦岛市",
  3996. "value": "2114"
  3997. }], [{
  3998. "label": "长春市",
  3999. "value": "2201"
  4000. }, {
  4001. "label": "吉林市",
  4002. "value": "2202"
  4003. }, {
  4004. "label": "四平市",
  4005. "value": "2203"
  4006. }, {
  4007. "label": "辽源市",
  4008. "value": "2204"
  4009. }, {
  4010. "label": "通化市",
  4011. "value": "2205"
  4012. }, {
  4013. "label": "白山市",
  4014. "value": "2206"
  4015. }, {
  4016. "label": "松原市",
  4017. "value": "2207"
  4018. }, {
  4019. "label": "白城市",
  4020. "value": "2208"
  4021. }, {
  4022. "label": "延边朝鲜族自治州",
  4023. "value": "2224"
  4024. }], [{
  4025. "label": "哈尔滨市",
  4026. "value": "2301"
  4027. }, {
  4028. "label": "齐齐哈尔市",
  4029. "value": "2302"
  4030. }, {
  4031. "label": "鸡西市",
  4032. "value": "2303"
  4033. }, {
  4034. "label": "鹤岗市",
  4035. "value": "2304"
  4036. }, {
  4037. "label": "双鸭山市",
  4038. "value": "2305"
  4039. }, {
  4040. "label": "大庆市",
  4041. "value": "2306"
  4042. }, {
  4043. "label": "伊春市",
  4044. "value": "2307"
  4045. }, {
  4046. "label": "佳木斯市",
  4047. "value": "2308"
  4048. }, {
  4049. "label": "七台河市",
  4050. "value": "2309"
  4051. }, {
  4052. "label": "牡丹江市",
  4053. "value": "2310"
  4054. }, {
  4055. "label": "黑河市",
  4056. "value": "2311"
  4057. }, {
  4058. "label": "绥化市",
  4059. "value": "2312"
  4060. }, {
  4061. "label": "大兴安岭地区",
  4062. "value": "2327"
  4063. }], [{
  4064. "label": "市辖区",
  4065. "value": "3101"
  4066. }], [{
  4067. "label": "南京市",
  4068. "value": "3201"
  4069. }, {
  4070. "label": "无锡市",
  4071. "value": "3202"
  4072. }, {
  4073. "label": "徐州市",
  4074. "value": "3203"
  4075. }, {
  4076. "label": "常州市",
  4077. "value": "3204"
  4078. }, {
  4079. "label": "苏州市",
  4080. "value": "3205"
  4081. }, {
  4082. "label": "南通市",
  4083. "value": "3206"
  4084. }, {
  4085. "label": "连云港市",
  4086. "value": "3207"
  4087. }, {
  4088. "label": "淮安市",
  4089. "value": "3208"
  4090. }, {
  4091. "label": "盐城市",
  4092. "value": "3209"
  4093. }, {
  4094. "label": "扬州市",
  4095. "value": "3210"
  4096. }, {
  4097. "label": "镇江市",
  4098. "value": "3211"
  4099. }, {
  4100. "label": "泰州市",
  4101. "value": "3212"
  4102. }, {
  4103. "label": "宿迁市",
  4104. "value": "3213"
  4105. }], [{
  4106. "label": "杭州市",
  4107. "value": "3301"
  4108. }, {
  4109. "label": "宁波市",
  4110. "value": "3302"
  4111. }, {
  4112. "label": "温州市",
  4113. "value": "3303"
  4114. }, {
  4115. "label": "嘉兴市",
  4116. "value": "3304"
  4117. }, {
  4118. "label": "湖州市",
  4119. "value": "3305"
  4120. }, {
  4121. "label": "绍兴市",
  4122. "value": "3306"
  4123. }, {
  4124. "label": "金华市",
  4125. "value": "3307"
  4126. }, {
  4127. "label": "衢州市",
  4128. "value": "3308"
  4129. }, {
  4130. "label": "舟山市",
  4131. "value": "3309"
  4132. }, {
  4133. "label": "台州市",
  4134. "value": "3310"
  4135. }, {
  4136. "label": "丽水市",
  4137. "value": "3311"
  4138. }], [{
  4139. "label": "合肥市",
  4140. "value": "3401"
  4141. }, {
  4142. "label": "芜湖市",
  4143. "value": "3402"
  4144. }, {
  4145. "label": "蚌埠市",
  4146. "value": "3403"
  4147. }, {
  4148. "label": "淮南市",
  4149. "value": "3404"
  4150. }, {
  4151. "label": "马鞍山市",
  4152. "value": "3405"
  4153. }, {
  4154. "label": "淮北市",
  4155. "value": "3406"
  4156. }, {
  4157. "label": "铜陵市",
  4158. "value": "3407"
  4159. }, {
  4160. "label": "安庆市",
  4161. "value": "3408"
  4162. }, {
  4163. "label": "黄山市",
  4164. "value": "3410"
  4165. }, {
  4166. "label": "滁州市",
  4167. "value": "3411"
  4168. }, {
  4169. "label": "阜阳市",
  4170. "value": "3412"
  4171. }, {
  4172. "label": "宿州市",
  4173. "value": "3413"
  4174. }, {
  4175. "label": "六安市",
  4176. "value": "3415"
  4177. }, {
  4178. "label": "亳州市",
  4179. "value": "3416"
  4180. }, {
  4181. "label": "池州市",
  4182. "value": "3417"
  4183. }, {
  4184. "label": "宣城市",
  4185. "value": "3418"
  4186. }], [{
  4187. "label": "福州市",
  4188. "value": "3501"
  4189. }, {
  4190. "label": "厦门市",
  4191. "value": "3502"
  4192. }, {
  4193. "label": "莆田市",
  4194. "value": "3503"
  4195. }, {
  4196. "label": "三明市",
  4197. "value": "3504"
  4198. }, {
  4199. "label": "泉州市",
  4200. "value": "3505"
  4201. }, {
  4202. "label": "漳州市",
  4203. "value": "3506"
  4204. }, {
  4205. "label": "南平市",
  4206. "value": "3507"
  4207. }, {
  4208. "label": "龙岩市",
  4209. "value": "3508"
  4210. }, {
  4211. "label": "宁德市",
  4212. "value": "3509"
  4213. }], [{
  4214. "label": "南昌市",
  4215. "value": "3601"
  4216. }, {
  4217. "label": "景德镇市",
  4218. "value": "3602"
  4219. }, {
  4220. "label": "萍乡市",
  4221. "value": "3603"
  4222. }, {
  4223. "label": "九江市",
  4224. "value": "3604"
  4225. }, {
  4226. "label": "新余市",
  4227. "value": "3605"
  4228. }, {
  4229. "label": "鹰潭市",
  4230. "value": "3606"
  4231. }, {
  4232. "label": "赣州市",
  4233. "value": "3607"
  4234. }, {
  4235. "label": "吉安市",
  4236. "value": "3608"
  4237. }, {
  4238. "label": "宜春市",
  4239. "value": "3609"
  4240. }, {
  4241. "label": "抚州市",
  4242. "value": "3610"
  4243. }, {
  4244. "label": "上饶市",
  4245. "value": "3611"
  4246. }], [{
  4247. "label": "济南市",
  4248. "value": "3701"
  4249. }, {
  4250. "label": "青岛市",
  4251. "value": "3702"
  4252. }, {
  4253. "label": "淄博市",
  4254. "value": "3703"
  4255. }, {
  4256. "label": "枣庄市",
  4257. "value": "3704"
  4258. }, {
  4259. "label": "东营市",
  4260. "value": "3705"
  4261. }, {
  4262. "label": "烟台市",
  4263. "value": "3706"
  4264. }, {
  4265. "label": "潍坊市",
  4266. "value": "3707"
  4267. }, {
  4268. "label": "济宁市",
  4269. "value": "3708"
  4270. }, {
  4271. "label": "泰安市",
  4272. "value": "3709"
  4273. }, {
  4274. "label": "威海市",
  4275. "value": "3710"
  4276. }, {
  4277. "label": "日照市",
  4278. "value": "3711"
  4279. }, {
  4280. "label": "莱芜市",
  4281. "value": "3712"
  4282. }, {
  4283. "label": "临沂市",
  4284. "value": "3713"
  4285. }, {
  4286. "label": "德州市",
  4287. "value": "3714"
  4288. }, {
  4289. "label": "聊城市",
  4290. "value": "3715"
  4291. }, {
  4292. "label": "滨州市",
  4293. "value": "3716"
  4294. }, {
  4295. "label": "菏泽市",
  4296. "value": "3717"
  4297. }], [{
  4298. "label": "郑州市",
  4299. "value": "4101"
  4300. }, {
  4301. "label": "开封市",
  4302. "value": "4102"
  4303. }, {
  4304. "label": "洛阳市",
  4305. "value": "4103"
  4306. }, {
  4307. "label": "平顶山市",
  4308. "value": "4104"
  4309. }, {
  4310. "label": "安阳市",
  4311. "value": "4105"
  4312. }, {
  4313. "label": "鹤壁市",
  4314. "value": "4106"
  4315. }, {
  4316. "label": "新乡市",
  4317. "value": "4107"
  4318. }, {
  4319. "label": "焦作市",
  4320. "value": "4108"
  4321. }, {
  4322. "label": "濮阳市",
  4323. "value": "4109"
  4324. }, {
  4325. "label": "许昌市",
  4326. "value": "4110"
  4327. }, {
  4328. "label": "漯河市",
  4329. "value": "4111"
  4330. }, {
  4331. "label": "三门峡市",
  4332. "value": "4112"
  4333. }, {
  4334. "label": "南阳市",
  4335. "value": "4113"
  4336. }, {
  4337. "label": "商丘市",
  4338. "value": "4114"
  4339. }, {
  4340. "label": "信阳市",
  4341. "value": "4115"
  4342. }, {
  4343. "label": "周口市",
  4344. "value": "4116"
  4345. }, {
  4346. "label": "驻马店市",
  4347. "value": "4117"
  4348. }, {
  4349. "label": "省直辖县级行政区划",
  4350. "value": "4190"
  4351. }], [{
  4352. "label": "武汉市",
  4353. "value": "4201"
  4354. }, {
  4355. "label": "黄石市",
  4356. "value": "4202"
  4357. }, {
  4358. "label": "十堰市",
  4359. "value": "4203"
  4360. }, {
  4361. "label": "宜昌市",
  4362. "value": "4205"
  4363. }, {
  4364. "label": "襄阳市",
  4365. "value": "4206"
  4366. }, {
  4367. "label": "鄂州市",
  4368. "value": "4207"
  4369. }, {
  4370. "label": "荆门市",
  4371. "value": "4208"
  4372. }, {
  4373. "label": "孝感市",
  4374. "value": "4209"
  4375. }, {
  4376. "label": "荆州市",
  4377. "value": "4210"
  4378. }, {
  4379. "label": "黄冈市",
  4380. "value": "4211"
  4381. }, {
  4382. "label": "咸宁市",
  4383. "value": "4212"
  4384. }, {
  4385. "label": "随州市",
  4386. "value": "4213"
  4387. }, {
  4388. "label": "恩施土家族苗族自治州",
  4389. "value": "4228"
  4390. }, {
  4391. "label": "省直辖县级行政区划",
  4392. "value": "4290"
  4393. }], [{
  4394. "label": "长沙市",
  4395. "value": "4301"
  4396. }, {
  4397. "label": "株洲市",
  4398. "value": "4302"
  4399. }, {
  4400. "label": "湘潭市",
  4401. "value": "4303"
  4402. }, {
  4403. "label": "衡阳市",
  4404. "value": "4304"
  4405. }, {
  4406. "label": "邵阳市",
  4407. "value": "4305"
  4408. }, {
  4409. "label": "岳阳市",
  4410. "value": "4306"
  4411. }, {
  4412. "label": "常德市",
  4413. "value": "4307"
  4414. }, {
  4415. "label": "张家界市",
  4416. "value": "4308"
  4417. }, {
  4418. "label": "益阳市",
  4419. "value": "4309"
  4420. }, {
  4421. "label": "郴州市",
  4422. "value": "4310"
  4423. }, {
  4424. "label": "永州市",
  4425. "value": "4311"
  4426. }, {
  4427. "label": "怀化市",
  4428. "value": "4312"
  4429. }, {
  4430. "label": "娄底市",
  4431. "value": "4313"
  4432. }, {
  4433. "label": "湘西土家族苗族自治州",
  4434. "value": "4331"
  4435. }], [{
  4436. "label": "广州市",
  4437. "value": "4401"
  4438. }, {
  4439. "label": "韶关市",
  4440. "value": "4402"
  4441. }, {
  4442. "label": "深圳市",
  4443. "value": "4403"
  4444. }, {
  4445. "label": "珠海市",
  4446. "value": "4404"
  4447. }, {
  4448. "label": "汕头市",
  4449. "value": "4405"
  4450. }, {
  4451. "label": "佛山市",
  4452. "value": "4406"
  4453. }, {
  4454. "label": "江门市",
  4455. "value": "4407"
  4456. }, {
  4457. "label": "湛江市",
  4458. "value": "4408"
  4459. }, {
  4460. "label": "茂名市",
  4461. "value": "4409"
  4462. }, {
  4463. "label": "肇庆市",
  4464. "value": "4412"
  4465. }, {
  4466. "label": "惠州市",
  4467. "value": "4413"
  4468. }, {
  4469. "label": "梅州市",
  4470. "value": "4414"
  4471. }, {
  4472. "label": "汕尾市",
  4473. "value": "4415"
  4474. }, {
  4475. "label": "河源市",
  4476. "value": "4416"
  4477. }, {
  4478. "label": "阳江市",
  4479. "value": "4417"
  4480. }, {
  4481. "label": "清远市",
  4482. "value": "4418"
  4483. }, {
  4484. "label": "东莞市",
  4485. "value": "4419"
  4486. }, {
  4487. "label": "中山市",
  4488. "value": "4420"
  4489. }, {
  4490. "label": "潮州市",
  4491. "value": "4451"
  4492. }, {
  4493. "label": "揭阳市",
  4494. "value": "4452"
  4495. }, {
  4496. "label": "云浮市",
  4497. "value": "4453"
  4498. }], [{
  4499. "label": "南宁市",
  4500. "value": "4501"
  4501. }, {
  4502. "label": "柳州市",
  4503. "value": "4502"
  4504. }, {
  4505. "label": "桂林市",
  4506. "value": "4503"
  4507. }, {
  4508. "label": "梧州市",
  4509. "value": "4504"
  4510. }, {
  4511. "label": "北海市",
  4512. "value": "4505"
  4513. }, {
  4514. "label": "防城港市",
  4515. "value": "4506"
  4516. }, {
  4517. "label": "钦州市",
  4518. "value": "4507"
  4519. }, {
  4520. "label": "贵港市",
  4521. "value": "4508"
  4522. }, {
  4523. "label": "玉林市",
  4524. "value": "4509"
  4525. }, {
  4526. "label": "百色市",
  4527. "value": "4510"
  4528. }, {
  4529. "label": "贺州市",
  4530. "value": "4511"
  4531. }, {
  4532. "label": "河池市",
  4533. "value": "4512"
  4534. }, {
  4535. "label": "来宾市",
  4536. "value": "4513"
  4537. }, {
  4538. "label": "崇左市",
  4539. "value": "4514"
  4540. }], [{
  4541. "label": "海口市",
  4542. "value": "4601"
  4543. }, {
  4544. "label": "三亚市",
  4545. "value": "4602"
  4546. }, {
  4547. "label": "三沙市",
  4548. "value": "4603"
  4549. }, {
  4550. "label": "儋州市",
  4551. "value": "4604"
  4552. }, {
  4553. "label": "省直辖县级行政区划",
  4554. "value": "4690"
  4555. }], [{
  4556. "label": "市辖区",
  4557. "value": "5001"
  4558. }, {
  4559. "label": "县",
  4560. "value": "5002"
  4561. }], [{
  4562. "label": "成都市",
  4563. "value": "5101"
  4564. }, {
  4565. "label": "自贡市",
  4566. "value": "5103"
  4567. }, {
  4568. "label": "攀枝花市",
  4569. "value": "5104"
  4570. }, {
  4571. "label": "泸州市",
  4572. "value": "5105"
  4573. }, {
  4574. "label": "德阳市",
  4575. "value": "5106"
  4576. }, {
  4577. "label": "绵阳市",
  4578. "value": "5107"
  4579. }, {
  4580. "label": "广元市",
  4581. "value": "5108"
  4582. }, {
  4583. "label": "遂宁市",
  4584. "value": "5109"
  4585. }, {
  4586. "label": "内江市",
  4587. "value": "5110"
  4588. }, {
  4589. "label": "乐山市",
  4590. "value": "5111"
  4591. }, {
  4592. "label": "南充市",
  4593. "value": "5113"
  4594. }, {
  4595. "label": "眉山市",
  4596. "value": "5114"
  4597. }, {
  4598. "label": "宜宾市",
  4599. "value": "5115"
  4600. }, {
  4601. "label": "广安市",
  4602. "value": "5116"
  4603. }, {
  4604. "label": "达州市",
  4605. "value": "5117"
  4606. }, {
  4607. "label": "雅安市",
  4608. "value": "5118"
  4609. }, {
  4610. "label": "巴中市",
  4611. "value": "5119"
  4612. }, {
  4613. "label": "资阳市",
  4614. "value": "5120"
  4615. }, {
  4616. "label": "阿坝藏族羌族自治州",
  4617. "value": "5132"
  4618. }, {
  4619. "label": "甘孜藏族自治州",
  4620. "value": "5133"
  4621. }, {
  4622. "label": "凉山彝族自治州",
  4623. "value": "5134"
  4624. }], [{
  4625. "label": "贵阳市",
  4626. "value": "5201"
  4627. }, {
  4628. "label": "六盘水市",
  4629. "value": "5202"
  4630. }, {
  4631. "label": "遵义市",
  4632. "value": "5203"
  4633. }, {
  4634. "label": "安顺市",
  4635. "value": "5204"
  4636. }, {
  4637. "label": "毕节市",
  4638. "value": "5205"
  4639. }, {
  4640. "label": "铜仁市",
  4641. "value": "5206"
  4642. }, {
  4643. "label": "黔西南布依族苗族自治州",
  4644. "value": "5223"
  4645. }, {
  4646. "label": "黔东南苗族侗族自治州",
  4647. "value": "5226"
  4648. }, {
  4649. "label": "黔南布依族苗族自治州",
  4650. "value": "5227"
  4651. }], [{
  4652. "label": "昆明市",
  4653. "value": "5301"
  4654. }, {
  4655. "label": "曲靖市",
  4656. "value": "5303"
  4657. }, {
  4658. "label": "玉溪市",
  4659. "value": "5304"
  4660. }, {
  4661. "label": "保山市",
  4662. "value": "5305"
  4663. }, {
  4664. "label": "昭通市",
  4665. "value": "5306"
  4666. }, {
  4667. "label": "丽江市",
  4668. "value": "5307"
  4669. }, {
  4670. "label": "普洱市",
  4671. "value": "5308"
  4672. }, {
  4673. "label": "临沧市",
  4674. "value": "5309"
  4675. }, {
  4676. "label": "楚雄彝族自治州",
  4677. "value": "5323"
  4678. }, {
  4679. "label": "红河哈尼族彝族自治州",
  4680. "value": "5325"
  4681. }, {
  4682. "label": "文山壮族苗族自治州",
  4683. "value": "5326"
  4684. }, {
  4685. "label": "西双版纳傣族自治州",
  4686. "value": "5328"
  4687. }, {
  4688. "label": "大理白族自治州",
  4689. "value": "5329"
  4690. }, {
  4691. "label": "德宏傣族景颇族自治州",
  4692. "value": "5331"
  4693. }, {
  4694. "label": "怒江傈僳族自治州",
  4695. "value": "5333"
  4696. }, {
  4697. "label": "迪庆藏族自治州",
  4698. "value": "5334"
  4699. }], [{
  4700. "label": "拉萨市",
  4701. "value": "5401"
  4702. }, {
  4703. "label": "日喀则市",
  4704. "value": "5402"
  4705. }, {
  4706. "label": "昌都市",
  4707. "value": "5403"
  4708. }, {
  4709. "label": "林芝市",
  4710. "value": "5404"
  4711. }, {
  4712. "label": "山南市",
  4713. "value": "5405"
  4714. }, {
  4715. "label": "那曲地区",
  4716. "value": "5424"
  4717. }, {
  4718. "label": "阿里地区",
  4719. "value": "5425"
  4720. }], [{
  4721. "label": "西安市",
  4722. "value": "6101"
  4723. }, {
  4724. "label": "铜川市",
  4725. "value": "6102"
  4726. }, {
  4727. "label": "宝鸡市",
  4728. "value": "6103"
  4729. }, {
  4730. "label": "咸阳市",
  4731. "value": "6104"
  4732. }, {
  4733. "label": "渭南市",
  4734. "value": "6105"
  4735. }, {
  4736. "label": "延安市",
  4737. "value": "6106"
  4738. }, {
  4739. "label": "汉中市",
  4740. "value": "6107"
  4741. }, {
  4742. "label": "榆林市",
  4743. "value": "6108"
  4744. }, {
  4745. "label": "安康市",
  4746. "value": "6109"
  4747. }, {
  4748. "label": "商洛市",
  4749. "value": "6110"
  4750. }], [{
  4751. "label": "兰州市",
  4752. "value": "6201"
  4753. }, {
  4754. "label": "嘉峪关市",
  4755. "value": "6202"
  4756. }, {
  4757. "label": "金昌市",
  4758. "value": "6203"
  4759. }, {
  4760. "label": "白银市",
  4761. "value": "6204"
  4762. }, {
  4763. "label": "天水市",
  4764. "value": "6205"
  4765. }, {
  4766. "label": "武威市",
  4767. "value": "6206"
  4768. }, {
  4769. "label": "张掖市",
  4770. "value": "6207"
  4771. }, {
  4772. "label": "平凉市",
  4773. "value": "6208"
  4774. }, {
  4775. "label": "酒泉市",
  4776. "value": "6209"
  4777. }, {
  4778. "label": "庆阳市",
  4779. "value": "6210"
  4780. }, {
  4781. "label": "定西市",
  4782. "value": "6211"
  4783. }, {
  4784. "label": "陇南市",
  4785. "value": "6212"
  4786. }, {
  4787. "label": "临夏回族自治州",
  4788. "value": "6229"
  4789. }, {
  4790. "label": "甘南藏族自治州",
  4791. "value": "6230"
  4792. }], [{
  4793. "label": "西宁市",
  4794. "value": "6301"
  4795. }, {
  4796. "label": "海东市",
  4797. "value": "6302"
  4798. }, {
  4799. "label": "海北藏族自治州",
  4800. "value": "6322"
  4801. }, {
  4802. "label": "黄南藏族自治州",
  4803. "value": "6323"
  4804. }, {
  4805. "label": "海南藏族自治州",
  4806. "value": "6325"
  4807. }, {
  4808. "label": "果洛藏族自治州",
  4809. "value": "6326"
  4810. }, {
  4811. "label": "玉树藏族自治州",
  4812. "value": "6327"
  4813. }, {
  4814. "label": "海西蒙古族藏族自治州",
  4815. "value": "6328"
  4816. }], [{
  4817. "label": "银川市",
  4818. "value": "6401"
  4819. }, {
  4820. "label": "石嘴山市",
  4821. "value": "6402"
  4822. }, {
  4823. "label": "吴忠市",
  4824. "value": "6403"
  4825. }, {
  4826. "label": "固原市",
  4827. "value": "6404"
  4828. }, {
  4829. "label": "中卫市",
  4830. "value": "6405"
  4831. }], [{
  4832. "label": "乌鲁木齐市",
  4833. "value": "6501"
  4834. }, {
  4835. "label": "克拉玛依市",
  4836. "value": "6502"
  4837. }, {
  4838. "label": "吐鲁番市",
  4839. "value": "6504"
  4840. }, {
  4841. "label": "哈密市",
  4842. "value": "6505"
  4843. }, {
  4844. "label": "昌吉回族自治州",
  4845. "value": "6523"
  4846. }, {
  4847. "label": "博尔塔拉蒙古自治州",
  4848. "value": "6527"
  4849. }, {
  4850. "label": "巴音郭楞蒙古自治州",
  4851. "value": "6528"
  4852. }, {
  4853. "label": "阿克苏地区",
  4854. "value": "6529"
  4855. }, {
  4856. "label": "克孜勒苏柯尔克孜自治州",
  4857. "value": "6530"
  4858. }, {
  4859. "label": "喀什地区",
  4860. "value": "6531"
  4861. }, {
  4862. "label": "和田地区",
  4863. "value": "6532"
  4864. }, {
  4865. "label": "伊犁哈萨克自治州",
  4866. "value": "6540"
  4867. }, {
  4868. "label": "塔城地区",
  4869. "value": "6542"
  4870. }, {
  4871. "label": "阿勒泰地区",
  4872. "value": "6543"
  4873. }, {
  4874. "label": "自治区直辖县级行政区划",
  4875. "value": "6590"
  4876. }], [{
  4877. "label": "台北",
  4878. "value": "6601"
  4879. }, {
  4880. "label": "高雄",
  4881. "value": "6602"
  4882. }, {
  4883. "label": "基隆",
  4884. "value": "6603"
  4885. }, {
  4886. "label": "台中",
  4887. "value": "6604"
  4888. }, {
  4889. "label": "台南",
  4890. "value": "6605"
  4891. }, {
  4892. "label": "新竹",
  4893. "value": "6606"
  4894. }, {
  4895. "label": "嘉义",
  4896. "value": "6607"
  4897. }, {
  4898. "label": "宜兰",
  4899. "value": "6608"
  4900. }, {
  4901. "label": "桃园",
  4902. "value": "6609"
  4903. }, {
  4904. "label": "苗栗",
  4905. "value": "6610"
  4906. }, {
  4907. "label": "彰化",
  4908. "value": "6611"
  4909. }, {
  4910. "label": "南投",
  4911. "value": "6612"
  4912. }, {
  4913. "label": "云林",
  4914. "value": "6613"
  4915. }, {
  4916. "label": "屏东",
  4917. "value": "6614"
  4918. }, {
  4919. "label": "台东",
  4920. "value": "6615"
  4921. }, {
  4922. "label": "花莲",
  4923. "value": "6616"
  4924. }, {
  4925. "label": "澎湖",
  4926. "value": "6617"
  4927. }], [{
  4928. "label": "香港岛",
  4929. "value": "6701"
  4930. }, {
  4931. "label": "九龙",
  4932. "value": "6702"
  4933. }, {
  4934. "label": "新界",
  4935. "value": "6703"
  4936. }], [{
  4937. "label": "澳门半岛",
  4938. "value": "6801"
  4939. }, {
  4940. "label": "氹仔岛",
  4941. "value": "6802"
  4942. }, {
  4943. "label": "路环岛",
  4944. "value": "6803"
  4945. }, {
  4946. "label": "路氹城",
  4947. "value": "6804"
  4948. }]];
  4949. var _default = cityData;
  4950. exports.default = _default;
  4951. /***/ }),
  4952. /***/ 1211:
  4953. /*!********************************************************!*\
  4954. !*** E:/project/bigdata_WX/uview-ui/libs/util/area.js ***!
  4955. \********************************************************/
  4956. /*! no static exports found */
  4957. /***/ (function(module, exports, __webpack_require__) {
  4958. "use strict";
  4959. Object.defineProperty(exports, "__esModule", {
  4960. value: true
  4961. });
  4962. exports.default = void 0;
  4963. var areaData = [[[{
  4964. "label": "东城区",
  4965. "value": "110101"
  4966. }, {
  4967. "label": "西城区",
  4968. "value": "110102"
  4969. }, {
  4970. "label": "朝阳区",
  4971. "value": "110105"
  4972. }, {
  4973. "label": "丰台区",
  4974. "value": "110106"
  4975. }, {
  4976. "label": "石景山区",
  4977. "value": "110107"
  4978. }, {
  4979. "label": "海淀区",
  4980. "value": "110108"
  4981. }, {
  4982. "label": "门头沟区",
  4983. "value": "110109"
  4984. }, {
  4985. "label": "房山区",
  4986. "value": "110111"
  4987. }, {
  4988. "label": "通州区",
  4989. "value": "110112"
  4990. }, {
  4991. "label": "顺义区",
  4992. "value": "110113"
  4993. }, {
  4994. "label": "昌平区",
  4995. "value": "110114"
  4996. }, {
  4997. "label": "大兴区",
  4998. "value": "110115"
  4999. }, {
  5000. "label": "怀柔区",
  5001. "value": "110116"
  5002. }, {
  5003. "label": "平谷区",
  5004. "value": "110117"
  5005. }, {
  5006. "label": "密云区",
  5007. "value": "110118"
  5008. }, {
  5009. "label": "延庆区",
  5010. "value": "110119"
  5011. }]], [[{
  5012. "label": "和平区",
  5013. "value": "120101"
  5014. }, {
  5015. "label": "河东区",
  5016. "value": "120102"
  5017. }, {
  5018. "label": "河西区",
  5019. "value": "120103"
  5020. }, {
  5021. "label": "南开区",
  5022. "value": "120104"
  5023. }, {
  5024. "label": "河北区",
  5025. "value": "120105"
  5026. }, {
  5027. "label": "红桥区",
  5028. "value": "120106"
  5029. }, {
  5030. "label": "东丽区",
  5031. "value": "120110"
  5032. }, {
  5033. "label": "西青区",
  5034. "value": "120111"
  5035. }, {
  5036. "label": "津南区",
  5037. "value": "120112"
  5038. }, {
  5039. "label": "北辰区",
  5040. "value": "120113"
  5041. }, {
  5042. "label": "武清区",
  5043. "value": "120114"
  5044. }, {
  5045. "label": "宝坻区",
  5046. "value": "120115"
  5047. }, {
  5048. "label": "滨海新区",
  5049. "value": "120116"
  5050. }, {
  5051. "label": "宁河区",
  5052. "value": "120117"
  5053. }, {
  5054. "label": "静海区",
  5055. "value": "120118"
  5056. }, {
  5057. "label": "蓟州区",
  5058. "value": "120119"
  5059. }]], [[{
  5060. "label": "长安区",
  5061. "value": "130102"
  5062. }, {
  5063. "label": "桥西区",
  5064. "value": "130104"
  5065. }, {
  5066. "label": "新华区",
  5067. "value": "130105"
  5068. }, {
  5069. "label": "井陉矿区",
  5070. "value": "130107"
  5071. }, {
  5072. "label": "裕华区",
  5073. "value": "130108"
  5074. }, {
  5075. "label": "藁城区",
  5076. "value": "130109"
  5077. }, {
  5078. "label": "鹿泉区",
  5079. "value": "130110"
  5080. }, {
  5081. "label": "栾城区",
  5082. "value": "130111"
  5083. }, {
  5084. "label": "井陉县",
  5085. "value": "130121"
  5086. }, {
  5087. "label": "正定县",
  5088. "value": "130123"
  5089. }, {
  5090. "label": "行唐县",
  5091. "value": "130125"
  5092. }, {
  5093. "label": "灵寿县",
  5094. "value": "130126"
  5095. }, {
  5096. "label": "高邑县",
  5097. "value": "130127"
  5098. }, {
  5099. "label": "深泽县",
  5100. "value": "130128"
  5101. }, {
  5102. "label": "赞皇县",
  5103. "value": "130129"
  5104. }, {
  5105. "label": "无极县",
  5106. "value": "130130"
  5107. }, {
  5108. "label": "平山县",
  5109. "value": "130131"
  5110. }, {
  5111. "label": "元氏县",
  5112. "value": "130132"
  5113. }, {
  5114. "label": "赵县",
  5115. "value": "130133"
  5116. }, {
  5117. "label": "石家庄高新技术产业开发区",
  5118. "value": "130171"
  5119. }, {
  5120. "label": "石家庄循环化工园区",
  5121. "value": "130172"
  5122. }, {
  5123. "label": "辛集市",
  5124. "value": "130181"
  5125. }, {
  5126. "label": "晋州市",
  5127. "value": "130183"
  5128. }, {
  5129. "label": "新乐市",
  5130. "value": "130184"
  5131. }], [{
  5132. "label": "路南区",
  5133. "value": "130202"
  5134. }, {
  5135. "label": "路北区",
  5136. "value": "130203"
  5137. }, {
  5138. "label": "古冶区",
  5139. "value": "130204"
  5140. }, {
  5141. "label": "开平区",
  5142. "value": "130205"
  5143. }, {
  5144. "label": "丰南区",
  5145. "value": "130207"
  5146. }, {
  5147. "label": "丰润区",
  5148. "value": "130208"
  5149. }, {
  5150. "label": "曹妃甸区",
  5151. "value": "130209"
  5152. }, {
  5153. "label": "滦县",
  5154. "value": "130223"
  5155. }, {
  5156. "label": "滦南县",
  5157. "value": "130224"
  5158. }, {
  5159. "label": "乐亭县",
  5160. "value": "130225"
  5161. }, {
  5162. "label": "迁西县",
  5163. "value": "130227"
  5164. }, {
  5165. "label": "玉田县",
  5166. "value": "130229"
  5167. }, {
  5168. "label": "唐山市芦台经济技术开发区",
  5169. "value": "130271"
  5170. }, {
  5171. "label": "唐山市汉沽管理区",
  5172. "value": "130272"
  5173. }, {
  5174. "label": "唐山高新技术产业开发区",
  5175. "value": "130273"
  5176. }, {
  5177. "label": "河北唐山海港经济开发区",
  5178. "value": "130274"
  5179. }, {
  5180. "label": "遵化市",
  5181. "value": "130281"
  5182. }, {
  5183. "label": "迁安市",
  5184. "value": "130283"
  5185. }], [{
  5186. "label": "海港区",
  5187. "value": "130302"
  5188. }, {
  5189. "label": "山海关区",
  5190. "value": "130303"
  5191. }, {
  5192. "label": "北戴河区",
  5193. "value": "130304"
  5194. }, {
  5195. "label": "抚宁区",
  5196. "value": "130306"
  5197. }, {
  5198. "label": "青龙满族自治县",
  5199. "value": "130321"
  5200. }, {
  5201. "label": "昌黎县",
  5202. "value": "130322"
  5203. }, {
  5204. "label": "卢龙县",
  5205. "value": "130324"
  5206. }, {
  5207. "label": "秦皇岛市经济技术开发区",
  5208. "value": "130371"
  5209. }, {
  5210. "label": "北戴河新区",
  5211. "value": "130372"
  5212. }], [{
  5213. "label": "邯山区",
  5214. "value": "130402"
  5215. }, {
  5216. "label": "丛台区",
  5217. "value": "130403"
  5218. }, {
  5219. "label": "复兴区",
  5220. "value": "130404"
  5221. }, {
  5222. "label": "峰峰矿区",
  5223. "value": "130406"
  5224. }, {
  5225. "label": "肥乡区",
  5226. "value": "130407"
  5227. }, {
  5228. "label": "永年区",
  5229. "value": "130408"
  5230. }, {
  5231. "label": "临漳县",
  5232. "value": "130423"
  5233. }, {
  5234. "label": "成安县",
  5235. "value": "130424"
  5236. }, {
  5237. "label": "大名县",
  5238. "value": "130425"
  5239. }, {
  5240. "label": "涉县",
  5241. "value": "130426"
  5242. }, {
  5243. "label": "磁县",
  5244. "value": "130427"
  5245. }, {
  5246. "label": "邱县",
  5247. "value": "130430"
  5248. }, {
  5249. "label": "鸡泽县",
  5250. "value": "130431"
  5251. }, {
  5252. "label": "广平县",
  5253. "value": "130432"
  5254. }, {
  5255. "label": "馆陶县",
  5256. "value": "130433"
  5257. }, {
  5258. "label": "魏县",
  5259. "value": "130434"
  5260. }, {
  5261. "label": "曲周县",
  5262. "value": "130435"
  5263. }, {
  5264. "label": "邯郸经济技术开发区",
  5265. "value": "130471"
  5266. }, {
  5267. "label": "邯郸冀南新区",
  5268. "value": "130473"
  5269. }, {
  5270. "label": "武安市",
  5271. "value": "130481"
  5272. }], [{
  5273. "label": "桥东区",
  5274. "value": "130502"
  5275. }, {
  5276. "label": "桥西区",
  5277. "value": "130503"
  5278. }, {
  5279. "label": "邢台县",
  5280. "value": "130521"
  5281. }, {
  5282. "label": "临城县",
  5283. "value": "130522"
  5284. }, {
  5285. "label": "内丘县",
  5286. "value": "130523"
  5287. }, {
  5288. "label": "柏乡县",
  5289. "value": "130524"
  5290. }, {
  5291. "label": "隆尧县",
  5292. "value": "130525"
  5293. }, {
  5294. "label": "任县",
  5295. "value": "130526"
  5296. }, {
  5297. "label": "南和县",
  5298. "value": "130527"
  5299. }, {
  5300. "label": "宁晋县",
  5301. "value": "130528"
  5302. }, {
  5303. "label": "巨鹿县",
  5304. "value": "130529"
  5305. }, {
  5306. "label": "新河县",
  5307. "value": "130530"
  5308. }, {
  5309. "label": "广宗县",
  5310. "value": "130531"
  5311. }, {
  5312. "label": "平乡县",
  5313. "value": "130532"
  5314. }, {
  5315. "label": "威县",
  5316. "value": "130533"
  5317. }, {
  5318. "label": "清河县",
  5319. "value": "130534"
  5320. }, {
  5321. "label": "临西县",
  5322. "value": "130535"
  5323. }, {
  5324. "label": "河北邢台经济开发区",
  5325. "value": "130571"
  5326. }, {
  5327. "label": "南宫市",
  5328. "value": "130581"
  5329. }, {
  5330. "label": "沙河市",
  5331. "value": "130582"
  5332. }], [{
  5333. "label": "竞秀区",
  5334. "value": "130602"
  5335. }, {
  5336. "label": "莲池区",
  5337. "value": "130606"
  5338. }, {
  5339. "label": "满城区",
  5340. "value": "130607"
  5341. }, {
  5342. "label": "清苑区",
  5343. "value": "130608"
  5344. }, {
  5345. "label": "徐水区",
  5346. "value": "130609"
  5347. }, {
  5348. "label": "涞水县",
  5349. "value": "130623"
  5350. }, {
  5351. "label": "阜平县",
  5352. "value": "130624"
  5353. }, {
  5354. "label": "定兴县",
  5355. "value": "130626"
  5356. }, {
  5357. "label": "唐县",
  5358. "value": "130627"
  5359. }, {
  5360. "label": "高阳县",
  5361. "value": "130628"
  5362. }, {
  5363. "label": "容城县",
  5364. "value": "130629"
  5365. }, {
  5366. "label": "涞源县",
  5367. "value": "130630"
  5368. }, {
  5369. "label": "望都县",
  5370. "value": "130631"
  5371. }, {
  5372. "label": "安新县",
  5373. "value": "130632"
  5374. }, {
  5375. "label": "易县",
  5376. "value": "130633"
  5377. }, {
  5378. "label": "曲阳县",
  5379. "value": "130634"
  5380. }, {
  5381. "label": "蠡县",
  5382. "value": "130635"
  5383. }, {
  5384. "label": "顺平县",
  5385. "value": "130636"
  5386. }, {
  5387. "label": "博野县",
  5388. "value": "130637"
  5389. }, {
  5390. "label": "雄县",
  5391. "value": "130638"
  5392. }, {
  5393. "label": "保定高新技术产业开发区",
  5394. "value": "130671"
  5395. }, {
  5396. "label": "保定白沟新城",
  5397. "value": "130672"
  5398. }, {
  5399. "label": "涿州市",
  5400. "value": "130681"
  5401. }, {
  5402. "label": "定州市",
  5403. "value": "130682"
  5404. }, {
  5405. "label": "安国市",
  5406. "value": "130683"
  5407. }, {
  5408. "label": "高碑店市",
  5409. "value": "130684"
  5410. }], [{
  5411. "label": "桥东区",
  5412. "value": "130702"
  5413. }, {
  5414. "label": "桥西区",
  5415. "value": "130703"
  5416. }, {
  5417. "label": "宣化区",
  5418. "value": "130705"
  5419. }, {
  5420. "label": "下花园区",
  5421. "value": "130706"
  5422. }, {
  5423. "label": "万全区",
  5424. "value": "130708"
  5425. }, {
  5426. "label": "崇礼区",
  5427. "value": "130709"
  5428. }, {
  5429. "label": "张北县",
  5430. "value": "130722"
  5431. }, {
  5432. "label": "康保县",
  5433. "value": "130723"
  5434. }, {
  5435. "label": "沽源县",
  5436. "value": "130724"
  5437. }, {
  5438. "label": "尚义县",
  5439. "value": "130725"
  5440. }, {
  5441. "label": "蔚县",
  5442. "value": "130726"
  5443. }, {
  5444. "label": "阳原县",
  5445. "value": "130727"
  5446. }, {
  5447. "label": "怀安县",
  5448. "value": "130728"
  5449. }, {
  5450. "label": "怀来县",
  5451. "value": "130730"
  5452. }, {
  5453. "label": "涿鹿县",
  5454. "value": "130731"
  5455. }, {
  5456. "label": "赤城县",
  5457. "value": "130732"
  5458. }, {
  5459. "label": "张家口市高新技术产业开发区",
  5460. "value": "130771"
  5461. }, {
  5462. "label": "张家口市察北管理区",
  5463. "value": "130772"
  5464. }, {
  5465. "label": "张家口市塞北管理区",
  5466. "value": "130773"
  5467. }], [{
  5468. "label": "双桥区",
  5469. "value": "130802"
  5470. }, {
  5471. "label": "双滦区",
  5472. "value": "130803"
  5473. }, {
  5474. "label": "鹰手营子矿区",
  5475. "value": "130804"
  5476. }, {
  5477. "label": "承德县",
  5478. "value": "130821"
  5479. }, {
  5480. "label": "兴隆县",
  5481. "value": "130822"
  5482. }, {
  5483. "label": "滦平县",
  5484. "value": "130824"
  5485. }, {
  5486. "label": "隆化县",
  5487. "value": "130825"
  5488. }, {
  5489. "label": "丰宁满族自治县",
  5490. "value": "130826"
  5491. }, {
  5492. "label": "宽城满族自治县",
  5493. "value": "130827"
  5494. }, {
  5495. "label": "围场满族蒙古族自治县",
  5496. "value": "130828"
  5497. }, {
  5498. "label": "承德高新技术产业开发区",
  5499. "value": "130871"
  5500. }, {
  5501. "label": "平泉市",
  5502. "value": "130881"
  5503. }], [{
  5504. "label": "新华区",
  5505. "value": "130902"
  5506. }, {
  5507. "label": "运河区",
  5508. "value": "130903"
  5509. }, {
  5510. "label": "沧县",
  5511. "value": "130921"
  5512. }, {
  5513. "label": "青县",
  5514. "value": "130922"
  5515. }, {
  5516. "label": "东光县",
  5517. "value": "130923"
  5518. }, {
  5519. "label": "海兴县",
  5520. "value": "130924"
  5521. }, {
  5522. "label": "盐山县",
  5523. "value": "130925"
  5524. }, {
  5525. "label": "肃宁县",
  5526. "value": "130926"
  5527. }, {
  5528. "label": "南皮县",
  5529. "value": "130927"
  5530. }, {
  5531. "label": "吴桥县",
  5532. "value": "130928"
  5533. }, {
  5534. "label": "献县",
  5535. "value": "130929"
  5536. }, {
  5537. "label": "孟村回族自治县",
  5538. "value": "130930"
  5539. }, {
  5540. "label": "河北沧州经济开发区",
  5541. "value": "130971"
  5542. }, {
  5543. "label": "沧州高新技术产业开发区",
  5544. "value": "130972"
  5545. }, {
  5546. "label": "沧州渤海新区",
  5547. "value": "130973"
  5548. }, {
  5549. "label": "泊头市",
  5550. "value": "130981"
  5551. }, {
  5552. "label": "任丘市",
  5553. "value": "130982"
  5554. }, {
  5555. "label": "黄骅市",
  5556. "value": "130983"
  5557. }, {
  5558. "label": "河间市",
  5559. "value": "130984"
  5560. }], [{
  5561. "label": "安次区",
  5562. "value": "131002"
  5563. }, {
  5564. "label": "广阳区",
  5565. "value": "131003"
  5566. }, {
  5567. "label": "固安县",
  5568. "value": "131022"
  5569. }, {
  5570. "label": "永清县",
  5571. "value": "131023"
  5572. }, {
  5573. "label": "香河县",
  5574. "value": "131024"
  5575. }, {
  5576. "label": "大城县",
  5577. "value": "131025"
  5578. }, {
  5579. "label": "文安县",
  5580. "value": "131026"
  5581. }, {
  5582. "label": "大厂回族自治县",
  5583. "value": "131028"
  5584. }, {
  5585. "label": "廊坊经济技术开发区",
  5586. "value": "131071"
  5587. }, {
  5588. "label": "霸州市",
  5589. "value": "131081"
  5590. }, {
  5591. "label": "三河市",
  5592. "value": "131082"
  5593. }], [{
  5594. "label": "桃城区",
  5595. "value": "131102"
  5596. }, {
  5597. "label": "冀州区",
  5598. "value": "131103"
  5599. }, {
  5600. "label": "枣强县",
  5601. "value": "131121"
  5602. }, {
  5603. "label": "武邑县",
  5604. "value": "131122"
  5605. }, {
  5606. "label": "武强县",
  5607. "value": "131123"
  5608. }, {
  5609. "label": "饶阳县",
  5610. "value": "131124"
  5611. }, {
  5612. "label": "安平县",
  5613. "value": "131125"
  5614. }, {
  5615. "label": "故城县",
  5616. "value": "131126"
  5617. }, {
  5618. "label": "景县",
  5619. "value": "131127"
  5620. }, {
  5621. "label": "阜城县",
  5622. "value": "131128"
  5623. }, {
  5624. "label": "河北衡水经济开发区",
  5625. "value": "131171"
  5626. }, {
  5627. "label": "衡水滨湖新区",
  5628. "value": "131172"
  5629. }, {
  5630. "label": "深州市",
  5631. "value": "131182"
  5632. }]], [[{
  5633. "label": "小店区",
  5634. "value": "140105"
  5635. }, {
  5636. "label": "迎泽区",
  5637. "value": "140106"
  5638. }, {
  5639. "label": "杏花岭区",
  5640. "value": "140107"
  5641. }, {
  5642. "label": "尖草坪区",
  5643. "value": "140108"
  5644. }, {
  5645. "label": "万柏林区",
  5646. "value": "140109"
  5647. }, {
  5648. "label": "晋源区",
  5649. "value": "140110"
  5650. }, {
  5651. "label": "清徐县",
  5652. "value": "140121"
  5653. }, {
  5654. "label": "阳曲县",
  5655. "value": "140122"
  5656. }, {
  5657. "label": "娄烦县",
  5658. "value": "140123"
  5659. }, {
  5660. "label": "山西转型综合改革示范区",
  5661. "value": "140171"
  5662. }, {
  5663. "label": "古交市",
  5664. "value": "140181"
  5665. }], [{
  5666. "label": "城区",
  5667. "value": "140202"
  5668. }, {
  5669. "label": "矿区",
  5670. "value": "140203"
  5671. }, {
  5672. "label": "南郊区",
  5673. "value": "140211"
  5674. }, {
  5675. "label": "新荣区",
  5676. "value": "140212"
  5677. }, {
  5678. "label": "阳高县",
  5679. "value": "140221"
  5680. }, {
  5681. "label": "天镇县",
  5682. "value": "140222"
  5683. }, {
  5684. "label": "广灵县",
  5685. "value": "140223"
  5686. }, {
  5687. "label": "灵丘县",
  5688. "value": "140224"
  5689. }, {
  5690. "label": "浑源县",
  5691. "value": "140225"
  5692. }, {
  5693. "label": "左云县",
  5694. "value": "140226"
  5695. }, {
  5696. "label": "大同县",
  5697. "value": "140227"
  5698. }, {
  5699. "label": "山西大同经济开发区",
  5700. "value": "140271"
  5701. }], [{
  5702. "label": "城区",
  5703. "value": "140302"
  5704. }, {
  5705. "label": "矿区",
  5706. "value": "140303"
  5707. }, {
  5708. "label": "郊区",
  5709. "value": "140311"
  5710. }, {
  5711. "label": "平定县",
  5712. "value": "140321"
  5713. }, {
  5714. "label": "盂县",
  5715. "value": "140322"
  5716. }, {
  5717. "label": "山西阳泉经济开发区",
  5718. "value": "140371"
  5719. }], [{
  5720. "label": "城区",
  5721. "value": "140402"
  5722. }, {
  5723. "label": "郊区",
  5724. "value": "140411"
  5725. }, {
  5726. "label": "长治县",
  5727. "value": "140421"
  5728. }, {
  5729. "label": "襄垣县",
  5730. "value": "140423"
  5731. }, {
  5732. "label": "屯留县",
  5733. "value": "140424"
  5734. }, {
  5735. "label": "平顺县",
  5736. "value": "140425"
  5737. }, {
  5738. "label": "黎城县",
  5739. "value": "140426"
  5740. }, {
  5741. "label": "壶关县",
  5742. "value": "140427"
  5743. }, {
  5744. "label": "长子县",
  5745. "value": "140428"
  5746. }, {
  5747. "label": "武乡县",
  5748. "value": "140429"
  5749. }, {
  5750. "label": "沁县",
  5751. "value": "140430"
  5752. }, {
  5753. "label": "沁源县",
  5754. "value": "140431"
  5755. }, {
  5756. "label": "山西长治高新技术产业园区",
  5757. "value": "140471"
  5758. }, {
  5759. "label": "潞城市",
  5760. "value": "140481"
  5761. }], [{
  5762. "label": "城区",
  5763. "value": "140502"
  5764. }, {
  5765. "label": "沁水县",
  5766. "value": "140521"
  5767. }, {
  5768. "label": "阳城县",
  5769. "value": "140522"
  5770. }, {
  5771. "label": "陵川县",
  5772. "value": "140524"
  5773. }, {
  5774. "label": "泽州县",
  5775. "value": "140525"
  5776. }, {
  5777. "label": "高平市",
  5778. "value": "140581"
  5779. }], [{
  5780. "label": "朔城区",
  5781. "value": "140602"
  5782. }, {
  5783. "label": "平鲁区",
  5784. "value": "140603"
  5785. }, {
  5786. "label": "山阴县",
  5787. "value": "140621"
  5788. }, {
  5789. "label": "应县",
  5790. "value": "140622"
  5791. }, {
  5792. "label": "右玉县",
  5793. "value": "140623"
  5794. }, {
  5795. "label": "怀仁县",
  5796. "value": "140624"
  5797. }, {
  5798. "label": "山西朔州经济开发区",
  5799. "value": "140671"
  5800. }], [{
  5801. "label": "榆次区",
  5802. "value": "140702"
  5803. }, {
  5804. "label": "榆社县",
  5805. "value": "140721"
  5806. }, {
  5807. "label": "左权县",
  5808. "value": "140722"
  5809. }, {
  5810. "label": "和顺县",
  5811. "value": "140723"
  5812. }, {
  5813. "label": "昔阳县",
  5814. "value": "140724"
  5815. }, {
  5816. "label": "寿阳县",
  5817. "value": "140725"
  5818. }, {
  5819. "label": "太谷县",
  5820. "value": "140726"
  5821. }, {
  5822. "label": "祁县",
  5823. "value": "140727"
  5824. }, {
  5825. "label": "平遥县",
  5826. "value": "140728"
  5827. }, {
  5828. "label": "灵石县",
  5829. "value": "140729"
  5830. }, {
  5831. "label": "介休市",
  5832. "value": "140781"
  5833. }], [{
  5834. "label": "盐湖区",
  5835. "value": "140802"
  5836. }, {
  5837. "label": "临猗县",
  5838. "value": "140821"
  5839. }, {
  5840. "label": "万荣县",
  5841. "value": "140822"
  5842. }, {
  5843. "label": "闻喜县",
  5844. "value": "140823"
  5845. }, {
  5846. "label": "稷山县",
  5847. "value": "140824"
  5848. }, {
  5849. "label": "新绛县",
  5850. "value": "140825"
  5851. }, {
  5852. "label": "绛县",
  5853. "value": "140826"
  5854. }, {
  5855. "label": "垣曲县",
  5856. "value": "140827"
  5857. }, {
  5858. "label": "夏县",
  5859. "value": "140828"
  5860. }, {
  5861. "label": "平陆县",
  5862. "value": "140829"
  5863. }, {
  5864. "label": "芮城县",
  5865. "value": "140830"
  5866. }, {
  5867. "label": "永济市",
  5868. "value": "140881"
  5869. }, {
  5870. "label": "河津市",
  5871. "value": "140882"
  5872. }], [{
  5873. "label": "忻府区",
  5874. "value": "140902"
  5875. }, {
  5876. "label": "定襄县",
  5877. "value": "140921"
  5878. }, {
  5879. "label": "五台县",
  5880. "value": "140922"
  5881. }, {
  5882. "label": "代县",
  5883. "value": "140923"
  5884. }, {
  5885. "label": "繁峙县",
  5886. "value": "140924"
  5887. }, {
  5888. "label": "宁武县",
  5889. "value": "140925"
  5890. }, {
  5891. "label": "静乐县",
  5892. "value": "140926"
  5893. }, {
  5894. "label": "神池县",
  5895. "value": "140927"
  5896. }, {
  5897. "label": "五寨县",
  5898. "value": "140928"
  5899. }, {
  5900. "label": "岢岚县",
  5901. "value": "140929"
  5902. }, {
  5903. "label": "河曲县",
  5904. "value": "140930"
  5905. }, {
  5906. "label": "保德县",
  5907. "value": "140931"
  5908. }, {
  5909. "label": "偏关县",
  5910. "value": "140932"
  5911. }, {
  5912. "label": "五台山风景名胜区",
  5913. "value": "140971"
  5914. }, {
  5915. "label": "原平市",
  5916. "value": "140981"
  5917. }], [{
  5918. "label": "尧都区",
  5919. "value": "141002"
  5920. }, {
  5921. "label": "曲沃县",
  5922. "value": "141021"
  5923. }, {
  5924. "label": "翼城县",
  5925. "value": "141022"
  5926. }, {
  5927. "label": "襄汾县",
  5928. "value": "141023"
  5929. }, {
  5930. "label": "洪洞县",
  5931. "value": "141024"
  5932. }, {
  5933. "label": "古县",
  5934. "value": "141025"
  5935. }, {
  5936. "label": "安泽县",
  5937. "value": "141026"
  5938. }, {
  5939. "label": "浮山县",
  5940. "value": "141027"
  5941. }, {
  5942. "label": "吉县",
  5943. "value": "141028"
  5944. }, {
  5945. "label": "乡宁县",
  5946. "value": "141029"
  5947. }, {
  5948. "label": "大宁县",
  5949. "value": "141030"
  5950. }, {
  5951. "label": "隰县",
  5952. "value": "141031"
  5953. }, {
  5954. "label": "永和县",
  5955. "value": "141032"
  5956. }, {
  5957. "label": "蒲县",
  5958. "value": "141033"
  5959. }, {
  5960. "label": "汾西县",
  5961. "value": "141034"
  5962. }, {
  5963. "label": "侯马市",
  5964. "value": "141081"
  5965. }, {
  5966. "label": "霍州市",
  5967. "value": "141082"
  5968. }], [{
  5969. "label": "离石区",
  5970. "value": "141102"
  5971. }, {
  5972. "label": "文水县",
  5973. "value": "141121"
  5974. }, {
  5975. "label": "交城县",
  5976. "value": "141122"
  5977. }, {
  5978. "label": "兴县",
  5979. "value": "141123"
  5980. }, {
  5981. "label": "临县",
  5982. "value": "141124"
  5983. }, {
  5984. "label": "柳林县",
  5985. "value": "141125"
  5986. }, {
  5987. "label": "石楼县",
  5988. "value": "141126"
  5989. }, {
  5990. "label": "岚县",
  5991. "value": "141127"
  5992. }, {
  5993. "label": "方山县",
  5994. "value": "141128"
  5995. }, {
  5996. "label": "中阳县",
  5997. "value": "141129"
  5998. }, {
  5999. "label": "交口县",
  6000. "value": "141130"
  6001. }, {
  6002. "label": "孝义市",
  6003. "value": "141181"
  6004. }, {
  6005. "label": "汾阳市",
  6006. "value": "141182"
  6007. }]], [[{
  6008. "label": "新城区",
  6009. "value": "150102"
  6010. }, {
  6011. "label": "回民区",
  6012. "value": "150103"
  6013. }, {
  6014. "label": "玉泉区",
  6015. "value": "150104"
  6016. }, {
  6017. "label": "赛罕区",
  6018. "value": "150105"
  6019. }, {
  6020. "label": "土默特左旗",
  6021. "value": "150121"
  6022. }, {
  6023. "label": "托克托县",
  6024. "value": "150122"
  6025. }, {
  6026. "label": "和林格尔县",
  6027. "value": "150123"
  6028. }, {
  6029. "label": "清水河县",
  6030. "value": "150124"
  6031. }, {
  6032. "label": "武川县",
  6033. "value": "150125"
  6034. }, {
  6035. "label": "呼和浩特金海工业园区",
  6036. "value": "150171"
  6037. }, {
  6038. "label": "呼和浩特经济技术开发区",
  6039. "value": "150172"
  6040. }], [{
  6041. "label": "东河区",
  6042. "value": "150202"
  6043. }, {
  6044. "label": "昆都仑区",
  6045. "value": "150203"
  6046. }, {
  6047. "label": "青山区",
  6048. "value": "150204"
  6049. }, {
  6050. "label": "石拐区",
  6051. "value": "150205"
  6052. }, {
  6053. "label": "白云鄂博矿区",
  6054. "value": "150206"
  6055. }, {
  6056. "label": "九原区",
  6057. "value": "150207"
  6058. }, {
  6059. "label": "土默特右旗",
  6060. "value": "150221"
  6061. }, {
  6062. "label": "固阳县",
  6063. "value": "150222"
  6064. }, {
  6065. "label": "达尔罕茂明安联合旗",
  6066. "value": "150223"
  6067. }, {
  6068. "label": "包头稀土高新技术产业开发区",
  6069. "value": "150271"
  6070. }], [{
  6071. "label": "海勃湾区",
  6072. "value": "150302"
  6073. }, {
  6074. "label": "海南区",
  6075. "value": "150303"
  6076. }, {
  6077. "label": "乌达区",
  6078. "value": "150304"
  6079. }], [{
  6080. "label": "红山区",
  6081. "value": "150402"
  6082. }, {
  6083. "label": "元宝山区",
  6084. "value": "150403"
  6085. }, {
  6086. "label": "松山区",
  6087. "value": "150404"
  6088. }, {
  6089. "label": "阿鲁科尔沁旗",
  6090. "value": "150421"
  6091. }, {
  6092. "label": "巴林左旗",
  6093. "value": "150422"
  6094. }, {
  6095. "label": "巴林右旗",
  6096. "value": "150423"
  6097. }, {
  6098. "label": "林西县",
  6099. "value": "150424"
  6100. }, {
  6101. "label": "克什克腾旗",
  6102. "value": "150425"
  6103. }, {
  6104. "label": "翁牛特旗",
  6105. "value": "150426"
  6106. }, {
  6107. "label": "喀喇沁旗",
  6108. "value": "150428"
  6109. }, {
  6110. "label": "宁城县",
  6111. "value": "150429"
  6112. }, {
  6113. "label": "敖汉旗",
  6114. "value": "150430"
  6115. }], [{
  6116. "label": "科尔沁区",
  6117. "value": "150502"
  6118. }, {
  6119. "label": "科尔沁左翼中旗",
  6120. "value": "150521"
  6121. }, {
  6122. "label": "科尔沁左翼后旗",
  6123. "value": "150522"
  6124. }, {
  6125. "label": "开鲁县",
  6126. "value": "150523"
  6127. }, {
  6128. "label": "库伦旗",
  6129. "value": "150524"
  6130. }, {
  6131. "label": "奈曼旗",
  6132. "value": "150525"
  6133. }, {
  6134. "label": "扎鲁特旗",
  6135. "value": "150526"
  6136. }, {
  6137. "label": "通辽经济技术开发区",
  6138. "value": "150571"
  6139. }, {
  6140. "label": "霍林郭勒市",
  6141. "value": "150581"
  6142. }], [{
  6143. "label": "东胜区",
  6144. "value": "150602"
  6145. }, {
  6146. "label": "康巴什区",
  6147. "value": "150603"
  6148. }, {
  6149. "label": "达拉特旗",
  6150. "value": "150621"
  6151. }, {
  6152. "label": "准格尔旗",
  6153. "value": "150622"
  6154. }, {
  6155. "label": "鄂托克前旗",
  6156. "value": "150623"
  6157. }, {
  6158. "label": "鄂托克旗",
  6159. "value": "150624"
  6160. }, {
  6161. "label": "杭锦旗",
  6162. "value": "150625"
  6163. }, {
  6164. "label": "乌审旗",
  6165. "value": "150626"
  6166. }, {
  6167. "label": "伊金霍洛旗",
  6168. "value": "150627"
  6169. }], [{
  6170. "label": "海拉尔区",
  6171. "value": "150702"
  6172. }, {
  6173. "label": "扎赉诺尔区",
  6174. "value": "150703"
  6175. }, {
  6176. "label": "阿荣旗",
  6177. "value": "150721"
  6178. }, {
  6179. "label": "莫力达瓦达斡尔族自治旗",
  6180. "value": "150722"
  6181. }, {
  6182. "label": "鄂伦春自治旗",
  6183. "value": "150723"
  6184. }, {
  6185. "label": "鄂温克族自治旗",
  6186. "value": "150724"
  6187. }, {
  6188. "label": "陈巴尔虎旗",
  6189. "value": "150725"
  6190. }, {
  6191. "label": "新巴尔虎左旗",
  6192. "value": "150726"
  6193. }, {
  6194. "label": "新巴尔虎右旗",
  6195. "value": "150727"
  6196. }, {
  6197. "label": "满洲里市",
  6198. "value": "150781"
  6199. }, {
  6200. "label": "牙克石市",
  6201. "value": "150782"
  6202. }, {
  6203. "label": "扎兰屯市",
  6204. "value": "150783"
  6205. }, {
  6206. "label": "额尔古纳市",
  6207. "value": "150784"
  6208. }, {
  6209. "label": "根河市",
  6210. "value": "150785"
  6211. }], [{
  6212. "label": "临河区",
  6213. "value": "150802"
  6214. }, {
  6215. "label": "五原县",
  6216. "value": "150821"
  6217. }, {
  6218. "label": "磴口县",
  6219. "value": "150822"
  6220. }, {
  6221. "label": "乌拉特前旗",
  6222. "value": "150823"
  6223. }, {
  6224. "label": "乌拉特中旗",
  6225. "value": "150824"
  6226. }, {
  6227. "label": "乌拉特后旗",
  6228. "value": "150825"
  6229. }, {
  6230. "label": "杭锦后旗",
  6231. "value": "150826"
  6232. }], [{
  6233. "label": "集宁区",
  6234. "value": "150902"
  6235. }, {
  6236. "label": "卓资县",
  6237. "value": "150921"
  6238. }, {
  6239. "label": "化德县",
  6240. "value": "150922"
  6241. }, {
  6242. "label": "商都县",
  6243. "value": "150923"
  6244. }, {
  6245. "label": "兴和县",
  6246. "value": "150924"
  6247. }, {
  6248. "label": "凉城县",
  6249. "value": "150925"
  6250. }, {
  6251. "label": "察哈尔右翼前旗",
  6252. "value": "150926"
  6253. }, {
  6254. "label": "察哈尔右翼中旗",
  6255. "value": "150927"
  6256. }, {
  6257. "label": "察哈尔右翼后旗",
  6258. "value": "150928"
  6259. }, {
  6260. "label": "四子王旗",
  6261. "value": "150929"
  6262. }, {
  6263. "label": "丰镇市",
  6264. "value": "150981"
  6265. }], [{
  6266. "label": "乌兰浩特市",
  6267. "value": "152201"
  6268. }, {
  6269. "label": "阿尔山市",
  6270. "value": "152202"
  6271. }, {
  6272. "label": "科尔沁右翼前旗",
  6273. "value": "152221"
  6274. }, {
  6275. "label": "科尔沁右翼中旗",
  6276. "value": "152222"
  6277. }, {
  6278. "label": "扎赉特旗",
  6279. "value": "152223"
  6280. }, {
  6281. "label": "突泉县",
  6282. "value": "152224"
  6283. }], [{
  6284. "label": "二连浩特市",
  6285. "value": "152501"
  6286. }, {
  6287. "label": "锡林浩特市",
  6288. "value": "152502"
  6289. }, {
  6290. "label": "阿巴嘎旗",
  6291. "value": "152522"
  6292. }, {
  6293. "label": "苏尼特左旗",
  6294. "value": "152523"
  6295. }, {
  6296. "label": "苏尼特右旗",
  6297. "value": "152524"
  6298. }, {
  6299. "label": "东乌珠穆沁旗",
  6300. "value": "152525"
  6301. }, {
  6302. "label": "西乌珠穆沁旗",
  6303. "value": "152526"
  6304. }, {
  6305. "label": "太仆寺旗",
  6306. "value": "152527"
  6307. }, {
  6308. "label": "镶黄旗",
  6309. "value": "152528"
  6310. }, {
  6311. "label": "正镶白旗",
  6312. "value": "152529"
  6313. }, {
  6314. "label": "正蓝旗",
  6315. "value": "152530"
  6316. }, {
  6317. "label": "多伦县",
  6318. "value": "152531"
  6319. }, {
  6320. "label": "乌拉盖管委会",
  6321. "value": "152571"
  6322. }], [{
  6323. "label": "阿拉善左旗",
  6324. "value": "152921"
  6325. }, {
  6326. "label": "阿拉善右旗",
  6327. "value": "152922"
  6328. }, {
  6329. "label": "额济纳旗",
  6330. "value": "152923"
  6331. }, {
  6332. "label": "内蒙古阿拉善经济开发区",
  6333. "value": "152971"
  6334. }]], [[{
  6335. "label": "和平区",
  6336. "value": "210102"
  6337. }, {
  6338. "label": "沈河区",
  6339. "value": "210103"
  6340. }, {
  6341. "label": "大东区",
  6342. "value": "210104"
  6343. }, {
  6344. "label": "皇姑区",
  6345. "value": "210105"
  6346. }, {
  6347. "label": "铁西区",
  6348. "value": "210106"
  6349. }, {
  6350. "label": "苏家屯区",
  6351. "value": "210111"
  6352. }, {
  6353. "label": "浑南区",
  6354. "value": "210112"
  6355. }, {
  6356. "label": "沈北新区",
  6357. "value": "210113"
  6358. }, {
  6359. "label": "于洪区",
  6360. "value": "210114"
  6361. }, {
  6362. "label": "辽中区",
  6363. "value": "210115"
  6364. }, {
  6365. "label": "康平县",
  6366. "value": "210123"
  6367. }, {
  6368. "label": "法库县",
  6369. "value": "210124"
  6370. }, {
  6371. "label": "新民市",
  6372. "value": "210181"
  6373. }], [{
  6374. "label": "中山区",
  6375. "value": "210202"
  6376. }, {
  6377. "label": "西岗区",
  6378. "value": "210203"
  6379. }, {
  6380. "label": "沙河口区",
  6381. "value": "210204"
  6382. }, {
  6383. "label": "甘井子区",
  6384. "value": "210211"
  6385. }, {
  6386. "label": "旅顺口区",
  6387. "value": "210212"
  6388. }, {
  6389. "label": "金州区",
  6390. "value": "210213"
  6391. }, {
  6392. "label": "普兰店区",
  6393. "value": "210214"
  6394. }, {
  6395. "label": "长海县",
  6396. "value": "210224"
  6397. }, {
  6398. "label": "瓦房店市",
  6399. "value": "210281"
  6400. }, {
  6401. "label": "庄河市",
  6402. "value": "210283"
  6403. }], [{
  6404. "label": "铁东区",
  6405. "value": "210302"
  6406. }, {
  6407. "label": "铁西区",
  6408. "value": "210303"
  6409. }, {
  6410. "label": "立山区",
  6411. "value": "210304"
  6412. }, {
  6413. "label": "千山区",
  6414. "value": "210311"
  6415. }, {
  6416. "label": "台安县",
  6417. "value": "210321"
  6418. }, {
  6419. "label": "岫岩满族自治县",
  6420. "value": "210323"
  6421. }, {
  6422. "label": "海城市",
  6423. "value": "210381"
  6424. }], [{
  6425. "label": "新抚区",
  6426. "value": "210402"
  6427. }, {
  6428. "label": "东洲区",
  6429. "value": "210403"
  6430. }, {
  6431. "label": "望花区",
  6432. "value": "210404"
  6433. }, {
  6434. "label": "顺城区",
  6435. "value": "210411"
  6436. }, {
  6437. "label": "抚顺县",
  6438. "value": "210421"
  6439. }, {
  6440. "label": "新宾满族自治县",
  6441. "value": "210422"
  6442. }, {
  6443. "label": "清原满族自治县",
  6444. "value": "210423"
  6445. }], [{
  6446. "label": "平山区",
  6447. "value": "210502"
  6448. }, {
  6449. "label": "溪湖区",
  6450. "value": "210503"
  6451. }, {
  6452. "label": "明山区",
  6453. "value": "210504"
  6454. }, {
  6455. "label": "南芬区",
  6456. "value": "210505"
  6457. }, {
  6458. "label": "本溪满族自治县",
  6459. "value": "210521"
  6460. }, {
  6461. "label": "桓仁满族自治县",
  6462. "value": "210522"
  6463. }], [{
  6464. "label": "元宝区",
  6465. "value": "210602"
  6466. }, {
  6467. "label": "振兴区",
  6468. "value": "210603"
  6469. }, {
  6470. "label": "振安区",
  6471. "value": "210604"
  6472. }, {
  6473. "label": "宽甸满族自治县",
  6474. "value": "210624"
  6475. }, {
  6476. "label": "东港市",
  6477. "value": "210681"
  6478. }, {
  6479. "label": "凤城市",
  6480. "value": "210682"
  6481. }], [{
  6482. "label": "古塔区",
  6483. "value": "210702"
  6484. }, {
  6485. "label": "凌河区",
  6486. "value": "210703"
  6487. }, {
  6488. "label": "太和区",
  6489. "value": "210711"
  6490. }, {
  6491. "label": "黑山县",
  6492. "value": "210726"
  6493. }, {
  6494. "label": "义县",
  6495. "value": "210727"
  6496. }, {
  6497. "label": "凌海市",
  6498. "value": "210781"
  6499. }, {
  6500. "label": "北镇市",
  6501. "value": "210782"
  6502. }], [{
  6503. "label": "站前区",
  6504. "value": "210802"
  6505. }, {
  6506. "label": "西市区",
  6507. "value": "210803"
  6508. }, {
  6509. "label": "鲅鱼圈区",
  6510. "value": "210804"
  6511. }, {
  6512. "label": "老边区",
  6513. "value": "210811"
  6514. }, {
  6515. "label": "盖州市",
  6516. "value": "210881"
  6517. }, {
  6518. "label": "大石桥市",
  6519. "value": "210882"
  6520. }], [{
  6521. "label": "海州区",
  6522. "value": "210902"
  6523. }, {
  6524. "label": "新邱区",
  6525. "value": "210903"
  6526. }, {
  6527. "label": "太平区",
  6528. "value": "210904"
  6529. }, {
  6530. "label": "清河门区",
  6531. "value": "210905"
  6532. }, {
  6533. "label": "细河区",
  6534. "value": "210911"
  6535. }, {
  6536. "label": "阜新蒙古族自治县",
  6537. "value": "210921"
  6538. }, {
  6539. "label": "彰武县",
  6540. "value": "210922"
  6541. }], [{
  6542. "label": "白塔区",
  6543. "value": "211002"
  6544. }, {
  6545. "label": "文圣区",
  6546. "value": "211003"
  6547. }, {
  6548. "label": "宏伟区",
  6549. "value": "211004"
  6550. }, {
  6551. "label": "弓长岭区",
  6552. "value": "211005"
  6553. }, {
  6554. "label": "太子河区",
  6555. "value": "211011"
  6556. }, {
  6557. "label": "辽阳县",
  6558. "value": "211021"
  6559. }, {
  6560. "label": "灯塔市",
  6561. "value": "211081"
  6562. }], [{
  6563. "label": "双台子区",
  6564. "value": "211102"
  6565. }, {
  6566. "label": "兴隆台区",
  6567. "value": "211103"
  6568. }, {
  6569. "label": "大洼区",
  6570. "value": "211104"
  6571. }, {
  6572. "label": "盘山县",
  6573. "value": "211122"
  6574. }], [{
  6575. "label": "银州区",
  6576. "value": "211202"
  6577. }, {
  6578. "label": "清河区",
  6579. "value": "211204"
  6580. }, {
  6581. "label": "铁岭县",
  6582. "value": "211221"
  6583. }, {
  6584. "label": "西丰县",
  6585. "value": "211223"
  6586. }, {
  6587. "label": "昌图县",
  6588. "value": "211224"
  6589. }, {
  6590. "label": "调兵山市",
  6591. "value": "211281"
  6592. }, {
  6593. "label": "开原市",
  6594. "value": "211282"
  6595. }], [{
  6596. "label": "双塔区",
  6597. "value": "211302"
  6598. }, {
  6599. "label": "龙城区",
  6600. "value": "211303"
  6601. }, {
  6602. "label": "朝阳县",
  6603. "value": "211321"
  6604. }, {
  6605. "label": "建平县",
  6606. "value": "211322"
  6607. }, {
  6608. "label": "喀喇沁左翼蒙古族自治县",
  6609. "value": "211324"
  6610. }, {
  6611. "label": "北票市",
  6612. "value": "211381"
  6613. }, {
  6614. "label": "凌源市",
  6615. "value": "211382"
  6616. }], [{
  6617. "label": "连山区",
  6618. "value": "211402"
  6619. }, {
  6620. "label": "龙港区",
  6621. "value": "211403"
  6622. }, {
  6623. "label": "南票区",
  6624. "value": "211404"
  6625. }, {
  6626. "label": "绥中县",
  6627. "value": "211421"
  6628. }, {
  6629. "label": "建昌县",
  6630. "value": "211422"
  6631. }, {
  6632. "label": "兴城市",
  6633. "value": "211481"
  6634. }]], [[{
  6635. "label": "南关区",
  6636. "value": "220102"
  6637. }, {
  6638. "label": "宽城区",
  6639. "value": "220103"
  6640. }, {
  6641. "label": "朝阳区",
  6642. "value": "220104"
  6643. }, {
  6644. "label": "二道区",
  6645. "value": "220105"
  6646. }, {
  6647. "label": "绿园区",
  6648. "value": "220106"
  6649. }, {
  6650. "label": "双阳区",
  6651. "value": "220112"
  6652. }, {
  6653. "label": "九台区",
  6654. "value": "220113"
  6655. }, {
  6656. "label": "农安县",
  6657. "value": "220122"
  6658. }, {
  6659. "label": "长春经济技术开发区",
  6660. "value": "220171"
  6661. }, {
  6662. "label": "长春净月高新技术产业开发区",
  6663. "value": "220172"
  6664. }, {
  6665. "label": "长春高新技术产业开发区",
  6666. "value": "220173"
  6667. }, {
  6668. "label": "长春汽车经济技术开发区",
  6669. "value": "220174"
  6670. }, {
  6671. "label": "榆树市",
  6672. "value": "220182"
  6673. }, {
  6674. "label": "德惠市",
  6675. "value": "220183"
  6676. }], [{
  6677. "label": "昌邑区",
  6678. "value": "220202"
  6679. }, {
  6680. "label": "龙潭区",
  6681. "value": "220203"
  6682. }, {
  6683. "label": "船营区",
  6684. "value": "220204"
  6685. }, {
  6686. "label": "丰满区",
  6687. "value": "220211"
  6688. }, {
  6689. "label": "永吉县",
  6690. "value": "220221"
  6691. }, {
  6692. "label": "吉林经济开发区",
  6693. "value": "220271"
  6694. }, {
  6695. "label": "吉林高新技术产业开发区",
  6696. "value": "220272"
  6697. }, {
  6698. "label": "吉林中国新加坡食品区",
  6699. "value": "220273"
  6700. }, {
  6701. "label": "蛟河市",
  6702. "value": "220281"
  6703. }, {
  6704. "label": "桦甸市",
  6705. "value": "220282"
  6706. }, {
  6707. "label": "舒兰市",
  6708. "value": "220283"
  6709. }, {
  6710. "label": "磐石市",
  6711. "value": "220284"
  6712. }], [{
  6713. "label": "铁西区",
  6714. "value": "220302"
  6715. }, {
  6716. "label": "铁东区",
  6717. "value": "220303"
  6718. }, {
  6719. "label": "梨树县",
  6720. "value": "220322"
  6721. }, {
  6722. "label": "伊通满族自治县",
  6723. "value": "220323"
  6724. }, {
  6725. "label": "公主岭市",
  6726. "value": "220381"
  6727. }, {
  6728. "label": "双辽市",
  6729. "value": "220382"
  6730. }], [{
  6731. "label": "龙山区",
  6732. "value": "220402"
  6733. }, {
  6734. "label": "西安区",
  6735. "value": "220403"
  6736. }, {
  6737. "label": "东丰县",
  6738. "value": "220421"
  6739. }, {
  6740. "label": "东辽县",
  6741. "value": "220422"
  6742. }], [{
  6743. "label": "东昌区",
  6744. "value": "220502"
  6745. }, {
  6746. "label": "二道江区",
  6747. "value": "220503"
  6748. }, {
  6749. "label": "通化县",
  6750. "value": "220521"
  6751. }, {
  6752. "label": "辉南县",
  6753. "value": "220523"
  6754. }, {
  6755. "label": "柳河县",
  6756. "value": "220524"
  6757. }, {
  6758. "label": "梅河口市",
  6759. "value": "220581"
  6760. }, {
  6761. "label": "集安市",
  6762. "value": "220582"
  6763. }], [{
  6764. "label": "浑江区",
  6765. "value": "220602"
  6766. }, {
  6767. "label": "江源区",
  6768. "value": "220605"
  6769. }, {
  6770. "label": "抚松县",
  6771. "value": "220621"
  6772. }, {
  6773. "label": "靖宇县",
  6774. "value": "220622"
  6775. }, {
  6776. "label": "长白朝鲜族自治县",
  6777. "value": "220623"
  6778. }, {
  6779. "label": "临江市",
  6780. "value": "220681"
  6781. }], [{
  6782. "label": "宁江区",
  6783. "value": "220702"
  6784. }, {
  6785. "label": "前郭尔罗斯蒙古族自治县",
  6786. "value": "220721"
  6787. }, {
  6788. "label": "长岭县",
  6789. "value": "220722"
  6790. }, {
  6791. "label": "乾安县",
  6792. "value": "220723"
  6793. }, {
  6794. "label": "吉林松原经济开发区",
  6795. "value": "220771"
  6796. }, {
  6797. "label": "扶余市",
  6798. "value": "220781"
  6799. }], [{
  6800. "label": "洮北区",
  6801. "value": "220802"
  6802. }, {
  6803. "label": "镇赉县",
  6804. "value": "220821"
  6805. }, {
  6806. "label": "通榆县",
  6807. "value": "220822"
  6808. }, {
  6809. "label": "吉林白城经济开发区",
  6810. "value": "220871"
  6811. }, {
  6812. "label": "洮南市",
  6813. "value": "220881"
  6814. }, {
  6815. "label": "大安市",
  6816. "value": "220882"
  6817. }], [{
  6818. "label": "延吉市",
  6819. "value": "222401"
  6820. }, {
  6821. "label": "图们市",
  6822. "value": "222402"
  6823. }, {
  6824. "label": "敦化市",
  6825. "value": "222403"
  6826. }, {
  6827. "label": "珲春市",
  6828. "value": "222404"
  6829. }, {
  6830. "label": "龙井市",
  6831. "value": "222405"
  6832. }, {
  6833. "label": "和龙市",
  6834. "value": "222406"
  6835. }, {
  6836. "label": "汪清县",
  6837. "value": "222424"
  6838. }, {
  6839. "label": "安图县",
  6840. "value": "222426"
  6841. }]], [[{
  6842. "label": "道里区",
  6843. "value": "230102"
  6844. }, {
  6845. "label": "南岗区",
  6846. "value": "230103"
  6847. }, {
  6848. "label": "道外区",
  6849. "value": "230104"
  6850. }, {
  6851. "label": "平房区",
  6852. "value": "230108"
  6853. }, {
  6854. "label": "松北区",
  6855. "value": "230109"
  6856. }, {
  6857. "label": "香坊区",
  6858. "value": "230110"
  6859. }, {
  6860. "label": "呼兰区",
  6861. "value": "230111"
  6862. }, {
  6863. "label": "阿城区",
  6864. "value": "230112"
  6865. }, {
  6866. "label": "双城区",
  6867. "value": "230113"
  6868. }, {
  6869. "label": "依兰县",
  6870. "value": "230123"
  6871. }, {
  6872. "label": "方正县",
  6873. "value": "230124"
  6874. }, {
  6875. "label": "宾县",
  6876. "value": "230125"
  6877. }, {
  6878. "label": "巴彦县",
  6879. "value": "230126"
  6880. }, {
  6881. "label": "木兰县",
  6882. "value": "230127"
  6883. }, {
  6884. "label": "通河县",
  6885. "value": "230128"
  6886. }, {
  6887. "label": "延寿县",
  6888. "value": "230129"
  6889. }, {
  6890. "label": "尚志市",
  6891. "value": "230183"
  6892. }, {
  6893. "label": "五常市",
  6894. "value": "230184"
  6895. }], [{
  6896. "label": "龙沙区",
  6897. "value": "230202"
  6898. }, {
  6899. "label": "建华区",
  6900. "value": "230203"
  6901. }, {
  6902. "label": "铁锋区",
  6903. "value": "230204"
  6904. }, {
  6905. "label": "昂昂溪区",
  6906. "value": "230205"
  6907. }, {
  6908. "label": "富拉尔基区",
  6909. "value": "230206"
  6910. }, {
  6911. "label": "碾子山区",
  6912. "value": "230207"
  6913. }, {
  6914. "label": "梅里斯达斡尔族区",
  6915. "value": "230208"
  6916. }, {
  6917. "label": "龙江县",
  6918. "value": "230221"
  6919. }, {
  6920. "label": "依安县",
  6921. "value": "230223"
  6922. }, {
  6923. "label": "泰来县",
  6924. "value": "230224"
  6925. }, {
  6926. "label": "甘南县",
  6927. "value": "230225"
  6928. }, {
  6929. "label": "富裕县",
  6930. "value": "230227"
  6931. }, {
  6932. "label": "克山县",
  6933. "value": "230229"
  6934. }, {
  6935. "label": "克东县",
  6936. "value": "230230"
  6937. }, {
  6938. "label": "拜泉县",
  6939. "value": "230231"
  6940. }, {
  6941. "label": "讷河市",
  6942. "value": "230281"
  6943. }], [{
  6944. "label": "鸡冠区",
  6945. "value": "230302"
  6946. }, {
  6947. "label": "恒山区",
  6948. "value": "230303"
  6949. }, {
  6950. "label": "滴道区",
  6951. "value": "230304"
  6952. }, {
  6953. "label": "梨树区",
  6954. "value": "230305"
  6955. }, {
  6956. "label": "城子河区",
  6957. "value": "230306"
  6958. }, {
  6959. "label": "麻山区",
  6960. "value": "230307"
  6961. }, {
  6962. "label": "鸡东县",
  6963. "value": "230321"
  6964. }, {
  6965. "label": "虎林市",
  6966. "value": "230381"
  6967. }, {
  6968. "label": "密山市",
  6969. "value": "230382"
  6970. }], [{
  6971. "label": "向阳区",
  6972. "value": "230402"
  6973. }, {
  6974. "label": "工农区",
  6975. "value": "230403"
  6976. }, {
  6977. "label": "南山区",
  6978. "value": "230404"
  6979. }, {
  6980. "label": "兴安区",
  6981. "value": "230405"
  6982. }, {
  6983. "label": "东山区",
  6984. "value": "230406"
  6985. }, {
  6986. "label": "兴山区",
  6987. "value": "230407"
  6988. }, {
  6989. "label": "萝北县",
  6990. "value": "230421"
  6991. }, {
  6992. "label": "绥滨县",
  6993. "value": "230422"
  6994. }], [{
  6995. "label": "尖山区",
  6996. "value": "230502"
  6997. }, {
  6998. "label": "岭东区",
  6999. "value": "230503"
  7000. }, {
  7001. "label": "四方台区",
  7002. "value": "230505"
  7003. }, {
  7004. "label": "宝山区",
  7005. "value": "230506"
  7006. }, {
  7007. "label": "集贤县",
  7008. "value": "230521"
  7009. }, {
  7010. "label": "友谊县",
  7011. "value": "230522"
  7012. }, {
  7013. "label": "宝清县",
  7014. "value": "230523"
  7015. }, {
  7016. "label": "饶河县",
  7017. "value": "230524"
  7018. }], [{
  7019. "label": "萨尔图区",
  7020. "value": "230602"
  7021. }, {
  7022. "label": "龙凤区",
  7023. "value": "230603"
  7024. }, {
  7025. "label": "让胡路区",
  7026. "value": "230604"
  7027. }, {
  7028. "label": "红岗区",
  7029. "value": "230605"
  7030. }, {
  7031. "label": "大同区",
  7032. "value": "230606"
  7033. }, {
  7034. "label": "肇州县",
  7035. "value": "230621"
  7036. }, {
  7037. "label": "肇源县",
  7038. "value": "230622"
  7039. }, {
  7040. "label": "林甸县",
  7041. "value": "230623"
  7042. }, {
  7043. "label": "杜尔伯特蒙古族自治县",
  7044. "value": "230624"
  7045. }, {
  7046. "label": "大庆高新技术产业开发区",
  7047. "value": "230671"
  7048. }], [{
  7049. "label": "伊春区",
  7050. "value": "230702"
  7051. }, {
  7052. "label": "南岔区",
  7053. "value": "230703"
  7054. }, {
  7055. "label": "友好区",
  7056. "value": "230704"
  7057. }, {
  7058. "label": "西林区",
  7059. "value": "230705"
  7060. }, {
  7061. "label": "翠峦区",
  7062. "value": "230706"
  7063. }, {
  7064. "label": "新青区",
  7065. "value": "230707"
  7066. }, {
  7067. "label": "美溪区",
  7068. "value": "230708"
  7069. }, {
  7070. "label": "金山屯区",
  7071. "value": "230709"
  7072. }, {
  7073. "label": "五营区",
  7074. "value": "230710"
  7075. }, {
  7076. "label": "乌马河区",
  7077. "value": "230711"
  7078. }, {
  7079. "label": "汤旺河区",
  7080. "value": "230712"
  7081. }, {
  7082. "label": "带岭区",
  7083. "value": "230713"
  7084. }, {
  7085. "label": "乌伊岭区",
  7086. "value": "230714"
  7087. }, {
  7088. "label": "红星区",
  7089. "value": "230715"
  7090. }, {
  7091. "label": "上甘岭区",
  7092. "value": "230716"
  7093. }, {
  7094. "label": "嘉荫县",
  7095. "value": "230722"
  7096. }, {
  7097. "label": "铁力市",
  7098. "value": "230781"
  7099. }], [{
  7100. "label": "向阳区",
  7101. "value": "230803"
  7102. }, {
  7103. "label": "前进区",
  7104. "value": "230804"
  7105. }, {
  7106. "label": "东风区",
  7107. "value": "230805"
  7108. }, {
  7109. "label": "郊区",
  7110. "value": "230811"
  7111. }, {
  7112. "label": "桦南县",
  7113. "value": "230822"
  7114. }, {
  7115. "label": "桦川县",
  7116. "value": "230826"
  7117. }, {
  7118. "label": "汤原县",
  7119. "value": "230828"
  7120. }, {
  7121. "label": "同江市",
  7122. "value": "230881"
  7123. }, {
  7124. "label": "富锦市",
  7125. "value": "230882"
  7126. }, {
  7127. "label": "抚远市",
  7128. "value": "230883"
  7129. }], [{
  7130. "label": "新兴区",
  7131. "value": "230902"
  7132. }, {
  7133. "label": "桃山区",
  7134. "value": "230903"
  7135. }, {
  7136. "label": "茄子河区",
  7137. "value": "230904"
  7138. }, {
  7139. "label": "勃利县",
  7140. "value": "230921"
  7141. }], [{
  7142. "label": "东安区",
  7143. "value": "231002"
  7144. }, {
  7145. "label": "阳明区",
  7146. "value": "231003"
  7147. }, {
  7148. "label": "爱民区",
  7149. "value": "231004"
  7150. }, {
  7151. "label": "西安区",
  7152. "value": "231005"
  7153. }, {
  7154. "label": "林口县",
  7155. "value": "231025"
  7156. }, {
  7157. "label": "牡丹江经济技术开发区",
  7158. "value": "231071"
  7159. }, {
  7160. "label": "绥芬河市",
  7161. "value": "231081"
  7162. }, {
  7163. "label": "海林市",
  7164. "value": "231083"
  7165. }, {
  7166. "label": "宁安市",
  7167. "value": "231084"
  7168. }, {
  7169. "label": "穆棱市",
  7170. "value": "231085"
  7171. }, {
  7172. "label": "东宁市",
  7173. "value": "231086"
  7174. }], [{
  7175. "label": "爱辉区",
  7176. "value": "231102"
  7177. }, {
  7178. "label": "嫩江县",
  7179. "value": "231121"
  7180. }, {
  7181. "label": "逊克县",
  7182. "value": "231123"
  7183. }, {
  7184. "label": "孙吴县",
  7185. "value": "231124"
  7186. }, {
  7187. "label": "北安市",
  7188. "value": "231181"
  7189. }, {
  7190. "label": "五大连池市",
  7191. "value": "231182"
  7192. }], [{
  7193. "label": "北林区",
  7194. "value": "231202"
  7195. }, {
  7196. "label": "望奎县",
  7197. "value": "231221"
  7198. }, {
  7199. "label": "兰西县",
  7200. "value": "231222"
  7201. }, {
  7202. "label": "青冈县",
  7203. "value": "231223"
  7204. }, {
  7205. "label": "庆安县",
  7206. "value": "231224"
  7207. }, {
  7208. "label": "明水县",
  7209. "value": "231225"
  7210. }, {
  7211. "label": "绥棱县",
  7212. "value": "231226"
  7213. }, {
  7214. "label": "安达市",
  7215. "value": "231281"
  7216. }, {
  7217. "label": "肇东市",
  7218. "value": "231282"
  7219. }, {
  7220. "label": "海伦市",
  7221. "value": "231283"
  7222. }], [{
  7223. "label": "加格达奇区",
  7224. "value": "232701"
  7225. }, {
  7226. "label": "松岭区",
  7227. "value": "232702"
  7228. }, {
  7229. "label": "新林区",
  7230. "value": "232703"
  7231. }, {
  7232. "label": "呼中区",
  7233. "value": "232704"
  7234. }, {
  7235. "label": "呼玛县",
  7236. "value": "232721"
  7237. }, {
  7238. "label": "塔河县",
  7239. "value": "232722"
  7240. }, {
  7241. "label": "漠河县",
  7242. "value": "232723"
  7243. }]], [[{
  7244. "label": "黄浦区",
  7245. "value": "310101"
  7246. }, {
  7247. "label": "徐汇区",
  7248. "value": "310104"
  7249. }, {
  7250. "label": "长宁区",
  7251. "value": "310105"
  7252. }, {
  7253. "label": "静安区",
  7254. "value": "310106"
  7255. }, {
  7256. "label": "普陀区",
  7257. "value": "310107"
  7258. }, {
  7259. "label": "虹口区",
  7260. "value": "310109"
  7261. }, {
  7262. "label": "杨浦区",
  7263. "value": "310110"
  7264. }, {
  7265. "label": "闵行区",
  7266. "value": "310112"
  7267. }, {
  7268. "label": "宝山区",
  7269. "value": "310113"
  7270. }, {
  7271. "label": "嘉定区",
  7272. "value": "310114"
  7273. }, {
  7274. "label": "浦东新区",
  7275. "value": "310115"
  7276. }, {
  7277. "label": "金山区",
  7278. "value": "310116"
  7279. }, {
  7280. "label": "松江区",
  7281. "value": "310117"
  7282. }, {
  7283. "label": "青浦区",
  7284. "value": "310118"
  7285. }, {
  7286. "label": "奉贤区",
  7287. "value": "310120"
  7288. }, {
  7289. "label": "崇明区",
  7290. "value": "310151"
  7291. }]], [[{
  7292. "label": "玄武区",
  7293. "value": "320102"
  7294. }, {
  7295. "label": "秦淮区",
  7296. "value": "320104"
  7297. }, {
  7298. "label": "建邺区",
  7299. "value": "320105"
  7300. }, {
  7301. "label": "鼓楼区",
  7302. "value": "320106"
  7303. }, {
  7304. "label": "浦口区",
  7305. "value": "320111"
  7306. }, {
  7307. "label": "栖霞区",
  7308. "value": "320113"
  7309. }, {
  7310. "label": "雨花台区",
  7311. "value": "320114"
  7312. }, {
  7313. "label": "江宁区",
  7314. "value": "320115"
  7315. }, {
  7316. "label": "六合区",
  7317. "value": "320116"
  7318. }, {
  7319. "label": "溧水区",
  7320. "value": "320117"
  7321. }, {
  7322. "label": "高淳区",
  7323. "value": "320118"
  7324. }], [{
  7325. "label": "锡山区",
  7326. "value": "320205"
  7327. }, {
  7328. "label": "惠山区",
  7329. "value": "320206"
  7330. }, {
  7331. "label": "滨湖区",
  7332. "value": "320211"
  7333. }, {
  7334. "label": "梁溪区",
  7335. "value": "320213"
  7336. }, {
  7337. "label": "新吴区",
  7338. "value": "320214"
  7339. }, {
  7340. "label": "江阴市",
  7341. "value": "320281"
  7342. }, {
  7343. "label": "宜兴市",
  7344. "value": "320282"
  7345. }], [{
  7346. "label": "鼓楼区",
  7347. "value": "320302"
  7348. }, {
  7349. "label": "云龙区",
  7350. "value": "320303"
  7351. }, {
  7352. "label": "贾汪区",
  7353. "value": "320305"
  7354. }, {
  7355. "label": "泉山区",
  7356. "value": "320311"
  7357. }, {
  7358. "label": "铜山区",
  7359. "value": "320312"
  7360. }, {
  7361. "label": "丰县",
  7362. "value": "320321"
  7363. }, {
  7364. "label": "沛县",
  7365. "value": "320322"
  7366. }, {
  7367. "label": "睢宁县",
  7368. "value": "320324"
  7369. }, {
  7370. "label": "徐州经济技术开发区",
  7371. "value": "320371"
  7372. }, {
  7373. "label": "新沂市",
  7374. "value": "320381"
  7375. }, {
  7376. "label": "邳州市",
  7377. "value": "320382"
  7378. }], [{
  7379. "label": "天宁区",
  7380. "value": "320402"
  7381. }, {
  7382. "label": "钟楼区",
  7383. "value": "320404"
  7384. }, {
  7385. "label": "新北区",
  7386. "value": "320411"
  7387. }, {
  7388. "label": "武进区",
  7389. "value": "320412"
  7390. }, {
  7391. "label": "金坛区",
  7392. "value": "320413"
  7393. }, {
  7394. "label": "溧阳市",
  7395. "value": "320481"
  7396. }], [{
  7397. "label": "虎丘区",
  7398. "value": "320505"
  7399. }, {
  7400. "label": "吴中区",
  7401. "value": "320506"
  7402. }, {
  7403. "label": "相城区",
  7404. "value": "320507"
  7405. }, {
  7406. "label": "姑苏区",
  7407. "value": "320508"
  7408. }, {
  7409. "label": "吴江区",
  7410. "value": "320509"
  7411. }, {
  7412. "label": "苏州工业园区",
  7413. "value": "320571"
  7414. }, {
  7415. "label": "常熟市",
  7416. "value": "320581"
  7417. }, {
  7418. "label": "张家港市",
  7419. "value": "320582"
  7420. }, {
  7421. "label": "昆山市",
  7422. "value": "320583"
  7423. }, {
  7424. "label": "太仓市",
  7425. "value": "320585"
  7426. }], [{
  7427. "label": "崇川区",
  7428. "value": "320602"
  7429. }, {
  7430. "label": "港闸区",
  7431. "value": "320611"
  7432. }, {
  7433. "label": "通州区",
  7434. "value": "320612"
  7435. }, {
  7436. "label": "海安县",
  7437. "value": "320621"
  7438. }, {
  7439. "label": "如东县",
  7440. "value": "320623"
  7441. }, {
  7442. "label": "南通经济技术开发区",
  7443. "value": "320671"
  7444. }, {
  7445. "label": "启东市",
  7446. "value": "320681"
  7447. }, {
  7448. "label": "如皋市",
  7449. "value": "320682"
  7450. }, {
  7451. "label": "海门市",
  7452. "value": "320684"
  7453. }], [{
  7454. "label": "连云区",
  7455. "value": "320703"
  7456. }, {
  7457. "label": "海州区",
  7458. "value": "320706"
  7459. }, {
  7460. "label": "赣榆区",
  7461. "value": "320707"
  7462. }, {
  7463. "label": "东海县",
  7464. "value": "320722"
  7465. }, {
  7466. "label": "灌云县",
  7467. "value": "320723"
  7468. }, {
  7469. "label": "灌南县",
  7470. "value": "320724"
  7471. }, {
  7472. "label": "连云港经济技术开发区",
  7473. "value": "320771"
  7474. }, {
  7475. "label": "连云港高新技术产业开发区",
  7476. "value": "320772"
  7477. }], [{
  7478. "label": "淮安区",
  7479. "value": "320803"
  7480. }, {
  7481. "label": "淮阴区",
  7482. "value": "320804"
  7483. }, {
  7484. "label": "清江浦区",
  7485. "value": "320812"
  7486. }, {
  7487. "label": "洪泽区",
  7488. "value": "320813"
  7489. }, {
  7490. "label": "涟水县",
  7491. "value": "320826"
  7492. }, {
  7493. "label": "盱眙县",
  7494. "value": "320830"
  7495. }, {
  7496. "label": "金湖县",
  7497. "value": "320831"
  7498. }, {
  7499. "label": "淮安经济技术开发区",
  7500. "value": "320871"
  7501. }], [{
  7502. "label": "亭湖区",
  7503. "value": "320902"
  7504. }, {
  7505. "label": "盐都区",
  7506. "value": "320903"
  7507. }, {
  7508. "label": "大丰区",
  7509. "value": "320904"
  7510. }, {
  7511. "label": "响水县",
  7512. "value": "320921"
  7513. }, {
  7514. "label": "滨海县",
  7515. "value": "320922"
  7516. }, {
  7517. "label": "阜宁县",
  7518. "value": "320923"
  7519. }, {
  7520. "label": "射阳县",
  7521. "value": "320924"
  7522. }, {
  7523. "label": "建湖县",
  7524. "value": "320925"
  7525. }, {
  7526. "label": "盐城经济技术开发区",
  7527. "value": "320971"
  7528. }, {
  7529. "label": "东台市",
  7530. "value": "320981"
  7531. }], [{
  7532. "label": "广陵区",
  7533. "value": "321002"
  7534. }, {
  7535. "label": "邗江区",
  7536. "value": "321003"
  7537. }, {
  7538. "label": "江都区",
  7539. "value": "321012"
  7540. }, {
  7541. "label": "宝应县",
  7542. "value": "321023"
  7543. }, {
  7544. "label": "扬州经济技术开发区",
  7545. "value": "321071"
  7546. }, {
  7547. "label": "仪征市",
  7548. "value": "321081"
  7549. }, {
  7550. "label": "高邮市",
  7551. "value": "321084"
  7552. }], [{
  7553. "label": "京口区",
  7554. "value": "321102"
  7555. }, {
  7556. "label": "润州区",
  7557. "value": "321111"
  7558. }, {
  7559. "label": "丹徒区",
  7560. "value": "321112"
  7561. }, {
  7562. "label": "镇江新区",
  7563. "value": "321171"
  7564. }, {
  7565. "label": "丹阳市",
  7566. "value": "321181"
  7567. }, {
  7568. "label": "扬中市",
  7569. "value": "321182"
  7570. }, {
  7571. "label": "句容市",
  7572. "value": "321183"
  7573. }], [{
  7574. "label": "海陵区",
  7575. "value": "321202"
  7576. }, {
  7577. "label": "高港区",
  7578. "value": "321203"
  7579. }, {
  7580. "label": "姜堰区",
  7581. "value": "321204"
  7582. }, {
  7583. "label": "泰州医药高新技术产业开发区",
  7584. "value": "321271"
  7585. }, {
  7586. "label": "兴化市",
  7587. "value": "321281"
  7588. }, {
  7589. "label": "靖江市",
  7590. "value": "321282"
  7591. }, {
  7592. "label": "泰兴市",
  7593. "value": "321283"
  7594. }], [{
  7595. "label": "宿城区",
  7596. "value": "321302"
  7597. }, {
  7598. "label": "宿豫区",
  7599. "value": "321311"
  7600. }, {
  7601. "label": "沭阳县",
  7602. "value": "321322"
  7603. }, {
  7604. "label": "泗阳县",
  7605. "value": "321323"
  7606. }, {
  7607. "label": "泗洪县",
  7608. "value": "321324"
  7609. }, {
  7610. "label": "宿迁经济技术开发区",
  7611. "value": "321371"
  7612. }]], [[{
  7613. "label": "上城区",
  7614. "value": "330102"
  7615. }, {
  7616. "label": "下城区",
  7617. "value": "330103"
  7618. }, {
  7619. "label": "江干区",
  7620. "value": "330104"
  7621. }, {
  7622. "label": "拱墅区",
  7623. "value": "330105"
  7624. }, {
  7625. "label": "西湖区",
  7626. "value": "330106"
  7627. }, {
  7628. "label": "滨江区",
  7629. "value": "330108"
  7630. }, {
  7631. "label": "萧山区",
  7632. "value": "330109"
  7633. }, {
  7634. "label": "余杭区",
  7635. "value": "330110"
  7636. }, {
  7637. "label": "富阳区",
  7638. "value": "330111"
  7639. }, {
  7640. "label": "临安区",
  7641. "value": "330112"
  7642. }, {
  7643. "label": "桐庐县",
  7644. "value": "330122"
  7645. }, {
  7646. "label": "淳安县",
  7647. "value": "330127"
  7648. }, {
  7649. "label": "建德市",
  7650. "value": "330182"
  7651. }], [{
  7652. "label": "海曙区",
  7653. "value": "330203"
  7654. }, {
  7655. "label": "江北区",
  7656. "value": "330205"
  7657. }, {
  7658. "label": "北仑区",
  7659. "value": "330206"
  7660. }, {
  7661. "label": "镇海区",
  7662. "value": "330211"
  7663. }, {
  7664. "label": "鄞州区",
  7665. "value": "330212"
  7666. }, {
  7667. "label": "奉化区",
  7668. "value": "330213"
  7669. }, {
  7670. "label": "象山县",
  7671. "value": "330225"
  7672. }, {
  7673. "label": "宁海县",
  7674. "value": "330226"
  7675. }, {
  7676. "label": "余姚市",
  7677. "value": "330281"
  7678. }, {
  7679. "label": "慈溪市",
  7680. "value": "330282"
  7681. }], [{
  7682. "label": "鹿城区",
  7683. "value": "330302"
  7684. }, {
  7685. "label": "龙湾区",
  7686. "value": "330303"
  7687. }, {
  7688. "label": "瓯海区",
  7689. "value": "330304"
  7690. }, {
  7691. "label": "洞头区",
  7692. "value": "330305"
  7693. }, {
  7694. "label": "永嘉县",
  7695. "value": "330324"
  7696. }, {
  7697. "label": "平阳县",
  7698. "value": "330326"
  7699. }, {
  7700. "label": "苍南县",
  7701. "value": "330327"
  7702. }, {
  7703. "label": "文成县",
  7704. "value": "330328"
  7705. }, {
  7706. "label": "泰顺县",
  7707. "value": "330329"
  7708. }, {
  7709. "label": "温州经济技术开发区",
  7710. "value": "330371"
  7711. }, {
  7712. "label": "瑞安市",
  7713. "value": "330381"
  7714. }, {
  7715. "label": "乐清市",
  7716. "value": "330382"
  7717. }], [{
  7718. "label": "南湖区",
  7719. "value": "330402"
  7720. }, {
  7721. "label": "秀洲区",
  7722. "value": "330411"
  7723. }, {
  7724. "label": "嘉善县",
  7725. "value": "330421"
  7726. }, {
  7727. "label": "海盐县",
  7728. "value": "330424"
  7729. }, {
  7730. "label": "海宁市",
  7731. "value": "330481"
  7732. }, {
  7733. "label": "平湖市",
  7734. "value": "330482"
  7735. }, {
  7736. "label": "桐乡市",
  7737. "value": "330483"
  7738. }], [{
  7739. "label": "吴兴区",
  7740. "value": "330502"
  7741. }, {
  7742. "label": "南浔区",
  7743. "value": "330503"
  7744. }, {
  7745. "label": "德清县",
  7746. "value": "330521"
  7747. }, {
  7748. "label": "长兴县",
  7749. "value": "330522"
  7750. }, {
  7751. "label": "安吉县",
  7752. "value": "330523"
  7753. }], [{
  7754. "label": "越城区",
  7755. "value": "330602"
  7756. }, {
  7757. "label": "柯桥区",
  7758. "value": "330603"
  7759. }, {
  7760. "label": "上虞区",
  7761. "value": "330604"
  7762. }, {
  7763. "label": "新昌县",
  7764. "value": "330624"
  7765. }, {
  7766. "label": "诸暨市",
  7767. "value": "330681"
  7768. }, {
  7769. "label": "嵊州市",
  7770. "value": "330683"
  7771. }], [{
  7772. "label": "婺城区",
  7773. "value": "330702"
  7774. }, {
  7775. "label": "金东区",
  7776. "value": "330703"
  7777. }, {
  7778. "label": "武义县",
  7779. "value": "330723"
  7780. }, {
  7781. "label": "浦江县",
  7782. "value": "330726"
  7783. }, {
  7784. "label": "磐安县",
  7785. "value": "330727"
  7786. }, {
  7787. "label": "兰溪市",
  7788. "value": "330781"
  7789. }, {
  7790. "label": "义乌市",
  7791. "value": "330782"
  7792. }, {
  7793. "label": "东阳市",
  7794. "value": "330783"
  7795. }, {
  7796. "label": "永康市",
  7797. "value": "330784"
  7798. }], [{
  7799. "label": "柯城区",
  7800. "value": "330802"
  7801. }, {
  7802. "label": "衢江区",
  7803. "value": "330803"
  7804. }, {
  7805. "label": "常山县",
  7806. "value": "330822"
  7807. }, {
  7808. "label": "开化县",
  7809. "value": "330824"
  7810. }, {
  7811. "label": "龙游县",
  7812. "value": "330825"
  7813. }, {
  7814. "label": "江山市",
  7815. "value": "330881"
  7816. }], [{
  7817. "label": "定海区",
  7818. "value": "330902"
  7819. }, {
  7820. "label": "普陀区",
  7821. "value": "330903"
  7822. }, {
  7823. "label": "岱山县",
  7824. "value": "330921"
  7825. }, {
  7826. "label": "嵊泗县",
  7827. "value": "330922"
  7828. }], [{
  7829. "label": "椒江区",
  7830. "value": "331002"
  7831. }, {
  7832. "label": "黄岩区",
  7833. "value": "331003"
  7834. }, {
  7835. "label": "路桥区",
  7836. "value": "331004"
  7837. }, {
  7838. "label": "三门县",
  7839. "value": "331022"
  7840. }, {
  7841. "label": "天台县",
  7842. "value": "331023"
  7843. }, {
  7844. "label": "仙居县",
  7845. "value": "331024"
  7846. }, {
  7847. "label": "温岭市",
  7848. "value": "331081"
  7849. }, {
  7850. "label": "临海市",
  7851. "value": "331082"
  7852. }, {
  7853. "label": "玉环市",
  7854. "value": "331083"
  7855. }], [{
  7856. "label": "莲都区",
  7857. "value": "331102"
  7858. }, {
  7859. "label": "青田县",
  7860. "value": "331121"
  7861. }, {
  7862. "label": "缙云县",
  7863. "value": "331122"
  7864. }, {
  7865. "label": "遂昌县",
  7866. "value": "331123"
  7867. }, {
  7868. "label": "松阳县",
  7869. "value": "331124"
  7870. }, {
  7871. "label": "云和县",
  7872. "value": "331125"
  7873. }, {
  7874. "label": "庆元县",
  7875. "value": "331126"
  7876. }, {
  7877. "label": "景宁畲族自治县",
  7878. "value": "331127"
  7879. }, {
  7880. "label": "龙泉市",
  7881. "value": "331181"
  7882. }]], [[{
  7883. "label": "瑶海区",
  7884. "value": "340102"
  7885. }, {
  7886. "label": "庐阳区",
  7887. "value": "340103"
  7888. }, {
  7889. "label": "蜀山区",
  7890. "value": "340104"
  7891. }, {
  7892. "label": "包河区",
  7893. "value": "340111"
  7894. }, {
  7895. "label": "长丰县",
  7896. "value": "340121"
  7897. }, {
  7898. "label": "肥东县",
  7899. "value": "340122"
  7900. }, {
  7901. "label": "肥西县",
  7902. "value": "340123"
  7903. }, {
  7904. "label": "庐江县",
  7905. "value": "340124"
  7906. }, {
  7907. "label": "合肥高新技术产业开发区",
  7908. "value": "340171"
  7909. }, {
  7910. "label": "合肥经济技术开发区",
  7911. "value": "340172"
  7912. }, {
  7913. "label": "合肥新站高新技术产业开发区",
  7914. "value": "340173"
  7915. }, {
  7916. "label": "巢湖市",
  7917. "value": "340181"
  7918. }], [{
  7919. "label": "镜湖区",
  7920. "value": "340202"
  7921. }, {
  7922. "label": "弋江区",
  7923. "value": "340203"
  7924. }, {
  7925. "label": "鸠江区",
  7926. "value": "340207"
  7927. }, {
  7928. "label": "三山区",
  7929. "value": "340208"
  7930. }, {
  7931. "label": "芜湖县",
  7932. "value": "340221"
  7933. }, {
  7934. "label": "繁昌县",
  7935. "value": "340222"
  7936. }, {
  7937. "label": "南陵县",
  7938. "value": "340223"
  7939. }, {
  7940. "label": "无为县",
  7941. "value": "340225"
  7942. }, {
  7943. "label": "芜湖经济技术开发区",
  7944. "value": "340271"
  7945. }, {
  7946. "label": "安徽芜湖长江大桥经济开发区",
  7947. "value": "340272"
  7948. }], [{
  7949. "label": "龙子湖区",
  7950. "value": "340302"
  7951. }, {
  7952. "label": "蚌山区",
  7953. "value": "340303"
  7954. }, {
  7955. "label": "禹会区",
  7956. "value": "340304"
  7957. }, {
  7958. "label": "淮上区",
  7959. "value": "340311"
  7960. }, {
  7961. "label": "怀远县",
  7962. "value": "340321"
  7963. }, {
  7964. "label": "五河县",
  7965. "value": "340322"
  7966. }, {
  7967. "label": "固镇县",
  7968. "value": "340323"
  7969. }, {
  7970. "label": "蚌埠市高新技术开发区",
  7971. "value": "340371"
  7972. }, {
  7973. "label": "蚌埠市经济开发区",
  7974. "value": "340372"
  7975. }], [{
  7976. "label": "大通区",
  7977. "value": "340402"
  7978. }, {
  7979. "label": "田家庵区",
  7980. "value": "340403"
  7981. }, {
  7982. "label": "谢家集区",
  7983. "value": "340404"
  7984. }, {
  7985. "label": "八公山区",
  7986. "value": "340405"
  7987. }, {
  7988. "label": "潘集区",
  7989. "value": "340406"
  7990. }, {
  7991. "label": "凤台县",
  7992. "value": "340421"
  7993. }, {
  7994. "label": "寿县",
  7995. "value": "340422"
  7996. }], [{
  7997. "label": "花山区",
  7998. "value": "340503"
  7999. }, {
  8000. "label": "雨山区",
  8001. "value": "340504"
  8002. }, {
  8003. "label": "博望区",
  8004. "value": "340506"
  8005. }, {
  8006. "label": "当涂县",
  8007. "value": "340521"
  8008. }, {
  8009. "label": "含山县",
  8010. "value": "340522"
  8011. }, {
  8012. "label": "和县",
  8013. "value": "340523"
  8014. }], [{
  8015. "label": "杜集区",
  8016. "value": "340602"
  8017. }, {
  8018. "label": "相山区",
  8019. "value": "340603"
  8020. }, {
  8021. "label": "烈山区",
  8022. "value": "340604"
  8023. }, {
  8024. "label": "濉溪县",
  8025. "value": "340621"
  8026. }], [{
  8027. "label": "铜官区",
  8028. "value": "340705"
  8029. }, {
  8030. "label": "义安区",
  8031. "value": "340706"
  8032. }, {
  8033. "label": "郊区",
  8034. "value": "340711"
  8035. }, {
  8036. "label": "枞阳县",
  8037. "value": "340722"
  8038. }], [{
  8039. "label": "迎江区",
  8040. "value": "340802"
  8041. }, {
  8042. "label": "大观区",
  8043. "value": "340803"
  8044. }, {
  8045. "label": "宜秀区",
  8046. "value": "340811"
  8047. }, {
  8048. "label": "怀宁县",
  8049. "value": "340822"
  8050. }, {
  8051. "label": "潜山县",
  8052. "value": "340824"
  8053. }, {
  8054. "label": "太湖县",
  8055. "value": "340825"
  8056. }, {
  8057. "label": "宿松县",
  8058. "value": "340826"
  8059. }, {
  8060. "label": "望江县",
  8061. "value": "340827"
  8062. }, {
  8063. "label": "岳西县",
  8064. "value": "340828"
  8065. }, {
  8066. "label": "安徽安庆经济开发区",
  8067. "value": "340871"
  8068. }, {
  8069. "label": "桐城市",
  8070. "value": "340881"
  8071. }], [{
  8072. "label": "屯溪区",
  8073. "value": "341002"
  8074. }, {
  8075. "label": "黄山区",
  8076. "value": "341003"
  8077. }, {
  8078. "label": "徽州区",
  8079. "value": "341004"
  8080. }, {
  8081. "label": "歙县",
  8082. "value": "341021"
  8083. }, {
  8084. "label": "休宁县",
  8085. "value": "341022"
  8086. }, {
  8087. "label": "黟县",
  8088. "value": "341023"
  8089. }, {
  8090. "label": "祁门县",
  8091. "value": "341024"
  8092. }], [{
  8093. "label": "琅琊区",
  8094. "value": "341102"
  8095. }, {
  8096. "label": "南谯区",
  8097. "value": "341103"
  8098. }, {
  8099. "label": "来安县",
  8100. "value": "341122"
  8101. }, {
  8102. "label": "全椒县",
  8103. "value": "341124"
  8104. }, {
  8105. "label": "定远县",
  8106. "value": "341125"
  8107. }, {
  8108. "label": "凤阳县",
  8109. "value": "341126"
  8110. }, {
  8111. "label": "苏滁现代产业园",
  8112. "value": "341171"
  8113. }, {
  8114. "label": "滁州经济技术开发区",
  8115. "value": "341172"
  8116. }, {
  8117. "label": "天长市",
  8118. "value": "341181"
  8119. }, {
  8120. "label": "明光市",
  8121. "value": "341182"
  8122. }], [{
  8123. "label": "颍州区",
  8124. "value": "341202"
  8125. }, {
  8126. "label": "颍东区",
  8127. "value": "341203"
  8128. }, {
  8129. "label": "颍泉区",
  8130. "value": "341204"
  8131. }, {
  8132. "label": "临泉县",
  8133. "value": "341221"
  8134. }, {
  8135. "label": "太和县",
  8136. "value": "341222"
  8137. }, {
  8138. "label": "阜南县",
  8139. "value": "341225"
  8140. }, {
  8141. "label": "颍上县",
  8142. "value": "341226"
  8143. }, {
  8144. "label": "阜阳合肥现代产业园区",
  8145. "value": "341271"
  8146. }, {
  8147. "label": "阜阳经济技术开发区",
  8148. "value": "341272"
  8149. }, {
  8150. "label": "界首市",
  8151. "value": "341282"
  8152. }], [{
  8153. "label": "埇桥区",
  8154. "value": "341302"
  8155. }, {
  8156. "label": "砀山县",
  8157. "value": "341321"
  8158. }, {
  8159. "label": "萧县",
  8160. "value": "341322"
  8161. }, {
  8162. "label": "灵璧县",
  8163. "value": "341323"
  8164. }, {
  8165. "label": "泗县",
  8166. "value": "341324"
  8167. }, {
  8168. "label": "宿州马鞍山现代产业园区",
  8169. "value": "341371"
  8170. }, {
  8171. "label": "宿州经济技术开发区",
  8172. "value": "341372"
  8173. }], [{
  8174. "label": "金安区",
  8175. "value": "341502"
  8176. }, {
  8177. "label": "裕安区",
  8178. "value": "341503"
  8179. }, {
  8180. "label": "叶集区",
  8181. "value": "341504"
  8182. }, {
  8183. "label": "霍邱县",
  8184. "value": "341522"
  8185. }, {
  8186. "label": "舒城县",
  8187. "value": "341523"
  8188. }, {
  8189. "label": "金寨县",
  8190. "value": "341524"
  8191. }, {
  8192. "label": "霍山县",
  8193. "value": "341525"
  8194. }], [{
  8195. "label": "谯城区",
  8196. "value": "341602"
  8197. }, {
  8198. "label": "涡阳县",
  8199. "value": "341621"
  8200. }, {
  8201. "label": "蒙城县",
  8202. "value": "341622"
  8203. }, {
  8204. "label": "利辛县",
  8205. "value": "341623"
  8206. }], [{
  8207. "label": "贵池区",
  8208. "value": "341702"
  8209. }, {
  8210. "label": "东至县",
  8211. "value": "341721"
  8212. }, {
  8213. "label": "石台县",
  8214. "value": "341722"
  8215. }, {
  8216. "label": "青阳县",
  8217. "value": "341723"
  8218. }], [{
  8219. "label": "宣州区",
  8220. "value": "341802"
  8221. }, {
  8222. "label": "郎溪县",
  8223. "value": "341821"
  8224. }, {
  8225. "label": "广德县",
  8226. "value": "341822"
  8227. }, {
  8228. "label": "泾县",
  8229. "value": "341823"
  8230. }, {
  8231. "label": "绩溪县",
  8232. "value": "341824"
  8233. }, {
  8234. "label": "旌德县",
  8235. "value": "341825"
  8236. }, {
  8237. "label": "宣城市经济开发区",
  8238. "value": "341871"
  8239. }, {
  8240. "label": "宁国市",
  8241. "value": "341881"
  8242. }]], [[{
  8243. "label": "鼓楼区",
  8244. "value": "350102"
  8245. }, {
  8246. "label": "台江区",
  8247. "value": "350103"
  8248. }, {
  8249. "label": "仓山区",
  8250. "value": "350104"
  8251. }, {
  8252. "label": "马尾区",
  8253. "value": "350105"
  8254. }, {
  8255. "label": "晋安区",
  8256. "value": "350111"
  8257. }, {
  8258. "label": "闽侯县",
  8259. "value": "350121"
  8260. }, {
  8261. "label": "连江县",
  8262. "value": "350122"
  8263. }, {
  8264. "label": "罗源县",
  8265. "value": "350123"
  8266. }, {
  8267. "label": "闽清县",
  8268. "value": "350124"
  8269. }, {
  8270. "label": "永泰县",
  8271. "value": "350125"
  8272. }, {
  8273. "label": "平潭县",
  8274. "value": "350128"
  8275. }, {
  8276. "label": "福清市",
  8277. "value": "350181"
  8278. }, {
  8279. "label": "长乐市",
  8280. "value": "350182"
  8281. }], [{
  8282. "label": "思明区",
  8283. "value": "350203"
  8284. }, {
  8285. "label": "海沧区",
  8286. "value": "350205"
  8287. }, {
  8288. "label": "湖里区",
  8289. "value": "350206"
  8290. }, {
  8291. "label": "集美区",
  8292. "value": "350211"
  8293. }, {
  8294. "label": "同安区",
  8295. "value": "350212"
  8296. }, {
  8297. "label": "翔安区",
  8298. "value": "350213"
  8299. }], [{
  8300. "label": "城厢区",
  8301. "value": "350302"
  8302. }, {
  8303. "label": "涵江区",
  8304. "value": "350303"
  8305. }, {
  8306. "label": "荔城区",
  8307. "value": "350304"
  8308. }, {
  8309. "label": "秀屿区",
  8310. "value": "350305"
  8311. }, {
  8312. "label": "仙游县",
  8313. "value": "350322"
  8314. }], [{
  8315. "label": "梅列区",
  8316. "value": "350402"
  8317. }, {
  8318. "label": "三元区",
  8319. "value": "350403"
  8320. }, {
  8321. "label": "明溪县",
  8322. "value": "350421"
  8323. }, {
  8324. "label": "清流县",
  8325. "value": "350423"
  8326. }, {
  8327. "label": "宁化县",
  8328. "value": "350424"
  8329. }, {
  8330. "label": "大田县",
  8331. "value": "350425"
  8332. }, {
  8333. "label": "尤溪县",
  8334. "value": "350426"
  8335. }, {
  8336. "label": "沙县",
  8337. "value": "350427"
  8338. }, {
  8339. "label": "将乐县",
  8340. "value": "350428"
  8341. }, {
  8342. "label": "泰宁县",
  8343. "value": "350429"
  8344. }, {
  8345. "label": "建宁县",
  8346. "value": "350430"
  8347. }, {
  8348. "label": "永安市",
  8349. "value": "350481"
  8350. }], [{
  8351. "label": "鲤城区",
  8352. "value": "350502"
  8353. }, {
  8354. "label": "丰泽区",
  8355. "value": "350503"
  8356. }, {
  8357. "label": "洛江区",
  8358. "value": "350504"
  8359. }, {
  8360. "label": "泉港区",
  8361. "value": "350505"
  8362. }, {
  8363. "label": "惠安县",
  8364. "value": "350521"
  8365. }, {
  8366. "label": "安溪县",
  8367. "value": "350524"
  8368. }, {
  8369. "label": "永春县",
  8370. "value": "350525"
  8371. }, {
  8372. "label": "德化县",
  8373. "value": "350526"
  8374. }, {
  8375. "label": "金门县",
  8376. "value": "350527"
  8377. }, {
  8378. "label": "石狮市",
  8379. "value": "350581"
  8380. }, {
  8381. "label": "晋江市",
  8382. "value": "350582"
  8383. }, {
  8384. "label": "南安市",
  8385. "value": "350583"
  8386. }], [{
  8387. "label": "芗城区",
  8388. "value": "350602"
  8389. }, {
  8390. "label": "龙文区",
  8391. "value": "350603"
  8392. }, {
  8393. "label": "云霄县",
  8394. "value": "350622"
  8395. }, {
  8396. "label": "漳浦县",
  8397. "value": "350623"
  8398. }, {
  8399. "label": "诏安县",
  8400. "value": "350624"
  8401. }, {
  8402. "label": "长泰县",
  8403. "value": "350625"
  8404. }, {
  8405. "label": "东山县",
  8406. "value": "350626"
  8407. }, {
  8408. "label": "南靖县",
  8409. "value": "350627"
  8410. }, {
  8411. "label": "平和县",
  8412. "value": "350628"
  8413. }, {
  8414. "label": "华安县",
  8415. "value": "350629"
  8416. }, {
  8417. "label": "龙海市",
  8418. "value": "350681"
  8419. }], [{
  8420. "label": "延平区",
  8421. "value": "350702"
  8422. }, {
  8423. "label": "建阳区",
  8424. "value": "350703"
  8425. }, {
  8426. "label": "顺昌县",
  8427. "value": "350721"
  8428. }, {
  8429. "label": "浦城县",
  8430. "value": "350722"
  8431. }, {
  8432. "label": "光泽县",
  8433. "value": "350723"
  8434. }, {
  8435. "label": "松溪县",
  8436. "value": "350724"
  8437. }, {
  8438. "label": "政和县",
  8439. "value": "350725"
  8440. }, {
  8441. "label": "邵武市",
  8442. "value": "350781"
  8443. }, {
  8444. "label": "武夷山市",
  8445. "value": "350782"
  8446. }, {
  8447. "label": "建瓯市",
  8448. "value": "350783"
  8449. }], [{
  8450. "label": "新罗区",
  8451. "value": "350802"
  8452. }, {
  8453. "label": "永定区",
  8454. "value": "350803"
  8455. }, {
  8456. "label": "长汀县",
  8457. "value": "350821"
  8458. }, {
  8459. "label": "上杭县",
  8460. "value": "350823"
  8461. }, {
  8462. "label": "武平县",
  8463. "value": "350824"
  8464. }, {
  8465. "label": "连城县",
  8466. "value": "350825"
  8467. }, {
  8468. "label": "漳平市",
  8469. "value": "350881"
  8470. }], [{
  8471. "label": "蕉城区",
  8472. "value": "350902"
  8473. }, {
  8474. "label": "霞浦县",
  8475. "value": "350921"
  8476. }, {
  8477. "label": "古田县",
  8478. "value": "350922"
  8479. }, {
  8480. "label": "屏南县",
  8481. "value": "350923"
  8482. }, {
  8483. "label": "寿宁县",
  8484. "value": "350924"
  8485. }, {
  8486. "label": "周宁县",
  8487. "value": "350925"
  8488. }, {
  8489. "label": "柘荣县",
  8490. "value": "350926"
  8491. }, {
  8492. "label": "福安市",
  8493. "value": "350981"
  8494. }, {
  8495. "label": "福鼎市",
  8496. "value": "350982"
  8497. }]], [[{
  8498. "label": "东湖区",
  8499. "value": "360102"
  8500. }, {
  8501. "label": "西湖区",
  8502. "value": "360103"
  8503. }, {
  8504. "label": "青云谱区",
  8505. "value": "360104"
  8506. }, {
  8507. "label": "湾里区",
  8508. "value": "360105"
  8509. }, {
  8510. "label": "青山湖区",
  8511. "value": "360111"
  8512. }, {
  8513. "label": "新建区",
  8514. "value": "360112"
  8515. }, {
  8516. "label": "南昌县",
  8517. "value": "360121"
  8518. }, {
  8519. "label": "安义县",
  8520. "value": "360123"
  8521. }, {
  8522. "label": "进贤县",
  8523. "value": "360124"
  8524. }], [{
  8525. "label": "昌江区",
  8526. "value": "360202"
  8527. }, {
  8528. "label": "珠山区",
  8529. "value": "360203"
  8530. }, {
  8531. "label": "浮梁县",
  8532. "value": "360222"
  8533. }, {
  8534. "label": "乐平市",
  8535. "value": "360281"
  8536. }], [{
  8537. "label": "安源区",
  8538. "value": "360302"
  8539. }, {
  8540. "label": "湘东区",
  8541. "value": "360313"
  8542. }, {
  8543. "label": "莲花县",
  8544. "value": "360321"
  8545. }, {
  8546. "label": "上栗县",
  8547. "value": "360322"
  8548. }, {
  8549. "label": "芦溪县",
  8550. "value": "360323"
  8551. }], [{
  8552. "label": "濂溪区",
  8553. "value": "360402"
  8554. }, {
  8555. "label": "浔阳区",
  8556. "value": "360403"
  8557. }, {
  8558. "label": "柴桑区",
  8559. "value": "360404"
  8560. }, {
  8561. "label": "武宁县",
  8562. "value": "360423"
  8563. }, {
  8564. "label": "修水县",
  8565. "value": "360424"
  8566. }, {
  8567. "label": "永修县",
  8568. "value": "360425"
  8569. }, {
  8570. "label": "德安县",
  8571. "value": "360426"
  8572. }, {
  8573. "label": "都昌县",
  8574. "value": "360428"
  8575. }, {
  8576. "label": "湖口县",
  8577. "value": "360429"
  8578. }, {
  8579. "label": "彭泽县",
  8580. "value": "360430"
  8581. }, {
  8582. "label": "瑞昌市",
  8583. "value": "360481"
  8584. }, {
  8585. "label": "共青城市",
  8586. "value": "360482"
  8587. }, {
  8588. "label": "庐山市",
  8589. "value": "360483"
  8590. }], [{
  8591. "label": "渝水区",
  8592. "value": "360502"
  8593. }, {
  8594. "label": "分宜县",
  8595. "value": "360521"
  8596. }], [{
  8597. "label": "月湖区",
  8598. "value": "360602"
  8599. }, {
  8600. "label": "余江县",
  8601. "value": "360622"
  8602. }, {
  8603. "label": "贵溪市",
  8604. "value": "360681"
  8605. }], [{
  8606. "label": "章贡区",
  8607. "value": "360702"
  8608. }, {
  8609. "label": "南康区",
  8610. "value": "360703"
  8611. }, {
  8612. "label": "赣县区",
  8613. "value": "360704"
  8614. }, {
  8615. "label": "信丰县",
  8616. "value": "360722"
  8617. }, {
  8618. "label": "大余县",
  8619. "value": "360723"
  8620. }, {
  8621. "label": "上犹县",
  8622. "value": "360724"
  8623. }, {
  8624. "label": "崇义县",
  8625. "value": "360725"
  8626. }, {
  8627. "label": "安远县",
  8628. "value": "360726"
  8629. }, {
  8630. "label": "龙南县",
  8631. "value": "360727"
  8632. }, {
  8633. "label": "定南县",
  8634. "value": "360728"
  8635. }, {
  8636. "label": "全南县",
  8637. "value": "360729"
  8638. }, {
  8639. "label": "宁都县",
  8640. "value": "360730"
  8641. }, {
  8642. "label": "于都县",
  8643. "value": "360731"
  8644. }, {
  8645. "label": "兴国县",
  8646. "value": "360732"
  8647. }, {
  8648. "label": "会昌县",
  8649. "value": "360733"
  8650. }, {
  8651. "label": "寻乌县",
  8652. "value": "360734"
  8653. }, {
  8654. "label": "石城县",
  8655. "value": "360735"
  8656. }, {
  8657. "label": "瑞金市",
  8658. "value": "360781"
  8659. }], [{
  8660. "label": "吉州区",
  8661. "value": "360802"
  8662. }, {
  8663. "label": "青原区",
  8664. "value": "360803"
  8665. }, {
  8666. "label": "吉安县",
  8667. "value": "360821"
  8668. }, {
  8669. "label": "吉水县",
  8670. "value": "360822"
  8671. }, {
  8672. "label": "峡江县",
  8673. "value": "360823"
  8674. }, {
  8675. "label": "新干县",
  8676. "value": "360824"
  8677. }, {
  8678. "label": "永丰县",
  8679. "value": "360825"
  8680. }, {
  8681. "label": "泰和县",
  8682. "value": "360826"
  8683. }, {
  8684. "label": "遂川县",
  8685. "value": "360827"
  8686. }, {
  8687. "label": "万安县",
  8688. "value": "360828"
  8689. }, {
  8690. "label": "安福县",
  8691. "value": "360829"
  8692. }, {
  8693. "label": "永新县",
  8694. "value": "360830"
  8695. }, {
  8696. "label": "井冈山市",
  8697. "value": "360881"
  8698. }], [{
  8699. "label": "袁州区",
  8700. "value": "360902"
  8701. }, {
  8702. "label": "奉新县",
  8703. "value": "360921"
  8704. }, {
  8705. "label": "万载县",
  8706. "value": "360922"
  8707. }, {
  8708. "label": "上高县",
  8709. "value": "360923"
  8710. }, {
  8711. "label": "宜丰县",
  8712. "value": "360924"
  8713. }, {
  8714. "label": "靖安县",
  8715. "value": "360925"
  8716. }, {
  8717. "label": "铜鼓县",
  8718. "value": "360926"
  8719. }, {
  8720. "label": "丰城市",
  8721. "value": "360981"
  8722. }, {
  8723. "label": "樟树市",
  8724. "value": "360982"
  8725. }, {
  8726. "label": "高安市",
  8727. "value": "360983"
  8728. }], [{
  8729. "label": "临川区",
  8730. "value": "361002"
  8731. }, {
  8732. "label": "东乡区",
  8733. "value": "361003"
  8734. }, {
  8735. "label": "南城县",
  8736. "value": "361021"
  8737. }, {
  8738. "label": "黎川县",
  8739. "value": "361022"
  8740. }, {
  8741. "label": "南丰县",
  8742. "value": "361023"
  8743. }, {
  8744. "label": "崇仁县",
  8745. "value": "361024"
  8746. }, {
  8747. "label": "乐安县",
  8748. "value": "361025"
  8749. }, {
  8750. "label": "宜黄县",
  8751. "value": "361026"
  8752. }, {
  8753. "label": "金溪县",
  8754. "value": "361027"
  8755. }, {
  8756. "label": "资溪县",
  8757. "value": "361028"
  8758. }, {
  8759. "label": "广昌县",
  8760. "value": "361030"
  8761. }], [{
  8762. "label": "信州区",
  8763. "value": "361102"
  8764. }, {
  8765. "label": "广丰区",
  8766. "value": "361103"
  8767. }, {
  8768. "label": "上饶县",
  8769. "value": "361121"
  8770. }, {
  8771. "label": "玉山县",
  8772. "value": "361123"
  8773. }, {
  8774. "label": "铅山县",
  8775. "value": "361124"
  8776. }, {
  8777. "label": "横峰县",
  8778. "value": "361125"
  8779. }, {
  8780. "label": "弋阳县",
  8781. "value": "361126"
  8782. }, {
  8783. "label": "余干县",
  8784. "value": "361127"
  8785. }, {
  8786. "label": "鄱阳县",
  8787. "value": "361128"
  8788. }, {
  8789. "label": "万年县",
  8790. "value": "361129"
  8791. }, {
  8792. "label": "婺源县",
  8793. "value": "361130"
  8794. }, {
  8795. "label": "德兴市",
  8796. "value": "361181"
  8797. }]], [[{
  8798. "label": "历下区",
  8799. "value": "370102"
  8800. }, {
  8801. "label": "市中区",
  8802. "value": "370103"
  8803. }, {
  8804. "label": "槐荫区",
  8805. "value": "370104"
  8806. }, {
  8807. "label": "天桥区",
  8808. "value": "370105"
  8809. }, {
  8810. "label": "历城区",
  8811. "value": "370112"
  8812. }, {
  8813. "label": "长清区",
  8814. "value": "370113"
  8815. }, {
  8816. "label": "章丘区",
  8817. "value": "370114"
  8818. }, {
  8819. "label": "平阴县",
  8820. "value": "370124"
  8821. }, {
  8822. "label": "济阳县",
  8823. "value": "370125"
  8824. }, {
  8825. "label": "商河县",
  8826. "value": "370126"
  8827. }, {
  8828. "label": "济南高新技术产业开发区",
  8829. "value": "370171"
  8830. }], [{
  8831. "label": "市南区",
  8832. "value": "370202"
  8833. }, {
  8834. "label": "市北区",
  8835. "value": "370203"
  8836. }, {
  8837. "label": "黄岛区",
  8838. "value": "370211"
  8839. }, {
  8840. "label": "崂山区",
  8841. "value": "370212"
  8842. }, {
  8843. "label": "李沧区",
  8844. "value": "370213"
  8845. }, {
  8846. "label": "城阳区",
  8847. "value": "370214"
  8848. }, {
  8849. "label": "即墨区",
  8850. "value": "370215"
  8851. }, {
  8852. "label": "青岛高新技术产业开发区",
  8853. "value": "370271"
  8854. }, {
  8855. "label": "胶州市",
  8856. "value": "370281"
  8857. }, {
  8858. "label": "平度市",
  8859. "value": "370283"
  8860. }, {
  8861. "label": "莱西市",
  8862. "value": "370285"
  8863. }], [{
  8864. "label": "淄川区",
  8865. "value": "370302"
  8866. }, {
  8867. "label": "张店区",
  8868. "value": "370303"
  8869. }, {
  8870. "label": "博山区",
  8871. "value": "370304"
  8872. }, {
  8873. "label": "临淄区",
  8874. "value": "370305"
  8875. }, {
  8876. "label": "周村区",
  8877. "value": "370306"
  8878. }, {
  8879. "label": "桓台县",
  8880. "value": "370321"
  8881. }, {
  8882. "label": "高青县",
  8883. "value": "370322"
  8884. }, {
  8885. "label": "沂源县",
  8886. "value": "370323"
  8887. }], [{
  8888. "label": "市中区",
  8889. "value": "370402"
  8890. }, {
  8891. "label": "薛城区",
  8892. "value": "370403"
  8893. }, {
  8894. "label": "峄城区",
  8895. "value": "370404"
  8896. }, {
  8897. "label": "台儿庄区",
  8898. "value": "370405"
  8899. }, {
  8900. "label": "山亭区",
  8901. "value": "370406"
  8902. }, {
  8903. "label": "滕州市",
  8904. "value": "370481"
  8905. }], [{
  8906. "label": "东营区",
  8907. "value": "370502"
  8908. }, {
  8909. "label": "河口区",
  8910. "value": "370503"
  8911. }, {
  8912. "label": "垦利区",
  8913. "value": "370505"
  8914. }, {
  8915. "label": "利津县",
  8916. "value": "370522"
  8917. }, {
  8918. "label": "广饶县",
  8919. "value": "370523"
  8920. }, {
  8921. "label": "东营经济技术开发区",
  8922. "value": "370571"
  8923. }, {
  8924. "label": "东营港经济开发区",
  8925. "value": "370572"
  8926. }], [{
  8927. "label": "芝罘区",
  8928. "value": "370602"
  8929. }, {
  8930. "label": "福山区",
  8931. "value": "370611"
  8932. }, {
  8933. "label": "牟平区",
  8934. "value": "370612"
  8935. }, {
  8936. "label": "莱山区",
  8937. "value": "370613"
  8938. }, {
  8939. "label": "长岛县",
  8940. "value": "370634"
  8941. }, {
  8942. "label": "烟台高新技术产业开发区",
  8943. "value": "370671"
  8944. }, {
  8945. "label": "烟台经济技术开发区",
  8946. "value": "370672"
  8947. }, {
  8948. "label": "龙口市",
  8949. "value": "370681"
  8950. }, {
  8951. "label": "莱阳市",
  8952. "value": "370682"
  8953. }, {
  8954. "label": "莱州市",
  8955. "value": "370683"
  8956. }, {
  8957. "label": "蓬莱市",
  8958. "value": "370684"
  8959. }, {
  8960. "label": "招远市",
  8961. "value": "370685"
  8962. }, {
  8963. "label": "栖霞市",
  8964. "value": "370686"
  8965. }, {
  8966. "label": "海阳市",
  8967. "value": "370687"
  8968. }], [{
  8969. "label": "潍城区",
  8970. "value": "370702"
  8971. }, {
  8972. "label": "寒亭区",
  8973. "value": "370703"
  8974. }, {
  8975. "label": "坊子区",
  8976. "value": "370704"
  8977. }, {
  8978. "label": "奎文区",
  8979. "value": "370705"
  8980. }, {
  8981. "label": "临朐县",
  8982. "value": "370724"
  8983. }, {
  8984. "label": "昌乐县",
  8985. "value": "370725"
  8986. }, {
  8987. "label": "潍坊滨海经济技术开发区",
  8988. "value": "370772"
  8989. }, {
  8990. "label": "青州市",
  8991. "value": "370781"
  8992. }, {
  8993. "label": "诸城市",
  8994. "value": "370782"
  8995. }, {
  8996. "label": "寿光市",
  8997. "value": "370783"
  8998. }, {
  8999. "label": "安丘市",
  9000. "value": "370784"
  9001. }, {
  9002. "label": "高密市",
  9003. "value": "370785"
  9004. }, {
  9005. "label": "昌邑市",
  9006. "value": "370786"
  9007. }], [{
  9008. "label": "任城区",
  9009. "value": "370811"
  9010. }, {
  9011. "label": "兖州区",
  9012. "value": "370812"
  9013. }, {
  9014. "label": "微山县",
  9015. "value": "370826"
  9016. }, {
  9017. "label": "鱼台县",
  9018. "value": "370827"
  9019. }, {
  9020. "label": "金乡县",
  9021. "value": "370828"
  9022. }, {
  9023. "label": "嘉祥县",
  9024. "value": "370829"
  9025. }, {
  9026. "label": "汶上县",
  9027. "value": "370830"
  9028. }, {
  9029. "label": "泗水县",
  9030. "value": "370831"
  9031. }, {
  9032. "label": "梁山县",
  9033. "value": "370832"
  9034. }, {
  9035. "label": "济宁高新技术产业开发区",
  9036. "value": "370871"
  9037. }, {
  9038. "label": "曲阜市",
  9039. "value": "370881"
  9040. }, {
  9041. "label": "邹城市",
  9042. "value": "370883"
  9043. }], [{
  9044. "label": "泰山区",
  9045. "value": "370902"
  9046. }, {
  9047. "label": "岱岳区",
  9048. "value": "370911"
  9049. }, {
  9050. "label": "宁阳县",
  9051. "value": "370921"
  9052. }, {
  9053. "label": "东平县",
  9054. "value": "370923"
  9055. }, {
  9056. "label": "新泰市",
  9057. "value": "370982"
  9058. }, {
  9059. "label": "肥城市",
  9060. "value": "370983"
  9061. }], [{
  9062. "label": "环翠区",
  9063. "value": "371002"
  9064. }, {
  9065. "label": "文登区",
  9066. "value": "371003"
  9067. }, {
  9068. "label": "威海火炬高技术产业开发区",
  9069. "value": "371071"
  9070. }, {
  9071. "label": "威海经济技术开发区",
  9072. "value": "371072"
  9073. }, {
  9074. "label": "威海临港经济技术开发区",
  9075. "value": "371073"
  9076. }, {
  9077. "label": "荣成市",
  9078. "value": "371082"
  9079. }, {
  9080. "label": "乳山市",
  9081. "value": "371083"
  9082. }], [{
  9083. "label": "东港区",
  9084. "value": "371102"
  9085. }, {
  9086. "label": "岚山区",
  9087. "value": "371103"
  9088. }, {
  9089. "label": "五莲县",
  9090. "value": "371121"
  9091. }, {
  9092. "label": "莒县",
  9093. "value": "371122"
  9094. }, {
  9095. "label": "日照经济技术开发区",
  9096. "value": "371171"
  9097. }, {
  9098. "label": "日照国际海洋城",
  9099. "value": "371172"
  9100. }], [{
  9101. "label": "莱城区",
  9102. "value": "371202"
  9103. }, {
  9104. "label": "钢城区",
  9105. "value": "371203"
  9106. }], [{
  9107. "label": "兰山区",
  9108. "value": "371302"
  9109. }, {
  9110. "label": "罗庄区",
  9111. "value": "371311"
  9112. }, {
  9113. "label": "河东区",
  9114. "value": "371312"
  9115. }, {
  9116. "label": "沂南县",
  9117. "value": "371321"
  9118. }, {
  9119. "label": "郯城县",
  9120. "value": "371322"
  9121. }, {
  9122. "label": "沂水县",
  9123. "value": "371323"
  9124. }, {
  9125. "label": "兰陵县",
  9126. "value": "371324"
  9127. }, {
  9128. "label": "费县",
  9129. "value": "371325"
  9130. }, {
  9131. "label": "平邑县",
  9132. "value": "371326"
  9133. }, {
  9134. "label": "莒南县",
  9135. "value": "371327"
  9136. }, {
  9137. "label": "蒙阴县",
  9138. "value": "371328"
  9139. }, {
  9140. "label": "临沭县",
  9141. "value": "371329"
  9142. }, {
  9143. "label": "临沂高新技术产业开发区",
  9144. "value": "371371"
  9145. }, {
  9146. "label": "临沂经济技术开发区",
  9147. "value": "371372"
  9148. }, {
  9149. "label": "临沂临港经济开发区",
  9150. "value": "371373"
  9151. }], [{
  9152. "label": "德城区",
  9153. "value": "371402"
  9154. }, {
  9155. "label": "陵城区",
  9156. "value": "371403"
  9157. }, {
  9158. "label": "宁津县",
  9159. "value": "371422"
  9160. }, {
  9161. "label": "庆云县",
  9162. "value": "371423"
  9163. }, {
  9164. "label": "临邑县",
  9165. "value": "371424"
  9166. }, {
  9167. "label": "齐河县",
  9168. "value": "371425"
  9169. }, {
  9170. "label": "平原县",
  9171. "value": "371426"
  9172. }, {
  9173. "label": "夏津县",
  9174. "value": "371427"
  9175. }, {
  9176. "label": "武城县",
  9177. "value": "371428"
  9178. }, {
  9179. "label": "德州经济技术开发区",
  9180. "value": "371471"
  9181. }, {
  9182. "label": "德州运河经济开发区",
  9183. "value": "371472"
  9184. }, {
  9185. "label": "乐陵市",
  9186. "value": "371481"
  9187. }, {
  9188. "label": "禹城市",
  9189. "value": "371482"
  9190. }], [{
  9191. "label": "东昌府区",
  9192. "value": "371502"
  9193. }, {
  9194. "label": "阳谷县",
  9195. "value": "371521"
  9196. }, {
  9197. "label": "莘县",
  9198. "value": "371522"
  9199. }, {
  9200. "label": "茌平县",
  9201. "value": "371523"
  9202. }, {
  9203. "label": "东阿县",
  9204. "value": "371524"
  9205. }, {
  9206. "label": "冠县",
  9207. "value": "371525"
  9208. }, {
  9209. "label": "高唐县",
  9210. "value": "371526"
  9211. }, {
  9212. "label": "临清市",
  9213. "value": "371581"
  9214. }], [{
  9215. "label": "滨城区",
  9216. "value": "371602"
  9217. }, {
  9218. "label": "沾化区",
  9219. "value": "371603"
  9220. }, {
  9221. "label": "惠民县",
  9222. "value": "371621"
  9223. }, {
  9224. "label": "阳信县",
  9225. "value": "371622"
  9226. }, {
  9227. "label": "无棣县",
  9228. "value": "371623"
  9229. }, {
  9230. "label": "博兴县",
  9231. "value": "371625"
  9232. }, {
  9233. "label": "邹平县",
  9234. "value": "371626"
  9235. }], [{
  9236. "label": "牡丹区",
  9237. "value": "371702"
  9238. }, {
  9239. "label": "定陶区",
  9240. "value": "371703"
  9241. }, {
  9242. "label": "曹县",
  9243. "value": "371721"
  9244. }, {
  9245. "label": "单县",
  9246. "value": "371722"
  9247. }, {
  9248. "label": "成武县",
  9249. "value": "371723"
  9250. }, {
  9251. "label": "巨野县",
  9252. "value": "371724"
  9253. }, {
  9254. "label": "郓城县",
  9255. "value": "371725"
  9256. }, {
  9257. "label": "鄄城县",
  9258. "value": "371726"
  9259. }, {
  9260. "label": "东明县",
  9261. "value": "371728"
  9262. }, {
  9263. "label": "菏泽经济技术开发区",
  9264. "value": "371771"
  9265. }, {
  9266. "label": "菏泽高新技术开发区",
  9267. "value": "371772"
  9268. }]], [[{
  9269. "label": "中原区",
  9270. "value": "410102"
  9271. }, {
  9272. "label": "二七区",
  9273. "value": "410103"
  9274. }, {
  9275. "label": "管城回族区",
  9276. "value": "410104"
  9277. }, {
  9278. "label": "金水区",
  9279. "value": "410105"
  9280. }, {
  9281. "label": "上街区",
  9282. "value": "410106"
  9283. }, {
  9284. "label": "惠济区",
  9285. "value": "410108"
  9286. }, {
  9287. "label": "中牟县",
  9288. "value": "410122"
  9289. }, {
  9290. "label": "郑州经济技术开发区",
  9291. "value": "410171"
  9292. }, {
  9293. "label": "郑州高新技术产业开发区",
  9294. "value": "410172"
  9295. }, {
  9296. "label": "郑州航空港经济综合实验区",
  9297. "value": "410173"
  9298. }, {
  9299. "label": "巩义市",
  9300. "value": "410181"
  9301. }, {
  9302. "label": "荥阳市",
  9303. "value": "410182"
  9304. }, {
  9305. "label": "新密市",
  9306. "value": "410183"
  9307. }, {
  9308. "label": "新郑市",
  9309. "value": "410184"
  9310. }, {
  9311. "label": "登封市",
  9312. "value": "410185"
  9313. }], [{
  9314. "label": "龙亭区",
  9315. "value": "410202"
  9316. }, {
  9317. "label": "顺河回族区",
  9318. "value": "410203"
  9319. }, {
  9320. "label": "鼓楼区",
  9321. "value": "410204"
  9322. }, {
  9323. "label": "禹王台区",
  9324. "value": "410205"
  9325. }, {
  9326. "label": "祥符区",
  9327. "value": "410212"
  9328. }, {
  9329. "label": "杞县",
  9330. "value": "410221"
  9331. }, {
  9332. "label": "通许县",
  9333. "value": "410222"
  9334. }, {
  9335. "label": "尉氏县",
  9336. "value": "410223"
  9337. }, {
  9338. "label": "兰考县",
  9339. "value": "410225"
  9340. }], [{
  9341. "label": "老城区",
  9342. "value": "410302"
  9343. }, {
  9344. "label": "西工区",
  9345. "value": "410303"
  9346. }, {
  9347. "label": "瀍河回族区",
  9348. "value": "410304"
  9349. }, {
  9350. "label": "涧西区",
  9351. "value": "410305"
  9352. }, {
  9353. "label": "吉利区",
  9354. "value": "410306"
  9355. }, {
  9356. "label": "洛龙区",
  9357. "value": "410311"
  9358. }, {
  9359. "label": "孟津县",
  9360. "value": "410322"
  9361. }, {
  9362. "label": "新安县",
  9363. "value": "410323"
  9364. }, {
  9365. "label": "栾川县",
  9366. "value": "410324"
  9367. }, {
  9368. "label": "嵩县",
  9369. "value": "410325"
  9370. }, {
  9371. "label": "汝阳县",
  9372. "value": "410326"
  9373. }, {
  9374. "label": "宜阳县",
  9375. "value": "410327"
  9376. }, {
  9377. "label": "洛宁县",
  9378. "value": "410328"
  9379. }, {
  9380. "label": "伊川县",
  9381. "value": "410329"
  9382. }, {
  9383. "label": "洛阳高新技术产业开发区",
  9384. "value": "410371"
  9385. }, {
  9386. "label": "偃师市",
  9387. "value": "410381"
  9388. }], [{
  9389. "label": "新华区",
  9390. "value": "410402"
  9391. }, {
  9392. "label": "卫东区",
  9393. "value": "410403"
  9394. }, {
  9395. "label": "石龙区",
  9396. "value": "410404"
  9397. }, {
  9398. "label": "湛河区",
  9399. "value": "410411"
  9400. }, {
  9401. "label": "宝丰县",
  9402. "value": "410421"
  9403. }, {
  9404. "label": "叶县",
  9405. "value": "410422"
  9406. }, {
  9407. "label": "鲁山县",
  9408. "value": "410423"
  9409. }, {
  9410. "label": "郏县",
  9411. "value": "410425"
  9412. }, {
  9413. "label": "平顶山高新技术产业开发区",
  9414. "value": "410471"
  9415. }, {
  9416. "label": "平顶山市新城区",
  9417. "value": "410472"
  9418. }, {
  9419. "label": "舞钢市",
  9420. "value": "410481"
  9421. }, {
  9422. "label": "汝州市",
  9423. "value": "410482"
  9424. }], [{
  9425. "label": "文峰区",
  9426. "value": "410502"
  9427. }, {
  9428. "label": "北关区",
  9429. "value": "410503"
  9430. }, {
  9431. "label": "殷都区",
  9432. "value": "410505"
  9433. }, {
  9434. "label": "龙安区",
  9435. "value": "410506"
  9436. }, {
  9437. "label": "安阳县",
  9438. "value": "410522"
  9439. }, {
  9440. "label": "汤阴县",
  9441. "value": "410523"
  9442. }, {
  9443. "label": "滑县",
  9444. "value": "410526"
  9445. }, {
  9446. "label": "内黄县",
  9447. "value": "410527"
  9448. }, {
  9449. "label": "安阳高新技术产业开发区",
  9450. "value": "410571"
  9451. }, {
  9452. "label": "林州市",
  9453. "value": "410581"
  9454. }], [{
  9455. "label": "鹤山区",
  9456. "value": "410602"
  9457. }, {
  9458. "label": "山城区",
  9459. "value": "410603"
  9460. }, {
  9461. "label": "淇滨区",
  9462. "value": "410611"
  9463. }, {
  9464. "label": "浚县",
  9465. "value": "410621"
  9466. }, {
  9467. "label": "淇县",
  9468. "value": "410622"
  9469. }, {
  9470. "label": "鹤壁经济技术开发区",
  9471. "value": "410671"
  9472. }], [{
  9473. "label": "红旗区",
  9474. "value": "410702"
  9475. }, {
  9476. "label": "卫滨区",
  9477. "value": "410703"
  9478. }, {
  9479. "label": "凤泉区",
  9480. "value": "410704"
  9481. }, {
  9482. "label": "牧野区",
  9483. "value": "410711"
  9484. }, {
  9485. "label": "新乡县",
  9486. "value": "410721"
  9487. }, {
  9488. "label": "获嘉县",
  9489. "value": "410724"
  9490. }, {
  9491. "label": "原阳县",
  9492. "value": "410725"
  9493. }, {
  9494. "label": "延津县",
  9495. "value": "410726"
  9496. }, {
  9497. "label": "封丘县",
  9498. "value": "410727"
  9499. }, {
  9500. "label": "长垣县",
  9501. "value": "410728"
  9502. }, {
  9503. "label": "新乡高新技术产业开发区",
  9504. "value": "410771"
  9505. }, {
  9506. "label": "新乡经济技术开发区",
  9507. "value": "410772"
  9508. }, {
  9509. "label": "新乡市平原城乡一体化示范区",
  9510. "value": "410773"
  9511. }, {
  9512. "label": "卫辉市",
  9513. "value": "410781"
  9514. }, {
  9515. "label": "辉县市",
  9516. "value": "410782"
  9517. }], [{
  9518. "label": "解放区",
  9519. "value": "410802"
  9520. }, {
  9521. "label": "中站区",
  9522. "value": "410803"
  9523. }, {
  9524. "label": "马村区",
  9525. "value": "410804"
  9526. }, {
  9527. "label": "山阳区",
  9528. "value": "410811"
  9529. }, {
  9530. "label": "修武县",
  9531. "value": "410821"
  9532. }, {
  9533. "label": "博爱县",
  9534. "value": "410822"
  9535. }, {
  9536. "label": "武陟县",
  9537. "value": "410823"
  9538. }, {
  9539. "label": "温县",
  9540. "value": "410825"
  9541. }, {
  9542. "label": "焦作城乡一体化示范区",
  9543. "value": "410871"
  9544. }, {
  9545. "label": "沁阳市",
  9546. "value": "410882"
  9547. }, {
  9548. "label": "孟州市",
  9549. "value": "410883"
  9550. }], [{
  9551. "label": "华龙区",
  9552. "value": "410902"
  9553. }, {
  9554. "label": "清丰县",
  9555. "value": "410922"
  9556. }, {
  9557. "label": "南乐县",
  9558. "value": "410923"
  9559. }, {
  9560. "label": "范县",
  9561. "value": "410926"
  9562. }, {
  9563. "label": "台前县",
  9564. "value": "410927"
  9565. }, {
  9566. "label": "濮阳县",
  9567. "value": "410928"
  9568. }, {
  9569. "label": "河南濮阳工业园区",
  9570. "value": "410971"
  9571. }, {
  9572. "label": "濮阳经济技术开发区",
  9573. "value": "410972"
  9574. }], [{
  9575. "label": "魏都区",
  9576. "value": "411002"
  9577. }, {
  9578. "label": "建安区",
  9579. "value": "411003"
  9580. }, {
  9581. "label": "鄢陵县",
  9582. "value": "411024"
  9583. }, {
  9584. "label": "襄城县",
  9585. "value": "411025"
  9586. }, {
  9587. "label": "许昌经济技术开发区",
  9588. "value": "411071"
  9589. }, {
  9590. "label": "禹州市",
  9591. "value": "411081"
  9592. }, {
  9593. "label": "长葛市",
  9594. "value": "411082"
  9595. }], [{
  9596. "label": "源汇区",
  9597. "value": "411102"
  9598. }, {
  9599. "label": "郾城区",
  9600. "value": "411103"
  9601. }, {
  9602. "label": "召陵区",
  9603. "value": "411104"
  9604. }, {
  9605. "label": "舞阳县",
  9606. "value": "411121"
  9607. }, {
  9608. "label": "临颍县",
  9609. "value": "411122"
  9610. }, {
  9611. "label": "漯河经济技术开发区",
  9612. "value": "411171"
  9613. }], [{
  9614. "label": "湖滨区",
  9615. "value": "411202"
  9616. }, {
  9617. "label": "陕州区",
  9618. "value": "411203"
  9619. }, {
  9620. "label": "渑池县",
  9621. "value": "411221"
  9622. }, {
  9623. "label": "卢氏县",
  9624. "value": "411224"
  9625. }, {
  9626. "label": "河南三门峡经济开发区",
  9627. "value": "411271"
  9628. }, {
  9629. "label": "义马市",
  9630. "value": "411281"
  9631. }, {
  9632. "label": "灵宝市",
  9633. "value": "411282"
  9634. }], [{
  9635. "label": "宛城区",
  9636. "value": "411302"
  9637. }, {
  9638. "label": "卧龙区",
  9639. "value": "411303"
  9640. }, {
  9641. "label": "南召县",
  9642. "value": "411321"
  9643. }, {
  9644. "label": "方城县",
  9645. "value": "411322"
  9646. }, {
  9647. "label": "西峡县",
  9648. "value": "411323"
  9649. }, {
  9650. "label": "镇平县",
  9651. "value": "411324"
  9652. }, {
  9653. "label": "内乡县",
  9654. "value": "411325"
  9655. }, {
  9656. "label": "淅川县",
  9657. "value": "411326"
  9658. }, {
  9659. "label": "社旗县",
  9660. "value": "411327"
  9661. }, {
  9662. "label": "唐河县",
  9663. "value": "411328"
  9664. }, {
  9665. "label": "新野县",
  9666. "value": "411329"
  9667. }, {
  9668. "label": "桐柏县",
  9669. "value": "411330"
  9670. }, {
  9671. "label": "南阳高新技术产业开发区",
  9672. "value": "411371"
  9673. }, {
  9674. "label": "南阳市城乡一体化示范区",
  9675. "value": "411372"
  9676. }, {
  9677. "label": "邓州市",
  9678. "value": "411381"
  9679. }], [{
  9680. "label": "梁园区",
  9681. "value": "411402"
  9682. }, {
  9683. "label": "睢阳区",
  9684. "value": "411403"
  9685. }, {
  9686. "label": "民权县",
  9687. "value": "411421"
  9688. }, {
  9689. "label": "睢县",
  9690. "value": "411422"
  9691. }, {
  9692. "label": "宁陵县",
  9693. "value": "411423"
  9694. }, {
  9695. "label": "柘城县",
  9696. "value": "411424"
  9697. }, {
  9698. "label": "虞城县",
  9699. "value": "411425"
  9700. }, {
  9701. "label": "夏邑县",
  9702. "value": "411426"
  9703. }, {
  9704. "label": "豫东综合物流产业聚集区",
  9705. "value": "411471"
  9706. }, {
  9707. "label": "河南商丘经济开发区",
  9708. "value": "411472"
  9709. }, {
  9710. "label": "永城市",
  9711. "value": "411481"
  9712. }], [{
  9713. "label": "浉河区",
  9714. "value": "411502"
  9715. }, {
  9716. "label": "平桥区",
  9717. "value": "411503"
  9718. }, {
  9719. "label": "罗山县",
  9720. "value": "411521"
  9721. }, {
  9722. "label": "光山县",
  9723. "value": "411522"
  9724. }, {
  9725. "label": "新县",
  9726. "value": "411523"
  9727. }, {
  9728. "label": "商城县",
  9729. "value": "411524"
  9730. }, {
  9731. "label": "固始县",
  9732. "value": "411525"
  9733. }, {
  9734. "label": "潢川县",
  9735. "value": "411526"
  9736. }, {
  9737. "label": "淮滨县",
  9738. "value": "411527"
  9739. }, {
  9740. "label": "息县",
  9741. "value": "411528"
  9742. }, {
  9743. "label": "信阳高新技术产业开发区",
  9744. "value": "411571"
  9745. }], [{
  9746. "label": "川汇区",
  9747. "value": "411602"
  9748. }, {
  9749. "label": "扶沟县",
  9750. "value": "411621"
  9751. }, {
  9752. "label": "西华县",
  9753. "value": "411622"
  9754. }, {
  9755. "label": "商水县",
  9756. "value": "411623"
  9757. }, {
  9758. "label": "沈丘县",
  9759. "value": "411624"
  9760. }, {
  9761. "label": "郸城县",
  9762. "value": "411625"
  9763. }, {
  9764. "label": "淮阳县",
  9765. "value": "411626"
  9766. }, {
  9767. "label": "太康县",
  9768. "value": "411627"
  9769. }, {
  9770. "label": "鹿邑县",
  9771. "value": "411628"
  9772. }, {
  9773. "label": "河南周口经济开发区",
  9774. "value": "411671"
  9775. }, {
  9776. "label": "项城市",
  9777. "value": "411681"
  9778. }], [{
  9779. "label": "驿城区",
  9780. "value": "411702"
  9781. }, {
  9782. "label": "西平县",
  9783. "value": "411721"
  9784. }, {
  9785. "label": "上蔡县",
  9786. "value": "411722"
  9787. }, {
  9788. "label": "平舆县",
  9789. "value": "411723"
  9790. }, {
  9791. "label": "正阳县",
  9792. "value": "411724"
  9793. }, {
  9794. "label": "确山县",
  9795. "value": "411725"
  9796. }, {
  9797. "label": "泌阳县",
  9798. "value": "411726"
  9799. }, {
  9800. "label": "汝南县",
  9801. "value": "411727"
  9802. }, {
  9803. "label": "遂平县",
  9804. "value": "411728"
  9805. }, {
  9806. "label": "新蔡县",
  9807. "value": "411729"
  9808. }, {
  9809. "label": "河南驻马店经济开发区",
  9810. "value": "411771"
  9811. }], [{
  9812. "label": "济源市",
  9813. "value": "419001"
  9814. }]], [[{
  9815. "label": "江岸区",
  9816. "value": "420102"
  9817. }, {
  9818. "label": "江汉区",
  9819. "value": "420103"
  9820. }, {
  9821. "label": "硚口区",
  9822. "value": "420104"
  9823. }, {
  9824. "label": "汉阳区",
  9825. "value": "420105"
  9826. }, {
  9827. "label": "武昌区",
  9828. "value": "420106"
  9829. }, {
  9830. "label": "青山区",
  9831. "value": "420107"
  9832. }, {
  9833. "label": "洪山区",
  9834. "value": "420111"
  9835. }, {
  9836. "label": "东西湖区",
  9837. "value": "420112"
  9838. }, {
  9839. "label": "汉南区",
  9840. "value": "420113"
  9841. }, {
  9842. "label": "蔡甸区",
  9843. "value": "420114"
  9844. }, {
  9845. "label": "江夏区",
  9846. "value": "420115"
  9847. }, {
  9848. "label": "黄陂区",
  9849. "value": "420116"
  9850. }, {
  9851. "label": "新洲区",
  9852. "value": "420117"
  9853. }], [{
  9854. "label": "黄石港区",
  9855. "value": "420202"
  9856. }, {
  9857. "label": "西塞山区",
  9858. "value": "420203"
  9859. }, {
  9860. "label": "下陆区",
  9861. "value": "420204"
  9862. }, {
  9863. "label": "铁山区",
  9864. "value": "420205"
  9865. }, {
  9866. "label": "阳新县",
  9867. "value": "420222"
  9868. }, {
  9869. "label": "大冶市",
  9870. "value": "420281"
  9871. }], [{
  9872. "label": "茅箭区",
  9873. "value": "420302"
  9874. }, {
  9875. "label": "张湾区",
  9876. "value": "420303"
  9877. }, {
  9878. "label": "郧阳区",
  9879. "value": "420304"
  9880. }, {
  9881. "label": "郧西县",
  9882. "value": "420322"
  9883. }, {
  9884. "label": "竹山县",
  9885. "value": "420323"
  9886. }, {
  9887. "label": "竹溪县",
  9888. "value": "420324"
  9889. }, {
  9890. "label": "房县",
  9891. "value": "420325"
  9892. }, {
  9893. "label": "丹江口市",
  9894. "value": "420381"
  9895. }], [{
  9896. "label": "西陵区",
  9897. "value": "420502"
  9898. }, {
  9899. "label": "伍家岗区",
  9900. "value": "420503"
  9901. }, {
  9902. "label": "点军区",
  9903. "value": "420504"
  9904. }, {
  9905. "label": "猇亭区",
  9906. "value": "420505"
  9907. }, {
  9908. "label": "夷陵区",
  9909. "value": "420506"
  9910. }, {
  9911. "label": "远安县",
  9912. "value": "420525"
  9913. }, {
  9914. "label": "兴山县",
  9915. "value": "420526"
  9916. }, {
  9917. "label": "秭归县",
  9918. "value": "420527"
  9919. }, {
  9920. "label": "长阳土家族自治县",
  9921. "value": "420528"
  9922. }, {
  9923. "label": "五峰土家族自治县",
  9924. "value": "420529"
  9925. }, {
  9926. "label": "宜都市",
  9927. "value": "420581"
  9928. }, {
  9929. "label": "当阳市",
  9930. "value": "420582"
  9931. }, {
  9932. "label": "枝江市",
  9933. "value": "420583"
  9934. }], [{
  9935. "label": "襄城区",
  9936. "value": "420602"
  9937. }, {
  9938. "label": "樊城区",
  9939. "value": "420606"
  9940. }, {
  9941. "label": "襄州区",
  9942. "value": "420607"
  9943. }, {
  9944. "label": "南漳县",
  9945. "value": "420624"
  9946. }, {
  9947. "label": "谷城县",
  9948. "value": "420625"
  9949. }, {
  9950. "label": "保康县",
  9951. "value": "420626"
  9952. }, {
  9953. "label": "老河口市",
  9954. "value": "420682"
  9955. }, {
  9956. "label": "枣阳市",
  9957. "value": "420683"
  9958. }, {
  9959. "label": "宜城市",
  9960. "value": "420684"
  9961. }], [{
  9962. "label": "梁子湖区",
  9963. "value": "420702"
  9964. }, {
  9965. "label": "华容区",
  9966. "value": "420703"
  9967. }, {
  9968. "label": "鄂城区",
  9969. "value": "420704"
  9970. }], [{
  9971. "label": "东宝区",
  9972. "value": "420802"
  9973. }, {
  9974. "label": "掇刀区",
  9975. "value": "420804"
  9976. }, {
  9977. "label": "京山县",
  9978. "value": "420821"
  9979. }, {
  9980. "label": "沙洋县",
  9981. "value": "420822"
  9982. }, {
  9983. "label": "钟祥市",
  9984. "value": "420881"
  9985. }], [{
  9986. "label": "孝南区",
  9987. "value": "420902"
  9988. }, {
  9989. "label": "孝昌县",
  9990. "value": "420921"
  9991. }, {
  9992. "label": "大悟县",
  9993. "value": "420922"
  9994. }, {
  9995. "label": "云梦县",
  9996. "value": "420923"
  9997. }, {
  9998. "label": "应城市",
  9999. "value": "420981"
  10000. }, {
  10001. "label": "安陆市",
  10002. "value": "420982"
  10003. }, {
  10004. "label": "汉川市",
  10005. "value": "420984"
  10006. }], [{
  10007. "label": "沙市区",
  10008. "value": "421002"
  10009. }, {
  10010. "label": "荆州区",
  10011. "value": "421003"
  10012. }, {
  10013. "label": "公安县",
  10014. "value": "421022"
  10015. }, {
  10016. "label": "监利县",
  10017. "value": "421023"
  10018. }, {
  10019. "label": "江陵县",
  10020. "value": "421024"
  10021. }, {
  10022. "label": "荆州经济技术开发区",
  10023. "value": "421071"
  10024. }, {
  10025. "label": "石首市",
  10026. "value": "421081"
  10027. }, {
  10028. "label": "洪湖市",
  10029. "value": "421083"
  10030. }, {
  10031. "label": "松滋市",
  10032. "value": "421087"
  10033. }], [{
  10034. "label": "黄州区",
  10035. "value": "421102"
  10036. }, {
  10037. "label": "团风县",
  10038. "value": "421121"
  10039. }, {
  10040. "label": "红安县",
  10041. "value": "421122"
  10042. }, {
  10043. "label": "罗田县",
  10044. "value": "421123"
  10045. }, {
  10046. "label": "英山县",
  10047. "value": "421124"
  10048. }, {
  10049. "label": "浠水县",
  10050. "value": "421125"
  10051. }, {
  10052. "label": "蕲春县",
  10053. "value": "421126"
  10054. }, {
  10055. "label": "黄梅县",
  10056. "value": "421127"
  10057. }, {
  10058. "label": "龙感湖管理区",
  10059. "value": "421171"
  10060. }, {
  10061. "label": "麻城市",
  10062. "value": "421181"
  10063. }, {
  10064. "label": "武穴市",
  10065. "value": "421182"
  10066. }], [{
  10067. "label": "咸安区",
  10068. "value": "421202"
  10069. }, {
  10070. "label": "嘉鱼县",
  10071. "value": "421221"
  10072. }, {
  10073. "label": "通城县",
  10074. "value": "421222"
  10075. }, {
  10076. "label": "崇阳县",
  10077. "value": "421223"
  10078. }, {
  10079. "label": "通山县",
  10080. "value": "421224"
  10081. }, {
  10082. "label": "赤壁市",
  10083. "value": "421281"
  10084. }], [{
  10085. "label": "曾都区",
  10086. "value": "421303"
  10087. }, {
  10088. "label": "随县",
  10089. "value": "421321"
  10090. }, {
  10091. "label": "广水市",
  10092. "value": "421381"
  10093. }], [{
  10094. "label": "恩施市",
  10095. "value": "422801"
  10096. }, {
  10097. "label": "利川市",
  10098. "value": "422802"
  10099. }, {
  10100. "label": "建始县",
  10101. "value": "422822"
  10102. }, {
  10103. "label": "巴东县",
  10104. "value": "422823"
  10105. }, {
  10106. "label": "宣恩县",
  10107. "value": "422825"
  10108. }, {
  10109. "label": "咸丰县",
  10110. "value": "422826"
  10111. }, {
  10112. "label": "来凤县",
  10113. "value": "422827"
  10114. }, {
  10115. "label": "鹤峰县",
  10116. "value": "422828"
  10117. }], [{
  10118. "label": "仙桃市",
  10119. "value": "429004"
  10120. }, {
  10121. "label": "潜江市",
  10122. "value": "429005"
  10123. }, {
  10124. "label": "天门市",
  10125. "value": "429006"
  10126. }, {
  10127. "label": "神农架林区",
  10128. "value": "429021"
  10129. }]], [[{
  10130. "label": "芙蓉区",
  10131. "value": "430102"
  10132. }, {
  10133. "label": "天心区",
  10134. "value": "430103"
  10135. }, {
  10136. "label": "岳麓区",
  10137. "value": "430104"
  10138. }, {
  10139. "label": "开福区",
  10140. "value": "430105"
  10141. }, {
  10142. "label": "雨花区",
  10143. "value": "430111"
  10144. }, {
  10145. "label": "望城区",
  10146. "value": "430112"
  10147. }, {
  10148. "label": "长沙县",
  10149. "value": "430121"
  10150. }, {
  10151. "label": "浏阳市",
  10152. "value": "430181"
  10153. }, {
  10154. "label": "宁乡市",
  10155. "value": "430182"
  10156. }], [{
  10157. "label": "荷塘区",
  10158. "value": "430202"
  10159. }, {
  10160. "label": "芦淞区",
  10161. "value": "430203"
  10162. }, {
  10163. "label": "石峰区",
  10164. "value": "430204"
  10165. }, {
  10166. "label": "天元区",
  10167. "value": "430211"
  10168. }, {
  10169. "label": "株洲县",
  10170. "value": "430221"
  10171. }, {
  10172. "label": "攸县",
  10173. "value": "430223"
  10174. }, {
  10175. "label": "茶陵县",
  10176. "value": "430224"
  10177. }, {
  10178. "label": "炎陵县",
  10179. "value": "430225"
  10180. }, {
  10181. "label": "云龙示范区",
  10182. "value": "430271"
  10183. }, {
  10184. "label": "醴陵市",
  10185. "value": "430281"
  10186. }], [{
  10187. "label": "雨湖区",
  10188. "value": "430302"
  10189. }, {
  10190. "label": "岳塘区",
  10191. "value": "430304"
  10192. }, {
  10193. "label": "湘潭县",
  10194. "value": "430321"
  10195. }, {
  10196. "label": "湖南湘潭高新技术产业园区",
  10197. "value": "430371"
  10198. }, {
  10199. "label": "湘潭昭山示范区",
  10200. "value": "430372"
  10201. }, {
  10202. "label": "湘潭九华示范区",
  10203. "value": "430373"
  10204. }, {
  10205. "label": "湘乡市",
  10206. "value": "430381"
  10207. }, {
  10208. "label": "韶山市",
  10209. "value": "430382"
  10210. }], [{
  10211. "label": "珠晖区",
  10212. "value": "430405"
  10213. }, {
  10214. "label": "雁峰区",
  10215. "value": "430406"
  10216. }, {
  10217. "label": "石鼓区",
  10218. "value": "430407"
  10219. }, {
  10220. "label": "蒸湘区",
  10221. "value": "430408"
  10222. }, {
  10223. "label": "南岳区",
  10224. "value": "430412"
  10225. }, {
  10226. "label": "衡阳县",
  10227. "value": "430421"
  10228. }, {
  10229. "label": "衡南县",
  10230. "value": "430422"
  10231. }, {
  10232. "label": "衡山县",
  10233. "value": "430423"
  10234. }, {
  10235. "label": "衡东县",
  10236. "value": "430424"
  10237. }, {
  10238. "label": "祁东县",
  10239. "value": "430426"
  10240. }, {
  10241. "label": "衡阳综合保税区",
  10242. "value": "430471"
  10243. }, {
  10244. "label": "湖南衡阳高新技术产业园区",
  10245. "value": "430472"
  10246. }, {
  10247. "label": "湖南衡阳松木经济开发区",
  10248. "value": "430473"
  10249. }, {
  10250. "label": "耒阳市",
  10251. "value": "430481"
  10252. }, {
  10253. "label": "常宁市",
  10254. "value": "430482"
  10255. }], [{
  10256. "label": "双清区",
  10257. "value": "430502"
  10258. }, {
  10259. "label": "大祥区",
  10260. "value": "430503"
  10261. }, {
  10262. "label": "北塔区",
  10263. "value": "430511"
  10264. }, {
  10265. "label": "邵东县",
  10266. "value": "430521"
  10267. }, {
  10268. "label": "新邵县",
  10269. "value": "430522"
  10270. }, {
  10271. "label": "邵阳县",
  10272. "value": "430523"
  10273. }, {
  10274. "label": "隆回县",
  10275. "value": "430524"
  10276. }, {
  10277. "label": "洞口县",
  10278. "value": "430525"
  10279. }, {
  10280. "label": "绥宁县",
  10281. "value": "430527"
  10282. }, {
  10283. "label": "新宁县",
  10284. "value": "430528"
  10285. }, {
  10286. "label": "城步苗族自治县",
  10287. "value": "430529"
  10288. }, {
  10289. "label": "武冈市",
  10290. "value": "430581"
  10291. }], [{
  10292. "label": "岳阳楼区",
  10293. "value": "430602"
  10294. }, {
  10295. "label": "云溪区",
  10296. "value": "430603"
  10297. }, {
  10298. "label": "君山区",
  10299. "value": "430611"
  10300. }, {
  10301. "label": "岳阳县",
  10302. "value": "430621"
  10303. }, {
  10304. "label": "华容县",
  10305. "value": "430623"
  10306. }, {
  10307. "label": "湘阴县",
  10308. "value": "430624"
  10309. }, {
  10310. "label": "平江县",
  10311. "value": "430626"
  10312. }, {
  10313. "label": "岳阳市屈原管理区",
  10314. "value": "430671"
  10315. }, {
  10316. "label": "汨罗市",
  10317. "value": "430681"
  10318. }, {
  10319. "label": "临湘市",
  10320. "value": "430682"
  10321. }], [{
  10322. "label": "武陵区",
  10323. "value": "430702"
  10324. }, {
  10325. "label": "鼎城区",
  10326. "value": "430703"
  10327. }, {
  10328. "label": "安乡县",
  10329. "value": "430721"
  10330. }, {
  10331. "label": "汉寿县",
  10332. "value": "430722"
  10333. }, {
  10334. "label": "澧县",
  10335. "value": "430723"
  10336. }, {
  10337. "label": "临澧县",
  10338. "value": "430724"
  10339. }, {
  10340. "label": "桃源县",
  10341. "value": "430725"
  10342. }, {
  10343. "label": "石门县",
  10344. "value": "430726"
  10345. }, {
  10346. "label": "常德市西洞庭管理区",
  10347. "value": "430771"
  10348. }, {
  10349. "label": "津市市",
  10350. "value": "430781"
  10351. }], [{
  10352. "label": "永定区",
  10353. "value": "430802"
  10354. }, {
  10355. "label": "武陵源区",
  10356. "value": "430811"
  10357. }, {
  10358. "label": "慈利县",
  10359. "value": "430821"
  10360. }, {
  10361. "label": "桑植县",
  10362. "value": "430822"
  10363. }], [{
  10364. "label": "资阳区",
  10365. "value": "430902"
  10366. }, {
  10367. "label": "赫山区",
  10368. "value": "430903"
  10369. }, {
  10370. "label": "南县",
  10371. "value": "430921"
  10372. }, {
  10373. "label": "桃江县",
  10374. "value": "430922"
  10375. }, {
  10376. "label": "安化县",
  10377. "value": "430923"
  10378. }, {
  10379. "label": "益阳市大通湖管理区",
  10380. "value": "430971"
  10381. }, {
  10382. "label": "湖南益阳高新技术产业园区",
  10383. "value": "430972"
  10384. }, {
  10385. "label": "沅江市",
  10386. "value": "430981"
  10387. }], [{
  10388. "label": "北湖区",
  10389. "value": "431002"
  10390. }, {
  10391. "label": "苏仙区",
  10392. "value": "431003"
  10393. }, {
  10394. "label": "桂阳县",
  10395. "value": "431021"
  10396. }, {
  10397. "label": "宜章县",
  10398. "value": "431022"
  10399. }, {
  10400. "label": "永兴县",
  10401. "value": "431023"
  10402. }, {
  10403. "label": "嘉禾县",
  10404. "value": "431024"
  10405. }, {
  10406. "label": "临武县",
  10407. "value": "431025"
  10408. }, {
  10409. "label": "汝城县",
  10410. "value": "431026"
  10411. }, {
  10412. "label": "桂东县",
  10413. "value": "431027"
  10414. }, {
  10415. "label": "安仁县",
  10416. "value": "431028"
  10417. }, {
  10418. "label": "资兴市",
  10419. "value": "431081"
  10420. }], [{
  10421. "label": "零陵区",
  10422. "value": "431102"
  10423. }, {
  10424. "label": "冷水滩区",
  10425. "value": "431103"
  10426. }, {
  10427. "label": "祁阳县",
  10428. "value": "431121"
  10429. }, {
  10430. "label": "东安县",
  10431. "value": "431122"
  10432. }, {
  10433. "label": "双牌县",
  10434. "value": "431123"
  10435. }, {
  10436. "label": "道县",
  10437. "value": "431124"
  10438. }, {
  10439. "label": "江永县",
  10440. "value": "431125"
  10441. }, {
  10442. "label": "宁远县",
  10443. "value": "431126"
  10444. }, {
  10445. "label": "蓝山县",
  10446. "value": "431127"
  10447. }, {
  10448. "label": "新田县",
  10449. "value": "431128"
  10450. }, {
  10451. "label": "江华瑶族自治县",
  10452. "value": "431129"
  10453. }, {
  10454. "label": "永州经济技术开发区",
  10455. "value": "431171"
  10456. }, {
  10457. "label": "永州市金洞管理区",
  10458. "value": "431172"
  10459. }, {
  10460. "label": "永州市回龙圩管理区",
  10461. "value": "431173"
  10462. }], [{
  10463. "label": "鹤城区",
  10464. "value": "431202"
  10465. }, {
  10466. "label": "中方县",
  10467. "value": "431221"
  10468. }, {
  10469. "label": "沅陵县",
  10470. "value": "431222"
  10471. }, {
  10472. "label": "辰溪县",
  10473. "value": "431223"
  10474. }, {
  10475. "label": "溆浦县",
  10476. "value": "431224"
  10477. }, {
  10478. "label": "会同县",
  10479. "value": "431225"
  10480. }, {
  10481. "label": "麻阳苗族自治县",
  10482. "value": "431226"
  10483. }, {
  10484. "label": "新晃侗族自治县",
  10485. "value": "431227"
  10486. }, {
  10487. "label": "芷江侗族自治县",
  10488. "value": "431228"
  10489. }, {
  10490. "label": "靖州苗族侗族自治县",
  10491. "value": "431229"
  10492. }, {
  10493. "label": "通道侗族自治县",
  10494. "value": "431230"
  10495. }, {
  10496. "label": "怀化市洪江管理区",
  10497. "value": "431271"
  10498. }, {
  10499. "label": "洪江市",
  10500. "value": "431281"
  10501. }], [{
  10502. "label": "娄星区",
  10503. "value": "431302"
  10504. }, {
  10505. "label": "双峰县",
  10506. "value": "431321"
  10507. }, {
  10508. "label": "新化县",
  10509. "value": "431322"
  10510. }, {
  10511. "label": "冷水江市",
  10512. "value": "431381"
  10513. }, {
  10514. "label": "涟源市",
  10515. "value": "431382"
  10516. }], [{
  10517. "label": "吉首市",
  10518. "value": "433101"
  10519. }, {
  10520. "label": "泸溪县",
  10521. "value": "433122"
  10522. }, {
  10523. "label": "凤凰县",
  10524. "value": "433123"
  10525. }, {
  10526. "label": "花垣县",
  10527. "value": "433124"
  10528. }, {
  10529. "label": "保靖县",
  10530. "value": "433125"
  10531. }, {
  10532. "label": "古丈县",
  10533. "value": "433126"
  10534. }, {
  10535. "label": "永顺县",
  10536. "value": "433127"
  10537. }, {
  10538. "label": "龙山县",
  10539. "value": "433130"
  10540. }, {
  10541. "label": "湖南吉首经济开发区",
  10542. "value": "433172"
  10543. }, {
  10544. "label": "湖南永顺经济开发区",
  10545. "value": "433173"
  10546. }]], [[{
  10547. "label": "荔湾区",
  10548. "value": "440103"
  10549. }, {
  10550. "label": "越秀区",
  10551. "value": "440104"
  10552. }, {
  10553. "label": "海珠区",
  10554. "value": "440105"
  10555. }, {
  10556. "label": "天河区",
  10557. "value": "440106"
  10558. }, {
  10559. "label": "白云区",
  10560. "value": "440111"
  10561. }, {
  10562. "label": "黄埔区",
  10563. "value": "440112"
  10564. }, {
  10565. "label": "番禺区",
  10566. "value": "440113"
  10567. }, {
  10568. "label": "花都区",
  10569. "value": "440114"
  10570. }, {
  10571. "label": "南沙区",
  10572. "value": "440115"
  10573. }, {
  10574. "label": "从化区",
  10575. "value": "440117"
  10576. }, {
  10577. "label": "增城区",
  10578. "value": "440118"
  10579. }], [{
  10580. "label": "武江区",
  10581. "value": "440203"
  10582. }, {
  10583. "label": "浈江区",
  10584. "value": "440204"
  10585. }, {
  10586. "label": "曲江区",
  10587. "value": "440205"
  10588. }, {
  10589. "label": "始兴县",
  10590. "value": "440222"
  10591. }, {
  10592. "label": "仁化县",
  10593. "value": "440224"
  10594. }, {
  10595. "label": "翁源县",
  10596. "value": "440229"
  10597. }, {
  10598. "label": "乳源瑶族自治县",
  10599. "value": "440232"
  10600. }, {
  10601. "label": "新丰县",
  10602. "value": "440233"
  10603. }, {
  10604. "label": "乐昌市",
  10605. "value": "440281"
  10606. }, {
  10607. "label": "南雄市",
  10608. "value": "440282"
  10609. }], [{
  10610. "label": "罗湖区",
  10611. "value": "440303"
  10612. }, {
  10613. "label": "福田区",
  10614. "value": "440304"
  10615. }, {
  10616. "label": "南山区",
  10617. "value": "440305"
  10618. }, {
  10619. "label": "宝安区",
  10620. "value": "440306"
  10621. }, {
  10622. "label": "龙岗区",
  10623. "value": "440307"
  10624. }, {
  10625. "label": "盐田区",
  10626. "value": "440308"
  10627. }, {
  10628. "label": "龙华区",
  10629. "value": "440309"
  10630. }, {
  10631. "label": "坪山区",
  10632. "value": "440310"
  10633. }], [{
  10634. "label": "香洲区",
  10635. "value": "440402"
  10636. }, {
  10637. "label": "斗门区",
  10638. "value": "440403"
  10639. }, {
  10640. "label": "金湾区",
  10641. "value": "440404"
  10642. }], [{
  10643. "label": "龙湖区",
  10644. "value": "440507"
  10645. }, {
  10646. "label": "金平区",
  10647. "value": "440511"
  10648. }, {
  10649. "label": "濠江区",
  10650. "value": "440512"
  10651. }, {
  10652. "label": "潮阳区",
  10653. "value": "440513"
  10654. }, {
  10655. "label": "潮南区",
  10656. "value": "440514"
  10657. }, {
  10658. "label": "澄海区",
  10659. "value": "440515"
  10660. }, {
  10661. "label": "南澳县",
  10662. "value": "440523"
  10663. }], [{
  10664. "label": "禅城区",
  10665. "value": "440604"
  10666. }, {
  10667. "label": "南海区",
  10668. "value": "440605"
  10669. }, {
  10670. "label": "顺德区",
  10671. "value": "440606"
  10672. }, {
  10673. "label": "三水区",
  10674. "value": "440607"
  10675. }, {
  10676. "label": "高明区",
  10677. "value": "440608"
  10678. }], [{
  10679. "label": "蓬江区",
  10680. "value": "440703"
  10681. }, {
  10682. "label": "江海区",
  10683. "value": "440704"
  10684. }, {
  10685. "label": "新会区",
  10686. "value": "440705"
  10687. }, {
  10688. "label": "台山市",
  10689. "value": "440781"
  10690. }, {
  10691. "label": "开平市",
  10692. "value": "440783"
  10693. }, {
  10694. "label": "鹤山市",
  10695. "value": "440784"
  10696. }, {
  10697. "label": "恩平市",
  10698. "value": "440785"
  10699. }], [{
  10700. "label": "赤坎区",
  10701. "value": "440802"
  10702. }, {
  10703. "label": "霞山区",
  10704. "value": "440803"
  10705. }, {
  10706. "label": "坡头区",
  10707. "value": "440804"
  10708. }, {
  10709. "label": "麻章区",
  10710. "value": "440811"
  10711. }, {
  10712. "label": "遂溪县",
  10713. "value": "440823"
  10714. }, {
  10715. "label": "徐闻县",
  10716. "value": "440825"
  10717. }, {
  10718. "label": "廉江市",
  10719. "value": "440881"
  10720. }, {
  10721. "label": "雷州市",
  10722. "value": "440882"
  10723. }, {
  10724. "label": "吴川市",
  10725. "value": "440883"
  10726. }], [{
  10727. "label": "茂南区",
  10728. "value": "440902"
  10729. }, {
  10730. "label": "电白区",
  10731. "value": "440904"
  10732. }, {
  10733. "label": "高州市",
  10734. "value": "440981"
  10735. }, {
  10736. "label": "化州市",
  10737. "value": "440982"
  10738. }, {
  10739. "label": "信宜市",
  10740. "value": "440983"
  10741. }], [{
  10742. "label": "端州区",
  10743. "value": "441202"
  10744. }, {
  10745. "label": "鼎湖区",
  10746. "value": "441203"
  10747. }, {
  10748. "label": "高要区",
  10749. "value": "441204"
  10750. }, {
  10751. "label": "广宁县",
  10752. "value": "441223"
  10753. }, {
  10754. "label": "怀集县",
  10755. "value": "441224"
  10756. }, {
  10757. "label": "封开县",
  10758. "value": "441225"
  10759. }, {
  10760. "label": "德庆县",
  10761. "value": "441226"
  10762. }, {
  10763. "label": "四会市",
  10764. "value": "441284"
  10765. }], [{
  10766. "label": "惠城区",
  10767. "value": "441302"
  10768. }, {
  10769. "label": "惠阳区",
  10770. "value": "441303"
  10771. }, {
  10772. "label": "博罗县",
  10773. "value": "441322"
  10774. }, {
  10775. "label": "惠东县",
  10776. "value": "441323"
  10777. }, {
  10778. "label": "龙门县",
  10779. "value": "441324"
  10780. }], [{
  10781. "label": "梅江区",
  10782. "value": "441402"
  10783. }, {
  10784. "label": "梅县区",
  10785. "value": "441403"
  10786. }, {
  10787. "label": "大埔县",
  10788. "value": "441422"
  10789. }, {
  10790. "label": "丰顺县",
  10791. "value": "441423"
  10792. }, {
  10793. "label": "五华县",
  10794. "value": "441424"
  10795. }, {
  10796. "label": "平远县",
  10797. "value": "441426"
  10798. }, {
  10799. "label": "蕉岭县",
  10800. "value": "441427"
  10801. }, {
  10802. "label": "兴宁市",
  10803. "value": "441481"
  10804. }], [{
  10805. "label": "城区",
  10806. "value": "441502"
  10807. }, {
  10808. "label": "海丰县",
  10809. "value": "441521"
  10810. }, {
  10811. "label": "陆河县",
  10812. "value": "441523"
  10813. }, {
  10814. "label": "陆丰市",
  10815. "value": "441581"
  10816. }], [{
  10817. "label": "源城区",
  10818. "value": "441602"
  10819. }, {
  10820. "label": "紫金县",
  10821. "value": "441621"
  10822. }, {
  10823. "label": "龙川县",
  10824. "value": "441622"
  10825. }, {
  10826. "label": "连平县",
  10827. "value": "441623"
  10828. }, {
  10829. "label": "和平县",
  10830. "value": "441624"
  10831. }, {
  10832. "label": "东源县",
  10833. "value": "441625"
  10834. }], [{
  10835. "label": "江城区",
  10836. "value": "441702"
  10837. }, {
  10838. "label": "阳东区",
  10839. "value": "441704"
  10840. }, {
  10841. "label": "阳西县",
  10842. "value": "441721"
  10843. }, {
  10844. "label": "阳春市",
  10845. "value": "441781"
  10846. }], [{
  10847. "label": "清城区",
  10848. "value": "441802"
  10849. }, {
  10850. "label": "清新区",
  10851. "value": "441803"
  10852. }, {
  10853. "label": "佛冈县",
  10854. "value": "441821"
  10855. }, {
  10856. "label": "阳山县",
  10857. "value": "441823"
  10858. }, {
  10859. "label": "连山壮族瑶族自治县",
  10860. "value": "441825"
  10861. }, {
  10862. "label": "连南瑶族自治县",
  10863. "value": "441826"
  10864. }, {
  10865. "label": "英德市",
  10866. "value": "441881"
  10867. }, {
  10868. "label": "连州市",
  10869. "value": "441882"
  10870. }], [{
  10871. "label": "东莞市",
  10872. "value": "441900"
  10873. }], [{
  10874. "label": "中山市",
  10875. "value": "442000"
  10876. }], [{
  10877. "label": "湘桥区",
  10878. "value": "445102"
  10879. }, {
  10880. "label": "潮安区",
  10881. "value": "445103"
  10882. }, {
  10883. "label": "饶平县",
  10884. "value": "445122"
  10885. }], [{
  10886. "label": "榕城区",
  10887. "value": "445202"
  10888. }, {
  10889. "label": "揭东区",
  10890. "value": "445203"
  10891. }, {
  10892. "label": "揭西县",
  10893. "value": "445222"
  10894. }, {
  10895. "label": "惠来县",
  10896. "value": "445224"
  10897. }, {
  10898. "label": "普宁市",
  10899. "value": "445281"
  10900. }], [{
  10901. "label": "云城区",
  10902. "value": "445302"
  10903. }, {
  10904. "label": "云安区",
  10905. "value": "445303"
  10906. }, {
  10907. "label": "新兴县",
  10908. "value": "445321"
  10909. }, {
  10910. "label": "郁南县",
  10911. "value": "445322"
  10912. }, {
  10913. "label": "罗定市",
  10914. "value": "445381"
  10915. }]], [[{
  10916. "label": "兴宁区",
  10917. "value": "450102"
  10918. }, {
  10919. "label": "青秀区",
  10920. "value": "450103"
  10921. }, {
  10922. "label": "江南区",
  10923. "value": "450105"
  10924. }, {
  10925. "label": "西乡塘区",
  10926. "value": "450107"
  10927. }, {
  10928. "label": "良庆区",
  10929. "value": "450108"
  10930. }, {
  10931. "label": "邕宁区",
  10932. "value": "450109"
  10933. }, {
  10934. "label": "武鸣区",
  10935. "value": "450110"
  10936. }, {
  10937. "label": "隆安县",
  10938. "value": "450123"
  10939. }, {
  10940. "label": "马山县",
  10941. "value": "450124"
  10942. }, {
  10943. "label": "上林县",
  10944. "value": "450125"
  10945. }, {
  10946. "label": "宾阳县",
  10947. "value": "450126"
  10948. }, {
  10949. "label": "横县",
  10950. "value": "450127"
  10951. }], [{
  10952. "label": "城中区",
  10953. "value": "450202"
  10954. }, {
  10955. "label": "鱼峰区",
  10956. "value": "450203"
  10957. }, {
  10958. "label": "柳南区",
  10959. "value": "450204"
  10960. }, {
  10961. "label": "柳北区",
  10962. "value": "450205"
  10963. }, {
  10964. "label": "柳江区",
  10965. "value": "450206"
  10966. }, {
  10967. "label": "柳城县",
  10968. "value": "450222"
  10969. }, {
  10970. "label": "鹿寨县",
  10971. "value": "450223"
  10972. }, {
  10973. "label": "融安县",
  10974. "value": "450224"
  10975. }, {
  10976. "label": "融水苗族自治县",
  10977. "value": "450225"
  10978. }, {
  10979. "label": "三江侗族自治县",
  10980. "value": "450226"
  10981. }], [{
  10982. "label": "秀峰区",
  10983. "value": "450302"
  10984. }, {
  10985. "label": "叠彩区",
  10986. "value": "450303"
  10987. }, {
  10988. "label": "象山区",
  10989. "value": "450304"
  10990. }, {
  10991. "label": "七星区",
  10992. "value": "450305"
  10993. }, {
  10994. "label": "雁山区",
  10995. "value": "450311"
  10996. }, {
  10997. "label": "临桂区",
  10998. "value": "450312"
  10999. }, {
  11000. "label": "阳朔县",
  11001. "value": "450321"
  11002. }, {
  11003. "label": "灵川县",
  11004. "value": "450323"
  11005. }, {
  11006. "label": "全州县",
  11007. "value": "450324"
  11008. }, {
  11009. "label": "兴安县",
  11010. "value": "450325"
  11011. }, {
  11012. "label": "永福县",
  11013. "value": "450326"
  11014. }, {
  11015. "label": "灌阳县",
  11016. "value": "450327"
  11017. }, {
  11018. "label": "龙胜各族自治县",
  11019. "value": "450328"
  11020. }, {
  11021. "label": "资源县",
  11022. "value": "450329"
  11023. }, {
  11024. "label": "平乐县",
  11025. "value": "450330"
  11026. }, {
  11027. "label": "荔浦县",
  11028. "value": "450331"
  11029. }, {
  11030. "label": "恭城瑶族自治县",
  11031. "value": "450332"
  11032. }], [{
  11033. "label": "万秀区",
  11034. "value": "450403"
  11035. }, {
  11036. "label": "长洲区",
  11037. "value": "450405"
  11038. }, {
  11039. "label": "龙圩区",
  11040. "value": "450406"
  11041. }, {
  11042. "label": "苍梧县",
  11043. "value": "450421"
  11044. }, {
  11045. "label": "藤县",
  11046. "value": "450422"
  11047. }, {
  11048. "label": "蒙山县",
  11049. "value": "450423"
  11050. }, {
  11051. "label": "岑溪市",
  11052. "value": "450481"
  11053. }], [{
  11054. "label": "海城区",
  11055. "value": "450502"
  11056. }, {
  11057. "label": "银海区",
  11058. "value": "450503"
  11059. }, {
  11060. "label": "铁山港区",
  11061. "value": "450512"
  11062. }, {
  11063. "label": "合浦县",
  11064. "value": "450521"
  11065. }], [{
  11066. "label": "港口区",
  11067. "value": "450602"
  11068. }, {
  11069. "label": "防城区",
  11070. "value": "450603"
  11071. }, {
  11072. "label": "上思县",
  11073. "value": "450621"
  11074. }, {
  11075. "label": "东兴市",
  11076. "value": "450681"
  11077. }], [{
  11078. "label": "钦南区",
  11079. "value": "450702"
  11080. }, {
  11081. "label": "钦北区",
  11082. "value": "450703"
  11083. }, {
  11084. "label": "灵山县",
  11085. "value": "450721"
  11086. }, {
  11087. "label": "浦北县",
  11088. "value": "450722"
  11089. }], [{
  11090. "label": "港北区",
  11091. "value": "450802"
  11092. }, {
  11093. "label": "港南区",
  11094. "value": "450803"
  11095. }, {
  11096. "label": "覃塘区",
  11097. "value": "450804"
  11098. }, {
  11099. "label": "平南县",
  11100. "value": "450821"
  11101. }, {
  11102. "label": "桂平市",
  11103. "value": "450881"
  11104. }], [{
  11105. "label": "玉州区",
  11106. "value": "450902"
  11107. }, {
  11108. "label": "福绵区",
  11109. "value": "450903"
  11110. }, {
  11111. "label": "容县",
  11112. "value": "450921"
  11113. }, {
  11114. "label": "陆川县",
  11115. "value": "450922"
  11116. }, {
  11117. "label": "博白县",
  11118. "value": "450923"
  11119. }, {
  11120. "label": "兴业县",
  11121. "value": "450924"
  11122. }, {
  11123. "label": "北流市",
  11124. "value": "450981"
  11125. }], [{
  11126. "label": "右江区",
  11127. "value": "451002"
  11128. }, {
  11129. "label": "田阳县",
  11130. "value": "451021"
  11131. }, {
  11132. "label": "田东县",
  11133. "value": "451022"
  11134. }, {
  11135. "label": "平果县",
  11136. "value": "451023"
  11137. }, {
  11138. "label": "德保县",
  11139. "value": "451024"
  11140. }, {
  11141. "label": "那坡县",
  11142. "value": "451026"
  11143. }, {
  11144. "label": "凌云县",
  11145. "value": "451027"
  11146. }, {
  11147. "label": "乐业县",
  11148. "value": "451028"
  11149. }, {
  11150. "label": "田林县",
  11151. "value": "451029"
  11152. }, {
  11153. "label": "西林县",
  11154. "value": "451030"
  11155. }, {
  11156. "label": "隆林各族自治县",
  11157. "value": "451031"
  11158. }, {
  11159. "label": "靖西市",
  11160. "value": "451081"
  11161. }], [{
  11162. "label": "八步区",
  11163. "value": "451102"
  11164. }, {
  11165. "label": "平桂区",
  11166. "value": "451103"
  11167. }, {
  11168. "label": "昭平县",
  11169. "value": "451121"
  11170. }, {
  11171. "label": "钟山县",
  11172. "value": "451122"
  11173. }, {
  11174. "label": "富川瑶族自治县",
  11175. "value": "451123"
  11176. }], [{
  11177. "label": "金城江区",
  11178. "value": "451202"
  11179. }, {
  11180. "label": "宜州区",
  11181. "value": "451203"
  11182. }, {
  11183. "label": "南丹县",
  11184. "value": "451221"
  11185. }, {
  11186. "label": "天峨县",
  11187. "value": "451222"
  11188. }, {
  11189. "label": "凤山县",
  11190. "value": "451223"
  11191. }, {
  11192. "label": "东兰县",
  11193. "value": "451224"
  11194. }, {
  11195. "label": "罗城仫佬族自治县",
  11196. "value": "451225"
  11197. }, {
  11198. "label": "环江毛南族自治县",
  11199. "value": "451226"
  11200. }, {
  11201. "label": "巴马瑶族自治县",
  11202. "value": "451227"
  11203. }, {
  11204. "label": "都安瑶族自治县",
  11205. "value": "451228"
  11206. }, {
  11207. "label": "大化瑶族自治县",
  11208. "value": "451229"
  11209. }], [{
  11210. "label": "兴宾区",
  11211. "value": "451302"
  11212. }, {
  11213. "label": "忻城县",
  11214. "value": "451321"
  11215. }, {
  11216. "label": "象州县",
  11217. "value": "451322"
  11218. }, {
  11219. "label": "武宣县",
  11220. "value": "451323"
  11221. }, {
  11222. "label": "金秀瑶族自治县",
  11223. "value": "451324"
  11224. }, {
  11225. "label": "合山市",
  11226. "value": "451381"
  11227. }], [{
  11228. "label": "江州区",
  11229. "value": "451402"
  11230. }, {
  11231. "label": "扶绥县",
  11232. "value": "451421"
  11233. }, {
  11234. "label": "宁明县",
  11235. "value": "451422"
  11236. }, {
  11237. "label": "龙州县",
  11238. "value": "451423"
  11239. }, {
  11240. "label": "大新县",
  11241. "value": "451424"
  11242. }, {
  11243. "label": "天等县",
  11244. "value": "451425"
  11245. }, {
  11246. "label": "凭祥市",
  11247. "value": "451481"
  11248. }]], [[{
  11249. "label": "秀英区",
  11250. "value": "460105"
  11251. }, {
  11252. "label": "龙华区",
  11253. "value": "460106"
  11254. }, {
  11255. "label": "琼山区",
  11256. "value": "460107"
  11257. }, {
  11258. "label": "美兰区",
  11259. "value": "460108"
  11260. }], [{
  11261. "label": "海棠区",
  11262. "value": "460202"
  11263. }, {
  11264. "label": "吉阳区",
  11265. "value": "460203"
  11266. }, {
  11267. "label": "天涯区",
  11268. "value": "460204"
  11269. }, {
  11270. "label": "崖州区",
  11271. "value": "460205"
  11272. }], [{
  11273. "label": "西沙群岛",
  11274. "value": "460321"
  11275. }, {
  11276. "label": "南沙群岛",
  11277. "value": "460322"
  11278. }, {
  11279. "label": "中沙群岛的岛礁及其海域",
  11280. "value": "460323"
  11281. }], [{
  11282. "label": "儋州市",
  11283. "value": "460400"
  11284. }], [{
  11285. "label": "五指山市",
  11286. "value": "469001"
  11287. }, {
  11288. "label": "琼海市",
  11289. "value": "469002"
  11290. }, {
  11291. "label": "文昌市",
  11292. "value": "469005"
  11293. }, {
  11294. "label": "万宁市",
  11295. "value": "469006"
  11296. }, {
  11297. "label": "东方市",
  11298. "value": "469007"
  11299. }, {
  11300. "label": "定安县",
  11301. "value": "469021"
  11302. }, {
  11303. "label": "屯昌县",
  11304. "value": "469022"
  11305. }, {
  11306. "label": "澄迈县",
  11307. "value": "469023"
  11308. }, {
  11309. "label": "临高县",
  11310. "value": "469024"
  11311. }, {
  11312. "label": "白沙黎族自治县",
  11313. "value": "469025"
  11314. }, {
  11315. "label": "昌江黎族自治县",
  11316. "value": "469026"
  11317. }, {
  11318. "label": "乐东黎族自治县",
  11319. "value": "469027"
  11320. }, {
  11321. "label": "陵水黎族自治县",
  11322. "value": "469028"
  11323. }, {
  11324. "label": "保亭黎族苗族自治县",
  11325. "value": "469029"
  11326. }, {
  11327. "label": "琼中黎族苗族自治县",
  11328. "value": "469030"
  11329. }]], [[{
  11330. "label": "万州区",
  11331. "value": "500101"
  11332. }, {
  11333. "label": "涪陵区",
  11334. "value": "500102"
  11335. }, {
  11336. "label": "渝中区",
  11337. "value": "500103"
  11338. }, {
  11339. "label": "大渡口区",
  11340. "value": "500104"
  11341. }, {
  11342. "label": "江北区",
  11343. "value": "500105"
  11344. }, {
  11345. "label": "沙坪坝区",
  11346. "value": "500106"
  11347. }, {
  11348. "label": "九龙坡区",
  11349. "value": "500107"
  11350. }, {
  11351. "label": "南岸区",
  11352. "value": "500108"
  11353. }, {
  11354. "label": "北碚区",
  11355. "value": "500109"
  11356. }, {
  11357. "label": "綦江区",
  11358. "value": "500110"
  11359. }, {
  11360. "label": "大足区",
  11361. "value": "500111"
  11362. }, {
  11363. "label": "渝北区",
  11364. "value": "500112"
  11365. }, {
  11366. "label": "巴南区",
  11367. "value": "500113"
  11368. }, {
  11369. "label": "黔江区",
  11370. "value": "500114"
  11371. }, {
  11372. "label": "长寿区",
  11373. "value": "500115"
  11374. }, {
  11375. "label": "江津区",
  11376. "value": "500116"
  11377. }, {
  11378. "label": "合川区",
  11379. "value": "500117"
  11380. }, {
  11381. "label": "永川区",
  11382. "value": "500118"
  11383. }, {
  11384. "label": "南川区",
  11385. "value": "500119"
  11386. }, {
  11387. "label": "璧山区",
  11388. "value": "500120"
  11389. }, {
  11390. "label": "铜梁区",
  11391. "value": "500151"
  11392. }, {
  11393. "label": "潼南区",
  11394. "value": "500152"
  11395. }, {
  11396. "label": "荣昌区",
  11397. "value": "500153"
  11398. }, {
  11399. "label": "开州区",
  11400. "value": "500154"
  11401. }, {
  11402. "label": "梁平区",
  11403. "value": "500155"
  11404. }, {
  11405. "label": "武隆区",
  11406. "value": "500156"
  11407. }], [{
  11408. "label": "城口县",
  11409. "value": "500229"
  11410. }, {
  11411. "label": "丰都县",
  11412. "value": "500230"
  11413. }, {
  11414. "label": "垫江县",
  11415. "value": "500231"
  11416. }, {
  11417. "label": "忠县",
  11418. "value": "500233"
  11419. }, {
  11420. "label": "云阳县",
  11421. "value": "500235"
  11422. }, {
  11423. "label": "奉节县",
  11424. "value": "500236"
  11425. }, {
  11426. "label": "巫山县",
  11427. "value": "500237"
  11428. }, {
  11429. "label": "巫溪县",
  11430. "value": "500238"
  11431. }, {
  11432. "label": "石柱土家族自治县",
  11433. "value": "500240"
  11434. }, {
  11435. "label": "秀山土家族苗族自治县",
  11436. "value": "500241"
  11437. }, {
  11438. "label": "酉阳土家族苗族自治县",
  11439. "value": "500242"
  11440. }, {
  11441. "label": "彭水苗族土家族自治县",
  11442. "value": "500243"
  11443. }]], [[{
  11444. "label": "锦江区",
  11445. "value": "510104"
  11446. }, {
  11447. "label": "青羊区",
  11448. "value": "510105"
  11449. }, {
  11450. "label": "金牛区",
  11451. "value": "510106"
  11452. }, {
  11453. "label": "武侯区",
  11454. "value": "510107"
  11455. }, {
  11456. "label": "成华区",
  11457. "value": "510108"
  11458. }, {
  11459. "label": "龙泉驿区",
  11460. "value": "510112"
  11461. }, {
  11462. "label": "青白江区",
  11463. "value": "510113"
  11464. }, {
  11465. "label": "新都区",
  11466. "value": "510114"
  11467. }, {
  11468. "label": "温江区",
  11469. "value": "510115"
  11470. }, {
  11471. "label": "双流区",
  11472. "value": "510116"
  11473. }, {
  11474. "label": "郫都区",
  11475. "value": "510117"
  11476. }, {
  11477. "label": "金堂县",
  11478. "value": "510121"
  11479. }, {
  11480. "label": "大邑县",
  11481. "value": "510129"
  11482. }, {
  11483. "label": "蒲江县",
  11484. "value": "510131"
  11485. }, {
  11486. "label": "新津县",
  11487. "value": "510132"
  11488. }, {
  11489. "label": "都江堰市",
  11490. "value": "510181"
  11491. }, {
  11492. "label": "彭州市",
  11493. "value": "510182"
  11494. }, {
  11495. "label": "邛崃市",
  11496. "value": "510183"
  11497. }, {
  11498. "label": "崇州市",
  11499. "value": "510184"
  11500. }, {
  11501. "label": "简阳市",
  11502. "value": "510185"
  11503. }], [{
  11504. "label": "自流井区",
  11505. "value": "510302"
  11506. }, {
  11507. "label": "贡井区",
  11508. "value": "510303"
  11509. }, {
  11510. "label": "大安区",
  11511. "value": "510304"
  11512. }, {
  11513. "label": "沿滩区",
  11514. "value": "510311"
  11515. }, {
  11516. "label": "荣县",
  11517. "value": "510321"
  11518. }, {
  11519. "label": "富顺县",
  11520. "value": "510322"
  11521. }], [{
  11522. "label": "东区",
  11523. "value": "510402"
  11524. }, {
  11525. "label": "西区",
  11526. "value": "510403"
  11527. }, {
  11528. "label": "仁和区",
  11529. "value": "510411"
  11530. }, {
  11531. "label": "米易县",
  11532. "value": "510421"
  11533. }, {
  11534. "label": "盐边县",
  11535. "value": "510422"
  11536. }], [{
  11537. "label": "江阳区",
  11538. "value": "510502"
  11539. }, {
  11540. "label": "纳溪区",
  11541. "value": "510503"
  11542. }, {
  11543. "label": "龙马潭区",
  11544. "value": "510504"
  11545. }, {
  11546. "label": "泸县",
  11547. "value": "510521"
  11548. }, {
  11549. "label": "合江县",
  11550. "value": "510522"
  11551. }, {
  11552. "label": "叙永县",
  11553. "value": "510524"
  11554. }, {
  11555. "label": "古蔺县",
  11556. "value": "510525"
  11557. }], [{
  11558. "label": "旌阳区",
  11559. "value": "510603"
  11560. }, {
  11561. "label": "罗江区",
  11562. "value": "510604"
  11563. }, {
  11564. "label": "中江县",
  11565. "value": "510623"
  11566. }, {
  11567. "label": "广汉市",
  11568. "value": "510681"
  11569. }, {
  11570. "label": "什邡市",
  11571. "value": "510682"
  11572. }, {
  11573. "label": "绵竹市",
  11574. "value": "510683"
  11575. }], [{
  11576. "label": "涪城区",
  11577. "value": "510703"
  11578. }, {
  11579. "label": "游仙区",
  11580. "value": "510704"
  11581. }, {
  11582. "label": "安州区",
  11583. "value": "510705"
  11584. }, {
  11585. "label": "三台县",
  11586. "value": "510722"
  11587. }, {
  11588. "label": "盐亭县",
  11589. "value": "510723"
  11590. }, {
  11591. "label": "梓潼县",
  11592. "value": "510725"
  11593. }, {
  11594. "label": "北川羌族自治县",
  11595. "value": "510726"
  11596. }, {
  11597. "label": "平武县",
  11598. "value": "510727"
  11599. }, {
  11600. "label": "江油市",
  11601. "value": "510781"
  11602. }], [{
  11603. "label": "利州区",
  11604. "value": "510802"
  11605. }, {
  11606. "label": "昭化区",
  11607. "value": "510811"
  11608. }, {
  11609. "label": "朝天区",
  11610. "value": "510812"
  11611. }, {
  11612. "label": "旺苍县",
  11613. "value": "510821"
  11614. }, {
  11615. "label": "青川县",
  11616. "value": "510822"
  11617. }, {
  11618. "label": "剑阁县",
  11619. "value": "510823"
  11620. }, {
  11621. "label": "苍溪县",
  11622. "value": "510824"
  11623. }], [{
  11624. "label": "船山区",
  11625. "value": "510903"
  11626. }, {
  11627. "label": "安居区",
  11628. "value": "510904"
  11629. }, {
  11630. "label": "蓬溪县",
  11631. "value": "510921"
  11632. }, {
  11633. "label": "射洪县",
  11634. "value": "510922"
  11635. }, {
  11636. "label": "大英县",
  11637. "value": "510923"
  11638. }], [{
  11639. "label": "市中区",
  11640. "value": "511002"
  11641. }, {
  11642. "label": "东兴区",
  11643. "value": "511011"
  11644. }, {
  11645. "label": "威远县",
  11646. "value": "511024"
  11647. }, {
  11648. "label": "资中县",
  11649. "value": "511025"
  11650. }, {
  11651. "label": "内江经济开发区",
  11652. "value": "511071"
  11653. }, {
  11654. "label": "隆昌市",
  11655. "value": "511083"
  11656. }], [{
  11657. "label": "市中区",
  11658. "value": "511102"
  11659. }, {
  11660. "label": "沙湾区",
  11661. "value": "511111"
  11662. }, {
  11663. "label": "五通桥区",
  11664. "value": "511112"
  11665. }, {
  11666. "label": "金口河区",
  11667. "value": "511113"
  11668. }, {
  11669. "label": "犍为县",
  11670. "value": "511123"
  11671. }, {
  11672. "label": "井研县",
  11673. "value": "511124"
  11674. }, {
  11675. "label": "夹江县",
  11676. "value": "511126"
  11677. }, {
  11678. "label": "沐川县",
  11679. "value": "511129"
  11680. }, {
  11681. "label": "峨边彝族自治县",
  11682. "value": "511132"
  11683. }, {
  11684. "label": "马边彝族自治县",
  11685. "value": "511133"
  11686. }, {
  11687. "label": "峨眉山市",
  11688. "value": "511181"
  11689. }], [{
  11690. "label": "顺庆区",
  11691. "value": "511302"
  11692. }, {
  11693. "label": "高坪区",
  11694. "value": "511303"
  11695. }, {
  11696. "label": "嘉陵区",
  11697. "value": "511304"
  11698. }, {
  11699. "label": "南部县",
  11700. "value": "511321"
  11701. }, {
  11702. "label": "营山县",
  11703. "value": "511322"
  11704. }, {
  11705. "label": "蓬安县",
  11706. "value": "511323"
  11707. }, {
  11708. "label": "仪陇县",
  11709. "value": "511324"
  11710. }, {
  11711. "label": "西充县",
  11712. "value": "511325"
  11713. }, {
  11714. "label": "阆中市",
  11715. "value": "511381"
  11716. }], [{
  11717. "label": "东坡区",
  11718. "value": "511402"
  11719. }, {
  11720. "label": "彭山区",
  11721. "value": "511403"
  11722. }, {
  11723. "label": "仁寿县",
  11724. "value": "511421"
  11725. }, {
  11726. "label": "洪雅县",
  11727. "value": "511423"
  11728. }, {
  11729. "label": "丹棱县",
  11730. "value": "511424"
  11731. }, {
  11732. "label": "青神县",
  11733. "value": "511425"
  11734. }], [{
  11735. "label": "翠屏区",
  11736. "value": "511502"
  11737. }, {
  11738. "label": "南溪区",
  11739. "value": "511503"
  11740. }, {
  11741. "label": "宜宾县",
  11742. "value": "511521"
  11743. }, {
  11744. "label": "江安县",
  11745. "value": "511523"
  11746. }, {
  11747. "label": "长宁县",
  11748. "value": "511524"
  11749. }, {
  11750. "label": "高县",
  11751. "value": "511525"
  11752. }, {
  11753. "label": "珙县",
  11754. "value": "511526"
  11755. }, {
  11756. "label": "筠连县",
  11757. "value": "511527"
  11758. }, {
  11759. "label": "兴文县",
  11760. "value": "511528"
  11761. }, {
  11762. "label": "屏山县",
  11763. "value": "511529"
  11764. }], [{
  11765. "label": "广安区",
  11766. "value": "511602"
  11767. }, {
  11768. "label": "前锋区",
  11769. "value": "511603"
  11770. }, {
  11771. "label": "岳池县",
  11772. "value": "511621"
  11773. }, {
  11774. "label": "武胜县",
  11775. "value": "511622"
  11776. }, {
  11777. "label": "邻水县",
  11778. "value": "511623"
  11779. }, {
  11780. "label": "华蓥市",
  11781. "value": "511681"
  11782. }], [{
  11783. "label": "通川区",
  11784. "value": "511702"
  11785. }, {
  11786. "label": "达川区",
  11787. "value": "511703"
  11788. }, {
  11789. "label": "宣汉县",
  11790. "value": "511722"
  11791. }, {
  11792. "label": "开江县",
  11793. "value": "511723"
  11794. }, {
  11795. "label": "大竹县",
  11796. "value": "511724"
  11797. }, {
  11798. "label": "渠县",
  11799. "value": "511725"
  11800. }, {
  11801. "label": "达州经济开发区",
  11802. "value": "511771"
  11803. }, {
  11804. "label": "万源市",
  11805. "value": "511781"
  11806. }], [{
  11807. "label": "雨城区",
  11808. "value": "511802"
  11809. }, {
  11810. "label": "名山区",
  11811. "value": "511803"
  11812. }, {
  11813. "label": "荥经县",
  11814. "value": "511822"
  11815. }, {
  11816. "label": "汉源县",
  11817. "value": "511823"
  11818. }, {
  11819. "label": "石棉县",
  11820. "value": "511824"
  11821. }, {
  11822. "label": "天全县",
  11823. "value": "511825"
  11824. }, {
  11825. "label": "芦山县",
  11826. "value": "511826"
  11827. }, {
  11828. "label": "宝兴县",
  11829. "value": "511827"
  11830. }], [{
  11831. "label": "巴州区",
  11832. "value": "511902"
  11833. }, {
  11834. "label": "恩阳区",
  11835. "value": "511903"
  11836. }, {
  11837. "label": "通江县",
  11838. "value": "511921"
  11839. }, {
  11840. "label": "南江县",
  11841. "value": "511922"
  11842. }, {
  11843. "label": "平昌县",
  11844. "value": "511923"
  11845. }, {
  11846. "label": "巴中经济开发区",
  11847. "value": "511971"
  11848. }], [{
  11849. "label": "雁江区",
  11850. "value": "512002"
  11851. }, {
  11852. "label": "安岳县",
  11853. "value": "512021"
  11854. }, {
  11855. "label": "乐至县",
  11856. "value": "512022"
  11857. }], [{
  11858. "label": "马尔康市",
  11859. "value": "513201"
  11860. }, {
  11861. "label": "汶川县",
  11862. "value": "513221"
  11863. }, {
  11864. "label": "理县",
  11865. "value": "513222"
  11866. }, {
  11867. "label": "茂县",
  11868. "value": "513223"
  11869. }, {
  11870. "label": "松潘县",
  11871. "value": "513224"
  11872. }, {
  11873. "label": "九寨沟县",
  11874. "value": "513225"
  11875. }, {
  11876. "label": "金川县",
  11877. "value": "513226"
  11878. }, {
  11879. "label": "小金县",
  11880. "value": "513227"
  11881. }, {
  11882. "label": "黑水县",
  11883. "value": "513228"
  11884. }, {
  11885. "label": "壤塘县",
  11886. "value": "513230"
  11887. }, {
  11888. "label": "阿坝县",
  11889. "value": "513231"
  11890. }, {
  11891. "label": "若尔盖县",
  11892. "value": "513232"
  11893. }, {
  11894. "label": "红原县",
  11895. "value": "513233"
  11896. }], [{
  11897. "label": "康定市",
  11898. "value": "513301"
  11899. }, {
  11900. "label": "泸定县",
  11901. "value": "513322"
  11902. }, {
  11903. "label": "丹巴县",
  11904. "value": "513323"
  11905. }, {
  11906. "label": "九龙县",
  11907. "value": "513324"
  11908. }, {
  11909. "label": "雅江县",
  11910. "value": "513325"
  11911. }, {
  11912. "label": "道孚县",
  11913. "value": "513326"
  11914. }, {
  11915. "label": "炉霍县",
  11916. "value": "513327"
  11917. }, {
  11918. "label": "甘孜县",
  11919. "value": "513328"
  11920. }, {
  11921. "label": "新龙县",
  11922. "value": "513329"
  11923. }, {
  11924. "label": "德格县",
  11925. "value": "513330"
  11926. }, {
  11927. "label": "白玉县",
  11928. "value": "513331"
  11929. }, {
  11930. "label": "石渠县",
  11931. "value": "513332"
  11932. }, {
  11933. "label": "色达县",
  11934. "value": "513333"
  11935. }, {
  11936. "label": "理塘县",
  11937. "value": "513334"
  11938. }, {
  11939. "label": "巴塘县",
  11940. "value": "513335"
  11941. }, {
  11942. "label": "乡城县",
  11943. "value": "513336"
  11944. }, {
  11945. "label": "稻城县",
  11946. "value": "513337"
  11947. }, {
  11948. "label": "得荣县",
  11949. "value": "513338"
  11950. }], [{
  11951. "label": "西昌市",
  11952. "value": "513401"
  11953. }, {
  11954. "label": "木里藏族自治县",
  11955. "value": "513422"
  11956. }, {
  11957. "label": "盐源县",
  11958. "value": "513423"
  11959. }, {
  11960. "label": "德昌县",
  11961. "value": "513424"
  11962. }, {
  11963. "label": "会理县",
  11964. "value": "513425"
  11965. }, {
  11966. "label": "会东县",
  11967. "value": "513426"
  11968. }, {
  11969. "label": "宁南县",
  11970. "value": "513427"
  11971. }, {
  11972. "label": "普格县",
  11973. "value": "513428"
  11974. }, {
  11975. "label": "布拖县",
  11976. "value": "513429"
  11977. }, {
  11978. "label": "金阳县",
  11979. "value": "513430"
  11980. }, {
  11981. "label": "昭觉县",
  11982. "value": "513431"
  11983. }, {
  11984. "label": "喜德县",
  11985. "value": "513432"
  11986. }, {
  11987. "label": "冕宁县",
  11988. "value": "513433"
  11989. }, {
  11990. "label": "越西县",
  11991. "value": "513434"
  11992. }, {
  11993. "label": "甘洛县",
  11994. "value": "513435"
  11995. }, {
  11996. "label": "美姑县",
  11997. "value": "513436"
  11998. }, {
  11999. "label": "雷波县",
  12000. "value": "513437"
  12001. }]], [[{
  12002. "label": "南明区",
  12003. "value": "520102"
  12004. }, {
  12005. "label": "云岩区",
  12006. "value": "520103"
  12007. }, {
  12008. "label": "花溪区",
  12009. "value": "520111"
  12010. }, {
  12011. "label": "乌当区",
  12012. "value": "520112"
  12013. }, {
  12014. "label": "白云区",
  12015. "value": "520113"
  12016. }, {
  12017. "label": "观山湖区",
  12018. "value": "520115"
  12019. }, {
  12020. "label": "开阳县",
  12021. "value": "520121"
  12022. }, {
  12023. "label": "息烽县",
  12024. "value": "520122"
  12025. }, {
  12026. "label": "修文县",
  12027. "value": "520123"
  12028. }, {
  12029. "label": "清镇市",
  12030. "value": "520181"
  12031. }], [{
  12032. "label": "钟山区",
  12033. "value": "520201"
  12034. }, {
  12035. "label": "六枝特区",
  12036. "value": "520203"
  12037. }, {
  12038. "label": "水城县",
  12039. "value": "520221"
  12040. }, {
  12041. "label": "盘州市",
  12042. "value": "520281"
  12043. }], [{
  12044. "label": "红花岗区",
  12045. "value": "520302"
  12046. }, {
  12047. "label": "汇川区",
  12048. "value": "520303"
  12049. }, {
  12050. "label": "播州区",
  12051. "value": "520304"
  12052. }, {
  12053. "label": "桐梓县",
  12054. "value": "520322"
  12055. }, {
  12056. "label": "绥阳县",
  12057. "value": "520323"
  12058. }, {
  12059. "label": "正安县",
  12060. "value": "520324"
  12061. }, {
  12062. "label": "道真仡佬族苗族自治县",
  12063. "value": "520325"
  12064. }, {
  12065. "label": "务川仡佬族苗族自治县",
  12066. "value": "520326"
  12067. }, {
  12068. "label": "凤冈县",
  12069. "value": "520327"
  12070. }, {
  12071. "label": "湄潭县",
  12072. "value": "520328"
  12073. }, {
  12074. "label": "余庆县",
  12075. "value": "520329"
  12076. }, {
  12077. "label": "习水县",
  12078. "value": "520330"
  12079. }, {
  12080. "label": "赤水市",
  12081. "value": "520381"
  12082. }, {
  12083. "label": "仁怀市",
  12084. "value": "520382"
  12085. }], [{
  12086. "label": "西秀区",
  12087. "value": "520402"
  12088. }, {
  12089. "label": "平坝区",
  12090. "value": "520403"
  12091. }, {
  12092. "label": "普定县",
  12093. "value": "520422"
  12094. }, {
  12095. "label": "镇宁布依族苗族自治县",
  12096. "value": "520423"
  12097. }, {
  12098. "label": "关岭布依族苗族自治县",
  12099. "value": "520424"
  12100. }, {
  12101. "label": "紫云苗族布依族自治县",
  12102. "value": "520425"
  12103. }], [{
  12104. "label": "七星关区",
  12105. "value": "520502"
  12106. }, {
  12107. "label": "大方县",
  12108. "value": "520521"
  12109. }, {
  12110. "label": "黔西县",
  12111. "value": "520522"
  12112. }, {
  12113. "label": "金沙县",
  12114. "value": "520523"
  12115. }, {
  12116. "label": "织金县",
  12117. "value": "520524"
  12118. }, {
  12119. "label": "纳雍县",
  12120. "value": "520525"
  12121. }, {
  12122. "label": "威宁彝族回族苗族自治县",
  12123. "value": "520526"
  12124. }, {
  12125. "label": "赫章县",
  12126. "value": "520527"
  12127. }], [{
  12128. "label": "碧江区",
  12129. "value": "520602"
  12130. }, {
  12131. "label": "万山区",
  12132. "value": "520603"
  12133. }, {
  12134. "label": "江口县",
  12135. "value": "520621"
  12136. }, {
  12137. "label": "玉屏侗族自治县",
  12138. "value": "520622"
  12139. }, {
  12140. "label": "石阡县",
  12141. "value": "520623"
  12142. }, {
  12143. "label": "思南县",
  12144. "value": "520624"
  12145. }, {
  12146. "label": "印江土家族苗族自治县",
  12147. "value": "520625"
  12148. }, {
  12149. "label": "德江县",
  12150. "value": "520626"
  12151. }, {
  12152. "label": "沿河土家族自治县",
  12153. "value": "520627"
  12154. }, {
  12155. "label": "松桃苗族自治县",
  12156. "value": "520628"
  12157. }], [{
  12158. "label": "兴义市",
  12159. "value": "522301"
  12160. }, {
  12161. "label": "兴仁县",
  12162. "value": "522322"
  12163. }, {
  12164. "label": "普安县",
  12165. "value": "522323"
  12166. }, {
  12167. "label": "晴隆县",
  12168. "value": "522324"
  12169. }, {
  12170. "label": "贞丰县",
  12171. "value": "522325"
  12172. }, {
  12173. "label": "望谟县",
  12174. "value": "522326"
  12175. }, {
  12176. "label": "册亨县",
  12177. "value": "522327"
  12178. }, {
  12179. "label": "安龙县",
  12180. "value": "522328"
  12181. }], [{
  12182. "label": "凯里市",
  12183. "value": "522601"
  12184. }, {
  12185. "label": "黄平县",
  12186. "value": "522622"
  12187. }, {
  12188. "label": "施秉县",
  12189. "value": "522623"
  12190. }, {
  12191. "label": "三穗县",
  12192. "value": "522624"
  12193. }, {
  12194. "label": "镇远县",
  12195. "value": "522625"
  12196. }, {
  12197. "label": "岑巩县",
  12198. "value": "522626"
  12199. }, {
  12200. "label": "天柱县",
  12201. "value": "522627"
  12202. }, {
  12203. "label": "锦屏县",
  12204. "value": "522628"
  12205. }, {
  12206. "label": "剑河县",
  12207. "value": "522629"
  12208. }, {
  12209. "label": "台江县",
  12210. "value": "522630"
  12211. }, {
  12212. "label": "黎平县",
  12213. "value": "522631"
  12214. }, {
  12215. "label": "榕江县",
  12216. "value": "522632"
  12217. }, {
  12218. "label": "从江县",
  12219. "value": "522633"
  12220. }, {
  12221. "label": "雷山县",
  12222. "value": "522634"
  12223. }, {
  12224. "label": "麻江县",
  12225. "value": "522635"
  12226. }, {
  12227. "label": "丹寨县",
  12228. "value": "522636"
  12229. }], [{
  12230. "label": "都匀市",
  12231. "value": "522701"
  12232. }, {
  12233. "label": "福泉市",
  12234. "value": "522702"
  12235. }, {
  12236. "label": "荔波县",
  12237. "value": "522722"
  12238. }, {
  12239. "label": "贵定县",
  12240. "value": "522723"
  12241. }, {
  12242. "label": "瓮安县",
  12243. "value": "522725"
  12244. }, {
  12245. "label": "独山县",
  12246. "value": "522726"
  12247. }, {
  12248. "label": "平塘县",
  12249. "value": "522727"
  12250. }, {
  12251. "label": "罗甸县",
  12252. "value": "522728"
  12253. }, {
  12254. "label": "长顺县",
  12255. "value": "522729"
  12256. }, {
  12257. "label": "龙里县",
  12258. "value": "522730"
  12259. }, {
  12260. "label": "惠水县",
  12261. "value": "522731"
  12262. }, {
  12263. "label": "三都水族自治县",
  12264. "value": "522732"
  12265. }]], [[{
  12266. "label": "五华区",
  12267. "value": "530102"
  12268. }, {
  12269. "label": "盘龙区",
  12270. "value": "530103"
  12271. }, {
  12272. "label": "官渡区",
  12273. "value": "530111"
  12274. }, {
  12275. "label": "西山区",
  12276. "value": "530112"
  12277. }, {
  12278. "label": "东川区",
  12279. "value": "530113"
  12280. }, {
  12281. "label": "呈贡区",
  12282. "value": "530114"
  12283. }, {
  12284. "label": "晋宁区",
  12285. "value": "530115"
  12286. }, {
  12287. "label": "富民县",
  12288. "value": "530124"
  12289. }, {
  12290. "label": "宜良县",
  12291. "value": "530125"
  12292. }, {
  12293. "label": "石林彝族自治县",
  12294. "value": "530126"
  12295. }, {
  12296. "label": "嵩明县",
  12297. "value": "530127"
  12298. }, {
  12299. "label": "禄劝彝族苗族自治县",
  12300. "value": "530128"
  12301. }, {
  12302. "label": "寻甸回族彝族自治县",
  12303. "value": "530129"
  12304. }, {
  12305. "label": "安宁市",
  12306. "value": "530181"
  12307. }], [{
  12308. "label": "麒麟区",
  12309. "value": "530302"
  12310. }, {
  12311. "label": "沾益区",
  12312. "value": "530303"
  12313. }, {
  12314. "label": "马龙县",
  12315. "value": "530321"
  12316. }, {
  12317. "label": "陆良县",
  12318. "value": "530322"
  12319. }, {
  12320. "label": "师宗县",
  12321. "value": "530323"
  12322. }, {
  12323. "label": "罗平县",
  12324. "value": "530324"
  12325. }, {
  12326. "label": "富源县",
  12327. "value": "530325"
  12328. }, {
  12329. "label": "会泽县",
  12330. "value": "530326"
  12331. }, {
  12332. "label": "宣威市",
  12333. "value": "530381"
  12334. }], [{
  12335. "label": "红塔区",
  12336. "value": "530402"
  12337. }, {
  12338. "label": "江川区",
  12339. "value": "530403"
  12340. }, {
  12341. "label": "澄江县",
  12342. "value": "530422"
  12343. }, {
  12344. "label": "通海县",
  12345. "value": "530423"
  12346. }, {
  12347. "label": "华宁县",
  12348. "value": "530424"
  12349. }, {
  12350. "label": "易门县",
  12351. "value": "530425"
  12352. }, {
  12353. "label": "峨山彝族自治县",
  12354. "value": "530426"
  12355. }, {
  12356. "label": "新平彝族傣族自治县",
  12357. "value": "530427"
  12358. }, {
  12359. "label": "元江哈尼族彝族傣族自治县",
  12360. "value": "530428"
  12361. }], [{
  12362. "label": "隆阳区",
  12363. "value": "530502"
  12364. }, {
  12365. "label": "施甸县",
  12366. "value": "530521"
  12367. }, {
  12368. "label": "龙陵县",
  12369. "value": "530523"
  12370. }, {
  12371. "label": "昌宁县",
  12372. "value": "530524"
  12373. }, {
  12374. "label": "腾冲市",
  12375. "value": "530581"
  12376. }], [{
  12377. "label": "昭阳区",
  12378. "value": "530602"
  12379. }, {
  12380. "label": "鲁甸县",
  12381. "value": "530621"
  12382. }, {
  12383. "label": "巧家县",
  12384. "value": "530622"
  12385. }, {
  12386. "label": "盐津县",
  12387. "value": "530623"
  12388. }, {
  12389. "label": "大关县",
  12390. "value": "530624"
  12391. }, {
  12392. "label": "永善县",
  12393. "value": "530625"
  12394. }, {
  12395. "label": "绥江县",
  12396. "value": "530626"
  12397. }, {
  12398. "label": "镇雄县",
  12399. "value": "530627"
  12400. }, {
  12401. "label": "彝良县",
  12402. "value": "530628"
  12403. }, {
  12404. "label": "威信县",
  12405. "value": "530629"
  12406. }, {
  12407. "label": "水富县",
  12408. "value": "530630"
  12409. }], [{
  12410. "label": "古城区",
  12411. "value": "530702"
  12412. }, {
  12413. "label": "玉龙纳西族自治县",
  12414. "value": "530721"
  12415. }, {
  12416. "label": "永胜县",
  12417. "value": "530722"
  12418. }, {
  12419. "label": "华坪县",
  12420. "value": "530723"
  12421. }, {
  12422. "label": "宁蒗彝族自治县",
  12423. "value": "530724"
  12424. }], [{
  12425. "label": "思茅区",
  12426. "value": "530802"
  12427. }, {
  12428. "label": "宁洱哈尼族彝族自治县",
  12429. "value": "530821"
  12430. }, {
  12431. "label": "墨江哈尼族自治县",
  12432. "value": "530822"
  12433. }, {
  12434. "label": "景东彝族自治县",
  12435. "value": "530823"
  12436. }, {
  12437. "label": "景谷傣族彝族自治县",
  12438. "value": "530824"
  12439. }, {
  12440. "label": "镇沅彝族哈尼族拉祜族自治县",
  12441. "value": "530825"
  12442. }, {
  12443. "label": "江城哈尼族彝族自治县",
  12444. "value": "530826"
  12445. }, {
  12446. "label": "孟连傣族拉祜族佤族自治县",
  12447. "value": "530827"
  12448. }, {
  12449. "label": "澜沧拉祜族自治县",
  12450. "value": "530828"
  12451. }, {
  12452. "label": "西盟佤族自治县",
  12453. "value": "530829"
  12454. }], [{
  12455. "label": "临翔区",
  12456. "value": "530902"
  12457. }, {
  12458. "label": "凤庆县",
  12459. "value": "530921"
  12460. }, {
  12461. "label": "云县",
  12462. "value": "530922"
  12463. }, {
  12464. "label": "永德县",
  12465. "value": "530923"
  12466. }, {
  12467. "label": "镇康县",
  12468. "value": "530924"
  12469. }, {
  12470. "label": "双江拉祜族佤族布朗族傣族自治县",
  12471. "value": "530925"
  12472. }, {
  12473. "label": "耿马傣族佤族自治县",
  12474. "value": "530926"
  12475. }, {
  12476. "label": "沧源佤族自治县",
  12477. "value": "530927"
  12478. }], [{
  12479. "label": "楚雄市",
  12480. "value": "532301"
  12481. }, {
  12482. "label": "双柏县",
  12483. "value": "532322"
  12484. }, {
  12485. "label": "牟定县",
  12486. "value": "532323"
  12487. }, {
  12488. "label": "南华县",
  12489. "value": "532324"
  12490. }, {
  12491. "label": "姚安县",
  12492. "value": "532325"
  12493. }, {
  12494. "label": "大姚县",
  12495. "value": "532326"
  12496. }, {
  12497. "label": "永仁县",
  12498. "value": "532327"
  12499. }, {
  12500. "label": "元谋县",
  12501. "value": "532328"
  12502. }, {
  12503. "label": "武定县",
  12504. "value": "532329"
  12505. }, {
  12506. "label": "禄丰县",
  12507. "value": "532331"
  12508. }], [{
  12509. "label": "个旧市",
  12510. "value": "532501"
  12511. }, {
  12512. "label": "开远市",
  12513. "value": "532502"
  12514. }, {
  12515. "label": "蒙自市",
  12516. "value": "532503"
  12517. }, {
  12518. "label": "弥勒市",
  12519. "value": "532504"
  12520. }, {
  12521. "label": "屏边苗族自治县",
  12522. "value": "532523"
  12523. }, {
  12524. "label": "建水县",
  12525. "value": "532524"
  12526. }, {
  12527. "label": "石屏县",
  12528. "value": "532525"
  12529. }, {
  12530. "label": "泸西县",
  12531. "value": "532527"
  12532. }, {
  12533. "label": "元阳县",
  12534. "value": "532528"
  12535. }, {
  12536. "label": "红河县",
  12537. "value": "532529"
  12538. }, {
  12539. "label": "金平苗族瑶族傣族自治县",
  12540. "value": "532530"
  12541. }, {
  12542. "label": "绿春县",
  12543. "value": "532531"
  12544. }, {
  12545. "label": "河口瑶族自治县",
  12546. "value": "532532"
  12547. }], [{
  12548. "label": "文山市",
  12549. "value": "532601"
  12550. }, {
  12551. "label": "砚山县",
  12552. "value": "532622"
  12553. }, {
  12554. "label": "西畴县",
  12555. "value": "532623"
  12556. }, {
  12557. "label": "麻栗坡县",
  12558. "value": "532624"
  12559. }, {
  12560. "label": "马关县",
  12561. "value": "532625"
  12562. }, {
  12563. "label": "丘北县",
  12564. "value": "532626"
  12565. }, {
  12566. "label": "广南县",
  12567. "value": "532627"
  12568. }, {
  12569. "label": "富宁县",
  12570. "value": "532628"
  12571. }], [{
  12572. "label": "景洪市",
  12573. "value": "532801"
  12574. }, {
  12575. "label": "勐海县",
  12576. "value": "532822"
  12577. }, {
  12578. "label": "勐腊县",
  12579. "value": "532823"
  12580. }], [{
  12581. "label": "大理市",
  12582. "value": "532901"
  12583. }, {
  12584. "label": "漾濞彝族自治县",
  12585. "value": "532922"
  12586. }, {
  12587. "label": "祥云县",
  12588. "value": "532923"
  12589. }, {
  12590. "label": "宾川县",
  12591. "value": "532924"
  12592. }, {
  12593. "label": "弥渡县",
  12594. "value": "532925"
  12595. }, {
  12596. "label": "南涧彝族自治县",
  12597. "value": "532926"
  12598. }, {
  12599. "label": "巍山彝族回族自治县",
  12600. "value": "532927"
  12601. }, {
  12602. "label": "永平县",
  12603. "value": "532928"
  12604. }, {
  12605. "label": "云龙县",
  12606. "value": "532929"
  12607. }, {
  12608. "label": "洱源县",
  12609. "value": "532930"
  12610. }, {
  12611. "label": "剑川县",
  12612. "value": "532931"
  12613. }, {
  12614. "label": "鹤庆县",
  12615. "value": "532932"
  12616. }], [{
  12617. "label": "瑞丽市",
  12618. "value": "533102"
  12619. }, {
  12620. "label": "芒市",
  12621. "value": "533103"
  12622. }, {
  12623. "label": "梁河县",
  12624. "value": "533122"
  12625. }, {
  12626. "label": "盈江县",
  12627. "value": "533123"
  12628. }, {
  12629. "label": "陇川县",
  12630. "value": "533124"
  12631. }], [{
  12632. "label": "泸水市",
  12633. "value": "533301"
  12634. }, {
  12635. "label": "福贡县",
  12636. "value": "533323"
  12637. }, {
  12638. "label": "贡山独龙族怒族自治县",
  12639. "value": "533324"
  12640. }, {
  12641. "label": "兰坪白族普米族自治县",
  12642. "value": "533325"
  12643. }], [{
  12644. "label": "香格里拉市",
  12645. "value": "533401"
  12646. }, {
  12647. "label": "德钦县",
  12648. "value": "533422"
  12649. }, {
  12650. "label": "维西傈僳族自治县",
  12651. "value": "533423"
  12652. }]], [[{
  12653. "label": "城关区",
  12654. "value": "540102"
  12655. }, {
  12656. "label": "堆龙德庆区",
  12657. "value": "540103"
  12658. }, {
  12659. "label": "林周县",
  12660. "value": "540121"
  12661. }, {
  12662. "label": "当雄县",
  12663. "value": "540122"
  12664. }, {
  12665. "label": "尼木县",
  12666. "value": "540123"
  12667. }, {
  12668. "label": "曲水县",
  12669. "value": "540124"
  12670. }, {
  12671. "label": "达孜县",
  12672. "value": "540126"
  12673. }, {
  12674. "label": "墨竹工卡县",
  12675. "value": "540127"
  12676. }, {
  12677. "label": "格尔木藏青工业园区",
  12678. "value": "540171"
  12679. }, {
  12680. "label": "拉萨经济技术开发区",
  12681. "value": "540172"
  12682. }, {
  12683. "label": "西藏文化旅游创意园区",
  12684. "value": "540173"
  12685. }, {
  12686. "label": "达孜工业园区",
  12687. "value": "540174"
  12688. }], [{
  12689. "label": "桑珠孜区",
  12690. "value": "540202"
  12691. }, {
  12692. "label": "南木林县",
  12693. "value": "540221"
  12694. }, {
  12695. "label": "江孜县",
  12696. "value": "540222"
  12697. }, {
  12698. "label": "定日县",
  12699. "value": "540223"
  12700. }, {
  12701. "label": "萨迦县",
  12702. "value": "540224"
  12703. }, {
  12704. "label": "拉孜县",
  12705. "value": "540225"
  12706. }, {
  12707. "label": "昂仁县",
  12708. "value": "540226"
  12709. }, {
  12710. "label": "谢通门县",
  12711. "value": "540227"
  12712. }, {
  12713. "label": "白朗县",
  12714. "value": "540228"
  12715. }, {
  12716. "label": "仁布县",
  12717. "value": "540229"
  12718. }, {
  12719. "label": "康马县",
  12720. "value": "540230"
  12721. }, {
  12722. "label": "定结县",
  12723. "value": "540231"
  12724. }, {
  12725. "label": "仲巴县",
  12726. "value": "540232"
  12727. }, {
  12728. "label": "亚东县",
  12729. "value": "540233"
  12730. }, {
  12731. "label": "吉隆县",
  12732. "value": "540234"
  12733. }, {
  12734. "label": "聂拉木县",
  12735. "value": "540235"
  12736. }, {
  12737. "label": "萨嘎县",
  12738. "value": "540236"
  12739. }, {
  12740. "label": "岗巴县",
  12741. "value": "540237"
  12742. }], [{
  12743. "label": "卡若区",
  12744. "value": "540302"
  12745. }, {
  12746. "label": "江达县",
  12747. "value": "540321"
  12748. }, {
  12749. "label": "贡觉县",
  12750. "value": "540322"
  12751. }, {
  12752. "label": "类乌齐县",
  12753. "value": "540323"
  12754. }, {
  12755. "label": "丁青县",
  12756. "value": "540324"
  12757. }, {
  12758. "label": "察雅县",
  12759. "value": "540325"
  12760. }, {
  12761. "label": "八宿县",
  12762. "value": "540326"
  12763. }, {
  12764. "label": "左贡县",
  12765. "value": "540327"
  12766. }, {
  12767. "label": "芒康县",
  12768. "value": "540328"
  12769. }, {
  12770. "label": "洛隆县",
  12771. "value": "540329"
  12772. }, {
  12773. "label": "边坝县",
  12774. "value": "540330"
  12775. }], [{
  12776. "label": "巴宜区",
  12777. "value": "540402"
  12778. }, {
  12779. "label": "工布江达县",
  12780. "value": "540421"
  12781. }, {
  12782. "label": "米林县",
  12783. "value": "540422"
  12784. }, {
  12785. "label": "墨脱县",
  12786. "value": "540423"
  12787. }, {
  12788. "label": "波密县",
  12789. "value": "540424"
  12790. }, {
  12791. "label": "察隅县",
  12792. "value": "540425"
  12793. }, {
  12794. "label": "朗县",
  12795. "value": "540426"
  12796. }], [{
  12797. "label": "乃东区",
  12798. "value": "540502"
  12799. }, {
  12800. "label": "扎囊县",
  12801. "value": "540521"
  12802. }, {
  12803. "label": "贡嘎县",
  12804. "value": "540522"
  12805. }, {
  12806. "label": "桑日县",
  12807. "value": "540523"
  12808. }, {
  12809. "label": "琼结县",
  12810. "value": "540524"
  12811. }, {
  12812. "label": "曲松县",
  12813. "value": "540525"
  12814. }, {
  12815. "label": "措美县",
  12816. "value": "540526"
  12817. }, {
  12818. "label": "洛扎县",
  12819. "value": "540527"
  12820. }, {
  12821. "label": "加查县",
  12822. "value": "540528"
  12823. }, {
  12824. "label": "隆子县",
  12825. "value": "540529"
  12826. }, {
  12827. "label": "错那县",
  12828. "value": "540530"
  12829. }, {
  12830. "label": "浪卡子县",
  12831. "value": "540531"
  12832. }], [{
  12833. "label": "那曲县",
  12834. "value": "542421"
  12835. }, {
  12836. "label": "嘉黎县",
  12837. "value": "542422"
  12838. }, {
  12839. "label": "比如县",
  12840. "value": "542423"
  12841. }, {
  12842. "label": "聂荣县",
  12843. "value": "542424"
  12844. }, {
  12845. "label": "安多县",
  12846. "value": "542425"
  12847. }, {
  12848. "label": "申扎县",
  12849. "value": "542426"
  12850. }, {
  12851. "label": "索县",
  12852. "value": "542427"
  12853. }, {
  12854. "label": "班戈县",
  12855. "value": "542428"
  12856. }, {
  12857. "label": "巴青县",
  12858. "value": "542429"
  12859. }, {
  12860. "label": "尼玛县",
  12861. "value": "542430"
  12862. }, {
  12863. "label": "双湖县",
  12864. "value": "542431"
  12865. }], [{
  12866. "label": "普兰县",
  12867. "value": "542521"
  12868. }, {
  12869. "label": "札达县",
  12870. "value": "542522"
  12871. }, {
  12872. "label": "噶尔县",
  12873. "value": "542523"
  12874. }, {
  12875. "label": "日土县",
  12876. "value": "542524"
  12877. }, {
  12878. "label": "革吉县",
  12879. "value": "542525"
  12880. }, {
  12881. "label": "改则县",
  12882. "value": "542526"
  12883. }, {
  12884. "label": "措勤县",
  12885. "value": "542527"
  12886. }]], [[{
  12887. "label": "新城区",
  12888. "value": "610102"
  12889. }, {
  12890. "label": "碑林区",
  12891. "value": "610103"
  12892. }, {
  12893. "label": "莲湖区",
  12894. "value": "610104"
  12895. }, {
  12896. "label": "灞桥区",
  12897. "value": "610111"
  12898. }, {
  12899. "label": "未央区",
  12900. "value": "610112"
  12901. }, {
  12902. "label": "雁塔区",
  12903. "value": "610113"
  12904. }, {
  12905. "label": "阎良区",
  12906. "value": "610114"
  12907. }, {
  12908. "label": "临潼区",
  12909. "value": "610115"
  12910. }, {
  12911. "label": "长安区",
  12912. "value": "610116"
  12913. }, {
  12914. "label": "高陵区",
  12915. "value": "610117"
  12916. }, {
  12917. "label": "鄠邑区",
  12918. "value": "610118"
  12919. }, {
  12920. "label": "蓝田县",
  12921. "value": "610122"
  12922. }, {
  12923. "label": "周至县",
  12924. "value": "610124"
  12925. }], [{
  12926. "label": "王益区",
  12927. "value": "610202"
  12928. }, {
  12929. "label": "印台区",
  12930. "value": "610203"
  12931. }, {
  12932. "label": "耀州区",
  12933. "value": "610204"
  12934. }, {
  12935. "label": "宜君县",
  12936. "value": "610222"
  12937. }], [{
  12938. "label": "渭滨区",
  12939. "value": "610302"
  12940. }, {
  12941. "label": "金台区",
  12942. "value": "610303"
  12943. }, {
  12944. "label": "陈仓区",
  12945. "value": "610304"
  12946. }, {
  12947. "label": "凤翔县",
  12948. "value": "610322"
  12949. }, {
  12950. "label": "岐山县",
  12951. "value": "610323"
  12952. }, {
  12953. "label": "扶风县",
  12954. "value": "610324"
  12955. }, {
  12956. "label": "眉县",
  12957. "value": "610326"
  12958. }, {
  12959. "label": "陇县",
  12960. "value": "610327"
  12961. }, {
  12962. "label": "千阳县",
  12963. "value": "610328"
  12964. }, {
  12965. "label": "麟游县",
  12966. "value": "610329"
  12967. }, {
  12968. "label": "凤县",
  12969. "value": "610330"
  12970. }, {
  12971. "label": "太白县",
  12972. "value": "610331"
  12973. }], [{
  12974. "label": "秦都区",
  12975. "value": "610402"
  12976. }, {
  12977. "label": "杨陵区",
  12978. "value": "610403"
  12979. }, {
  12980. "label": "渭城区",
  12981. "value": "610404"
  12982. }, {
  12983. "label": "三原县",
  12984. "value": "610422"
  12985. }, {
  12986. "label": "泾阳县",
  12987. "value": "610423"
  12988. }, {
  12989. "label": "乾县",
  12990. "value": "610424"
  12991. }, {
  12992. "label": "礼泉县",
  12993. "value": "610425"
  12994. }, {
  12995. "label": "永寿县",
  12996. "value": "610426"
  12997. }, {
  12998. "label": "彬县",
  12999. "value": "610427"
  13000. }, {
  13001. "label": "长武县",
  13002. "value": "610428"
  13003. }, {
  13004. "label": "旬邑县",
  13005. "value": "610429"
  13006. }, {
  13007. "label": "淳化县",
  13008. "value": "610430"
  13009. }, {
  13010. "label": "武功县",
  13011. "value": "610431"
  13012. }, {
  13013. "label": "兴平市",
  13014. "value": "610481"
  13015. }], [{
  13016. "label": "临渭区",
  13017. "value": "610502"
  13018. }, {
  13019. "label": "华州区",
  13020. "value": "610503"
  13021. }, {
  13022. "label": "潼关县",
  13023. "value": "610522"
  13024. }, {
  13025. "label": "大荔县",
  13026. "value": "610523"
  13027. }, {
  13028. "label": "合阳县",
  13029. "value": "610524"
  13030. }, {
  13031. "label": "澄城县",
  13032. "value": "610525"
  13033. }, {
  13034. "label": "蒲城县",
  13035. "value": "610526"
  13036. }, {
  13037. "label": "白水县",
  13038. "value": "610527"
  13039. }, {
  13040. "label": "富平县",
  13041. "value": "610528"
  13042. }, {
  13043. "label": "韩城市",
  13044. "value": "610581"
  13045. }, {
  13046. "label": "华阴市",
  13047. "value": "610582"
  13048. }], [{
  13049. "label": "宝塔区",
  13050. "value": "610602"
  13051. }, {
  13052. "label": "安塞区",
  13053. "value": "610603"
  13054. }, {
  13055. "label": "延长县",
  13056. "value": "610621"
  13057. }, {
  13058. "label": "延川县",
  13059. "value": "610622"
  13060. }, {
  13061. "label": "子长县",
  13062. "value": "610623"
  13063. }, {
  13064. "label": "志丹县",
  13065. "value": "610625"
  13066. }, {
  13067. "label": "吴起县",
  13068. "value": "610626"
  13069. }, {
  13070. "label": "甘泉县",
  13071. "value": "610627"
  13072. }, {
  13073. "label": "富县",
  13074. "value": "610628"
  13075. }, {
  13076. "label": "洛川县",
  13077. "value": "610629"
  13078. }, {
  13079. "label": "宜川县",
  13080. "value": "610630"
  13081. }, {
  13082. "label": "黄龙县",
  13083. "value": "610631"
  13084. }, {
  13085. "label": "黄陵县",
  13086. "value": "610632"
  13087. }], [{
  13088. "label": "汉台区",
  13089. "value": "610702"
  13090. }, {
  13091. "label": "南郑区",
  13092. "value": "610703"
  13093. }, {
  13094. "label": "城固县",
  13095. "value": "610722"
  13096. }, {
  13097. "label": "洋县",
  13098. "value": "610723"
  13099. }, {
  13100. "label": "西乡县",
  13101. "value": "610724"
  13102. }, {
  13103. "label": "勉县",
  13104. "value": "610725"
  13105. }, {
  13106. "label": "宁强县",
  13107. "value": "610726"
  13108. }, {
  13109. "label": "略阳县",
  13110. "value": "610727"
  13111. }, {
  13112. "label": "镇巴县",
  13113. "value": "610728"
  13114. }, {
  13115. "label": "留坝县",
  13116. "value": "610729"
  13117. }, {
  13118. "label": "佛坪县",
  13119. "value": "610730"
  13120. }], [{
  13121. "label": "榆阳区",
  13122. "value": "610802"
  13123. }, {
  13124. "label": "横山区",
  13125. "value": "610803"
  13126. }, {
  13127. "label": "府谷县",
  13128. "value": "610822"
  13129. }, {
  13130. "label": "靖边县",
  13131. "value": "610824"
  13132. }, {
  13133. "label": "定边县",
  13134. "value": "610825"
  13135. }, {
  13136. "label": "绥德县",
  13137. "value": "610826"
  13138. }, {
  13139. "label": "米脂县",
  13140. "value": "610827"
  13141. }, {
  13142. "label": "佳县",
  13143. "value": "610828"
  13144. }, {
  13145. "label": "吴堡县",
  13146. "value": "610829"
  13147. }, {
  13148. "label": "清涧县",
  13149. "value": "610830"
  13150. }, {
  13151. "label": "子洲县",
  13152. "value": "610831"
  13153. }, {
  13154. "label": "神木市",
  13155. "value": "610881"
  13156. }], [{
  13157. "label": "汉滨区",
  13158. "value": "610902"
  13159. }, {
  13160. "label": "汉阴县",
  13161. "value": "610921"
  13162. }, {
  13163. "label": "石泉县",
  13164. "value": "610922"
  13165. }, {
  13166. "label": "宁陕县",
  13167. "value": "610923"
  13168. }, {
  13169. "label": "紫阳县",
  13170. "value": "610924"
  13171. }, {
  13172. "label": "岚皋县",
  13173. "value": "610925"
  13174. }, {
  13175. "label": "平利县",
  13176. "value": "610926"
  13177. }, {
  13178. "label": "镇坪县",
  13179. "value": "610927"
  13180. }, {
  13181. "label": "旬阳县",
  13182. "value": "610928"
  13183. }, {
  13184. "label": "白河县",
  13185. "value": "610929"
  13186. }], [{
  13187. "label": "商州区",
  13188. "value": "611002"
  13189. }, {
  13190. "label": "洛南县",
  13191. "value": "611021"
  13192. }, {
  13193. "label": "丹凤县",
  13194. "value": "611022"
  13195. }, {
  13196. "label": "商南县",
  13197. "value": "611023"
  13198. }, {
  13199. "label": "山阳县",
  13200. "value": "611024"
  13201. }, {
  13202. "label": "镇安县",
  13203. "value": "611025"
  13204. }, {
  13205. "label": "柞水县",
  13206. "value": "611026"
  13207. }]], [[{
  13208. "label": "城关区",
  13209. "value": "620102"
  13210. }, {
  13211. "label": "七里河区",
  13212. "value": "620103"
  13213. }, {
  13214. "label": "西固区",
  13215. "value": "620104"
  13216. }, {
  13217. "label": "安宁区",
  13218. "value": "620105"
  13219. }, {
  13220. "label": "红古区",
  13221. "value": "620111"
  13222. }, {
  13223. "label": "永登县",
  13224. "value": "620121"
  13225. }, {
  13226. "label": "皋兰县",
  13227. "value": "620122"
  13228. }, {
  13229. "label": "榆中县",
  13230. "value": "620123"
  13231. }, {
  13232. "label": "兰州新区",
  13233. "value": "620171"
  13234. }], [{
  13235. "label": "嘉峪关市",
  13236. "value": "620201"
  13237. }], [{
  13238. "label": "金川区",
  13239. "value": "620302"
  13240. }, {
  13241. "label": "永昌县",
  13242. "value": "620321"
  13243. }], [{
  13244. "label": "白银区",
  13245. "value": "620402"
  13246. }, {
  13247. "label": "平川区",
  13248. "value": "620403"
  13249. }, {
  13250. "label": "靖远县",
  13251. "value": "620421"
  13252. }, {
  13253. "label": "会宁县",
  13254. "value": "620422"
  13255. }, {
  13256. "label": "景泰县",
  13257. "value": "620423"
  13258. }], [{
  13259. "label": "秦州区",
  13260. "value": "620502"
  13261. }, {
  13262. "label": "麦积区",
  13263. "value": "620503"
  13264. }, {
  13265. "label": "清水县",
  13266. "value": "620521"
  13267. }, {
  13268. "label": "秦安县",
  13269. "value": "620522"
  13270. }, {
  13271. "label": "甘谷县",
  13272. "value": "620523"
  13273. }, {
  13274. "label": "武山县",
  13275. "value": "620524"
  13276. }, {
  13277. "label": "张家川回族自治县",
  13278. "value": "620525"
  13279. }], [{
  13280. "label": "凉州区",
  13281. "value": "620602"
  13282. }, {
  13283. "label": "民勤县",
  13284. "value": "620621"
  13285. }, {
  13286. "label": "古浪县",
  13287. "value": "620622"
  13288. }, {
  13289. "label": "天祝藏族自治县",
  13290. "value": "620623"
  13291. }], [{
  13292. "label": "甘州区",
  13293. "value": "620702"
  13294. }, {
  13295. "label": "肃南裕固族自治县",
  13296. "value": "620721"
  13297. }, {
  13298. "label": "民乐县",
  13299. "value": "620722"
  13300. }, {
  13301. "label": "临泽县",
  13302. "value": "620723"
  13303. }, {
  13304. "label": "高台县",
  13305. "value": "620724"
  13306. }, {
  13307. "label": "山丹县",
  13308. "value": "620725"
  13309. }], [{
  13310. "label": "崆峒区",
  13311. "value": "620802"
  13312. }, {
  13313. "label": "泾川县",
  13314. "value": "620821"
  13315. }, {
  13316. "label": "灵台县",
  13317. "value": "620822"
  13318. }, {
  13319. "label": "崇信县",
  13320. "value": "620823"
  13321. }, {
  13322. "label": "华亭县",
  13323. "value": "620824"
  13324. }, {
  13325. "label": "庄浪县",
  13326. "value": "620825"
  13327. }, {
  13328. "label": "静宁县",
  13329. "value": "620826"
  13330. }, {
  13331. "label": "平凉工业园区",
  13332. "value": "620871"
  13333. }], [{
  13334. "label": "肃州区",
  13335. "value": "620902"
  13336. }, {
  13337. "label": "金塔县",
  13338. "value": "620921"
  13339. }, {
  13340. "label": "瓜州县",
  13341. "value": "620922"
  13342. }, {
  13343. "label": "肃北蒙古族自治县",
  13344. "value": "620923"
  13345. }, {
  13346. "label": "阿克塞哈萨克族自治县",
  13347. "value": "620924"
  13348. }, {
  13349. "label": "玉门市",
  13350. "value": "620981"
  13351. }, {
  13352. "label": "敦煌市",
  13353. "value": "620982"
  13354. }], [{
  13355. "label": "西峰区",
  13356. "value": "621002"
  13357. }, {
  13358. "label": "庆城县",
  13359. "value": "621021"
  13360. }, {
  13361. "label": "环县",
  13362. "value": "621022"
  13363. }, {
  13364. "label": "华池县",
  13365. "value": "621023"
  13366. }, {
  13367. "label": "合水县",
  13368. "value": "621024"
  13369. }, {
  13370. "label": "正宁县",
  13371. "value": "621025"
  13372. }, {
  13373. "label": "宁县",
  13374. "value": "621026"
  13375. }, {
  13376. "label": "镇原县",
  13377. "value": "621027"
  13378. }], [{
  13379. "label": "安定区",
  13380. "value": "621102"
  13381. }, {
  13382. "label": "通渭县",
  13383. "value": "621121"
  13384. }, {
  13385. "label": "陇西县",
  13386. "value": "621122"
  13387. }, {
  13388. "label": "渭源县",
  13389. "value": "621123"
  13390. }, {
  13391. "label": "临洮县",
  13392. "value": "621124"
  13393. }, {
  13394. "label": "漳县",
  13395. "value": "621125"
  13396. }, {
  13397. "label": "岷县",
  13398. "value": "621126"
  13399. }], [{
  13400. "label": "武都区",
  13401. "value": "621202"
  13402. }, {
  13403. "label": "成县",
  13404. "value": "621221"
  13405. }, {
  13406. "label": "文县",
  13407. "value": "621222"
  13408. }, {
  13409. "label": "宕昌县",
  13410. "value": "621223"
  13411. }, {
  13412. "label": "康县",
  13413. "value": "621224"
  13414. }, {
  13415. "label": "西和县",
  13416. "value": "621225"
  13417. }, {
  13418. "label": "礼县",
  13419. "value": "621226"
  13420. }, {
  13421. "label": "徽县",
  13422. "value": "621227"
  13423. }, {
  13424. "label": "两当县",
  13425. "value": "621228"
  13426. }], [{
  13427. "label": "临夏市",
  13428. "value": "622901"
  13429. }, {
  13430. "label": "临夏县",
  13431. "value": "622921"
  13432. }, {
  13433. "label": "康乐县",
  13434. "value": "622922"
  13435. }, {
  13436. "label": "永靖县",
  13437. "value": "622923"
  13438. }, {
  13439. "label": "广河县",
  13440. "value": "622924"
  13441. }, {
  13442. "label": "和政县",
  13443. "value": "622925"
  13444. }, {
  13445. "label": "东乡族自治县",
  13446. "value": "622926"
  13447. }, {
  13448. "label": "积石山保安族东乡族撒拉族自治县",
  13449. "value": "622927"
  13450. }], [{
  13451. "label": "合作市",
  13452. "value": "623001"
  13453. }, {
  13454. "label": "临潭县",
  13455. "value": "623021"
  13456. }, {
  13457. "label": "卓尼县",
  13458. "value": "623022"
  13459. }, {
  13460. "label": "舟曲县",
  13461. "value": "623023"
  13462. }, {
  13463. "label": "迭部县",
  13464. "value": "623024"
  13465. }, {
  13466. "label": "玛曲县",
  13467. "value": "623025"
  13468. }, {
  13469. "label": "碌曲县",
  13470. "value": "623026"
  13471. }, {
  13472. "label": "夏河县",
  13473. "value": "623027"
  13474. }]], [[{
  13475. "label": "城东区",
  13476. "value": "630102"
  13477. }, {
  13478. "label": "城中区",
  13479. "value": "630103"
  13480. }, {
  13481. "label": "城西区",
  13482. "value": "630104"
  13483. }, {
  13484. "label": "城北区",
  13485. "value": "630105"
  13486. }, {
  13487. "label": "大通回族土族自治县",
  13488. "value": "630121"
  13489. }, {
  13490. "label": "湟中县",
  13491. "value": "630122"
  13492. }, {
  13493. "label": "湟源县",
  13494. "value": "630123"
  13495. }], [{
  13496. "label": "乐都区",
  13497. "value": "630202"
  13498. }, {
  13499. "label": "平安区",
  13500. "value": "630203"
  13501. }, {
  13502. "label": "民和回族土族自治县",
  13503. "value": "630222"
  13504. }, {
  13505. "label": "互助土族自治县",
  13506. "value": "630223"
  13507. }, {
  13508. "label": "化隆回族自治县",
  13509. "value": "630224"
  13510. }, {
  13511. "label": "循化撒拉族自治县",
  13512. "value": "630225"
  13513. }], [{
  13514. "label": "门源回族自治县",
  13515. "value": "632221"
  13516. }, {
  13517. "label": "祁连县",
  13518. "value": "632222"
  13519. }, {
  13520. "label": "海晏县",
  13521. "value": "632223"
  13522. }, {
  13523. "label": "刚察县",
  13524. "value": "632224"
  13525. }], [{
  13526. "label": "同仁县",
  13527. "value": "632321"
  13528. }, {
  13529. "label": "尖扎县",
  13530. "value": "632322"
  13531. }, {
  13532. "label": "泽库县",
  13533. "value": "632323"
  13534. }, {
  13535. "label": "河南蒙古族自治县",
  13536. "value": "632324"
  13537. }], [{
  13538. "label": "共和县",
  13539. "value": "632521"
  13540. }, {
  13541. "label": "同德县",
  13542. "value": "632522"
  13543. }, {
  13544. "label": "贵德县",
  13545. "value": "632523"
  13546. }, {
  13547. "label": "兴海县",
  13548. "value": "632524"
  13549. }, {
  13550. "label": "贵南县",
  13551. "value": "632525"
  13552. }], [{
  13553. "label": "玛沁县",
  13554. "value": "632621"
  13555. }, {
  13556. "label": "班玛县",
  13557. "value": "632622"
  13558. }, {
  13559. "label": "甘德县",
  13560. "value": "632623"
  13561. }, {
  13562. "label": "达日县",
  13563. "value": "632624"
  13564. }, {
  13565. "label": "久治县",
  13566. "value": "632625"
  13567. }, {
  13568. "label": "玛多县",
  13569. "value": "632626"
  13570. }], [{
  13571. "label": "玉树市",
  13572. "value": "632701"
  13573. }, {
  13574. "label": "杂多县",
  13575. "value": "632722"
  13576. }, {
  13577. "label": "称多县",
  13578. "value": "632723"
  13579. }, {
  13580. "label": "治多县",
  13581. "value": "632724"
  13582. }, {
  13583. "label": "囊谦县",
  13584. "value": "632725"
  13585. }, {
  13586. "label": "曲麻莱县",
  13587. "value": "632726"
  13588. }], [{
  13589. "label": "格尔木市",
  13590. "value": "632801"
  13591. }, {
  13592. "label": "德令哈市",
  13593. "value": "632802"
  13594. }, {
  13595. "label": "乌兰县",
  13596. "value": "632821"
  13597. }, {
  13598. "label": "都兰县",
  13599. "value": "632822"
  13600. }, {
  13601. "label": "天峻县",
  13602. "value": "632823"
  13603. }, {
  13604. "label": "大柴旦行政委员会",
  13605. "value": "632857"
  13606. }, {
  13607. "label": "冷湖行政委员会",
  13608. "value": "632858"
  13609. }, {
  13610. "label": "茫崖行政委员会",
  13611. "value": "632859"
  13612. }]], [[{
  13613. "label": "兴庆区",
  13614. "value": "640104"
  13615. }, {
  13616. "label": "西夏区",
  13617. "value": "640105"
  13618. }, {
  13619. "label": "金凤区",
  13620. "value": "640106"
  13621. }, {
  13622. "label": "永宁县",
  13623. "value": "640121"
  13624. }, {
  13625. "label": "贺兰县",
  13626. "value": "640122"
  13627. }, {
  13628. "label": "灵武市",
  13629. "value": "640181"
  13630. }], [{
  13631. "label": "大武口区",
  13632. "value": "640202"
  13633. }, {
  13634. "label": "惠农区",
  13635. "value": "640205"
  13636. }, {
  13637. "label": "平罗县",
  13638. "value": "640221"
  13639. }], [{
  13640. "label": "利通区",
  13641. "value": "640302"
  13642. }, {
  13643. "label": "红寺堡区",
  13644. "value": "640303"
  13645. }, {
  13646. "label": "盐池县",
  13647. "value": "640323"
  13648. }, {
  13649. "label": "同心县",
  13650. "value": "640324"
  13651. }, {
  13652. "label": "青铜峡市",
  13653. "value": "640381"
  13654. }], [{
  13655. "label": "原州区",
  13656. "value": "640402"
  13657. }, {
  13658. "label": "西吉县",
  13659. "value": "640422"
  13660. }, {
  13661. "label": "隆德县",
  13662. "value": "640423"
  13663. }, {
  13664. "label": "泾源县",
  13665. "value": "640424"
  13666. }, {
  13667. "label": "彭阳县",
  13668. "value": "640425"
  13669. }], [{
  13670. "label": "沙坡头区",
  13671. "value": "640502"
  13672. }, {
  13673. "label": "中宁县",
  13674. "value": "640521"
  13675. }, {
  13676. "label": "海原县",
  13677. "value": "640522"
  13678. }]], [[{
  13679. "label": "天山区",
  13680. "value": "650102"
  13681. }, {
  13682. "label": "沙依巴克区",
  13683. "value": "650103"
  13684. }, {
  13685. "label": "新市区",
  13686. "value": "650104"
  13687. }, {
  13688. "label": "水磨沟区",
  13689. "value": "650105"
  13690. }, {
  13691. "label": "头屯河区",
  13692. "value": "650106"
  13693. }, {
  13694. "label": "达坂城区",
  13695. "value": "650107"
  13696. }, {
  13697. "label": "米东区",
  13698. "value": "650109"
  13699. }, {
  13700. "label": "乌鲁木齐县",
  13701. "value": "650121"
  13702. }, {
  13703. "label": "乌鲁木齐经济技术开发区",
  13704. "value": "650171"
  13705. }, {
  13706. "label": "乌鲁木齐高新技术产业开发区",
  13707. "value": "650172"
  13708. }], [{
  13709. "label": "独山子区",
  13710. "value": "650202"
  13711. }, {
  13712. "label": "克拉玛依区",
  13713. "value": "650203"
  13714. }, {
  13715. "label": "白碱滩区",
  13716. "value": "650204"
  13717. }, {
  13718. "label": "乌尔禾区",
  13719. "value": "650205"
  13720. }], [{
  13721. "label": "高昌区",
  13722. "value": "650402"
  13723. }, {
  13724. "label": "鄯善县",
  13725. "value": "650421"
  13726. }, {
  13727. "label": "托克逊县",
  13728. "value": "650422"
  13729. }], [{
  13730. "label": "伊州区",
  13731. "value": "650502"
  13732. }, {
  13733. "label": "巴里坤哈萨克自治县",
  13734. "value": "650521"
  13735. }, {
  13736. "label": "伊吾县",
  13737. "value": "650522"
  13738. }], [{
  13739. "label": "昌吉市",
  13740. "value": "652301"
  13741. }, {
  13742. "label": "阜康市",
  13743. "value": "652302"
  13744. }, {
  13745. "label": "呼图壁县",
  13746. "value": "652323"
  13747. }, {
  13748. "label": "玛纳斯县",
  13749. "value": "652324"
  13750. }, {
  13751. "label": "奇台县",
  13752. "value": "652325"
  13753. }, {
  13754. "label": "吉木萨尔县",
  13755. "value": "652327"
  13756. }, {
  13757. "label": "木垒哈萨克自治县",
  13758. "value": "652328"
  13759. }], [{
  13760. "label": "博乐市",
  13761. "value": "652701"
  13762. }, {
  13763. "label": "阿拉山口市",
  13764. "value": "652702"
  13765. }, {
  13766. "label": "精河县",
  13767. "value": "652722"
  13768. }, {
  13769. "label": "温泉县",
  13770. "value": "652723"
  13771. }], [{
  13772. "label": "库尔勒市",
  13773. "value": "652801"
  13774. }, {
  13775. "label": "轮台县",
  13776. "value": "652822"
  13777. }, {
  13778. "label": "尉犁县",
  13779. "value": "652823"
  13780. }, {
  13781. "label": "若羌县",
  13782. "value": "652824"
  13783. }, {
  13784. "label": "且末县",
  13785. "value": "652825"
  13786. }, {
  13787. "label": "焉耆回族自治县",
  13788. "value": "652826"
  13789. }, {
  13790. "label": "和静县",
  13791. "value": "652827"
  13792. }, {
  13793. "label": "和硕县",
  13794. "value": "652828"
  13795. }, {
  13796. "label": "博湖县",
  13797. "value": "652829"
  13798. }, {
  13799. "label": "库尔勒经济技术开发区",
  13800. "value": "652871"
  13801. }], [{
  13802. "label": "阿克苏市",
  13803. "value": "652901"
  13804. }, {
  13805. "label": "温宿县",
  13806. "value": "652922"
  13807. }, {
  13808. "label": "库车县",
  13809. "value": "652923"
  13810. }, {
  13811. "label": "沙雅县",
  13812. "value": "652924"
  13813. }, {
  13814. "label": "新和县",
  13815. "value": "652925"
  13816. }, {
  13817. "label": "拜城县",
  13818. "value": "652926"
  13819. }, {
  13820. "label": "乌什县",
  13821. "value": "652927"
  13822. }, {
  13823. "label": "阿瓦提县",
  13824. "value": "652928"
  13825. }, {
  13826. "label": "柯坪县",
  13827. "value": "652929"
  13828. }], [{
  13829. "label": "阿图什市",
  13830. "value": "653001"
  13831. }, {
  13832. "label": "阿克陶县",
  13833. "value": "653022"
  13834. }, {
  13835. "label": "阿合奇县",
  13836. "value": "653023"
  13837. }, {
  13838. "label": "乌恰县",
  13839. "value": "653024"
  13840. }], [{
  13841. "label": "喀什市",
  13842. "value": "653101"
  13843. }, {
  13844. "label": "疏附县",
  13845. "value": "653121"
  13846. }, {
  13847. "label": "疏勒县",
  13848. "value": "653122"
  13849. }, {
  13850. "label": "英吉沙县",
  13851. "value": "653123"
  13852. }, {
  13853. "label": "泽普县",
  13854. "value": "653124"
  13855. }, {
  13856. "label": "莎车县",
  13857. "value": "653125"
  13858. }, {
  13859. "label": "叶城县",
  13860. "value": "653126"
  13861. }, {
  13862. "label": "麦盖提县",
  13863. "value": "653127"
  13864. }, {
  13865. "label": "岳普湖县",
  13866. "value": "653128"
  13867. }, {
  13868. "label": "伽师县",
  13869. "value": "653129"
  13870. }, {
  13871. "label": "巴楚县",
  13872. "value": "653130"
  13873. }, {
  13874. "label": "塔什库尔干塔吉克自治县",
  13875. "value": "653131"
  13876. }], [{
  13877. "label": "和田市",
  13878. "value": "653201"
  13879. }, {
  13880. "label": "和田县",
  13881. "value": "653221"
  13882. }, {
  13883. "label": "墨玉县",
  13884. "value": "653222"
  13885. }, {
  13886. "label": "皮山县",
  13887. "value": "653223"
  13888. }, {
  13889. "label": "洛浦县",
  13890. "value": "653224"
  13891. }, {
  13892. "label": "策勒县",
  13893. "value": "653225"
  13894. }, {
  13895. "label": "于田县",
  13896. "value": "653226"
  13897. }, {
  13898. "label": "民丰县",
  13899. "value": "653227"
  13900. }], [{
  13901. "label": "伊宁市",
  13902. "value": "654002"
  13903. }, {
  13904. "label": "奎屯市",
  13905. "value": "654003"
  13906. }, {
  13907. "label": "霍尔果斯市",
  13908. "value": "654004"
  13909. }, {
  13910. "label": "伊宁县",
  13911. "value": "654021"
  13912. }, {
  13913. "label": "察布查尔锡伯自治县",
  13914. "value": "654022"
  13915. }, {
  13916. "label": "霍城县",
  13917. "value": "654023"
  13918. }, {
  13919. "label": "巩留县",
  13920. "value": "654024"
  13921. }, {
  13922. "label": "新源县",
  13923. "value": "654025"
  13924. }, {
  13925. "label": "昭苏县",
  13926. "value": "654026"
  13927. }, {
  13928. "label": "特克斯县",
  13929. "value": "654027"
  13930. }, {
  13931. "label": "尼勒克县",
  13932. "value": "654028"
  13933. }], [{
  13934. "label": "塔城市",
  13935. "value": "654201"
  13936. }, {
  13937. "label": "乌苏市",
  13938. "value": "654202"
  13939. }, {
  13940. "label": "额敏县",
  13941. "value": "654221"
  13942. }, {
  13943. "label": "沙湾县",
  13944. "value": "654223"
  13945. }, {
  13946. "label": "托里县",
  13947. "value": "654224"
  13948. }, {
  13949. "label": "裕民县",
  13950. "value": "654225"
  13951. }, {
  13952. "label": "和布克赛尔蒙古自治县",
  13953. "value": "654226"
  13954. }], [{
  13955. "label": "阿勒泰市",
  13956. "value": "654301"
  13957. }, {
  13958. "label": "布尔津县",
  13959. "value": "654321"
  13960. }, {
  13961. "label": "富蕴县",
  13962. "value": "654322"
  13963. }, {
  13964. "label": "福海县",
  13965. "value": "654323"
  13966. }, {
  13967. "label": "哈巴河县",
  13968. "value": "654324"
  13969. }, {
  13970. "label": "青河县",
  13971. "value": "654325"
  13972. }, {
  13973. "label": "吉木乃县",
  13974. "value": "654326"
  13975. }], [{
  13976. "label": "石河子市",
  13977. "value": "659001"
  13978. }, {
  13979. "label": "阿拉尔市",
  13980. "value": "659002"
  13981. }, {
  13982. "label": "图木舒克市",
  13983. "value": "659003"
  13984. }, {
  13985. "label": "五家渠市",
  13986. "value": "659004"
  13987. }, {
  13988. "label": "铁门关市",
  13989. "value": "659006"
  13990. }]], [[{
  13991. "label": "台北",
  13992. "value": "660101"
  13993. }], [{
  13994. "label": "高雄",
  13995. "value": "660201"
  13996. }], [{
  13997. "label": "基隆",
  13998. "value": "660301"
  13999. }], [{
  14000. "label": "台中",
  14001. "value": "660401"
  14002. }], [{
  14003. "label": "台南",
  14004. "value": "660501"
  14005. }], [{
  14006. "label": "新竹",
  14007. "value": "660601"
  14008. }], [{
  14009. "label": "嘉义",
  14010. "value": "660701"
  14011. }], [{
  14012. "label": "宜兰",
  14013. "value": "660801"
  14014. }], [{
  14015. "label": "桃园",
  14016. "value": "660901"
  14017. }], [{
  14018. "label": "苗栗",
  14019. "value": "661001"
  14020. }], [{
  14021. "label": "彰化",
  14022. "value": "661101"
  14023. }], [{
  14024. "label": "南投",
  14025. "value": "661201"
  14026. }], [{
  14027. "label": "云林",
  14028. "value": "661301"
  14029. }], [{
  14030. "label": "屏东",
  14031. "value": "661401"
  14032. }], [{
  14033. "label": "台东",
  14034. "value": "661501"
  14035. }], [{
  14036. "label": "花莲",
  14037. "value": "661601"
  14038. }], [{
  14039. "label": "澎湖",
  14040. "value": "661701"
  14041. }]], [[{
  14042. "label": "香港岛",
  14043. "value": "670101"
  14044. }], [{
  14045. "label": "九龙",
  14046. "value": "670201"
  14047. }], [{
  14048. "label": "新界",
  14049. "value": "670301"
  14050. }]], [[{
  14051. "label": "澳门半岛",
  14052. "value": "680101"
  14053. }], [{
  14054. "label": "氹仔岛",
  14055. "value": "680201"
  14056. }], [{
  14057. "label": "路环岛",
  14058. "value": "680301"
  14059. }], [{
  14060. "label": "路氹城",
  14061. "value": "680401"
  14062. }]]];
  14063. var _default = areaData;
  14064. exports.default = _default;
  14065. /***/ }),
  14066. /***/ 122:
  14067. /*!*****************************************!*\
  14068. !*** ./node_modules/create-hash/md5.js ***!
  14069. \*****************************************/
  14070. /*! no static exports found */
  14071. /***/ (function(module, exports, __webpack_require__) {
  14072. var MD5 = __webpack_require__(/*! md5.js */ 87)
  14073. module.exports = function (buffer) {
  14074. return new MD5().update(buffer).digest()
  14075. }
  14076. /***/ }),
  14077. /***/ 123:
  14078. /*!***********************************************!*\
  14079. !*** ./node_modules/browserify-sign/algos.js ***!
  14080. \***********************************************/
  14081. /*! no static exports found */
  14082. /***/ (function(module, exports, __webpack_require__) {
  14083. module.exports = __webpack_require__(/*! ./browser/algorithms.json */ 124)
  14084. /***/ }),
  14085. /***/ 124:
  14086. /*!**************************************************************!*\
  14087. !*** ./node_modules/browserify-sign/browser/algorithms.json ***!
  14088. \**************************************************************/
  14089. /*! exports provided: sha224WithRSAEncryption, RSA-SHA224, sha256WithRSAEncryption, RSA-SHA256, sha384WithRSAEncryption, RSA-SHA384, sha512WithRSAEncryption, RSA-SHA512, RSA-SHA1, ecdsa-with-SHA1, sha256, sha224, sha384, sha512, DSA-SHA, DSA-SHA1, DSA, DSA-WITH-SHA224, DSA-SHA224, DSA-WITH-SHA256, DSA-SHA256, DSA-WITH-SHA384, DSA-SHA384, DSA-WITH-SHA512, DSA-SHA512, DSA-RIPEMD160, ripemd160WithRSA, RSA-RIPEMD160, md5WithRSAEncryption, RSA-MD5, default */
  14090. /***/ (function(module) {
  14091. module.exports = JSON.parse("{\"sha224WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha224\",\"id\":\"302d300d06096086480165030402040500041c\"},\"RSA-SHA224\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha224\",\"id\":\"302d300d06096086480165030402040500041c\"},\"sha256WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha256\",\"id\":\"3031300d060960864801650304020105000420\"},\"RSA-SHA256\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha256\",\"id\":\"3031300d060960864801650304020105000420\"},\"sha384WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha384\",\"id\":\"3041300d060960864801650304020205000430\"},\"RSA-SHA384\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha384\",\"id\":\"3041300d060960864801650304020205000430\"},\"sha512WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha512\",\"id\":\"3051300d060960864801650304020305000440\"},\"RSA-SHA512\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha512\",\"id\":\"3051300d060960864801650304020305000440\"},\"RSA-SHA1\":{\"sign\":\"rsa\",\"hash\":\"sha1\",\"id\":\"3021300906052b0e03021a05000414\"},\"ecdsa-with-SHA1\":{\"sign\":\"ecdsa\",\"hash\":\"sha1\",\"id\":\"\"},\"sha256\":{\"sign\":\"ecdsa\",\"hash\":\"sha256\",\"id\":\"\"},\"sha224\":{\"sign\":\"ecdsa\",\"hash\":\"sha224\",\"id\":\"\"},\"sha384\":{\"sign\":\"ecdsa\",\"hash\":\"sha384\",\"id\":\"\"},\"sha512\":{\"sign\":\"ecdsa\",\"hash\":\"sha512\",\"id\":\"\"},\"DSA-SHA\":{\"sign\":\"dsa\",\"hash\":\"sha1\",\"id\":\"\"},\"DSA-SHA1\":{\"sign\":\"dsa\",\"hash\":\"sha1\",\"id\":\"\"},\"DSA\":{\"sign\":\"dsa\",\"hash\":\"sha1\",\"id\":\"\"},\"DSA-WITH-SHA224\":{\"sign\":\"dsa\",\"hash\":\"sha224\",\"id\":\"\"},\"DSA-SHA224\":{\"sign\":\"dsa\",\"hash\":\"sha224\",\"id\":\"\"},\"DSA-WITH-SHA256\":{\"sign\":\"dsa\",\"hash\":\"sha256\",\"id\":\"\"},\"DSA-SHA256\":{\"sign\":\"dsa\",\"hash\":\"sha256\",\"id\":\"\"},\"DSA-WITH-SHA384\":{\"sign\":\"dsa\",\"hash\":\"sha384\",\"id\":\"\"},\"DSA-SHA384\":{\"sign\":\"dsa\",\"hash\":\"sha384\",\"id\":\"\"},\"DSA-WITH-SHA512\":{\"sign\":\"dsa\",\"hash\":\"sha512\",\"id\":\"\"},\"DSA-SHA512\":{\"sign\":\"dsa\",\"hash\":\"sha512\",\"id\":\"\"},\"DSA-RIPEMD160\":{\"sign\":\"dsa\",\"hash\":\"rmd160\",\"id\":\"\"},\"ripemd160WithRSA\":{\"sign\":\"rsa\",\"hash\":\"rmd160\",\"id\":\"3021300906052b2403020105000414\"},\"RSA-RIPEMD160\":{\"sign\":\"rsa\",\"hash\":\"rmd160\",\"id\":\"3021300906052b2403020105000414\"},\"md5WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"md5\",\"id\":\"3020300c06082a864886f70d020505000410\"},\"RSA-MD5\":{\"sign\":\"rsa\",\"hash\":\"md5\",\"id\":\"3020300c06082a864886f70d020505000410\"}}");
  14092. /***/ }),
  14093. /***/ 1240:
  14094. /*!***********************************************************************!*\
  14095. !*** E:/project/bigdata_WX/components/bazaar-city_list/citylist.json ***!
  14096. \***********************************************************************/
  14097. /*! exports provided: hotcity, city, default */
  14098. /***/ (function(module) {
  14099. module.exports = JSON.parse("{\"hotcity\":{\"title\":\"热门城市\",\"lists\":[\"上海\",\"北京\",\"广州\",\"深圳\",\"武汉\",\"天津\",\"西安\",\"南京\",\"杭州\",\"成都\",\"重庆\"]},\"city\":[{\"title\":\"A\",\"lists\":[\"阿坝\",\"阿拉善\",\"阿里\",\"安康\",\"安庆\",\"鞍山\",\"安顺\",\"安阳\",\"澳门\"]},{\"title\":\"B\",\"lists\":[\"北京\",\"白银\",\"保定\",\"宝鸡\",\"保山\",\"包头\",\"巴中\",\"北海\",\"蚌埠\",\"本溪\",\"毕节\",\"滨州\",\"百色\",\"亳州\"]},{\"title\":\"C\",\"lists\":[\"重庆\",\"成都\",\"长沙\",\"长春\",\"沧州\",\"常德\",\"昌都\",\"长治\",\"常州\",\"巢湖\",\"潮州\",\"承德\",\"郴州\",\"赤峰\",\"池州\",\"崇左\",\"楚雄\",\"滁州\",\"朝阳\"]},{\"title\":\"D\",\"lists\":[\"大连\",\"东莞\",\"大理\",\"丹东\",\"大庆\",\"大同\",\"大兴安岭\",\"德宏\",\"德阳\",\"德州\",\"定西\",\"迪庆\",\"东营\"]},{\"title\":\"E\",\"lists\":[\"鄂尔多斯\",\"恩施\",\"鄂州\"]},{\"title\":\"F\",\"lists\":[\"福州\",\"防城港\",\"佛山\",\"抚顺\",\"抚州\",\"阜新\",\"阜阳\"]},{\"title\":\"G\",\"lists\":[\"广州\",\"桂林\",\"贵阳\",\"甘南\",\"赣州\",\"甘孜\",\"广安\",\"广元\",\"贵港\",\"果洛\"]},{\"title\":\"H\",\"lists\":[\"杭州\",\"哈尔滨\",\"合肥\",\"海口\",\"呼和浩特\",\"海北\",\"海东\",\"海南\",\"海西\",\"邯郸\",\"汉中\",\"鹤壁\",\"河池\",\"鹤岗\",\"黑河\",\"衡水\",\"衡阳\",\"河源\",\"贺州\",\"红河\",\"淮安\",\"淮北\",\"怀化\",\"淮南\",\"黄冈\",\"黄南\",\"黄山\",\"黄石\",\"惠州\",\"葫芦岛\",\"呼伦贝尔\",\"湖州\",\"菏泽\"]},{\"title\":\"J\",\"lists\":[\"济南\",\"佳木斯\",\"吉安\",\"江门\",\"焦作\",\"嘉兴\",\"嘉峪关\",\"揭阳\",\"吉林\",\"金昌\",\"晋城\",\"景德镇\",\"荆门\",\"荆州\",\"金华\",\"济宁\",\"晋中\",\"锦州\",\"九江\",\"酒泉\"]},{\"title\":\"K\",\"lists\":[\"昆明\",\"开封\"]},{\"title\":\"L\",\"lists\":[\"兰州\",\"拉萨\",\"来宾\",\"莱芜\",\"廊坊\",\"乐山\",\"凉山\",\"连云港\",\"聊城\",\"辽阳\",\"辽源\",\"丽江\",\"临沧\",\"临汾\",\"临夏\",\"临沂\",\"林芝\",\"丽水\",\"六安\",\"六盘水\",\"柳州\",\"陇南\",\"龙岩\",\"娄底\",\"漯河\",\"洛阳\",\"泸州\",\"吕梁\"]},{\"title\":\"M\",\"lists\":[\"马鞍山\",\"茂名\",\"眉山\",\"梅州\",\"绵阳\",\"牡丹江\"]},{\"title\":\"N\",\"lists\":[\"南京\",\"南昌\",\"南宁\",\"宁波\",\"南充\",\"南平\",\"南通\",\"南阳\",\"那曲\",\"内江\",\"宁德\",\"怒江\"]},{\"title\":\"P\",\"lists\":[\"盘锦\",\"攀枝花\",\"平顶山\",\"平凉\",\"萍乡\",\"莆田\",\"濮阳\"]},{\"title\":\"Q\",\"lists\":[\"青岛\",\"黔东南\",\"黔南\",\"黔西南\",\"庆阳\",\"清远\",\"秦皇岛\",\"钦州\",\"齐齐哈尔\",\"泉州\",\"曲靖\",\"衢州\"]},{\"title\":\"R\",\"lists\":[\"日喀则\",\"日照\"]},{\"title\":\"S\",\"lists\":[\"上海\",\"深圳\",\"苏州\",\"沈阳\",\"石家庄\",\"三门峡\",\"三明\",\"三亚\",\"商洛\",\"商丘\",\"上饶\",\"山南\",\"汕头\",\"汕尾\",\"韶关\",\"绍兴\",\"邵阳\",\"十堰\",\"朔州\",\"四平\",\"绥化\",\"遂宁\",\"随州\",\"宿迁\",\"宿州\"]},{\"title\":\"T\",\"lists\":[\"天津\",\"太原\",\"泰安\",\"泰州\",\"台州\",\"唐山\",\"天水\",\"铁岭\",\"铜川\",\"通化\",\"通辽\",\"铜陵\",\"铜仁\",\"台湾\"]},{\"title\":\"W\",\"lists\":[\"武汉\",\"乌鲁木齐\",\"无锡\",\"威海\",\"潍坊\",\"文山\",\"温州\",\"乌海\",\"芜湖\",\"乌兰察布\",\"武威\",\"梧州\"]},{\"title\":\"X\",\"lists\":[\"厦门\",\"西安\",\"西宁\",\"襄樊\",\"湘潭\",\"湘西\",\"咸宁\",\"咸阳\",\"孝感\",\"邢台\",\"新乡\",\"信阳\",\"新余\",\"忻州\",\"西双版纳\",\"宣城\",\"许昌\",\"徐州\",\"香港\",\"锡林郭勒\",\"兴安\"]},{\"title\":\"Y\",\"lists\":[\"银川\",\"雅安\",\"延安\",\"延边\",\"盐城\",\"阳江\",\"阳泉\",\"扬州\",\"烟台\",\"宜宾\",\"宜昌\",\"宜春\",\"营口\",\"益阳\",\"永州\",\"岳阳\",\"榆林\",\"运城\",\"云浮\",\"玉树\",\"玉溪\",\"玉林\"]},{\"title\":\"Z\",\"lists\":[\"杂多县\",\"赞皇县\",\"枣强县\",\"枣阳市\",\"枣庄\",\"泽库县\",\"增城市\",\"曾都区\",\"泽普县\",\"泽州县\",\"札达县\",\"扎赉特旗\",\"扎兰屯市\",\"扎鲁特旗\",\"扎囊县\",\"张北县\",\"张店区\",\"章贡区\",\"张家港\",\"张家界\",\"张家口\",\"漳平市\",\"漳浦县\",\"章丘市\",\"樟树市\",\"张湾区\",\"彰武县\",\"漳县\",\"张掖\",\"漳州\",\"长子县\",\"湛河区\",\"湛江\",\"站前区\",\"沾益县\",\"诏安县\",\"召陵区\",\"昭平县\",\"肇庆\",\"昭通\",\"赵县\",\"昭阳区\",\"招远市\",\"肇源县\",\"肇州县\",\"柞水县\",\"柘城县\",\"浙江\",\"镇安县\",\"振安区\",\"镇巴县\",\"正安县\",\"正定县\",\"正定新区\",\"正蓝旗\",\"正宁县\",\"蒸湘区\",\"正镶白旗\",\"正阳县\",\"郑州\",\"镇海区\",\"镇江\",\"浈江区\",\"镇康县\",\"镇赉县\",\"镇平县\",\"振兴区\",\"镇雄县\",\"镇原县\",\"志丹县\",\"治多县\",\"芝罘区\",\"枝江市\",\"芷江侗族自治县\",\"织金县\",\"中方县\",\"中江县\",\"钟楼区\",\"中牟县\",\"中宁县\",\"中山\",\"中山区\",\"钟山区\",\"钟山县\",\"中卫\",\"钟祥市\",\"中阳县\",\"中原区\",\"周村区\",\"周口\",\"周宁县\",\"舟曲县\",\"舟山\",\"周至县\",\"庄河市\",\"诸城市\",\"珠海\",\"珠晖区\",\"诸暨市\",\"驻马店\",\"准格尔旗\",\"涿鹿县\",\"卓尼\",\"涿州市\",\"卓资县\",\"珠山区\",\"竹山县\",\"竹溪县\",\"株洲\",\"株洲县\",\"淄博\",\"子长县\",\"淄川区\",\"自贡\",\"秭归县\",\"紫金县\",\"自流井区\",\"资溪县\",\"资兴市\",\"资阳\"]}]}");
  14100. /***/ }),
  14101. /***/ 125:
  14102. /*!****************************************!*\
  14103. !*** ./node_modules/pbkdf2/browser.js ***!
  14104. \****************************************/
  14105. /*! no static exports found */
  14106. /***/ (function(module, exports, __webpack_require__) {
  14107. exports.pbkdf2 = __webpack_require__(/*! ./lib/async */ 126)
  14108. exports.pbkdf2Sync = __webpack_require__(/*! ./lib/sync */ 129)
  14109. /***/ }),
  14110. /***/ 126:
  14111. /*!******************************************!*\
  14112. !*** ./node_modules/pbkdf2/lib/async.js ***!
  14113. \******************************************/
  14114. /*! no static exports found */
  14115. /***/ (function(module, exports, __webpack_require__) {
  14116. /* WEBPACK VAR INJECTION */(function(global) {var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  14117. var checkParameters = __webpack_require__(/*! ./precondition */ 127)
  14118. var defaultEncoding = __webpack_require__(/*! ./default-encoding */ 128)
  14119. var sync = __webpack_require__(/*! ./sync */ 129)
  14120. var toBuffer = __webpack_require__(/*! ./to-buffer */ 130)
  14121. var ZERO_BUF
  14122. var subtle = global.crypto && global.crypto.subtle
  14123. var toBrowser = {
  14124. sha: 'SHA-1',
  14125. 'sha-1': 'SHA-1',
  14126. sha1: 'SHA-1',
  14127. sha256: 'SHA-256',
  14128. 'sha-256': 'SHA-256',
  14129. sha384: 'SHA-384',
  14130. 'sha-384': 'SHA-384',
  14131. 'sha-512': 'SHA-512',
  14132. sha512: 'SHA-512'
  14133. }
  14134. var checks = []
  14135. function checkNative (algo) {
  14136. if (global.process && !global.process.browser) {
  14137. return Promise.resolve(false)
  14138. }
  14139. if (!subtle || !subtle.importKey || !subtle.deriveBits) {
  14140. return Promise.resolve(false)
  14141. }
  14142. if (checks[algo] !== undefined) {
  14143. return checks[algo]
  14144. }
  14145. ZERO_BUF = ZERO_BUF || Buffer.alloc(8)
  14146. var prom = browserPbkdf2(ZERO_BUF, ZERO_BUF, 10, 128, algo)
  14147. .then(function () {
  14148. return true
  14149. }).catch(function () {
  14150. return false
  14151. })
  14152. checks[algo] = prom
  14153. return prom
  14154. }
  14155. var nextTick
  14156. function getNextTick () {
  14157. if (nextTick) {
  14158. return nextTick
  14159. }
  14160. if (global.process && global.process.nextTick) {
  14161. nextTick = global.process.nextTick
  14162. } else if (global.queueMicrotask) {
  14163. nextTick = global.queueMicrotask
  14164. } else if (global.setImmediate) {
  14165. nextTick = global.setImmediate
  14166. } else {
  14167. nextTick = global.setTimeout
  14168. }
  14169. return nextTick
  14170. }
  14171. function browserPbkdf2 (password, salt, iterations, length, algo) {
  14172. return subtle.importKey(
  14173. 'raw', password, { name: 'PBKDF2' }, false, ['deriveBits']
  14174. ).then(function (key) {
  14175. return subtle.deriveBits({
  14176. name: 'PBKDF2',
  14177. salt: salt,
  14178. iterations: iterations,
  14179. hash: {
  14180. name: algo
  14181. }
  14182. }, key, length << 3)
  14183. }).then(function (res) {
  14184. return Buffer.from(res)
  14185. })
  14186. }
  14187. function resolvePromise (promise, callback) {
  14188. promise.then(function (out) {
  14189. getNextTick()(function () {
  14190. callback(null, out)
  14191. })
  14192. }, function (e) {
  14193. getNextTick()(function () {
  14194. callback(e)
  14195. })
  14196. })
  14197. }
  14198. module.exports = function (password, salt, iterations, keylen, digest, callback) {
  14199. if (typeof digest === 'function') {
  14200. callback = digest
  14201. digest = undefined
  14202. }
  14203. digest = digest || 'sha1'
  14204. var algo = toBrowser[digest.toLowerCase()]
  14205. if (!algo || typeof global.Promise !== 'function') {
  14206. getNextTick()(function () {
  14207. var out
  14208. try {
  14209. out = sync(password, salt, iterations, keylen, digest)
  14210. } catch (e) {
  14211. return callback(e)
  14212. }
  14213. callback(null, out)
  14214. })
  14215. return
  14216. }
  14217. checkParameters(iterations, keylen)
  14218. password = toBuffer(password, defaultEncoding, 'Password')
  14219. salt = toBuffer(salt, defaultEncoding, 'Salt')
  14220. if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2')
  14221. resolvePromise(checkNative(algo).then(function (resp) {
  14222. if (resp) return browserPbkdf2(password, salt, iterations, keylen, algo)
  14223. return sync(password, salt, iterations, keylen, digest)
  14224. }), callback)
  14225. }
  14226. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 3)))
  14227. /***/ }),
  14228. /***/ 127:
  14229. /*!*************************************************!*\
  14230. !*** ./node_modules/pbkdf2/lib/precondition.js ***!
  14231. \*************************************************/
  14232. /*! no static exports found */
  14233. /***/ (function(module, exports) {
  14234. var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs
  14235. module.exports = function (iterations, keylen) {
  14236. if (typeof iterations !== 'number') {
  14237. throw new TypeError('Iterations not a number')
  14238. }
  14239. if (iterations < 0) {
  14240. throw new TypeError('Bad iterations')
  14241. }
  14242. if (typeof keylen !== 'number') {
  14243. throw new TypeError('Key length not a number')
  14244. }
  14245. if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */
  14246. throw new TypeError('Bad key length')
  14247. }
  14248. }
  14249. /***/ }),
  14250. /***/ 128:
  14251. /*!*****************************************************!*\
  14252. !*** ./node_modules/pbkdf2/lib/default-encoding.js ***!
  14253. \*****************************************************/
  14254. /*! no static exports found */
  14255. /***/ (function(module, exports, __webpack_require__) {
  14256. /* WEBPACK VAR INJECTION */(function(global, process) {var defaultEncoding
  14257. /* istanbul ignore next */
  14258. if (global.process && global.process.browser) {
  14259. defaultEncoding = 'utf-8'
  14260. } else if (global.process && global.process.version) {
  14261. var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10)
  14262. defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'
  14263. } else {
  14264. defaultEncoding = 'utf-8'
  14265. }
  14266. module.exports = defaultEncoding
  14267. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 3), __webpack_require__(/*! ./../../node-libs-browser/mock/process.js */ 78)))
  14268. /***/ }),
  14269. /***/ 129:
  14270. /*!*************************************************!*\
  14271. !*** ./node_modules/pbkdf2/lib/sync-browser.js ***!
  14272. \*************************************************/
  14273. /*! no static exports found */
  14274. /***/ (function(module, exports, __webpack_require__) {
  14275. var md5 = __webpack_require__(/*! create-hash/md5 */ 122)
  14276. var RIPEMD160 = __webpack_require__(/*! ripemd160 */ 105)
  14277. var sha = __webpack_require__(/*! sha.js */ 106)
  14278. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  14279. var checkParameters = __webpack_require__(/*! ./precondition */ 127)
  14280. var defaultEncoding = __webpack_require__(/*! ./default-encoding */ 128)
  14281. var toBuffer = __webpack_require__(/*! ./to-buffer */ 130)
  14282. var ZEROS = Buffer.alloc(128)
  14283. var sizes = {
  14284. md5: 16,
  14285. sha1: 20,
  14286. sha224: 28,
  14287. sha256: 32,
  14288. sha384: 48,
  14289. sha512: 64,
  14290. rmd160: 20,
  14291. ripemd160: 20
  14292. }
  14293. function Hmac (alg, key, saltLen) {
  14294. var hash = getDigest(alg)
  14295. var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64
  14296. if (key.length > blocksize) {
  14297. key = hash(key)
  14298. } else if (key.length < blocksize) {
  14299. key = Buffer.concat([key, ZEROS], blocksize)
  14300. }
  14301. var ipad = Buffer.allocUnsafe(blocksize + sizes[alg])
  14302. var opad = Buffer.allocUnsafe(blocksize + sizes[alg])
  14303. for (var i = 0; i < blocksize; i++) {
  14304. ipad[i] = key[i] ^ 0x36
  14305. opad[i] = key[i] ^ 0x5C
  14306. }
  14307. var ipad1 = Buffer.allocUnsafe(blocksize + saltLen + 4)
  14308. ipad.copy(ipad1, 0, 0, blocksize)
  14309. this.ipad1 = ipad1
  14310. this.ipad2 = ipad
  14311. this.opad = opad
  14312. this.alg = alg
  14313. this.blocksize = blocksize
  14314. this.hash = hash
  14315. this.size = sizes[alg]
  14316. }
  14317. Hmac.prototype.run = function (data, ipad) {
  14318. data.copy(ipad, this.blocksize)
  14319. var h = this.hash(ipad)
  14320. h.copy(this.opad, this.blocksize)
  14321. return this.hash(this.opad)
  14322. }
  14323. function getDigest (alg) {
  14324. function shaFunc (data) {
  14325. return sha(alg).update(data).digest()
  14326. }
  14327. function rmd160Func (data) {
  14328. return new RIPEMD160().update(data).digest()
  14329. }
  14330. if (alg === 'rmd160' || alg === 'ripemd160') return rmd160Func
  14331. if (alg === 'md5') return md5
  14332. return shaFunc
  14333. }
  14334. function pbkdf2 (password, salt, iterations, keylen, digest) {
  14335. checkParameters(iterations, keylen)
  14336. password = toBuffer(password, defaultEncoding, 'Password')
  14337. salt = toBuffer(salt, defaultEncoding, 'Salt')
  14338. digest = digest || 'sha1'
  14339. var hmac = new Hmac(digest, password, salt.length)
  14340. var DK = Buffer.allocUnsafe(keylen)
  14341. var block1 = Buffer.allocUnsafe(salt.length + 4)
  14342. salt.copy(block1, 0, 0, salt.length)
  14343. var destPos = 0
  14344. var hLen = sizes[digest]
  14345. var l = Math.ceil(keylen / hLen)
  14346. for (var i = 1; i <= l; i++) {
  14347. block1.writeUInt32BE(i, salt.length)
  14348. var T = hmac.run(block1, hmac.ipad1)
  14349. var U = T
  14350. for (var j = 1; j < iterations; j++) {
  14351. U = hmac.run(U, hmac.ipad2)
  14352. for (var k = 0; k < hLen; k++) T[k] ^= U[k]
  14353. }
  14354. T.copy(DK, destPos)
  14355. destPos += hLen
  14356. }
  14357. return DK
  14358. }
  14359. module.exports = pbkdf2
  14360. /***/ }),
  14361. /***/ 13:
  14362. /*!*******************************************************!*\
  14363. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  14364. \*******************************************************/
  14365. /*! no static exports found */
  14366. /***/ (function(module, exports) {
  14367. function _typeof(o) {
  14368. "@babel/helpers - typeof";
  14369. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  14370. return typeof o;
  14371. } : function (o) {
  14372. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  14373. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
  14374. }
  14375. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  14376. /***/ }),
  14377. /***/ 130:
  14378. /*!**********************************************!*\
  14379. !*** ./node_modules/pbkdf2/lib/to-buffer.js ***!
  14380. \**********************************************/
  14381. /*! no static exports found */
  14382. /***/ (function(module, exports, __webpack_require__) {
  14383. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  14384. module.exports = function (thing, encoding, name) {
  14385. if (Buffer.isBuffer(thing)) {
  14386. return thing
  14387. } else if (typeof thing === 'string') {
  14388. return Buffer.from(thing, encoding)
  14389. } else if (ArrayBuffer.isView(thing)) {
  14390. return Buffer.from(thing.buffer)
  14391. } else {
  14392. throw new TypeError(name + ' must be a string, a Buffer, a typed array or a DataView')
  14393. }
  14394. }
  14395. /***/ }),
  14396. /***/ 131:
  14397. /*!***************************************************!*\
  14398. !*** ./node_modules/browserify-cipher/browser.js ***!
  14399. \***************************************************/
  14400. /*! no static exports found */
  14401. /***/ (function(module, exports, __webpack_require__) {
  14402. var DES = __webpack_require__(/*! browserify-des */ 132)
  14403. var aes = __webpack_require__(/*! browserify-aes/browser */ 140)
  14404. var aesModes = __webpack_require__(/*! browserify-aes/modes */ 142)
  14405. var desModes = __webpack_require__(/*! browserify-des/modes */ 159)
  14406. var ebtk = __webpack_require__(/*! evp_bytestokey */ 157)
  14407. function createCipher (suite, password) {
  14408. suite = suite.toLowerCase()
  14409. var keyLen, ivLen
  14410. if (aesModes[suite]) {
  14411. keyLen = aesModes[suite].key
  14412. ivLen = aesModes[suite].iv
  14413. } else if (desModes[suite]) {
  14414. keyLen = desModes[suite].key * 8
  14415. ivLen = desModes[suite].iv
  14416. } else {
  14417. throw new TypeError('invalid suite type')
  14418. }
  14419. var keys = ebtk(password, false, keyLen, ivLen)
  14420. return createCipheriv(suite, keys.key, keys.iv)
  14421. }
  14422. function createDecipher (suite, password) {
  14423. suite = suite.toLowerCase()
  14424. var keyLen, ivLen
  14425. if (aesModes[suite]) {
  14426. keyLen = aesModes[suite].key
  14427. ivLen = aesModes[suite].iv
  14428. } else if (desModes[suite]) {
  14429. keyLen = desModes[suite].key * 8
  14430. ivLen = desModes[suite].iv
  14431. } else {
  14432. throw new TypeError('invalid suite type')
  14433. }
  14434. var keys = ebtk(password, false, keyLen, ivLen)
  14435. return createDecipheriv(suite, keys.key, keys.iv)
  14436. }
  14437. function createCipheriv (suite, key, iv) {
  14438. suite = suite.toLowerCase()
  14439. if (aesModes[suite]) return aes.createCipheriv(suite, key, iv)
  14440. if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite })
  14441. throw new TypeError('invalid suite type')
  14442. }
  14443. function createDecipheriv (suite, key, iv) {
  14444. suite = suite.toLowerCase()
  14445. if (aesModes[suite]) return aes.createDecipheriv(suite, key, iv)
  14446. if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite, decrypt: true })
  14447. throw new TypeError('invalid suite type')
  14448. }
  14449. function getCiphers () {
  14450. return Object.keys(desModes).concat(aes.getCiphers())
  14451. }
  14452. exports.createCipher = exports.Cipher = createCipher
  14453. exports.createCipheriv = exports.Cipheriv = createCipheriv
  14454. exports.createDecipher = exports.Decipher = createDecipher
  14455. exports.createDecipheriv = exports.Decipheriv = createDecipheriv
  14456. exports.listCiphers = exports.getCiphers = getCiphers
  14457. /***/ }),
  14458. /***/ 132:
  14459. /*!**********************************************!*\
  14460. !*** ./node_modules/browserify-des/index.js ***!
  14461. \**********************************************/
  14462. /*! no static exports found */
  14463. /***/ (function(module, exports, __webpack_require__) {
  14464. var CipherBase = __webpack_require__(/*! cipher-base */ 114)
  14465. var des = __webpack_require__(/*! des.js */ 133)
  14466. var inherits = __webpack_require__(/*! inherits */ 86)
  14467. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  14468. var modes = {
  14469. 'des-ede3-cbc': des.CBC.instantiate(des.EDE),
  14470. 'des-ede3': des.EDE,
  14471. 'des-ede-cbc': des.CBC.instantiate(des.EDE),
  14472. 'des-ede': des.EDE,
  14473. 'des-cbc': des.CBC.instantiate(des.DES),
  14474. 'des-ecb': des.DES
  14475. }
  14476. modes.des = modes['des-cbc']
  14477. modes.des3 = modes['des-ede3-cbc']
  14478. module.exports = DES
  14479. inherits(DES, CipherBase)
  14480. function DES (opts) {
  14481. CipherBase.call(this)
  14482. var modeName = opts.mode.toLowerCase()
  14483. var mode = modes[modeName]
  14484. var type
  14485. if (opts.decrypt) {
  14486. type = 'decrypt'
  14487. } else {
  14488. type = 'encrypt'
  14489. }
  14490. var key = opts.key
  14491. if (!Buffer.isBuffer(key)) {
  14492. key = Buffer.from(key)
  14493. }
  14494. if (modeName === 'des-ede' || modeName === 'des-ede-cbc') {
  14495. key = Buffer.concat([key, key.slice(0, 8)])
  14496. }
  14497. var iv = opts.iv
  14498. if (!Buffer.isBuffer(iv)) {
  14499. iv = Buffer.from(iv)
  14500. }
  14501. this._des = mode.create({
  14502. key: key,
  14503. iv: iv,
  14504. type: type
  14505. })
  14506. }
  14507. DES.prototype._update = function (data) {
  14508. return Buffer.from(this._des.update(data))
  14509. }
  14510. DES.prototype._final = function () {
  14511. return Buffer.from(this._des.final())
  14512. }
  14513. /***/ }),
  14514. /***/ 133:
  14515. /*!****************************************!*\
  14516. !*** ./node_modules/des.js/lib/des.js ***!
  14517. \****************************************/
  14518. /*! no static exports found */
  14519. /***/ (function(module, exports, __webpack_require__) {
  14520. "use strict";
  14521. exports.utils = __webpack_require__(/*! ./des/utils */ 134);
  14522. exports.Cipher = __webpack_require__(/*! ./des/cipher */ 135);
  14523. exports.DES = __webpack_require__(/*! ./des/des */ 137);
  14524. exports.CBC = __webpack_require__(/*! ./des/cbc */ 138);
  14525. exports.EDE = __webpack_require__(/*! ./des/ede */ 139);
  14526. /***/ }),
  14527. /***/ 134:
  14528. /*!**********************************************!*\
  14529. !*** ./node_modules/des.js/lib/des/utils.js ***!
  14530. \**********************************************/
  14531. /*! no static exports found */
  14532. /***/ (function(module, exports, __webpack_require__) {
  14533. "use strict";
  14534. exports.readUInt32BE = function readUInt32BE(bytes, off) {
  14535. var res = (bytes[0 + off] << 24) |
  14536. (bytes[1 + off] << 16) |
  14537. (bytes[2 + off] << 8) |
  14538. bytes[3 + off];
  14539. return res >>> 0;
  14540. };
  14541. exports.writeUInt32BE = function writeUInt32BE(bytes, value, off) {
  14542. bytes[0 + off] = value >>> 24;
  14543. bytes[1 + off] = (value >>> 16) & 0xff;
  14544. bytes[2 + off] = (value >>> 8) & 0xff;
  14545. bytes[3 + off] = value & 0xff;
  14546. };
  14547. exports.ip = function ip(inL, inR, out, off) {
  14548. var outL = 0;
  14549. var outR = 0;
  14550. for (var i = 6; i >= 0; i -= 2) {
  14551. for (var j = 0; j <= 24; j += 8) {
  14552. outL <<= 1;
  14553. outL |= (inR >>> (j + i)) & 1;
  14554. }
  14555. for (var j = 0; j <= 24; j += 8) {
  14556. outL <<= 1;
  14557. outL |= (inL >>> (j + i)) & 1;
  14558. }
  14559. }
  14560. for (var i = 6; i >= 0; i -= 2) {
  14561. for (var j = 1; j <= 25; j += 8) {
  14562. outR <<= 1;
  14563. outR |= (inR >>> (j + i)) & 1;
  14564. }
  14565. for (var j = 1; j <= 25; j += 8) {
  14566. outR <<= 1;
  14567. outR |= (inL >>> (j + i)) & 1;
  14568. }
  14569. }
  14570. out[off + 0] = outL >>> 0;
  14571. out[off + 1] = outR >>> 0;
  14572. };
  14573. exports.rip = function rip(inL, inR, out, off) {
  14574. var outL = 0;
  14575. var outR = 0;
  14576. for (var i = 0; i < 4; i++) {
  14577. for (var j = 24; j >= 0; j -= 8) {
  14578. outL <<= 1;
  14579. outL |= (inR >>> (j + i)) & 1;
  14580. outL <<= 1;
  14581. outL |= (inL >>> (j + i)) & 1;
  14582. }
  14583. }
  14584. for (var i = 4; i < 8; i++) {
  14585. for (var j = 24; j >= 0; j -= 8) {
  14586. outR <<= 1;
  14587. outR |= (inR >>> (j + i)) & 1;
  14588. outR <<= 1;
  14589. outR |= (inL >>> (j + i)) & 1;
  14590. }
  14591. }
  14592. out[off + 0] = outL >>> 0;
  14593. out[off + 1] = outR >>> 0;
  14594. };
  14595. exports.pc1 = function pc1(inL, inR, out, off) {
  14596. var outL = 0;
  14597. var outR = 0;
  14598. // 7, 15, 23, 31, 39, 47, 55, 63
  14599. // 6, 14, 22, 30, 39, 47, 55, 63
  14600. // 5, 13, 21, 29, 39, 47, 55, 63
  14601. // 4, 12, 20, 28
  14602. for (var i = 7; i >= 5; i--) {
  14603. for (var j = 0; j <= 24; j += 8) {
  14604. outL <<= 1;
  14605. outL |= (inR >> (j + i)) & 1;
  14606. }
  14607. for (var j = 0; j <= 24; j += 8) {
  14608. outL <<= 1;
  14609. outL |= (inL >> (j + i)) & 1;
  14610. }
  14611. }
  14612. for (var j = 0; j <= 24; j += 8) {
  14613. outL <<= 1;
  14614. outL |= (inR >> (j + i)) & 1;
  14615. }
  14616. // 1, 9, 17, 25, 33, 41, 49, 57
  14617. // 2, 10, 18, 26, 34, 42, 50, 58
  14618. // 3, 11, 19, 27, 35, 43, 51, 59
  14619. // 36, 44, 52, 60
  14620. for (var i = 1; i <= 3; i++) {
  14621. for (var j = 0; j <= 24; j += 8) {
  14622. outR <<= 1;
  14623. outR |= (inR >> (j + i)) & 1;
  14624. }
  14625. for (var j = 0; j <= 24; j += 8) {
  14626. outR <<= 1;
  14627. outR |= (inL >> (j + i)) & 1;
  14628. }
  14629. }
  14630. for (var j = 0; j <= 24; j += 8) {
  14631. outR <<= 1;
  14632. outR |= (inL >> (j + i)) & 1;
  14633. }
  14634. out[off + 0] = outL >>> 0;
  14635. out[off + 1] = outR >>> 0;
  14636. };
  14637. exports.r28shl = function r28shl(num, shift) {
  14638. return ((num << shift) & 0xfffffff) | (num >>> (28 - shift));
  14639. };
  14640. var pc2table = [
  14641. // inL => outL
  14642. 14, 11, 17, 4, 27, 23, 25, 0,
  14643. 13, 22, 7, 18, 5, 9, 16, 24,
  14644. 2, 20, 12, 21, 1, 8, 15, 26,
  14645. // inR => outR
  14646. 15, 4, 25, 19, 9, 1, 26, 16,
  14647. 5, 11, 23, 8, 12, 7, 17, 0,
  14648. 22, 3, 10, 14, 6, 20, 27, 24
  14649. ];
  14650. exports.pc2 = function pc2(inL, inR, out, off) {
  14651. var outL = 0;
  14652. var outR = 0;
  14653. var len = pc2table.length >>> 1;
  14654. for (var i = 0; i < len; i++) {
  14655. outL <<= 1;
  14656. outL |= (inL >>> pc2table[i]) & 0x1;
  14657. }
  14658. for (var i = len; i < pc2table.length; i++) {
  14659. outR <<= 1;
  14660. outR |= (inR >>> pc2table[i]) & 0x1;
  14661. }
  14662. out[off + 0] = outL >>> 0;
  14663. out[off + 1] = outR >>> 0;
  14664. };
  14665. exports.expand = function expand(r, out, off) {
  14666. var outL = 0;
  14667. var outR = 0;
  14668. outL = ((r & 1) << 5) | (r >>> 27);
  14669. for (var i = 23; i >= 15; i -= 4) {
  14670. outL <<= 6;
  14671. outL |= (r >>> i) & 0x3f;
  14672. }
  14673. for (var i = 11; i >= 3; i -= 4) {
  14674. outR |= (r >>> i) & 0x3f;
  14675. outR <<= 6;
  14676. }
  14677. outR |= ((r & 0x1f) << 1) | (r >>> 31);
  14678. out[off + 0] = outL >>> 0;
  14679. out[off + 1] = outR >>> 0;
  14680. };
  14681. var sTable = [
  14682. 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1,
  14683. 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8,
  14684. 4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7,
  14685. 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13,
  14686. 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14,
  14687. 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5,
  14688. 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2,
  14689. 5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9,
  14690. 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10,
  14691. 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1,
  14692. 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7,
  14693. 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12,
  14694. 7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3,
  14695. 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9,
  14696. 10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8,
  14697. 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14,
  14698. 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1,
  14699. 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6,
  14700. 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13,
  14701. 15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3,
  14702. 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5,
  14703. 0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, 11, 5, 3, 11, 8,
  14704. 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10,
  14705. 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13,
  14706. 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10,
  14707. 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6,
  14708. 1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7,
  14709. 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12,
  14710. 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4,
  14711. 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2,
  14712. 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13,
  14713. 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11
  14714. ];
  14715. exports.substitute = function substitute(inL, inR) {
  14716. var out = 0;
  14717. for (var i = 0; i < 4; i++) {
  14718. var b = (inL >>> (18 - i * 6)) & 0x3f;
  14719. var sb = sTable[i * 0x40 + b];
  14720. out <<= 4;
  14721. out |= sb;
  14722. }
  14723. for (var i = 0; i < 4; i++) {
  14724. var b = (inR >>> (18 - i * 6)) & 0x3f;
  14725. var sb = sTable[4 * 0x40 + i * 0x40 + b];
  14726. out <<= 4;
  14727. out |= sb;
  14728. }
  14729. return out >>> 0;
  14730. };
  14731. var permuteTable = [
  14732. 16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22,
  14733. 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7
  14734. ];
  14735. exports.permute = function permute(num) {
  14736. var out = 0;
  14737. for (var i = 0; i < permuteTable.length; i++) {
  14738. out <<= 1;
  14739. out |= (num >>> permuteTable[i]) & 0x1;
  14740. }
  14741. return out >>> 0;
  14742. };
  14743. exports.padSplit = function padSplit(num, size, group) {
  14744. var str = num.toString(2);
  14745. while (str.length < size)
  14746. str = '0' + str;
  14747. var out = [];
  14748. for (var i = 0; i < size; i += group)
  14749. out.push(str.slice(i, i + group));
  14750. return out.join(' ');
  14751. };
  14752. /***/ }),
  14753. /***/ 135:
  14754. /*!***********************************************!*\
  14755. !*** ./node_modules/des.js/lib/des/cipher.js ***!
  14756. \***********************************************/
  14757. /*! no static exports found */
  14758. /***/ (function(module, exports, __webpack_require__) {
  14759. "use strict";
  14760. var assert = __webpack_require__(/*! minimalistic-assert */ 136);
  14761. function Cipher(options) {
  14762. this.options = options;
  14763. this.type = this.options.type;
  14764. this.blockSize = 8;
  14765. this._init();
  14766. this.buffer = new Array(this.blockSize);
  14767. this.bufferOff = 0;
  14768. }
  14769. module.exports = Cipher;
  14770. Cipher.prototype._init = function _init() {
  14771. // Might be overrided
  14772. };
  14773. Cipher.prototype.update = function update(data) {
  14774. if (data.length === 0)
  14775. return [];
  14776. if (this.type === 'decrypt')
  14777. return this._updateDecrypt(data);
  14778. else
  14779. return this._updateEncrypt(data);
  14780. };
  14781. Cipher.prototype._buffer = function _buffer(data, off) {
  14782. // Append data to buffer
  14783. var min = Math.min(this.buffer.length - this.bufferOff, data.length - off);
  14784. for (var i = 0; i < min; i++)
  14785. this.buffer[this.bufferOff + i] = data[off + i];
  14786. this.bufferOff += min;
  14787. // Shift next
  14788. return min;
  14789. };
  14790. Cipher.prototype._flushBuffer = function _flushBuffer(out, off) {
  14791. this._update(this.buffer, 0, out, off);
  14792. this.bufferOff = 0;
  14793. return this.blockSize;
  14794. };
  14795. Cipher.prototype._updateEncrypt = function _updateEncrypt(data) {
  14796. var inputOff = 0;
  14797. var outputOff = 0;
  14798. var count = ((this.bufferOff + data.length) / this.blockSize) | 0;
  14799. var out = new Array(count * this.blockSize);
  14800. if (this.bufferOff !== 0) {
  14801. inputOff += this._buffer(data, inputOff);
  14802. if (this.bufferOff === this.buffer.length)
  14803. outputOff += this._flushBuffer(out, outputOff);
  14804. }
  14805. // Write blocks
  14806. var max = data.length - ((data.length - inputOff) % this.blockSize);
  14807. for (; inputOff < max; inputOff += this.blockSize) {
  14808. this._update(data, inputOff, out, outputOff);
  14809. outputOff += this.blockSize;
  14810. }
  14811. // Queue rest
  14812. for (; inputOff < data.length; inputOff++, this.bufferOff++)
  14813. this.buffer[this.bufferOff] = data[inputOff];
  14814. return out;
  14815. };
  14816. Cipher.prototype._updateDecrypt = function _updateDecrypt(data) {
  14817. var inputOff = 0;
  14818. var outputOff = 0;
  14819. var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1;
  14820. var out = new Array(count * this.blockSize);
  14821. // TODO(indutny): optimize it, this is far from optimal
  14822. for (; count > 0; count--) {
  14823. inputOff += this._buffer(data, inputOff);
  14824. outputOff += this._flushBuffer(out, outputOff);
  14825. }
  14826. // Buffer rest of the input
  14827. inputOff += this._buffer(data, inputOff);
  14828. return out;
  14829. };
  14830. Cipher.prototype.final = function final(buffer) {
  14831. var first;
  14832. if (buffer)
  14833. first = this.update(buffer);
  14834. var last;
  14835. if (this.type === 'encrypt')
  14836. last = this._finalEncrypt();
  14837. else
  14838. last = this._finalDecrypt();
  14839. if (first)
  14840. return first.concat(last);
  14841. else
  14842. return last;
  14843. };
  14844. Cipher.prototype._pad = function _pad(buffer, off) {
  14845. if (off === 0)
  14846. return false;
  14847. while (off < buffer.length)
  14848. buffer[off++] = 0;
  14849. return true;
  14850. };
  14851. Cipher.prototype._finalEncrypt = function _finalEncrypt() {
  14852. if (!this._pad(this.buffer, this.bufferOff))
  14853. return [];
  14854. var out = new Array(this.blockSize);
  14855. this._update(this.buffer, 0, out, 0);
  14856. return out;
  14857. };
  14858. Cipher.prototype._unpad = function _unpad(buffer) {
  14859. return buffer;
  14860. };
  14861. Cipher.prototype._finalDecrypt = function _finalDecrypt() {
  14862. assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt');
  14863. var out = new Array(this.blockSize);
  14864. this._flushBuffer(out, 0);
  14865. return this._unpad(out);
  14866. };
  14867. /***/ }),
  14868. /***/ 136:
  14869. /*!***************************************************!*\
  14870. !*** ./node_modules/minimalistic-assert/index.js ***!
  14871. \***************************************************/
  14872. /*! no static exports found */
  14873. /***/ (function(module, exports) {
  14874. module.exports = assert;
  14875. function assert(val, msg) {
  14876. if (!val)
  14877. throw new Error(msg || 'Assertion failed');
  14878. }
  14879. assert.equal = function assertEqual(l, r, msg) {
  14880. if (l != r)
  14881. throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));
  14882. };
  14883. /***/ }),
  14884. /***/ 137:
  14885. /*!********************************************!*\
  14886. !*** ./node_modules/des.js/lib/des/des.js ***!
  14887. \********************************************/
  14888. /*! no static exports found */
  14889. /***/ (function(module, exports, __webpack_require__) {
  14890. "use strict";
  14891. var assert = __webpack_require__(/*! minimalistic-assert */ 136);
  14892. var inherits = __webpack_require__(/*! inherits */ 86);
  14893. var utils = __webpack_require__(/*! ./utils */ 134);
  14894. var Cipher = __webpack_require__(/*! ./cipher */ 135);
  14895. function DESState() {
  14896. this.tmp = new Array(2);
  14897. this.keys = null;
  14898. }
  14899. function DES(options) {
  14900. Cipher.call(this, options);
  14901. var state = new DESState();
  14902. this._desState = state;
  14903. this.deriveKeys(state, options.key);
  14904. }
  14905. inherits(DES, Cipher);
  14906. module.exports = DES;
  14907. DES.create = function create(options) {
  14908. return new DES(options);
  14909. };
  14910. var shiftTable = [
  14911. 1, 1, 2, 2, 2, 2, 2, 2,
  14912. 1, 2, 2, 2, 2, 2, 2, 1
  14913. ];
  14914. DES.prototype.deriveKeys = function deriveKeys(state, key) {
  14915. state.keys = new Array(16 * 2);
  14916. assert.equal(key.length, this.blockSize, 'Invalid key length');
  14917. var kL = utils.readUInt32BE(key, 0);
  14918. var kR = utils.readUInt32BE(key, 4);
  14919. utils.pc1(kL, kR, state.tmp, 0);
  14920. kL = state.tmp[0];
  14921. kR = state.tmp[1];
  14922. for (var i = 0; i < state.keys.length; i += 2) {
  14923. var shift = shiftTable[i >>> 1];
  14924. kL = utils.r28shl(kL, shift);
  14925. kR = utils.r28shl(kR, shift);
  14926. utils.pc2(kL, kR, state.keys, i);
  14927. }
  14928. };
  14929. DES.prototype._update = function _update(inp, inOff, out, outOff) {
  14930. var state = this._desState;
  14931. var l = utils.readUInt32BE(inp, inOff);
  14932. var r = utils.readUInt32BE(inp, inOff + 4);
  14933. // Initial Permutation
  14934. utils.ip(l, r, state.tmp, 0);
  14935. l = state.tmp[0];
  14936. r = state.tmp[1];
  14937. if (this.type === 'encrypt')
  14938. this._encrypt(state, l, r, state.tmp, 0);
  14939. else
  14940. this._decrypt(state, l, r, state.tmp, 0);
  14941. l = state.tmp[0];
  14942. r = state.tmp[1];
  14943. utils.writeUInt32BE(out, l, outOff);
  14944. utils.writeUInt32BE(out, r, outOff + 4);
  14945. };
  14946. DES.prototype._pad = function _pad(buffer, off) {
  14947. var value = buffer.length - off;
  14948. for (var i = off; i < buffer.length; i++)
  14949. buffer[i] = value;
  14950. return true;
  14951. };
  14952. DES.prototype._unpad = function _unpad(buffer) {
  14953. var pad = buffer[buffer.length - 1];
  14954. for (var i = buffer.length - pad; i < buffer.length; i++)
  14955. assert.equal(buffer[i], pad);
  14956. return buffer.slice(0, buffer.length - pad);
  14957. };
  14958. DES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) {
  14959. var l = lStart;
  14960. var r = rStart;
  14961. // Apply f() x16 times
  14962. for (var i = 0; i < state.keys.length; i += 2) {
  14963. var keyL = state.keys[i];
  14964. var keyR = state.keys[i + 1];
  14965. // f(r, k)
  14966. utils.expand(r, state.tmp, 0);
  14967. keyL ^= state.tmp[0];
  14968. keyR ^= state.tmp[1];
  14969. var s = utils.substitute(keyL, keyR);
  14970. var f = utils.permute(s);
  14971. var t = r;
  14972. r = (l ^ f) >>> 0;
  14973. l = t;
  14974. }
  14975. // Reverse Initial Permutation
  14976. utils.rip(r, l, out, off);
  14977. };
  14978. DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) {
  14979. var l = rStart;
  14980. var r = lStart;
  14981. // Apply f() x16 times
  14982. for (var i = state.keys.length - 2; i >= 0; i -= 2) {
  14983. var keyL = state.keys[i];
  14984. var keyR = state.keys[i + 1];
  14985. // f(r, k)
  14986. utils.expand(l, state.tmp, 0);
  14987. keyL ^= state.tmp[0];
  14988. keyR ^= state.tmp[1];
  14989. var s = utils.substitute(keyL, keyR);
  14990. var f = utils.permute(s);
  14991. var t = l;
  14992. l = (r ^ f) >>> 0;
  14993. r = t;
  14994. }
  14995. // Reverse Initial Permutation
  14996. utils.rip(l, r, out, off);
  14997. };
  14998. /***/ }),
  14999. /***/ 138:
  15000. /*!********************************************!*\
  15001. !*** ./node_modules/des.js/lib/des/cbc.js ***!
  15002. \********************************************/
  15003. /*! no static exports found */
  15004. /***/ (function(module, exports, __webpack_require__) {
  15005. "use strict";
  15006. var assert = __webpack_require__(/*! minimalistic-assert */ 136);
  15007. var inherits = __webpack_require__(/*! inherits */ 86);
  15008. var proto = {};
  15009. function CBCState(iv) {
  15010. assert.equal(iv.length, 8, 'Invalid IV length');
  15011. this.iv = new Array(8);
  15012. for (var i = 0; i < this.iv.length; i++)
  15013. this.iv[i] = iv[i];
  15014. }
  15015. function instantiate(Base) {
  15016. function CBC(options) {
  15017. Base.call(this, options);
  15018. this._cbcInit();
  15019. }
  15020. inherits(CBC, Base);
  15021. var keys = Object.keys(proto);
  15022. for (var i = 0; i < keys.length; i++) {
  15023. var key = keys[i];
  15024. CBC.prototype[key] = proto[key];
  15025. }
  15026. CBC.create = function create(options) {
  15027. return new CBC(options);
  15028. };
  15029. return CBC;
  15030. }
  15031. exports.instantiate = instantiate;
  15032. proto._cbcInit = function _cbcInit() {
  15033. var state = new CBCState(this.options.iv);
  15034. this._cbcState = state;
  15035. };
  15036. proto._update = function _update(inp, inOff, out, outOff) {
  15037. var state = this._cbcState;
  15038. var superProto = this.constructor.super_.prototype;
  15039. var iv = state.iv;
  15040. if (this.type === 'encrypt') {
  15041. for (var i = 0; i < this.blockSize; i++)
  15042. iv[i] ^= inp[inOff + i];
  15043. superProto._update.call(this, iv, 0, out, outOff);
  15044. for (var i = 0; i < this.blockSize; i++)
  15045. iv[i] = out[outOff + i];
  15046. } else {
  15047. superProto._update.call(this, inp, inOff, out, outOff);
  15048. for (var i = 0; i < this.blockSize; i++)
  15049. out[outOff + i] ^= iv[i];
  15050. for (var i = 0; i < this.blockSize; i++)
  15051. iv[i] = inp[inOff + i];
  15052. }
  15053. };
  15054. /***/ }),
  15055. /***/ 139:
  15056. /*!********************************************!*\
  15057. !*** ./node_modules/des.js/lib/des/ede.js ***!
  15058. \********************************************/
  15059. /*! no static exports found */
  15060. /***/ (function(module, exports, __webpack_require__) {
  15061. "use strict";
  15062. var assert = __webpack_require__(/*! minimalistic-assert */ 136);
  15063. var inherits = __webpack_require__(/*! inherits */ 86);
  15064. var Cipher = __webpack_require__(/*! ./cipher */ 135);
  15065. var DES = __webpack_require__(/*! ./des */ 137);
  15066. function EDEState(type, key) {
  15067. assert.equal(key.length, 24, 'Invalid key length');
  15068. var k1 = key.slice(0, 8);
  15069. var k2 = key.slice(8, 16);
  15070. var k3 = key.slice(16, 24);
  15071. if (type === 'encrypt') {
  15072. this.ciphers = [
  15073. DES.create({ type: 'encrypt', key: k1 }),
  15074. DES.create({ type: 'decrypt', key: k2 }),
  15075. DES.create({ type: 'encrypt', key: k3 })
  15076. ];
  15077. } else {
  15078. this.ciphers = [
  15079. DES.create({ type: 'decrypt', key: k3 }),
  15080. DES.create({ type: 'encrypt', key: k2 }),
  15081. DES.create({ type: 'decrypt', key: k1 })
  15082. ];
  15083. }
  15084. }
  15085. function EDE(options) {
  15086. Cipher.call(this, options);
  15087. var state = new EDEState(this.type, this.options.key);
  15088. this._edeState = state;
  15089. }
  15090. inherits(EDE, Cipher);
  15091. module.exports = EDE;
  15092. EDE.create = function create(options) {
  15093. return new EDE(options);
  15094. };
  15095. EDE.prototype._update = function _update(inp, inOff, out, outOff) {
  15096. var state = this._edeState;
  15097. state.ciphers[0]._update(inp, inOff, out, outOff);
  15098. state.ciphers[1]._update(out, outOff, out, outOff);
  15099. state.ciphers[2]._update(out, outOff, out, outOff);
  15100. };
  15101. EDE.prototype._pad = DES.prototype._pad;
  15102. EDE.prototype._unpad = DES.prototype._unpad;
  15103. /***/ }),
  15104. /***/ 14:
  15105. /*!************************************************************!*\
  15106. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  15107. \************************************************************/
  15108. /*! no static exports found */
  15109. /***/ (function(module, exports, __webpack_require__) {
  15110. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  15111. function toPrimitive(t, r) {
  15112. if ("object" != _typeof(t) || !t) return t;
  15113. var e = t[Symbol.toPrimitive];
  15114. if (void 0 !== e) {
  15115. var i = e.call(t, r || "default");
  15116. if ("object" != _typeof(i)) return i;
  15117. throw new TypeError("@@toPrimitive must return a primitive value.");
  15118. }
  15119. return ("string" === r ? String : Number)(t);
  15120. }
  15121. module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  15122. /***/ }),
  15123. /***/ 140:
  15124. /*!************************************************!*\
  15125. !*** ./node_modules/browserify-aes/browser.js ***!
  15126. \************************************************/
  15127. /*! no static exports found */
  15128. /***/ (function(module, exports, __webpack_require__) {
  15129. var ciphers = __webpack_require__(/*! ./encrypter */ 141)
  15130. var deciphers = __webpack_require__(/*! ./decrypter */ 158)
  15131. var modes = __webpack_require__(/*! ./modes/list.json */ 152)
  15132. function getCiphers () {
  15133. return Object.keys(modes)
  15134. }
  15135. exports.createCipher = exports.Cipher = ciphers.createCipher
  15136. exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv
  15137. exports.createDecipher = exports.Decipher = deciphers.createDecipher
  15138. exports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv
  15139. exports.listCiphers = exports.getCiphers = getCiphers
  15140. /***/ }),
  15141. /***/ 141:
  15142. /*!**************************************************!*\
  15143. !*** ./node_modules/browserify-aes/encrypter.js ***!
  15144. \**************************************************/
  15145. /*! no static exports found */
  15146. /***/ (function(module, exports, __webpack_require__) {
  15147. var MODES = __webpack_require__(/*! ./modes */ 142)
  15148. var AuthCipher = __webpack_require__(/*! ./authCipher */ 153)
  15149. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  15150. var StreamCipher = __webpack_require__(/*! ./streamCipher */ 156)
  15151. var Transform = __webpack_require__(/*! cipher-base */ 114)
  15152. var aes = __webpack_require__(/*! ./aes */ 154)
  15153. var ebtk = __webpack_require__(/*! evp_bytestokey */ 157)
  15154. var inherits = __webpack_require__(/*! inherits */ 86)
  15155. function Cipher (mode, key, iv) {
  15156. Transform.call(this)
  15157. this._cache = new Splitter()
  15158. this._cipher = new aes.AES(key)
  15159. this._prev = Buffer.from(iv)
  15160. this._mode = mode
  15161. this._autopadding = true
  15162. }
  15163. inherits(Cipher, Transform)
  15164. Cipher.prototype._update = function (data) {
  15165. this._cache.add(data)
  15166. var chunk
  15167. var thing
  15168. var out = []
  15169. while ((chunk = this._cache.get())) {
  15170. thing = this._mode.encrypt(this, chunk)
  15171. out.push(thing)
  15172. }
  15173. return Buffer.concat(out)
  15174. }
  15175. var PADDING = Buffer.alloc(16, 0x10)
  15176. Cipher.prototype._final = function () {
  15177. var chunk = this._cache.flush()
  15178. if (this._autopadding) {
  15179. chunk = this._mode.encrypt(this, chunk)
  15180. this._cipher.scrub()
  15181. return chunk
  15182. }
  15183. if (!chunk.equals(PADDING)) {
  15184. this._cipher.scrub()
  15185. throw new Error('data not multiple of block length')
  15186. }
  15187. }
  15188. Cipher.prototype.setAutoPadding = function (setTo) {
  15189. this._autopadding = !!setTo
  15190. return this
  15191. }
  15192. function Splitter () {
  15193. this.cache = Buffer.allocUnsafe(0)
  15194. }
  15195. Splitter.prototype.add = function (data) {
  15196. this.cache = Buffer.concat([this.cache, data])
  15197. }
  15198. Splitter.prototype.get = function () {
  15199. if (this.cache.length > 15) {
  15200. var out = this.cache.slice(0, 16)
  15201. this.cache = this.cache.slice(16)
  15202. return out
  15203. }
  15204. return null
  15205. }
  15206. Splitter.prototype.flush = function () {
  15207. var len = 16 - this.cache.length
  15208. var padBuff = Buffer.allocUnsafe(len)
  15209. var i = -1
  15210. while (++i < len) {
  15211. padBuff.writeUInt8(len, i)
  15212. }
  15213. return Buffer.concat([this.cache, padBuff])
  15214. }
  15215. function createCipheriv (suite, password, iv) {
  15216. var config = MODES[suite.toLowerCase()]
  15217. if (!config) throw new TypeError('invalid suite type')
  15218. if (typeof password === 'string') password = Buffer.from(password)
  15219. if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length)
  15220. if (typeof iv === 'string') iv = Buffer.from(iv)
  15221. if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length)
  15222. if (config.type === 'stream') {
  15223. return new StreamCipher(config.module, password, iv)
  15224. } else if (config.type === 'auth') {
  15225. return new AuthCipher(config.module, password, iv)
  15226. }
  15227. return new Cipher(config.module, password, iv)
  15228. }
  15229. function createCipher (suite, password) {
  15230. var config = MODES[suite.toLowerCase()]
  15231. if (!config) throw new TypeError('invalid suite type')
  15232. var keys = ebtk(password, false, config.key, config.iv)
  15233. return createCipheriv(suite, keys.key, keys.iv)
  15234. }
  15235. exports.createCipheriv = createCipheriv
  15236. exports.createCipher = createCipher
  15237. /***/ }),
  15238. /***/ 142:
  15239. /*!****************************************************!*\
  15240. !*** ./node_modules/browserify-aes/modes/index.js ***!
  15241. \****************************************************/
  15242. /*! no static exports found */
  15243. /***/ (function(module, exports, __webpack_require__) {
  15244. var modeModules = {
  15245. ECB: __webpack_require__(/*! ./ecb */ 143),
  15246. CBC: __webpack_require__(/*! ./cbc */ 144),
  15247. CFB: __webpack_require__(/*! ./cfb */ 146),
  15248. CFB8: __webpack_require__(/*! ./cfb8 */ 147),
  15249. CFB1: __webpack_require__(/*! ./cfb1 */ 148),
  15250. OFB: __webpack_require__(/*! ./ofb */ 149),
  15251. CTR: __webpack_require__(/*! ./ctr */ 150),
  15252. GCM: __webpack_require__(/*! ./ctr */ 150)
  15253. }
  15254. var modes = __webpack_require__(/*! ./list.json */ 152)
  15255. for (var key in modes) {
  15256. modes[key].module = modeModules[modes[key].mode]
  15257. }
  15258. module.exports = modes
  15259. /***/ }),
  15260. /***/ 143:
  15261. /*!**************************************************!*\
  15262. !*** ./node_modules/browserify-aes/modes/ecb.js ***!
  15263. \**************************************************/
  15264. /*! no static exports found */
  15265. /***/ (function(module, exports) {
  15266. exports.encrypt = function (self, block) {
  15267. return self._cipher.encryptBlock(block)
  15268. }
  15269. exports.decrypt = function (self, block) {
  15270. return self._cipher.decryptBlock(block)
  15271. }
  15272. /***/ }),
  15273. /***/ 144:
  15274. /*!**************************************************!*\
  15275. !*** ./node_modules/browserify-aes/modes/cbc.js ***!
  15276. \**************************************************/
  15277. /*! no static exports found */
  15278. /***/ (function(module, exports, __webpack_require__) {
  15279. var xor = __webpack_require__(/*! buffer-xor */ 145)
  15280. exports.encrypt = function (self, block) {
  15281. var data = xor(block, self._prev)
  15282. self._prev = self._cipher.encryptBlock(data)
  15283. return self._prev
  15284. }
  15285. exports.decrypt = function (self, block) {
  15286. var pad = self._prev
  15287. self._prev = block
  15288. var out = self._cipher.decryptBlock(block)
  15289. return xor(out, pad)
  15290. }
  15291. /***/ }),
  15292. /***/ 145:
  15293. /*!******************************************!*\
  15294. !*** ./node_modules/buffer-xor/index.js ***!
  15295. \******************************************/
  15296. /*! no static exports found */
  15297. /***/ (function(module, exports, __webpack_require__) {
  15298. /* WEBPACK VAR INJECTION */(function(Buffer) {module.exports = function xor (a, b) {
  15299. var length = Math.min(a.length, b.length)
  15300. var buffer = new Buffer(length)
  15301. for (var i = 0; i < length; ++i) {
  15302. buffer[i] = a[i] ^ b[i]
  15303. }
  15304. return buffer
  15305. }
  15306. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ 81).Buffer))
  15307. /***/ }),
  15308. /***/ 146:
  15309. /*!**************************************************!*\
  15310. !*** ./node_modules/browserify-aes/modes/cfb.js ***!
  15311. \**************************************************/
  15312. /*! no static exports found */
  15313. /***/ (function(module, exports, __webpack_require__) {
  15314. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  15315. var xor = __webpack_require__(/*! buffer-xor */ 145)
  15316. function encryptStart (self, data, decrypt) {
  15317. var len = data.length
  15318. var out = xor(data, self._cache)
  15319. self._cache = self._cache.slice(len)
  15320. self._prev = Buffer.concat([self._prev, decrypt ? data : out])
  15321. return out
  15322. }
  15323. exports.encrypt = function (self, data, decrypt) {
  15324. var out = Buffer.allocUnsafe(0)
  15325. var len
  15326. while (data.length) {
  15327. if (self._cache.length === 0) {
  15328. self._cache = self._cipher.encryptBlock(self._prev)
  15329. self._prev = Buffer.allocUnsafe(0)
  15330. }
  15331. if (self._cache.length <= data.length) {
  15332. len = self._cache.length
  15333. out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)])
  15334. data = data.slice(len)
  15335. } else {
  15336. out = Buffer.concat([out, encryptStart(self, data, decrypt)])
  15337. break
  15338. }
  15339. }
  15340. return out
  15341. }
  15342. /***/ }),
  15343. /***/ 147:
  15344. /*!***************************************************!*\
  15345. !*** ./node_modules/browserify-aes/modes/cfb8.js ***!
  15346. \***************************************************/
  15347. /*! no static exports found */
  15348. /***/ (function(module, exports, __webpack_require__) {
  15349. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  15350. function encryptByte (self, byteParam, decrypt) {
  15351. var pad = self._cipher.encryptBlock(self._prev)
  15352. var out = pad[0] ^ byteParam
  15353. self._prev = Buffer.concat([
  15354. self._prev.slice(1),
  15355. Buffer.from([decrypt ? byteParam : out])
  15356. ])
  15357. return out
  15358. }
  15359. exports.encrypt = function (self, chunk, decrypt) {
  15360. var len = chunk.length
  15361. var out = Buffer.allocUnsafe(len)
  15362. var i = -1
  15363. while (++i < len) {
  15364. out[i] = encryptByte(self, chunk[i], decrypt)
  15365. }
  15366. return out
  15367. }
  15368. /***/ }),
  15369. /***/ 148:
  15370. /*!***************************************************!*\
  15371. !*** ./node_modules/browserify-aes/modes/cfb1.js ***!
  15372. \***************************************************/
  15373. /*! no static exports found */
  15374. /***/ (function(module, exports, __webpack_require__) {
  15375. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  15376. function encryptByte (self, byteParam, decrypt) {
  15377. var pad
  15378. var i = -1
  15379. var len = 8
  15380. var out = 0
  15381. var bit, value
  15382. while (++i < len) {
  15383. pad = self._cipher.encryptBlock(self._prev)
  15384. bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0
  15385. value = pad[0] ^ bit
  15386. out += ((value & 0x80) >> (i % 8))
  15387. self._prev = shiftIn(self._prev, decrypt ? bit : value)
  15388. }
  15389. return out
  15390. }
  15391. function shiftIn (buffer, value) {
  15392. var len = buffer.length
  15393. var i = -1
  15394. var out = Buffer.allocUnsafe(buffer.length)
  15395. buffer = Buffer.concat([buffer, Buffer.from([value])])
  15396. while (++i < len) {
  15397. out[i] = buffer[i] << 1 | buffer[i + 1] >> (7)
  15398. }
  15399. return out
  15400. }
  15401. exports.encrypt = function (self, chunk, decrypt) {
  15402. var len = chunk.length
  15403. var out = Buffer.allocUnsafe(len)
  15404. var i = -1
  15405. while (++i < len) {
  15406. out[i] = encryptByte(self, chunk[i], decrypt)
  15407. }
  15408. return out
  15409. }
  15410. /***/ }),
  15411. /***/ 149:
  15412. /*!**************************************************!*\
  15413. !*** ./node_modules/browserify-aes/modes/ofb.js ***!
  15414. \**************************************************/
  15415. /*! no static exports found */
  15416. /***/ (function(module, exports, __webpack_require__) {
  15417. /* WEBPACK VAR INJECTION */(function(Buffer) {var xor = __webpack_require__(/*! buffer-xor */ 145)
  15418. function getBlock (self) {
  15419. self._prev = self._cipher.encryptBlock(self._prev)
  15420. return self._prev
  15421. }
  15422. exports.encrypt = function (self, chunk) {
  15423. while (self._cache.length < chunk.length) {
  15424. self._cache = Buffer.concat([self._cache, getBlock(self)])
  15425. }
  15426. var pad = self._cache.slice(0, chunk.length)
  15427. self._cache = self._cache.slice(chunk.length)
  15428. return xor(chunk, pad)
  15429. }
  15430. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ 81).Buffer))
  15431. /***/ }),
  15432. /***/ 15:
  15433. /*!**********************************************************!*\
  15434. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  15435. \**********************************************************/
  15436. /*! no static exports found */
  15437. /***/ (function(module, exports, __webpack_require__) {
  15438. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  15439. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  15440. function _construct(t, e, r) {
  15441. if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
  15442. var o = [null];
  15443. o.push.apply(o, e);
  15444. var p = new (t.bind.apply(t, o))();
  15445. return r && setPrototypeOf(p, r.prototype), p;
  15446. }
  15447. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  15448. /***/ }),
  15449. /***/ 150:
  15450. /*!**************************************************!*\
  15451. !*** ./node_modules/browserify-aes/modes/ctr.js ***!
  15452. \**************************************************/
  15453. /*! no static exports found */
  15454. /***/ (function(module, exports, __webpack_require__) {
  15455. var xor = __webpack_require__(/*! buffer-xor */ 145)
  15456. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  15457. var incr32 = __webpack_require__(/*! ../incr32 */ 151)
  15458. function getBlock (self) {
  15459. var out = self._cipher.encryptBlockRaw(self._prev)
  15460. incr32(self._prev)
  15461. return out
  15462. }
  15463. var blockSize = 16
  15464. exports.encrypt = function (self, chunk) {
  15465. var chunkNum = Math.ceil(chunk.length / blockSize)
  15466. var start = self._cache.length
  15467. self._cache = Buffer.concat([
  15468. self._cache,
  15469. Buffer.allocUnsafe(chunkNum * blockSize)
  15470. ])
  15471. for (var i = 0; i < chunkNum; i++) {
  15472. var out = getBlock(self)
  15473. var offset = start + i * blockSize
  15474. self._cache.writeUInt32BE(out[0], offset + 0)
  15475. self._cache.writeUInt32BE(out[1], offset + 4)
  15476. self._cache.writeUInt32BE(out[2], offset + 8)
  15477. self._cache.writeUInt32BE(out[3], offset + 12)
  15478. }
  15479. var pad = self._cache.slice(0, chunk.length)
  15480. self._cache = self._cache.slice(chunk.length)
  15481. return xor(chunk, pad)
  15482. }
  15483. /***/ }),
  15484. /***/ 151:
  15485. /*!***********************************************!*\
  15486. !*** ./node_modules/browserify-aes/incr32.js ***!
  15487. \***********************************************/
  15488. /*! no static exports found */
  15489. /***/ (function(module, exports) {
  15490. function incr32 (iv) {
  15491. var len = iv.length
  15492. var item
  15493. while (len--) {
  15494. item = iv.readUInt8(len)
  15495. if (item === 255) {
  15496. iv.writeUInt8(0, len)
  15497. } else {
  15498. item++
  15499. iv.writeUInt8(item, len)
  15500. break
  15501. }
  15502. }
  15503. }
  15504. module.exports = incr32
  15505. /***/ }),
  15506. /***/ 152:
  15507. /*!*****************************************************!*\
  15508. !*** ./node_modules/browserify-aes/modes/list.json ***!
  15509. \*****************************************************/
  15510. /*! exports provided: aes-128-ecb, aes-192-ecb, aes-256-ecb, aes-128-cbc, aes-192-cbc, aes-256-cbc, aes128, aes192, aes256, aes-128-cfb, aes-192-cfb, aes-256-cfb, aes-128-cfb8, aes-192-cfb8, aes-256-cfb8, aes-128-cfb1, aes-192-cfb1, aes-256-cfb1, aes-128-ofb, aes-192-ofb, aes-256-ofb, aes-128-ctr, aes-192-ctr, aes-256-ctr, aes-128-gcm, aes-192-gcm, aes-256-gcm, default */
  15511. /***/ (function(module) {
  15512. module.exports = JSON.parse("{\"aes-128-ecb\":{\"cipher\":\"AES\",\"key\":128,\"iv\":0,\"mode\":\"ECB\",\"type\":\"block\"},\"aes-192-ecb\":{\"cipher\":\"AES\",\"key\":192,\"iv\":0,\"mode\":\"ECB\",\"type\":\"block\"},\"aes-256-ecb\":{\"cipher\":\"AES\",\"key\":256,\"iv\":0,\"mode\":\"ECB\",\"type\":\"block\"},\"aes-128-cbc\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes-192-cbc\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes-256-cbc\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes128\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes192\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes256\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes-128-cfb\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CFB\",\"type\":\"stream\"},\"aes-192-cfb\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CFB\",\"type\":\"stream\"},\"aes-256-cfb\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CFB\",\"type\":\"stream\"},\"aes-128-cfb8\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CFB8\",\"type\":\"stream\"},\"aes-192-cfb8\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CFB8\",\"type\":\"stream\"},\"aes-256-cfb8\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CFB8\",\"type\":\"stream\"},\"aes-128-cfb1\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CFB1\",\"type\":\"stream\"},\"aes-192-cfb1\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CFB1\",\"type\":\"stream\"},\"aes-256-cfb1\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CFB1\",\"type\":\"stream\"},\"aes-128-ofb\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"OFB\",\"type\":\"stream\"},\"aes-192-ofb\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"OFB\",\"type\":\"stream\"},\"aes-256-ofb\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"OFB\",\"type\":\"stream\"},\"aes-128-ctr\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CTR\",\"type\":\"stream\"},\"aes-192-ctr\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CTR\",\"type\":\"stream\"},\"aes-256-ctr\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CTR\",\"type\":\"stream\"},\"aes-128-gcm\":{\"cipher\":\"AES\",\"key\":128,\"iv\":12,\"mode\":\"GCM\",\"type\":\"auth\"},\"aes-192-gcm\":{\"cipher\":\"AES\",\"key\":192,\"iv\":12,\"mode\":\"GCM\",\"type\":\"auth\"},\"aes-256-gcm\":{\"cipher\":\"AES\",\"key\":256,\"iv\":12,\"mode\":\"GCM\",\"type\":\"auth\"}}");
  15513. /***/ }),
  15514. /***/ 153:
  15515. /*!***************************************************!*\
  15516. !*** ./node_modules/browserify-aes/authCipher.js ***!
  15517. \***************************************************/
  15518. /*! no static exports found */
  15519. /***/ (function(module, exports, __webpack_require__) {
  15520. var aes = __webpack_require__(/*! ./aes */ 154)
  15521. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  15522. var Transform = __webpack_require__(/*! cipher-base */ 114)
  15523. var inherits = __webpack_require__(/*! inherits */ 86)
  15524. var GHASH = __webpack_require__(/*! ./ghash */ 155)
  15525. var xor = __webpack_require__(/*! buffer-xor */ 145)
  15526. var incr32 = __webpack_require__(/*! ./incr32 */ 151)
  15527. function xorTest (a, b) {
  15528. var out = 0
  15529. if (a.length !== b.length) out++
  15530. var len = Math.min(a.length, b.length)
  15531. for (var i = 0; i < len; ++i) {
  15532. out += (a[i] ^ b[i])
  15533. }
  15534. return out
  15535. }
  15536. function calcIv (self, iv, ck) {
  15537. if (iv.length === 12) {
  15538. self._finID = Buffer.concat([iv, Buffer.from([0, 0, 0, 1])])
  15539. return Buffer.concat([iv, Buffer.from([0, 0, 0, 2])])
  15540. }
  15541. var ghash = new GHASH(ck)
  15542. var len = iv.length
  15543. var toPad = len % 16
  15544. ghash.update(iv)
  15545. if (toPad) {
  15546. toPad = 16 - toPad
  15547. ghash.update(Buffer.alloc(toPad, 0))
  15548. }
  15549. ghash.update(Buffer.alloc(8, 0))
  15550. var ivBits = len * 8
  15551. var tail = Buffer.alloc(8)
  15552. tail.writeUIntBE(ivBits, 0, 8)
  15553. ghash.update(tail)
  15554. self._finID = ghash.state
  15555. var out = Buffer.from(self._finID)
  15556. incr32(out)
  15557. return out
  15558. }
  15559. function StreamCipher (mode, key, iv, decrypt) {
  15560. Transform.call(this)
  15561. var h = Buffer.alloc(4, 0)
  15562. this._cipher = new aes.AES(key)
  15563. var ck = this._cipher.encryptBlock(h)
  15564. this._ghash = new GHASH(ck)
  15565. iv = calcIv(this, iv, ck)
  15566. this._prev = Buffer.from(iv)
  15567. this._cache = Buffer.allocUnsafe(0)
  15568. this._secCache = Buffer.allocUnsafe(0)
  15569. this._decrypt = decrypt
  15570. this._alen = 0
  15571. this._len = 0
  15572. this._mode = mode
  15573. this._authTag = null
  15574. this._called = false
  15575. }
  15576. inherits(StreamCipher, Transform)
  15577. StreamCipher.prototype._update = function (chunk) {
  15578. if (!this._called && this._alen) {
  15579. var rump = 16 - (this._alen % 16)
  15580. if (rump < 16) {
  15581. rump = Buffer.alloc(rump, 0)
  15582. this._ghash.update(rump)
  15583. }
  15584. }
  15585. this._called = true
  15586. var out = this._mode.encrypt(this, chunk)
  15587. if (this._decrypt) {
  15588. this._ghash.update(chunk)
  15589. } else {
  15590. this._ghash.update(out)
  15591. }
  15592. this._len += chunk.length
  15593. return out
  15594. }
  15595. StreamCipher.prototype._final = function () {
  15596. if (this._decrypt && !this._authTag) throw new Error('Unsupported state or unable to authenticate data')
  15597. var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID))
  15598. if (this._decrypt && xorTest(tag, this._authTag)) throw new Error('Unsupported state or unable to authenticate data')
  15599. this._authTag = tag
  15600. this._cipher.scrub()
  15601. }
  15602. StreamCipher.prototype.getAuthTag = function getAuthTag () {
  15603. if (this._decrypt || !Buffer.isBuffer(this._authTag)) throw new Error('Attempting to get auth tag in unsupported state')
  15604. return this._authTag
  15605. }
  15606. StreamCipher.prototype.setAuthTag = function setAuthTag (tag) {
  15607. if (!this._decrypt) throw new Error('Attempting to set auth tag in unsupported state')
  15608. this._authTag = tag
  15609. }
  15610. StreamCipher.prototype.setAAD = function setAAD (buf) {
  15611. if (this._called) throw new Error('Attempting to set AAD in unsupported state')
  15612. this._ghash.update(buf)
  15613. this._alen += buf.length
  15614. }
  15615. module.exports = StreamCipher
  15616. /***/ }),
  15617. /***/ 154:
  15618. /*!********************************************!*\
  15619. !*** ./node_modules/browserify-aes/aes.js ***!
  15620. \********************************************/
  15621. /*! no static exports found */
  15622. /***/ (function(module, exports, __webpack_require__) {
  15623. // based on the aes implimentation in triple sec
  15624. // https://github.com/keybase/triplesec
  15625. // which is in turn based on the one from crypto-js
  15626. // https://code.google.com/p/crypto-js/
  15627. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  15628. function asUInt32Array (buf) {
  15629. if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)
  15630. var len = (buf.length / 4) | 0
  15631. var out = new Array(len)
  15632. for (var i = 0; i < len; i++) {
  15633. out[i] = buf.readUInt32BE(i * 4)
  15634. }
  15635. return out
  15636. }
  15637. function scrubVec (v) {
  15638. for (var i = 0; i < v.length; v++) {
  15639. v[i] = 0
  15640. }
  15641. }
  15642. function cryptBlock (M, keySchedule, SUB_MIX, SBOX, nRounds) {
  15643. var SUB_MIX0 = SUB_MIX[0]
  15644. var SUB_MIX1 = SUB_MIX[1]
  15645. var SUB_MIX2 = SUB_MIX[2]
  15646. var SUB_MIX3 = SUB_MIX[3]
  15647. var s0 = M[0] ^ keySchedule[0]
  15648. var s1 = M[1] ^ keySchedule[1]
  15649. var s2 = M[2] ^ keySchedule[2]
  15650. var s3 = M[3] ^ keySchedule[3]
  15651. var t0, t1, t2, t3
  15652. var ksRow = 4
  15653. for (var round = 1; round < nRounds; round++) {
  15654. t0 = SUB_MIX0[s0 >>> 24] ^ SUB_MIX1[(s1 >>> 16) & 0xff] ^ SUB_MIX2[(s2 >>> 8) & 0xff] ^ SUB_MIX3[s3 & 0xff] ^ keySchedule[ksRow++]
  15655. t1 = SUB_MIX0[s1 >>> 24] ^ SUB_MIX1[(s2 >>> 16) & 0xff] ^ SUB_MIX2[(s3 >>> 8) & 0xff] ^ SUB_MIX3[s0 & 0xff] ^ keySchedule[ksRow++]
  15656. t2 = SUB_MIX0[s2 >>> 24] ^ SUB_MIX1[(s3 >>> 16) & 0xff] ^ SUB_MIX2[(s0 >>> 8) & 0xff] ^ SUB_MIX3[s1 & 0xff] ^ keySchedule[ksRow++]
  15657. t3 = SUB_MIX0[s3 >>> 24] ^ SUB_MIX1[(s0 >>> 16) & 0xff] ^ SUB_MIX2[(s1 >>> 8) & 0xff] ^ SUB_MIX3[s2 & 0xff] ^ keySchedule[ksRow++]
  15658. s0 = t0
  15659. s1 = t1
  15660. s2 = t2
  15661. s3 = t3
  15662. }
  15663. t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]
  15664. t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]
  15665. t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]
  15666. t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]
  15667. t0 = t0 >>> 0
  15668. t1 = t1 >>> 0
  15669. t2 = t2 >>> 0
  15670. t3 = t3 >>> 0
  15671. return [t0, t1, t2, t3]
  15672. }
  15673. // AES constants
  15674. var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]
  15675. var G = (function () {
  15676. // Compute double table
  15677. var d = new Array(256)
  15678. for (var j = 0; j < 256; j++) {
  15679. if (j < 128) {
  15680. d[j] = j << 1
  15681. } else {
  15682. d[j] = (j << 1) ^ 0x11b
  15683. }
  15684. }
  15685. var SBOX = []
  15686. var INV_SBOX = []
  15687. var SUB_MIX = [[], [], [], []]
  15688. var INV_SUB_MIX = [[], [], [], []]
  15689. // Walk GF(2^8)
  15690. var x = 0
  15691. var xi = 0
  15692. for (var i = 0; i < 256; ++i) {
  15693. // Compute sbox
  15694. var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4)
  15695. sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63
  15696. SBOX[x] = sx
  15697. INV_SBOX[sx] = x
  15698. // Compute multiplication
  15699. var x2 = d[x]
  15700. var x4 = d[x2]
  15701. var x8 = d[x4]
  15702. // Compute sub bytes, mix columns tables
  15703. var t = (d[sx] * 0x101) ^ (sx * 0x1010100)
  15704. SUB_MIX[0][x] = (t << 24) | (t >>> 8)
  15705. SUB_MIX[1][x] = (t << 16) | (t >>> 16)
  15706. SUB_MIX[2][x] = (t << 8) | (t >>> 24)
  15707. SUB_MIX[3][x] = t
  15708. // Compute inv sub bytes, inv mix columns tables
  15709. t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100)
  15710. INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8)
  15711. INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16)
  15712. INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24)
  15713. INV_SUB_MIX[3][sx] = t
  15714. if (x === 0) {
  15715. x = xi = 1
  15716. } else {
  15717. x = x2 ^ d[d[d[x8 ^ x2]]]
  15718. xi ^= d[d[xi]]
  15719. }
  15720. }
  15721. return {
  15722. SBOX: SBOX,
  15723. INV_SBOX: INV_SBOX,
  15724. SUB_MIX: SUB_MIX,
  15725. INV_SUB_MIX: INV_SUB_MIX
  15726. }
  15727. })()
  15728. function AES (key) {
  15729. this._key = asUInt32Array(key)
  15730. this._reset()
  15731. }
  15732. AES.blockSize = 4 * 4
  15733. AES.keySize = 256 / 8
  15734. AES.prototype.blockSize = AES.blockSize
  15735. AES.prototype.keySize = AES.keySize
  15736. AES.prototype._reset = function () {
  15737. var keyWords = this._key
  15738. var keySize = keyWords.length
  15739. var nRounds = keySize + 6
  15740. var ksRows = (nRounds + 1) * 4
  15741. var keySchedule = []
  15742. for (var k = 0; k < keySize; k++) {
  15743. keySchedule[k] = keyWords[k]
  15744. }
  15745. for (k = keySize; k < ksRows; k++) {
  15746. var t = keySchedule[k - 1]
  15747. if (k % keySize === 0) {
  15748. t = (t << 8) | (t >>> 24)
  15749. t =
  15750. (G.SBOX[t >>> 24] << 24) |
  15751. (G.SBOX[(t >>> 16) & 0xff] << 16) |
  15752. (G.SBOX[(t >>> 8) & 0xff] << 8) |
  15753. (G.SBOX[t & 0xff])
  15754. t ^= RCON[(k / keySize) | 0] << 24
  15755. } else if (keySize > 6 && k % keySize === 4) {
  15756. t =
  15757. (G.SBOX[t >>> 24] << 24) |
  15758. (G.SBOX[(t >>> 16) & 0xff] << 16) |
  15759. (G.SBOX[(t >>> 8) & 0xff] << 8) |
  15760. (G.SBOX[t & 0xff])
  15761. }
  15762. keySchedule[k] = keySchedule[k - keySize] ^ t
  15763. }
  15764. var invKeySchedule = []
  15765. for (var ik = 0; ik < ksRows; ik++) {
  15766. var ksR = ksRows - ik
  15767. var tt = keySchedule[ksR - (ik % 4 ? 0 : 4)]
  15768. if (ik < 4 || ksR <= 4) {
  15769. invKeySchedule[ik] = tt
  15770. } else {
  15771. invKeySchedule[ik] =
  15772. G.INV_SUB_MIX[0][G.SBOX[tt >>> 24]] ^
  15773. G.INV_SUB_MIX[1][G.SBOX[(tt >>> 16) & 0xff]] ^
  15774. G.INV_SUB_MIX[2][G.SBOX[(tt >>> 8) & 0xff]] ^
  15775. G.INV_SUB_MIX[3][G.SBOX[tt & 0xff]]
  15776. }
  15777. }
  15778. this._nRounds = nRounds
  15779. this._keySchedule = keySchedule
  15780. this._invKeySchedule = invKeySchedule
  15781. }
  15782. AES.prototype.encryptBlockRaw = function (M) {
  15783. M = asUInt32Array(M)
  15784. return cryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX, this._nRounds)
  15785. }
  15786. AES.prototype.encryptBlock = function (M) {
  15787. var out = this.encryptBlockRaw(M)
  15788. var buf = Buffer.allocUnsafe(16)
  15789. buf.writeUInt32BE(out[0], 0)
  15790. buf.writeUInt32BE(out[1], 4)
  15791. buf.writeUInt32BE(out[2], 8)
  15792. buf.writeUInt32BE(out[3], 12)
  15793. return buf
  15794. }
  15795. AES.prototype.decryptBlock = function (M) {
  15796. M = asUInt32Array(M)
  15797. // swap
  15798. var m1 = M[1]
  15799. M[1] = M[3]
  15800. M[3] = m1
  15801. var out = cryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX, this._nRounds)
  15802. var buf = Buffer.allocUnsafe(16)
  15803. buf.writeUInt32BE(out[0], 0)
  15804. buf.writeUInt32BE(out[3], 4)
  15805. buf.writeUInt32BE(out[2], 8)
  15806. buf.writeUInt32BE(out[1], 12)
  15807. return buf
  15808. }
  15809. AES.prototype.scrub = function () {
  15810. scrubVec(this._keySchedule)
  15811. scrubVec(this._invKeySchedule)
  15812. scrubVec(this._key)
  15813. }
  15814. module.exports.AES = AES
  15815. /***/ }),
  15816. /***/ 155:
  15817. /*!**********************************************!*\
  15818. !*** ./node_modules/browserify-aes/ghash.js ***!
  15819. \**********************************************/
  15820. /*! no static exports found */
  15821. /***/ (function(module, exports, __webpack_require__) {
  15822. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  15823. var ZEROES = Buffer.alloc(16, 0)
  15824. function toArray (buf) {
  15825. return [
  15826. buf.readUInt32BE(0),
  15827. buf.readUInt32BE(4),
  15828. buf.readUInt32BE(8),
  15829. buf.readUInt32BE(12)
  15830. ]
  15831. }
  15832. function fromArray (out) {
  15833. var buf = Buffer.allocUnsafe(16)
  15834. buf.writeUInt32BE(out[0] >>> 0, 0)
  15835. buf.writeUInt32BE(out[1] >>> 0, 4)
  15836. buf.writeUInt32BE(out[2] >>> 0, 8)
  15837. buf.writeUInt32BE(out[3] >>> 0, 12)
  15838. return buf
  15839. }
  15840. function GHASH (key) {
  15841. this.h = key
  15842. this.state = Buffer.alloc(16, 0)
  15843. this.cache = Buffer.allocUnsafe(0)
  15844. }
  15845. // from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html
  15846. // by Juho Vähä-Herttua
  15847. GHASH.prototype.ghash = function (block) {
  15848. var i = -1
  15849. while (++i < block.length) {
  15850. this.state[i] ^= block[i]
  15851. }
  15852. this._multiply()
  15853. }
  15854. GHASH.prototype._multiply = function () {
  15855. var Vi = toArray(this.h)
  15856. var Zi = [0, 0, 0, 0]
  15857. var j, xi, lsbVi
  15858. var i = -1
  15859. while (++i < 128) {
  15860. xi = (this.state[~~(i / 8)] & (1 << (7 - (i % 8)))) !== 0
  15861. if (xi) {
  15862. // Z_i+1 = Z_i ^ V_i
  15863. Zi[0] ^= Vi[0]
  15864. Zi[1] ^= Vi[1]
  15865. Zi[2] ^= Vi[2]
  15866. Zi[3] ^= Vi[3]
  15867. }
  15868. // Store the value of LSB(V_i)
  15869. lsbVi = (Vi[3] & 1) !== 0
  15870. // V_i+1 = V_i >> 1
  15871. for (j = 3; j > 0; j--) {
  15872. Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31)
  15873. }
  15874. Vi[0] = Vi[0] >>> 1
  15875. // If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R
  15876. if (lsbVi) {
  15877. Vi[0] = Vi[0] ^ (0xe1 << 24)
  15878. }
  15879. }
  15880. this.state = fromArray(Zi)
  15881. }
  15882. GHASH.prototype.update = function (buf) {
  15883. this.cache = Buffer.concat([this.cache, buf])
  15884. var chunk
  15885. while (this.cache.length >= 16) {
  15886. chunk = this.cache.slice(0, 16)
  15887. this.cache = this.cache.slice(16)
  15888. this.ghash(chunk)
  15889. }
  15890. }
  15891. GHASH.prototype.final = function (abl, bl) {
  15892. if (this.cache.length) {
  15893. this.ghash(Buffer.concat([this.cache, ZEROES], 16))
  15894. }
  15895. this.ghash(fromArray([0, abl, 0, bl]))
  15896. return this.state
  15897. }
  15898. module.exports = GHASH
  15899. /***/ }),
  15900. /***/ 156:
  15901. /*!*****************************************************!*\
  15902. !*** ./node_modules/browserify-aes/streamCipher.js ***!
  15903. \*****************************************************/
  15904. /*! no static exports found */
  15905. /***/ (function(module, exports, __webpack_require__) {
  15906. var aes = __webpack_require__(/*! ./aes */ 154)
  15907. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  15908. var Transform = __webpack_require__(/*! cipher-base */ 114)
  15909. var inherits = __webpack_require__(/*! inherits */ 86)
  15910. function StreamCipher (mode, key, iv, decrypt) {
  15911. Transform.call(this)
  15912. this._cipher = new aes.AES(key)
  15913. this._prev = Buffer.from(iv)
  15914. this._cache = Buffer.allocUnsafe(0)
  15915. this._secCache = Buffer.allocUnsafe(0)
  15916. this._decrypt = decrypt
  15917. this._mode = mode
  15918. }
  15919. inherits(StreamCipher, Transform)
  15920. StreamCipher.prototype._update = function (chunk) {
  15921. return this._mode.encrypt(this, chunk, this._decrypt)
  15922. }
  15923. StreamCipher.prototype._final = function () {
  15924. this._cipher.scrub()
  15925. }
  15926. module.exports = StreamCipher
  15927. /***/ }),
  15928. /***/ 157:
  15929. /*!**********************************************!*\
  15930. !*** ./node_modules/evp_bytestokey/index.js ***!
  15931. \**********************************************/
  15932. /*! no static exports found */
  15933. /***/ (function(module, exports, __webpack_require__) {
  15934. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  15935. var MD5 = __webpack_require__(/*! md5.js */ 87)
  15936. /* eslint-disable camelcase */
  15937. function EVP_BytesToKey (password, salt, keyBits, ivLen) {
  15938. if (!Buffer.isBuffer(password)) password = Buffer.from(password, 'binary')
  15939. if (salt) {
  15940. if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, 'binary')
  15941. if (salt.length !== 8) throw new RangeError('salt should be Buffer with 8 byte length')
  15942. }
  15943. var keyLen = keyBits / 8
  15944. var key = Buffer.alloc(keyLen)
  15945. var iv = Buffer.alloc(ivLen || 0)
  15946. var tmp = Buffer.alloc(0)
  15947. while (keyLen > 0 || ivLen > 0) {
  15948. var hash = new MD5()
  15949. hash.update(tmp)
  15950. hash.update(password)
  15951. if (salt) hash.update(salt)
  15952. tmp = hash.digest()
  15953. var used = 0
  15954. if (keyLen > 0) {
  15955. var keyStart = key.length - keyLen
  15956. used = Math.min(keyLen, tmp.length)
  15957. tmp.copy(key, keyStart, 0, used)
  15958. keyLen -= used
  15959. }
  15960. if (used < tmp.length && ivLen > 0) {
  15961. var ivStart = iv.length - ivLen
  15962. var length = Math.min(ivLen, tmp.length - used)
  15963. tmp.copy(iv, ivStart, used, used + length)
  15964. ivLen -= length
  15965. }
  15966. }
  15967. tmp.fill(0)
  15968. return { key: key, iv: iv }
  15969. }
  15970. module.exports = EVP_BytesToKey
  15971. /***/ }),
  15972. /***/ 158:
  15973. /*!**************************************************!*\
  15974. !*** ./node_modules/browserify-aes/decrypter.js ***!
  15975. \**************************************************/
  15976. /*! no static exports found */
  15977. /***/ (function(module, exports, __webpack_require__) {
  15978. var AuthCipher = __webpack_require__(/*! ./authCipher */ 153)
  15979. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  15980. var MODES = __webpack_require__(/*! ./modes */ 142)
  15981. var StreamCipher = __webpack_require__(/*! ./streamCipher */ 156)
  15982. var Transform = __webpack_require__(/*! cipher-base */ 114)
  15983. var aes = __webpack_require__(/*! ./aes */ 154)
  15984. var ebtk = __webpack_require__(/*! evp_bytestokey */ 157)
  15985. var inherits = __webpack_require__(/*! inherits */ 86)
  15986. function Decipher (mode, key, iv) {
  15987. Transform.call(this)
  15988. this._cache = new Splitter()
  15989. this._last = void 0
  15990. this._cipher = new aes.AES(key)
  15991. this._prev = Buffer.from(iv)
  15992. this._mode = mode
  15993. this._autopadding = true
  15994. }
  15995. inherits(Decipher, Transform)
  15996. Decipher.prototype._update = function (data) {
  15997. this._cache.add(data)
  15998. var chunk
  15999. var thing
  16000. var out = []
  16001. while ((chunk = this._cache.get(this._autopadding))) {
  16002. thing = this._mode.decrypt(this, chunk)
  16003. out.push(thing)
  16004. }
  16005. return Buffer.concat(out)
  16006. }
  16007. Decipher.prototype._final = function () {
  16008. var chunk = this._cache.flush()
  16009. if (this._autopadding) {
  16010. return unpad(this._mode.decrypt(this, chunk))
  16011. } else if (chunk) {
  16012. throw new Error('data not multiple of block length')
  16013. }
  16014. }
  16015. Decipher.prototype.setAutoPadding = function (setTo) {
  16016. this._autopadding = !!setTo
  16017. return this
  16018. }
  16019. function Splitter () {
  16020. this.cache = Buffer.allocUnsafe(0)
  16021. }
  16022. Splitter.prototype.add = function (data) {
  16023. this.cache = Buffer.concat([this.cache, data])
  16024. }
  16025. Splitter.prototype.get = function (autoPadding) {
  16026. var out
  16027. if (autoPadding) {
  16028. if (this.cache.length > 16) {
  16029. out = this.cache.slice(0, 16)
  16030. this.cache = this.cache.slice(16)
  16031. return out
  16032. }
  16033. } else {
  16034. if (this.cache.length >= 16) {
  16035. out = this.cache.slice(0, 16)
  16036. this.cache = this.cache.slice(16)
  16037. return out
  16038. }
  16039. }
  16040. return null
  16041. }
  16042. Splitter.prototype.flush = function () {
  16043. if (this.cache.length) return this.cache
  16044. }
  16045. function unpad (last) {
  16046. var padded = last[15]
  16047. if (padded < 1 || padded > 16) {
  16048. throw new Error('unable to decrypt data')
  16049. }
  16050. var i = -1
  16051. while (++i < padded) {
  16052. if (last[(i + (16 - padded))] !== padded) {
  16053. throw new Error('unable to decrypt data')
  16054. }
  16055. }
  16056. if (padded === 16) return
  16057. return last.slice(0, 16 - padded)
  16058. }
  16059. function createDecipheriv (suite, password, iv) {
  16060. var config = MODES[suite.toLowerCase()]
  16061. if (!config) throw new TypeError('invalid suite type')
  16062. if (typeof iv === 'string') iv = Buffer.from(iv)
  16063. if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length)
  16064. if (typeof password === 'string') password = Buffer.from(password)
  16065. if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length)
  16066. if (config.type === 'stream') {
  16067. return new StreamCipher(config.module, password, iv, true)
  16068. } else if (config.type === 'auth') {
  16069. return new AuthCipher(config.module, password, iv, true)
  16070. }
  16071. return new Decipher(config.module, password, iv)
  16072. }
  16073. function createDecipher (suite, password) {
  16074. var config = MODES[suite.toLowerCase()]
  16075. if (!config) throw new TypeError('invalid suite type')
  16076. var keys = ebtk(password, false, config.key, config.iv)
  16077. return createDecipheriv(suite, keys.key, keys.iv)
  16078. }
  16079. exports.createDecipher = createDecipher
  16080. exports.createDecipheriv = createDecipheriv
  16081. /***/ }),
  16082. /***/ 159:
  16083. /*!**********************************************!*\
  16084. !*** ./node_modules/browserify-des/modes.js ***!
  16085. \**********************************************/
  16086. /*! no static exports found */
  16087. /***/ (function(module, exports) {
  16088. exports['des-ecb'] = {
  16089. key: 8,
  16090. iv: 0
  16091. }
  16092. exports['des-cbc'] = exports.des = {
  16093. key: 8,
  16094. iv: 8
  16095. }
  16096. exports['des-ede3-cbc'] = exports.des3 = {
  16097. key: 24,
  16098. iv: 8
  16099. }
  16100. exports['des-ede3'] = {
  16101. key: 24,
  16102. iv: 0
  16103. }
  16104. exports['des-ede-cbc'] = {
  16105. key: 16,
  16106. iv: 8
  16107. }
  16108. exports['des-ede'] = {
  16109. key: 16,
  16110. iv: 0
  16111. }
  16112. /***/ }),
  16113. /***/ 16:
  16114. /*!***************************************************************!*\
  16115. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  16116. \***************************************************************/
  16117. /*! no static exports found */
  16118. /***/ (function(module, exports) {
  16119. function _setPrototypeOf(o, p) {
  16120. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  16121. o.__proto__ = p;
  16122. return o;
  16123. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16124. return _setPrototypeOf(o, p);
  16125. }
  16126. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16127. /***/ }),
  16128. /***/ 160:
  16129. /*!************************************************!*\
  16130. !*** ./node_modules/diffie-hellman/browser.js ***!
  16131. \************************************************/
  16132. /*! no static exports found */
  16133. /***/ (function(module, exports, __webpack_require__) {
  16134. /* WEBPACK VAR INJECTION */(function(Buffer) {var generatePrime = __webpack_require__(/*! ./lib/generatePrime */ 161)
  16135. var primes = __webpack_require__(/*! ./lib/primes.json */ 168)
  16136. var DH = __webpack_require__(/*! ./lib/dh */ 169)
  16137. function getDiffieHellman (mod) {
  16138. var prime = new Buffer(primes[mod].prime, 'hex')
  16139. var gen = new Buffer(primes[mod].gen, 'hex')
  16140. return new DH(prime, gen)
  16141. }
  16142. var ENCODINGS = {
  16143. 'binary': true, 'hex': true, 'base64': true
  16144. }
  16145. function createDiffieHellman (prime, enc, generator, genc) {
  16146. if (Buffer.isBuffer(enc) || ENCODINGS[enc] === undefined) {
  16147. return createDiffieHellman(prime, 'binary', enc, generator)
  16148. }
  16149. enc = enc || 'binary'
  16150. genc = genc || 'binary'
  16151. generator = generator || new Buffer([2])
  16152. if (!Buffer.isBuffer(generator)) {
  16153. generator = new Buffer(generator, genc)
  16154. }
  16155. if (typeof prime === 'number') {
  16156. return new DH(generatePrime(prime, generator), generator, true)
  16157. }
  16158. if (!Buffer.isBuffer(prime)) {
  16159. prime = new Buffer(prime, enc)
  16160. }
  16161. return new DH(prime, generator, true)
  16162. }
  16163. exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffieHellman = getDiffieHellman
  16164. exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman
  16165. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ 81).Buffer))
  16166. /***/ }),
  16167. /***/ 161:
  16168. /*!**********************************************************!*\
  16169. !*** ./node_modules/diffie-hellman/lib/generatePrime.js ***!
  16170. \**********************************************************/
  16171. /*! no static exports found */
  16172. /***/ (function(module, exports, __webpack_require__) {
  16173. var randomBytes = __webpack_require__(/*! randombytes */ 77);
  16174. module.exports = findPrime;
  16175. findPrime.simpleSieve = simpleSieve;
  16176. findPrime.fermatTest = fermatTest;
  16177. var BN = __webpack_require__(/*! bn.js */ 162);
  16178. var TWENTYFOUR = new BN(24);
  16179. var MillerRabin = __webpack_require__(/*! miller-rabin */ 165);
  16180. var millerRabin = new MillerRabin();
  16181. var ONE = new BN(1);
  16182. var TWO = new BN(2);
  16183. var FIVE = new BN(5);
  16184. var SIXTEEN = new BN(16);
  16185. var EIGHT = new BN(8);
  16186. var TEN = new BN(10);
  16187. var THREE = new BN(3);
  16188. var SEVEN = new BN(7);
  16189. var ELEVEN = new BN(11);
  16190. var FOUR = new BN(4);
  16191. var TWELVE = new BN(12);
  16192. var primes = null;
  16193. function _getPrimes() {
  16194. if (primes !== null)
  16195. return primes;
  16196. var limit = 0x100000;
  16197. var res = [];
  16198. res[0] = 2;
  16199. for (var i = 1, k = 3; k < limit; k += 2) {
  16200. var sqrt = Math.ceil(Math.sqrt(k));
  16201. for (var j = 0; j < i && res[j] <= sqrt; j++)
  16202. if (k % res[j] === 0)
  16203. break;
  16204. if (i !== j && res[j] <= sqrt)
  16205. continue;
  16206. res[i++] = k;
  16207. }
  16208. primes = res;
  16209. return res;
  16210. }
  16211. function simpleSieve(p) {
  16212. var primes = _getPrimes();
  16213. for (var i = 0; i < primes.length; i++)
  16214. if (p.modn(primes[i]) === 0) {
  16215. if (p.cmpn(primes[i]) === 0) {
  16216. return true;
  16217. } else {
  16218. return false;
  16219. }
  16220. }
  16221. return true;
  16222. }
  16223. function fermatTest(p) {
  16224. var red = BN.mont(p);
  16225. return TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1) === 0;
  16226. }
  16227. function findPrime(bits, gen) {
  16228. if (bits < 16) {
  16229. // this is what openssl does
  16230. if (gen === 2 || gen === 5) {
  16231. return new BN([0x8c, 0x7b]);
  16232. } else {
  16233. return new BN([0x8c, 0x27]);
  16234. }
  16235. }
  16236. gen = new BN(gen);
  16237. var num, n2;
  16238. while (true) {
  16239. num = new BN(randomBytes(Math.ceil(bits / 8)));
  16240. while (num.bitLength() > bits) {
  16241. num.ishrn(1);
  16242. }
  16243. if (num.isEven()) {
  16244. num.iadd(ONE);
  16245. }
  16246. if (!num.testn(1)) {
  16247. num.iadd(TWO);
  16248. }
  16249. if (!gen.cmp(TWO)) {
  16250. while (num.mod(TWENTYFOUR).cmp(ELEVEN)) {
  16251. num.iadd(FOUR);
  16252. }
  16253. } else if (!gen.cmp(FIVE)) {
  16254. while (num.mod(TEN).cmp(THREE)) {
  16255. num.iadd(FOUR);
  16256. }
  16257. }
  16258. n2 = num.shrn(1);
  16259. if (simpleSieve(n2) && simpleSieve(num) &&
  16260. fermatTest(n2) && fermatTest(num) &&
  16261. millerRabin.test(n2) && millerRabin.test(num)) {
  16262. return num;
  16263. }
  16264. }
  16265. }
  16266. /***/ }),
  16267. /***/ 162:
  16268. /*!**************************************!*\
  16269. !*** ./node_modules/bn.js/lib/bn.js ***!
  16270. \**************************************/
  16271. /*! no static exports found */
  16272. /***/ (function(module, exports, __webpack_require__) {
  16273. /* WEBPACK VAR INJECTION */(function(module) {(function (module, exports) {
  16274. 'use strict';
  16275. // Utils
  16276. function assert (val, msg) {
  16277. if (!val) throw new Error(msg || 'Assertion failed');
  16278. }
  16279. // Could use `inherits` module, but don't want to move from single file
  16280. // architecture yet.
  16281. function inherits (ctor, superCtor) {
  16282. ctor.super_ = superCtor;
  16283. var TempCtor = function () {};
  16284. TempCtor.prototype = superCtor.prototype;
  16285. ctor.prototype = new TempCtor();
  16286. ctor.prototype.constructor = ctor;
  16287. }
  16288. // BN
  16289. function BN (number, base, endian) {
  16290. if (BN.isBN(number)) {
  16291. return number;
  16292. }
  16293. this.negative = 0;
  16294. this.words = null;
  16295. this.length = 0;
  16296. // Reduction context
  16297. this.red = null;
  16298. if (number !== null) {
  16299. if (base === 'le' || base === 'be') {
  16300. endian = base;
  16301. base = 10;
  16302. }
  16303. this._init(number || 0, base || 10, endian || 'be');
  16304. }
  16305. }
  16306. if (typeof module === 'object') {
  16307. module.exports = BN;
  16308. } else {
  16309. exports.BN = BN;
  16310. }
  16311. BN.BN = BN;
  16312. BN.wordSize = 26;
  16313. var Buffer;
  16314. try {
  16315. if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {
  16316. Buffer = window.Buffer;
  16317. } else {
  16318. Buffer = __webpack_require__(/*! buffer */ 164).Buffer;
  16319. }
  16320. } catch (e) {
  16321. }
  16322. BN.isBN = function isBN (num) {
  16323. if (num instanceof BN) {
  16324. return true;
  16325. }
  16326. return num !== null && typeof num === 'object' &&
  16327. num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);
  16328. };
  16329. BN.max = function max (left, right) {
  16330. if (left.cmp(right) > 0) return left;
  16331. return right;
  16332. };
  16333. BN.min = function min (left, right) {
  16334. if (left.cmp(right) < 0) return left;
  16335. return right;
  16336. };
  16337. BN.prototype._init = function init (number, base, endian) {
  16338. if (typeof number === 'number') {
  16339. return this._initNumber(number, base, endian);
  16340. }
  16341. if (typeof number === 'object') {
  16342. return this._initArray(number, base, endian);
  16343. }
  16344. if (base === 'hex') {
  16345. base = 16;
  16346. }
  16347. assert(base === (base | 0) && base >= 2 && base <= 36);
  16348. number = number.toString().replace(/\s+/g, '');
  16349. var start = 0;
  16350. if (number[0] === '-') {
  16351. start++;
  16352. this.negative = 1;
  16353. }
  16354. if (start < number.length) {
  16355. if (base === 16) {
  16356. this._parseHex(number, start, endian);
  16357. } else {
  16358. this._parseBase(number, base, start);
  16359. if (endian === 'le') {
  16360. this._initArray(this.toArray(), base, endian);
  16361. }
  16362. }
  16363. }
  16364. };
  16365. BN.prototype._initNumber = function _initNumber (number, base, endian) {
  16366. if (number < 0) {
  16367. this.negative = 1;
  16368. number = -number;
  16369. }
  16370. if (number < 0x4000000) {
  16371. this.words = [ number & 0x3ffffff ];
  16372. this.length = 1;
  16373. } else if (number < 0x10000000000000) {
  16374. this.words = [
  16375. number & 0x3ffffff,
  16376. (number / 0x4000000) & 0x3ffffff
  16377. ];
  16378. this.length = 2;
  16379. } else {
  16380. assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)
  16381. this.words = [
  16382. number & 0x3ffffff,
  16383. (number / 0x4000000) & 0x3ffffff,
  16384. 1
  16385. ];
  16386. this.length = 3;
  16387. }
  16388. if (endian !== 'le') return;
  16389. // Reverse the bytes
  16390. this._initArray(this.toArray(), base, endian);
  16391. };
  16392. BN.prototype._initArray = function _initArray (number, base, endian) {
  16393. // Perhaps a Uint8Array
  16394. assert(typeof number.length === 'number');
  16395. if (number.length <= 0) {
  16396. this.words = [ 0 ];
  16397. this.length = 1;
  16398. return this;
  16399. }
  16400. this.length = Math.ceil(number.length / 3);
  16401. this.words = new Array(this.length);
  16402. for (var i = 0; i < this.length; i++) {
  16403. this.words[i] = 0;
  16404. }
  16405. var j, w;
  16406. var off = 0;
  16407. if (endian === 'be') {
  16408. for (i = number.length - 1, j = 0; i >= 0; i -= 3) {
  16409. w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);
  16410. this.words[j] |= (w << off) & 0x3ffffff;
  16411. this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
  16412. off += 24;
  16413. if (off >= 26) {
  16414. off -= 26;
  16415. j++;
  16416. }
  16417. }
  16418. } else if (endian === 'le') {
  16419. for (i = 0, j = 0; i < number.length; i += 3) {
  16420. w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);
  16421. this.words[j] |= (w << off) & 0x3ffffff;
  16422. this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
  16423. off += 24;
  16424. if (off >= 26) {
  16425. off -= 26;
  16426. j++;
  16427. }
  16428. }
  16429. }
  16430. return this.strip();
  16431. };
  16432. function parseHex4Bits (string, index) {
  16433. var c = string.charCodeAt(index);
  16434. // 'A' - 'F'
  16435. if (c >= 65 && c <= 70) {
  16436. return c - 55;
  16437. // 'a' - 'f'
  16438. } else if (c >= 97 && c <= 102) {
  16439. return c - 87;
  16440. // '0' - '9'
  16441. } else {
  16442. return (c - 48) & 0xf;
  16443. }
  16444. }
  16445. function parseHexByte (string, lowerBound, index) {
  16446. var r = parseHex4Bits(string, index);
  16447. if (index - 1 >= lowerBound) {
  16448. r |= parseHex4Bits(string, index - 1) << 4;
  16449. }
  16450. return r;
  16451. }
  16452. BN.prototype._parseHex = function _parseHex (number, start, endian) {
  16453. // Create possibly bigger array to ensure that it fits the number
  16454. this.length = Math.ceil((number.length - start) / 6);
  16455. this.words = new Array(this.length);
  16456. for (var i = 0; i < this.length; i++) {
  16457. this.words[i] = 0;
  16458. }
  16459. // 24-bits chunks
  16460. var off = 0;
  16461. var j = 0;
  16462. var w;
  16463. if (endian === 'be') {
  16464. for (i = number.length - 1; i >= start; i -= 2) {
  16465. w = parseHexByte(number, start, i) << off;
  16466. this.words[j] |= w & 0x3ffffff;
  16467. if (off >= 18) {
  16468. off -= 18;
  16469. j += 1;
  16470. this.words[j] |= w >>> 26;
  16471. } else {
  16472. off += 8;
  16473. }
  16474. }
  16475. } else {
  16476. var parseLength = number.length - start;
  16477. for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {
  16478. w = parseHexByte(number, start, i) << off;
  16479. this.words[j] |= w & 0x3ffffff;
  16480. if (off >= 18) {
  16481. off -= 18;
  16482. j += 1;
  16483. this.words[j] |= w >>> 26;
  16484. } else {
  16485. off += 8;
  16486. }
  16487. }
  16488. }
  16489. this.strip();
  16490. };
  16491. function parseBase (str, start, end, mul) {
  16492. var r = 0;
  16493. var len = Math.min(str.length, end);
  16494. for (var i = start; i < len; i++) {
  16495. var c = str.charCodeAt(i) - 48;
  16496. r *= mul;
  16497. // 'a'
  16498. if (c >= 49) {
  16499. r += c - 49 + 0xa;
  16500. // 'A'
  16501. } else if (c >= 17) {
  16502. r += c - 17 + 0xa;
  16503. // '0' - '9'
  16504. } else {
  16505. r += c;
  16506. }
  16507. }
  16508. return r;
  16509. }
  16510. BN.prototype._parseBase = function _parseBase (number, base, start) {
  16511. // Initialize as zero
  16512. this.words = [ 0 ];
  16513. this.length = 1;
  16514. // Find length of limb in base
  16515. for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {
  16516. limbLen++;
  16517. }
  16518. limbLen--;
  16519. limbPow = (limbPow / base) | 0;
  16520. var total = number.length - start;
  16521. var mod = total % limbLen;
  16522. var end = Math.min(total, total - mod) + start;
  16523. var word = 0;
  16524. for (var i = start; i < end; i += limbLen) {
  16525. word = parseBase(number, i, i + limbLen, base);
  16526. this.imuln(limbPow);
  16527. if (this.words[0] + word < 0x4000000) {
  16528. this.words[0] += word;
  16529. } else {
  16530. this._iaddn(word);
  16531. }
  16532. }
  16533. if (mod !== 0) {
  16534. var pow = 1;
  16535. word = parseBase(number, i, number.length, base);
  16536. for (i = 0; i < mod; i++) {
  16537. pow *= base;
  16538. }
  16539. this.imuln(pow);
  16540. if (this.words[0] + word < 0x4000000) {
  16541. this.words[0] += word;
  16542. } else {
  16543. this._iaddn(word);
  16544. }
  16545. }
  16546. this.strip();
  16547. };
  16548. BN.prototype.copy = function copy (dest) {
  16549. dest.words = new Array(this.length);
  16550. for (var i = 0; i < this.length; i++) {
  16551. dest.words[i] = this.words[i];
  16552. }
  16553. dest.length = this.length;
  16554. dest.negative = this.negative;
  16555. dest.red = this.red;
  16556. };
  16557. BN.prototype.clone = function clone () {
  16558. var r = new BN(null);
  16559. this.copy(r);
  16560. return r;
  16561. };
  16562. BN.prototype._expand = function _expand (size) {
  16563. while (this.length < size) {
  16564. this.words[this.length++] = 0;
  16565. }
  16566. return this;
  16567. };
  16568. // Remove leading `0` from `this`
  16569. BN.prototype.strip = function strip () {
  16570. while (this.length > 1 && this.words[this.length - 1] === 0) {
  16571. this.length--;
  16572. }
  16573. return this._normSign();
  16574. };
  16575. BN.prototype._normSign = function _normSign () {
  16576. // -0 = 0
  16577. if (this.length === 1 && this.words[0] === 0) {
  16578. this.negative = 0;
  16579. }
  16580. return this;
  16581. };
  16582. BN.prototype.inspect = function inspect () {
  16583. return (this.red ? '<BN-R: ' : '<BN: ') + this.toString(16) + '>';
  16584. };
  16585. /*
  16586. var zeros = [];
  16587. var groupSizes = [];
  16588. var groupBases = [];
  16589. var s = '';
  16590. var i = -1;
  16591. while (++i < BN.wordSize) {
  16592. zeros[i] = s;
  16593. s += '0';
  16594. }
  16595. groupSizes[0] = 0;
  16596. groupSizes[1] = 0;
  16597. groupBases[0] = 0;
  16598. groupBases[1] = 0;
  16599. var base = 2 - 1;
  16600. while (++base < 36 + 1) {
  16601. var groupSize = 0;
  16602. var groupBase = 1;
  16603. while (groupBase < (1 << BN.wordSize) / base) {
  16604. groupBase *= base;
  16605. groupSize += 1;
  16606. }
  16607. groupSizes[base] = groupSize;
  16608. groupBases[base] = groupBase;
  16609. }
  16610. */
  16611. var zeros = [
  16612. '',
  16613. '0',
  16614. '00',
  16615. '000',
  16616. '0000',
  16617. '00000',
  16618. '000000',
  16619. '0000000',
  16620. '00000000',
  16621. '000000000',
  16622. '0000000000',
  16623. '00000000000',
  16624. '000000000000',
  16625. '0000000000000',
  16626. '00000000000000',
  16627. '000000000000000',
  16628. '0000000000000000',
  16629. '00000000000000000',
  16630. '000000000000000000',
  16631. '0000000000000000000',
  16632. '00000000000000000000',
  16633. '000000000000000000000',
  16634. '0000000000000000000000',
  16635. '00000000000000000000000',
  16636. '000000000000000000000000',
  16637. '0000000000000000000000000'
  16638. ];
  16639. var groupSizes = [
  16640. 0, 0,
  16641. 25, 16, 12, 11, 10, 9, 8,
  16642. 8, 7, 7, 7, 7, 6, 6,
  16643. 6, 6, 6, 6, 6, 5, 5,
  16644. 5, 5, 5, 5, 5, 5, 5,
  16645. 5, 5, 5, 5, 5, 5, 5
  16646. ];
  16647. var groupBases = [
  16648. 0, 0,
  16649. 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,
  16650. 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,
  16651. 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,
  16652. 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,
  16653. 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176
  16654. ];
  16655. BN.prototype.toString = function toString (base, padding) {
  16656. base = base || 10;
  16657. padding = padding | 0 || 1;
  16658. var out;
  16659. if (base === 16 || base === 'hex') {
  16660. out = '';
  16661. var off = 0;
  16662. var carry = 0;
  16663. for (var i = 0; i < this.length; i++) {
  16664. var w = this.words[i];
  16665. var word = (((w << off) | carry) & 0xffffff).toString(16);
  16666. carry = (w >>> (24 - off)) & 0xffffff;
  16667. if (carry !== 0 || i !== this.length - 1) {
  16668. out = zeros[6 - word.length] + word + out;
  16669. } else {
  16670. out = word + out;
  16671. }
  16672. off += 2;
  16673. if (off >= 26) {
  16674. off -= 26;
  16675. i--;
  16676. }
  16677. }
  16678. if (carry !== 0) {
  16679. out = carry.toString(16) + out;
  16680. }
  16681. while (out.length % padding !== 0) {
  16682. out = '0' + out;
  16683. }
  16684. if (this.negative !== 0) {
  16685. out = '-' + out;
  16686. }
  16687. return out;
  16688. }
  16689. if (base === (base | 0) && base >= 2 && base <= 36) {
  16690. // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));
  16691. var groupSize = groupSizes[base];
  16692. // var groupBase = Math.pow(base, groupSize);
  16693. var groupBase = groupBases[base];
  16694. out = '';
  16695. var c = this.clone();
  16696. c.negative = 0;
  16697. while (!c.isZero()) {
  16698. var r = c.modn(groupBase).toString(base);
  16699. c = c.idivn(groupBase);
  16700. if (!c.isZero()) {
  16701. out = zeros[groupSize - r.length] + r + out;
  16702. } else {
  16703. out = r + out;
  16704. }
  16705. }
  16706. if (this.isZero()) {
  16707. out = '0' + out;
  16708. }
  16709. while (out.length % padding !== 0) {
  16710. out = '0' + out;
  16711. }
  16712. if (this.negative !== 0) {
  16713. out = '-' + out;
  16714. }
  16715. return out;
  16716. }
  16717. assert(false, 'Base should be between 2 and 36');
  16718. };
  16719. BN.prototype.toNumber = function toNumber () {
  16720. var ret = this.words[0];
  16721. if (this.length === 2) {
  16722. ret += this.words[1] * 0x4000000;
  16723. } else if (this.length === 3 && this.words[2] === 0x01) {
  16724. // NOTE: at this stage it is known that the top bit is set
  16725. ret += 0x10000000000000 + (this.words[1] * 0x4000000);
  16726. } else if (this.length > 2) {
  16727. assert(false, 'Number can only safely store up to 53 bits');
  16728. }
  16729. return (this.negative !== 0) ? -ret : ret;
  16730. };
  16731. BN.prototype.toJSON = function toJSON () {
  16732. return this.toString(16);
  16733. };
  16734. BN.prototype.toBuffer = function toBuffer (endian, length) {
  16735. assert(typeof Buffer !== 'undefined');
  16736. return this.toArrayLike(Buffer, endian, length);
  16737. };
  16738. BN.prototype.toArray = function toArray (endian, length) {
  16739. return this.toArrayLike(Array, endian, length);
  16740. };
  16741. BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {
  16742. var byteLength = this.byteLength();
  16743. var reqLength = length || Math.max(1, byteLength);
  16744. assert(byteLength <= reqLength, 'byte array longer than desired length');
  16745. assert(reqLength > 0, 'Requested array length <= 0');
  16746. this.strip();
  16747. var littleEndian = endian === 'le';
  16748. var res = new ArrayType(reqLength);
  16749. var b, i;
  16750. var q = this.clone();
  16751. if (!littleEndian) {
  16752. // Assume big-endian
  16753. for (i = 0; i < reqLength - byteLength; i++) {
  16754. res[i] = 0;
  16755. }
  16756. for (i = 0; !q.isZero(); i++) {
  16757. b = q.andln(0xff);
  16758. q.iushrn(8);
  16759. res[reqLength - i - 1] = b;
  16760. }
  16761. } else {
  16762. for (i = 0; !q.isZero(); i++) {
  16763. b = q.andln(0xff);
  16764. q.iushrn(8);
  16765. res[i] = b;
  16766. }
  16767. for (; i < reqLength; i++) {
  16768. res[i] = 0;
  16769. }
  16770. }
  16771. return res;
  16772. };
  16773. if (Math.clz32) {
  16774. BN.prototype._countBits = function _countBits (w) {
  16775. return 32 - Math.clz32(w);
  16776. };
  16777. } else {
  16778. BN.prototype._countBits = function _countBits (w) {
  16779. var t = w;
  16780. var r = 0;
  16781. if (t >= 0x1000) {
  16782. r += 13;
  16783. t >>>= 13;
  16784. }
  16785. if (t >= 0x40) {
  16786. r += 7;
  16787. t >>>= 7;
  16788. }
  16789. if (t >= 0x8) {
  16790. r += 4;
  16791. t >>>= 4;
  16792. }
  16793. if (t >= 0x02) {
  16794. r += 2;
  16795. t >>>= 2;
  16796. }
  16797. return r + t;
  16798. };
  16799. }
  16800. BN.prototype._zeroBits = function _zeroBits (w) {
  16801. // Short-cut
  16802. if (w === 0) return 26;
  16803. var t = w;
  16804. var r = 0;
  16805. if ((t & 0x1fff) === 0) {
  16806. r += 13;
  16807. t >>>= 13;
  16808. }
  16809. if ((t & 0x7f) === 0) {
  16810. r += 7;
  16811. t >>>= 7;
  16812. }
  16813. if ((t & 0xf) === 0) {
  16814. r += 4;
  16815. t >>>= 4;
  16816. }
  16817. if ((t & 0x3) === 0) {
  16818. r += 2;
  16819. t >>>= 2;
  16820. }
  16821. if ((t & 0x1) === 0) {
  16822. r++;
  16823. }
  16824. return r;
  16825. };
  16826. // Return number of used bits in a BN
  16827. BN.prototype.bitLength = function bitLength () {
  16828. var w = this.words[this.length - 1];
  16829. var hi = this._countBits(w);
  16830. return (this.length - 1) * 26 + hi;
  16831. };
  16832. function toBitArray (num) {
  16833. var w = new Array(num.bitLength());
  16834. for (var bit = 0; bit < w.length; bit++) {
  16835. var off = (bit / 26) | 0;
  16836. var wbit = bit % 26;
  16837. w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;
  16838. }
  16839. return w;
  16840. }
  16841. // Number of trailing zero bits
  16842. BN.prototype.zeroBits = function zeroBits () {
  16843. if (this.isZero()) return 0;
  16844. var r = 0;
  16845. for (var i = 0; i < this.length; i++) {
  16846. var b = this._zeroBits(this.words[i]);
  16847. r += b;
  16848. if (b !== 26) break;
  16849. }
  16850. return r;
  16851. };
  16852. BN.prototype.byteLength = function byteLength () {
  16853. return Math.ceil(this.bitLength() / 8);
  16854. };
  16855. BN.prototype.toTwos = function toTwos (width) {
  16856. if (this.negative !== 0) {
  16857. return this.abs().inotn(width).iaddn(1);
  16858. }
  16859. return this.clone();
  16860. };
  16861. BN.prototype.fromTwos = function fromTwos (width) {
  16862. if (this.testn(width - 1)) {
  16863. return this.notn(width).iaddn(1).ineg();
  16864. }
  16865. return this.clone();
  16866. };
  16867. BN.prototype.isNeg = function isNeg () {
  16868. return this.negative !== 0;
  16869. };
  16870. // Return negative clone of `this`
  16871. BN.prototype.neg = function neg () {
  16872. return this.clone().ineg();
  16873. };
  16874. BN.prototype.ineg = function ineg () {
  16875. if (!this.isZero()) {
  16876. this.negative ^= 1;
  16877. }
  16878. return this;
  16879. };
  16880. // Or `num` with `this` in-place
  16881. BN.prototype.iuor = function iuor (num) {
  16882. while (this.length < num.length) {
  16883. this.words[this.length++] = 0;
  16884. }
  16885. for (var i = 0; i < num.length; i++) {
  16886. this.words[i] = this.words[i] | num.words[i];
  16887. }
  16888. return this.strip();
  16889. };
  16890. BN.prototype.ior = function ior (num) {
  16891. assert((this.negative | num.negative) === 0);
  16892. return this.iuor(num);
  16893. };
  16894. // Or `num` with `this`
  16895. BN.prototype.or = function or (num) {
  16896. if (this.length > num.length) return this.clone().ior(num);
  16897. return num.clone().ior(this);
  16898. };
  16899. BN.prototype.uor = function uor (num) {
  16900. if (this.length > num.length) return this.clone().iuor(num);
  16901. return num.clone().iuor(this);
  16902. };
  16903. // And `num` with `this` in-place
  16904. BN.prototype.iuand = function iuand (num) {
  16905. // b = min-length(num, this)
  16906. var b;
  16907. if (this.length > num.length) {
  16908. b = num;
  16909. } else {
  16910. b = this;
  16911. }
  16912. for (var i = 0; i < b.length; i++) {
  16913. this.words[i] = this.words[i] & num.words[i];
  16914. }
  16915. this.length = b.length;
  16916. return this.strip();
  16917. };
  16918. BN.prototype.iand = function iand (num) {
  16919. assert((this.negative | num.negative) === 0);
  16920. return this.iuand(num);
  16921. };
  16922. // And `num` with `this`
  16923. BN.prototype.and = function and (num) {
  16924. if (this.length > num.length) return this.clone().iand(num);
  16925. return num.clone().iand(this);
  16926. };
  16927. BN.prototype.uand = function uand (num) {
  16928. if (this.length > num.length) return this.clone().iuand(num);
  16929. return num.clone().iuand(this);
  16930. };
  16931. // Xor `num` with `this` in-place
  16932. BN.prototype.iuxor = function iuxor (num) {
  16933. // a.length > b.length
  16934. var a;
  16935. var b;
  16936. if (this.length > num.length) {
  16937. a = this;
  16938. b = num;
  16939. } else {
  16940. a = num;
  16941. b = this;
  16942. }
  16943. for (var i = 0; i < b.length; i++) {
  16944. this.words[i] = a.words[i] ^ b.words[i];
  16945. }
  16946. if (this !== a) {
  16947. for (; i < a.length; i++) {
  16948. this.words[i] = a.words[i];
  16949. }
  16950. }
  16951. this.length = a.length;
  16952. return this.strip();
  16953. };
  16954. BN.prototype.ixor = function ixor (num) {
  16955. assert((this.negative | num.negative) === 0);
  16956. return this.iuxor(num);
  16957. };
  16958. // Xor `num` with `this`
  16959. BN.prototype.xor = function xor (num) {
  16960. if (this.length > num.length) return this.clone().ixor(num);
  16961. return num.clone().ixor(this);
  16962. };
  16963. BN.prototype.uxor = function uxor (num) {
  16964. if (this.length > num.length) return this.clone().iuxor(num);
  16965. return num.clone().iuxor(this);
  16966. };
  16967. // Not ``this`` with ``width`` bitwidth
  16968. BN.prototype.inotn = function inotn (width) {
  16969. assert(typeof width === 'number' && width >= 0);
  16970. var bytesNeeded = Math.ceil(width / 26) | 0;
  16971. var bitsLeft = width % 26;
  16972. // Extend the buffer with leading zeroes
  16973. this._expand(bytesNeeded);
  16974. if (bitsLeft > 0) {
  16975. bytesNeeded--;
  16976. }
  16977. // Handle complete words
  16978. for (var i = 0; i < bytesNeeded; i++) {
  16979. this.words[i] = ~this.words[i] & 0x3ffffff;
  16980. }
  16981. // Handle the residue
  16982. if (bitsLeft > 0) {
  16983. this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));
  16984. }
  16985. // And remove leading zeroes
  16986. return this.strip();
  16987. };
  16988. BN.prototype.notn = function notn (width) {
  16989. return this.clone().inotn(width);
  16990. };
  16991. // Set `bit` of `this`
  16992. BN.prototype.setn = function setn (bit, val) {
  16993. assert(typeof bit === 'number' && bit >= 0);
  16994. var off = (bit / 26) | 0;
  16995. var wbit = bit % 26;
  16996. this._expand(off + 1);
  16997. if (val) {
  16998. this.words[off] = this.words[off] | (1 << wbit);
  16999. } else {
  17000. this.words[off] = this.words[off] & ~(1 << wbit);
  17001. }
  17002. return this.strip();
  17003. };
  17004. // Add `num` to `this` in-place
  17005. BN.prototype.iadd = function iadd (num) {
  17006. var r;
  17007. // negative + positive
  17008. if (this.negative !== 0 && num.negative === 0) {
  17009. this.negative = 0;
  17010. r = this.isub(num);
  17011. this.negative ^= 1;
  17012. return this._normSign();
  17013. // positive + negative
  17014. } else if (this.negative === 0 && num.negative !== 0) {
  17015. num.negative = 0;
  17016. r = this.isub(num);
  17017. num.negative = 1;
  17018. return r._normSign();
  17019. }
  17020. // a.length > b.length
  17021. var a, b;
  17022. if (this.length > num.length) {
  17023. a = this;
  17024. b = num;
  17025. } else {
  17026. a = num;
  17027. b = this;
  17028. }
  17029. var carry = 0;
  17030. for (var i = 0; i < b.length; i++) {
  17031. r = (a.words[i] | 0) + (b.words[i] | 0) + carry;
  17032. this.words[i] = r & 0x3ffffff;
  17033. carry = r >>> 26;
  17034. }
  17035. for (; carry !== 0 && i < a.length; i++) {
  17036. r = (a.words[i] | 0) + carry;
  17037. this.words[i] = r & 0x3ffffff;
  17038. carry = r >>> 26;
  17039. }
  17040. this.length = a.length;
  17041. if (carry !== 0) {
  17042. this.words[this.length] = carry;
  17043. this.length++;
  17044. // Copy the rest of the words
  17045. } else if (a !== this) {
  17046. for (; i < a.length; i++) {
  17047. this.words[i] = a.words[i];
  17048. }
  17049. }
  17050. return this;
  17051. };
  17052. // Add `num` to `this`
  17053. BN.prototype.add = function add (num) {
  17054. var res;
  17055. if (num.negative !== 0 && this.negative === 0) {
  17056. num.negative = 0;
  17057. res = this.sub(num);
  17058. num.negative ^= 1;
  17059. return res;
  17060. } else if (num.negative === 0 && this.negative !== 0) {
  17061. this.negative = 0;
  17062. res = num.sub(this);
  17063. this.negative = 1;
  17064. return res;
  17065. }
  17066. if (this.length > num.length) return this.clone().iadd(num);
  17067. return num.clone().iadd(this);
  17068. };
  17069. // Subtract `num` from `this` in-place
  17070. BN.prototype.isub = function isub (num) {
  17071. // this - (-num) = this + num
  17072. if (num.negative !== 0) {
  17073. num.negative = 0;
  17074. var r = this.iadd(num);
  17075. num.negative = 1;
  17076. return r._normSign();
  17077. // -this - num = -(this + num)
  17078. } else if (this.negative !== 0) {
  17079. this.negative = 0;
  17080. this.iadd(num);
  17081. this.negative = 1;
  17082. return this._normSign();
  17083. }
  17084. // At this point both numbers are positive
  17085. var cmp = this.cmp(num);
  17086. // Optimization - zeroify
  17087. if (cmp === 0) {
  17088. this.negative = 0;
  17089. this.length = 1;
  17090. this.words[0] = 0;
  17091. return this;
  17092. }
  17093. // a > b
  17094. var a, b;
  17095. if (cmp > 0) {
  17096. a = this;
  17097. b = num;
  17098. } else {
  17099. a = num;
  17100. b = this;
  17101. }
  17102. var carry = 0;
  17103. for (var i = 0; i < b.length; i++) {
  17104. r = (a.words[i] | 0) - (b.words[i] | 0) + carry;
  17105. carry = r >> 26;
  17106. this.words[i] = r & 0x3ffffff;
  17107. }
  17108. for (; carry !== 0 && i < a.length; i++) {
  17109. r = (a.words[i] | 0) + carry;
  17110. carry = r >> 26;
  17111. this.words[i] = r & 0x3ffffff;
  17112. }
  17113. // Copy rest of the words
  17114. if (carry === 0 && i < a.length && a !== this) {
  17115. for (; i < a.length; i++) {
  17116. this.words[i] = a.words[i];
  17117. }
  17118. }
  17119. this.length = Math.max(this.length, i);
  17120. if (a !== this) {
  17121. this.negative = 1;
  17122. }
  17123. return this.strip();
  17124. };
  17125. // Subtract `num` from `this`
  17126. BN.prototype.sub = function sub (num) {
  17127. return this.clone().isub(num);
  17128. };
  17129. function smallMulTo (self, num, out) {
  17130. out.negative = num.negative ^ self.negative;
  17131. var len = (self.length + num.length) | 0;
  17132. out.length = len;
  17133. len = (len - 1) | 0;
  17134. // Peel one iteration (compiler can't do it, because of code complexity)
  17135. var a = self.words[0] | 0;
  17136. var b = num.words[0] | 0;
  17137. var r = a * b;
  17138. var lo = r & 0x3ffffff;
  17139. var carry = (r / 0x4000000) | 0;
  17140. out.words[0] = lo;
  17141. for (var k = 1; k < len; k++) {
  17142. // Sum all words with the same `i + j = k` and accumulate `ncarry`,
  17143. // note that ncarry could be >= 0x3ffffff
  17144. var ncarry = carry >>> 26;
  17145. var rword = carry & 0x3ffffff;
  17146. var maxJ = Math.min(k, num.length - 1);
  17147. for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {
  17148. var i = (k - j) | 0;
  17149. a = self.words[i] | 0;
  17150. b = num.words[j] | 0;
  17151. r = a * b + rword;
  17152. ncarry += (r / 0x4000000) | 0;
  17153. rword = r & 0x3ffffff;
  17154. }
  17155. out.words[k] = rword | 0;
  17156. carry = ncarry | 0;
  17157. }
  17158. if (carry !== 0) {
  17159. out.words[k] = carry | 0;
  17160. } else {
  17161. out.length--;
  17162. }
  17163. return out.strip();
  17164. }
  17165. // TODO(indutny): it may be reasonable to omit it for users who don't need
  17166. // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit
  17167. // multiplication (like elliptic secp256k1).
  17168. var comb10MulTo = function comb10MulTo (self, num, out) {
  17169. var a = self.words;
  17170. var b = num.words;
  17171. var o = out.words;
  17172. var c = 0;
  17173. var lo;
  17174. var mid;
  17175. var hi;
  17176. var a0 = a[0] | 0;
  17177. var al0 = a0 & 0x1fff;
  17178. var ah0 = a0 >>> 13;
  17179. var a1 = a[1] | 0;
  17180. var al1 = a1 & 0x1fff;
  17181. var ah1 = a1 >>> 13;
  17182. var a2 = a[2] | 0;
  17183. var al2 = a2 & 0x1fff;
  17184. var ah2 = a2 >>> 13;
  17185. var a3 = a[3] | 0;
  17186. var al3 = a3 & 0x1fff;
  17187. var ah3 = a3 >>> 13;
  17188. var a4 = a[4] | 0;
  17189. var al4 = a4 & 0x1fff;
  17190. var ah4 = a4 >>> 13;
  17191. var a5 = a[5] | 0;
  17192. var al5 = a5 & 0x1fff;
  17193. var ah5 = a5 >>> 13;
  17194. var a6 = a[6] | 0;
  17195. var al6 = a6 & 0x1fff;
  17196. var ah6 = a6 >>> 13;
  17197. var a7 = a[7] | 0;
  17198. var al7 = a7 & 0x1fff;
  17199. var ah7 = a7 >>> 13;
  17200. var a8 = a[8] | 0;
  17201. var al8 = a8 & 0x1fff;
  17202. var ah8 = a8 >>> 13;
  17203. var a9 = a[9] | 0;
  17204. var al9 = a9 & 0x1fff;
  17205. var ah9 = a9 >>> 13;
  17206. var b0 = b[0] | 0;
  17207. var bl0 = b0 & 0x1fff;
  17208. var bh0 = b0 >>> 13;
  17209. var b1 = b[1] | 0;
  17210. var bl1 = b1 & 0x1fff;
  17211. var bh1 = b1 >>> 13;
  17212. var b2 = b[2] | 0;
  17213. var bl2 = b2 & 0x1fff;
  17214. var bh2 = b2 >>> 13;
  17215. var b3 = b[3] | 0;
  17216. var bl3 = b3 & 0x1fff;
  17217. var bh3 = b3 >>> 13;
  17218. var b4 = b[4] | 0;
  17219. var bl4 = b4 & 0x1fff;
  17220. var bh4 = b4 >>> 13;
  17221. var b5 = b[5] | 0;
  17222. var bl5 = b5 & 0x1fff;
  17223. var bh5 = b5 >>> 13;
  17224. var b6 = b[6] | 0;
  17225. var bl6 = b6 & 0x1fff;
  17226. var bh6 = b6 >>> 13;
  17227. var b7 = b[7] | 0;
  17228. var bl7 = b7 & 0x1fff;
  17229. var bh7 = b7 >>> 13;
  17230. var b8 = b[8] | 0;
  17231. var bl8 = b8 & 0x1fff;
  17232. var bh8 = b8 >>> 13;
  17233. var b9 = b[9] | 0;
  17234. var bl9 = b9 & 0x1fff;
  17235. var bh9 = b9 >>> 13;
  17236. out.negative = self.negative ^ num.negative;
  17237. out.length = 19;
  17238. /* k = 0 */
  17239. lo = Math.imul(al0, bl0);
  17240. mid = Math.imul(al0, bh0);
  17241. mid = (mid + Math.imul(ah0, bl0)) | 0;
  17242. hi = Math.imul(ah0, bh0);
  17243. var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17244. c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;
  17245. w0 &= 0x3ffffff;
  17246. /* k = 1 */
  17247. lo = Math.imul(al1, bl0);
  17248. mid = Math.imul(al1, bh0);
  17249. mid = (mid + Math.imul(ah1, bl0)) | 0;
  17250. hi = Math.imul(ah1, bh0);
  17251. lo = (lo + Math.imul(al0, bl1)) | 0;
  17252. mid = (mid + Math.imul(al0, bh1)) | 0;
  17253. mid = (mid + Math.imul(ah0, bl1)) | 0;
  17254. hi = (hi + Math.imul(ah0, bh1)) | 0;
  17255. var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17256. c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;
  17257. w1 &= 0x3ffffff;
  17258. /* k = 2 */
  17259. lo = Math.imul(al2, bl0);
  17260. mid = Math.imul(al2, bh0);
  17261. mid = (mid + Math.imul(ah2, bl0)) | 0;
  17262. hi = Math.imul(ah2, bh0);
  17263. lo = (lo + Math.imul(al1, bl1)) | 0;
  17264. mid = (mid + Math.imul(al1, bh1)) | 0;
  17265. mid = (mid + Math.imul(ah1, bl1)) | 0;
  17266. hi = (hi + Math.imul(ah1, bh1)) | 0;
  17267. lo = (lo + Math.imul(al0, bl2)) | 0;
  17268. mid = (mid + Math.imul(al0, bh2)) | 0;
  17269. mid = (mid + Math.imul(ah0, bl2)) | 0;
  17270. hi = (hi + Math.imul(ah0, bh2)) | 0;
  17271. var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17272. c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;
  17273. w2 &= 0x3ffffff;
  17274. /* k = 3 */
  17275. lo = Math.imul(al3, bl0);
  17276. mid = Math.imul(al3, bh0);
  17277. mid = (mid + Math.imul(ah3, bl0)) | 0;
  17278. hi = Math.imul(ah3, bh0);
  17279. lo = (lo + Math.imul(al2, bl1)) | 0;
  17280. mid = (mid + Math.imul(al2, bh1)) | 0;
  17281. mid = (mid + Math.imul(ah2, bl1)) | 0;
  17282. hi = (hi + Math.imul(ah2, bh1)) | 0;
  17283. lo = (lo + Math.imul(al1, bl2)) | 0;
  17284. mid = (mid + Math.imul(al1, bh2)) | 0;
  17285. mid = (mid + Math.imul(ah1, bl2)) | 0;
  17286. hi = (hi + Math.imul(ah1, bh2)) | 0;
  17287. lo = (lo + Math.imul(al0, bl3)) | 0;
  17288. mid = (mid + Math.imul(al0, bh3)) | 0;
  17289. mid = (mid + Math.imul(ah0, bl3)) | 0;
  17290. hi = (hi + Math.imul(ah0, bh3)) | 0;
  17291. var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17292. c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;
  17293. w3 &= 0x3ffffff;
  17294. /* k = 4 */
  17295. lo = Math.imul(al4, bl0);
  17296. mid = Math.imul(al4, bh0);
  17297. mid = (mid + Math.imul(ah4, bl0)) | 0;
  17298. hi = Math.imul(ah4, bh0);
  17299. lo = (lo + Math.imul(al3, bl1)) | 0;
  17300. mid = (mid + Math.imul(al3, bh1)) | 0;
  17301. mid = (mid + Math.imul(ah3, bl1)) | 0;
  17302. hi = (hi + Math.imul(ah3, bh1)) | 0;
  17303. lo = (lo + Math.imul(al2, bl2)) | 0;
  17304. mid = (mid + Math.imul(al2, bh2)) | 0;
  17305. mid = (mid + Math.imul(ah2, bl2)) | 0;
  17306. hi = (hi + Math.imul(ah2, bh2)) | 0;
  17307. lo = (lo + Math.imul(al1, bl3)) | 0;
  17308. mid = (mid + Math.imul(al1, bh3)) | 0;
  17309. mid = (mid + Math.imul(ah1, bl3)) | 0;
  17310. hi = (hi + Math.imul(ah1, bh3)) | 0;
  17311. lo = (lo + Math.imul(al0, bl4)) | 0;
  17312. mid = (mid + Math.imul(al0, bh4)) | 0;
  17313. mid = (mid + Math.imul(ah0, bl4)) | 0;
  17314. hi = (hi + Math.imul(ah0, bh4)) | 0;
  17315. var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17316. c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;
  17317. w4 &= 0x3ffffff;
  17318. /* k = 5 */
  17319. lo = Math.imul(al5, bl0);
  17320. mid = Math.imul(al5, bh0);
  17321. mid = (mid + Math.imul(ah5, bl0)) | 0;
  17322. hi = Math.imul(ah5, bh0);
  17323. lo = (lo + Math.imul(al4, bl1)) | 0;
  17324. mid = (mid + Math.imul(al4, bh1)) | 0;
  17325. mid = (mid + Math.imul(ah4, bl1)) | 0;
  17326. hi = (hi + Math.imul(ah4, bh1)) | 0;
  17327. lo = (lo + Math.imul(al3, bl2)) | 0;
  17328. mid = (mid + Math.imul(al3, bh2)) | 0;
  17329. mid = (mid + Math.imul(ah3, bl2)) | 0;
  17330. hi = (hi + Math.imul(ah3, bh2)) | 0;
  17331. lo = (lo + Math.imul(al2, bl3)) | 0;
  17332. mid = (mid + Math.imul(al2, bh3)) | 0;
  17333. mid = (mid + Math.imul(ah2, bl3)) | 0;
  17334. hi = (hi + Math.imul(ah2, bh3)) | 0;
  17335. lo = (lo + Math.imul(al1, bl4)) | 0;
  17336. mid = (mid + Math.imul(al1, bh4)) | 0;
  17337. mid = (mid + Math.imul(ah1, bl4)) | 0;
  17338. hi = (hi + Math.imul(ah1, bh4)) | 0;
  17339. lo = (lo + Math.imul(al0, bl5)) | 0;
  17340. mid = (mid + Math.imul(al0, bh5)) | 0;
  17341. mid = (mid + Math.imul(ah0, bl5)) | 0;
  17342. hi = (hi + Math.imul(ah0, bh5)) | 0;
  17343. var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17344. c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;
  17345. w5 &= 0x3ffffff;
  17346. /* k = 6 */
  17347. lo = Math.imul(al6, bl0);
  17348. mid = Math.imul(al6, bh0);
  17349. mid = (mid + Math.imul(ah6, bl0)) | 0;
  17350. hi = Math.imul(ah6, bh0);
  17351. lo = (lo + Math.imul(al5, bl1)) | 0;
  17352. mid = (mid + Math.imul(al5, bh1)) | 0;
  17353. mid = (mid + Math.imul(ah5, bl1)) | 0;
  17354. hi = (hi + Math.imul(ah5, bh1)) | 0;
  17355. lo = (lo + Math.imul(al4, bl2)) | 0;
  17356. mid = (mid + Math.imul(al4, bh2)) | 0;
  17357. mid = (mid + Math.imul(ah4, bl2)) | 0;
  17358. hi = (hi + Math.imul(ah4, bh2)) | 0;
  17359. lo = (lo + Math.imul(al3, bl3)) | 0;
  17360. mid = (mid + Math.imul(al3, bh3)) | 0;
  17361. mid = (mid + Math.imul(ah3, bl3)) | 0;
  17362. hi = (hi + Math.imul(ah3, bh3)) | 0;
  17363. lo = (lo + Math.imul(al2, bl4)) | 0;
  17364. mid = (mid + Math.imul(al2, bh4)) | 0;
  17365. mid = (mid + Math.imul(ah2, bl4)) | 0;
  17366. hi = (hi + Math.imul(ah2, bh4)) | 0;
  17367. lo = (lo + Math.imul(al1, bl5)) | 0;
  17368. mid = (mid + Math.imul(al1, bh5)) | 0;
  17369. mid = (mid + Math.imul(ah1, bl5)) | 0;
  17370. hi = (hi + Math.imul(ah1, bh5)) | 0;
  17371. lo = (lo + Math.imul(al0, bl6)) | 0;
  17372. mid = (mid + Math.imul(al0, bh6)) | 0;
  17373. mid = (mid + Math.imul(ah0, bl6)) | 0;
  17374. hi = (hi + Math.imul(ah0, bh6)) | 0;
  17375. var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17376. c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;
  17377. w6 &= 0x3ffffff;
  17378. /* k = 7 */
  17379. lo = Math.imul(al7, bl0);
  17380. mid = Math.imul(al7, bh0);
  17381. mid = (mid + Math.imul(ah7, bl0)) | 0;
  17382. hi = Math.imul(ah7, bh0);
  17383. lo = (lo + Math.imul(al6, bl1)) | 0;
  17384. mid = (mid + Math.imul(al6, bh1)) | 0;
  17385. mid = (mid + Math.imul(ah6, bl1)) | 0;
  17386. hi = (hi + Math.imul(ah6, bh1)) | 0;
  17387. lo = (lo + Math.imul(al5, bl2)) | 0;
  17388. mid = (mid + Math.imul(al5, bh2)) | 0;
  17389. mid = (mid + Math.imul(ah5, bl2)) | 0;
  17390. hi = (hi + Math.imul(ah5, bh2)) | 0;
  17391. lo = (lo + Math.imul(al4, bl3)) | 0;
  17392. mid = (mid + Math.imul(al4, bh3)) | 0;
  17393. mid = (mid + Math.imul(ah4, bl3)) | 0;
  17394. hi = (hi + Math.imul(ah4, bh3)) | 0;
  17395. lo = (lo + Math.imul(al3, bl4)) | 0;
  17396. mid = (mid + Math.imul(al3, bh4)) | 0;
  17397. mid = (mid + Math.imul(ah3, bl4)) | 0;
  17398. hi = (hi + Math.imul(ah3, bh4)) | 0;
  17399. lo = (lo + Math.imul(al2, bl5)) | 0;
  17400. mid = (mid + Math.imul(al2, bh5)) | 0;
  17401. mid = (mid + Math.imul(ah2, bl5)) | 0;
  17402. hi = (hi + Math.imul(ah2, bh5)) | 0;
  17403. lo = (lo + Math.imul(al1, bl6)) | 0;
  17404. mid = (mid + Math.imul(al1, bh6)) | 0;
  17405. mid = (mid + Math.imul(ah1, bl6)) | 0;
  17406. hi = (hi + Math.imul(ah1, bh6)) | 0;
  17407. lo = (lo + Math.imul(al0, bl7)) | 0;
  17408. mid = (mid + Math.imul(al0, bh7)) | 0;
  17409. mid = (mid + Math.imul(ah0, bl7)) | 0;
  17410. hi = (hi + Math.imul(ah0, bh7)) | 0;
  17411. var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17412. c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;
  17413. w7 &= 0x3ffffff;
  17414. /* k = 8 */
  17415. lo = Math.imul(al8, bl0);
  17416. mid = Math.imul(al8, bh0);
  17417. mid = (mid + Math.imul(ah8, bl0)) | 0;
  17418. hi = Math.imul(ah8, bh0);
  17419. lo = (lo + Math.imul(al7, bl1)) | 0;
  17420. mid = (mid + Math.imul(al7, bh1)) | 0;
  17421. mid = (mid + Math.imul(ah7, bl1)) | 0;
  17422. hi = (hi + Math.imul(ah7, bh1)) | 0;
  17423. lo = (lo + Math.imul(al6, bl2)) | 0;
  17424. mid = (mid + Math.imul(al6, bh2)) | 0;
  17425. mid = (mid + Math.imul(ah6, bl2)) | 0;
  17426. hi = (hi + Math.imul(ah6, bh2)) | 0;
  17427. lo = (lo + Math.imul(al5, bl3)) | 0;
  17428. mid = (mid + Math.imul(al5, bh3)) | 0;
  17429. mid = (mid + Math.imul(ah5, bl3)) | 0;
  17430. hi = (hi + Math.imul(ah5, bh3)) | 0;
  17431. lo = (lo + Math.imul(al4, bl4)) | 0;
  17432. mid = (mid + Math.imul(al4, bh4)) | 0;
  17433. mid = (mid + Math.imul(ah4, bl4)) | 0;
  17434. hi = (hi + Math.imul(ah4, bh4)) | 0;
  17435. lo = (lo + Math.imul(al3, bl5)) | 0;
  17436. mid = (mid + Math.imul(al3, bh5)) | 0;
  17437. mid = (mid + Math.imul(ah3, bl5)) | 0;
  17438. hi = (hi + Math.imul(ah3, bh5)) | 0;
  17439. lo = (lo + Math.imul(al2, bl6)) | 0;
  17440. mid = (mid + Math.imul(al2, bh6)) | 0;
  17441. mid = (mid + Math.imul(ah2, bl6)) | 0;
  17442. hi = (hi + Math.imul(ah2, bh6)) | 0;
  17443. lo = (lo + Math.imul(al1, bl7)) | 0;
  17444. mid = (mid + Math.imul(al1, bh7)) | 0;
  17445. mid = (mid + Math.imul(ah1, bl7)) | 0;
  17446. hi = (hi + Math.imul(ah1, bh7)) | 0;
  17447. lo = (lo + Math.imul(al0, bl8)) | 0;
  17448. mid = (mid + Math.imul(al0, bh8)) | 0;
  17449. mid = (mid + Math.imul(ah0, bl8)) | 0;
  17450. hi = (hi + Math.imul(ah0, bh8)) | 0;
  17451. var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17452. c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;
  17453. w8 &= 0x3ffffff;
  17454. /* k = 9 */
  17455. lo = Math.imul(al9, bl0);
  17456. mid = Math.imul(al9, bh0);
  17457. mid = (mid + Math.imul(ah9, bl0)) | 0;
  17458. hi = Math.imul(ah9, bh0);
  17459. lo = (lo + Math.imul(al8, bl1)) | 0;
  17460. mid = (mid + Math.imul(al8, bh1)) | 0;
  17461. mid = (mid + Math.imul(ah8, bl1)) | 0;
  17462. hi = (hi + Math.imul(ah8, bh1)) | 0;
  17463. lo = (lo + Math.imul(al7, bl2)) | 0;
  17464. mid = (mid + Math.imul(al7, bh2)) | 0;
  17465. mid = (mid + Math.imul(ah7, bl2)) | 0;
  17466. hi = (hi + Math.imul(ah7, bh2)) | 0;
  17467. lo = (lo + Math.imul(al6, bl3)) | 0;
  17468. mid = (mid + Math.imul(al6, bh3)) | 0;
  17469. mid = (mid + Math.imul(ah6, bl3)) | 0;
  17470. hi = (hi + Math.imul(ah6, bh3)) | 0;
  17471. lo = (lo + Math.imul(al5, bl4)) | 0;
  17472. mid = (mid + Math.imul(al5, bh4)) | 0;
  17473. mid = (mid + Math.imul(ah5, bl4)) | 0;
  17474. hi = (hi + Math.imul(ah5, bh4)) | 0;
  17475. lo = (lo + Math.imul(al4, bl5)) | 0;
  17476. mid = (mid + Math.imul(al4, bh5)) | 0;
  17477. mid = (mid + Math.imul(ah4, bl5)) | 0;
  17478. hi = (hi + Math.imul(ah4, bh5)) | 0;
  17479. lo = (lo + Math.imul(al3, bl6)) | 0;
  17480. mid = (mid + Math.imul(al3, bh6)) | 0;
  17481. mid = (mid + Math.imul(ah3, bl6)) | 0;
  17482. hi = (hi + Math.imul(ah3, bh6)) | 0;
  17483. lo = (lo + Math.imul(al2, bl7)) | 0;
  17484. mid = (mid + Math.imul(al2, bh7)) | 0;
  17485. mid = (mid + Math.imul(ah2, bl7)) | 0;
  17486. hi = (hi + Math.imul(ah2, bh7)) | 0;
  17487. lo = (lo + Math.imul(al1, bl8)) | 0;
  17488. mid = (mid + Math.imul(al1, bh8)) | 0;
  17489. mid = (mid + Math.imul(ah1, bl8)) | 0;
  17490. hi = (hi + Math.imul(ah1, bh8)) | 0;
  17491. lo = (lo + Math.imul(al0, bl9)) | 0;
  17492. mid = (mid + Math.imul(al0, bh9)) | 0;
  17493. mid = (mid + Math.imul(ah0, bl9)) | 0;
  17494. hi = (hi + Math.imul(ah0, bh9)) | 0;
  17495. var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17496. c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;
  17497. w9 &= 0x3ffffff;
  17498. /* k = 10 */
  17499. lo = Math.imul(al9, bl1);
  17500. mid = Math.imul(al9, bh1);
  17501. mid = (mid + Math.imul(ah9, bl1)) | 0;
  17502. hi = Math.imul(ah9, bh1);
  17503. lo = (lo + Math.imul(al8, bl2)) | 0;
  17504. mid = (mid + Math.imul(al8, bh2)) | 0;
  17505. mid = (mid + Math.imul(ah8, bl2)) | 0;
  17506. hi = (hi + Math.imul(ah8, bh2)) | 0;
  17507. lo = (lo + Math.imul(al7, bl3)) | 0;
  17508. mid = (mid + Math.imul(al7, bh3)) | 0;
  17509. mid = (mid + Math.imul(ah7, bl3)) | 0;
  17510. hi = (hi + Math.imul(ah7, bh3)) | 0;
  17511. lo = (lo + Math.imul(al6, bl4)) | 0;
  17512. mid = (mid + Math.imul(al6, bh4)) | 0;
  17513. mid = (mid + Math.imul(ah6, bl4)) | 0;
  17514. hi = (hi + Math.imul(ah6, bh4)) | 0;
  17515. lo = (lo + Math.imul(al5, bl5)) | 0;
  17516. mid = (mid + Math.imul(al5, bh5)) | 0;
  17517. mid = (mid + Math.imul(ah5, bl5)) | 0;
  17518. hi = (hi + Math.imul(ah5, bh5)) | 0;
  17519. lo = (lo + Math.imul(al4, bl6)) | 0;
  17520. mid = (mid + Math.imul(al4, bh6)) | 0;
  17521. mid = (mid + Math.imul(ah4, bl6)) | 0;
  17522. hi = (hi + Math.imul(ah4, bh6)) | 0;
  17523. lo = (lo + Math.imul(al3, bl7)) | 0;
  17524. mid = (mid + Math.imul(al3, bh7)) | 0;
  17525. mid = (mid + Math.imul(ah3, bl7)) | 0;
  17526. hi = (hi + Math.imul(ah3, bh7)) | 0;
  17527. lo = (lo + Math.imul(al2, bl8)) | 0;
  17528. mid = (mid + Math.imul(al2, bh8)) | 0;
  17529. mid = (mid + Math.imul(ah2, bl8)) | 0;
  17530. hi = (hi + Math.imul(ah2, bh8)) | 0;
  17531. lo = (lo + Math.imul(al1, bl9)) | 0;
  17532. mid = (mid + Math.imul(al1, bh9)) | 0;
  17533. mid = (mid + Math.imul(ah1, bl9)) | 0;
  17534. hi = (hi + Math.imul(ah1, bh9)) | 0;
  17535. var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17536. c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;
  17537. w10 &= 0x3ffffff;
  17538. /* k = 11 */
  17539. lo = Math.imul(al9, bl2);
  17540. mid = Math.imul(al9, bh2);
  17541. mid = (mid + Math.imul(ah9, bl2)) | 0;
  17542. hi = Math.imul(ah9, bh2);
  17543. lo = (lo + Math.imul(al8, bl3)) | 0;
  17544. mid = (mid + Math.imul(al8, bh3)) | 0;
  17545. mid = (mid + Math.imul(ah8, bl3)) | 0;
  17546. hi = (hi + Math.imul(ah8, bh3)) | 0;
  17547. lo = (lo + Math.imul(al7, bl4)) | 0;
  17548. mid = (mid + Math.imul(al7, bh4)) | 0;
  17549. mid = (mid + Math.imul(ah7, bl4)) | 0;
  17550. hi = (hi + Math.imul(ah7, bh4)) | 0;
  17551. lo = (lo + Math.imul(al6, bl5)) | 0;
  17552. mid = (mid + Math.imul(al6, bh5)) | 0;
  17553. mid = (mid + Math.imul(ah6, bl5)) | 0;
  17554. hi = (hi + Math.imul(ah6, bh5)) | 0;
  17555. lo = (lo + Math.imul(al5, bl6)) | 0;
  17556. mid = (mid + Math.imul(al5, bh6)) | 0;
  17557. mid = (mid + Math.imul(ah5, bl6)) | 0;
  17558. hi = (hi + Math.imul(ah5, bh6)) | 0;
  17559. lo = (lo + Math.imul(al4, bl7)) | 0;
  17560. mid = (mid + Math.imul(al4, bh7)) | 0;
  17561. mid = (mid + Math.imul(ah4, bl7)) | 0;
  17562. hi = (hi + Math.imul(ah4, bh7)) | 0;
  17563. lo = (lo + Math.imul(al3, bl8)) | 0;
  17564. mid = (mid + Math.imul(al3, bh8)) | 0;
  17565. mid = (mid + Math.imul(ah3, bl8)) | 0;
  17566. hi = (hi + Math.imul(ah3, bh8)) | 0;
  17567. lo = (lo + Math.imul(al2, bl9)) | 0;
  17568. mid = (mid + Math.imul(al2, bh9)) | 0;
  17569. mid = (mid + Math.imul(ah2, bl9)) | 0;
  17570. hi = (hi + Math.imul(ah2, bh9)) | 0;
  17571. var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17572. c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;
  17573. w11 &= 0x3ffffff;
  17574. /* k = 12 */
  17575. lo = Math.imul(al9, bl3);
  17576. mid = Math.imul(al9, bh3);
  17577. mid = (mid + Math.imul(ah9, bl3)) | 0;
  17578. hi = Math.imul(ah9, bh3);
  17579. lo = (lo + Math.imul(al8, bl4)) | 0;
  17580. mid = (mid + Math.imul(al8, bh4)) | 0;
  17581. mid = (mid + Math.imul(ah8, bl4)) | 0;
  17582. hi = (hi + Math.imul(ah8, bh4)) | 0;
  17583. lo = (lo + Math.imul(al7, bl5)) | 0;
  17584. mid = (mid + Math.imul(al7, bh5)) | 0;
  17585. mid = (mid + Math.imul(ah7, bl5)) | 0;
  17586. hi = (hi + Math.imul(ah7, bh5)) | 0;
  17587. lo = (lo + Math.imul(al6, bl6)) | 0;
  17588. mid = (mid + Math.imul(al6, bh6)) | 0;
  17589. mid = (mid + Math.imul(ah6, bl6)) | 0;
  17590. hi = (hi + Math.imul(ah6, bh6)) | 0;
  17591. lo = (lo + Math.imul(al5, bl7)) | 0;
  17592. mid = (mid + Math.imul(al5, bh7)) | 0;
  17593. mid = (mid + Math.imul(ah5, bl7)) | 0;
  17594. hi = (hi + Math.imul(ah5, bh7)) | 0;
  17595. lo = (lo + Math.imul(al4, bl8)) | 0;
  17596. mid = (mid + Math.imul(al4, bh8)) | 0;
  17597. mid = (mid + Math.imul(ah4, bl8)) | 0;
  17598. hi = (hi + Math.imul(ah4, bh8)) | 0;
  17599. lo = (lo + Math.imul(al3, bl9)) | 0;
  17600. mid = (mid + Math.imul(al3, bh9)) | 0;
  17601. mid = (mid + Math.imul(ah3, bl9)) | 0;
  17602. hi = (hi + Math.imul(ah3, bh9)) | 0;
  17603. var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17604. c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;
  17605. w12 &= 0x3ffffff;
  17606. /* k = 13 */
  17607. lo = Math.imul(al9, bl4);
  17608. mid = Math.imul(al9, bh4);
  17609. mid = (mid + Math.imul(ah9, bl4)) | 0;
  17610. hi = Math.imul(ah9, bh4);
  17611. lo = (lo + Math.imul(al8, bl5)) | 0;
  17612. mid = (mid + Math.imul(al8, bh5)) | 0;
  17613. mid = (mid + Math.imul(ah8, bl5)) | 0;
  17614. hi = (hi + Math.imul(ah8, bh5)) | 0;
  17615. lo = (lo + Math.imul(al7, bl6)) | 0;
  17616. mid = (mid + Math.imul(al7, bh6)) | 0;
  17617. mid = (mid + Math.imul(ah7, bl6)) | 0;
  17618. hi = (hi + Math.imul(ah7, bh6)) | 0;
  17619. lo = (lo + Math.imul(al6, bl7)) | 0;
  17620. mid = (mid + Math.imul(al6, bh7)) | 0;
  17621. mid = (mid + Math.imul(ah6, bl7)) | 0;
  17622. hi = (hi + Math.imul(ah6, bh7)) | 0;
  17623. lo = (lo + Math.imul(al5, bl8)) | 0;
  17624. mid = (mid + Math.imul(al5, bh8)) | 0;
  17625. mid = (mid + Math.imul(ah5, bl8)) | 0;
  17626. hi = (hi + Math.imul(ah5, bh8)) | 0;
  17627. lo = (lo + Math.imul(al4, bl9)) | 0;
  17628. mid = (mid + Math.imul(al4, bh9)) | 0;
  17629. mid = (mid + Math.imul(ah4, bl9)) | 0;
  17630. hi = (hi + Math.imul(ah4, bh9)) | 0;
  17631. var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17632. c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;
  17633. w13 &= 0x3ffffff;
  17634. /* k = 14 */
  17635. lo = Math.imul(al9, bl5);
  17636. mid = Math.imul(al9, bh5);
  17637. mid = (mid + Math.imul(ah9, bl5)) | 0;
  17638. hi = Math.imul(ah9, bh5);
  17639. lo = (lo + Math.imul(al8, bl6)) | 0;
  17640. mid = (mid + Math.imul(al8, bh6)) | 0;
  17641. mid = (mid + Math.imul(ah8, bl6)) | 0;
  17642. hi = (hi + Math.imul(ah8, bh6)) | 0;
  17643. lo = (lo + Math.imul(al7, bl7)) | 0;
  17644. mid = (mid + Math.imul(al7, bh7)) | 0;
  17645. mid = (mid + Math.imul(ah7, bl7)) | 0;
  17646. hi = (hi + Math.imul(ah7, bh7)) | 0;
  17647. lo = (lo + Math.imul(al6, bl8)) | 0;
  17648. mid = (mid + Math.imul(al6, bh8)) | 0;
  17649. mid = (mid + Math.imul(ah6, bl8)) | 0;
  17650. hi = (hi + Math.imul(ah6, bh8)) | 0;
  17651. lo = (lo + Math.imul(al5, bl9)) | 0;
  17652. mid = (mid + Math.imul(al5, bh9)) | 0;
  17653. mid = (mid + Math.imul(ah5, bl9)) | 0;
  17654. hi = (hi + Math.imul(ah5, bh9)) | 0;
  17655. var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17656. c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;
  17657. w14 &= 0x3ffffff;
  17658. /* k = 15 */
  17659. lo = Math.imul(al9, bl6);
  17660. mid = Math.imul(al9, bh6);
  17661. mid = (mid + Math.imul(ah9, bl6)) | 0;
  17662. hi = Math.imul(ah9, bh6);
  17663. lo = (lo + Math.imul(al8, bl7)) | 0;
  17664. mid = (mid + Math.imul(al8, bh7)) | 0;
  17665. mid = (mid + Math.imul(ah8, bl7)) | 0;
  17666. hi = (hi + Math.imul(ah8, bh7)) | 0;
  17667. lo = (lo + Math.imul(al7, bl8)) | 0;
  17668. mid = (mid + Math.imul(al7, bh8)) | 0;
  17669. mid = (mid + Math.imul(ah7, bl8)) | 0;
  17670. hi = (hi + Math.imul(ah7, bh8)) | 0;
  17671. lo = (lo + Math.imul(al6, bl9)) | 0;
  17672. mid = (mid + Math.imul(al6, bh9)) | 0;
  17673. mid = (mid + Math.imul(ah6, bl9)) | 0;
  17674. hi = (hi + Math.imul(ah6, bh9)) | 0;
  17675. var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17676. c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;
  17677. w15 &= 0x3ffffff;
  17678. /* k = 16 */
  17679. lo = Math.imul(al9, bl7);
  17680. mid = Math.imul(al9, bh7);
  17681. mid = (mid + Math.imul(ah9, bl7)) | 0;
  17682. hi = Math.imul(ah9, bh7);
  17683. lo = (lo + Math.imul(al8, bl8)) | 0;
  17684. mid = (mid + Math.imul(al8, bh8)) | 0;
  17685. mid = (mid + Math.imul(ah8, bl8)) | 0;
  17686. hi = (hi + Math.imul(ah8, bh8)) | 0;
  17687. lo = (lo + Math.imul(al7, bl9)) | 0;
  17688. mid = (mid + Math.imul(al7, bh9)) | 0;
  17689. mid = (mid + Math.imul(ah7, bl9)) | 0;
  17690. hi = (hi + Math.imul(ah7, bh9)) | 0;
  17691. var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17692. c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;
  17693. w16 &= 0x3ffffff;
  17694. /* k = 17 */
  17695. lo = Math.imul(al9, bl8);
  17696. mid = Math.imul(al9, bh8);
  17697. mid = (mid + Math.imul(ah9, bl8)) | 0;
  17698. hi = Math.imul(ah9, bh8);
  17699. lo = (lo + Math.imul(al8, bl9)) | 0;
  17700. mid = (mid + Math.imul(al8, bh9)) | 0;
  17701. mid = (mid + Math.imul(ah8, bl9)) | 0;
  17702. hi = (hi + Math.imul(ah8, bh9)) | 0;
  17703. var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17704. c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;
  17705. w17 &= 0x3ffffff;
  17706. /* k = 18 */
  17707. lo = Math.imul(al9, bl9);
  17708. mid = Math.imul(al9, bh9);
  17709. mid = (mid + Math.imul(ah9, bl9)) | 0;
  17710. hi = Math.imul(ah9, bh9);
  17711. var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  17712. c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;
  17713. w18 &= 0x3ffffff;
  17714. o[0] = w0;
  17715. o[1] = w1;
  17716. o[2] = w2;
  17717. o[3] = w3;
  17718. o[4] = w4;
  17719. o[5] = w5;
  17720. o[6] = w6;
  17721. o[7] = w7;
  17722. o[8] = w8;
  17723. o[9] = w9;
  17724. o[10] = w10;
  17725. o[11] = w11;
  17726. o[12] = w12;
  17727. o[13] = w13;
  17728. o[14] = w14;
  17729. o[15] = w15;
  17730. o[16] = w16;
  17731. o[17] = w17;
  17732. o[18] = w18;
  17733. if (c !== 0) {
  17734. o[19] = c;
  17735. out.length++;
  17736. }
  17737. return out;
  17738. };
  17739. // Polyfill comb
  17740. if (!Math.imul) {
  17741. comb10MulTo = smallMulTo;
  17742. }
  17743. function bigMulTo (self, num, out) {
  17744. out.negative = num.negative ^ self.negative;
  17745. out.length = self.length + num.length;
  17746. var carry = 0;
  17747. var hncarry = 0;
  17748. for (var k = 0; k < out.length - 1; k++) {
  17749. // Sum all words with the same `i + j = k` and accumulate `ncarry`,
  17750. // note that ncarry could be >= 0x3ffffff
  17751. var ncarry = hncarry;
  17752. hncarry = 0;
  17753. var rword = carry & 0x3ffffff;
  17754. var maxJ = Math.min(k, num.length - 1);
  17755. for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {
  17756. var i = k - j;
  17757. var a = self.words[i] | 0;
  17758. var b = num.words[j] | 0;
  17759. var r = a * b;
  17760. var lo = r & 0x3ffffff;
  17761. ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;
  17762. lo = (lo + rword) | 0;
  17763. rword = lo & 0x3ffffff;
  17764. ncarry = (ncarry + (lo >>> 26)) | 0;
  17765. hncarry += ncarry >>> 26;
  17766. ncarry &= 0x3ffffff;
  17767. }
  17768. out.words[k] = rword;
  17769. carry = ncarry;
  17770. ncarry = hncarry;
  17771. }
  17772. if (carry !== 0) {
  17773. out.words[k] = carry;
  17774. } else {
  17775. out.length--;
  17776. }
  17777. return out.strip();
  17778. }
  17779. function jumboMulTo (self, num, out) {
  17780. var fftm = new FFTM();
  17781. return fftm.mulp(self, num, out);
  17782. }
  17783. BN.prototype.mulTo = function mulTo (num, out) {
  17784. var res;
  17785. var len = this.length + num.length;
  17786. if (this.length === 10 && num.length === 10) {
  17787. res = comb10MulTo(this, num, out);
  17788. } else if (len < 63) {
  17789. res = smallMulTo(this, num, out);
  17790. } else if (len < 1024) {
  17791. res = bigMulTo(this, num, out);
  17792. } else {
  17793. res = jumboMulTo(this, num, out);
  17794. }
  17795. return res;
  17796. };
  17797. // Cooley-Tukey algorithm for FFT
  17798. // slightly revisited to rely on looping instead of recursion
  17799. function FFTM (x, y) {
  17800. this.x = x;
  17801. this.y = y;
  17802. }
  17803. FFTM.prototype.makeRBT = function makeRBT (N) {
  17804. var t = new Array(N);
  17805. var l = BN.prototype._countBits(N) - 1;
  17806. for (var i = 0; i < N; i++) {
  17807. t[i] = this.revBin(i, l, N);
  17808. }
  17809. return t;
  17810. };
  17811. // Returns binary-reversed representation of `x`
  17812. FFTM.prototype.revBin = function revBin (x, l, N) {
  17813. if (x === 0 || x === N - 1) return x;
  17814. var rb = 0;
  17815. for (var i = 0; i < l; i++) {
  17816. rb |= (x & 1) << (l - i - 1);
  17817. x >>= 1;
  17818. }
  17819. return rb;
  17820. };
  17821. // Performs "tweedling" phase, therefore 'emulating'
  17822. // behaviour of the recursive algorithm
  17823. FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {
  17824. for (var i = 0; i < N; i++) {
  17825. rtws[i] = rws[rbt[i]];
  17826. itws[i] = iws[rbt[i]];
  17827. }
  17828. };
  17829. FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {
  17830. this.permute(rbt, rws, iws, rtws, itws, N);
  17831. for (var s = 1; s < N; s <<= 1) {
  17832. var l = s << 1;
  17833. var rtwdf = Math.cos(2 * Math.PI / l);
  17834. var itwdf = Math.sin(2 * Math.PI / l);
  17835. for (var p = 0; p < N; p += l) {
  17836. var rtwdf_ = rtwdf;
  17837. var itwdf_ = itwdf;
  17838. for (var j = 0; j < s; j++) {
  17839. var re = rtws[p + j];
  17840. var ie = itws[p + j];
  17841. var ro = rtws[p + j + s];
  17842. var io = itws[p + j + s];
  17843. var rx = rtwdf_ * ro - itwdf_ * io;
  17844. io = rtwdf_ * io + itwdf_ * ro;
  17845. ro = rx;
  17846. rtws[p + j] = re + ro;
  17847. itws[p + j] = ie + io;
  17848. rtws[p + j + s] = re - ro;
  17849. itws[p + j + s] = ie - io;
  17850. /* jshint maxdepth : false */
  17851. if (j !== l) {
  17852. rx = rtwdf * rtwdf_ - itwdf * itwdf_;
  17853. itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;
  17854. rtwdf_ = rx;
  17855. }
  17856. }
  17857. }
  17858. }
  17859. };
  17860. FFTM.prototype.guessLen13b = function guessLen13b (n, m) {
  17861. var N = Math.max(m, n) | 1;
  17862. var odd = N & 1;
  17863. var i = 0;
  17864. for (N = N / 2 | 0; N; N = N >>> 1) {
  17865. i++;
  17866. }
  17867. return 1 << i + 1 + odd;
  17868. };
  17869. FFTM.prototype.conjugate = function conjugate (rws, iws, N) {
  17870. if (N <= 1) return;
  17871. for (var i = 0; i < N / 2; i++) {
  17872. var t = rws[i];
  17873. rws[i] = rws[N - i - 1];
  17874. rws[N - i - 1] = t;
  17875. t = iws[i];
  17876. iws[i] = -iws[N - i - 1];
  17877. iws[N - i - 1] = -t;
  17878. }
  17879. };
  17880. FFTM.prototype.normalize13b = function normalize13b (ws, N) {
  17881. var carry = 0;
  17882. for (var i = 0; i < N / 2; i++) {
  17883. var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +
  17884. Math.round(ws[2 * i] / N) +
  17885. carry;
  17886. ws[i] = w & 0x3ffffff;
  17887. if (w < 0x4000000) {
  17888. carry = 0;
  17889. } else {
  17890. carry = w / 0x4000000 | 0;
  17891. }
  17892. }
  17893. return ws;
  17894. };
  17895. FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {
  17896. var carry = 0;
  17897. for (var i = 0; i < len; i++) {
  17898. carry = carry + (ws[i] | 0);
  17899. rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;
  17900. rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;
  17901. }
  17902. // Pad with zeroes
  17903. for (i = 2 * len; i < N; ++i) {
  17904. rws[i] = 0;
  17905. }
  17906. assert(carry === 0);
  17907. assert((carry & ~0x1fff) === 0);
  17908. };
  17909. FFTM.prototype.stub = function stub (N) {
  17910. var ph = new Array(N);
  17911. for (var i = 0; i < N; i++) {
  17912. ph[i] = 0;
  17913. }
  17914. return ph;
  17915. };
  17916. FFTM.prototype.mulp = function mulp (x, y, out) {
  17917. var N = 2 * this.guessLen13b(x.length, y.length);
  17918. var rbt = this.makeRBT(N);
  17919. var _ = this.stub(N);
  17920. var rws = new Array(N);
  17921. var rwst = new Array(N);
  17922. var iwst = new Array(N);
  17923. var nrws = new Array(N);
  17924. var nrwst = new Array(N);
  17925. var niwst = new Array(N);
  17926. var rmws = out.words;
  17927. rmws.length = N;
  17928. this.convert13b(x.words, x.length, rws, N);
  17929. this.convert13b(y.words, y.length, nrws, N);
  17930. this.transform(rws, _, rwst, iwst, N, rbt);
  17931. this.transform(nrws, _, nrwst, niwst, N, rbt);
  17932. for (var i = 0; i < N; i++) {
  17933. var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];
  17934. iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];
  17935. rwst[i] = rx;
  17936. }
  17937. this.conjugate(rwst, iwst, N);
  17938. this.transform(rwst, iwst, rmws, _, N, rbt);
  17939. this.conjugate(rmws, _, N);
  17940. this.normalize13b(rmws, N);
  17941. out.negative = x.negative ^ y.negative;
  17942. out.length = x.length + y.length;
  17943. return out.strip();
  17944. };
  17945. // Multiply `this` by `num`
  17946. BN.prototype.mul = function mul (num) {
  17947. var out = new BN(null);
  17948. out.words = new Array(this.length + num.length);
  17949. return this.mulTo(num, out);
  17950. };
  17951. // Multiply employing FFT
  17952. BN.prototype.mulf = function mulf (num) {
  17953. var out = new BN(null);
  17954. out.words = new Array(this.length + num.length);
  17955. return jumboMulTo(this, num, out);
  17956. };
  17957. // In-place Multiplication
  17958. BN.prototype.imul = function imul (num) {
  17959. return this.clone().mulTo(num, this);
  17960. };
  17961. BN.prototype.imuln = function imuln (num) {
  17962. assert(typeof num === 'number');
  17963. assert(num < 0x4000000);
  17964. // Carry
  17965. var carry = 0;
  17966. for (var i = 0; i < this.length; i++) {
  17967. var w = (this.words[i] | 0) * num;
  17968. var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);
  17969. carry >>= 26;
  17970. carry += (w / 0x4000000) | 0;
  17971. // NOTE: lo is 27bit maximum
  17972. carry += lo >>> 26;
  17973. this.words[i] = lo & 0x3ffffff;
  17974. }
  17975. if (carry !== 0) {
  17976. this.words[i] = carry;
  17977. this.length++;
  17978. }
  17979. return this;
  17980. };
  17981. BN.prototype.muln = function muln (num) {
  17982. return this.clone().imuln(num);
  17983. };
  17984. // `this` * `this`
  17985. BN.prototype.sqr = function sqr () {
  17986. return this.mul(this);
  17987. };
  17988. // `this` * `this` in-place
  17989. BN.prototype.isqr = function isqr () {
  17990. return this.imul(this.clone());
  17991. };
  17992. // Math.pow(`this`, `num`)
  17993. BN.prototype.pow = function pow (num) {
  17994. var w = toBitArray(num);
  17995. if (w.length === 0) return new BN(1);
  17996. // Skip leading zeroes
  17997. var res = this;
  17998. for (var i = 0; i < w.length; i++, res = res.sqr()) {
  17999. if (w[i] !== 0) break;
  18000. }
  18001. if (++i < w.length) {
  18002. for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {
  18003. if (w[i] === 0) continue;
  18004. res = res.mul(q);
  18005. }
  18006. }
  18007. return res;
  18008. };
  18009. // Shift-left in-place
  18010. BN.prototype.iushln = function iushln (bits) {
  18011. assert(typeof bits === 'number' && bits >= 0);
  18012. var r = bits % 26;
  18013. var s = (bits - r) / 26;
  18014. var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);
  18015. var i;
  18016. if (r !== 0) {
  18017. var carry = 0;
  18018. for (i = 0; i < this.length; i++) {
  18019. var newCarry = this.words[i] & carryMask;
  18020. var c = ((this.words[i] | 0) - newCarry) << r;
  18021. this.words[i] = c | carry;
  18022. carry = newCarry >>> (26 - r);
  18023. }
  18024. if (carry) {
  18025. this.words[i] = carry;
  18026. this.length++;
  18027. }
  18028. }
  18029. if (s !== 0) {
  18030. for (i = this.length - 1; i >= 0; i--) {
  18031. this.words[i + s] = this.words[i];
  18032. }
  18033. for (i = 0; i < s; i++) {
  18034. this.words[i] = 0;
  18035. }
  18036. this.length += s;
  18037. }
  18038. return this.strip();
  18039. };
  18040. BN.prototype.ishln = function ishln (bits) {
  18041. // TODO(indutny): implement me
  18042. assert(this.negative === 0);
  18043. return this.iushln(bits);
  18044. };
  18045. // Shift-right in-place
  18046. // NOTE: `hint` is a lowest bit before trailing zeroes
  18047. // NOTE: if `extended` is present - it will be filled with destroyed bits
  18048. BN.prototype.iushrn = function iushrn (bits, hint, extended) {
  18049. assert(typeof bits === 'number' && bits >= 0);
  18050. var h;
  18051. if (hint) {
  18052. h = (hint - (hint % 26)) / 26;
  18053. } else {
  18054. h = 0;
  18055. }
  18056. var r = bits % 26;
  18057. var s = Math.min((bits - r) / 26, this.length);
  18058. var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
  18059. var maskedWords = extended;
  18060. h -= s;
  18061. h = Math.max(0, h);
  18062. // Extended mode, copy masked part
  18063. if (maskedWords) {
  18064. for (var i = 0; i < s; i++) {
  18065. maskedWords.words[i] = this.words[i];
  18066. }
  18067. maskedWords.length = s;
  18068. }
  18069. if (s === 0) {
  18070. // No-op, we should not move anything at all
  18071. } else if (this.length > s) {
  18072. this.length -= s;
  18073. for (i = 0; i < this.length; i++) {
  18074. this.words[i] = this.words[i + s];
  18075. }
  18076. } else {
  18077. this.words[0] = 0;
  18078. this.length = 1;
  18079. }
  18080. var carry = 0;
  18081. for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {
  18082. var word = this.words[i] | 0;
  18083. this.words[i] = (carry << (26 - r)) | (word >>> r);
  18084. carry = word & mask;
  18085. }
  18086. // Push carried bits as a mask
  18087. if (maskedWords && carry !== 0) {
  18088. maskedWords.words[maskedWords.length++] = carry;
  18089. }
  18090. if (this.length === 0) {
  18091. this.words[0] = 0;
  18092. this.length = 1;
  18093. }
  18094. return this.strip();
  18095. };
  18096. BN.prototype.ishrn = function ishrn (bits, hint, extended) {
  18097. // TODO(indutny): implement me
  18098. assert(this.negative === 0);
  18099. return this.iushrn(bits, hint, extended);
  18100. };
  18101. // Shift-left
  18102. BN.prototype.shln = function shln (bits) {
  18103. return this.clone().ishln(bits);
  18104. };
  18105. BN.prototype.ushln = function ushln (bits) {
  18106. return this.clone().iushln(bits);
  18107. };
  18108. // Shift-right
  18109. BN.prototype.shrn = function shrn (bits) {
  18110. return this.clone().ishrn(bits);
  18111. };
  18112. BN.prototype.ushrn = function ushrn (bits) {
  18113. return this.clone().iushrn(bits);
  18114. };
  18115. // Test if n bit is set
  18116. BN.prototype.testn = function testn (bit) {
  18117. assert(typeof bit === 'number' && bit >= 0);
  18118. var r = bit % 26;
  18119. var s = (bit - r) / 26;
  18120. var q = 1 << r;
  18121. // Fast case: bit is much higher than all existing words
  18122. if (this.length <= s) return false;
  18123. // Check bit and return
  18124. var w = this.words[s];
  18125. return !!(w & q);
  18126. };
  18127. // Return only lowers bits of number (in-place)
  18128. BN.prototype.imaskn = function imaskn (bits) {
  18129. assert(typeof bits === 'number' && bits >= 0);
  18130. var r = bits % 26;
  18131. var s = (bits - r) / 26;
  18132. assert(this.negative === 0, 'imaskn works only with positive numbers');
  18133. if (this.length <= s) {
  18134. return this;
  18135. }
  18136. if (r !== 0) {
  18137. s++;
  18138. }
  18139. this.length = Math.min(s, this.length);
  18140. if (r !== 0) {
  18141. var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
  18142. this.words[this.length - 1] &= mask;
  18143. }
  18144. return this.strip();
  18145. };
  18146. // Return only lowers bits of number
  18147. BN.prototype.maskn = function maskn (bits) {
  18148. return this.clone().imaskn(bits);
  18149. };
  18150. // Add plain number `num` to `this`
  18151. BN.prototype.iaddn = function iaddn (num) {
  18152. assert(typeof num === 'number');
  18153. assert(num < 0x4000000);
  18154. if (num < 0) return this.isubn(-num);
  18155. // Possible sign change
  18156. if (this.negative !== 0) {
  18157. if (this.length === 1 && (this.words[0] | 0) < num) {
  18158. this.words[0] = num - (this.words[0] | 0);
  18159. this.negative = 0;
  18160. return this;
  18161. }
  18162. this.negative = 0;
  18163. this.isubn(num);
  18164. this.negative = 1;
  18165. return this;
  18166. }
  18167. // Add without checks
  18168. return this._iaddn(num);
  18169. };
  18170. BN.prototype._iaddn = function _iaddn (num) {
  18171. this.words[0] += num;
  18172. // Carry
  18173. for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {
  18174. this.words[i] -= 0x4000000;
  18175. if (i === this.length - 1) {
  18176. this.words[i + 1] = 1;
  18177. } else {
  18178. this.words[i + 1]++;
  18179. }
  18180. }
  18181. this.length = Math.max(this.length, i + 1);
  18182. return this;
  18183. };
  18184. // Subtract plain number `num` from `this`
  18185. BN.prototype.isubn = function isubn (num) {
  18186. assert(typeof num === 'number');
  18187. assert(num < 0x4000000);
  18188. if (num < 0) return this.iaddn(-num);
  18189. if (this.negative !== 0) {
  18190. this.negative = 0;
  18191. this.iaddn(num);
  18192. this.negative = 1;
  18193. return this;
  18194. }
  18195. this.words[0] -= num;
  18196. if (this.length === 1 && this.words[0] < 0) {
  18197. this.words[0] = -this.words[0];
  18198. this.negative = 1;
  18199. } else {
  18200. // Carry
  18201. for (var i = 0; i < this.length && this.words[i] < 0; i++) {
  18202. this.words[i] += 0x4000000;
  18203. this.words[i + 1] -= 1;
  18204. }
  18205. }
  18206. return this.strip();
  18207. };
  18208. BN.prototype.addn = function addn (num) {
  18209. return this.clone().iaddn(num);
  18210. };
  18211. BN.prototype.subn = function subn (num) {
  18212. return this.clone().isubn(num);
  18213. };
  18214. BN.prototype.iabs = function iabs () {
  18215. this.negative = 0;
  18216. return this;
  18217. };
  18218. BN.prototype.abs = function abs () {
  18219. return this.clone().iabs();
  18220. };
  18221. BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {
  18222. var len = num.length + shift;
  18223. var i;
  18224. this._expand(len);
  18225. var w;
  18226. var carry = 0;
  18227. for (i = 0; i < num.length; i++) {
  18228. w = (this.words[i + shift] | 0) + carry;
  18229. var right = (num.words[i] | 0) * mul;
  18230. w -= right & 0x3ffffff;
  18231. carry = (w >> 26) - ((right / 0x4000000) | 0);
  18232. this.words[i + shift] = w & 0x3ffffff;
  18233. }
  18234. for (; i < this.length - shift; i++) {
  18235. w = (this.words[i + shift] | 0) + carry;
  18236. carry = w >> 26;
  18237. this.words[i + shift] = w & 0x3ffffff;
  18238. }
  18239. if (carry === 0) return this.strip();
  18240. // Subtraction overflow
  18241. assert(carry === -1);
  18242. carry = 0;
  18243. for (i = 0; i < this.length; i++) {
  18244. w = -(this.words[i] | 0) + carry;
  18245. carry = w >> 26;
  18246. this.words[i] = w & 0x3ffffff;
  18247. }
  18248. this.negative = 1;
  18249. return this.strip();
  18250. };
  18251. BN.prototype._wordDiv = function _wordDiv (num, mode) {
  18252. var shift = this.length - num.length;
  18253. var a = this.clone();
  18254. var b = num;
  18255. // Normalize
  18256. var bhi = b.words[b.length - 1] | 0;
  18257. var bhiBits = this._countBits(bhi);
  18258. shift = 26 - bhiBits;
  18259. if (shift !== 0) {
  18260. b = b.ushln(shift);
  18261. a.iushln(shift);
  18262. bhi = b.words[b.length - 1] | 0;
  18263. }
  18264. // Initialize quotient
  18265. var m = a.length - b.length;
  18266. var q;
  18267. if (mode !== 'mod') {
  18268. q = new BN(null);
  18269. q.length = m + 1;
  18270. q.words = new Array(q.length);
  18271. for (var i = 0; i < q.length; i++) {
  18272. q.words[i] = 0;
  18273. }
  18274. }
  18275. var diff = a.clone()._ishlnsubmul(b, 1, m);
  18276. if (diff.negative === 0) {
  18277. a = diff;
  18278. if (q) {
  18279. q.words[m] = 1;
  18280. }
  18281. }
  18282. for (var j = m - 1; j >= 0; j--) {
  18283. var qj = (a.words[b.length + j] | 0) * 0x4000000 +
  18284. (a.words[b.length + j - 1] | 0);
  18285. // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max
  18286. // (0x7ffffff)
  18287. qj = Math.min((qj / bhi) | 0, 0x3ffffff);
  18288. a._ishlnsubmul(b, qj, j);
  18289. while (a.negative !== 0) {
  18290. qj--;
  18291. a.negative = 0;
  18292. a._ishlnsubmul(b, 1, j);
  18293. if (!a.isZero()) {
  18294. a.negative ^= 1;
  18295. }
  18296. }
  18297. if (q) {
  18298. q.words[j] = qj;
  18299. }
  18300. }
  18301. if (q) {
  18302. q.strip();
  18303. }
  18304. a.strip();
  18305. // Denormalize
  18306. if (mode !== 'div' && shift !== 0) {
  18307. a.iushrn(shift);
  18308. }
  18309. return {
  18310. div: q || null,
  18311. mod: a
  18312. };
  18313. };
  18314. // NOTE: 1) `mode` can be set to `mod` to request mod only,
  18315. // to `div` to request div only, or be absent to
  18316. // request both div & mod
  18317. // 2) `positive` is true if unsigned mod is requested
  18318. BN.prototype.divmod = function divmod (num, mode, positive) {
  18319. assert(!num.isZero());
  18320. if (this.isZero()) {
  18321. return {
  18322. div: new BN(0),
  18323. mod: new BN(0)
  18324. };
  18325. }
  18326. var div, mod, res;
  18327. if (this.negative !== 0 && num.negative === 0) {
  18328. res = this.neg().divmod(num, mode);
  18329. if (mode !== 'mod') {
  18330. div = res.div.neg();
  18331. }
  18332. if (mode !== 'div') {
  18333. mod = res.mod.neg();
  18334. if (positive && mod.negative !== 0) {
  18335. mod.iadd(num);
  18336. }
  18337. }
  18338. return {
  18339. div: div,
  18340. mod: mod
  18341. };
  18342. }
  18343. if (this.negative === 0 && num.negative !== 0) {
  18344. res = this.divmod(num.neg(), mode);
  18345. if (mode !== 'mod') {
  18346. div = res.div.neg();
  18347. }
  18348. return {
  18349. div: div,
  18350. mod: res.mod
  18351. };
  18352. }
  18353. if ((this.negative & num.negative) !== 0) {
  18354. res = this.neg().divmod(num.neg(), mode);
  18355. if (mode !== 'div') {
  18356. mod = res.mod.neg();
  18357. if (positive && mod.negative !== 0) {
  18358. mod.isub(num);
  18359. }
  18360. }
  18361. return {
  18362. div: res.div,
  18363. mod: mod
  18364. };
  18365. }
  18366. // Both numbers are positive at this point
  18367. // Strip both numbers to approximate shift value
  18368. if (num.length > this.length || this.cmp(num) < 0) {
  18369. return {
  18370. div: new BN(0),
  18371. mod: this
  18372. };
  18373. }
  18374. // Very short reduction
  18375. if (num.length === 1) {
  18376. if (mode === 'div') {
  18377. return {
  18378. div: this.divn(num.words[0]),
  18379. mod: null
  18380. };
  18381. }
  18382. if (mode === 'mod') {
  18383. return {
  18384. div: null,
  18385. mod: new BN(this.modn(num.words[0]))
  18386. };
  18387. }
  18388. return {
  18389. div: this.divn(num.words[0]),
  18390. mod: new BN(this.modn(num.words[0]))
  18391. };
  18392. }
  18393. return this._wordDiv(num, mode);
  18394. };
  18395. // Find `this` / `num`
  18396. BN.prototype.div = function div (num) {
  18397. return this.divmod(num, 'div', false).div;
  18398. };
  18399. // Find `this` % `num`
  18400. BN.prototype.mod = function mod (num) {
  18401. return this.divmod(num, 'mod', false).mod;
  18402. };
  18403. BN.prototype.umod = function umod (num) {
  18404. return this.divmod(num, 'mod', true).mod;
  18405. };
  18406. // Find Round(`this` / `num`)
  18407. BN.prototype.divRound = function divRound (num) {
  18408. var dm = this.divmod(num);
  18409. // Fast case - exact division
  18410. if (dm.mod.isZero()) return dm.div;
  18411. var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;
  18412. var half = num.ushrn(1);
  18413. var r2 = num.andln(1);
  18414. var cmp = mod.cmp(half);
  18415. // Round down
  18416. if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;
  18417. // Round up
  18418. return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);
  18419. };
  18420. BN.prototype.modn = function modn (num) {
  18421. assert(num <= 0x3ffffff);
  18422. var p = (1 << 26) % num;
  18423. var acc = 0;
  18424. for (var i = this.length - 1; i >= 0; i--) {
  18425. acc = (p * acc + (this.words[i] | 0)) % num;
  18426. }
  18427. return acc;
  18428. };
  18429. // In-place division by number
  18430. BN.prototype.idivn = function idivn (num) {
  18431. assert(num <= 0x3ffffff);
  18432. var carry = 0;
  18433. for (var i = this.length - 1; i >= 0; i--) {
  18434. var w = (this.words[i] | 0) + carry * 0x4000000;
  18435. this.words[i] = (w / num) | 0;
  18436. carry = w % num;
  18437. }
  18438. return this.strip();
  18439. };
  18440. BN.prototype.divn = function divn (num) {
  18441. return this.clone().idivn(num);
  18442. };
  18443. BN.prototype.egcd = function egcd (p) {
  18444. assert(p.negative === 0);
  18445. assert(!p.isZero());
  18446. var x = this;
  18447. var y = p.clone();
  18448. if (x.negative !== 0) {
  18449. x = x.umod(p);
  18450. } else {
  18451. x = x.clone();
  18452. }
  18453. // A * x + B * y = x
  18454. var A = new BN(1);
  18455. var B = new BN(0);
  18456. // C * x + D * y = y
  18457. var C = new BN(0);
  18458. var D = new BN(1);
  18459. var g = 0;
  18460. while (x.isEven() && y.isEven()) {
  18461. x.iushrn(1);
  18462. y.iushrn(1);
  18463. ++g;
  18464. }
  18465. var yp = y.clone();
  18466. var xp = x.clone();
  18467. while (!x.isZero()) {
  18468. for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
  18469. if (i > 0) {
  18470. x.iushrn(i);
  18471. while (i-- > 0) {
  18472. if (A.isOdd() || B.isOdd()) {
  18473. A.iadd(yp);
  18474. B.isub(xp);
  18475. }
  18476. A.iushrn(1);
  18477. B.iushrn(1);
  18478. }
  18479. }
  18480. for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);
  18481. if (j > 0) {
  18482. y.iushrn(j);
  18483. while (j-- > 0) {
  18484. if (C.isOdd() || D.isOdd()) {
  18485. C.iadd(yp);
  18486. D.isub(xp);
  18487. }
  18488. C.iushrn(1);
  18489. D.iushrn(1);
  18490. }
  18491. }
  18492. if (x.cmp(y) >= 0) {
  18493. x.isub(y);
  18494. A.isub(C);
  18495. B.isub(D);
  18496. } else {
  18497. y.isub(x);
  18498. C.isub(A);
  18499. D.isub(B);
  18500. }
  18501. }
  18502. return {
  18503. a: C,
  18504. b: D,
  18505. gcd: y.iushln(g)
  18506. };
  18507. };
  18508. // This is reduced incarnation of the binary EEA
  18509. // above, designated to invert members of the
  18510. // _prime_ fields F(p) at a maximal speed
  18511. BN.prototype._invmp = function _invmp (p) {
  18512. assert(p.negative === 0);
  18513. assert(!p.isZero());
  18514. var a = this;
  18515. var b = p.clone();
  18516. if (a.negative !== 0) {
  18517. a = a.umod(p);
  18518. } else {
  18519. a = a.clone();
  18520. }
  18521. var x1 = new BN(1);
  18522. var x2 = new BN(0);
  18523. var delta = b.clone();
  18524. while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {
  18525. for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
  18526. if (i > 0) {
  18527. a.iushrn(i);
  18528. while (i-- > 0) {
  18529. if (x1.isOdd()) {
  18530. x1.iadd(delta);
  18531. }
  18532. x1.iushrn(1);
  18533. }
  18534. }
  18535. for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);
  18536. if (j > 0) {
  18537. b.iushrn(j);
  18538. while (j-- > 0) {
  18539. if (x2.isOdd()) {
  18540. x2.iadd(delta);
  18541. }
  18542. x2.iushrn(1);
  18543. }
  18544. }
  18545. if (a.cmp(b) >= 0) {
  18546. a.isub(b);
  18547. x1.isub(x2);
  18548. } else {
  18549. b.isub(a);
  18550. x2.isub(x1);
  18551. }
  18552. }
  18553. var res;
  18554. if (a.cmpn(1) === 0) {
  18555. res = x1;
  18556. } else {
  18557. res = x2;
  18558. }
  18559. if (res.cmpn(0) < 0) {
  18560. res.iadd(p);
  18561. }
  18562. return res;
  18563. };
  18564. BN.prototype.gcd = function gcd (num) {
  18565. if (this.isZero()) return num.abs();
  18566. if (num.isZero()) return this.abs();
  18567. var a = this.clone();
  18568. var b = num.clone();
  18569. a.negative = 0;
  18570. b.negative = 0;
  18571. // Remove common factor of two
  18572. for (var shift = 0; a.isEven() && b.isEven(); shift++) {
  18573. a.iushrn(1);
  18574. b.iushrn(1);
  18575. }
  18576. do {
  18577. while (a.isEven()) {
  18578. a.iushrn(1);
  18579. }
  18580. while (b.isEven()) {
  18581. b.iushrn(1);
  18582. }
  18583. var r = a.cmp(b);
  18584. if (r < 0) {
  18585. // Swap `a` and `b` to make `a` always bigger than `b`
  18586. var t = a;
  18587. a = b;
  18588. b = t;
  18589. } else if (r === 0 || b.cmpn(1) === 0) {
  18590. break;
  18591. }
  18592. a.isub(b);
  18593. } while (true);
  18594. return b.iushln(shift);
  18595. };
  18596. // Invert number in the field F(num)
  18597. BN.prototype.invm = function invm (num) {
  18598. return this.egcd(num).a.umod(num);
  18599. };
  18600. BN.prototype.isEven = function isEven () {
  18601. return (this.words[0] & 1) === 0;
  18602. };
  18603. BN.prototype.isOdd = function isOdd () {
  18604. return (this.words[0] & 1) === 1;
  18605. };
  18606. // And first word and num
  18607. BN.prototype.andln = function andln (num) {
  18608. return this.words[0] & num;
  18609. };
  18610. // Increment at the bit position in-line
  18611. BN.prototype.bincn = function bincn (bit) {
  18612. assert(typeof bit === 'number');
  18613. var r = bit % 26;
  18614. var s = (bit - r) / 26;
  18615. var q = 1 << r;
  18616. // Fast case: bit is much higher than all existing words
  18617. if (this.length <= s) {
  18618. this._expand(s + 1);
  18619. this.words[s] |= q;
  18620. return this;
  18621. }
  18622. // Add bit and propagate, if needed
  18623. var carry = q;
  18624. for (var i = s; carry !== 0 && i < this.length; i++) {
  18625. var w = this.words[i] | 0;
  18626. w += carry;
  18627. carry = w >>> 26;
  18628. w &= 0x3ffffff;
  18629. this.words[i] = w;
  18630. }
  18631. if (carry !== 0) {
  18632. this.words[i] = carry;
  18633. this.length++;
  18634. }
  18635. return this;
  18636. };
  18637. BN.prototype.isZero = function isZero () {
  18638. return this.length === 1 && this.words[0] === 0;
  18639. };
  18640. BN.prototype.cmpn = function cmpn (num) {
  18641. var negative = num < 0;
  18642. if (this.negative !== 0 && !negative) return -1;
  18643. if (this.negative === 0 && negative) return 1;
  18644. this.strip();
  18645. var res;
  18646. if (this.length > 1) {
  18647. res = 1;
  18648. } else {
  18649. if (negative) {
  18650. num = -num;
  18651. }
  18652. assert(num <= 0x3ffffff, 'Number is too big');
  18653. var w = this.words[0] | 0;
  18654. res = w === num ? 0 : w < num ? -1 : 1;
  18655. }
  18656. if (this.negative !== 0) return -res | 0;
  18657. return res;
  18658. };
  18659. // Compare two numbers and return:
  18660. // 1 - if `this` > `num`
  18661. // 0 - if `this` == `num`
  18662. // -1 - if `this` < `num`
  18663. BN.prototype.cmp = function cmp (num) {
  18664. if (this.negative !== 0 && num.negative === 0) return -1;
  18665. if (this.negative === 0 && num.negative !== 0) return 1;
  18666. var res = this.ucmp(num);
  18667. if (this.negative !== 0) return -res | 0;
  18668. return res;
  18669. };
  18670. // Unsigned comparison
  18671. BN.prototype.ucmp = function ucmp (num) {
  18672. // At this point both numbers have the same sign
  18673. if (this.length > num.length) return 1;
  18674. if (this.length < num.length) return -1;
  18675. var res = 0;
  18676. for (var i = this.length - 1; i >= 0; i--) {
  18677. var a = this.words[i] | 0;
  18678. var b = num.words[i] | 0;
  18679. if (a === b) continue;
  18680. if (a < b) {
  18681. res = -1;
  18682. } else if (a > b) {
  18683. res = 1;
  18684. }
  18685. break;
  18686. }
  18687. return res;
  18688. };
  18689. BN.prototype.gtn = function gtn (num) {
  18690. return this.cmpn(num) === 1;
  18691. };
  18692. BN.prototype.gt = function gt (num) {
  18693. return this.cmp(num) === 1;
  18694. };
  18695. BN.prototype.gten = function gten (num) {
  18696. return this.cmpn(num) >= 0;
  18697. };
  18698. BN.prototype.gte = function gte (num) {
  18699. return this.cmp(num) >= 0;
  18700. };
  18701. BN.prototype.ltn = function ltn (num) {
  18702. return this.cmpn(num) === -1;
  18703. };
  18704. BN.prototype.lt = function lt (num) {
  18705. return this.cmp(num) === -1;
  18706. };
  18707. BN.prototype.lten = function lten (num) {
  18708. return this.cmpn(num) <= 0;
  18709. };
  18710. BN.prototype.lte = function lte (num) {
  18711. return this.cmp(num) <= 0;
  18712. };
  18713. BN.prototype.eqn = function eqn (num) {
  18714. return this.cmpn(num) === 0;
  18715. };
  18716. BN.prototype.eq = function eq (num) {
  18717. return this.cmp(num) === 0;
  18718. };
  18719. //
  18720. // A reduce context, could be using montgomery or something better, depending
  18721. // on the `m` itself.
  18722. //
  18723. BN.red = function red (num) {
  18724. return new Red(num);
  18725. };
  18726. BN.prototype.toRed = function toRed (ctx) {
  18727. assert(!this.red, 'Already a number in reduction context');
  18728. assert(this.negative === 0, 'red works only with positives');
  18729. return ctx.convertTo(this)._forceRed(ctx);
  18730. };
  18731. BN.prototype.fromRed = function fromRed () {
  18732. assert(this.red, 'fromRed works only with numbers in reduction context');
  18733. return this.red.convertFrom(this);
  18734. };
  18735. BN.prototype._forceRed = function _forceRed (ctx) {
  18736. this.red = ctx;
  18737. return this;
  18738. };
  18739. BN.prototype.forceRed = function forceRed (ctx) {
  18740. assert(!this.red, 'Already a number in reduction context');
  18741. return this._forceRed(ctx);
  18742. };
  18743. BN.prototype.redAdd = function redAdd (num) {
  18744. assert(this.red, 'redAdd works only with red numbers');
  18745. return this.red.add(this, num);
  18746. };
  18747. BN.prototype.redIAdd = function redIAdd (num) {
  18748. assert(this.red, 'redIAdd works only with red numbers');
  18749. return this.red.iadd(this, num);
  18750. };
  18751. BN.prototype.redSub = function redSub (num) {
  18752. assert(this.red, 'redSub works only with red numbers');
  18753. return this.red.sub(this, num);
  18754. };
  18755. BN.prototype.redISub = function redISub (num) {
  18756. assert(this.red, 'redISub works only with red numbers');
  18757. return this.red.isub(this, num);
  18758. };
  18759. BN.prototype.redShl = function redShl (num) {
  18760. assert(this.red, 'redShl works only with red numbers');
  18761. return this.red.shl(this, num);
  18762. };
  18763. BN.prototype.redMul = function redMul (num) {
  18764. assert(this.red, 'redMul works only with red numbers');
  18765. this.red._verify2(this, num);
  18766. return this.red.mul(this, num);
  18767. };
  18768. BN.prototype.redIMul = function redIMul (num) {
  18769. assert(this.red, 'redMul works only with red numbers');
  18770. this.red._verify2(this, num);
  18771. return this.red.imul(this, num);
  18772. };
  18773. BN.prototype.redSqr = function redSqr () {
  18774. assert(this.red, 'redSqr works only with red numbers');
  18775. this.red._verify1(this);
  18776. return this.red.sqr(this);
  18777. };
  18778. BN.prototype.redISqr = function redISqr () {
  18779. assert(this.red, 'redISqr works only with red numbers');
  18780. this.red._verify1(this);
  18781. return this.red.isqr(this);
  18782. };
  18783. // Square root over p
  18784. BN.prototype.redSqrt = function redSqrt () {
  18785. assert(this.red, 'redSqrt works only with red numbers');
  18786. this.red._verify1(this);
  18787. return this.red.sqrt(this);
  18788. };
  18789. BN.prototype.redInvm = function redInvm () {
  18790. assert(this.red, 'redInvm works only with red numbers');
  18791. this.red._verify1(this);
  18792. return this.red.invm(this);
  18793. };
  18794. // Return negative clone of `this` % `red modulo`
  18795. BN.prototype.redNeg = function redNeg () {
  18796. assert(this.red, 'redNeg works only with red numbers');
  18797. this.red._verify1(this);
  18798. return this.red.neg(this);
  18799. };
  18800. BN.prototype.redPow = function redPow (num) {
  18801. assert(this.red && !num.red, 'redPow(normalNum)');
  18802. this.red._verify1(this);
  18803. return this.red.pow(this, num);
  18804. };
  18805. // Prime numbers with efficient reduction
  18806. var primes = {
  18807. k256: null,
  18808. p224: null,
  18809. p192: null,
  18810. p25519: null
  18811. };
  18812. // Pseudo-Mersenne prime
  18813. function MPrime (name, p) {
  18814. // P = 2 ^ N - K
  18815. this.name = name;
  18816. this.p = new BN(p, 16);
  18817. this.n = this.p.bitLength();
  18818. this.k = new BN(1).iushln(this.n).isub(this.p);
  18819. this.tmp = this._tmp();
  18820. }
  18821. MPrime.prototype._tmp = function _tmp () {
  18822. var tmp = new BN(null);
  18823. tmp.words = new Array(Math.ceil(this.n / 13));
  18824. return tmp;
  18825. };
  18826. MPrime.prototype.ireduce = function ireduce (num) {
  18827. // Assumes that `num` is less than `P^2`
  18828. // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)
  18829. var r = num;
  18830. var rlen;
  18831. do {
  18832. this.split(r, this.tmp);
  18833. r = this.imulK(r);
  18834. r = r.iadd(this.tmp);
  18835. rlen = r.bitLength();
  18836. } while (rlen > this.n);
  18837. var cmp = rlen < this.n ? -1 : r.ucmp(this.p);
  18838. if (cmp === 0) {
  18839. r.words[0] = 0;
  18840. r.length = 1;
  18841. } else if (cmp > 0) {
  18842. r.isub(this.p);
  18843. } else {
  18844. if (r.strip !== undefined) {
  18845. // r is BN v4 instance
  18846. r.strip();
  18847. } else {
  18848. // r is BN v5 instance
  18849. r._strip();
  18850. }
  18851. }
  18852. return r;
  18853. };
  18854. MPrime.prototype.split = function split (input, out) {
  18855. input.iushrn(this.n, 0, out);
  18856. };
  18857. MPrime.prototype.imulK = function imulK (num) {
  18858. return num.imul(this.k);
  18859. };
  18860. function K256 () {
  18861. MPrime.call(
  18862. this,
  18863. 'k256',
  18864. 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');
  18865. }
  18866. inherits(K256, MPrime);
  18867. K256.prototype.split = function split (input, output) {
  18868. // 256 = 9 * 26 + 22
  18869. var mask = 0x3fffff;
  18870. var outLen = Math.min(input.length, 9);
  18871. for (var i = 0; i < outLen; i++) {
  18872. output.words[i] = input.words[i];
  18873. }
  18874. output.length = outLen;
  18875. if (input.length <= 9) {
  18876. input.words[0] = 0;
  18877. input.length = 1;
  18878. return;
  18879. }
  18880. // Shift by 9 limbs
  18881. var prev = input.words[9];
  18882. output.words[output.length++] = prev & mask;
  18883. for (i = 10; i < input.length; i++) {
  18884. var next = input.words[i] | 0;
  18885. input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);
  18886. prev = next;
  18887. }
  18888. prev >>>= 22;
  18889. input.words[i - 10] = prev;
  18890. if (prev === 0 && input.length > 10) {
  18891. input.length -= 10;
  18892. } else {
  18893. input.length -= 9;
  18894. }
  18895. };
  18896. K256.prototype.imulK = function imulK (num) {
  18897. // K = 0x1000003d1 = [ 0x40, 0x3d1 ]
  18898. num.words[num.length] = 0;
  18899. num.words[num.length + 1] = 0;
  18900. num.length += 2;
  18901. // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390
  18902. var lo = 0;
  18903. for (var i = 0; i < num.length; i++) {
  18904. var w = num.words[i] | 0;
  18905. lo += w * 0x3d1;
  18906. num.words[i] = lo & 0x3ffffff;
  18907. lo = w * 0x40 + ((lo / 0x4000000) | 0);
  18908. }
  18909. // Fast length reduction
  18910. if (num.words[num.length - 1] === 0) {
  18911. num.length--;
  18912. if (num.words[num.length - 1] === 0) {
  18913. num.length--;
  18914. }
  18915. }
  18916. return num;
  18917. };
  18918. function P224 () {
  18919. MPrime.call(
  18920. this,
  18921. 'p224',
  18922. 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');
  18923. }
  18924. inherits(P224, MPrime);
  18925. function P192 () {
  18926. MPrime.call(
  18927. this,
  18928. 'p192',
  18929. 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');
  18930. }
  18931. inherits(P192, MPrime);
  18932. function P25519 () {
  18933. // 2 ^ 255 - 19
  18934. MPrime.call(
  18935. this,
  18936. '25519',
  18937. '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');
  18938. }
  18939. inherits(P25519, MPrime);
  18940. P25519.prototype.imulK = function imulK (num) {
  18941. // K = 0x13
  18942. var carry = 0;
  18943. for (var i = 0; i < num.length; i++) {
  18944. var hi = (num.words[i] | 0) * 0x13 + carry;
  18945. var lo = hi & 0x3ffffff;
  18946. hi >>>= 26;
  18947. num.words[i] = lo;
  18948. carry = hi;
  18949. }
  18950. if (carry !== 0) {
  18951. num.words[num.length++] = carry;
  18952. }
  18953. return num;
  18954. };
  18955. // Exported mostly for testing purposes, use plain name instead
  18956. BN._prime = function prime (name) {
  18957. // Cached version of prime
  18958. if (primes[name]) return primes[name];
  18959. var prime;
  18960. if (name === 'k256') {
  18961. prime = new K256();
  18962. } else if (name === 'p224') {
  18963. prime = new P224();
  18964. } else if (name === 'p192') {
  18965. prime = new P192();
  18966. } else if (name === 'p25519') {
  18967. prime = new P25519();
  18968. } else {
  18969. throw new Error('Unknown prime ' + name);
  18970. }
  18971. primes[name] = prime;
  18972. return prime;
  18973. };
  18974. //
  18975. // Base reduction engine
  18976. //
  18977. function Red (m) {
  18978. if (typeof m === 'string') {
  18979. var prime = BN._prime(m);
  18980. this.m = prime.p;
  18981. this.prime = prime;
  18982. } else {
  18983. assert(m.gtn(1), 'modulus must be greater than 1');
  18984. this.m = m;
  18985. this.prime = null;
  18986. }
  18987. }
  18988. Red.prototype._verify1 = function _verify1 (a) {
  18989. assert(a.negative === 0, 'red works only with positives');
  18990. assert(a.red, 'red works only with red numbers');
  18991. };
  18992. Red.prototype._verify2 = function _verify2 (a, b) {
  18993. assert((a.negative | b.negative) === 0, 'red works only with positives');
  18994. assert(a.red && a.red === b.red,
  18995. 'red works only with red numbers');
  18996. };
  18997. Red.prototype.imod = function imod (a) {
  18998. if (this.prime) return this.prime.ireduce(a)._forceRed(this);
  18999. return a.umod(this.m)._forceRed(this);
  19000. };
  19001. Red.prototype.neg = function neg (a) {
  19002. if (a.isZero()) {
  19003. return a.clone();
  19004. }
  19005. return this.m.sub(a)._forceRed(this);
  19006. };
  19007. Red.prototype.add = function add (a, b) {
  19008. this._verify2(a, b);
  19009. var res = a.add(b);
  19010. if (res.cmp(this.m) >= 0) {
  19011. res.isub(this.m);
  19012. }
  19013. return res._forceRed(this);
  19014. };
  19015. Red.prototype.iadd = function iadd (a, b) {
  19016. this._verify2(a, b);
  19017. var res = a.iadd(b);
  19018. if (res.cmp(this.m) >= 0) {
  19019. res.isub(this.m);
  19020. }
  19021. return res;
  19022. };
  19023. Red.prototype.sub = function sub (a, b) {
  19024. this._verify2(a, b);
  19025. var res = a.sub(b);
  19026. if (res.cmpn(0) < 0) {
  19027. res.iadd(this.m);
  19028. }
  19029. return res._forceRed(this);
  19030. };
  19031. Red.prototype.isub = function isub (a, b) {
  19032. this._verify2(a, b);
  19033. var res = a.isub(b);
  19034. if (res.cmpn(0) < 0) {
  19035. res.iadd(this.m);
  19036. }
  19037. return res;
  19038. };
  19039. Red.prototype.shl = function shl (a, num) {
  19040. this._verify1(a);
  19041. return this.imod(a.ushln(num));
  19042. };
  19043. Red.prototype.imul = function imul (a, b) {
  19044. this._verify2(a, b);
  19045. return this.imod(a.imul(b));
  19046. };
  19047. Red.prototype.mul = function mul (a, b) {
  19048. this._verify2(a, b);
  19049. return this.imod(a.mul(b));
  19050. };
  19051. Red.prototype.isqr = function isqr (a) {
  19052. return this.imul(a, a.clone());
  19053. };
  19054. Red.prototype.sqr = function sqr (a) {
  19055. return this.mul(a, a);
  19056. };
  19057. Red.prototype.sqrt = function sqrt (a) {
  19058. if (a.isZero()) return a.clone();
  19059. var mod3 = this.m.andln(3);
  19060. assert(mod3 % 2 === 1);
  19061. // Fast case
  19062. if (mod3 === 3) {
  19063. var pow = this.m.add(new BN(1)).iushrn(2);
  19064. return this.pow(a, pow);
  19065. }
  19066. // Tonelli-Shanks algorithm (Totally unoptimized and slow)
  19067. //
  19068. // Find Q and S, that Q * 2 ^ S = (P - 1)
  19069. var q = this.m.subn(1);
  19070. var s = 0;
  19071. while (!q.isZero() && q.andln(1) === 0) {
  19072. s++;
  19073. q.iushrn(1);
  19074. }
  19075. assert(!q.isZero());
  19076. var one = new BN(1).toRed(this);
  19077. var nOne = one.redNeg();
  19078. // Find quadratic non-residue
  19079. // NOTE: Max is such because of generalized Riemann hypothesis.
  19080. var lpow = this.m.subn(1).iushrn(1);
  19081. var z = this.m.bitLength();
  19082. z = new BN(2 * z * z).toRed(this);
  19083. while (this.pow(z, lpow).cmp(nOne) !== 0) {
  19084. z.redIAdd(nOne);
  19085. }
  19086. var c = this.pow(z, q);
  19087. var r = this.pow(a, q.addn(1).iushrn(1));
  19088. var t = this.pow(a, q);
  19089. var m = s;
  19090. while (t.cmp(one) !== 0) {
  19091. var tmp = t;
  19092. for (var i = 0; tmp.cmp(one) !== 0; i++) {
  19093. tmp = tmp.redSqr();
  19094. }
  19095. assert(i < m);
  19096. var b = this.pow(c, new BN(1).iushln(m - i - 1));
  19097. r = r.redMul(b);
  19098. c = b.redSqr();
  19099. t = t.redMul(c);
  19100. m = i;
  19101. }
  19102. return r;
  19103. };
  19104. Red.prototype.invm = function invm (a) {
  19105. var inv = a._invmp(this.m);
  19106. if (inv.negative !== 0) {
  19107. inv.negative = 0;
  19108. return this.imod(inv).redNeg();
  19109. } else {
  19110. return this.imod(inv);
  19111. }
  19112. };
  19113. Red.prototype.pow = function pow (a, num) {
  19114. if (num.isZero()) return new BN(1).toRed(this);
  19115. if (num.cmpn(1) === 0) return a.clone();
  19116. var windowSize = 4;
  19117. var wnd = new Array(1 << windowSize);
  19118. wnd[0] = new BN(1).toRed(this);
  19119. wnd[1] = a;
  19120. for (var i = 2; i < wnd.length; i++) {
  19121. wnd[i] = this.mul(wnd[i - 1], a);
  19122. }
  19123. var res = wnd[0];
  19124. var current = 0;
  19125. var currentLen = 0;
  19126. var start = num.bitLength() % 26;
  19127. if (start === 0) {
  19128. start = 26;
  19129. }
  19130. for (i = num.length - 1; i >= 0; i--) {
  19131. var word = num.words[i];
  19132. for (var j = start - 1; j >= 0; j--) {
  19133. var bit = (word >> j) & 1;
  19134. if (res !== wnd[0]) {
  19135. res = this.sqr(res);
  19136. }
  19137. if (bit === 0 && current === 0) {
  19138. currentLen = 0;
  19139. continue;
  19140. }
  19141. current <<= 1;
  19142. current |= bit;
  19143. currentLen++;
  19144. if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;
  19145. res = this.mul(res, wnd[current]);
  19146. currentLen = 0;
  19147. current = 0;
  19148. }
  19149. start = 26;
  19150. }
  19151. return res;
  19152. };
  19153. Red.prototype.convertTo = function convertTo (num) {
  19154. var r = num.umod(this.m);
  19155. return r === num ? r.clone() : r;
  19156. };
  19157. Red.prototype.convertFrom = function convertFrom (num) {
  19158. var res = num.clone();
  19159. res.red = null;
  19160. return res;
  19161. };
  19162. //
  19163. // Montgomery method engine
  19164. //
  19165. BN.mont = function mont (num) {
  19166. return new Mont(num);
  19167. };
  19168. function Mont (m) {
  19169. Red.call(this, m);
  19170. this.shift = this.m.bitLength();
  19171. if (this.shift % 26 !== 0) {
  19172. this.shift += 26 - (this.shift % 26);
  19173. }
  19174. this.r = new BN(1).iushln(this.shift);
  19175. this.r2 = this.imod(this.r.sqr());
  19176. this.rinv = this.r._invmp(this.m);
  19177. this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);
  19178. this.minv = this.minv.umod(this.r);
  19179. this.minv = this.r.sub(this.minv);
  19180. }
  19181. inherits(Mont, Red);
  19182. Mont.prototype.convertTo = function convertTo (num) {
  19183. return this.imod(num.ushln(this.shift));
  19184. };
  19185. Mont.prototype.convertFrom = function convertFrom (num) {
  19186. var r = this.imod(num.mul(this.rinv));
  19187. r.red = null;
  19188. return r;
  19189. };
  19190. Mont.prototype.imul = function imul (a, b) {
  19191. if (a.isZero() || b.isZero()) {
  19192. a.words[0] = 0;
  19193. a.length = 1;
  19194. return a;
  19195. }
  19196. var t = a.imul(b);
  19197. var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
  19198. var u = t.isub(c).iushrn(this.shift);
  19199. var res = u;
  19200. if (u.cmp(this.m) >= 0) {
  19201. res = u.isub(this.m);
  19202. } else if (u.cmpn(0) < 0) {
  19203. res = u.iadd(this.m);
  19204. }
  19205. return res._forceRed(this);
  19206. };
  19207. Mont.prototype.mul = function mul (a, b) {
  19208. if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);
  19209. var t = a.mul(b);
  19210. var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
  19211. var u = t.isub(c).iushrn(this.shift);
  19212. var res = u;
  19213. if (u.cmp(this.m) >= 0) {
  19214. res = u.isub(this.m);
  19215. } else if (u.cmpn(0) < 0) {
  19216. res = u.iadd(this.m);
  19217. }
  19218. return res._forceRed(this);
  19219. };
  19220. Mont.prototype.invm = function invm (a) {
  19221. // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R
  19222. var res = this.imod(a._invmp(this.m).mul(this.r2));
  19223. return res._forceRed(this);
  19224. };
  19225. })( false || module, this);
  19226. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ 163)(module)))
  19227. /***/ }),
  19228. /***/ 163:
  19229. /*!***********************************!*\
  19230. !*** (webpack)/buildin/module.js ***!
  19231. \***********************************/
  19232. /*! no static exports found */
  19233. /***/ (function(module, exports) {
  19234. module.exports = function(module) {
  19235. if (!module.webpackPolyfill) {
  19236. module.deprecate = function() {};
  19237. module.paths = [];
  19238. // module.parent = undefined by default
  19239. if (!module.children) module.children = [];
  19240. Object.defineProperty(module, "loaded", {
  19241. enumerable: true,
  19242. get: function() {
  19243. return module.l;
  19244. }
  19245. });
  19246. Object.defineProperty(module, "id", {
  19247. enumerable: true,
  19248. get: function() {
  19249. return module.i;
  19250. }
  19251. });
  19252. module.webpackPolyfill = 1;
  19253. }
  19254. return module;
  19255. };
  19256. /***/ }),
  19257. /***/ 164:
  19258. /*!************************!*\
  19259. !*** buffer (ignored) ***!
  19260. \************************/
  19261. /*! no static exports found */
  19262. /***/ (function(module, exports) {
  19263. /* (ignored) */
  19264. /***/ }),
  19265. /***/ 165:
  19266. /*!*********************************************!*\
  19267. !*** ./node_modules/miller-rabin/lib/mr.js ***!
  19268. \*********************************************/
  19269. /*! no static exports found */
  19270. /***/ (function(module, exports, __webpack_require__) {
  19271. var bn = __webpack_require__(/*! bn.js */ 162);
  19272. var brorand = __webpack_require__(/*! brorand */ 166);
  19273. function MillerRabin(rand) {
  19274. this.rand = rand || new brorand.Rand();
  19275. }
  19276. module.exports = MillerRabin;
  19277. MillerRabin.create = function create(rand) {
  19278. return new MillerRabin(rand);
  19279. };
  19280. MillerRabin.prototype._randbelow = function _randbelow(n) {
  19281. var len = n.bitLength();
  19282. var min_bytes = Math.ceil(len / 8);
  19283. // Generage random bytes until a number less than n is found.
  19284. // This ensures that 0..n-1 have an equal probability of being selected.
  19285. do
  19286. var a = new bn(this.rand.generate(min_bytes));
  19287. while (a.cmp(n) >= 0);
  19288. return a;
  19289. };
  19290. MillerRabin.prototype._randrange = function _randrange(start, stop) {
  19291. // Generate a random number greater than or equal to start and less than stop.
  19292. var size = stop.sub(start);
  19293. return start.add(this._randbelow(size));
  19294. };
  19295. MillerRabin.prototype.test = function test(n, k, cb) {
  19296. var len = n.bitLength();
  19297. var red = bn.mont(n);
  19298. var rone = new bn(1).toRed(red);
  19299. if (!k)
  19300. k = Math.max(1, (len / 48) | 0);
  19301. // Find d and s, (n - 1) = (2 ^ s) * d;
  19302. var n1 = n.subn(1);
  19303. for (var s = 0; !n1.testn(s); s++) {}
  19304. var d = n.shrn(s);
  19305. var rn1 = n1.toRed(red);
  19306. var prime = true;
  19307. for (; k > 0; k--) {
  19308. var a = this._randrange(new bn(2), n1);
  19309. if (cb)
  19310. cb(a);
  19311. var x = a.toRed(red).redPow(d);
  19312. if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)
  19313. continue;
  19314. for (var i = 1; i < s; i++) {
  19315. x = x.redSqr();
  19316. if (x.cmp(rone) === 0)
  19317. return false;
  19318. if (x.cmp(rn1) === 0)
  19319. break;
  19320. }
  19321. if (i === s)
  19322. return false;
  19323. }
  19324. return prime;
  19325. };
  19326. MillerRabin.prototype.getDivisor = function getDivisor(n, k) {
  19327. var len = n.bitLength();
  19328. var red = bn.mont(n);
  19329. var rone = new bn(1).toRed(red);
  19330. if (!k)
  19331. k = Math.max(1, (len / 48) | 0);
  19332. // Find d and s, (n - 1) = (2 ^ s) * d;
  19333. var n1 = n.subn(1);
  19334. for (var s = 0; !n1.testn(s); s++) {}
  19335. var d = n.shrn(s);
  19336. var rn1 = n1.toRed(red);
  19337. for (; k > 0; k--) {
  19338. var a = this._randrange(new bn(2), n1);
  19339. var g = n.gcd(a);
  19340. if (g.cmpn(1) !== 0)
  19341. return g;
  19342. var x = a.toRed(red).redPow(d);
  19343. if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)
  19344. continue;
  19345. for (var i = 1; i < s; i++) {
  19346. x = x.redSqr();
  19347. if (x.cmp(rone) === 0)
  19348. return x.fromRed().subn(1).gcd(n);
  19349. if (x.cmp(rn1) === 0)
  19350. break;
  19351. }
  19352. if (i === s) {
  19353. x = x.redSqr();
  19354. return x.fromRed().subn(1).gcd(n);
  19355. }
  19356. }
  19357. return false;
  19358. };
  19359. /***/ }),
  19360. /***/ 166:
  19361. /*!***************************************!*\
  19362. !*** ./node_modules/brorand/index.js ***!
  19363. \***************************************/
  19364. /*! no static exports found */
  19365. /***/ (function(module, exports, __webpack_require__) {
  19366. var r;
  19367. module.exports = function rand(len) {
  19368. if (!r)
  19369. r = new Rand(null);
  19370. return r.generate(len);
  19371. };
  19372. function Rand(rand) {
  19373. this.rand = rand;
  19374. }
  19375. module.exports.Rand = Rand;
  19376. Rand.prototype.generate = function generate(len) {
  19377. return this._rand(len);
  19378. };
  19379. // Emulate crypto API using randy
  19380. Rand.prototype._rand = function _rand(n) {
  19381. if (this.rand.getBytes)
  19382. return this.rand.getBytes(n);
  19383. var res = new Uint8Array(n);
  19384. for (var i = 0; i < res.length; i++)
  19385. res[i] = this.rand.getByte();
  19386. return res;
  19387. };
  19388. if (typeof self === 'object') {
  19389. if (self.crypto && self.crypto.getRandomValues) {
  19390. // Modern browsers
  19391. Rand.prototype._rand = function _rand(n) {
  19392. var arr = new Uint8Array(n);
  19393. self.crypto.getRandomValues(arr);
  19394. return arr;
  19395. };
  19396. } else if (self.msCrypto && self.msCrypto.getRandomValues) {
  19397. // IE
  19398. Rand.prototype._rand = function _rand(n) {
  19399. var arr = new Uint8Array(n);
  19400. self.msCrypto.getRandomValues(arr);
  19401. return arr;
  19402. };
  19403. // Safari's WebWorkers do not have `crypto`
  19404. } else if (typeof window === 'object') {
  19405. // Old junk
  19406. Rand.prototype._rand = function() {
  19407. throw new Error('Not implemented yet');
  19408. };
  19409. }
  19410. } else {
  19411. // Node.js or Web worker with no crypto support
  19412. try {
  19413. var crypto = __webpack_require__(/*! crypto */ 167);
  19414. if (typeof crypto.randomBytes !== 'function')
  19415. throw new Error('Not supported');
  19416. Rand.prototype._rand = function _rand(n) {
  19417. return crypto.randomBytes(n);
  19418. };
  19419. } catch (e) {
  19420. }
  19421. }
  19422. /***/ }),
  19423. /***/ 167:
  19424. /*!************************!*\
  19425. !*** crypto (ignored) ***!
  19426. \************************/
  19427. /*! no static exports found */
  19428. /***/ (function(module, exports) {
  19429. /* (ignored) */
  19430. /***/ }),
  19431. /***/ 168:
  19432. /*!*****************************************************!*\
  19433. !*** ./node_modules/diffie-hellman/lib/primes.json ***!
  19434. \*****************************************************/
  19435. /*! exports provided: modp1, modp2, modp5, modp14, modp15, modp16, modp17, modp18, default */
  19436. /***/ (function(module) {
  19437. module.exports = JSON.parse("{\"modp1\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff\"},\"modp2\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff\"},\"modp5\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff\"},\"modp14\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff\"},\"modp15\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff\"},\"modp16\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff\"},\"modp17\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff\"},\"modp18\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff\"}}");
  19438. /***/ }),
  19439. /***/ 169:
  19440. /*!***********************************************!*\
  19441. !*** ./node_modules/diffie-hellman/lib/dh.js ***!
  19442. \***********************************************/
  19443. /*! no static exports found */
  19444. /***/ (function(module, exports, __webpack_require__) {
  19445. /* WEBPACK VAR INJECTION */(function(Buffer) {var BN = __webpack_require__(/*! bn.js */ 162);
  19446. var MillerRabin = __webpack_require__(/*! miller-rabin */ 165);
  19447. var millerRabin = new MillerRabin();
  19448. var TWENTYFOUR = new BN(24);
  19449. var ELEVEN = new BN(11);
  19450. var TEN = new BN(10);
  19451. var THREE = new BN(3);
  19452. var SEVEN = new BN(7);
  19453. var primes = __webpack_require__(/*! ./generatePrime */ 161);
  19454. var randomBytes = __webpack_require__(/*! randombytes */ 77);
  19455. module.exports = DH;
  19456. function setPublicKey(pub, enc) {
  19457. enc = enc || 'utf8';
  19458. if (!Buffer.isBuffer(pub)) {
  19459. pub = new Buffer(pub, enc);
  19460. }
  19461. this._pub = new BN(pub);
  19462. return this;
  19463. }
  19464. function setPrivateKey(priv, enc) {
  19465. enc = enc || 'utf8';
  19466. if (!Buffer.isBuffer(priv)) {
  19467. priv = new Buffer(priv, enc);
  19468. }
  19469. this._priv = new BN(priv);
  19470. return this;
  19471. }
  19472. var primeCache = {};
  19473. function checkPrime(prime, generator) {
  19474. var gen = generator.toString('hex');
  19475. var hex = [gen, prime.toString(16)].join('_');
  19476. if (hex in primeCache) {
  19477. return primeCache[hex];
  19478. }
  19479. var error = 0;
  19480. if (prime.isEven() ||
  19481. !primes.simpleSieve ||
  19482. !primes.fermatTest(prime) ||
  19483. !millerRabin.test(prime)) {
  19484. //not a prime so +1
  19485. error += 1;
  19486. if (gen === '02' || gen === '05') {
  19487. // we'd be able to check the generator
  19488. // it would fail so +8
  19489. error += 8;
  19490. } else {
  19491. //we wouldn't be able to test the generator
  19492. // so +4
  19493. error += 4;
  19494. }
  19495. primeCache[hex] = error;
  19496. return error;
  19497. }
  19498. if (!millerRabin.test(prime.shrn(1))) {
  19499. //not a safe prime
  19500. error += 2;
  19501. }
  19502. var rem;
  19503. switch (gen) {
  19504. case '02':
  19505. if (prime.mod(TWENTYFOUR).cmp(ELEVEN)) {
  19506. // unsuidable generator
  19507. error += 8;
  19508. }
  19509. break;
  19510. case '05':
  19511. rem = prime.mod(TEN);
  19512. if (rem.cmp(THREE) && rem.cmp(SEVEN)) {
  19513. // prime mod 10 needs to equal 3 or 7
  19514. error += 8;
  19515. }
  19516. break;
  19517. default:
  19518. error += 4;
  19519. }
  19520. primeCache[hex] = error;
  19521. return error;
  19522. }
  19523. function DH(prime, generator, malleable) {
  19524. this.setGenerator(generator);
  19525. this.__prime = new BN(prime);
  19526. this._prime = BN.mont(this.__prime);
  19527. this._primeLen = prime.length;
  19528. this._pub = undefined;
  19529. this._priv = undefined;
  19530. this._primeCode = undefined;
  19531. if (malleable) {
  19532. this.setPublicKey = setPublicKey;
  19533. this.setPrivateKey = setPrivateKey;
  19534. } else {
  19535. this._primeCode = 8;
  19536. }
  19537. }
  19538. Object.defineProperty(DH.prototype, 'verifyError', {
  19539. enumerable: true,
  19540. get: function () {
  19541. if (typeof this._primeCode !== 'number') {
  19542. this._primeCode = checkPrime(this.__prime, this.__gen);
  19543. }
  19544. return this._primeCode;
  19545. }
  19546. });
  19547. DH.prototype.generateKeys = function () {
  19548. if (!this._priv) {
  19549. this._priv = new BN(randomBytes(this._primeLen));
  19550. }
  19551. this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed();
  19552. return this.getPublicKey();
  19553. };
  19554. DH.prototype.computeSecret = function (other) {
  19555. other = new BN(other);
  19556. other = other.toRed(this._prime);
  19557. var secret = other.redPow(this._priv).fromRed();
  19558. var out = new Buffer(secret.toArray());
  19559. var prime = this.getPrime();
  19560. if (out.length < prime.length) {
  19561. var front = new Buffer(prime.length - out.length);
  19562. front.fill(0);
  19563. out = Buffer.concat([front, out]);
  19564. }
  19565. return out;
  19566. };
  19567. DH.prototype.getPublicKey = function getPublicKey(enc) {
  19568. return formatReturnValue(this._pub, enc);
  19569. };
  19570. DH.prototype.getPrivateKey = function getPrivateKey(enc) {
  19571. return formatReturnValue(this._priv, enc);
  19572. };
  19573. DH.prototype.getPrime = function (enc) {
  19574. return formatReturnValue(this.__prime, enc);
  19575. };
  19576. DH.prototype.getGenerator = function (enc) {
  19577. return formatReturnValue(this._gen, enc);
  19578. };
  19579. DH.prototype.setGenerator = function (gen, enc) {
  19580. enc = enc || 'utf8';
  19581. if (!Buffer.isBuffer(gen)) {
  19582. gen = new Buffer(gen, enc);
  19583. }
  19584. this.__gen = gen;
  19585. this._gen = new BN(gen);
  19586. return this;
  19587. };
  19588. function formatReturnValue(bn, enc) {
  19589. var buf = new Buffer(bn.toArray());
  19590. if (!enc) {
  19591. return buf;
  19592. } else {
  19593. return buf.toString(enc);
  19594. }
  19595. }
  19596. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ 81).Buffer))
  19597. /***/ }),
  19598. /***/ 17:
  19599. /*!*************************************************************************!*\
  19600. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  19601. \*************************************************************************/
  19602. /*! no static exports found */
  19603. /***/ (function(module, exports) {
  19604. function _isNativeReflectConstruct() {
  19605. try {
  19606. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  19607. } catch (t) {}
  19608. return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {
  19609. return !!t;
  19610. }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
  19611. }
  19612. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19613. /***/ }),
  19614. /***/ 170:
  19615. /*!*******************************************************!*\
  19616. !*** ./node_modules/browserify-sign/browser/index.js ***!
  19617. \*******************************************************/
  19618. /*! no static exports found */
  19619. /***/ (function(module, exports, __webpack_require__) {
  19620. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  19621. var createHash = __webpack_require__(/*! create-hash */ 85)
  19622. var stream = __webpack_require__(/*! readable-stream */ 89)
  19623. var inherits = __webpack_require__(/*! inherits */ 86)
  19624. var sign = __webpack_require__(/*! ./sign */ 171)
  19625. var verify = __webpack_require__(/*! ./verify */ 224)
  19626. var algorithms = __webpack_require__(/*! ./algorithms.json */ 124)
  19627. Object.keys(algorithms).forEach(function (key) {
  19628. algorithms[key].id = Buffer.from(algorithms[key].id, 'hex')
  19629. algorithms[key.toLowerCase()] = algorithms[key]
  19630. })
  19631. function Sign (algorithm) {
  19632. stream.Writable.call(this)
  19633. var data = algorithms[algorithm]
  19634. if (!data) throw new Error('Unknown message digest')
  19635. this._hashType = data.hash
  19636. this._hash = createHash(data.hash)
  19637. this._tag = data.id
  19638. this._signType = data.sign
  19639. }
  19640. inherits(Sign, stream.Writable)
  19641. Sign.prototype._write = function _write (data, _, done) {
  19642. this._hash.update(data)
  19643. done()
  19644. }
  19645. Sign.prototype.update = function update (data, enc) {
  19646. if (typeof data === 'string') data = Buffer.from(data, enc)
  19647. this._hash.update(data)
  19648. return this
  19649. }
  19650. Sign.prototype.sign = function signMethod (key, enc) {
  19651. this.end()
  19652. var hash = this._hash.digest()
  19653. var sig = sign(hash, key, this._hashType, this._signType, this._tag)
  19654. return enc ? sig.toString(enc) : sig
  19655. }
  19656. function Verify (algorithm) {
  19657. stream.Writable.call(this)
  19658. var data = algorithms[algorithm]
  19659. if (!data) throw new Error('Unknown message digest')
  19660. this._hash = createHash(data.hash)
  19661. this._tag = data.id
  19662. this._signType = data.sign
  19663. }
  19664. inherits(Verify, stream.Writable)
  19665. Verify.prototype._write = function _write (data, _, done) {
  19666. this._hash.update(data)
  19667. done()
  19668. }
  19669. Verify.prototype.update = function update (data, enc) {
  19670. if (typeof data === 'string') data = Buffer.from(data, enc)
  19671. this._hash.update(data)
  19672. return this
  19673. }
  19674. Verify.prototype.verify = function verifyMethod (key, sig, enc) {
  19675. if (typeof sig === 'string') sig = Buffer.from(sig, enc)
  19676. this.end()
  19677. var hash = this._hash.digest()
  19678. return verify(sig, hash, key, this._signType, this._tag)
  19679. }
  19680. function createSign (algorithm) {
  19681. return new Sign(algorithm)
  19682. }
  19683. function createVerify (algorithm) {
  19684. return new Verify(algorithm)
  19685. }
  19686. module.exports = {
  19687. Sign: createSign,
  19688. Verify: createVerify,
  19689. createSign: createSign,
  19690. createVerify: createVerify
  19691. }
  19692. /***/ }),
  19693. /***/ 171:
  19694. /*!******************************************************!*\
  19695. !*** ./node_modules/browserify-sign/browser/sign.js ***!
  19696. \******************************************************/
  19697. /*! no static exports found */
  19698. /***/ (function(module, exports, __webpack_require__) {
  19699. // much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js
  19700. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  19701. var createHmac = __webpack_require__(/*! create-hmac */ 120)
  19702. var crt = __webpack_require__(/*! browserify-rsa */ 172)
  19703. var EC = __webpack_require__(/*! elliptic */ 173).ec
  19704. var BN = __webpack_require__(/*! bn.js */ 162)
  19705. var parseKeys = __webpack_require__(/*! parse-asn1 */ 203)
  19706. var curves = __webpack_require__(/*! ./curves.json */ 223)
  19707. function sign (hash, key, hashType, signType, tag) {
  19708. var priv = parseKeys(key)
  19709. if (priv.curve) {
  19710. // rsa keys can be interpreted as ecdsa ones in openssl
  19711. if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') throw new Error('wrong private key type')
  19712. return ecSign(hash, priv)
  19713. } else if (priv.type === 'dsa') {
  19714. if (signType !== 'dsa') throw new Error('wrong private key type')
  19715. return dsaSign(hash, priv, hashType)
  19716. } else {
  19717. if (signType !== 'rsa' && signType !== 'ecdsa/rsa') throw new Error('wrong private key type')
  19718. }
  19719. hash = Buffer.concat([tag, hash])
  19720. var len = priv.modulus.byteLength()
  19721. var pad = [0, 1]
  19722. while (hash.length + pad.length + 1 < len) pad.push(0xff)
  19723. pad.push(0x00)
  19724. var i = -1
  19725. while (++i < hash.length) pad.push(hash[i])
  19726. var out = crt(pad, priv)
  19727. return out
  19728. }
  19729. function ecSign (hash, priv) {
  19730. var curveId = curves[priv.curve.join('.')]
  19731. if (!curveId) throw new Error('unknown curve ' + priv.curve.join('.'))
  19732. var curve = new EC(curveId)
  19733. var key = curve.keyFromPrivate(priv.privateKey)
  19734. var out = key.sign(hash)
  19735. return Buffer.from(out.toDER())
  19736. }
  19737. function dsaSign (hash, priv, algo) {
  19738. var x = priv.params.priv_key
  19739. var p = priv.params.p
  19740. var q = priv.params.q
  19741. var g = priv.params.g
  19742. var r = new BN(0)
  19743. var k
  19744. var H = bits2int(hash, q).mod(q)
  19745. var s = false
  19746. var kv = getKey(x, q, hash, algo)
  19747. while (s === false) {
  19748. k = makeKey(q, kv, algo)
  19749. r = makeR(g, k, p, q)
  19750. s = k.invm(q).imul(H.add(x.mul(r))).mod(q)
  19751. if (s.cmpn(0) === 0) {
  19752. s = false
  19753. r = new BN(0)
  19754. }
  19755. }
  19756. return toDER(r, s)
  19757. }
  19758. function toDER (r, s) {
  19759. r = r.toArray()
  19760. s = s.toArray()
  19761. // Pad values
  19762. if (r[0] & 0x80) r = [0].concat(r)
  19763. if (s[0] & 0x80) s = [0].concat(s)
  19764. var total = r.length + s.length + 4
  19765. var res = [0x30, total, 0x02, r.length]
  19766. res = res.concat(r, [0x02, s.length], s)
  19767. return Buffer.from(res)
  19768. }
  19769. function getKey (x, q, hash, algo) {
  19770. x = Buffer.from(x.toArray())
  19771. if (x.length < q.byteLength()) {
  19772. var zeros = Buffer.alloc(q.byteLength() - x.length)
  19773. x = Buffer.concat([zeros, x])
  19774. }
  19775. var hlen = hash.length
  19776. var hbits = bits2octets(hash, q)
  19777. var v = Buffer.alloc(hlen)
  19778. v.fill(1)
  19779. var k = Buffer.alloc(hlen)
  19780. k = createHmac(algo, k).update(v).update(Buffer.from([0])).update(x).update(hbits).digest()
  19781. v = createHmac(algo, k).update(v).digest()
  19782. k = createHmac(algo, k).update(v).update(Buffer.from([1])).update(x).update(hbits).digest()
  19783. v = createHmac(algo, k).update(v).digest()
  19784. return { k: k, v: v }
  19785. }
  19786. function bits2int (obits, q) {
  19787. var bits = new BN(obits)
  19788. var shift = (obits.length << 3) - q.bitLength()
  19789. if (shift > 0) bits.ishrn(shift)
  19790. return bits
  19791. }
  19792. function bits2octets (bits, q) {
  19793. bits = bits2int(bits, q)
  19794. bits = bits.mod(q)
  19795. var out = Buffer.from(bits.toArray())
  19796. if (out.length < q.byteLength()) {
  19797. var zeros = Buffer.alloc(q.byteLength() - out.length)
  19798. out = Buffer.concat([zeros, out])
  19799. }
  19800. return out
  19801. }
  19802. function makeKey (q, kv, algo) {
  19803. var t
  19804. var k
  19805. do {
  19806. t = Buffer.alloc(0)
  19807. while (t.length * 8 < q.bitLength()) {
  19808. kv.v = createHmac(algo, kv.k).update(kv.v).digest()
  19809. t = Buffer.concat([t, kv.v])
  19810. }
  19811. k = bits2int(t, q)
  19812. kv.k = createHmac(algo, kv.k).update(kv.v).update(Buffer.from([0])).digest()
  19813. kv.v = createHmac(algo, kv.k).update(kv.v).digest()
  19814. } while (k.cmp(q) !== -1)
  19815. return k
  19816. }
  19817. function makeR (g, k, p, q) {
  19818. return g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q)
  19819. }
  19820. module.exports = sign
  19821. module.exports.getKey = getKey
  19822. module.exports.makeKey = makeKey
  19823. /***/ }),
  19824. /***/ 172:
  19825. /*!**********************************************!*\
  19826. !*** ./node_modules/browserify-rsa/index.js ***!
  19827. \**********************************************/
  19828. /*! no static exports found */
  19829. /***/ (function(module, exports, __webpack_require__) {
  19830. /* WEBPACK VAR INJECTION */(function(Buffer) {var BN = __webpack_require__(/*! bn.js */ 162)
  19831. var randomBytes = __webpack_require__(/*! randombytes */ 77)
  19832. function blind (priv) {
  19833. var r = getr(priv)
  19834. var blinder = r.toRed(BN.mont(priv.modulus)).redPow(new BN(priv.publicExponent)).fromRed()
  19835. return { blinder: blinder, unblinder: r.invm(priv.modulus) }
  19836. }
  19837. function getr (priv) {
  19838. var len = priv.modulus.byteLength()
  19839. var r
  19840. do {
  19841. r = new BN(randomBytes(len))
  19842. } while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2))
  19843. return r
  19844. }
  19845. function crt (msg, priv) {
  19846. var blinds = blind(priv)
  19847. var len = priv.modulus.byteLength()
  19848. var blinded = new BN(msg).mul(blinds.blinder).umod(priv.modulus)
  19849. var c1 = blinded.toRed(BN.mont(priv.prime1))
  19850. var c2 = blinded.toRed(BN.mont(priv.prime2))
  19851. var qinv = priv.coefficient
  19852. var p = priv.prime1
  19853. var q = priv.prime2
  19854. var m1 = c1.redPow(priv.exponent1).fromRed()
  19855. var m2 = c2.redPow(priv.exponent2).fromRed()
  19856. var h = m1.isub(m2).imul(qinv).umod(p).imul(q)
  19857. return m2.iadd(h).imul(blinds.unblinder).umod(priv.modulus).toArrayLike(Buffer, 'be', len)
  19858. }
  19859. crt.getr = getr
  19860. module.exports = crt
  19861. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ 81).Buffer))
  19862. /***/ }),
  19863. /***/ 173:
  19864. /*!***********************************************!*\
  19865. !*** ./node_modules/elliptic/lib/elliptic.js ***!
  19866. \***********************************************/
  19867. /*! no static exports found */
  19868. /***/ (function(module, exports, __webpack_require__) {
  19869. "use strict";
  19870. var elliptic = exports;
  19871. elliptic.version = __webpack_require__(/*! ../package.json */ 174).version;
  19872. elliptic.utils = __webpack_require__(/*! ./elliptic/utils */ 175);
  19873. elliptic.rand = __webpack_require__(/*! brorand */ 166);
  19874. elliptic.curve = __webpack_require__(/*! ./elliptic/curve */ 177);
  19875. elliptic.curves = __webpack_require__(/*! ./elliptic/curves */ 182);
  19876. // Protocols
  19877. elliptic.ec = __webpack_require__(/*! ./elliptic/ec */ 196);
  19878. elliptic.eddsa = __webpack_require__(/*! ./elliptic/eddsa */ 200);
  19879. /***/ }),
  19880. /***/ 174:
  19881. /*!********************************************!*\
  19882. !*** ./node_modules/elliptic/package.json ***!
  19883. \********************************************/
  19884. /*! exports provided: name, version, description, main, files, scripts, repository, keywords, author, license, bugs, homepage, devDependencies, dependencies, default */
  19885. /***/ (function(module) {
  19886. module.exports = JSON.parse("{\"name\":\"elliptic\",\"version\":\"6.5.4\",\"description\":\"EC cryptography\",\"main\":\"lib/elliptic.js\",\"files\":[\"lib\"],\"scripts\":{\"lint\":\"eslint lib test\",\"lint:fix\":\"npm run lint -- --fix\",\"unit\":\"istanbul test _mocha --reporter=spec test/index.js\",\"test\":\"npm run lint && npm run unit\",\"version\":\"grunt dist && git add dist/\"},\"repository\":{\"type\":\"git\",\"url\":\"git@github.com:indutny/elliptic\"},\"keywords\":[\"EC\",\"Elliptic\",\"curve\",\"Cryptography\"],\"author\":\"Fedor Indutny <fedor@indutny.com>\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/indutny/elliptic/issues\"},\"homepage\":\"https://github.com/indutny/elliptic\",\"devDependencies\":{\"brfs\":\"^2.0.2\",\"coveralls\":\"^3.1.0\",\"eslint\":\"^7.6.0\",\"grunt\":\"^1.2.1\",\"grunt-browserify\":\"^5.3.0\",\"grunt-cli\":\"^1.3.2\",\"grunt-contrib-connect\":\"^3.0.0\",\"grunt-contrib-copy\":\"^1.0.0\",\"grunt-contrib-uglify\":\"^5.0.0\",\"grunt-mocha-istanbul\":\"^5.0.2\",\"grunt-saucelabs\":\"^9.0.1\",\"istanbul\":\"^0.4.5\",\"mocha\":\"^8.0.1\"},\"dependencies\":{\"bn.js\":\"^4.11.9\",\"brorand\":\"^1.1.0\",\"hash.js\":\"^1.0.0\",\"hmac-drbg\":\"^1.0.1\",\"inherits\":\"^2.0.4\",\"minimalistic-assert\":\"^1.0.1\",\"minimalistic-crypto-utils\":\"^1.0.1\"}}");
  19887. /***/ }),
  19888. /***/ 175:
  19889. /*!*****************************************************!*\
  19890. !*** ./node_modules/elliptic/lib/elliptic/utils.js ***!
  19891. \*****************************************************/
  19892. /*! no static exports found */
  19893. /***/ (function(module, exports, __webpack_require__) {
  19894. "use strict";
  19895. var utils = exports;
  19896. var BN = __webpack_require__(/*! bn.js */ 162);
  19897. var minAssert = __webpack_require__(/*! minimalistic-assert */ 136);
  19898. var minUtils = __webpack_require__(/*! minimalistic-crypto-utils */ 176);
  19899. utils.assert = minAssert;
  19900. utils.toArray = minUtils.toArray;
  19901. utils.zero2 = minUtils.zero2;
  19902. utils.toHex = minUtils.toHex;
  19903. utils.encode = minUtils.encode;
  19904. // Represent num in a w-NAF form
  19905. function getNAF(num, w, bits) {
  19906. var naf = new Array(Math.max(num.bitLength(), bits) + 1);
  19907. naf.fill(0);
  19908. var ws = 1 << (w + 1);
  19909. var k = num.clone();
  19910. for (var i = 0; i < naf.length; i++) {
  19911. var z;
  19912. var mod = k.andln(ws - 1);
  19913. if (k.isOdd()) {
  19914. if (mod > (ws >> 1) - 1)
  19915. z = (ws >> 1) - mod;
  19916. else
  19917. z = mod;
  19918. k.isubn(z);
  19919. } else {
  19920. z = 0;
  19921. }
  19922. naf[i] = z;
  19923. k.iushrn(1);
  19924. }
  19925. return naf;
  19926. }
  19927. utils.getNAF = getNAF;
  19928. // Represent k1, k2 in a Joint Sparse Form
  19929. function getJSF(k1, k2) {
  19930. var jsf = [
  19931. [],
  19932. [],
  19933. ];
  19934. k1 = k1.clone();
  19935. k2 = k2.clone();
  19936. var d1 = 0;
  19937. var d2 = 0;
  19938. var m8;
  19939. while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {
  19940. // First phase
  19941. var m14 = (k1.andln(3) + d1) & 3;
  19942. var m24 = (k2.andln(3) + d2) & 3;
  19943. if (m14 === 3)
  19944. m14 = -1;
  19945. if (m24 === 3)
  19946. m24 = -1;
  19947. var u1;
  19948. if ((m14 & 1) === 0) {
  19949. u1 = 0;
  19950. } else {
  19951. m8 = (k1.andln(7) + d1) & 7;
  19952. if ((m8 === 3 || m8 === 5) && m24 === 2)
  19953. u1 = -m14;
  19954. else
  19955. u1 = m14;
  19956. }
  19957. jsf[0].push(u1);
  19958. var u2;
  19959. if ((m24 & 1) === 0) {
  19960. u2 = 0;
  19961. } else {
  19962. m8 = (k2.andln(7) + d2) & 7;
  19963. if ((m8 === 3 || m8 === 5) && m14 === 2)
  19964. u2 = -m24;
  19965. else
  19966. u2 = m24;
  19967. }
  19968. jsf[1].push(u2);
  19969. // Second phase
  19970. if (2 * d1 === u1 + 1)
  19971. d1 = 1 - d1;
  19972. if (2 * d2 === u2 + 1)
  19973. d2 = 1 - d2;
  19974. k1.iushrn(1);
  19975. k2.iushrn(1);
  19976. }
  19977. return jsf;
  19978. }
  19979. utils.getJSF = getJSF;
  19980. function cachedProperty(obj, name, computer) {
  19981. var key = '_' + name;
  19982. obj.prototype[name] = function cachedProperty() {
  19983. return this[key] !== undefined ? this[key] :
  19984. this[key] = computer.call(this);
  19985. };
  19986. }
  19987. utils.cachedProperty = cachedProperty;
  19988. function parseBytes(bytes) {
  19989. return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :
  19990. bytes;
  19991. }
  19992. utils.parseBytes = parseBytes;
  19993. function intFromLE(bytes) {
  19994. return new BN(bytes, 'hex', 'le');
  19995. }
  19996. utils.intFromLE = intFromLE;
  19997. /***/ }),
  19998. /***/ 176:
  19999. /*!*************************************************************!*\
  20000. !*** ./node_modules/minimalistic-crypto-utils/lib/utils.js ***!
  20001. \*************************************************************/
  20002. /*! no static exports found */
  20003. /***/ (function(module, exports, __webpack_require__) {
  20004. "use strict";
  20005. var utils = exports;
  20006. function toArray(msg, enc) {
  20007. if (Array.isArray(msg))
  20008. return msg.slice();
  20009. if (!msg)
  20010. return [];
  20011. var res = [];
  20012. if (typeof msg !== 'string') {
  20013. for (var i = 0; i < msg.length; i++)
  20014. res[i] = msg[i] | 0;
  20015. return res;
  20016. }
  20017. if (enc === 'hex') {
  20018. msg = msg.replace(/[^a-z0-9]+/ig, '');
  20019. if (msg.length % 2 !== 0)
  20020. msg = '0' + msg;
  20021. for (var i = 0; i < msg.length; i += 2)
  20022. res.push(parseInt(msg[i] + msg[i + 1], 16));
  20023. } else {
  20024. for (var i = 0; i < msg.length; i++) {
  20025. var c = msg.charCodeAt(i);
  20026. var hi = c >> 8;
  20027. var lo = c & 0xff;
  20028. if (hi)
  20029. res.push(hi, lo);
  20030. else
  20031. res.push(lo);
  20032. }
  20033. }
  20034. return res;
  20035. }
  20036. utils.toArray = toArray;
  20037. function zero2(word) {
  20038. if (word.length === 1)
  20039. return '0' + word;
  20040. else
  20041. return word;
  20042. }
  20043. utils.zero2 = zero2;
  20044. function toHex(msg) {
  20045. var res = '';
  20046. for (var i = 0; i < msg.length; i++)
  20047. res += zero2(msg[i].toString(16));
  20048. return res;
  20049. }
  20050. utils.toHex = toHex;
  20051. utils.encode = function encode(arr, enc) {
  20052. if (enc === 'hex')
  20053. return toHex(arr);
  20054. else
  20055. return arr;
  20056. };
  20057. /***/ }),
  20058. /***/ 177:
  20059. /*!***********************************************************!*\
  20060. !*** ./node_modules/elliptic/lib/elliptic/curve/index.js ***!
  20061. \***********************************************************/
  20062. /*! no static exports found */
  20063. /***/ (function(module, exports, __webpack_require__) {
  20064. "use strict";
  20065. var curve = exports;
  20066. curve.base = __webpack_require__(/*! ./base */ 178);
  20067. curve.short = __webpack_require__(/*! ./short */ 179);
  20068. curve.mont = __webpack_require__(/*! ./mont */ 180);
  20069. curve.edwards = __webpack_require__(/*! ./edwards */ 181);
  20070. /***/ }),
  20071. /***/ 178:
  20072. /*!**********************************************************!*\
  20073. !*** ./node_modules/elliptic/lib/elliptic/curve/base.js ***!
  20074. \**********************************************************/
  20075. /*! no static exports found */
  20076. /***/ (function(module, exports, __webpack_require__) {
  20077. "use strict";
  20078. var BN = __webpack_require__(/*! bn.js */ 162);
  20079. var utils = __webpack_require__(/*! ../utils */ 175);
  20080. var getNAF = utils.getNAF;
  20081. var getJSF = utils.getJSF;
  20082. var assert = utils.assert;
  20083. function BaseCurve(type, conf) {
  20084. this.type = type;
  20085. this.p = new BN(conf.p, 16);
  20086. // Use Montgomery, when there is no fast reduction for the prime
  20087. this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);
  20088. // Useful for many curves
  20089. this.zero = new BN(0).toRed(this.red);
  20090. this.one = new BN(1).toRed(this.red);
  20091. this.two = new BN(2).toRed(this.red);
  20092. // Curve configuration, optional
  20093. this.n = conf.n && new BN(conf.n, 16);
  20094. this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);
  20095. // Temporary arrays
  20096. this._wnafT1 = new Array(4);
  20097. this._wnafT2 = new Array(4);
  20098. this._wnafT3 = new Array(4);
  20099. this._wnafT4 = new Array(4);
  20100. this._bitLength = this.n ? this.n.bitLength() : 0;
  20101. // Generalized Greg Maxwell's trick
  20102. var adjustCount = this.n && this.p.div(this.n);
  20103. if (!adjustCount || adjustCount.cmpn(100) > 0) {
  20104. this.redN = null;
  20105. } else {
  20106. this._maxwellTrick = true;
  20107. this.redN = this.n.toRed(this.red);
  20108. }
  20109. }
  20110. module.exports = BaseCurve;
  20111. BaseCurve.prototype.point = function point() {
  20112. throw new Error('Not implemented');
  20113. };
  20114. BaseCurve.prototype.validate = function validate() {
  20115. throw new Error('Not implemented');
  20116. };
  20117. BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {
  20118. assert(p.precomputed);
  20119. var doubles = p._getDoubles();
  20120. var naf = getNAF(k, 1, this._bitLength);
  20121. var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);
  20122. I /= 3;
  20123. // Translate into more windowed form
  20124. var repr = [];
  20125. var j;
  20126. var nafW;
  20127. for (j = 0; j < naf.length; j += doubles.step) {
  20128. nafW = 0;
  20129. for (var l = j + doubles.step - 1; l >= j; l--)
  20130. nafW = (nafW << 1) + naf[l];
  20131. repr.push(nafW);
  20132. }
  20133. var a = this.jpoint(null, null, null);
  20134. var b = this.jpoint(null, null, null);
  20135. for (var i = I; i > 0; i--) {
  20136. for (j = 0; j < repr.length; j++) {
  20137. nafW = repr[j];
  20138. if (nafW === i)
  20139. b = b.mixedAdd(doubles.points[j]);
  20140. else if (nafW === -i)
  20141. b = b.mixedAdd(doubles.points[j].neg());
  20142. }
  20143. a = a.add(b);
  20144. }
  20145. return a.toP();
  20146. };
  20147. BaseCurve.prototype._wnafMul = function _wnafMul(p, k) {
  20148. var w = 4;
  20149. // Precompute window
  20150. var nafPoints = p._getNAFPoints(w);
  20151. w = nafPoints.wnd;
  20152. var wnd = nafPoints.points;
  20153. // Get NAF form
  20154. var naf = getNAF(k, w, this._bitLength);
  20155. // Add `this`*(N+1) for every w-NAF index
  20156. var acc = this.jpoint(null, null, null);
  20157. for (var i = naf.length - 1; i >= 0; i--) {
  20158. // Count zeroes
  20159. for (var l = 0; i >= 0 && naf[i] === 0; i--)
  20160. l++;
  20161. if (i >= 0)
  20162. l++;
  20163. acc = acc.dblp(l);
  20164. if (i < 0)
  20165. break;
  20166. var z = naf[i];
  20167. assert(z !== 0);
  20168. if (p.type === 'affine') {
  20169. // J +- P
  20170. if (z > 0)
  20171. acc = acc.mixedAdd(wnd[(z - 1) >> 1]);
  20172. else
  20173. acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());
  20174. } else {
  20175. // J +- J
  20176. if (z > 0)
  20177. acc = acc.add(wnd[(z - 1) >> 1]);
  20178. else
  20179. acc = acc.add(wnd[(-z - 1) >> 1].neg());
  20180. }
  20181. }
  20182. return p.type === 'affine' ? acc.toP() : acc;
  20183. };
  20184. BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,
  20185. points,
  20186. coeffs,
  20187. len,
  20188. jacobianResult) {
  20189. var wndWidth = this._wnafT1;
  20190. var wnd = this._wnafT2;
  20191. var naf = this._wnafT3;
  20192. // Fill all arrays
  20193. var max = 0;
  20194. var i;
  20195. var j;
  20196. var p;
  20197. for (i = 0; i < len; i++) {
  20198. p = points[i];
  20199. var nafPoints = p._getNAFPoints(defW);
  20200. wndWidth[i] = nafPoints.wnd;
  20201. wnd[i] = nafPoints.points;
  20202. }
  20203. // Comb small window NAFs
  20204. for (i = len - 1; i >= 1; i -= 2) {
  20205. var a = i - 1;
  20206. var b = i;
  20207. if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {
  20208. naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);
  20209. naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);
  20210. max = Math.max(naf[a].length, max);
  20211. max = Math.max(naf[b].length, max);
  20212. continue;
  20213. }
  20214. var comb = [
  20215. points[a], /* 1 */
  20216. null, /* 3 */
  20217. null, /* 5 */
  20218. points[b], /* 7 */
  20219. ];
  20220. // Try to avoid Projective points, if possible
  20221. if (points[a].y.cmp(points[b].y) === 0) {
  20222. comb[1] = points[a].add(points[b]);
  20223. comb[2] = points[a].toJ().mixedAdd(points[b].neg());
  20224. } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {
  20225. comb[1] = points[a].toJ().mixedAdd(points[b]);
  20226. comb[2] = points[a].add(points[b].neg());
  20227. } else {
  20228. comb[1] = points[a].toJ().mixedAdd(points[b]);
  20229. comb[2] = points[a].toJ().mixedAdd(points[b].neg());
  20230. }
  20231. var index = [
  20232. -3, /* -1 -1 */
  20233. -1, /* -1 0 */
  20234. -5, /* -1 1 */
  20235. -7, /* 0 -1 */
  20236. 0, /* 0 0 */
  20237. 7, /* 0 1 */
  20238. 5, /* 1 -1 */
  20239. 1, /* 1 0 */
  20240. 3, /* 1 1 */
  20241. ];
  20242. var jsf = getJSF(coeffs[a], coeffs[b]);
  20243. max = Math.max(jsf[0].length, max);
  20244. naf[a] = new Array(max);
  20245. naf[b] = new Array(max);
  20246. for (j = 0; j < max; j++) {
  20247. var ja = jsf[0][j] | 0;
  20248. var jb = jsf[1][j] | 0;
  20249. naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];
  20250. naf[b][j] = 0;
  20251. wnd[a] = comb;
  20252. }
  20253. }
  20254. var acc = this.jpoint(null, null, null);
  20255. var tmp = this._wnafT4;
  20256. for (i = max; i >= 0; i--) {
  20257. var k = 0;
  20258. while (i >= 0) {
  20259. var zero = true;
  20260. for (j = 0; j < len; j++) {
  20261. tmp[j] = naf[j][i] | 0;
  20262. if (tmp[j] !== 0)
  20263. zero = false;
  20264. }
  20265. if (!zero)
  20266. break;
  20267. k++;
  20268. i--;
  20269. }
  20270. if (i >= 0)
  20271. k++;
  20272. acc = acc.dblp(k);
  20273. if (i < 0)
  20274. break;
  20275. for (j = 0; j < len; j++) {
  20276. var z = tmp[j];
  20277. p;
  20278. if (z === 0)
  20279. continue;
  20280. else if (z > 0)
  20281. p = wnd[j][(z - 1) >> 1];
  20282. else if (z < 0)
  20283. p = wnd[j][(-z - 1) >> 1].neg();
  20284. if (p.type === 'affine')
  20285. acc = acc.mixedAdd(p);
  20286. else
  20287. acc = acc.add(p);
  20288. }
  20289. }
  20290. // Zeroify references
  20291. for (i = 0; i < len; i++)
  20292. wnd[i] = null;
  20293. if (jacobianResult)
  20294. return acc;
  20295. else
  20296. return acc.toP();
  20297. };
  20298. function BasePoint(curve, type) {
  20299. this.curve = curve;
  20300. this.type = type;
  20301. this.precomputed = null;
  20302. }
  20303. BaseCurve.BasePoint = BasePoint;
  20304. BasePoint.prototype.eq = function eq(/*other*/) {
  20305. throw new Error('Not implemented');
  20306. };
  20307. BasePoint.prototype.validate = function validate() {
  20308. return this.curve.validate(this);
  20309. };
  20310. BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
  20311. bytes = utils.toArray(bytes, enc);
  20312. var len = this.p.byteLength();
  20313. // uncompressed, hybrid-odd, hybrid-even
  20314. if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&
  20315. bytes.length - 1 === 2 * len) {
  20316. if (bytes[0] === 0x06)
  20317. assert(bytes[bytes.length - 1] % 2 === 0);
  20318. else if (bytes[0] === 0x07)
  20319. assert(bytes[bytes.length - 1] % 2 === 1);
  20320. var res = this.point(bytes.slice(1, 1 + len),
  20321. bytes.slice(1 + len, 1 + 2 * len));
  20322. return res;
  20323. } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&
  20324. bytes.length - 1 === len) {
  20325. return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);
  20326. }
  20327. throw new Error('Unknown point format');
  20328. };
  20329. BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {
  20330. return this.encode(enc, true);
  20331. };
  20332. BasePoint.prototype._encode = function _encode(compact) {
  20333. var len = this.curve.p.byteLength();
  20334. var x = this.getX().toArray('be', len);
  20335. if (compact)
  20336. return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);
  20337. return [ 0x04 ].concat(x, this.getY().toArray('be', len));
  20338. };
  20339. BasePoint.prototype.encode = function encode(enc, compact) {
  20340. return utils.encode(this._encode(compact), enc);
  20341. };
  20342. BasePoint.prototype.precompute = function precompute(power) {
  20343. if (this.precomputed)
  20344. return this;
  20345. var precomputed = {
  20346. doubles: null,
  20347. naf: null,
  20348. beta: null,
  20349. };
  20350. precomputed.naf = this._getNAFPoints(8);
  20351. precomputed.doubles = this._getDoubles(4, power);
  20352. precomputed.beta = this._getBeta();
  20353. this.precomputed = precomputed;
  20354. return this;
  20355. };
  20356. BasePoint.prototype._hasDoubles = function _hasDoubles(k) {
  20357. if (!this.precomputed)
  20358. return false;
  20359. var doubles = this.precomputed.doubles;
  20360. if (!doubles)
  20361. return false;
  20362. return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);
  20363. };
  20364. BasePoint.prototype._getDoubles = function _getDoubles(step, power) {
  20365. if (this.precomputed && this.precomputed.doubles)
  20366. return this.precomputed.doubles;
  20367. var doubles = [ this ];
  20368. var acc = this;
  20369. for (var i = 0; i < power; i += step) {
  20370. for (var j = 0; j < step; j++)
  20371. acc = acc.dbl();
  20372. doubles.push(acc);
  20373. }
  20374. return {
  20375. step: step,
  20376. points: doubles,
  20377. };
  20378. };
  20379. BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {
  20380. if (this.precomputed && this.precomputed.naf)
  20381. return this.precomputed.naf;
  20382. var res = [ this ];
  20383. var max = (1 << wnd) - 1;
  20384. var dbl = max === 1 ? null : this.dbl();
  20385. for (var i = 1; i < max; i++)
  20386. res[i] = res[i - 1].add(dbl);
  20387. return {
  20388. wnd: wnd,
  20389. points: res,
  20390. };
  20391. };
  20392. BasePoint.prototype._getBeta = function _getBeta() {
  20393. return null;
  20394. };
  20395. BasePoint.prototype.dblp = function dblp(k) {
  20396. var r = this;
  20397. for (var i = 0; i < k; i++)
  20398. r = r.dbl();
  20399. return r;
  20400. };
  20401. /***/ }),
  20402. /***/ 179:
  20403. /*!***********************************************************!*\
  20404. !*** ./node_modules/elliptic/lib/elliptic/curve/short.js ***!
  20405. \***********************************************************/
  20406. /*! no static exports found */
  20407. /***/ (function(module, exports, __webpack_require__) {
  20408. "use strict";
  20409. var utils = __webpack_require__(/*! ../utils */ 175);
  20410. var BN = __webpack_require__(/*! bn.js */ 162);
  20411. var inherits = __webpack_require__(/*! inherits */ 86);
  20412. var Base = __webpack_require__(/*! ./base */ 178);
  20413. var assert = utils.assert;
  20414. function ShortCurve(conf) {
  20415. Base.call(this, 'short', conf);
  20416. this.a = new BN(conf.a, 16).toRed(this.red);
  20417. this.b = new BN(conf.b, 16).toRed(this.red);
  20418. this.tinv = this.two.redInvm();
  20419. this.zeroA = this.a.fromRed().cmpn(0) === 0;
  20420. this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;
  20421. // If the curve is endomorphic, precalculate beta and lambda
  20422. this.endo = this._getEndomorphism(conf);
  20423. this._endoWnafT1 = new Array(4);
  20424. this._endoWnafT2 = new Array(4);
  20425. }
  20426. inherits(ShortCurve, Base);
  20427. module.exports = ShortCurve;
  20428. ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {
  20429. // No efficient endomorphism
  20430. if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)
  20431. return;
  20432. // Compute beta and lambda, that lambda * P = (beta * Px; Py)
  20433. var beta;
  20434. var lambda;
  20435. if (conf.beta) {
  20436. beta = new BN(conf.beta, 16).toRed(this.red);
  20437. } else {
  20438. var betas = this._getEndoRoots(this.p);
  20439. // Choose the smallest beta
  20440. beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];
  20441. beta = beta.toRed(this.red);
  20442. }
  20443. if (conf.lambda) {
  20444. lambda = new BN(conf.lambda, 16);
  20445. } else {
  20446. // Choose the lambda that is matching selected beta
  20447. var lambdas = this._getEndoRoots(this.n);
  20448. if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {
  20449. lambda = lambdas[0];
  20450. } else {
  20451. lambda = lambdas[1];
  20452. assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);
  20453. }
  20454. }
  20455. // Get basis vectors, used for balanced length-two representation
  20456. var basis;
  20457. if (conf.basis) {
  20458. basis = conf.basis.map(function(vec) {
  20459. return {
  20460. a: new BN(vec.a, 16),
  20461. b: new BN(vec.b, 16),
  20462. };
  20463. });
  20464. } else {
  20465. basis = this._getEndoBasis(lambda);
  20466. }
  20467. return {
  20468. beta: beta,
  20469. lambda: lambda,
  20470. basis: basis,
  20471. };
  20472. };
  20473. ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {
  20474. // Find roots of for x^2 + x + 1 in F
  20475. // Root = (-1 +- Sqrt(-3)) / 2
  20476. //
  20477. var red = num === this.p ? this.red : BN.mont(num);
  20478. var tinv = new BN(2).toRed(red).redInvm();
  20479. var ntinv = tinv.redNeg();
  20480. var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);
  20481. var l1 = ntinv.redAdd(s).fromRed();
  20482. var l2 = ntinv.redSub(s).fromRed();
  20483. return [ l1, l2 ];
  20484. };
  20485. ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {
  20486. // aprxSqrt >= sqrt(this.n)
  20487. var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));
  20488. // 3.74
  20489. // Run EGCD, until r(L + 1) < aprxSqrt
  20490. var u = lambda;
  20491. var v = this.n.clone();
  20492. var x1 = new BN(1);
  20493. var y1 = new BN(0);
  20494. var x2 = new BN(0);
  20495. var y2 = new BN(1);
  20496. // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)
  20497. var a0;
  20498. var b0;
  20499. // First vector
  20500. var a1;
  20501. var b1;
  20502. // Second vector
  20503. var a2;
  20504. var b2;
  20505. var prevR;
  20506. var i = 0;
  20507. var r;
  20508. var x;
  20509. while (u.cmpn(0) !== 0) {
  20510. var q = v.div(u);
  20511. r = v.sub(q.mul(u));
  20512. x = x2.sub(q.mul(x1));
  20513. var y = y2.sub(q.mul(y1));
  20514. if (!a1 && r.cmp(aprxSqrt) < 0) {
  20515. a0 = prevR.neg();
  20516. b0 = x1;
  20517. a1 = r.neg();
  20518. b1 = x;
  20519. } else if (a1 && ++i === 2) {
  20520. break;
  20521. }
  20522. prevR = r;
  20523. v = u;
  20524. u = r;
  20525. x2 = x1;
  20526. x1 = x;
  20527. y2 = y1;
  20528. y1 = y;
  20529. }
  20530. a2 = r.neg();
  20531. b2 = x;
  20532. var len1 = a1.sqr().add(b1.sqr());
  20533. var len2 = a2.sqr().add(b2.sqr());
  20534. if (len2.cmp(len1) >= 0) {
  20535. a2 = a0;
  20536. b2 = b0;
  20537. }
  20538. // Normalize signs
  20539. if (a1.negative) {
  20540. a1 = a1.neg();
  20541. b1 = b1.neg();
  20542. }
  20543. if (a2.negative) {
  20544. a2 = a2.neg();
  20545. b2 = b2.neg();
  20546. }
  20547. return [
  20548. { a: a1, b: b1 },
  20549. { a: a2, b: b2 },
  20550. ];
  20551. };
  20552. ShortCurve.prototype._endoSplit = function _endoSplit(k) {
  20553. var basis = this.endo.basis;
  20554. var v1 = basis[0];
  20555. var v2 = basis[1];
  20556. var c1 = v2.b.mul(k).divRound(this.n);
  20557. var c2 = v1.b.neg().mul(k).divRound(this.n);
  20558. var p1 = c1.mul(v1.a);
  20559. var p2 = c2.mul(v2.a);
  20560. var q1 = c1.mul(v1.b);
  20561. var q2 = c2.mul(v2.b);
  20562. // Calculate answer
  20563. var k1 = k.sub(p1).sub(p2);
  20564. var k2 = q1.add(q2).neg();
  20565. return { k1: k1, k2: k2 };
  20566. };
  20567. ShortCurve.prototype.pointFromX = function pointFromX(x, odd) {
  20568. x = new BN(x, 16);
  20569. if (!x.red)
  20570. x = x.toRed(this.red);
  20571. var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);
  20572. var y = y2.redSqrt();
  20573. if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)
  20574. throw new Error('invalid point');
  20575. // XXX Is there any way to tell if the number is odd without converting it
  20576. // to non-red form?
  20577. var isOdd = y.fromRed().isOdd();
  20578. if (odd && !isOdd || !odd && isOdd)
  20579. y = y.redNeg();
  20580. return this.point(x, y);
  20581. };
  20582. ShortCurve.prototype.validate = function validate(point) {
  20583. if (point.inf)
  20584. return true;
  20585. var x = point.x;
  20586. var y = point.y;
  20587. var ax = this.a.redMul(x);
  20588. var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);
  20589. return y.redSqr().redISub(rhs).cmpn(0) === 0;
  20590. };
  20591. ShortCurve.prototype._endoWnafMulAdd =
  20592. function _endoWnafMulAdd(points, coeffs, jacobianResult) {
  20593. var npoints = this._endoWnafT1;
  20594. var ncoeffs = this._endoWnafT2;
  20595. for (var i = 0; i < points.length; i++) {
  20596. var split = this._endoSplit(coeffs[i]);
  20597. var p = points[i];
  20598. var beta = p._getBeta();
  20599. if (split.k1.negative) {
  20600. split.k1.ineg();
  20601. p = p.neg(true);
  20602. }
  20603. if (split.k2.negative) {
  20604. split.k2.ineg();
  20605. beta = beta.neg(true);
  20606. }
  20607. npoints[i * 2] = p;
  20608. npoints[i * 2 + 1] = beta;
  20609. ncoeffs[i * 2] = split.k1;
  20610. ncoeffs[i * 2 + 1] = split.k2;
  20611. }
  20612. var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);
  20613. // Clean-up references to points and coefficients
  20614. for (var j = 0; j < i * 2; j++) {
  20615. npoints[j] = null;
  20616. ncoeffs[j] = null;
  20617. }
  20618. return res;
  20619. };
  20620. function Point(curve, x, y, isRed) {
  20621. Base.BasePoint.call(this, curve, 'affine');
  20622. if (x === null && y === null) {
  20623. this.x = null;
  20624. this.y = null;
  20625. this.inf = true;
  20626. } else {
  20627. this.x = new BN(x, 16);
  20628. this.y = new BN(y, 16);
  20629. // Force redgomery representation when loading from JSON
  20630. if (isRed) {
  20631. this.x.forceRed(this.curve.red);
  20632. this.y.forceRed(this.curve.red);
  20633. }
  20634. if (!this.x.red)
  20635. this.x = this.x.toRed(this.curve.red);
  20636. if (!this.y.red)
  20637. this.y = this.y.toRed(this.curve.red);
  20638. this.inf = false;
  20639. }
  20640. }
  20641. inherits(Point, Base.BasePoint);
  20642. ShortCurve.prototype.point = function point(x, y, isRed) {
  20643. return new Point(this, x, y, isRed);
  20644. };
  20645. ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {
  20646. return Point.fromJSON(this, obj, red);
  20647. };
  20648. Point.prototype._getBeta = function _getBeta() {
  20649. if (!this.curve.endo)
  20650. return;
  20651. var pre = this.precomputed;
  20652. if (pre && pre.beta)
  20653. return pre.beta;
  20654. var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);
  20655. if (pre) {
  20656. var curve = this.curve;
  20657. var endoMul = function(p) {
  20658. return curve.point(p.x.redMul(curve.endo.beta), p.y);
  20659. };
  20660. pre.beta = beta;
  20661. beta.precomputed = {
  20662. beta: null,
  20663. naf: pre.naf && {
  20664. wnd: pre.naf.wnd,
  20665. points: pre.naf.points.map(endoMul),
  20666. },
  20667. doubles: pre.doubles && {
  20668. step: pre.doubles.step,
  20669. points: pre.doubles.points.map(endoMul),
  20670. },
  20671. };
  20672. }
  20673. return beta;
  20674. };
  20675. Point.prototype.toJSON = function toJSON() {
  20676. if (!this.precomputed)
  20677. return [ this.x, this.y ];
  20678. return [ this.x, this.y, this.precomputed && {
  20679. doubles: this.precomputed.doubles && {
  20680. step: this.precomputed.doubles.step,
  20681. points: this.precomputed.doubles.points.slice(1),
  20682. },
  20683. naf: this.precomputed.naf && {
  20684. wnd: this.precomputed.naf.wnd,
  20685. points: this.precomputed.naf.points.slice(1),
  20686. },
  20687. } ];
  20688. };
  20689. Point.fromJSON = function fromJSON(curve, obj, red) {
  20690. if (typeof obj === 'string')
  20691. obj = JSON.parse(obj);
  20692. var res = curve.point(obj[0], obj[1], red);
  20693. if (!obj[2])
  20694. return res;
  20695. function obj2point(obj) {
  20696. return curve.point(obj[0], obj[1], red);
  20697. }
  20698. var pre = obj[2];
  20699. res.precomputed = {
  20700. beta: null,
  20701. doubles: pre.doubles && {
  20702. step: pre.doubles.step,
  20703. points: [ res ].concat(pre.doubles.points.map(obj2point)),
  20704. },
  20705. naf: pre.naf && {
  20706. wnd: pre.naf.wnd,
  20707. points: [ res ].concat(pre.naf.points.map(obj2point)),
  20708. },
  20709. };
  20710. return res;
  20711. };
  20712. Point.prototype.inspect = function inspect() {
  20713. if (this.isInfinity())
  20714. return '<EC Point Infinity>';
  20715. return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
  20716. ' y: ' + this.y.fromRed().toString(16, 2) + '>';
  20717. };
  20718. Point.prototype.isInfinity = function isInfinity() {
  20719. return this.inf;
  20720. };
  20721. Point.prototype.add = function add(p) {
  20722. // O + P = P
  20723. if (this.inf)
  20724. return p;
  20725. // P + O = P
  20726. if (p.inf)
  20727. return this;
  20728. // P + P = 2P
  20729. if (this.eq(p))
  20730. return this.dbl();
  20731. // P + (-P) = O
  20732. if (this.neg().eq(p))
  20733. return this.curve.point(null, null);
  20734. // P + Q = O
  20735. if (this.x.cmp(p.x) === 0)
  20736. return this.curve.point(null, null);
  20737. var c = this.y.redSub(p.y);
  20738. if (c.cmpn(0) !== 0)
  20739. c = c.redMul(this.x.redSub(p.x).redInvm());
  20740. var nx = c.redSqr().redISub(this.x).redISub(p.x);
  20741. var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);
  20742. return this.curve.point(nx, ny);
  20743. };
  20744. Point.prototype.dbl = function dbl() {
  20745. if (this.inf)
  20746. return this;
  20747. // 2P = O
  20748. var ys1 = this.y.redAdd(this.y);
  20749. if (ys1.cmpn(0) === 0)
  20750. return this.curve.point(null, null);
  20751. var a = this.curve.a;
  20752. var x2 = this.x.redSqr();
  20753. var dyinv = ys1.redInvm();
  20754. var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);
  20755. var nx = c.redSqr().redISub(this.x.redAdd(this.x));
  20756. var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);
  20757. return this.curve.point(nx, ny);
  20758. };
  20759. Point.prototype.getX = function getX() {
  20760. return this.x.fromRed();
  20761. };
  20762. Point.prototype.getY = function getY() {
  20763. return this.y.fromRed();
  20764. };
  20765. Point.prototype.mul = function mul(k) {
  20766. k = new BN(k, 16);
  20767. if (this.isInfinity())
  20768. return this;
  20769. else if (this._hasDoubles(k))
  20770. return this.curve._fixedNafMul(this, k);
  20771. else if (this.curve.endo)
  20772. return this.curve._endoWnafMulAdd([ this ], [ k ]);
  20773. else
  20774. return this.curve._wnafMul(this, k);
  20775. };
  20776. Point.prototype.mulAdd = function mulAdd(k1, p2, k2) {
  20777. var points = [ this, p2 ];
  20778. var coeffs = [ k1, k2 ];
  20779. if (this.curve.endo)
  20780. return this.curve._endoWnafMulAdd(points, coeffs);
  20781. else
  20782. return this.curve._wnafMulAdd(1, points, coeffs, 2);
  20783. };
  20784. Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {
  20785. var points = [ this, p2 ];
  20786. var coeffs = [ k1, k2 ];
  20787. if (this.curve.endo)
  20788. return this.curve._endoWnafMulAdd(points, coeffs, true);
  20789. else
  20790. return this.curve._wnafMulAdd(1, points, coeffs, 2, true);
  20791. };
  20792. Point.prototype.eq = function eq(p) {
  20793. return this === p ||
  20794. this.inf === p.inf &&
  20795. (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);
  20796. };
  20797. Point.prototype.neg = function neg(_precompute) {
  20798. if (this.inf)
  20799. return this;
  20800. var res = this.curve.point(this.x, this.y.redNeg());
  20801. if (_precompute && this.precomputed) {
  20802. var pre = this.precomputed;
  20803. var negate = function(p) {
  20804. return p.neg();
  20805. };
  20806. res.precomputed = {
  20807. naf: pre.naf && {
  20808. wnd: pre.naf.wnd,
  20809. points: pre.naf.points.map(negate),
  20810. },
  20811. doubles: pre.doubles && {
  20812. step: pre.doubles.step,
  20813. points: pre.doubles.points.map(negate),
  20814. },
  20815. };
  20816. }
  20817. return res;
  20818. };
  20819. Point.prototype.toJ = function toJ() {
  20820. if (this.inf)
  20821. return this.curve.jpoint(null, null, null);
  20822. var res = this.curve.jpoint(this.x, this.y, this.curve.one);
  20823. return res;
  20824. };
  20825. function JPoint(curve, x, y, z) {
  20826. Base.BasePoint.call(this, curve, 'jacobian');
  20827. if (x === null && y === null && z === null) {
  20828. this.x = this.curve.one;
  20829. this.y = this.curve.one;
  20830. this.z = new BN(0);
  20831. } else {
  20832. this.x = new BN(x, 16);
  20833. this.y = new BN(y, 16);
  20834. this.z = new BN(z, 16);
  20835. }
  20836. if (!this.x.red)
  20837. this.x = this.x.toRed(this.curve.red);
  20838. if (!this.y.red)
  20839. this.y = this.y.toRed(this.curve.red);
  20840. if (!this.z.red)
  20841. this.z = this.z.toRed(this.curve.red);
  20842. this.zOne = this.z === this.curve.one;
  20843. }
  20844. inherits(JPoint, Base.BasePoint);
  20845. ShortCurve.prototype.jpoint = function jpoint(x, y, z) {
  20846. return new JPoint(this, x, y, z);
  20847. };
  20848. JPoint.prototype.toP = function toP() {
  20849. if (this.isInfinity())
  20850. return this.curve.point(null, null);
  20851. var zinv = this.z.redInvm();
  20852. var zinv2 = zinv.redSqr();
  20853. var ax = this.x.redMul(zinv2);
  20854. var ay = this.y.redMul(zinv2).redMul(zinv);
  20855. return this.curve.point(ax, ay);
  20856. };
  20857. JPoint.prototype.neg = function neg() {
  20858. return this.curve.jpoint(this.x, this.y.redNeg(), this.z);
  20859. };
  20860. JPoint.prototype.add = function add(p) {
  20861. // O + P = P
  20862. if (this.isInfinity())
  20863. return p;
  20864. // P + O = P
  20865. if (p.isInfinity())
  20866. return this;
  20867. // 12M + 4S + 7A
  20868. var pz2 = p.z.redSqr();
  20869. var z2 = this.z.redSqr();
  20870. var u1 = this.x.redMul(pz2);
  20871. var u2 = p.x.redMul(z2);
  20872. var s1 = this.y.redMul(pz2.redMul(p.z));
  20873. var s2 = p.y.redMul(z2.redMul(this.z));
  20874. var h = u1.redSub(u2);
  20875. var r = s1.redSub(s2);
  20876. if (h.cmpn(0) === 0) {
  20877. if (r.cmpn(0) !== 0)
  20878. return this.curve.jpoint(null, null, null);
  20879. else
  20880. return this.dbl();
  20881. }
  20882. var h2 = h.redSqr();
  20883. var h3 = h2.redMul(h);
  20884. var v = u1.redMul(h2);
  20885. var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);
  20886. var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));
  20887. var nz = this.z.redMul(p.z).redMul(h);
  20888. return this.curve.jpoint(nx, ny, nz);
  20889. };
  20890. JPoint.prototype.mixedAdd = function mixedAdd(p) {
  20891. // O + P = P
  20892. if (this.isInfinity())
  20893. return p.toJ();
  20894. // P + O = P
  20895. if (p.isInfinity())
  20896. return this;
  20897. // 8M + 3S + 7A
  20898. var z2 = this.z.redSqr();
  20899. var u1 = this.x;
  20900. var u2 = p.x.redMul(z2);
  20901. var s1 = this.y;
  20902. var s2 = p.y.redMul(z2).redMul(this.z);
  20903. var h = u1.redSub(u2);
  20904. var r = s1.redSub(s2);
  20905. if (h.cmpn(0) === 0) {
  20906. if (r.cmpn(0) !== 0)
  20907. return this.curve.jpoint(null, null, null);
  20908. else
  20909. return this.dbl();
  20910. }
  20911. var h2 = h.redSqr();
  20912. var h3 = h2.redMul(h);
  20913. var v = u1.redMul(h2);
  20914. var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);
  20915. var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));
  20916. var nz = this.z.redMul(h);
  20917. return this.curve.jpoint(nx, ny, nz);
  20918. };
  20919. JPoint.prototype.dblp = function dblp(pow) {
  20920. if (pow === 0)
  20921. return this;
  20922. if (this.isInfinity())
  20923. return this;
  20924. if (!pow)
  20925. return this.dbl();
  20926. var i;
  20927. if (this.curve.zeroA || this.curve.threeA) {
  20928. var r = this;
  20929. for (i = 0; i < pow; i++)
  20930. r = r.dbl();
  20931. return r;
  20932. }
  20933. // 1M + 2S + 1A + N * (4S + 5M + 8A)
  20934. // N = 1 => 6M + 6S + 9A
  20935. var a = this.curve.a;
  20936. var tinv = this.curve.tinv;
  20937. var jx = this.x;
  20938. var jy = this.y;
  20939. var jz = this.z;
  20940. var jz4 = jz.redSqr().redSqr();
  20941. // Reuse results
  20942. var jyd = jy.redAdd(jy);
  20943. for (i = 0; i < pow; i++) {
  20944. var jx2 = jx.redSqr();
  20945. var jyd2 = jyd.redSqr();
  20946. var jyd4 = jyd2.redSqr();
  20947. var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));
  20948. var t1 = jx.redMul(jyd2);
  20949. var nx = c.redSqr().redISub(t1.redAdd(t1));
  20950. var t2 = t1.redISub(nx);
  20951. var dny = c.redMul(t2);
  20952. dny = dny.redIAdd(dny).redISub(jyd4);
  20953. var nz = jyd.redMul(jz);
  20954. if (i + 1 < pow)
  20955. jz4 = jz4.redMul(jyd4);
  20956. jx = nx;
  20957. jz = nz;
  20958. jyd = dny;
  20959. }
  20960. return this.curve.jpoint(jx, jyd.redMul(tinv), jz);
  20961. };
  20962. JPoint.prototype.dbl = function dbl() {
  20963. if (this.isInfinity())
  20964. return this;
  20965. if (this.curve.zeroA)
  20966. return this._zeroDbl();
  20967. else if (this.curve.threeA)
  20968. return this._threeDbl();
  20969. else
  20970. return this._dbl();
  20971. };
  20972. JPoint.prototype._zeroDbl = function _zeroDbl() {
  20973. var nx;
  20974. var ny;
  20975. var nz;
  20976. // Z = 1
  20977. if (this.zOne) {
  20978. // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html
  20979. // #doubling-mdbl-2007-bl
  20980. // 1M + 5S + 14A
  20981. // XX = X1^2
  20982. var xx = this.x.redSqr();
  20983. // YY = Y1^2
  20984. var yy = this.y.redSqr();
  20985. // YYYY = YY^2
  20986. var yyyy = yy.redSqr();
  20987. // S = 2 * ((X1 + YY)^2 - XX - YYYY)
  20988. var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
  20989. s = s.redIAdd(s);
  20990. // M = 3 * XX + a; a = 0
  20991. var m = xx.redAdd(xx).redIAdd(xx);
  20992. // T = M ^ 2 - 2*S
  20993. var t = m.redSqr().redISub(s).redISub(s);
  20994. // 8 * YYYY
  20995. var yyyy8 = yyyy.redIAdd(yyyy);
  20996. yyyy8 = yyyy8.redIAdd(yyyy8);
  20997. yyyy8 = yyyy8.redIAdd(yyyy8);
  20998. // X3 = T
  20999. nx = t;
  21000. // Y3 = M * (S - T) - 8 * YYYY
  21001. ny = m.redMul(s.redISub(t)).redISub(yyyy8);
  21002. // Z3 = 2*Y1
  21003. nz = this.y.redAdd(this.y);
  21004. } else {
  21005. // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html
  21006. // #doubling-dbl-2009-l
  21007. // 2M + 5S + 13A
  21008. // A = X1^2
  21009. var a = this.x.redSqr();
  21010. // B = Y1^2
  21011. var b = this.y.redSqr();
  21012. // C = B^2
  21013. var c = b.redSqr();
  21014. // D = 2 * ((X1 + B)^2 - A - C)
  21015. var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);
  21016. d = d.redIAdd(d);
  21017. // E = 3 * A
  21018. var e = a.redAdd(a).redIAdd(a);
  21019. // F = E^2
  21020. var f = e.redSqr();
  21021. // 8 * C
  21022. var c8 = c.redIAdd(c);
  21023. c8 = c8.redIAdd(c8);
  21024. c8 = c8.redIAdd(c8);
  21025. // X3 = F - 2 * D
  21026. nx = f.redISub(d).redISub(d);
  21027. // Y3 = E * (D - X3) - 8 * C
  21028. ny = e.redMul(d.redISub(nx)).redISub(c8);
  21029. // Z3 = 2 * Y1 * Z1
  21030. nz = this.y.redMul(this.z);
  21031. nz = nz.redIAdd(nz);
  21032. }
  21033. return this.curve.jpoint(nx, ny, nz);
  21034. };
  21035. JPoint.prototype._threeDbl = function _threeDbl() {
  21036. var nx;
  21037. var ny;
  21038. var nz;
  21039. // Z = 1
  21040. if (this.zOne) {
  21041. // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html
  21042. // #doubling-mdbl-2007-bl
  21043. // 1M + 5S + 15A
  21044. // XX = X1^2
  21045. var xx = this.x.redSqr();
  21046. // YY = Y1^2
  21047. var yy = this.y.redSqr();
  21048. // YYYY = YY^2
  21049. var yyyy = yy.redSqr();
  21050. // S = 2 * ((X1 + YY)^2 - XX - YYYY)
  21051. var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
  21052. s = s.redIAdd(s);
  21053. // M = 3 * XX + a
  21054. var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);
  21055. // T = M^2 - 2 * S
  21056. var t = m.redSqr().redISub(s).redISub(s);
  21057. // X3 = T
  21058. nx = t;
  21059. // Y3 = M * (S - T) - 8 * YYYY
  21060. var yyyy8 = yyyy.redIAdd(yyyy);
  21061. yyyy8 = yyyy8.redIAdd(yyyy8);
  21062. yyyy8 = yyyy8.redIAdd(yyyy8);
  21063. ny = m.redMul(s.redISub(t)).redISub(yyyy8);
  21064. // Z3 = 2 * Y1
  21065. nz = this.y.redAdd(this.y);
  21066. } else {
  21067. // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b
  21068. // 3M + 5S
  21069. // delta = Z1^2
  21070. var delta = this.z.redSqr();
  21071. // gamma = Y1^2
  21072. var gamma = this.y.redSqr();
  21073. // beta = X1 * gamma
  21074. var beta = this.x.redMul(gamma);
  21075. // alpha = 3 * (X1 - delta) * (X1 + delta)
  21076. var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));
  21077. alpha = alpha.redAdd(alpha).redIAdd(alpha);
  21078. // X3 = alpha^2 - 8 * beta
  21079. var beta4 = beta.redIAdd(beta);
  21080. beta4 = beta4.redIAdd(beta4);
  21081. var beta8 = beta4.redAdd(beta4);
  21082. nx = alpha.redSqr().redISub(beta8);
  21083. // Z3 = (Y1 + Z1)^2 - gamma - delta
  21084. nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);
  21085. // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2
  21086. var ggamma8 = gamma.redSqr();
  21087. ggamma8 = ggamma8.redIAdd(ggamma8);
  21088. ggamma8 = ggamma8.redIAdd(ggamma8);
  21089. ggamma8 = ggamma8.redIAdd(ggamma8);
  21090. ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);
  21091. }
  21092. return this.curve.jpoint(nx, ny, nz);
  21093. };
  21094. JPoint.prototype._dbl = function _dbl() {
  21095. var a = this.curve.a;
  21096. // 4M + 6S + 10A
  21097. var jx = this.x;
  21098. var jy = this.y;
  21099. var jz = this.z;
  21100. var jz4 = jz.redSqr().redSqr();
  21101. var jx2 = jx.redSqr();
  21102. var jy2 = jy.redSqr();
  21103. var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));
  21104. var jxd4 = jx.redAdd(jx);
  21105. jxd4 = jxd4.redIAdd(jxd4);
  21106. var t1 = jxd4.redMul(jy2);
  21107. var nx = c.redSqr().redISub(t1.redAdd(t1));
  21108. var t2 = t1.redISub(nx);
  21109. var jyd8 = jy2.redSqr();
  21110. jyd8 = jyd8.redIAdd(jyd8);
  21111. jyd8 = jyd8.redIAdd(jyd8);
  21112. jyd8 = jyd8.redIAdd(jyd8);
  21113. var ny = c.redMul(t2).redISub(jyd8);
  21114. var nz = jy.redAdd(jy).redMul(jz);
  21115. return this.curve.jpoint(nx, ny, nz);
  21116. };
  21117. JPoint.prototype.trpl = function trpl() {
  21118. if (!this.curve.zeroA)
  21119. return this.dbl().add(this);
  21120. // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl
  21121. // 5M + 10S + ...
  21122. // XX = X1^2
  21123. var xx = this.x.redSqr();
  21124. // YY = Y1^2
  21125. var yy = this.y.redSqr();
  21126. // ZZ = Z1^2
  21127. var zz = this.z.redSqr();
  21128. // YYYY = YY^2
  21129. var yyyy = yy.redSqr();
  21130. // M = 3 * XX + a * ZZ2; a = 0
  21131. var m = xx.redAdd(xx).redIAdd(xx);
  21132. // MM = M^2
  21133. var mm = m.redSqr();
  21134. // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM
  21135. var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
  21136. e = e.redIAdd(e);
  21137. e = e.redAdd(e).redIAdd(e);
  21138. e = e.redISub(mm);
  21139. // EE = E^2
  21140. var ee = e.redSqr();
  21141. // T = 16*YYYY
  21142. var t = yyyy.redIAdd(yyyy);
  21143. t = t.redIAdd(t);
  21144. t = t.redIAdd(t);
  21145. t = t.redIAdd(t);
  21146. // U = (M + E)^2 - MM - EE - T
  21147. var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);
  21148. // X3 = 4 * (X1 * EE - 4 * YY * U)
  21149. var yyu4 = yy.redMul(u);
  21150. yyu4 = yyu4.redIAdd(yyu4);
  21151. yyu4 = yyu4.redIAdd(yyu4);
  21152. var nx = this.x.redMul(ee).redISub(yyu4);
  21153. nx = nx.redIAdd(nx);
  21154. nx = nx.redIAdd(nx);
  21155. // Y3 = 8 * Y1 * (U * (T - U) - E * EE)
  21156. var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));
  21157. ny = ny.redIAdd(ny);
  21158. ny = ny.redIAdd(ny);
  21159. ny = ny.redIAdd(ny);
  21160. // Z3 = (Z1 + E)^2 - ZZ - EE
  21161. var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);
  21162. return this.curve.jpoint(nx, ny, nz);
  21163. };
  21164. JPoint.prototype.mul = function mul(k, kbase) {
  21165. k = new BN(k, kbase);
  21166. return this.curve._wnafMul(this, k);
  21167. };
  21168. JPoint.prototype.eq = function eq(p) {
  21169. if (p.type === 'affine')
  21170. return this.eq(p.toJ());
  21171. if (this === p)
  21172. return true;
  21173. // x1 * z2^2 == x2 * z1^2
  21174. var z2 = this.z.redSqr();
  21175. var pz2 = p.z.redSqr();
  21176. if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)
  21177. return false;
  21178. // y1 * z2^3 == y2 * z1^3
  21179. var z3 = z2.redMul(this.z);
  21180. var pz3 = pz2.redMul(p.z);
  21181. return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;
  21182. };
  21183. JPoint.prototype.eqXToP = function eqXToP(x) {
  21184. var zs = this.z.redSqr();
  21185. var rx = x.toRed(this.curve.red).redMul(zs);
  21186. if (this.x.cmp(rx) === 0)
  21187. return true;
  21188. var xc = x.clone();
  21189. var t = this.curve.redN.redMul(zs);
  21190. for (;;) {
  21191. xc.iadd(this.curve.n);
  21192. if (xc.cmp(this.curve.p) >= 0)
  21193. return false;
  21194. rx.redIAdd(t);
  21195. if (this.x.cmp(rx) === 0)
  21196. return true;
  21197. }
  21198. };
  21199. JPoint.prototype.inspect = function inspect() {
  21200. if (this.isInfinity())
  21201. return '<EC JPoint Infinity>';
  21202. return '<EC JPoint x: ' + this.x.toString(16, 2) +
  21203. ' y: ' + this.y.toString(16, 2) +
  21204. ' z: ' + this.z.toString(16, 2) + '>';
  21205. };
  21206. JPoint.prototype.isInfinity = function isInfinity() {
  21207. // XXX This code assumes that zero is always zero in red
  21208. return this.z.cmpn(0) === 0;
  21209. };
  21210. /***/ }),
  21211. /***/ 18:
  21212. /*!******************************************************************!*\
  21213. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  21214. \******************************************************************/
  21215. /*! no static exports found */
  21216. /***/ (function(module, exports, __webpack_require__) {
  21217. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  21218. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  21219. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  21220. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  21221. function _toConsumableArray(arr) {
  21222. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  21223. }
  21224. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  21225. /***/ }),
  21226. /***/ 180:
  21227. /*!**********************************************************!*\
  21228. !*** ./node_modules/elliptic/lib/elliptic/curve/mont.js ***!
  21229. \**********************************************************/
  21230. /*! no static exports found */
  21231. /***/ (function(module, exports, __webpack_require__) {
  21232. "use strict";
  21233. var BN = __webpack_require__(/*! bn.js */ 162);
  21234. var inherits = __webpack_require__(/*! inherits */ 86);
  21235. var Base = __webpack_require__(/*! ./base */ 178);
  21236. var utils = __webpack_require__(/*! ../utils */ 175);
  21237. function MontCurve(conf) {
  21238. Base.call(this, 'mont', conf);
  21239. this.a = new BN(conf.a, 16).toRed(this.red);
  21240. this.b = new BN(conf.b, 16).toRed(this.red);
  21241. this.i4 = new BN(4).toRed(this.red).redInvm();
  21242. this.two = new BN(2).toRed(this.red);
  21243. this.a24 = this.i4.redMul(this.a.redAdd(this.two));
  21244. }
  21245. inherits(MontCurve, Base);
  21246. module.exports = MontCurve;
  21247. MontCurve.prototype.validate = function validate(point) {
  21248. var x = point.normalize().x;
  21249. var x2 = x.redSqr();
  21250. var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);
  21251. var y = rhs.redSqrt();
  21252. return y.redSqr().cmp(rhs) === 0;
  21253. };
  21254. function Point(curve, x, z) {
  21255. Base.BasePoint.call(this, curve, 'projective');
  21256. if (x === null && z === null) {
  21257. this.x = this.curve.one;
  21258. this.z = this.curve.zero;
  21259. } else {
  21260. this.x = new BN(x, 16);
  21261. this.z = new BN(z, 16);
  21262. if (!this.x.red)
  21263. this.x = this.x.toRed(this.curve.red);
  21264. if (!this.z.red)
  21265. this.z = this.z.toRed(this.curve.red);
  21266. }
  21267. }
  21268. inherits(Point, Base.BasePoint);
  21269. MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
  21270. return this.point(utils.toArray(bytes, enc), 1);
  21271. };
  21272. MontCurve.prototype.point = function point(x, z) {
  21273. return new Point(this, x, z);
  21274. };
  21275. MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {
  21276. return Point.fromJSON(this, obj);
  21277. };
  21278. Point.prototype.precompute = function precompute() {
  21279. // No-op
  21280. };
  21281. Point.prototype._encode = function _encode() {
  21282. return this.getX().toArray('be', this.curve.p.byteLength());
  21283. };
  21284. Point.fromJSON = function fromJSON(curve, obj) {
  21285. return new Point(curve, obj[0], obj[1] || curve.one);
  21286. };
  21287. Point.prototype.inspect = function inspect() {
  21288. if (this.isInfinity())
  21289. return '<EC Point Infinity>';
  21290. return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
  21291. ' z: ' + this.z.fromRed().toString(16, 2) + '>';
  21292. };
  21293. Point.prototype.isInfinity = function isInfinity() {
  21294. // XXX This code assumes that zero is always zero in red
  21295. return this.z.cmpn(0) === 0;
  21296. };
  21297. Point.prototype.dbl = function dbl() {
  21298. // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3
  21299. // 2M + 2S + 4A
  21300. // A = X1 + Z1
  21301. var a = this.x.redAdd(this.z);
  21302. // AA = A^2
  21303. var aa = a.redSqr();
  21304. // B = X1 - Z1
  21305. var b = this.x.redSub(this.z);
  21306. // BB = B^2
  21307. var bb = b.redSqr();
  21308. // C = AA - BB
  21309. var c = aa.redSub(bb);
  21310. // X3 = AA * BB
  21311. var nx = aa.redMul(bb);
  21312. // Z3 = C * (BB + A24 * C)
  21313. var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c)));
  21314. return this.curve.point(nx, nz);
  21315. };
  21316. Point.prototype.add = function add() {
  21317. throw new Error('Not supported on Montgomery curve');
  21318. };
  21319. Point.prototype.diffAdd = function diffAdd(p, diff) {
  21320. // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3
  21321. // 4M + 2S + 6A
  21322. // A = X2 + Z2
  21323. var a = this.x.redAdd(this.z);
  21324. // B = X2 - Z2
  21325. var b = this.x.redSub(this.z);
  21326. // C = X3 + Z3
  21327. var c = p.x.redAdd(p.z);
  21328. // D = X3 - Z3
  21329. var d = p.x.redSub(p.z);
  21330. // DA = D * A
  21331. var da = d.redMul(a);
  21332. // CB = C * B
  21333. var cb = c.redMul(b);
  21334. // X5 = Z1 * (DA + CB)^2
  21335. var nx = diff.z.redMul(da.redAdd(cb).redSqr());
  21336. // Z5 = X1 * (DA - CB)^2
  21337. var nz = diff.x.redMul(da.redISub(cb).redSqr());
  21338. return this.curve.point(nx, nz);
  21339. };
  21340. Point.prototype.mul = function mul(k) {
  21341. var t = k.clone();
  21342. var a = this; // (N / 2) * Q + Q
  21343. var b = this.curve.point(null, null); // (N / 2) * Q
  21344. var c = this; // Q
  21345. for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1))
  21346. bits.push(t.andln(1));
  21347. for (var i = bits.length - 1; i >= 0; i--) {
  21348. if (bits[i] === 0) {
  21349. // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q
  21350. a = a.diffAdd(b, c);
  21351. // N * Q = 2 * ((N / 2) * Q + Q))
  21352. b = b.dbl();
  21353. } else {
  21354. // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q)
  21355. b = a.diffAdd(b, c);
  21356. // N * Q + Q = 2 * ((N / 2) * Q + Q)
  21357. a = a.dbl();
  21358. }
  21359. }
  21360. return b;
  21361. };
  21362. Point.prototype.mulAdd = function mulAdd() {
  21363. throw new Error('Not supported on Montgomery curve');
  21364. };
  21365. Point.prototype.jumlAdd = function jumlAdd() {
  21366. throw new Error('Not supported on Montgomery curve');
  21367. };
  21368. Point.prototype.eq = function eq(other) {
  21369. return this.getX().cmp(other.getX()) === 0;
  21370. };
  21371. Point.prototype.normalize = function normalize() {
  21372. this.x = this.x.redMul(this.z.redInvm());
  21373. this.z = this.curve.one;
  21374. return this;
  21375. };
  21376. Point.prototype.getX = function getX() {
  21377. // Normalize coordinates
  21378. this.normalize();
  21379. return this.x.fromRed();
  21380. };
  21381. /***/ }),
  21382. /***/ 181:
  21383. /*!*************************************************************!*\
  21384. !*** ./node_modules/elliptic/lib/elliptic/curve/edwards.js ***!
  21385. \*************************************************************/
  21386. /*! no static exports found */
  21387. /***/ (function(module, exports, __webpack_require__) {
  21388. "use strict";
  21389. var utils = __webpack_require__(/*! ../utils */ 175);
  21390. var BN = __webpack_require__(/*! bn.js */ 162);
  21391. var inherits = __webpack_require__(/*! inherits */ 86);
  21392. var Base = __webpack_require__(/*! ./base */ 178);
  21393. var assert = utils.assert;
  21394. function EdwardsCurve(conf) {
  21395. // NOTE: Important as we are creating point in Base.call()
  21396. this.twisted = (conf.a | 0) !== 1;
  21397. this.mOneA = this.twisted && (conf.a | 0) === -1;
  21398. this.extended = this.mOneA;
  21399. Base.call(this, 'edwards', conf);
  21400. this.a = new BN(conf.a, 16).umod(this.red.m);
  21401. this.a = this.a.toRed(this.red);
  21402. this.c = new BN(conf.c, 16).toRed(this.red);
  21403. this.c2 = this.c.redSqr();
  21404. this.d = new BN(conf.d, 16).toRed(this.red);
  21405. this.dd = this.d.redAdd(this.d);
  21406. assert(!this.twisted || this.c.fromRed().cmpn(1) === 0);
  21407. this.oneC = (conf.c | 0) === 1;
  21408. }
  21409. inherits(EdwardsCurve, Base);
  21410. module.exports = EdwardsCurve;
  21411. EdwardsCurve.prototype._mulA = function _mulA(num) {
  21412. if (this.mOneA)
  21413. return num.redNeg();
  21414. else
  21415. return this.a.redMul(num);
  21416. };
  21417. EdwardsCurve.prototype._mulC = function _mulC(num) {
  21418. if (this.oneC)
  21419. return num;
  21420. else
  21421. return this.c.redMul(num);
  21422. };
  21423. // Just for compatibility with Short curve
  21424. EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) {
  21425. return this.point(x, y, z, t);
  21426. };
  21427. EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) {
  21428. x = new BN(x, 16);
  21429. if (!x.red)
  21430. x = x.toRed(this.red);
  21431. var x2 = x.redSqr();
  21432. var rhs = this.c2.redSub(this.a.redMul(x2));
  21433. var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2));
  21434. var y2 = rhs.redMul(lhs.redInvm());
  21435. var y = y2.redSqrt();
  21436. if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)
  21437. throw new Error('invalid point');
  21438. var isOdd = y.fromRed().isOdd();
  21439. if (odd && !isOdd || !odd && isOdd)
  21440. y = y.redNeg();
  21441. return this.point(x, y);
  21442. };
  21443. EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) {
  21444. y = new BN(y, 16);
  21445. if (!y.red)
  21446. y = y.toRed(this.red);
  21447. // x^2 = (y^2 - c^2) / (c^2 d y^2 - a)
  21448. var y2 = y.redSqr();
  21449. var lhs = y2.redSub(this.c2);
  21450. var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a);
  21451. var x2 = lhs.redMul(rhs.redInvm());
  21452. if (x2.cmp(this.zero) === 0) {
  21453. if (odd)
  21454. throw new Error('invalid point');
  21455. else
  21456. return this.point(this.zero, y);
  21457. }
  21458. var x = x2.redSqrt();
  21459. if (x.redSqr().redSub(x2).cmp(this.zero) !== 0)
  21460. throw new Error('invalid point');
  21461. if (x.fromRed().isOdd() !== odd)
  21462. x = x.redNeg();
  21463. return this.point(x, y);
  21464. };
  21465. EdwardsCurve.prototype.validate = function validate(point) {
  21466. if (point.isInfinity())
  21467. return true;
  21468. // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2)
  21469. point.normalize();
  21470. var x2 = point.x.redSqr();
  21471. var y2 = point.y.redSqr();
  21472. var lhs = x2.redMul(this.a).redAdd(y2);
  21473. var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2)));
  21474. return lhs.cmp(rhs) === 0;
  21475. };
  21476. function Point(curve, x, y, z, t) {
  21477. Base.BasePoint.call(this, curve, 'projective');
  21478. if (x === null && y === null && z === null) {
  21479. this.x = this.curve.zero;
  21480. this.y = this.curve.one;
  21481. this.z = this.curve.one;
  21482. this.t = this.curve.zero;
  21483. this.zOne = true;
  21484. } else {
  21485. this.x = new BN(x, 16);
  21486. this.y = new BN(y, 16);
  21487. this.z = z ? new BN(z, 16) : this.curve.one;
  21488. this.t = t && new BN(t, 16);
  21489. if (!this.x.red)
  21490. this.x = this.x.toRed(this.curve.red);
  21491. if (!this.y.red)
  21492. this.y = this.y.toRed(this.curve.red);
  21493. if (!this.z.red)
  21494. this.z = this.z.toRed(this.curve.red);
  21495. if (this.t && !this.t.red)
  21496. this.t = this.t.toRed(this.curve.red);
  21497. this.zOne = this.z === this.curve.one;
  21498. // Use extended coordinates
  21499. if (this.curve.extended && !this.t) {
  21500. this.t = this.x.redMul(this.y);
  21501. if (!this.zOne)
  21502. this.t = this.t.redMul(this.z.redInvm());
  21503. }
  21504. }
  21505. }
  21506. inherits(Point, Base.BasePoint);
  21507. EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {
  21508. return Point.fromJSON(this, obj);
  21509. };
  21510. EdwardsCurve.prototype.point = function point(x, y, z, t) {
  21511. return new Point(this, x, y, z, t);
  21512. };
  21513. Point.fromJSON = function fromJSON(curve, obj) {
  21514. return new Point(curve, obj[0], obj[1], obj[2]);
  21515. };
  21516. Point.prototype.inspect = function inspect() {
  21517. if (this.isInfinity())
  21518. return '<EC Point Infinity>';
  21519. return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
  21520. ' y: ' + this.y.fromRed().toString(16, 2) +
  21521. ' z: ' + this.z.fromRed().toString(16, 2) + '>';
  21522. };
  21523. Point.prototype.isInfinity = function isInfinity() {
  21524. // XXX This code assumes that zero is always zero in red
  21525. return this.x.cmpn(0) === 0 &&
  21526. (this.y.cmp(this.z) === 0 ||
  21527. (this.zOne && this.y.cmp(this.curve.c) === 0));
  21528. };
  21529. Point.prototype._extDbl = function _extDbl() {
  21530. // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html
  21531. // #doubling-dbl-2008-hwcd
  21532. // 4M + 4S
  21533. // A = X1^2
  21534. var a = this.x.redSqr();
  21535. // B = Y1^2
  21536. var b = this.y.redSqr();
  21537. // C = 2 * Z1^2
  21538. var c = this.z.redSqr();
  21539. c = c.redIAdd(c);
  21540. // D = a * A
  21541. var d = this.curve._mulA(a);
  21542. // E = (X1 + Y1)^2 - A - B
  21543. var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);
  21544. // G = D + B
  21545. var g = d.redAdd(b);
  21546. // F = G - C
  21547. var f = g.redSub(c);
  21548. // H = D - B
  21549. var h = d.redSub(b);
  21550. // X3 = E * F
  21551. var nx = e.redMul(f);
  21552. // Y3 = G * H
  21553. var ny = g.redMul(h);
  21554. // T3 = E * H
  21555. var nt = e.redMul(h);
  21556. // Z3 = F * G
  21557. var nz = f.redMul(g);
  21558. return this.curve.point(nx, ny, nz, nt);
  21559. };
  21560. Point.prototype._projDbl = function _projDbl() {
  21561. // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html
  21562. // #doubling-dbl-2008-bbjlp
  21563. // #doubling-dbl-2007-bl
  21564. // and others
  21565. // Generally 3M + 4S or 2M + 4S
  21566. // B = (X1 + Y1)^2
  21567. var b = this.x.redAdd(this.y).redSqr();
  21568. // C = X1^2
  21569. var c = this.x.redSqr();
  21570. // D = Y1^2
  21571. var d = this.y.redSqr();
  21572. var nx;
  21573. var ny;
  21574. var nz;
  21575. var e;
  21576. var h;
  21577. var j;
  21578. if (this.curve.twisted) {
  21579. // E = a * C
  21580. e = this.curve._mulA(c);
  21581. // F = E + D
  21582. var f = e.redAdd(d);
  21583. if (this.zOne) {
  21584. // X3 = (B - C - D) * (F - 2)
  21585. nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));
  21586. // Y3 = F * (E - D)
  21587. ny = f.redMul(e.redSub(d));
  21588. // Z3 = F^2 - 2 * F
  21589. nz = f.redSqr().redSub(f).redSub(f);
  21590. } else {
  21591. // H = Z1^2
  21592. h = this.z.redSqr();
  21593. // J = F - 2 * H
  21594. j = f.redSub(h).redISub(h);
  21595. // X3 = (B-C-D)*J
  21596. nx = b.redSub(c).redISub(d).redMul(j);
  21597. // Y3 = F * (E - D)
  21598. ny = f.redMul(e.redSub(d));
  21599. // Z3 = F * J
  21600. nz = f.redMul(j);
  21601. }
  21602. } else {
  21603. // E = C + D
  21604. e = c.redAdd(d);
  21605. // H = (c * Z1)^2
  21606. h = this.curve._mulC(this.z).redSqr();
  21607. // J = E - 2 * H
  21608. j = e.redSub(h).redSub(h);
  21609. // X3 = c * (B - E) * J
  21610. nx = this.curve._mulC(b.redISub(e)).redMul(j);
  21611. // Y3 = c * E * (C - D)
  21612. ny = this.curve._mulC(e).redMul(c.redISub(d));
  21613. // Z3 = E * J
  21614. nz = e.redMul(j);
  21615. }
  21616. return this.curve.point(nx, ny, nz);
  21617. };
  21618. Point.prototype.dbl = function dbl() {
  21619. if (this.isInfinity())
  21620. return this;
  21621. // Double in extended coordinates
  21622. if (this.curve.extended)
  21623. return this._extDbl();
  21624. else
  21625. return this._projDbl();
  21626. };
  21627. Point.prototype._extAdd = function _extAdd(p) {
  21628. // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html
  21629. // #addition-add-2008-hwcd-3
  21630. // 8M
  21631. // A = (Y1 - X1) * (Y2 - X2)
  21632. var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x));
  21633. // B = (Y1 + X1) * (Y2 + X2)
  21634. var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));
  21635. // C = T1 * k * T2
  21636. var c = this.t.redMul(this.curve.dd).redMul(p.t);
  21637. // D = Z1 * 2 * Z2
  21638. var d = this.z.redMul(p.z.redAdd(p.z));
  21639. // E = B - A
  21640. var e = b.redSub(a);
  21641. // F = D - C
  21642. var f = d.redSub(c);
  21643. // G = D + C
  21644. var g = d.redAdd(c);
  21645. // H = B + A
  21646. var h = b.redAdd(a);
  21647. // X3 = E * F
  21648. var nx = e.redMul(f);
  21649. // Y3 = G * H
  21650. var ny = g.redMul(h);
  21651. // T3 = E * H
  21652. var nt = e.redMul(h);
  21653. // Z3 = F * G
  21654. var nz = f.redMul(g);
  21655. return this.curve.point(nx, ny, nz, nt);
  21656. };
  21657. Point.prototype._projAdd = function _projAdd(p) {
  21658. // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html
  21659. // #addition-add-2008-bbjlp
  21660. // #addition-add-2007-bl
  21661. // 10M + 1S
  21662. // A = Z1 * Z2
  21663. var a = this.z.redMul(p.z);
  21664. // B = A^2
  21665. var b = a.redSqr();
  21666. // C = X1 * X2
  21667. var c = this.x.redMul(p.x);
  21668. // D = Y1 * Y2
  21669. var d = this.y.redMul(p.y);
  21670. // E = d * C * D
  21671. var e = this.curve.d.redMul(c).redMul(d);
  21672. // F = B - E
  21673. var f = b.redSub(e);
  21674. // G = B + E
  21675. var g = b.redAdd(e);
  21676. // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D)
  21677. var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);
  21678. var nx = a.redMul(f).redMul(tmp);
  21679. var ny;
  21680. var nz;
  21681. if (this.curve.twisted) {
  21682. // Y3 = A * G * (D - a * C)
  21683. ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));
  21684. // Z3 = F * G
  21685. nz = f.redMul(g);
  21686. } else {
  21687. // Y3 = A * G * (D - C)
  21688. ny = a.redMul(g).redMul(d.redSub(c));
  21689. // Z3 = c * F * G
  21690. nz = this.curve._mulC(f).redMul(g);
  21691. }
  21692. return this.curve.point(nx, ny, nz);
  21693. };
  21694. Point.prototype.add = function add(p) {
  21695. if (this.isInfinity())
  21696. return p;
  21697. if (p.isInfinity())
  21698. return this;
  21699. if (this.curve.extended)
  21700. return this._extAdd(p);
  21701. else
  21702. return this._projAdd(p);
  21703. };
  21704. Point.prototype.mul = function mul(k) {
  21705. if (this._hasDoubles(k))
  21706. return this.curve._fixedNafMul(this, k);
  21707. else
  21708. return this.curve._wnafMul(this, k);
  21709. };
  21710. Point.prototype.mulAdd = function mulAdd(k1, p, k2) {
  21711. return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false);
  21712. };
  21713. Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) {
  21714. return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true);
  21715. };
  21716. Point.prototype.normalize = function normalize() {
  21717. if (this.zOne)
  21718. return this;
  21719. // Normalize coordinates
  21720. var zi = this.z.redInvm();
  21721. this.x = this.x.redMul(zi);
  21722. this.y = this.y.redMul(zi);
  21723. if (this.t)
  21724. this.t = this.t.redMul(zi);
  21725. this.z = this.curve.one;
  21726. this.zOne = true;
  21727. return this;
  21728. };
  21729. Point.prototype.neg = function neg() {
  21730. return this.curve.point(this.x.redNeg(),
  21731. this.y,
  21732. this.z,
  21733. this.t && this.t.redNeg());
  21734. };
  21735. Point.prototype.getX = function getX() {
  21736. this.normalize();
  21737. return this.x.fromRed();
  21738. };
  21739. Point.prototype.getY = function getY() {
  21740. this.normalize();
  21741. return this.y.fromRed();
  21742. };
  21743. Point.prototype.eq = function eq(other) {
  21744. return this === other ||
  21745. this.getX().cmp(other.getX()) === 0 &&
  21746. this.getY().cmp(other.getY()) === 0;
  21747. };
  21748. Point.prototype.eqXToP = function eqXToP(x) {
  21749. var rx = x.toRed(this.curve.red).redMul(this.z);
  21750. if (this.x.cmp(rx) === 0)
  21751. return true;
  21752. var xc = x.clone();
  21753. var t = this.curve.redN.redMul(this.z);
  21754. for (;;) {
  21755. xc.iadd(this.curve.n);
  21756. if (xc.cmp(this.curve.p) >= 0)
  21757. return false;
  21758. rx.redIAdd(t);
  21759. if (this.x.cmp(rx) === 0)
  21760. return true;
  21761. }
  21762. };
  21763. // Compatibility with BaseCurve
  21764. Point.prototype.toP = Point.prototype.normalize;
  21765. Point.prototype.mixedAdd = Point.prototype.add;
  21766. /***/ }),
  21767. /***/ 182:
  21768. /*!******************************************************!*\
  21769. !*** ./node_modules/elliptic/lib/elliptic/curves.js ***!
  21770. \******************************************************/
  21771. /*! no static exports found */
  21772. /***/ (function(module, exports, __webpack_require__) {
  21773. "use strict";
  21774. var curves = exports;
  21775. var hash = __webpack_require__(/*! hash.js */ 183);
  21776. var curve = __webpack_require__(/*! ./curve */ 177);
  21777. var utils = __webpack_require__(/*! ./utils */ 175);
  21778. var assert = utils.assert;
  21779. function PresetCurve(options) {
  21780. if (options.type === 'short')
  21781. this.curve = new curve.short(options);
  21782. else if (options.type === 'edwards')
  21783. this.curve = new curve.edwards(options);
  21784. else
  21785. this.curve = new curve.mont(options);
  21786. this.g = this.curve.g;
  21787. this.n = this.curve.n;
  21788. this.hash = options.hash;
  21789. assert(this.g.validate(), 'Invalid curve');
  21790. assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');
  21791. }
  21792. curves.PresetCurve = PresetCurve;
  21793. function defineCurve(name, options) {
  21794. Object.defineProperty(curves, name, {
  21795. configurable: true,
  21796. enumerable: true,
  21797. get: function() {
  21798. var curve = new PresetCurve(options);
  21799. Object.defineProperty(curves, name, {
  21800. configurable: true,
  21801. enumerable: true,
  21802. value: curve,
  21803. });
  21804. return curve;
  21805. },
  21806. });
  21807. }
  21808. defineCurve('p192', {
  21809. type: 'short',
  21810. prime: 'p192',
  21811. p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',
  21812. a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',
  21813. b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',
  21814. n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',
  21815. hash: hash.sha256,
  21816. gRed: false,
  21817. g: [
  21818. '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',
  21819. '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811',
  21820. ],
  21821. });
  21822. defineCurve('p224', {
  21823. type: 'short',
  21824. prime: 'p224',
  21825. p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',
  21826. a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',
  21827. b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',
  21828. n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',
  21829. hash: hash.sha256,
  21830. gRed: false,
  21831. g: [
  21832. 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',
  21833. 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34',
  21834. ],
  21835. });
  21836. defineCurve('p256', {
  21837. type: 'short',
  21838. prime: null,
  21839. p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',
  21840. a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',
  21841. b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',
  21842. n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',
  21843. hash: hash.sha256,
  21844. gRed: false,
  21845. g: [
  21846. '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',
  21847. '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5',
  21848. ],
  21849. });
  21850. defineCurve('p384', {
  21851. type: 'short',
  21852. prime: null,
  21853. p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
  21854. 'fffffffe ffffffff 00000000 00000000 ffffffff',
  21855. a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
  21856. 'fffffffe ffffffff 00000000 00000000 fffffffc',
  21857. b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +
  21858. '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',
  21859. n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +
  21860. 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',
  21861. hash: hash.sha384,
  21862. gRed: false,
  21863. g: [
  21864. 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +
  21865. '5502f25d bf55296c 3a545e38 72760ab7',
  21866. '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +
  21867. '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f',
  21868. ],
  21869. });
  21870. defineCurve('p521', {
  21871. type: 'short',
  21872. prime: null,
  21873. p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
  21874. 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
  21875. 'ffffffff ffffffff ffffffff ffffffff ffffffff',
  21876. a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
  21877. 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
  21878. 'ffffffff ffffffff ffffffff ffffffff fffffffc',
  21879. b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +
  21880. '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +
  21881. '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',
  21882. n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
  21883. 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +
  21884. 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',
  21885. hash: hash.sha512,
  21886. gRed: false,
  21887. g: [
  21888. '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +
  21889. '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +
  21890. 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',
  21891. '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +
  21892. '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +
  21893. '3fad0761 353c7086 a272c240 88be9476 9fd16650',
  21894. ],
  21895. });
  21896. defineCurve('curve25519', {
  21897. type: 'mont',
  21898. prime: 'p25519',
  21899. p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',
  21900. a: '76d06',
  21901. b: '1',
  21902. n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',
  21903. hash: hash.sha256,
  21904. gRed: false,
  21905. g: [
  21906. '9',
  21907. ],
  21908. });
  21909. defineCurve('ed25519', {
  21910. type: 'edwards',
  21911. prime: 'p25519',
  21912. p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',
  21913. a: '-1',
  21914. c: '1',
  21915. // -121665 * (121666^(-1)) (mod P)
  21916. d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',
  21917. n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',
  21918. hash: hash.sha256,
  21919. gRed: false,
  21920. g: [
  21921. '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',
  21922. // 4/5
  21923. '6666666666666666666666666666666666666666666666666666666666666658',
  21924. ],
  21925. });
  21926. var pre;
  21927. try {
  21928. pre = __webpack_require__(/*! ./precomputed/secp256k1 */ 195);
  21929. } catch (e) {
  21930. pre = undefined;
  21931. }
  21932. defineCurve('secp256k1', {
  21933. type: 'short',
  21934. prime: 'k256',
  21935. p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',
  21936. a: '0',
  21937. b: '7',
  21938. n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',
  21939. h: '1',
  21940. hash: hash.sha256,
  21941. // Precomputed endomorphism
  21942. beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',
  21943. lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',
  21944. basis: [
  21945. {
  21946. a: '3086d221a7d46bcde86c90e49284eb15',
  21947. b: '-e4437ed6010e88286f547fa90abfe4c3',
  21948. },
  21949. {
  21950. a: '114ca50f7a8e2f3f657c1108d9d44cfd8',
  21951. b: '3086d221a7d46bcde86c90e49284eb15',
  21952. },
  21953. ],
  21954. gRed: false,
  21955. g: [
  21956. '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',
  21957. '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',
  21958. pre,
  21959. ],
  21960. });
  21961. /***/ }),
  21962. /***/ 183:
  21963. /*!******************************************!*\
  21964. !*** ./node_modules/hash.js/lib/hash.js ***!
  21965. \******************************************/
  21966. /*! no static exports found */
  21967. /***/ (function(module, exports, __webpack_require__) {
  21968. var hash = exports;
  21969. hash.utils = __webpack_require__(/*! ./hash/utils */ 184);
  21970. hash.common = __webpack_require__(/*! ./hash/common */ 185);
  21971. hash.sha = __webpack_require__(/*! ./hash/sha */ 186);
  21972. hash.ripemd = __webpack_require__(/*! ./hash/ripemd */ 193);
  21973. hash.hmac = __webpack_require__(/*! ./hash/hmac */ 194);
  21974. // Proxy hash functions to the main object
  21975. hash.sha1 = hash.sha.sha1;
  21976. hash.sha256 = hash.sha.sha256;
  21977. hash.sha224 = hash.sha.sha224;
  21978. hash.sha384 = hash.sha.sha384;
  21979. hash.sha512 = hash.sha.sha512;
  21980. hash.ripemd160 = hash.ripemd.ripemd160;
  21981. /***/ }),
  21982. /***/ 184:
  21983. /*!************************************************!*\
  21984. !*** ./node_modules/hash.js/lib/hash/utils.js ***!
  21985. \************************************************/
  21986. /*! no static exports found */
  21987. /***/ (function(module, exports, __webpack_require__) {
  21988. "use strict";
  21989. var assert = __webpack_require__(/*! minimalistic-assert */ 136);
  21990. var inherits = __webpack_require__(/*! inherits */ 86);
  21991. exports.inherits = inherits;
  21992. function isSurrogatePair(msg, i) {
  21993. if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {
  21994. return false;
  21995. }
  21996. if (i < 0 || i + 1 >= msg.length) {
  21997. return false;
  21998. }
  21999. return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;
  22000. }
  22001. function toArray(msg, enc) {
  22002. if (Array.isArray(msg))
  22003. return msg.slice();
  22004. if (!msg)
  22005. return [];
  22006. var res = [];
  22007. if (typeof msg === 'string') {
  22008. if (!enc) {
  22009. // Inspired by stringToUtf8ByteArray() in closure-library by Google
  22010. // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143
  22011. // Apache License 2.0
  22012. // https://github.com/google/closure-library/blob/master/LICENSE
  22013. var p = 0;
  22014. for (var i = 0; i < msg.length; i++) {
  22015. var c = msg.charCodeAt(i);
  22016. if (c < 128) {
  22017. res[p++] = c;
  22018. } else if (c < 2048) {
  22019. res[p++] = (c >> 6) | 192;
  22020. res[p++] = (c & 63) | 128;
  22021. } else if (isSurrogatePair(msg, i)) {
  22022. c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);
  22023. res[p++] = (c >> 18) | 240;
  22024. res[p++] = ((c >> 12) & 63) | 128;
  22025. res[p++] = ((c >> 6) & 63) | 128;
  22026. res[p++] = (c & 63) | 128;
  22027. } else {
  22028. res[p++] = (c >> 12) | 224;
  22029. res[p++] = ((c >> 6) & 63) | 128;
  22030. res[p++] = (c & 63) | 128;
  22031. }
  22032. }
  22033. } else if (enc === 'hex') {
  22034. msg = msg.replace(/[^a-z0-9]+/ig, '');
  22035. if (msg.length % 2 !== 0)
  22036. msg = '0' + msg;
  22037. for (i = 0; i < msg.length; i += 2)
  22038. res.push(parseInt(msg[i] + msg[i + 1], 16));
  22039. }
  22040. } else {
  22041. for (i = 0; i < msg.length; i++)
  22042. res[i] = msg[i] | 0;
  22043. }
  22044. return res;
  22045. }
  22046. exports.toArray = toArray;
  22047. function toHex(msg) {
  22048. var res = '';
  22049. for (var i = 0; i < msg.length; i++)
  22050. res += zero2(msg[i].toString(16));
  22051. return res;
  22052. }
  22053. exports.toHex = toHex;
  22054. function htonl(w) {
  22055. var res = (w >>> 24) |
  22056. ((w >>> 8) & 0xff00) |
  22057. ((w << 8) & 0xff0000) |
  22058. ((w & 0xff) << 24);
  22059. return res >>> 0;
  22060. }
  22061. exports.htonl = htonl;
  22062. function toHex32(msg, endian) {
  22063. var res = '';
  22064. for (var i = 0; i < msg.length; i++) {
  22065. var w = msg[i];
  22066. if (endian === 'little')
  22067. w = htonl(w);
  22068. res += zero8(w.toString(16));
  22069. }
  22070. return res;
  22071. }
  22072. exports.toHex32 = toHex32;
  22073. function zero2(word) {
  22074. if (word.length === 1)
  22075. return '0' + word;
  22076. else
  22077. return word;
  22078. }
  22079. exports.zero2 = zero2;
  22080. function zero8(word) {
  22081. if (word.length === 7)
  22082. return '0' + word;
  22083. else if (word.length === 6)
  22084. return '00' + word;
  22085. else if (word.length === 5)
  22086. return '000' + word;
  22087. else if (word.length === 4)
  22088. return '0000' + word;
  22089. else if (word.length === 3)
  22090. return '00000' + word;
  22091. else if (word.length === 2)
  22092. return '000000' + word;
  22093. else if (word.length === 1)
  22094. return '0000000' + word;
  22095. else
  22096. return word;
  22097. }
  22098. exports.zero8 = zero8;
  22099. function join32(msg, start, end, endian) {
  22100. var len = end - start;
  22101. assert(len % 4 === 0);
  22102. var res = new Array(len / 4);
  22103. for (var i = 0, k = start; i < res.length; i++, k += 4) {
  22104. var w;
  22105. if (endian === 'big')
  22106. w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];
  22107. else
  22108. w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];
  22109. res[i] = w >>> 0;
  22110. }
  22111. return res;
  22112. }
  22113. exports.join32 = join32;
  22114. function split32(msg, endian) {
  22115. var res = new Array(msg.length * 4);
  22116. for (var i = 0, k = 0; i < msg.length; i++, k += 4) {
  22117. var m = msg[i];
  22118. if (endian === 'big') {
  22119. res[k] = m >>> 24;
  22120. res[k + 1] = (m >>> 16) & 0xff;
  22121. res[k + 2] = (m >>> 8) & 0xff;
  22122. res[k + 3] = m & 0xff;
  22123. } else {
  22124. res[k + 3] = m >>> 24;
  22125. res[k + 2] = (m >>> 16) & 0xff;
  22126. res[k + 1] = (m >>> 8) & 0xff;
  22127. res[k] = m & 0xff;
  22128. }
  22129. }
  22130. return res;
  22131. }
  22132. exports.split32 = split32;
  22133. function rotr32(w, b) {
  22134. return (w >>> b) | (w << (32 - b));
  22135. }
  22136. exports.rotr32 = rotr32;
  22137. function rotl32(w, b) {
  22138. return (w << b) | (w >>> (32 - b));
  22139. }
  22140. exports.rotl32 = rotl32;
  22141. function sum32(a, b) {
  22142. return (a + b) >>> 0;
  22143. }
  22144. exports.sum32 = sum32;
  22145. function sum32_3(a, b, c) {
  22146. return (a + b + c) >>> 0;
  22147. }
  22148. exports.sum32_3 = sum32_3;
  22149. function sum32_4(a, b, c, d) {
  22150. return (a + b + c + d) >>> 0;
  22151. }
  22152. exports.sum32_4 = sum32_4;
  22153. function sum32_5(a, b, c, d, e) {
  22154. return (a + b + c + d + e) >>> 0;
  22155. }
  22156. exports.sum32_5 = sum32_5;
  22157. function sum64(buf, pos, ah, al) {
  22158. var bh = buf[pos];
  22159. var bl = buf[pos + 1];
  22160. var lo = (al + bl) >>> 0;
  22161. var hi = (lo < al ? 1 : 0) + ah + bh;
  22162. buf[pos] = hi >>> 0;
  22163. buf[pos + 1] = lo;
  22164. }
  22165. exports.sum64 = sum64;
  22166. function sum64_hi(ah, al, bh, bl) {
  22167. var lo = (al + bl) >>> 0;
  22168. var hi = (lo < al ? 1 : 0) + ah + bh;
  22169. return hi >>> 0;
  22170. }
  22171. exports.sum64_hi = sum64_hi;
  22172. function sum64_lo(ah, al, bh, bl) {
  22173. var lo = al + bl;
  22174. return lo >>> 0;
  22175. }
  22176. exports.sum64_lo = sum64_lo;
  22177. function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {
  22178. var carry = 0;
  22179. var lo = al;
  22180. lo = (lo + bl) >>> 0;
  22181. carry += lo < al ? 1 : 0;
  22182. lo = (lo + cl) >>> 0;
  22183. carry += lo < cl ? 1 : 0;
  22184. lo = (lo + dl) >>> 0;
  22185. carry += lo < dl ? 1 : 0;
  22186. var hi = ah + bh + ch + dh + carry;
  22187. return hi >>> 0;
  22188. }
  22189. exports.sum64_4_hi = sum64_4_hi;
  22190. function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {
  22191. var lo = al + bl + cl + dl;
  22192. return lo >>> 0;
  22193. }
  22194. exports.sum64_4_lo = sum64_4_lo;
  22195. function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
  22196. var carry = 0;
  22197. var lo = al;
  22198. lo = (lo + bl) >>> 0;
  22199. carry += lo < al ? 1 : 0;
  22200. lo = (lo + cl) >>> 0;
  22201. carry += lo < cl ? 1 : 0;
  22202. lo = (lo + dl) >>> 0;
  22203. carry += lo < dl ? 1 : 0;
  22204. lo = (lo + el) >>> 0;
  22205. carry += lo < el ? 1 : 0;
  22206. var hi = ah + bh + ch + dh + eh + carry;
  22207. return hi >>> 0;
  22208. }
  22209. exports.sum64_5_hi = sum64_5_hi;
  22210. function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
  22211. var lo = al + bl + cl + dl + el;
  22212. return lo >>> 0;
  22213. }
  22214. exports.sum64_5_lo = sum64_5_lo;
  22215. function rotr64_hi(ah, al, num) {
  22216. var r = (al << (32 - num)) | (ah >>> num);
  22217. return r >>> 0;
  22218. }
  22219. exports.rotr64_hi = rotr64_hi;
  22220. function rotr64_lo(ah, al, num) {
  22221. var r = (ah << (32 - num)) | (al >>> num);
  22222. return r >>> 0;
  22223. }
  22224. exports.rotr64_lo = rotr64_lo;
  22225. function shr64_hi(ah, al, num) {
  22226. return ah >>> num;
  22227. }
  22228. exports.shr64_hi = shr64_hi;
  22229. function shr64_lo(ah, al, num) {
  22230. var r = (ah << (32 - num)) | (al >>> num);
  22231. return r >>> 0;
  22232. }
  22233. exports.shr64_lo = shr64_lo;
  22234. /***/ }),
  22235. /***/ 185:
  22236. /*!*************************************************!*\
  22237. !*** ./node_modules/hash.js/lib/hash/common.js ***!
  22238. \*************************************************/
  22239. /*! no static exports found */
  22240. /***/ (function(module, exports, __webpack_require__) {
  22241. "use strict";
  22242. var utils = __webpack_require__(/*! ./utils */ 184);
  22243. var assert = __webpack_require__(/*! minimalistic-assert */ 136);
  22244. function BlockHash() {
  22245. this.pending = null;
  22246. this.pendingTotal = 0;
  22247. this.blockSize = this.constructor.blockSize;
  22248. this.outSize = this.constructor.outSize;
  22249. this.hmacStrength = this.constructor.hmacStrength;
  22250. this.padLength = this.constructor.padLength / 8;
  22251. this.endian = 'big';
  22252. this._delta8 = this.blockSize / 8;
  22253. this._delta32 = this.blockSize / 32;
  22254. }
  22255. exports.BlockHash = BlockHash;
  22256. BlockHash.prototype.update = function update(msg, enc) {
  22257. // Convert message to array, pad it, and join into 32bit blocks
  22258. msg = utils.toArray(msg, enc);
  22259. if (!this.pending)
  22260. this.pending = msg;
  22261. else
  22262. this.pending = this.pending.concat(msg);
  22263. this.pendingTotal += msg.length;
  22264. // Enough data, try updating
  22265. if (this.pending.length >= this._delta8) {
  22266. msg = this.pending;
  22267. // Process pending data in blocks
  22268. var r = msg.length % this._delta8;
  22269. this.pending = msg.slice(msg.length - r, msg.length);
  22270. if (this.pending.length === 0)
  22271. this.pending = null;
  22272. msg = utils.join32(msg, 0, msg.length - r, this.endian);
  22273. for (var i = 0; i < msg.length; i += this._delta32)
  22274. this._update(msg, i, i + this._delta32);
  22275. }
  22276. return this;
  22277. };
  22278. BlockHash.prototype.digest = function digest(enc) {
  22279. this.update(this._pad());
  22280. assert(this.pending === null);
  22281. return this._digest(enc);
  22282. };
  22283. BlockHash.prototype._pad = function pad() {
  22284. var len = this.pendingTotal;
  22285. var bytes = this._delta8;
  22286. var k = bytes - ((len + this.padLength) % bytes);
  22287. var res = new Array(k + this.padLength);
  22288. res[0] = 0x80;
  22289. for (var i = 1; i < k; i++)
  22290. res[i] = 0;
  22291. // Append length
  22292. len <<= 3;
  22293. if (this.endian === 'big') {
  22294. for (var t = 8; t < this.padLength; t++)
  22295. res[i++] = 0;
  22296. res[i++] = 0;
  22297. res[i++] = 0;
  22298. res[i++] = 0;
  22299. res[i++] = 0;
  22300. res[i++] = (len >>> 24) & 0xff;
  22301. res[i++] = (len >>> 16) & 0xff;
  22302. res[i++] = (len >>> 8) & 0xff;
  22303. res[i++] = len & 0xff;
  22304. } else {
  22305. res[i++] = len & 0xff;
  22306. res[i++] = (len >>> 8) & 0xff;
  22307. res[i++] = (len >>> 16) & 0xff;
  22308. res[i++] = (len >>> 24) & 0xff;
  22309. res[i++] = 0;
  22310. res[i++] = 0;
  22311. res[i++] = 0;
  22312. res[i++] = 0;
  22313. for (t = 8; t < this.padLength; t++)
  22314. res[i++] = 0;
  22315. }
  22316. return res;
  22317. };
  22318. /***/ }),
  22319. /***/ 186:
  22320. /*!**********************************************!*\
  22321. !*** ./node_modules/hash.js/lib/hash/sha.js ***!
  22322. \**********************************************/
  22323. /*! no static exports found */
  22324. /***/ (function(module, exports, __webpack_require__) {
  22325. "use strict";
  22326. exports.sha1 = __webpack_require__(/*! ./sha/1 */ 187);
  22327. exports.sha224 = __webpack_require__(/*! ./sha/224 */ 189);
  22328. exports.sha256 = __webpack_require__(/*! ./sha/256 */ 190);
  22329. exports.sha384 = __webpack_require__(/*! ./sha/384 */ 191);
  22330. exports.sha512 = __webpack_require__(/*! ./sha/512 */ 192);
  22331. /***/ }),
  22332. /***/ 187:
  22333. /*!************************************************!*\
  22334. !*** ./node_modules/hash.js/lib/hash/sha/1.js ***!
  22335. \************************************************/
  22336. /*! no static exports found */
  22337. /***/ (function(module, exports, __webpack_require__) {
  22338. "use strict";
  22339. var utils = __webpack_require__(/*! ../utils */ 184);
  22340. var common = __webpack_require__(/*! ../common */ 185);
  22341. var shaCommon = __webpack_require__(/*! ./common */ 188);
  22342. var rotl32 = utils.rotl32;
  22343. var sum32 = utils.sum32;
  22344. var sum32_5 = utils.sum32_5;
  22345. var ft_1 = shaCommon.ft_1;
  22346. var BlockHash = common.BlockHash;
  22347. var sha1_K = [
  22348. 0x5A827999, 0x6ED9EBA1,
  22349. 0x8F1BBCDC, 0xCA62C1D6
  22350. ];
  22351. function SHA1() {
  22352. if (!(this instanceof SHA1))
  22353. return new SHA1();
  22354. BlockHash.call(this);
  22355. this.h = [
  22356. 0x67452301, 0xefcdab89, 0x98badcfe,
  22357. 0x10325476, 0xc3d2e1f0 ];
  22358. this.W = new Array(80);
  22359. }
  22360. utils.inherits(SHA1, BlockHash);
  22361. module.exports = SHA1;
  22362. SHA1.blockSize = 512;
  22363. SHA1.outSize = 160;
  22364. SHA1.hmacStrength = 80;
  22365. SHA1.padLength = 64;
  22366. SHA1.prototype._update = function _update(msg, start) {
  22367. var W = this.W;
  22368. for (var i = 0; i < 16; i++)
  22369. W[i] = msg[start + i];
  22370. for(; i < W.length; i++)
  22371. W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);
  22372. var a = this.h[0];
  22373. var b = this.h[1];
  22374. var c = this.h[2];
  22375. var d = this.h[3];
  22376. var e = this.h[4];
  22377. for (i = 0; i < W.length; i++) {
  22378. var s = ~~(i / 20);
  22379. var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);
  22380. e = d;
  22381. d = c;
  22382. c = rotl32(b, 30);
  22383. b = a;
  22384. a = t;
  22385. }
  22386. this.h[0] = sum32(this.h[0], a);
  22387. this.h[1] = sum32(this.h[1], b);
  22388. this.h[2] = sum32(this.h[2], c);
  22389. this.h[3] = sum32(this.h[3], d);
  22390. this.h[4] = sum32(this.h[4], e);
  22391. };
  22392. SHA1.prototype._digest = function digest(enc) {
  22393. if (enc === 'hex')
  22394. return utils.toHex32(this.h, 'big');
  22395. else
  22396. return utils.split32(this.h, 'big');
  22397. };
  22398. /***/ }),
  22399. /***/ 188:
  22400. /*!*****************************************************!*\
  22401. !*** ./node_modules/hash.js/lib/hash/sha/common.js ***!
  22402. \*****************************************************/
  22403. /*! no static exports found */
  22404. /***/ (function(module, exports, __webpack_require__) {
  22405. "use strict";
  22406. var utils = __webpack_require__(/*! ../utils */ 184);
  22407. var rotr32 = utils.rotr32;
  22408. function ft_1(s, x, y, z) {
  22409. if (s === 0)
  22410. return ch32(x, y, z);
  22411. if (s === 1 || s === 3)
  22412. return p32(x, y, z);
  22413. if (s === 2)
  22414. return maj32(x, y, z);
  22415. }
  22416. exports.ft_1 = ft_1;
  22417. function ch32(x, y, z) {
  22418. return (x & y) ^ ((~x) & z);
  22419. }
  22420. exports.ch32 = ch32;
  22421. function maj32(x, y, z) {
  22422. return (x & y) ^ (x & z) ^ (y & z);
  22423. }
  22424. exports.maj32 = maj32;
  22425. function p32(x, y, z) {
  22426. return x ^ y ^ z;
  22427. }
  22428. exports.p32 = p32;
  22429. function s0_256(x) {
  22430. return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);
  22431. }
  22432. exports.s0_256 = s0_256;
  22433. function s1_256(x) {
  22434. return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);
  22435. }
  22436. exports.s1_256 = s1_256;
  22437. function g0_256(x) {
  22438. return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);
  22439. }
  22440. exports.g0_256 = g0_256;
  22441. function g1_256(x) {
  22442. return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);
  22443. }
  22444. exports.g1_256 = g1_256;
  22445. /***/ }),
  22446. /***/ 189:
  22447. /*!**************************************************!*\
  22448. !*** ./node_modules/hash.js/lib/hash/sha/224.js ***!
  22449. \**************************************************/
  22450. /*! no static exports found */
  22451. /***/ (function(module, exports, __webpack_require__) {
  22452. "use strict";
  22453. var utils = __webpack_require__(/*! ../utils */ 184);
  22454. var SHA256 = __webpack_require__(/*! ./256 */ 190);
  22455. function SHA224() {
  22456. if (!(this instanceof SHA224))
  22457. return new SHA224();
  22458. SHA256.call(this);
  22459. this.h = [
  22460. 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,
  22461. 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];
  22462. }
  22463. utils.inherits(SHA224, SHA256);
  22464. module.exports = SHA224;
  22465. SHA224.blockSize = 512;
  22466. SHA224.outSize = 224;
  22467. SHA224.hmacStrength = 192;
  22468. SHA224.padLength = 64;
  22469. SHA224.prototype._digest = function digest(enc) {
  22470. // Just truncate output
  22471. if (enc === 'hex')
  22472. return utils.toHex32(this.h.slice(0, 7), 'big');
  22473. else
  22474. return utils.split32(this.h.slice(0, 7), 'big');
  22475. };
  22476. /***/ }),
  22477. /***/ 19:
  22478. /*!******************************************************************!*\
  22479. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  22480. \******************************************************************/
  22481. /*! no static exports found */
  22482. /***/ (function(module, exports, __webpack_require__) {
  22483. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  22484. function _arrayWithoutHoles(arr) {
  22485. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  22486. }
  22487. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22488. /***/ }),
  22489. /***/ 190:
  22490. /*!**************************************************!*\
  22491. !*** ./node_modules/hash.js/lib/hash/sha/256.js ***!
  22492. \**************************************************/
  22493. /*! no static exports found */
  22494. /***/ (function(module, exports, __webpack_require__) {
  22495. "use strict";
  22496. var utils = __webpack_require__(/*! ../utils */ 184);
  22497. var common = __webpack_require__(/*! ../common */ 185);
  22498. var shaCommon = __webpack_require__(/*! ./common */ 188);
  22499. var assert = __webpack_require__(/*! minimalistic-assert */ 136);
  22500. var sum32 = utils.sum32;
  22501. var sum32_4 = utils.sum32_4;
  22502. var sum32_5 = utils.sum32_5;
  22503. var ch32 = shaCommon.ch32;
  22504. var maj32 = shaCommon.maj32;
  22505. var s0_256 = shaCommon.s0_256;
  22506. var s1_256 = shaCommon.s1_256;
  22507. var g0_256 = shaCommon.g0_256;
  22508. var g1_256 = shaCommon.g1_256;
  22509. var BlockHash = common.BlockHash;
  22510. var sha256_K = [
  22511. 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
  22512. 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
  22513. 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
  22514. 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
  22515. 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
  22516. 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
  22517. 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
  22518. 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
  22519. 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
  22520. 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
  22521. 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
  22522. 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
  22523. 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
  22524. 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
  22525. 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
  22526. 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
  22527. ];
  22528. function SHA256() {
  22529. if (!(this instanceof SHA256))
  22530. return new SHA256();
  22531. BlockHash.call(this);
  22532. this.h = [
  22533. 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
  22534. 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
  22535. ];
  22536. this.k = sha256_K;
  22537. this.W = new Array(64);
  22538. }
  22539. utils.inherits(SHA256, BlockHash);
  22540. module.exports = SHA256;
  22541. SHA256.blockSize = 512;
  22542. SHA256.outSize = 256;
  22543. SHA256.hmacStrength = 192;
  22544. SHA256.padLength = 64;
  22545. SHA256.prototype._update = function _update(msg, start) {
  22546. var W = this.W;
  22547. for (var i = 0; i < 16; i++)
  22548. W[i] = msg[start + i];
  22549. for (; i < W.length; i++)
  22550. W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);
  22551. var a = this.h[0];
  22552. var b = this.h[1];
  22553. var c = this.h[2];
  22554. var d = this.h[3];
  22555. var e = this.h[4];
  22556. var f = this.h[5];
  22557. var g = this.h[6];
  22558. var h = this.h[7];
  22559. assert(this.k.length === W.length);
  22560. for (i = 0; i < W.length; i++) {
  22561. var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);
  22562. var T2 = sum32(s0_256(a), maj32(a, b, c));
  22563. h = g;
  22564. g = f;
  22565. f = e;
  22566. e = sum32(d, T1);
  22567. d = c;
  22568. c = b;
  22569. b = a;
  22570. a = sum32(T1, T2);
  22571. }
  22572. this.h[0] = sum32(this.h[0], a);
  22573. this.h[1] = sum32(this.h[1], b);
  22574. this.h[2] = sum32(this.h[2], c);
  22575. this.h[3] = sum32(this.h[3], d);
  22576. this.h[4] = sum32(this.h[4], e);
  22577. this.h[5] = sum32(this.h[5], f);
  22578. this.h[6] = sum32(this.h[6], g);
  22579. this.h[7] = sum32(this.h[7], h);
  22580. };
  22581. SHA256.prototype._digest = function digest(enc) {
  22582. if (enc === 'hex')
  22583. return utils.toHex32(this.h, 'big');
  22584. else
  22585. return utils.split32(this.h, 'big');
  22586. };
  22587. /***/ }),
  22588. /***/ 191:
  22589. /*!**************************************************!*\
  22590. !*** ./node_modules/hash.js/lib/hash/sha/384.js ***!
  22591. \**************************************************/
  22592. /*! no static exports found */
  22593. /***/ (function(module, exports, __webpack_require__) {
  22594. "use strict";
  22595. var utils = __webpack_require__(/*! ../utils */ 184);
  22596. var SHA512 = __webpack_require__(/*! ./512 */ 192);
  22597. function SHA384() {
  22598. if (!(this instanceof SHA384))
  22599. return new SHA384();
  22600. SHA512.call(this);
  22601. this.h = [
  22602. 0xcbbb9d5d, 0xc1059ed8,
  22603. 0x629a292a, 0x367cd507,
  22604. 0x9159015a, 0x3070dd17,
  22605. 0x152fecd8, 0xf70e5939,
  22606. 0x67332667, 0xffc00b31,
  22607. 0x8eb44a87, 0x68581511,
  22608. 0xdb0c2e0d, 0x64f98fa7,
  22609. 0x47b5481d, 0xbefa4fa4 ];
  22610. }
  22611. utils.inherits(SHA384, SHA512);
  22612. module.exports = SHA384;
  22613. SHA384.blockSize = 1024;
  22614. SHA384.outSize = 384;
  22615. SHA384.hmacStrength = 192;
  22616. SHA384.padLength = 128;
  22617. SHA384.prototype._digest = function digest(enc) {
  22618. if (enc === 'hex')
  22619. return utils.toHex32(this.h.slice(0, 12), 'big');
  22620. else
  22621. return utils.split32(this.h.slice(0, 12), 'big');
  22622. };
  22623. /***/ }),
  22624. /***/ 192:
  22625. /*!**************************************************!*\
  22626. !*** ./node_modules/hash.js/lib/hash/sha/512.js ***!
  22627. \**************************************************/
  22628. /*! no static exports found */
  22629. /***/ (function(module, exports, __webpack_require__) {
  22630. "use strict";
  22631. var utils = __webpack_require__(/*! ../utils */ 184);
  22632. var common = __webpack_require__(/*! ../common */ 185);
  22633. var assert = __webpack_require__(/*! minimalistic-assert */ 136);
  22634. var rotr64_hi = utils.rotr64_hi;
  22635. var rotr64_lo = utils.rotr64_lo;
  22636. var shr64_hi = utils.shr64_hi;
  22637. var shr64_lo = utils.shr64_lo;
  22638. var sum64 = utils.sum64;
  22639. var sum64_hi = utils.sum64_hi;
  22640. var sum64_lo = utils.sum64_lo;
  22641. var sum64_4_hi = utils.sum64_4_hi;
  22642. var sum64_4_lo = utils.sum64_4_lo;
  22643. var sum64_5_hi = utils.sum64_5_hi;
  22644. var sum64_5_lo = utils.sum64_5_lo;
  22645. var BlockHash = common.BlockHash;
  22646. var sha512_K = [
  22647. 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
  22648. 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
  22649. 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
  22650. 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
  22651. 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
  22652. 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
  22653. 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
  22654. 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
  22655. 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
  22656. 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
  22657. 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
  22658. 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
  22659. 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
  22660. 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
  22661. 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
  22662. 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
  22663. 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
  22664. 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
  22665. 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
  22666. 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
  22667. 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
  22668. 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
  22669. 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
  22670. 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
  22671. 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
  22672. 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
  22673. 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
  22674. 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
  22675. 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
  22676. 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
  22677. 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
  22678. 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
  22679. 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
  22680. 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
  22681. 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
  22682. 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
  22683. 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
  22684. 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
  22685. 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
  22686. 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
  22687. ];
  22688. function SHA512() {
  22689. if (!(this instanceof SHA512))
  22690. return new SHA512();
  22691. BlockHash.call(this);
  22692. this.h = [
  22693. 0x6a09e667, 0xf3bcc908,
  22694. 0xbb67ae85, 0x84caa73b,
  22695. 0x3c6ef372, 0xfe94f82b,
  22696. 0xa54ff53a, 0x5f1d36f1,
  22697. 0x510e527f, 0xade682d1,
  22698. 0x9b05688c, 0x2b3e6c1f,
  22699. 0x1f83d9ab, 0xfb41bd6b,
  22700. 0x5be0cd19, 0x137e2179 ];
  22701. this.k = sha512_K;
  22702. this.W = new Array(160);
  22703. }
  22704. utils.inherits(SHA512, BlockHash);
  22705. module.exports = SHA512;
  22706. SHA512.blockSize = 1024;
  22707. SHA512.outSize = 512;
  22708. SHA512.hmacStrength = 192;
  22709. SHA512.padLength = 128;
  22710. SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {
  22711. var W = this.W;
  22712. // 32 x 32bit words
  22713. for (var i = 0; i < 32; i++)
  22714. W[i] = msg[start + i];
  22715. for (; i < W.length; i += 2) {
  22716. var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2
  22717. var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);
  22718. var c1_hi = W[i - 14]; // i - 7
  22719. var c1_lo = W[i - 13];
  22720. var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15
  22721. var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);
  22722. var c3_hi = W[i - 32]; // i - 16
  22723. var c3_lo = W[i - 31];
  22724. W[i] = sum64_4_hi(
  22725. c0_hi, c0_lo,
  22726. c1_hi, c1_lo,
  22727. c2_hi, c2_lo,
  22728. c3_hi, c3_lo);
  22729. W[i + 1] = sum64_4_lo(
  22730. c0_hi, c0_lo,
  22731. c1_hi, c1_lo,
  22732. c2_hi, c2_lo,
  22733. c3_hi, c3_lo);
  22734. }
  22735. };
  22736. SHA512.prototype._update = function _update(msg, start) {
  22737. this._prepareBlock(msg, start);
  22738. var W = this.W;
  22739. var ah = this.h[0];
  22740. var al = this.h[1];
  22741. var bh = this.h[2];
  22742. var bl = this.h[3];
  22743. var ch = this.h[4];
  22744. var cl = this.h[5];
  22745. var dh = this.h[6];
  22746. var dl = this.h[7];
  22747. var eh = this.h[8];
  22748. var el = this.h[9];
  22749. var fh = this.h[10];
  22750. var fl = this.h[11];
  22751. var gh = this.h[12];
  22752. var gl = this.h[13];
  22753. var hh = this.h[14];
  22754. var hl = this.h[15];
  22755. assert(this.k.length === W.length);
  22756. for (var i = 0; i < W.length; i += 2) {
  22757. var c0_hi = hh;
  22758. var c0_lo = hl;
  22759. var c1_hi = s1_512_hi(eh, el);
  22760. var c1_lo = s1_512_lo(eh, el);
  22761. var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);
  22762. var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);
  22763. var c3_hi = this.k[i];
  22764. var c3_lo = this.k[i + 1];
  22765. var c4_hi = W[i];
  22766. var c4_lo = W[i + 1];
  22767. var T1_hi = sum64_5_hi(
  22768. c0_hi, c0_lo,
  22769. c1_hi, c1_lo,
  22770. c2_hi, c2_lo,
  22771. c3_hi, c3_lo,
  22772. c4_hi, c4_lo);
  22773. var T1_lo = sum64_5_lo(
  22774. c0_hi, c0_lo,
  22775. c1_hi, c1_lo,
  22776. c2_hi, c2_lo,
  22777. c3_hi, c3_lo,
  22778. c4_hi, c4_lo);
  22779. c0_hi = s0_512_hi(ah, al);
  22780. c0_lo = s0_512_lo(ah, al);
  22781. c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);
  22782. c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);
  22783. var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);
  22784. var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);
  22785. hh = gh;
  22786. hl = gl;
  22787. gh = fh;
  22788. gl = fl;
  22789. fh = eh;
  22790. fl = el;
  22791. eh = sum64_hi(dh, dl, T1_hi, T1_lo);
  22792. el = sum64_lo(dl, dl, T1_hi, T1_lo);
  22793. dh = ch;
  22794. dl = cl;
  22795. ch = bh;
  22796. cl = bl;
  22797. bh = ah;
  22798. bl = al;
  22799. ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);
  22800. al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);
  22801. }
  22802. sum64(this.h, 0, ah, al);
  22803. sum64(this.h, 2, bh, bl);
  22804. sum64(this.h, 4, ch, cl);
  22805. sum64(this.h, 6, dh, dl);
  22806. sum64(this.h, 8, eh, el);
  22807. sum64(this.h, 10, fh, fl);
  22808. sum64(this.h, 12, gh, gl);
  22809. sum64(this.h, 14, hh, hl);
  22810. };
  22811. SHA512.prototype._digest = function digest(enc) {
  22812. if (enc === 'hex')
  22813. return utils.toHex32(this.h, 'big');
  22814. else
  22815. return utils.split32(this.h, 'big');
  22816. };
  22817. function ch64_hi(xh, xl, yh, yl, zh) {
  22818. var r = (xh & yh) ^ ((~xh) & zh);
  22819. if (r < 0)
  22820. r += 0x100000000;
  22821. return r;
  22822. }
  22823. function ch64_lo(xh, xl, yh, yl, zh, zl) {
  22824. var r = (xl & yl) ^ ((~xl) & zl);
  22825. if (r < 0)
  22826. r += 0x100000000;
  22827. return r;
  22828. }
  22829. function maj64_hi(xh, xl, yh, yl, zh) {
  22830. var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);
  22831. if (r < 0)
  22832. r += 0x100000000;
  22833. return r;
  22834. }
  22835. function maj64_lo(xh, xl, yh, yl, zh, zl) {
  22836. var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);
  22837. if (r < 0)
  22838. r += 0x100000000;
  22839. return r;
  22840. }
  22841. function s0_512_hi(xh, xl) {
  22842. var c0_hi = rotr64_hi(xh, xl, 28);
  22843. var c1_hi = rotr64_hi(xl, xh, 2); // 34
  22844. var c2_hi = rotr64_hi(xl, xh, 7); // 39
  22845. var r = c0_hi ^ c1_hi ^ c2_hi;
  22846. if (r < 0)
  22847. r += 0x100000000;
  22848. return r;
  22849. }
  22850. function s0_512_lo(xh, xl) {
  22851. var c0_lo = rotr64_lo(xh, xl, 28);
  22852. var c1_lo = rotr64_lo(xl, xh, 2); // 34
  22853. var c2_lo = rotr64_lo(xl, xh, 7); // 39
  22854. var r = c0_lo ^ c1_lo ^ c2_lo;
  22855. if (r < 0)
  22856. r += 0x100000000;
  22857. return r;
  22858. }
  22859. function s1_512_hi(xh, xl) {
  22860. var c0_hi = rotr64_hi(xh, xl, 14);
  22861. var c1_hi = rotr64_hi(xh, xl, 18);
  22862. var c2_hi = rotr64_hi(xl, xh, 9); // 41
  22863. var r = c0_hi ^ c1_hi ^ c2_hi;
  22864. if (r < 0)
  22865. r += 0x100000000;
  22866. return r;
  22867. }
  22868. function s1_512_lo(xh, xl) {
  22869. var c0_lo = rotr64_lo(xh, xl, 14);
  22870. var c1_lo = rotr64_lo(xh, xl, 18);
  22871. var c2_lo = rotr64_lo(xl, xh, 9); // 41
  22872. var r = c0_lo ^ c1_lo ^ c2_lo;
  22873. if (r < 0)
  22874. r += 0x100000000;
  22875. return r;
  22876. }
  22877. function g0_512_hi(xh, xl) {
  22878. var c0_hi = rotr64_hi(xh, xl, 1);
  22879. var c1_hi = rotr64_hi(xh, xl, 8);
  22880. var c2_hi = shr64_hi(xh, xl, 7);
  22881. var r = c0_hi ^ c1_hi ^ c2_hi;
  22882. if (r < 0)
  22883. r += 0x100000000;
  22884. return r;
  22885. }
  22886. function g0_512_lo(xh, xl) {
  22887. var c0_lo = rotr64_lo(xh, xl, 1);
  22888. var c1_lo = rotr64_lo(xh, xl, 8);
  22889. var c2_lo = shr64_lo(xh, xl, 7);
  22890. var r = c0_lo ^ c1_lo ^ c2_lo;
  22891. if (r < 0)
  22892. r += 0x100000000;
  22893. return r;
  22894. }
  22895. function g1_512_hi(xh, xl) {
  22896. var c0_hi = rotr64_hi(xh, xl, 19);
  22897. var c1_hi = rotr64_hi(xl, xh, 29); // 61
  22898. var c2_hi = shr64_hi(xh, xl, 6);
  22899. var r = c0_hi ^ c1_hi ^ c2_hi;
  22900. if (r < 0)
  22901. r += 0x100000000;
  22902. return r;
  22903. }
  22904. function g1_512_lo(xh, xl) {
  22905. var c0_lo = rotr64_lo(xh, xl, 19);
  22906. var c1_lo = rotr64_lo(xl, xh, 29); // 61
  22907. var c2_lo = shr64_lo(xh, xl, 6);
  22908. var r = c0_lo ^ c1_lo ^ c2_lo;
  22909. if (r < 0)
  22910. r += 0x100000000;
  22911. return r;
  22912. }
  22913. /***/ }),
  22914. /***/ 193:
  22915. /*!*************************************************!*\
  22916. !*** ./node_modules/hash.js/lib/hash/ripemd.js ***!
  22917. \*************************************************/
  22918. /*! no static exports found */
  22919. /***/ (function(module, exports, __webpack_require__) {
  22920. "use strict";
  22921. var utils = __webpack_require__(/*! ./utils */ 184);
  22922. var common = __webpack_require__(/*! ./common */ 185);
  22923. var rotl32 = utils.rotl32;
  22924. var sum32 = utils.sum32;
  22925. var sum32_3 = utils.sum32_3;
  22926. var sum32_4 = utils.sum32_4;
  22927. var BlockHash = common.BlockHash;
  22928. function RIPEMD160() {
  22929. if (!(this instanceof RIPEMD160))
  22930. return new RIPEMD160();
  22931. BlockHash.call(this);
  22932. this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];
  22933. this.endian = 'little';
  22934. }
  22935. utils.inherits(RIPEMD160, BlockHash);
  22936. exports.ripemd160 = RIPEMD160;
  22937. RIPEMD160.blockSize = 512;
  22938. RIPEMD160.outSize = 160;
  22939. RIPEMD160.hmacStrength = 192;
  22940. RIPEMD160.padLength = 64;
  22941. RIPEMD160.prototype._update = function update(msg, start) {
  22942. var A = this.h[0];
  22943. var B = this.h[1];
  22944. var C = this.h[2];
  22945. var D = this.h[3];
  22946. var E = this.h[4];
  22947. var Ah = A;
  22948. var Bh = B;
  22949. var Ch = C;
  22950. var Dh = D;
  22951. var Eh = E;
  22952. for (var j = 0; j < 80; j++) {
  22953. var T = sum32(
  22954. rotl32(
  22955. sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),
  22956. s[j]),
  22957. E);
  22958. A = E;
  22959. E = D;
  22960. D = rotl32(C, 10);
  22961. C = B;
  22962. B = T;
  22963. T = sum32(
  22964. rotl32(
  22965. sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),
  22966. sh[j]),
  22967. Eh);
  22968. Ah = Eh;
  22969. Eh = Dh;
  22970. Dh = rotl32(Ch, 10);
  22971. Ch = Bh;
  22972. Bh = T;
  22973. }
  22974. T = sum32_3(this.h[1], C, Dh);
  22975. this.h[1] = sum32_3(this.h[2], D, Eh);
  22976. this.h[2] = sum32_3(this.h[3], E, Ah);
  22977. this.h[3] = sum32_3(this.h[4], A, Bh);
  22978. this.h[4] = sum32_3(this.h[0], B, Ch);
  22979. this.h[0] = T;
  22980. };
  22981. RIPEMD160.prototype._digest = function digest(enc) {
  22982. if (enc === 'hex')
  22983. return utils.toHex32(this.h, 'little');
  22984. else
  22985. return utils.split32(this.h, 'little');
  22986. };
  22987. function f(j, x, y, z) {
  22988. if (j <= 15)
  22989. return x ^ y ^ z;
  22990. else if (j <= 31)
  22991. return (x & y) | ((~x) & z);
  22992. else if (j <= 47)
  22993. return (x | (~y)) ^ z;
  22994. else if (j <= 63)
  22995. return (x & z) | (y & (~z));
  22996. else
  22997. return x ^ (y | (~z));
  22998. }
  22999. function K(j) {
  23000. if (j <= 15)
  23001. return 0x00000000;
  23002. else if (j <= 31)
  23003. return 0x5a827999;
  23004. else if (j <= 47)
  23005. return 0x6ed9eba1;
  23006. else if (j <= 63)
  23007. return 0x8f1bbcdc;
  23008. else
  23009. return 0xa953fd4e;
  23010. }
  23011. function Kh(j) {
  23012. if (j <= 15)
  23013. return 0x50a28be6;
  23014. else if (j <= 31)
  23015. return 0x5c4dd124;
  23016. else if (j <= 47)
  23017. return 0x6d703ef3;
  23018. else if (j <= 63)
  23019. return 0x7a6d76e9;
  23020. else
  23021. return 0x00000000;
  23022. }
  23023. var r = [
  23024. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  23025. 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
  23026. 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
  23027. 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
  23028. 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
  23029. ];
  23030. var rh = [
  23031. 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
  23032. 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
  23033. 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
  23034. 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
  23035. 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
  23036. ];
  23037. var s = [
  23038. 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
  23039. 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
  23040. 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
  23041. 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
  23042. 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
  23043. ];
  23044. var sh = [
  23045. 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
  23046. 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
  23047. 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
  23048. 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
  23049. 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
  23050. ];
  23051. /***/ }),
  23052. /***/ 194:
  23053. /*!***********************************************!*\
  23054. !*** ./node_modules/hash.js/lib/hash/hmac.js ***!
  23055. \***********************************************/
  23056. /*! no static exports found */
  23057. /***/ (function(module, exports, __webpack_require__) {
  23058. "use strict";
  23059. var utils = __webpack_require__(/*! ./utils */ 184);
  23060. var assert = __webpack_require__(/*! minimalistic-assert */ 136);
  23061. function Hmac(hash, key, enc) {
  23062. if (!(this instanceof Hmac))
  23063. return new Hmac(hash, key, enc);
  23064. this.Hash = hash;
  23065. this.blockSize = hash.blockSize / 8;
  23066. this.outSize = hash.outSize / 8;
  23067. this.inner = null;
  23068. this.outer = null;
  23069. this._init(utils.toArray(key, enc));
  23070. }
  23071. module.exports = Hmac;
  23072. Hmac.prototype._init = function init(key) {
  23073. // Shorten key, if needed
  23074. if (key.length > this.blockSize)
  23075. key = new this.Hash().update(key).digest();
  23076. assert(key.length <= this.blockSize);
  23077. // Add padding to key
  23078. for (var i = key.length; i < this.blockSize; i++)
  23079. key.push(0);
  23080. for (i = 0; i < key.length; i++)
  23081. key[i] ^= 0x36;
  23082. this.inner = new this.Hash().update(key);
  23083. // 0x36 ^ 0x5c = 0x6a
  23084. for (i = 0; i < key.length; i++)
  23085. key[i] ^= 0x6a;
  23086. this.outer = new this.Hash().update(key);
  23087. };
  23088. Hmac.prototype.update = function update(msg, enc) {
  23089. this.inner.update(msg, enc);
  23090. return this;
  23091. };
  23092. Hmac.prototype.digest = function digest(enc) {
  23093. this.outer.update(this.inner.digest());
  23094. return this.outer.digest(enc);
  23095. };
  23096. /***/ }),
  23097. /***/ 195:
  23098. /*!*********************************************************************!*\
  23099. !*** ./node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js ***!
  23100. \*********************************************************************/
  23101. /*! no static exports found */
  23102. /***/ (function(module, exports) {
  23103. module.exports = {
  23104. doubles: {
  23105. step: 4,
  23106. points: [
  23107. [
  23108. 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a',
  23109. 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821',
  23110. ],
  23111. [
  23112. '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508',
  23113. '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf',
  23114. ],
  23115. [
  23116. '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739',
  23117. 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695',
  23118. ],
  23119. [
  23120. '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640',
  23121. '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9',
  23122. ],
  23123. [
  23124. '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c',
  23125. '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36',
  23126. ],
  23127. [
  23128. '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda',
  23129. '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f',
  23130. ],
  23131. [
  23132. 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa',
  23133. '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999',
  23134. ],
  23135. [
  23136. '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0',
  23137. 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09',
  23138. ],
  23139. [
  23140. 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d',
  23141. '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d',
  23142. ],
  23143. [
  23144. 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d',
  23145. 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088',
  23146. ],
  23147. [
  23148. 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1',
  23149. '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d',
  23150. ],
  23151. [
  23152. '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0',
  23153. '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8',
  23154. ],
  23155. [
  23156. '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047',
  23157. '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a',
  23158. ],
  23159. [
  23160. '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862',
  23161. '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453',
  23162. ],
  23163. [
  23164. '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7',
  23165. '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160',
  23166. ],
  23167. [
  23168. '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd',
  23169. '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0',
  23170. ],
  23171. [
  23172. '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83',
  23173. '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6',
  23174. ],
  23175. [
  23176. '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a',
  23177. '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589',
  23178. ],
  23179. [
  23180. '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8',
  23181. 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17',
  23182. ],
  23183. [
  23184. 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d',
  23185. '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda',
  23186. ],
  23187. [
  23188. 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725',
  23189. '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd',
  23190. ],
  23191. [
  23192. '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754',
  23193. '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2',
  23194. ],
  23195. [
  23196. '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c',
  23197. '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6',
  23198. ],
  23199. [
  23200. 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6',
  23201. '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f',
  23202. ],
  23203. [
  23204. '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39',
  23205. 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01',
  23206. ],
  23207. [
  23208. 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891',
  23209. '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3',
  23210. ],
  23211. [
  23212. 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b',
  23213. 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f',
  23214. ],
  23215. [
  23216. 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03',
  23217. '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7',
  23218. ],
  23219. [
  23220. 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d',
  23221. 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78',
  23222. ],
  23223. [
  23224. 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070',
  23225. '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1',
  23226. ],
  23227. [
  23228. '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4',
  23229. 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150',
  23230. ],
  23231. [
  23232. '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da',
  23233. '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82',
  23234. ],
  23235. [
  23236. 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11',
  23237. '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc',
  23238. ],
  23239. [
  23240. '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e',
  23241. 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b',
  23242. ],
  23243. [
  23244. 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41',
  23245. '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51',
  23246. ],
  23247. [
  23248. 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef',
  23249. '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45',
  23250. ],
  23251. [
  23252. 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8',
  23253. 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120',
  23254. ],
  23255. [
  23256. '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d',
  23257. '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84',
  23258. ],
  23259. [
  23260. '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96',
  23261. '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d',
  23262. ],
  23263. [
  23264. '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd',
  23265. 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d',
  23266. ],
  23267. [
  23268. '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5',
  23269. '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8',
  23270. ],
  23271. [
  23272. 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266',
  23273. '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8',
  23274. ],
  23275. [
  23276. '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71',
  23277. '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac',
  23278. ],
  23279. [
  23280. '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac',
  23281. 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f',
  23282. ],
  23283. [
  23284. '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751',
  23285. '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962',
  23286. ],
  23287. [
  23288. 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e',
  23289. '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907',
  23290. ],
  23291. [
  23292. '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241',
  23293. 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec',
  23294. ],
  23295. [
  23296. 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3',
  23297. 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d',
  23298. ],
  23299. [
  23300. 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f',
  23301. '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414',
  23302. ],
  23303. [
  23304. '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19',
  23305. 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd',
  23306. ],
  23307. [
  23308. '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be',
  23309. 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0',
  23310. ],
  23311. [
  23312. 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9',
  23313. '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811',
  23314. ],
  23315. [
  23316. 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2',
  23317. '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1',
  23318. ],
  23319. [
  23320. 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13',
  23321. '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c',
  23322. ],
  23323. [
  23324. '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c',
  23325. 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73',
  23326. ],
  23327. [
  23328. '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba',
  23329. '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd',
  23330. ],
  23331. [
  23332. 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151',
  23333. 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405',
  23334. ],
  23335. [
  23336. '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073',
  23337. 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589',
  23338. ],
  23339. [
  23340. '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458',
  23341. '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e',
  23342. ],
  23343. [
  23344. '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b',
  23345. '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27',
  23346. ],
  23347. [
  23348. 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366',
  23349. 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1',
  23350. ],
  23351. [
  23352. '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa',
  23353. '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482',
  23354. ],
  23355. [
  23356. '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0',
  23357. '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945',
  23358. ],
  23359. [
  23360. 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787',
  23361. '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573',
  23362. ],
  23363. [
  23364. 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e',
  23365. 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82',
  23366. ],
  23367. ],
  23368. },
  23369. naf: {
  23370. wnd: 7,
  23371. points: [
  23372. [
  23373. 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9',
  23374. '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672',
  23375. ],
  23376. [
  23377. '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4',
  23378. 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6',
  23379. ],
  23380. [
  23381. '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc',
  23382. '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da',
  23383. ],
  23384. [
  23385. 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe',
  23386. 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37',
  23387. ],
  23388. [
  23389. '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb',
  23390. 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b',
  23391. ],
  23392. [
  23393. 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8',
  23394. 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81',
  23395. ],
  23396. [
  23397. 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e',
  23398. '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58',
  23399. ],
  23400. [
  23401. 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34',
  23402. '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77',
  23403. ],
  23404. [
  23405. '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c',
  23406. '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a',
  23407. ],
  23408. [
  23409. '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5',
  23410. '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c',
  23411. ],
  23412. [
  23413. '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f',
  23414. '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67',
  23415. ],
  23416. [
  23417. '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714',
  23418. '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402',
  23419. ],
  23420. [
  23421. 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729',
  23422. 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55',
  23423. ],
  23424. [
  23425. 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db',
  23426. '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482',
  23427. ],
  23428. [
  23429. '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4',
  23430. 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82',
  23431. ],
  23432. [
  23433. '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5',
  23434. 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396',
  23435. ],
  23436. [
  23437. '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479',
  23438. '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49',
  23439. ],
  23440. [
  23441. '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d',
  23442. '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf',
  23443. ],
  23444. [
  23445. '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f',
  23446. '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a',
  23447. ],
  23448. [
  23449. '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb',
  23450. 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7',
  23451. ],
  23452. [
  23453. 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9',
  23454. 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933',
  23455. ],
  23456. [
  23457. '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963',
  23458. '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a',
  23459. ],
  23460. [
  23461. '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74',
  23462. '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6',
  23463. ],
  23464. [
  23465. 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530',
  23466. 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37',
  23467. ],
  23468. [
  23469. '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b',
  23470. '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e',
  23471. ],
  23472. [
  23473. 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247',
  23474. 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6',
  23475. ],
  23476. [
  23477. 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1',
  23478. 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476',
  23479. ],
  23480. [
  23481. '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120',
  23482. '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40',
  23483. ],
  23484. [
  23485. '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435',
  23486. '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61',
  23487. ],
  23488. [
  23489. '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18',
  23490. '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683',
  23491. ],
  23492. [
  23493. 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8',
  23494. '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5',
  23495. ],
  23496. [
  23497. '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb',
  23498. '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b',
  23499. ],
  23500. [
  23501. 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f',
  23502. '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417',
  23503. ],
  23504. [
  23505. '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143',
  23506. 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868',
  23507. ],
  23508. [
  23509. '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba',
  23510. 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a',
  23511. ],
  23512. [
  23513. 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45',
  23514. 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6',
  23515. ],
  23516. [
  23517. '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a',
  23518. '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996',
  23519. ],
  23520. [
  23521. '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e',
  23522. 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e',
  23523. ],
  23524. [
  23525. 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8',
  23526. 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d',
  23527. ],
  23528. [
  23529. '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c',
  23530. '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2',
  23531. ],
  23532. [
  23533. '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519',
  23534. 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e',
  23535. ],
  23536. [
  23537. '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab',
  23538. '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437',
  23539. ],
  23540. [
  23541. '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca',
  23542. 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311',
  23543. ],
  23544. [
  23545. 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf',
  23546. '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4',
  23547. ],
  23548. [
  23549. '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610',
  23550. '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575',
  23551. ],
  23552. [
  23553. '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4',
  23554. 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d',
  23555. ],
  23556. [
  23557. '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c',
  23558. 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d',
  23559. ],
  23560. [
  23561. 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940',
  23562. 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629',
  23563. ],
  23564. [
  23565. 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980',
  23566. 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06',
  23567. ],
  23568. [
  23569. '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3',
  23570. '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374',
  23571. ],
  23572. [
  23573. '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf',
  23574. '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee',
  23575. ],
  23576. [
  23577. 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63',
  23578. '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1',
  23579. ],
  23580. [
  23581. 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448',
  23582. 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b',
  23583. ],
  23584. [
  23585. '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf',
  23586. '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661',
  23587. ],
  23588. [
  23589. '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5',
  23590. '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6',
  23591. ],
  23592. [
  23593. 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6',
  23594. '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e',
  23595. ],
  23596. [
  23597. '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5',
  23598. '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d',
  23599. ],
  23600. [
  23601. 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99',
  23602. 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc',
  23603. ],
  23604. [
  23605. '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51',
  23606. 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4',
  23607. ],
  23608. [
  23609. '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5',
  23610. '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c',
  23611. ],
  23612. [
  23613. 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5',
  23614. '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b',
  23615. ],
  23616. [
  23617. 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997',
  23618. '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913',
  23619. ],
  23620. [
  23621. '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881',
  23622. '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154',
  23623. ],
  23624. [
  23625. '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5',
  23626. '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865',
  23627. ],
  23628. [
  23629. '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66',
  23630. 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc',
  23631. ],
  23632. [
  23633. '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726',
  23634. 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224',
  23635. ],
  23636. [
  23637. '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede',
  23638. '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e',
  23639. ],
  23640. [
  23641. '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94',
  23642. '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6',
  23643. ],
  23644. [
  23645. '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31',
  23646. '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511',
  23647. ],
  23648. [
  23649. '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51',
  23650. 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b',
  23651. ],
  23652. [
  23653. 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252',
  23654. 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2',
  23655. ],
  23656. [
  23657. '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5',
  23658. 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c',
  23659. ],
  23660. [
  23661. 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b',
  23662. '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3',
  23663. ],
  23664. [
  23665. 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4',
  23666. '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d',
  23667. ],
  23668. [
  23669. 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f',
  23670. '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700',
  23671. ],
  23672. [
  23673. 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889',
  23674. '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4',
  23675. ],
  23676. [
  23677. '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246',
  23678. 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196',
  23679. ],
  23680. [
  23681. '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984',
  23682. '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4',
  23683. ],
  23684. [
  23685. '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a',
  23686. 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257',
  23687. ],
  23688. [
  23689. 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030',
  23690. 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13',
  23691. ],
  23692. [
  23693. 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197',
  23694. '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096',
  23695. ],
  23696. [
  23697. 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593',
  23698. 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38',
  23699. ],
  23700. [
  23701. 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef',
  23702. '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f',
  23703. ],
  23704. [
  23705. '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38',
  23706. '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448',
  23707. ],
  23708. [
  23709. 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a',
  23710. '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a',
  23711. ],
  23712. [
  23713. 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111',
  23714. '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4',
  23715. ],
  23716. [
  23717. '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502',
  23718. '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437',
  23719. ],
  23720. [
  23721. '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea',
  23722. 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7',
  23723. ],
  23724. [
  23725. 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26',
  23726. '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d',
  23727. ],
  23728. [
  23729. 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986',
  23730. '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a',
  23731. ],
  23732. [
  23733. 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e',
  23734. '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54',
  23735. ],
  23736. [
  23737. '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4',
  23738. '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77',
  23739. ],
  23740. [
  23741. 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda',
  23742. 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517',
  23743. ],
  23744. [
  23745. '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859',
  23746. 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10',
  23747. ],
  23748. [
  23749. 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f',
  23750. 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125',
  23751. ],
  23752. [
  23753. 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c',
  23754. '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e',
  23755. ],
  23756. [
  23757. '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942',
  23758. 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1',
  23759. ],
  23760. [
  23761. 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a',
  23762. '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2',
  23763. ],
  23764. [
  23765. 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80',
  23766. '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423',
  23767. ],
  23768. [
  23769. 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d',
  23770. '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8',
  23771. ],
  23772. [
  23773. '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1',
  23774. 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758',
  23775. ],
  23776. [
  23777. '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63',
  23778. 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375',
  23779. ],
  23780. [
  23781. 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352',
  23782. '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d',
  23783. ],
  23784. [
  23785. '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193',
  23786. 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec',
  23787. ],
  23788. [
  23789. '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00',
  23790. '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0',
  23791. ],
  23792. [
  23793. '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58',
  23794. 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c',
  23795. ],
  23796. [
  23797. 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7',
  23798. 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4',
  23799. ],
  23800. [
  23801. '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8',
  23802. 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f',
  23803. ],
  23804. [
  23805. '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e',
  23806. '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649',
  23807. ],
  23808. [
  23809. '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d',
  23810. 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826',
  23811. ],
  23812. [
  23813. '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b',
  23814. '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5',
  23815. ],
  23816. [
  23817. 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f',
  23818. 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87',
  23819. ],
  23820. [
  23821. '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6',
  23822. '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b',
  23823. ],
  23824. [
  23825. 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297',
  23826. '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc',
  23827. ],
  23828. [
  23829. '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a',
  23830. '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c',
  23831. ],
  23832. [
  23833. 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c',
  23834. 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f',
  23835. ],
  23836. [
  23837. 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52',
  23838. '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a',
  23839. ],
  23840. [
  23841. 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb',
  23842. 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46',
  23843. ],
  23844. [
  23845. '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065',
  23846. 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f',
  23847. ],
  23848. [
  23849. '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917',
  23850. '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03',
  23851. ],
  23852. [
  23853. '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9',
  23854. 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08',
  23855. ],
  23856. [
  23857. '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3',
  23858. '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8',
  23859. ],
  23860. [
  23861. '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57',
  23862. '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373',
  23863. ],
  23864. [
  23865. '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66',
  23866. 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3',
  23867. ],
  23868. [
  23869. '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8',
  23870. '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8',
  23871. ],
  23872. [
  23873. '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721',
  23874. '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1',
  23875. ],
  23876. [
  23877. '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180',
  23878. '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9',
  23879. ],
  23880. ],
  23881. },
  23882. };
  23883. /***/ }),
  23884. /***/ 196:
  23885. /*!********************************************************!*\
  23886. !*** ./node_modules/elliptic/lib/elliptic/ec/index.js ***!
  23887. \********************************************************/
  23888. /*! no static exports found */
  23889. /***/ (function(module, exports, __webpack_require__) {
  23890. "use strict";
  23891. var BN = __webpack_require__(/*! bn.js */ 162);
  23892. var HmacDRBG = __webpack_require__(/*! hmac-drbg */ 197);
  23893. var utils = __webpack_require__(/*! ../utils */ 175);
  23894. var curves = __webpack_require__(/*! ../curves */ 182);
  23895. var rand = __webpack_require__(/*! brorand */ 166);
  23896. var assert = utils.assert;
  23897. var KeyPair = __webpack_require__(/*! ./key */ 198);
  23898. var Signature = __webpack_require__(/*! ./signature */ 199);
  23899. function EC(options) {
  23900. if (!(this instanceof EC))
  23901. return new EC(options);
  23902. // Shortcut `elliptic.ec(curve-name)`
  23903. if (typeof options === 'string') {
  23904. assert(Object.prototype.hasOwnProperty.call(curves, options),
  23905. 'Unknown curve ' + options);
  23906. options = curves[options];
  23907. }
  23908. // Shortcut for `elliptic.ec(elliptic.curves.curveName)`
  23909. if (options instanceof curves.PresetCurve)
  23910. options = { curve: options };
  23911. this.curve = options.curve.curve;
  23912. this.n = this.curve.n;
  23913. this.nh = this.n.ushrn(1);
  23914. this.g = this.curve.g;
  23915. // Point on curve
  23916. this.g = options.curve.g;
  23917. this.g.precompute(options.curve.n.bitLength() + 1);
  23918. // Hash for function for DRBG
  23919. this.hash = options.hash || options.curve.hash;
  23920. }
  23921. module.exports = EC;
  23922. EC.prototype.keyPair = function keyPair(options) {
  23923. return new KeyPair(this, options);
  23924. };
  23925. EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {
  23926. return KeyPair.fromPrivate(this, priv, enc);
  23927. };
  23928. EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {
  23929. return KeyPair.fromPublic(this, pub, enc);
  23930. };
  23931. EC.prototype.genKeyPair = function genKeyPair(options) {
  23932. if (!options)
  23933. options = {};
  23934. // Instantiate Hmac_DRBG
  23935. var drbg = new HmacDRBG({
  23936. hash: this.hash,
  23937. pers: options.pers,
  23938. persEnc: options.persEnc || 'utf8',
  23939. entropy: options.entropy || rand(this.hash.hmacStrength),
  23940. entropyEnc: options.entropy && options.entropyEnc || 'utf8',
  23941. nonce: this.n.toArray(),
  23942. });
  23943. var bytes = this.n.byteLength();
  23944. var ns2 = this.n.sub(new BN(2));
  23945. for (;;) {
  23946. var priv = new BN(drbg.generate(bytes));
  23947. if (priv.cmp(ns2) > 0)
  23948. continue;
  23949. priv.iaddn(1);
  23950. return this.keyFromPrivate(priv);
  23951. }
  23952. };
  23953. EC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {
  23954. var delta = msg.byteLength() * 8 - this.n.bitLength();
  23955. if (delta > 0)
  23956. msg = msg.ushrn(delta);
  23957. if (!truncOnly && msg.cmp(this.n) >= 0)
  23958. return msg.sub(this.n);
  23959. else
  23960. return msg;
  23961. };
  23962. EC.prototype.sign = function sign(msg, key, enc, options) {
  23963. if (typeof enc === 'object') {
  23964. options = enc;
  23965. enc = null;
  23966. }
  23967. if (!options)
  23968. options = {};
  23969. key = this.keyFromPrivate(key, enc);
  23970. msg = this._truncateToN(new BN(msg, 16));
  23971. // Zero-extend key to provide enough entropy
  23972. var bytes = this.n.byteLength();
  23973. var bkey = key.getPrivate().toArray('be', bytes);
  23974. // Zero-extend nonce to have the same byte size as N
  23975. var nonce = msg.toArray('be', bytes);
  23976. // Instantiate Hmac_DRBG
  23977. var drbg = new HmacDRBG({
  23978. hash: this.hash,
  23979. entropy: bkey,
  23980. nonce: nonce,
  23981. pers: options.pers,
  23982. persEnc: options.persEnc || 'utf8',
  23983. });
  23984. // Number of bytes to generate
  23985. var ns1 = this.n.sub(new BN(1));
  23986. for (var iter = 0; ; iter++) {
  23987. var k = options.k ?
  23988. options.k(iter) :
  23989. new BN(drbg.generate(this.n.byteLength()));
  23990. k = this._truncateToN(k, true);
  23991. if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)
  23992. continue;
  23993. var kp = this.g.mul(k);
  23994. if (kp.isInfinity())
  23995. continue;
  23996. var kpX = kp.getX();
  23997. var r = kpX.umod(this.n);
  23998. if (r.cmpn(0) === 0)
  23999. continue;
  24000. var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));
  24001. s = s.umod(this.n);
  24002. if (s.cmpn(0) === 0)
  24003. continue;
  24004. var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |
  24005. (kpX.cmp(r) !== 0 ? 2 : 0);
  24006. // Use complement of `s`, if it is > `n / 2`
  24007. if (options.canonical && s.cmp(this.nh) > 0) {
  24008. s = this.n.sub(s);
  24009. recoveryParam ^= 1;
  24010. }
  24011. return new Signature({ r: r, s: s, recoveryParam: recoveryParam });
  24012. }
  24013. };
  24014. EC.prototype.verify = function verify(msg, signature, key, enc) {
  24015. msg = this._truncateToN(new BN(msg, 16));
  24016. key = this.keyFromPublic(key, enc);
  24017. signature = new Signature(signature, 'hex');
  24018. // Perform primitive values validation
  24019. var r = signature.r;
  24020. var s = signature.s;
  24021. if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)
  24022. return false;
  24023. if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)
  24024. return false;
  24025. // Validate signature
  24026. var sinv = s.invm(this.n);
  24027. var u1 = sinv.mul(msg).umod(this.n);
  24028. var u2 = sinv.mul(r).umod(this.n);
  24029. var p;
  24030. if (!this.curve._maxwellTrick) {
  24031. p = this.g.mulAdd(u1, key.getPublic(), u2);
  24032. if (p.isInfinity())
  24033. return false;
  24034. return p.getX().umod(this.n).cmp(r) === 0;
  24035. }
  24036. // NOTE: Greg Maxwell's trick, inspired by:
  24037. // https://git.io/vad3K
  24038. p = this.g.jmulAdd(u1, key.getPublic(), u2);
  24039. if (p.isInfinity())
  24040. return false;
  24041. // Compare `p.x` of Jacobian point with `r`,
  24042. // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the
  24043. // inverse of `p.z^2`
  24044. return p.eqXToP(r);
  24045. };
  24046. EC.prototype.recoverPubKey = function(msg, signature, j, enc) {
  24047. assert((3 & j) === j, 'The recovery param is more than two bits');
  24048. signature = new Signature(signature, enc);
  24049. var n = this.n;
  24050. var e = new BN(msg);
  24051. var r = signature.r;
  24052. var s = signature.s;
  24053. // A set LSB signifies that the y-coordinate is odd
  24054. var isYOdd = j & 1;
  24055. var isSecondKey = j >> 1;
  24056. if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)
  24057. throw new Error('Unable to find sencond key candinate');
  24058. // 1.1. Let x = r + jn.
  24059. if (isSecondKey)
  24060. r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);
  24061. else
  24062. r = this.curve.pointFromX(r, isYOdd);
  24063. var rInv = signature.r.invm(n);
  24064. var s1 = n.sub(e).mul(rInv).umod(n);
  24065. var s2 = s.mul(rInv).umod(n);
  24066. // 1.6.1 Compute Q = r^-1 (sR - eG)
  24067. // Q = r^-1 (sR + -eG)
  24068. return this.g.mulAdd(s1, r, s2);
  24069. };
  24070. EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {
  24071. signature = new Signature(signature, enc);
  24072. if (signature.recoveryParam !== null)
  24073. return signature.recoveryParam;
  24074. for (var i = 0; i < 4; i++) {
  24075. var Qprime;
  24076. try {
  24077. Qprime = this.recoverPubKey(e, signature, i);
  24078. } catch (e) {
  24079. continue;
  24080. }
  24081. if (Qprime.eq(Q))
  24082. return i;
  24083. }
  24084. throw new Error('Unable to find valid recovery factor');
  24085. };
  24086. /***/ }),
  24087. /***/ 197:
  24088. /*!*************************************************!*\
  24089. !*** ./node_modules/hmac-drbg/lib/hmac-drbg.js ***!
  24090. \*************************************************/
  24091. /*! no static exports found */
  24092. /***/ (function(module, exports, __webpack_require__) {
  24093. "use strict";
  24094. var hash = __webpack_require__(/*! hash.js */ 183);
  24095. var utils = __webpack_require__(/*! minimalistic-crypto-utils */ 176);
  24096. var assert = __webpack_require__(/*! minimalistic-assert */ 136);
  24097. function HmacDRBG(options) {
  24098. if (!(this instanceof HmacDRBG))
  24099. return new HmacDRBG(options);
  24100. this.hash = options.hash;
  24101. this.predResist = !!options.predResist;
  24102. this.outLen = this.hash.outSize;
  24103. this.minEntropy = options.minEntropy || this.hash.hmacStrength;
  24104. this._reseed = null;
  24105. this.reseedInterval = null;
  24106. this.K = null;
  24107. this.V = null;
  24108. var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');
  24109. var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');
  24110. var pers = utils.toArray(options.pers, options.persEnc || 'hex');
  24111. assert(entropy.length >= (this.minEntropy / 8),
  24112. 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');
  24113. this._init(entropy, nonce, pers);
  24114. }
  24115. module.exports = HmacDRBG;
  24116. HmacDRBG.prototype._init = function init(entropy, nonce, pers) {
  24117. var seed = entropy.concat(nonce).concat(pers);
  24118. this.K = new Array(this.outLen / 8);
  24119. this.V = new Array(this.outLen / 8);
  24120. for (var i = 0; i < this.V.length; i++) {
  24121. this.K[i] = 0x00;
  24122. this.V[i] = 0x01;
  24123. }
  24124. this._update(seed);
  24125. this._reseed = 1;
  24126. this.reseedInterval = 0x1000000000000; // 2^48
  24127. };
  24128. HmacDRBG.prototype._hmac = function hmac() {
  24129. return new hash.hmac(this.hash, this.K);
  24130. };
  24131. HmacDRBG.prototype._update = function update(seed) {
  24132. var kmac = this._hmac()
  24133. .update(this.V)
  24134. .update([ 0x00 ]);
  24135. if (seed)
  24136. kmac = kmac.update(seed);
  24137. this.K = kmac.digest();
  24138. this.V = this._hmac().update(this.V).digest();
  24139. if (!seed)
  24140. return;
  24141. this.K = this._hmac()
  24142. .update(this.V)
  24143. .update([ 0x01 ])
  24144. .update(seed)
  24145. .digest();
  24146. this.V = this._hmac().update(this.V).digest();
  24147. };
  24148. HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {
  24149. // Optional entropy enc
  24150. if (typeof entropyEnc !== 'string') {
  24151. addEnc = add;
  24152. add = entropyEnc;
  24153. entropyEnc = null;
  24154. }
  24155. entropy = utils.toArray(entropy, entropyEnc);
  24156. add = utils.toArray(add, addEnc);
  24157. assert(entropy.length >= (this.minEntropy / 8),
  24158. 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');
  24159. this._update(entropy.concat(add || []));
  24160. this._reseed = 1;
  24161. };
  24162. HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {
  24163. if (this._reseed > this.reseedInterval)
  24164. throw new Error('Reseed is required');
  24165. // Optional encoding
  24166. if (typeof enc !== 'string') {
  24167. addEnc = add;
  24168. add = enc;
  24169. enc = null;
  24170. }
  24171. // Optional additional data
  24172. if (add) {
  24173. add = utils.toArray(add, addEnc || 'hex');
  24174. this._update(add);
  24175. }
  24176. var temp = [];
  24177. while (temp.length < len) {
  24178. this.V = this._hmac().update(this.V).digest();
  24179. temp = temp.concat(this.V);
  24180. }
  24181. var res = temp.slice(0, len);
  24182. this._update(add);
  24183. this._reseed++;
  24184. return utils.encode(res, enc);
  24185. };
  24186. /***/ }),
  24187. /***/ 198:
  24188. /*!******************************************************!*\
  24189. !*** ./node_modules/elliptic/lib/elliptic/ec/key.js ***!
  24190. \******************************************************/
  24191. /*! no static exports found */
  24192. /***/ (function(module, exports, __webpack_require__) {
  24193. "use strict";
  24194. var BN = __webpack_require__(/*! bn.js */ 162);
  24195. var utils = __webpack_require__(/*! ../utils */ 175);
  24196. var assert = utils.assert;
  24197. function KeyPair(ec, options) {
  24198. this.ec = ec;
  24199. this.priv = null;
  24200. this.pub = null;
  24201. // KeyPair(ec, { priv: ..., pub: ... })
  24202. if (options.priv)
  24203. this._importPrivate(options.priv, options.privEnc);
  24204. if (options.pub)
  24205. this._importPublic(options.pub, options.pubEnc);
  24206. }
  24207. module.exports = KeyPair;
  24208. KeyPair.fromPublic = function fromPublic(ec, pub, enc) {
  24209. if (pub instanceof KeyPair)
  24210. return pub;
  24211. return new KeyPair(ec, {
  24212. pub: pub,
  24213. pubEnc: enc,
  24214. });
  24215. };
  24216. KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {
  24217. if (priv instanceof KeyPair)
  24218. return priv;
  24219. return new KeyPair(ec, {
  24220. priv: priv,
  24221. privEnc: enc,
  24222. });
  24223. };
  24224. KeyPair.prototype.validate = function validate() {
  24225. var pub = this.getPublic();
  24226. if (pub.isInfinity())
  24227. return { result: false, reason: 'Invalid public key' };
  24228. if (!pub.validate())
  24229. return { result: false, reason: 'Public key is not a point' };
  24230. if (!pub.mul(this.ec.curve.n).isInfinity())
  24231. return { result: false, reason: 'Public key * N != O' };
  24232. return { result: true, reason: null };
  24233. };
  24234. KeyPair.prototype.getPublic = function getPublic(compact, enc) {
  24235. // compact is optional argument
  24236. if (typeof compact === 'string') {
  24237. enc = compact;
  24238. compact = null;
  24239. }
  24240. if (!this.pub)
  24241. this.pub = this.ec.g.mul(this.priv);
  24242. if (!enc)
  24243. return this.pub;
  24244. return this.pub.encode(enc, compact);
  24245. };
  24246. KeyPair.prototype.getPrivate = function getPrivate(enc) {
  24247. if (enc === 'hex')
  24248. return this.priv.toString(16, 2);
  24249. else
  24250. return this.priv;
  24251. };
  24252. KeyPair.prototype._importPrivate = function _importPrivate(key, enc) {
  24253. this.priv = new BN(key, enc || 16);
  24254. // Ensure that the priv won't be bigger than n, otherwise we may fail
  24255. // in fixed multiplication method
  24256. this.priv = this.priv.umod(this.ec.curve.n);
  24257. };
  24258. KeyPair.prototype._importPublic = function _importPublic(key, enc) {
  24259. if (key.x || key.y) {
  24260. // Montgomery points only have an `x` coordinate.
  24261. // Weierstrass/Edwards points on the other hand have both `x` and
  24262. // `y` coordinates.
  24263. if (this.ec.curve.type === 'mont') {
  24264. assert(key.x, 'Need x coordinate');
  24265. } else if (this.ec.curve.type === 'short' ||
  24266. this.ec.curve.type === 'edwards') {
  24267. assert(key.x && key.y, 'Need both x and y coordinate');
  24268. }
  24269. this.pub = this.ec.curve.point(key.x, key.y);
  24270. return;
  24271. }
  24272. this.pub = this.ec.curve.decodePoint(key, enc);
  24273. };
  24274. // ECDH
  24275. KeyPair.prototype.derive = function derive(pub) {
  24276. if(!pub.validate()) {
  24277. assert(pub.validate(), 'public point not validated');
  24278. }
  24279. return pub.mul(this.priv).getX();
  24280. };
  24281. // ECDSA
  24282. KeyPair.prototype.sign = function sign(msg, enc, options) {
  24283. return this.ec.sign(msg, this, enc, options);
  24284. };
  24285. KeyPair.prototype.verify = function verify(msg, signature) {
  24286. return this.ec.verify(msg, signature, this);
  24287. };
  24288. KeyPair.prototype.inspect = function inspect() {
  24289. return '<Key priv: ' + (this.priv && this.priv.toString(16, 2)) +
  24290. ' pub: ' + (this.pub && this.pub.inspect()) + ' >';
  24291. };
  24292. /***/ }),
  24293. /***/ 199:
  24294. /*!************************************************************!*\
  24295. !*** ./node_modules/elliptic/lib/elliptic/ec/signature.js ***!
  24296. \************************************************************/
  24297. /*! no static exports found */
  24298. /***/ (function(module, exports, __webpack_require__) {
  24299. "use strict";
  24300. var BN = __webpack_require__(/*! bn.js */ 162);
  24301. var utils = __webpack_require__(/*! ../utils */ 175);
  24302. var assert = utils.assert;
  24303. function Signature(options, enc) {
  24304. if (options instanceof Signature)
  24305. return options;
  24306. if (this._importDER(options, enc))
  24307. return;
  24308. assert(options.r && options.s, 'Signature without r or s');
  24309. this.r = new BN(options.r, 16);
  24310. this.s = new BN(options.s, 16);
  24311. if (options.recoveryParam === undefined)
  24312. this.recoveryParam = null;
  24313. else
  24314. this.recoveryParam = options.recoveryParam;
  24315. }
  24316. module.exports = Signature;
  24317. function Position() {
  24318. this.place = 0;
  24319. }
  24320. function getLength(buf, p) {
  24321. var initial = buf[p.place++];
  24322. if (!(initial & 0x80)) {
  24323. return initial;
  24324. }
  24325. var octetLen = initial & 0xf;
  24326. // Indefinite length or overflow
  24327. if (octetLen === 0 || octetLen > 4) {
  24328. return false;
  24329. }
  24330. var val = 0;
  24331. for (var i = 0, off = p.place; i < octetLen; i++, off++) {
  24332. val <<= 8;
  24333. val |= buf[off];
  24334. val >>>= 0;
  24335. }
  24336. // Leading zeroes
  24337. if (val <= 0x7f) {
  24338. return false;
  24339. }
  24340. p.place = off;
  24341. return val;
  24342. }
  24343. function rmPadding(buf) {
  24344. var i = 0;
  24345. var len = buf.length - 1;
  24346. while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {
  24347. i++;
  24348. }
  24349. if (i === 0) {
  24350. return buf;
  24351. }
  24352. return buf.slice(i);
  24353. }
  24354. Signature.prototype._importDER = function _importDER(data, enc) {
  24355. data = utils.toArray(data, enc);
  24356. var p = new Position();
  24357. if (data[p.place++] !== 0x30) {
  24358. return false;
  24359. }
  24360. var len = getLength(data, p);
  24361. if (len === false) {
  24362. return false;
  24363. }
  24364. if ((len + p.place) !== data.length) {
  24365. return false;
  24366. }
  24367. if (data[p.place++] !== 0x02) {
  24368. return false;
  24369. }
  24370. var rlen = getLength(data, p);
  24371. if (rlen === false) {
  24372. return false;
  24373. }
  24374. var r = data.slice(p.place, rlen + p.place);
  24375. p.place += rlen;
  24376. if (data[p.place++] !== 0x02) {
  24377. return false;
  24378. }
  24379. var slen = getLength(data, p);
  24380. if (slen === false) {
  24381. return false;
  24382. }
  24383. if (data.length !== slen + p.place) {
  24384. return false;
  24385. }
  24386. var s = data.slice(p.place, slen + p.place);
  24387. if (r[0] === 0) {
  24388. if (r[1] & 0x80) {
  24389. r = r.slice(1);
  24390. } else {
  24391. // Leading zeroes
  24392. return false;
  24393. }
  24394. }
  24395. if (s[0] === 0) {
  24396. if (s[1] & 0x80) {
  24397. s = s.slice(1);
  24398. } else {
  24399. // Leading zeroes
  24400. return false;
  24401. }
  24402. }
  24403. this.r = new BN(r);
  24404. this.s = new BN(s);
  24405. this.recoveryParam = null;
  24406. return true;
  24407. };
  24408. function constructLength(arr, len) {
  24409. if (len < 0x80) {
  24410. arr.push(len);
  24411. return;
  24412. }
  24413. var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);
  24414. arr.push(octets | 0x80);
  24415. while (--octets) {
  24416. arr.push((len >>> (octets << 3)) & 0xff);
  24417. }
  24418. arr.push(len);
  24419. }
  24420. Signature.prototype.toDER = function toDER(enc) {
  24421. var r = this.r.toArray();
  24422. var s = this.s.toArray();
  24423. // Pad values
  24424. if (r[0] & 0x80)
  24425. r = [ 0 ].concat(r);
  24426. // Pad values
  24427. if (s[0] & 0x80)
  24428. s = [ 0 ].concat(s);
  24429. r = rmPadding(r);
  24430. s = rmPadding(s);
  24431. while (!s[0] && !(s[1] & 0x80)) {
  24432. s = s.slice(1);
  24433. }
  24434. var arr = [ 0x02 ];
  24435. constructLength(arr, r.length);
  24436. arr = arr.concat(r);
  24437. arr.push(0x02);
  24438. constructLength(arr, s.length);
  24439. var backHalf = arr.concat(s);
  24440. var res = [ 0x30 ];
  24441. constructLength(res, backHalf.length);
  24442. res = res.concat(backHalf);
  24443. return utils.encode(res, enc);
  24444. };
  24445. /***/ }),
  24446. /***/ 2:
  24447. /*!************************************************************!*\
  24448. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  24449. \************************************************************/
  24450. /*! no static exports found */
  24451. /***/ (function(module, exports, __webpack_require__) {
  24452. "use strict";
  24453. /* WEBPACK VAR INJECTION */(function(wx, global) {
  24454. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  24455. Object.defineProperty(exports, "__esModule", {
  24456. value: true
  24457. });
  24458. exports.createApp = createApp;
  24459. exports.createComponent = createComponent;
  24460. exports.createPage = createPage;
  24461. exports.createPlugin = createPlugin;
  24462. exports.createSubpackageApp = createSubpackageApp;
  24463. exports.default = void 0;
  24464. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  24465. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  24466. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  24467. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  24468. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  24469. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  24470. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  24471. 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; }
  24472. 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) { (0, _defineProperty2.default)(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; }
  24473. var realAtob;
  24474. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  24475. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  24476. if (typeof atob !== 'function') {
  24477. realAtob = function realAtob(str) {
  24478. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  24479. if (!b64re.test(str)) {
  24480. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  24481. }
  24482. // Adding the padding if missing, for semplicity
  24483. str += '=='.slice(2 - (str.length & 3));
  24484. var bitmap;
  24485. var result = '';
  24486. var r1;
  24487. var r2;
  24488. var i = 0;
  24489. for (; i < str.length;) {
  24490. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  24491. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  24492. }
  24493. return result;
  24494. };
  24495. } else {
  24496. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  24497. realAtob = atob;
  24498. }
  24499. function b64DecodeUnicode(str) {
  24500. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  24501. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  24502. }).join(''));
  24503. }
  24504. function getCurrentUserInfo() {
  24505. var token = wx.getStorageSync('uni_id_token') || '';
  24506. var tokenArr = token.split('.');
  24507. if (!token || tokenArr.length !== 3) {
  24508. return {
  24509. uid: null,
  24510. role: [],
  24511. permission: [],
  24512. tokenExpired: 0
  24513. };
  24514. }
  24515. var userInfo;
  24516. try {
  24517. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  24518. } catch (error) {
  24519. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  24520. }
  24521. userInfo.tokenExpired = userInfo.exp * 1000;
  24522. delete userInfo.exp;
  24523. delete userInfo.iat;
  24524. return userInfo;
  24525. }
  24526. function uniIdMixin(Vue) {
  24527. Vue.prototype.uniIDHasRole = function (roleId) {
  24528. var _getCurrentUserInfo = getCurrentUserInfo(),
  24529. role = _getCurrentUserInfo.role;
  24530. return role.indexOf(roleId) > -1;
  24531. };
  24532. Vue.prototype.uniIDHasPermission = function (permissionId) {
  24533. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  24534. permission = _getCurrentUserInfo2.permission;
  24535. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  24536. };
  24537. Vue.prototype.uniIDTokenValid = function () {
  24538. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  24539. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  24540. return tokenExpired > Date.now();
  24541. };
  24542. }
  24543. var _toString = Object.prototype.toString;
  24544. var hasOwnProperty = Object.prototype.hasOwnProperty;
  24545. function isFn(fn) {
  24546. return typeof fn === 'function';
  24547. }
  24548. function isStr(str) {
  24549. return typeof str === 'string';
  24550. }
  24551. function isObject(obj) {
  24552. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  24553. }
  24554. function isPlainObject(obj) {
  24555. return _toString.call(obj) === '[object Object]';
  24556. }
  24557. function hasOwn(obj, key) {
  24558. return hasOwnProperty.call(obj, key);
  24559. }
  24560. function noop() {}
  24561. /**
  24562. * Create a cached version of a pure function.
  24563. */
  24564. function cached(fn) {
  24565. var cache = Object.create(null);
  24566. return function cachedFn(str) {
  24567. var hit = cache[str];
  24568. return hit || (cache[str] = fn(str));
  24569. };
  24570. }
  24571. /**
  24572. * Camelize a hyphen-delimited string.
  24573. */
  24574. var camelizeRE = /-(\w)/g;
  24575. var camelize = cached(function (str) {
  24576. return str.replace(camelizeRE, function (_, c) {
  24577. return c ? c.toUpperCase() : '';
  24578. });
  24579. });
  24580. function sortObject(obj) {
  24581. var sortObj = {};
  24582. if (isPlainObject(obj)) {
  24583. Object.keys(obj).sort().forEach(function (key) {
  24584. sortObj[key] = obj[key];
  24585. });
  24586. }
  24587. return !Object.keys(sortObj) ? obj : sortObj;
  24588. }
  24589. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  24590. var globalInterceptors = {};
  24591. var scopedInterceptors = {};
  24592. function mergeHook(parentVal, childVal) {
  24593. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  24594. return res ? dedupeHooks(res) : res;
  24595. }
  24596. function dedupeHooks(hooks) {
  24597. var res = [];
  24598. for (var i = 0; i < hooks.length; i++) {
  24599. if (res.indexOf(hooks[i]) === -1) {
  24600. res.push(hooks[i]);
  24601. }
  24602. }
  24603. return res;
  24604. }
  24605. function removeHook(hooks, hook) {
  24606. var index = hooks.indexOf(hook);
  24607. if (index !== -1) {
  24608. hooks.splice(index, 1);
  24609. }
  24610. }
  24611. function mergeInterceptorHook(interceptor, option) {
  24612. Object.keys(option).forEach(function (hook) {
  24613. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  24614. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  24615. }
  24616. });
  24617. }
  24618. function removeInterceptorHook(interceptor, option) {
  24619. if (!interceptor || !option) {
  24620. return;
  24621. }
  24622. Object.keys(option).forEach(function (hook) {
  24623. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  24624. removeHook(interceptor[hook], option[hook]);
  24625. }
  24626. });
  24627. }
  24628. function addInterceptor(method, option) {
  24629. if (typeof method === 'string' && isPlainObject(option)) {
  24630. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  24631. } else if (isPlainObject(method)) {
  24632. mergeInterceptorHook(globalInterceptors, method);
  24633. }
  24634. }
  24635. function removeInterceptor(method, option) {
  24636. if (typeof method === 'string') {
  24637. if (isPlainObject(option)) {
  24638. removeInterceptorHook(scopedInterceptors[method], option);
  24639. } else {
  24640. delete scopedInterceptors[method];
  24641. }
  24642. } else if (isPlainObject(method)) {
  24643. removeInterceptorHook(globalInterceptors, method);
  24644. }
  24645. }
  24646. function wrapperHook(hook, params) {
  24647. return function (data) {
  24648. return hook(data, params) || data;
  24649. };
  24650. }
  24651. function isPromise(obj) {
  24652. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  24653. }
  24654. function queue(hooks, data, params) {
  24655. var promise = false;
  24656. for (var i = 0; i < hooks.length; i++) {
  24657. var hook = hooks[i];
  24658. if (promise) {
  24659. promise = Promise.resolve(wrapperHook(hook, params));
  24660. } else {
  24661. var res = hook(data, params);
  24662. if (isPromise(res)) {
  24663. promise = Promise.resolve(res);
  24664. }
  24665. if (res === false) {
  24666. return {
  24667. then: function then() {}
  24668. };
  24669. }
  24670. }
  24671. }
  24672. return promise || {
  24673. then: function then(callback) {
  24674. return callback(data);
  24675. }
  24676. };
  24677. }
  24678. function wrapperOptions(interceptor) {
  24679. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  24680. ['success', 'fail', 'complete'].forEach(function (name) {
  24681. if (Array.isArray(interceptor[name])) {
  24682. var oldCallback = options[name];
  24683. options[name] = function callbackInterceptor(res) {
  24684. queue(interceptor[name], res, options).then(function (res) {
  24685. /* eslint-disable no-mixed-operators */
  24686. return isFn(oldCallback) && oldCallback(res) || res;
  24687. });
  24688. };
  24689. }
  24690. });
  24691. return options;
  24692. }
  24693. function wrapperReturnValue(method, returnValue) {
  24694. var returnValueHooks = [];
  24695. if (Array.isArray(globalInterceptors.returnValue)) {
  24696. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  24697. }
  24698. var interceptor = scopedInterceptors[method];
  24699. if (interceptor && Array.isArray(interceptor.returnValue)) {
  24700. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  24701. }
  24702. returnValueHooks.forEach(function (hook) {
  24703. returnValue = hook(returnValue) || returnValue;
  24704. });
  24705. return returnValue;
  24706. }
  24707. function getApiInterceptorHooks(method) {
  24708. var interceptor = Object.create(null);
  24709. Object.keys(globalInterceptors).forEach(function (hook) {
  24710. if (hook !== 'returnValue') {
  24711. interceptor[hook] = globalInterceptors[hook].slice();
  24712. }
  24713. });
  24714. var scopedInterceptor = scopedInterceptors[method];
  24715. if (scopedInterceptor) {
  24716. Object.keys(scopedInterceptor).forEach(function (hook) {
  24717. if (hook !== 'returnValue') {
  24718. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  24719. }
  24720. });
  24721. }
  24722. return interceptor;
  24723. }
  24724. function invokeApi(method, api, options) {
  24725. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  24726. params[_key - 3] = arguments[_key];
  24727. }
  24728. var interceptor = getApiInterceptorHooks(method);
  24729. if (interceptor && Object.keys(interceptor).length) {
  24730. if (Array.isArray(interceptor.invoke)) {
  24731. var res = queue(interceptor.invoke, options);
  24732. return res.then(function (options) {
  24733. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  24734. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  24735. });
  24736. } else {
  24737. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  24738. }
  24739. }
  24740. return api.apply(void 0, [options].concat(params));
  24741. }
  24742. var promiseInterceptor = {
  24743. returnValue: function returnValue(res) {
  24744. if (!isPromise(res)) {
  24745. return res;
  24746. }
  24747. return new Promise(function (resolve, reject) {
  24748. res.then(function (res) {
  24749. if (res[0]) {
  24750. reject(res[0]);
  24751. } else {
  24752. resolve(res[1]);
  24753. }
  24754. });
  24755. });
  24756. }
  24757. };
  24758. var SYNC_API_RE = /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
  24759. var CONTEXT_API_RE = /^create|Manager$/;
  24760. // Context例外情况
  24761. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  24762. // 同步例外情况
  24763. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  24764. var CALLBACK_API_RE = /^on|^off/;
  24765. function isContextApi(name) {
  24766. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  24767. }
  24768. function isSyncApi(name) {
  24769. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  24770. }
  24771. function isCallbackApi(name) {
  24772. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  24773. }
  24774. function handlePromise(promise) {
  24775. return promise.then(function (data) {
  24776. return [null, data];
  24777. }).catch(function (err) {
  24778. return [err];
  24779. });
  24780. }
  24781. function shouldPromise(name) {
  24782. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  24783. return false;
  24784. }
  24785. return true;
  24786. }
  24787. /* eslint-disable no-extend-native */
  24788. if (!Promise.prototype.finally) {
  24789. Promise.prototype.finally = function (callback) {
  24790. var promise = this.constructor;
  24791. return this.then(function (value) {
  24792. return promise.resolve(callback()).then(function () {
  24793. return value;
  24794. });
  24795. }, function (reason) {
  24796. return promise.resolve(callback()).then(function () {
  24797. throw reason;
  24798. });
  24799. });
  24800. };
  24801. }
  24802. function promisify(name, api) {
  24803. if (!shouldPromise(name) || !isFn(api)) {
  24804. return api;
  24805. }
  24806. return function promiseApi() {
  24807. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  24808. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  24809. params[_key2 - 1] = arguments[_key2];
  24810. }
  24811. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  24812. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  24813. }
  24814. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  24815. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  24816. success: resolve,
  24817. fail: reject
  24818. })].concat(params));
  24819. })));
  24820. };
  24821. }
  24822. var EPS = 1e-4;
  24823. var BASE_DEVICE_WIDTH = 750;
  24824. var isIOS = false;
  24825. var deviceWidth = 0;
  24826. var deviceDPR = 0;
  24827. function checkDeviceWidth() {
  24828. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  24829. platform = _wx$getSystemInfoSync.platform,
  24830. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  24831. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  24832. deviceWidth = windowWidth;
  24833. deviceDPR = pixelRatio;
  24834. isIOS = platform === 'ios';
  24835. }
  24836. function upx2px(number, newDeviceWidth) {
  24837. if (deviceWidth === 0) {
  24838. checkDeviceWidth();
  24839. }
  24840. number = Number(number);
  24841. if (number === 0) {
  24842. return 0;
  24843. }
  24844. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  24845. if (result < 0) {
  24846. result = -result;
  24847. }
  24848. result = Math.floor(result + EPS);
  24849. if (result === 0) {
  24850. if (deviceDPR === 1 || !isIOS) {
  24851. result = 1;
  24852. } else {
  24853. result = 0.5;
  24854. }
  24855. }
  24856. return number < 0 ? -result : result;
  24857. }
  24858. var LOCALE_ZH_HANS = 'zh-Hans';
  24859. var LOCALE_ZH_HANT = 'zh-Hant';
  24860. var LOCALE_EN = 'en';
  24861. var LOCALE_FR = 'fr';
  24862. var LOCALE_ES = 'es';
  24863. var messages = {};
  24864. var locale;
  24865. {
  24866. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  24867. }
  24868. function initI18nMessages() {
  24869. if (!isEnableLocale()) {
  24870. return;
  24871. }
  24872. var localeKeys = Object.keys(__uniConfig.locales);
  24873. if (localeKeys.length) {
  24874. localeKeys.forEach(function (locale) {
  24875. var curMessages = messages[locale];
  24876. var userMessages = __uniConfig.locales[locale];
  24877. if (curMessages) {
  24878. Object.assign(curMessages, userMessages);
  24879. } else {
  24880. messages[locale] = userMessages;
  24881. }
  24882. });
  24883. }
  24884. }
  24885. initI18nMessages();
  24886. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  24887. var t = i18n.t;
  24888. var i18nMixin = i18n.mixin = {
  24889. beforeCreate: function beforeCreate() {
  24890. var _this = this;
  24891. var unwatch = i18n.i18n.watchLocale(function () {
  24892. _this.$forceUpdate();
  24893. });
  24894. this.$once('hook:beforeDestroy', function () {
  24895. unwatch();
  24896. });
  24897. },
  24898. methods: {
  24899. $$t: function $$t(key, values) {
  24900. return t(key, values);
  24901. }
  24902. }
  24903. };
  24904. var setLocale = i18n.setLocale;
  24905. var getLocale = i18n.getLocale;
  24906. function initAppLocale(Vue, appVm, locale) {
  24907. var state = Vue.observable({
  24908. locale: locale || i18n.getLocale()
  24909. });
  24910. var localeWatchers = [];
  24911. appVm.$watchLocale = function (fn) {
  24912. localeWatchers.push(fn);
  24913. };
  24914. Object.defineProperty(appVm, '$locale', {
  24915. get: function get() {
  24916. return state.locale;
  24917. },
  24918. set: function set(v) {
  24919. state.locale = v;
  24920. localeWatchers.forEach(function (watch) {
  24921. return watch(v);
  24922. });
  24923. }
  24924. });
  24925. }
  24926. function isEnableLocale() {
  24927. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  24928. }
  24929. function include(str, parts) {
  24930. return !!parts.find(function (part) {
  24931. return str.indexOf(part) !== -1;
  24932. });
  24933. }
  24934. function startsWith(str, parts) {
  24935. return parts.find(function (part) {
  24936. return str.indexOf(part) === 0;
  24937. });
  24938. }
  24939. function normalizeLocale(locale, messages) {
  24940. if (!locale) {
  24941. return;
  24942. }
  24943. locale = locale.trim().replace(/_/g, '-');
  24944. if (messages && messages[locale]) {
  24945. return locale;
  24946. }
  24947. locale = locale.toLowerCase();
  24948. if (locale === 'chinese') {
  24949. // 支付宝
  24950. return LOCALE_ZH_HANS;
  24951. }
  24952. if (locale.indexOf('zh') === 0) {
  24953. if (locale.indexOf('-hans') > -1) {
  24954. return LOCALE_ZH_HANS;
  24955. }
  24956. if (locale.indexOf('-hant') > -1) {
  24957. return LOCALE_ZH_HANT;
  24958. }
  24959. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  24960. return LOCALE_ZH_HANT;
  24961. }
  24962. return LOCALE_ZH_HANS;
  24963. }
  24964. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  24965. if (lang) {
  24966. return lang;
  24967. }
  24968. }
  24969. // export function initI18n() {
  24970. // const localeKeys = Object.keys(__uniConfig.locales || {})
  24971. // if (localeKeys.length) {
  24972. // localeKeys.forEach((locale) =>
  24973. // i18n.add(locale, __uniConfig.locales[locale])
  24974. // )
  24975. // }
  24976. // }
  24977. function getLocale$1() {
  24978. // 优先使用 $locale
  24979. if (isFn(getApp)) {
  24980. var app = getApp({
  24981. allowDefault: true
  24982. });
  24983. if (app && app.$vm) {
  24984. return app.$vm.$locale;
  24985. }
  24986. }
  24987. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  24988. }
  24989. function setLocale$1(locale) {
  24990. var app = isFn(getApp) ? getApp() : false;
  24991. if (!app) {
  24992. return false;
  24993. }
  24994. var oldLocale = app.$vm.$locale;
  24995. if (oldLocale !== locale) {
  24996. app.$vm.$locale = locale;
  24997. onLocaleChangeCallbacks.forEach(function (fn) {
  24998. return fn({
  24999. locale: locale
  25000. });
  25001. });
  25002. return true;
  25003. }
  25004. return false;
  25005. }
  25006. var onLocaleChangeCallbacks = [];
  25007. function onLocaleChange(fn) {
  25008. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  25009. onLocaleChangeCallbacks.push(fn);
  25010. }
  25011. }
  25012. if (typeof global !== 'undefined') {
  25013. global.getLocale = getLocale$1;
  25014. }
  25015. var interceptors = {
  25016. promiseInterceptor: promiseInterceptor
  25017. };
  25018. var baseApi = /*#__PURE__*/Object.freeze({
  25019. __proto__: null,
  25020. upx2px: upx2px,
  25021. getLocale: getLocale$1,
  25022. setLocale: setLocale$1,
  25023. onLocaleChange: onLocaleChange,
  25024. addInterceptor: addInterceptor,
  25025. removeInterceptor: removeInterceptor,
  25026. interceptors: interceptors
  25027. });
  25028. function findExistsPageIndex(url) {
  25029. var pages = getCurrentPages();
  25030. var len = pages.length;
  25031. while (len--) {
  25032. var page = pages[len];
  25033. if (page.$page && page.$page.fullPath === url) {
  25034. return len;
  25035. }
  25036. }
  25037. return -1;
  25038. }
  25039. var redirectTo = {
  25040. name: function name(fromArgs) {
  25041. if (fromArgs.exists === 'back' && fromArgs.delta) {
  25042. return 'navigateBack';
  25043. }
  25044. return 'redirectTo';
  25045. },
  25046. args: function args(fromArgs) {
  25047. if (fromArgs.exists === 'back' && fromArgs.url) {
  25048. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  25049. if (existsPageIndex !== -1) {
  25050. var delta = getCurrentPages().length - 1 - existsPageIndex;
  25051. if (delta > 0) {
  25052. fromArgs.delta = delta;
  25053. }
  25054. }
  25055. }
  25056. }
  25057. };
  25058. var previewImage = {
  25059. args: function args(fromArgs) {
  25060. var currentIndex = parseInt(fromArgs.current);
  25061. if (isNaN(currentIndex)) {
  25062. return;
  25063. }
  25064. var urls = fromArgs.urls;
  25065. if (!Array.isArray(urls)) {
  25066. return;
  25067. }
  25068. var len = urls.length;
  25069. if (!len) {
  25070. return;
  25071. }
  25072. if (currentIndex < 0) {
  25073. currentIndex = 0;
  25074. } else if (currentIndex >= len) {
  25075. currentIndex = len - 1;
  25076. }
  25077. if (currentIndex > 0) {
  25078. fromArgs.current = urls[currentIndex];
  25079. fromArgs.urls = urls.filter(function (item, index) {
  25080. return index < currentIndex ? item !== urls[currentIndex] : true;
  25081. });
  25082. } else {
  25083. fromArgs.current = urls[0];
  25084. }
  25085. return {
  25086. indicator: false,
  25087. loop: false
  25088. };
  25089. }
  25090. };
  25091. var UUID_KEY = '__DC_STAT_UUID';
  25092. var deviceId;
  25093. function useDeviceId(result) {
  25094. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  25095. if (!deviceId) {
  25096. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  25097. wx.setStorage({
  25098. key: UUID_KEY,
  25099. data: deviceId
  25100. });
  25101. }
  25102. result.deviceId = deviceId;
  25103. }
  25104. function addSafeAreaInsets(result) {
  25105. if (result.safeArea) {
  25106. var safeArea = result.safeArea;
  25107. result.safeAreaInsets = {
  25108. top: safeArea.top,
  25109. left: safeArea.left,
  25110. right: result.windowWidth - safeArea.right,
  25111. bottom: result.screenHeight - safeArea.bottom
  25112. };
  25113. }
  25114. }
  25115. function populateParameters(result) {
  25116. var _result$brand = result.brand,
  25117. brand = _result$brand === void 0 ? '' : _result$brand,
  25118. _result$model = result.model,
  25119. model = _result$model === void 0 ? '' : _result$model,
  25120. _result$system = result.system,
  25121. system = _result$system === void 0 ? '' : _result$system,
  25122. _result$language = result.language,
  25123. language = _result$language === void 0 ? '' : _result$language,
  25124. theme = result.theme,
  25125. version = result.version,
  25126. platform = result.platform,
  25127. fontSizeSetting = result.fontSizeSetting,
  25128. SDKVersion = result.SDKVersion,
  25129. pixelRatio = result.pixelRatio,
  25130. deviceOrientation = result.deviceOrientation;
  25131. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  25132. var extraParam = {};
  25133. // osName osVersion
  25134. var osName = '';
  25135. var osVersion = '';
  25136. {
  25137. osName = system.split(' ')[0] || '';
  25138. osVersion = system.split(' ')[1] || '';
  25139. }
  25140. var hostVersion = version;
  25141. // deviceType
  25142. var deviceType = getGetDeviceType(result, model);
  25143. // deviceModel
  25144. var deviceBrand = getDeviceBrand(brand);
  25145. // hostName
  25146. var _hostName = getHostName(result);
  25147. // deviceOrientation
  25148. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  25149. // devicePixelRatio
  25150. var _devicePixelRatio = pixelRatio;
  25151. // SDKVersion
  25152. var _SDKVersion = SDKVersion;
  25153. // hostLanguage
  25154. var hostLanguage = language.replace(/_/g, '-');
  25155. // wx.getAccountInfoSync
  25156. var parameters = {
  25157. appId: "__UNI__DBA6730",
  25158. appName: "云飞智控",
  25159. appVersion: "1.0.4",
  25160. appVersionCode: "104",
  25161. appLanguage: getAppLanguage(hostLanguage),
  25162. uniCompileVersion: "4.06",
  25163. uniRuntimeVersion: "4.06",
  25164. uniPlatform: undefined || "mp-weixin",
  25165. deviceBrand: deviceBrand,
  25166. deviceModel: model,
  25167. deviceType: deviceType,
  25168. devicePixelRatio: _devicePixelRatio,
  25169. deviceOrientation: _deviceOrientation,
  25170. osName: osName.toLocaleLowerCase(),
  25171. osVersion: osVersion,
  25172. hostTheme: theme,
  25173. hostVersion: hostVersion,
  25174. hostLanguage: hostLanguage,
  25175. hostName: _hostName,
  25176. hostSDKVersion: _SDKVersion,
  25177. hostFontSizeSetting: fontSizeSetting,
  25178. windowTop: 0,
  25179. windowBottom: 0,
  25180. // TODO
  25181. osLanguage: undefined,
  25182. osTheme: undefined,
  25183. ua: undefined,
  25184. hostPackageName: undefined,
  25185. browserName: undefined,
  25186. browserVersion: undefined
  25187. };
  25188. Object.assign(result, parameters, extraParam);
  25189. }
  25190. function getGetDeviceType(result, model) {
  25191. var deviceType = result.deviceType || 'phone';
  25192. {
  25193. var deviceTypeMaps = {
  25194. ipad: 'pad',
  25195. windows: 'pc',
  25196. mac: 'pc'
  25197. };
  25198. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  25199. var _model = model.toLocaleLowerCase();
  25200. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  25201. var _m = deviceTypeMapsKeys[index];
  25202. if (_model.indexOf(_m) !== -1) {
  25203. deviceType = deviceTypeMaps[_m];
  25204. break;
  25205. }
  25206. }
  25207. }
  25208. return deviceType;
  25209. }
  25210. function getDeviceBrand(brand) {
  25211. var deviceBrand = brand;
  25212. if (deviceBrand) {
  25213. deviceBrand = brand.toLocaleLowerCase();
  25214. }
  25215. return deviceBrand;
  25216. }
  25217. function getAppLanguage(defaultLanguage) {
  25218. return getLocale$1 ? getLocale$1() : defaultLanguage;
  25219. }
  25220. function getHostName(result) {
  25221. var _platform = 'WeChat';
  25222. var _hostName = result.hostName || _platform; // mp-jd
  25223. {
  25224. if (result.environment) {
  25225. _hostName = result.environment;
  25226. } else if (result.host && result.host.env) {
  25227. _hostName = result.host.env;
  25228. }
  25229. }
  25230. return _hostName;
  25231. }
  25232. var getSystemInfo = {
  25233. returnValue: function returnValue(result) {
  25234. useDeviceId(result);
  25235. addSafeAreaInsets(result);
  25236. populateParameters(result);
  25237. }
  25238. };
  25239. var showActionSheet = {
  25240. args: function args(fromArgs) {
  25241. if ((0, _typeof2.default)(fromArgs) === 'object') {
  25242. fromArgs.alertText = fromArgs.title;
  25243. }
  25244. }
  25245. };
  25246. var getAppBaseInfo = {
  25247. returnValue: function returnValue(result) {
  25248. var _result = result,
  25249. version = _result.version,
  25250. language = _result.language,
  25251. SDKVersion = _result.SDKVersion,
  25252. theme = _result.theme;
  25253. var _hostName = getHostName(result);
  25254. var hostLanguage = language.replace('_', '-');
  25255. result = sortObject(Object.assign(result, {
  25256. appId: "__UNI__DBA6730",
  25257. appName: "云飞智控",
  25258. appVersion: "1.0.4",
  25259. appVersionCode: "104",
  25260. appLanguage: getAppLanguage(hostLanguage),
  25261. hostVersion: version,
  25262. hostLanguage: hostLanguage,
  25263. hostName: _hostName,
  25264. hostSDKVersion: SDKVersion,
  25265. hostTheme: theme
  25266. }));
  25267. }
  25268. };
  25269. var getDeviceInfo = {
  25270. returnValue: function returnValue(result) {
  25271. var _result2 = result,
  25272. brand = _result2.brand,
  25273. model = _result2.model;
  25274. var deviceType = getGetDeviceType(result, model);
  25275. var deviceBrand = getDeviceBrand(brand);
  25276. useDeviceId(result);
  25277. result = sortObject(Object.assign(result, {
  25278. deviceType: deviceType,
  25279. deviceBrand: deviceBrand,
  25280. deviceModel: model
  25281. }));
  25282. }
  25283. };
  25284. var getWindowInfo = {
  25285. returnValue: function returnValue(result) {
  25286. addSafeAreaInsets(result);
  25287. result = sortObject(Object.assign(result, {
  25288. windowTop: 0,
  25289. windowBottom: 0
  25290. }));
  25291. }
  25292. };
  25293. var getAppAuthorizeSetting = {
  25294. returnValue: function returnValue(result) {
  25295. var locationReducedAccuracy = result.locationReducedAccuracy;
  25296. result.locationAccuracy = 'unsupported';
  25297. if (locationReducedAccuracy === true) {
  25298. result.locationAccuracy = 'reduced';
  25299. } else if (locationReducedAccuracy === false) {
  25300. result.locationAccuracy = 'full';
  25301. }
  25302. }
  25303. };
  25304. // import navigateTo from 'uni-helpers/navigate-to'
  25305. var compressImage = {
  25306. args: function args(fromArgs) {
  25307. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  25308. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  25309. fromArgs.compressHeight = fromArgs.compressedHeight;
  25310. }
  25311. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  25312. fromArgs.compressWidth = fromArgs.compressedWidth;
  25313. }
  25314. }
  25315. };
  25316. var protocols = {
  25317. redirectTo: redirectTo,
  25318. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  25319. previewImage: previewImage,
  25320. getSystemInfo: getSystemInfo,
  25321. getSystemInfoSync: getSystemInfo,
  25322. showActionSheet: showActionSheet,
  25323. getAppBaseInfo: getAppBaseInfo,
  25324. getDeviceInfo: getDeviceInfo,
  25325. getWindowInfo: getWindowInfo,
  25326. getAppAuthorizeSetting: getAppAuthorizeSetting,
  25327. compressImage: compressImage
  25328. };
  25329. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  25330. var canIUses = [];
  25331. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  25332. function processCallback(methodName, method, returnValue) {
  25333. return function (res) {
  25334. return method(processReturnValue(methodName, res, returnValue));
  25335. };
  25336. }
  25337. function processArgs(methodName, fromArgs) {
  25338. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  25339. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  25340. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  25341. if (isPlainObject(fromArgs)) {
  25342. // 一般 api 的参数解析
  25343. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  25344. if (isFn(argsOption)) {
  25345. argsOption = argsOption(fromArgs, toArgs) || {};
  25346. }
  25347. for (var key in fromArgs) {
  25348. if (hasOwn(argsOption, key)) {
  25349. var keyOption = argsOption[key];
  25350. if (isFn(keyOption)) {
  25351. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  25352. }
  25353. if (!keyOption) {
  25354. // 不支持的参数
  25355. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  25356. } else if (isStr(keyOption)) {
  25357. // 重写参数 key
  25358. toArgs[keyOption] = fromArgs[key];
  25359. } else if (isPlainObject(keyOption)) {
  25360. // {name:newName,value:value}可重新指定参数 key:value
  25361. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  25362. }
  25363. } else if (CALLBACKS.indexOf(key) !== -1) {
  25364. if (isFn(fromArgs[key])) {
  25365. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  25366. }
  25367. } else {
  25368. if (!keepFromArgs) {
  25369. toArgs[key] = fromArgs[key];
  25370. }
  25371. }
  25372. }
  25373. return toArgs;
  25374. } else if (isFn(fromArgs)) {
  25375. fromArgs = processCallback(methodName, fromArgs, returnValue);
  25376. }
  25377. return fromArgs;
  25378. }
  25379. function processReturnValue(methodName, res, returnValue) {
  25380. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  25381. if (isFn(protocols.returnValue)) {
  25382. // 处理通用 returnValue
  25383. res = protocols.returnValue(methodName, res);
  25384. }
  25385. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  25386. }
  25387. function wrapper(methodName, method) {
  25388. if (hasOwn(protocols, methodName)) {
  25389. var protocol = protocols[methodName];
  25390. if (!protocol) {
  25391. // 暂不支持的 api
  25392. return function () {
  25393. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  25394. };
  25395. }
  25396. return function (arg1, arg2) {
  25397. // 目前 api 最多两个参数
  25398. var options = protocol;
  25399. if (isFn(protocol)) {
  25400. options = protocol(arg1);
  25401. }
  25402. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  25403. var args = [arg1];
  25404. if (typeof arg2 !== 'undefined') {
  25405. args.push(arg2);
  25406. }
  25407. if (isFn(options.name)) {
  25408. methodName = options.name(arg1);
  25409. } else if (isStr(options.name)) {
  25410. methodName = options.name;
  25411. }
  25412. var returnValue = wx[methodName].apply(wx, args);
  25413. if (isSyncApi(methodName)) {
  25414. // 同步 api
  25415. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  25416. }
  25417. return returnValue;
  25418. };
  25419. }
  25420. return method;
  25421. }
  25422. var todoApis = Object.create(null);
  25423. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  25424. function createTodoApi(name) {
  25425. return function todoApi(_ref) {
  25426. var fail = _ref.fail,
  25427. complete = _ref.complete;
  25428. var res = {
  25429. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  25430. };
  25431. isFn(fail) && fail(res);
  25432. isFn(complete) && complete(res);
  25433. };
  25434. }
  25435. TODOS.forEach(function (name) {
  25436. todoApis[name] = createTodoApi(name);
  25437. });
  25438. var providers = {
  25439. oauth: ['weixin'],
  25440. share: ['weixin'],
  25441. payment: ['wxpay'],
  25442. push: ['weixin']
  25443. };
  25444. function getProvider(_ref2) {
  25445. var service = _ref2.service,
  25446. success = _ref2.success,
  25447. fail = _ref2.fail,
  25448. complete = _ref2.complete;
  25449. var res = false;
  25450. if (providers[service]) {
  25451. res = {
  25452. errMsg: 'getProvider:ok',
  25453. service: service,
  25454. provider: providers[service]
  25455. };
  25456. isFn(success) && success(res);
  25457. } else {
  25458. res = {
  25459. errMsg: 'getProvider:fail service not found'
  25460. };
  25461. isFn(fail) && fail(res);
  25462. }
  25463. isFn(complete) && complete(res);
  25464. }
  25465. var extraApi = /*#__PURE__*/Object.freeze({
  25466. __proto__: null,
  25467. getProvider: getProvider
  25468. });
  25469. var getEmitter = function () {
  25470. var Emitter;
  25471. return function getUniEmitter() {
  25472. if (!Emitter) {
  25473. Emitter = new _vue.default();
  25474. }
  25475. return Emitter;
  25476. };
  25477. }();
  25478. function apply(ctx, method, args) {
  25479. return ctx[method].apply(ctx, args);
  25480. }
  25481. function $on() {
  25482. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  25483. }
  25484. function $off() {
  25485. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  25486. }
  25487. function $once() {
  25488. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  25489. }
  25490. function $emit() {
  25491. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  25492. }
  25493. var eventApi = /*#__PURE__*/Object.freeze({
  25494. __proto__: null,
  25495. $on: $on,
  25496. $off: $off,
  25497. $once: $once,
  25498. $emit: $emit
  25499. });
  25500. /**
  25501. * 框架内 try-catch
  25502. */
  25503. /**
  25504. * 开发者 try-catch
  25505. */
  25506. function tryCatch(fn) {
  25507. return function () {
  25508. try {
  25509. return fn.apply(fn, arguments);
  25510. } catch (e) {
  25511. // TODO
  25512. console.error(e);
  25513. }
  25514. };
  25515. }
  25516. function getApiCallbacks(params) {
  25517. var apiCallbacks = {};
  25518. for (var name in params) {
  25519. var param = params[name];
  25520. if (isFn(param)) {
  25521. apiCallbacks[name] = tryCatch(param);
  25522. delete params[name];
  25523. }
  25524. }
  25525. return apiCallbacks;
  25526. }
  25527. var cid;
  25528. var cidErrMsg;
  25529. var enabled;
  25530. function normalizePushMessage(message) {
  25531. try {
  25532. return JSON.parse(message);
  25533. } catch (e) {}
  25534. return message;
  25535. }
  25536. function invokePushCallback(args) {
  25537. if (args.type === 'enabled') {
  25538. enabled = true;
  25539. } else if (args.type === 'clientId') {
  25540. cid = args.cid;
  25541. cidErrMsg = args.errMsg;
  25542. invokeGetPushCidCallbacks(cid, args.errMsg);
  25543. } else if (args.type === 'pushMsg') {
  25544. var message = {
  25545. type: 'receive',
  25546. data: normalizePushMessage(args.message)
  25547. };
  25548. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  25549. var callback = onPushMessageCallbacks[i];
  25550. callback(message);
  25551. // 该消息已被阻止
  25552. if (message.stopped) {
  25553. break;
  25554. }
  25555. }
  25556. } else if (args.type === 'click') {
  25557. onPushMessageCallbacks.forEach(function (callback) {
  25558. callback({
  25559. type: 'click',
  25560. data: normalizePushMessage(args.message)
  25561. });
  25562. });
  25563. }
  25564. }
  25565. var getPushCidCallbacks = [];
  25566. function invokeGetPushCidCallbacks(cid, errMsg) {
  25567. getPushCidCallbacks.forEach(function (callback) {
  25568. callback(cid, errMsg);
  25569. });
  25570. getPushCidCallbacks.length = 0;
  25571. }
  25572. function getPushClientId(args) {
  25573. if (!isPlainObject(args)) {
  25574. args = {};
  25575. }
  25576. var _getApiCallbacks = getApiCallbacks(args),
  25577. success = _getApiCallbacks.success,
  25578. fail = _getApiCallbacks.fail,
  25579. complete = _getApiCallbacks.complete;
  25580. var hasSuccess = isFn(success);
  25581. var hasFail = isFn(fail);
  25582. var hasComplete = isFn(complete);
  25583. Promise.resolve().then(function () {
  25584. if (typeof enabled === 'undefined') {
  25585. enabled = false;
  25586. cid = '';
  25587. cidErrMsg = 'uniPush is not enabled';
  25588. }
  25589. getPushCidCallbacks.push(function (cid, errMsg) {
  25590. var res;
  25591. if (cid) {
  25592. res = {
  25593. errMsg: 'getPushClientId:ok',
  25594. cid: cid
  25595. };
  25596. hasSuccess && success(res);
  25597. } else {
  25598. res = {
  25599. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  25600. };
  25601. hasFail && fail(res);
  25602. }
  25603. hasComplete && complete(res);
  25604. });
  25605. if (typeof cid !== 'undefined') {
  25606. invokeGetPushCidCallbacks(cid, cidErrMsg);
  25607. }
  25608. });
  25609. }
  25610. var onPushMessageCallbacks = [];
  25611. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  25612. var onPushMessage = function onPushMessage(fn) {
  25613. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  25614. onPushMessageCallbacks.push(fn);
  25615. }
  25616. };
  25617. var offPushMessage = function offPushMessage(fn) {
  25618. if (!fn) {
  25619. onPushMessageCallbacks.length = 0;
  25620. } else {
  25621. var index = onPushMessageCallbacks.indexOf(fn);
  25622. if (index > -1) {
  25623. onPushMessageCallbacks.splice(index, 1);
  25624. }
  25625. }
  25626. };
  25627. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  25628. if (!baseInfo) {
  25629. baseInfo = wx.getSystemInfoSync();
  25630. }
  25631. var host = baseInfo ? baseInfo.host : null;
  25632. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  25633. var api = /*#__PURE__*/Object.freeze({
  25634. __proto__: null,
  25635. shareVideoMessage: shareVideoMessage,
  25636. getPushClientId: getPushClientId,
  25637. onPushMessage: onPushMessage,
  25638. offPushMessage: offPushMessage,
  25639. invokePushCallback: invokePushCallback
  25640. });
  25641. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  25642. function findVmByVueId(vm, vuePid) {
  25643. var $children = vm.$children;
  25644. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  25645. for (var i = $children.length - 1; i >= 0; i--) {
  25646. var childVm = $children[i];
  25647. if (childVm.$scope._$vueId === vuePid) {
  25648. return childVm;
  25649. }
  25650. }
  25651. // 反向递归查找
  25652. var parentVm;
  25653. for (var _i = $children.length - 1; _i >= 0; _i--) {
  25654. parentVm = findVmByVueId($children[_i], vuePid);
  25655. if (parentVm) {
  25656. return parentVm;
  25657. }
  25658. }
  25659. }
  25660. function initBehavior(options) {
  25661. return Behavior(options);
  25662. }
  25663. function isPage() {
  25664. return !!this.route;
  25665. }
  25666. function initRelation(detail) {
  25667. this.triggerEvent('__l', detail);
  25668. }
  25669. function selectAllComponents(mpInstance, selector, $refs) {
  25670. var components = mpInstance.selectAllComponents(selector) || [];
  25671. components.forEach(function (component) {
  25672. var ref = component.dataset.ref;
  25673. $refs[ref] = component.$vm || toSkip(component);
  25674. {
  25675. if (component.dataset.vueGeneric === 'scoped') {
  25676. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  25677. selectAllComponents(scopedComponent, selector, $refs);
  25678. });
  25679. }
  25680. }
  25681. });
  25682. }
  25683. function syncRefs(refs, newRefs) {
  25684. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  25685. var newKeys = Object.keys(newRefs);
  25686. newKeys.forEach(function (key) {
  25687. var oldValue = refs[key];
  25688. var newValue = newRefs[key];
  25689. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  25690. return oldValue.includes(value);
  25691. })) {
  25692. return;
  25693. }
  25694. refs[key] = newValue;
  25695. oldKeys.delete(key);
  25696. });
  25697. oldKeys.forEach(function (key) {
  25698. delete refs[key];
  25699. });
  25700. return refs;
  25701. }
  25702. function initRefs(vm) {
  25703. var mpInstance = vm.$scope;
  25704. var refs = {};
  25705. Object.defineProperty(vm, '$refs', {
  25706. get: function get() {
  25707. var $refs = {};
  25708. selectAllComponents(mpInstance, '.vue-ref', $refs);
  25709. // TODO 暂不考虑 for 中的 scoped
  25710. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  25711. forComponents.forEach(function (component) {
  25712. var ref = component.dataset.ref;
  25713. if (!$refs[ref]) {
  25714. $refs[ref] = [];
  25715. }
  25716. $refs[ref].push(component.$vm || toSkip(component));
  25717. });
  25718. return syncRefs(refs, $refs);
  25719. }
  25720. });
  25721. }
  25722. function handleLink(event) {
  25723. var _ref3 = event.detail || event.value,
  25724. vuePid = _ref3.vuePid,
  25725. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  25726. var parentVm;
  25727. if (vuePid) {
  25728. parentVm = findVmByVueId(this.$vm, vuePid);
  25729. }
  25730. if (!parentVm) {
  25731. parentVm = this.$vm;
  25732. }
  25733. vueOptions.parent = parentVm;
  25734. }
  25735. function markMPComponent(component) {
  25736. // 在 Vue 中标记为小程序组件
  25737. var IS_MP = '__v_isMPComponent';
  25738. Object.defineProperty(component, IS_MP, {
  25739. configurable: true,
  25740. enumerable: false,
  25741. value: true
  25742. });
  25743. return component;
  25744. }
  25745. function toSkip(obj) {
  25746. var OB = '__ob__';
  25747. var SKIP = '__v_skip';
  25748. if (isObject(obj) && Object.isExtensible(obj)) {
  25749. // 避免被 @vue/composition-api 观测
  25750. Object.defineProperty(obj, OB, {
  25751. configurable: true,
  25752. enumerable: false,
  25753. value: (0, _defineProperty2.default)({}, SKIP, true)
  25754. });
  25755. }
  25756. return obj;
  25757. }
  25758. var WORKLET_RE = /_(.*)_worklet_factory_/;
  25759. function initWorkletMethods(mpMethods, vueMethods) {
  25760. if (vueMethods) {
  25761. Object.keys(vueMethods).forEach(function (name) {
  25762. var matches = name.match(WORKLET_RE);
  25763. if (matches) {
  25764. var workletName = matches[1];
  25765. mpMethods[name] = vueMethods[name];
  25766. mpMethods[workletName] = vueMethods[workletName];
  25767. }
  25768. });
  25769. }
  25770. }
  25771. var MPPage = Page;
  25772. var MPComponent = Component;
  25773. var customizeRE = /:/g;
  25774. var customize = cached(function (str) {
  25775. return camelize(str.replace(customizeRE, '-'));
  25776. });
  25777. function initTriggerEvent(mpInstance) {
  25778. var oldTriggerEvent = mpInstance.triggerEvent;
  25779. var newTriggerEvent = function newTriggerEvent(event) {
  25780. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  25781. args[_key3 - 1] = arguments[_key3];
  25782. }
  25783. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  25784. if (this.$vm || this.dataset && this.dataset.comType) {
  25785. event = customize(event);
  25786. } else {
  25787. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  25788. var newEvent = customize(event);
  25789. if (newEvent !== event) {
  25790. oldTriggerEvent.apply(this, [newEvent].concat(args));
  25791. }
  25792. }
  25793. return oldTriggerEvent.apply(this, [event].concat(args));
  25794. };
  25795. try {
  25796. // 京东小程序 triggerEvent 为只读
  25797. mpInstance.triggerEvent = newTriggerEvent;
  25798. } catch (error) {
  25799. mpInstance._triggerEvent = newTriggerEvent;
  25800. }
  25801. }
  25802. function initHook(name, options, isComponent) {
  25803. var oldHook = options[name];
  25804. options[name] = function () {
  25805. markMPComponent(this);
  25806. initTriggerEvent(this);
  25807. if (oldHook) {
  25808. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  25809. args[_key4] = arguments[_key4];
  25810. }
  25811. return oldHook.apply(this, args);
  25812. }
  25813. };
  25814. }
  25815. if (!MPPage.__$wrappered) {
  25816. MPPage.__$wrappered = true;
  25817. Page = function Page() {
  25818. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  25819. initHook('onLoad', options);
  25820. return MPPage(options);
  25821. };
  25822. Page.after = MPPage.after;
  25823. Component = function Component() {
  25824. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  25825. initHook('created', options);
  25826. return MPComponent(options);
  25827. };
  25828. }
  25829. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  25830. function initMocks(vm, mocks) {
  25831. var mpInstance = vm.$mp[vm.mpType];
  25832. mocks.forEach(function (mock) {
  25833. if (hasOwn(mpInstance, mock)) {
  25834. vm[mock] = mpInstance[mock];
  25835. }
  25836. });
  25837. }
  25838. function hasHook(hook, vueOptions) {
  25839. if (!vueOptions) {
  25840. return true;
  25841. }
  25842. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  25843. return true;
  25844. }
  25845. vueOptions = vueOptions.default || vueOptions;
  25846. if (isFn(vueOptions)) {
  25847. if (isFn(vueOptions.extendOptions[hook])) {
  25848. return true;
  25849. }
  25850. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  25851. return true;
  25852. }
  25853. return false;
  25854. }
  25855. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  25856. return true;
  25857. }
  25858. var mixins = vueOptions.mixins;
  25859. if (Array.isArray(mixins)) {
  25860. return !!mixins.find(function (mixin) {
  25861. return hasHook(hook, mixin);
  25862. });
  25863. }
  25864. }
  25865. function initHooks(mpOptions, hooks, vueOptions) {
  25866. hooks.forEach(function (hook) {
  25867. if (hasHook(hook, vueOptions)) {
  25868. mpOptions[hook] = function (args) {
  25869. return this.$vm && this.$vm.__call_hook(hook, args);
  25870. };
  25871. }
  25872. });
  25873. }
  25874. function initUnknownHooks(mpOptions, vueOptions) {
  25875. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  25876. findHooks(vueOptions).forEach(function (hook) {
  25877. return initHook$1(mpOptions, hook, excludes);
  25878. });
  25879. }
  25880. function findHooks(vueOptions) {
  25881. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  25882. if (vueOptions) {
  25883. Object.keys(vueOptions).forEach(function (name) {
  25884. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  25885. hooks.push(name);
  25886. }
  25887. });
  25888. }
  25889. return hooks;
  25890. }
  25891. function initHook$1(mpOptions, hook, excludes) {
  25892. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  25893. mpOptions[hook] = function (args) {
  25894. return this.$vm && this.$vm.__call_hook(hook, args);
  25895. };
  25896. }
  25897. }
  25898. function initVueComponent(Vue, vueOptions) {
  25899. vueOptions = vueOptions.default || vueOptions;
  25900. var VueComponent;
  25901. if (isFn(vueOptions)) {
  25902. VueComponent = vueOptions;
  25903. } else {
  25904. VueComponent = Vue.extend(vueOptions);
  25905. }
  25906. vueOptions = VueComponent.options;
  25907. return [VueComponent, vueOptions];
  25908. }
  25909. function initSlots(vm, vueSlots) {
  25910. if (Array.isArray(vueSlots) && vueSlots.length) {
  25911. var $slots = Object.create(null);
  25912. vueSlots.forEach(function (slotName) {
  25913. $slots[slotName] = true;
  25914. });
  25915. vm.$scopedSlots = vm.$slots = $slots;
  25916. }
  25917. }
  25918. function initVueIds(vueIds, mpInstance) {
  25919. vueIds = (vueIds || '').split(',');
  25920. var len = vueIds.length;
  25921. if (len === 1) {
  25922. mpInstance._$vueId = vueIds[0];
  25923. } else if (len === 2) {
  25924. mpInstance._$vueId = vueIds[0];
  25925. mpInstance._$vuePid = vueIds[1];
  25926. }
  25927. }
  25928. function initData(vueOptions, context) {
  25929. var data = vueOptions.data || {};
  25930. var methods = vueOptions.methods || {};
  25931. if (typeof data === 'function') {
  25932. try {
  25933. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  25934. } catch (e) {
  25935. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"云飞智控","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  25936. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  25937. }
  25938. }
  25939. } else {
  25940. try {
  25941. // 对 data 格式化
  25942. data = JSON.parse(JSON.stringify(data));
  25943. } catch (e) {}
  25944. }
  25945. if (!isPlainObject(data)) {
  25946. data = {};
  25947. }
  25948. Object.keys(methods).forEach(function (methodName) {
  25949. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  25950. data[methodName] = methods[methodName];
  25951. }
  25952. });
  25953. return data;
  25954. }
  25955. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  25956. function createObserver(name) {
  25957. return function observer(newVal, oldVal) {
  25958. if (this.$vm) {
  25959. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  25960. }
  25961. };
  25962. }
  25963. function initBehaviors(vueOptions, initBehavior) {
  25964. var vueBehaviors = vueOptions.behaviors;
  25965. var vueExtends = vueOptions.extends;
  25966. var vueMixins = vueOptions.mixins;
  25967. var vueProps = vueOptions.props;
  25968. if (!vueProps) {
  25969. vueOptions.props = vueProps = [];
  25970. }
  25971. var behaviors = [];
  25972. if (Array.isArray(vueBehaviors)) {
  25973. vueBehaviors.forEach(function (behavior) {
  25974. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  25975. if (behavior === 'uni://form-field') {
  25976. if (Array.isArray(vueProps)) {
  25977. vueProps.push('name');
  25978. vueProps.push('value');
  25979. } else {
  25980. vueProps.name = {
  25981. type: String,
  25982. default: ''
  25983. };
  25984. vueProps.value = {
  25985. type: [String, Number, Boolean, Array, Object, Date],
  25986. default: ''
  25987. };
  25988. }
  25989. }
  25990. });
  25991. }
  25992. if (isPlainObject(vueExtends) && vueExtends.props) {
  25993. behaviors.push(initBehavior({
  25994. properties: initProperties(vueExtends.props, true)
  25995. }));
  25996. }
  25997. if (Array.isArray(vueMixins)) {
  25998. vueMixins.forEach(function (vueMixin) {
  25999. if (isPlainObject(vueMixin) && vueMixin.props) {
  26000. behaviors.push(initBehavior({
  26001. properties: initProperties(vueMixin.props, true)
  26002. }));
  26003. }
  26004. });
  26005. }
  26006. return behaviors;
  26007. }
  26008. function parsePropType(key, type, defaultValue, file) {
  26009. // [String]=>String
  26010. if (Array.isArray(type) && type.length === 1) {
  26011. return type[0];
  26012. }
  26013. return type;
  26014. }
  26015. function initProperties(props) {
  26016. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  26017. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  26018. var options = arguments.length > 3 ? arguments[3] : undefined;
  26019. var properties = {};
  26020. if (!isBehavior) {
  26021. properties.vueId = {
  26022. type: String,
  26023. value: ''
  26024. };
  26025. {
  26026. if (options.virtualHost) {
  26027. properties.virtualHostStyle = {
  26028. type: null,
  26029. value: ''
  26030. };
  26031. properties.virtualHostClass = {
  26032. type: null,
  26033. value: ''
  26034. };
  26035. }
  26036. }
  26037. // scopedSlotsCompiler auto
  26038. properties.scopedSlotsCompiler = {
  26039. type: String,
  26040. value: ''
  26041. };
  26042. properties.vueSlots = {
  26043. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  26044. type: null,
  26045. value: [],
  26046. observer: function observer(newVal, oldVal) {
  26047. var $slots = Object.create(null);
  26048. newVal.forEach(function (slotName) {
  26049. $slots[slotName] = true;
  26050. });
  26051. this.setData({
  26052. $slots: $slots
  26053. });
  26054. }
  26055. };
  26056. }
  26057. if (Array.isArray(props)) {
  26058. // ['title']
  26059. props.forEach(function (key) {
  26060. properties[key] = {
  26061. type: null,
  26062. observer: createObserver(key)
  26063. };
  26064. });
  26065. } else if (isPlainObject(props)) {
  26066. // {title:{type:String,default:''},content:String}
  26067. Object.keys(props).forEach(function (key) {
  26068. var opts = props[key];
  26069. if (isPlainObject(opts)) {
  26070. // title:{type:String,default:''}
  26071. var value = opts.default;
  26072. if (isFn(value)) {
  26073. value = value();
  26074. }
  26075. opts.type = parsePropType(key, opts.type);
  26076. properties[key] = {
  26077. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  26078. value: value,
  26079. observer: createObserver(key)
  26080. };
  26081. } else {
  26082. // content:String
  26083. var type = parsePropType(key, opts);
  26084. properties[key] = {
  26085. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  26086. observer: createObserver(key)
  26087. };
  26088. }
  26089. });
  26090. }
  26091. return properties;
  26092. }
  26093. function wrapper$1(event) {
  26094. // TODO 又得兼容 mpvue 的 mp 对象
  26095. try {
  26096. event.mp = JSON.parse(JSON.stringify(event));
  26097. } catch (e) {}
  26098. event.stopPropagation = noop;
  26099. event.preventDefault = noop;
  26100. event.target = event.target || {};
  26101. if (!hasOwn(event, 'detail')) {
  26102. event.detail = {};
  26103. }
  26104. if (hasOwn(event, 'markerId')) {
  26105. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  26106. event.detail.markerId = event.markerId;
  26107. }
  26108. if (isPlainObject(event.detail)) {
  26109. event.target = Object.assign({}, event.target, event.detail);
  26110. }
  26111. return event;
  26112. }
  26113. function getExtraValue(vm, dataPathsArray) {
  26114. var context = vm;
  26115. dataPathsArray.forEach(function (dataPathArray) {
  26116. var dataPath = dataPathArray[0];
  26117. var value = dataPathArray[2];
  26118. if (dataPath || typeof value !== 'undefined') {
  26119. // ['','',index,'disable']
  26120. var propPath = dataPathArray[1];
  26121. var valuePath = dataPathArray[3];
  26122. var vFor;
  26123. if (Number.isInteger(dataPath)) {
  26124. vFor = dataPath;
  26125. } else if (!dataPath) {
  26126. vFor = context;
  26127. } else if (typeof dataPath === 'string' && dataPath) {
  26128. if (dataPath.indexOf('#s#') === 0) {
  26129. vFor = dataPath.substr(3);
  26130. } else {
  26131. vFor = vm.__get_value(dataPath, context);
  26132. }
  26133. }
  26134. if (Number.isInteger(vFor)) {
  26135. context = value;
  26136. } else if (!propPath) {
  26137. context = vFor[value];
  26138. } else {
  26139. if (Array.isArray(vFor)) {
  26140. context = vFor.find(function (vForItem) {
  26141. return vm.__get_value(propPath, vForItem) === value;
  26142. });
  26143. } else if (isPlainObject(vFor)) {
  26144. context = Object.keys(vFor).find(function (vForKey) {
  26145. return vm.__get_value(propPath, vFor[vForKey]) === value;
  26146. });
  26147. } else {
  26148. console.error('v-for 暂不支持循环数据:', vFor);
  26149. }
  26150. }
  26151. if (valuePath) {
  26152. context = vm.__get_value(valuePath, context);
  26153. }
  26154. }
  26155. });
  26156. return context;
  26157. }
  26158. function processEventExtra(vm, extra, event, __args__) {
  26159. var extraObj = {};
  26160. if (Array.isArray(extra) && extra.length) {
  26161. /**
  26162. *[
  26163. * ['data.items', 'data.id', item.data.id],
  26164. * ['metas', 'id', meta.id]
  26165. *],
  26166. *[
  26167. * ['data.items', 'data.id', item.data.id],
  26168. * ['metas', 'id', meta.id]
  26169. *],
  26170. *'test'
  26171. */
  26172. extra.forEach(function (dataPath, index) {
  26173. if (typeof dataPath === 'string') {
  26174. if (!dataPath) {
  26175. // model,prop.sync
  26176. extraObj['$' + index] = vm;
  26177. } else {
  26178. if (dataPath === '$event') {
  26179. // $event
  26180. extraObj['$' + index] = event;
  26181. } else if (dataPath === 'arguments') {
  26182. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  26183. } else if (dataPath.indexOf('$event.') === 0) {
  26184. // $event.target.value
  26185. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  26186. } else {
  26187. extraObj['$' + index] = vm.__get_value(dataPath);
  26188. }
  26189. }
  26190. } else {
  26191. extraObj['$' + index] = getExtraValue(vm, dataPath);
  26192. }
  26193. });
  26194. }
  26195. return extraObj;
  26196. }
  26197. function getObjByArray(arr) {
  26198. var obj = {};
  26199. for (var i = 1; i < arr.length; i++) {
  26200. var element = arr[i];
  26201. obj[element[0]] = element[1];
  26202. }
  26203. return obj;
  26204. }
  26205. function processEventArgs(vm, event) {
  26206. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  26207. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  26208. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  26209. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  26210. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  26211. // fixed 用户直接触发 mpInstance.triggerEvent
  26212. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  26213. if (isCustom) {
  26214. // 自定义事件
  26215. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  26216. if (!args.length) {
  26217. // 无参数,直接传入 event 或 detail 数组
  26218. if (isCustomMPEvent) {
  26219. return [event];
  26220. }
  26221. return __args__;
  26222. }
  26223. }
  26224. var extraObj = processEventExtra(vm, extra, event, __args__);
  26225. var ret = [];
  26226. args.forEach(function (arg) {
  26227. if (arg === '$event') {
  26228. if (methodName === '__set_model' && !isCustom) {
  26229. // input v-model value
  26230. ret.push(event.target.value);
  26231. } else {
  26232. if (isCustom && !isCustomMPEvent) {
  26233. ret.push(__args__[0]);
  26234. } else {
  26235. // wxcomponent 组件或内置组件
  26236. ret.push(event);
  26237. }
  26238. }
  26239. } else {
  26240. if (Array.isArray(arg) && arg[0] === 'o') {
  26241. ret.push(getObjByArray(arg));
  26242. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  26243. ret.push(extraObj[arg]);
  26244. } else {
  26245. ret.push(arg);
  26246. }
  26247. }
  26248. });
  26249. return ret;
  26250. }
  26251. var ONCE = '~';
  26252. var CUSTOM = '^';
  26253. function isMatchEventType(eventType, optType) {
  26254. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  26255. }
  26256. function getContextVm(vm) {
  26257. var $parent = vm.$parent;
  26258. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  26259. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  26260. $parent = $parent.$parent;
  26261. }
  26262. return $parent && $parent.$parent;
  26263. }
  26264. function handleEvent(event) {
  26265. var _this2 = this;
  26266. event = wrapper$1(event);
  26267. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  26268. var dataset = (event.currentTarget || event.target).dataset;
  26269. if (!dataset) {
  26270. return console.warn('事件信息不存在');
  26271. }
  26272. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  26273. if (!eventOpts) {
  26274. return console.warn('事件信息不存在');
  26275. }
  26276. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  26277. var eventType = event.type;
  26278. var ret = [];
  26279. eventOpts.forEach(function (eventOpt) {
  26280. var type = eventOpt[0];
  26281. var eventsArray = eventOpt[1];
  26282. var isCustom = type.charAt(0) === CUSTOM;
  26283. type = isCustom ? type.slice(1) : type;
  26284. var isOnce = type.charAt(0) === ONCE;
  26285. type = isOnce ? type.slice(1) : type;
  26286. if (eventsArray && isMatchEventType(eventType, type)) {
  26287. eventsArray.forEach(function (eventArray) {
  26288. var methodName = eventArray[0];
  26289. if (methodName) {
  26290. var handlerCtx = _this2.$vm;
  26291. if (handlerCtx.$options.generic) {
  26292. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  26293. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  26294. }
  26295. if (methodName === '$emit') {
  26296. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  26297. return;
  26298. }
  26299. var handler = handlerCtx[methodName];
  26300. if (!isFn(handler)) {
  26301. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  26302. var path = _this2.route || _this2.is;
  26303. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  26304. }
  26305. if (isOnce) {
  26306. if (handler.once) {
  26307. return;
  26308. }
  26309. handler.once = true;
  26310. }
  26311. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  26312. params = Array.isArray(params) ? params : [];
  26313. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  26314. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  26315. // eslint-disable-next-line no-sparse-arrays
  26316. params = params.concat([,,,,,,,,,, event]);
  26317. }
  26318. ret.push(handler.apply(handlerCtx, params));
  26319. }
  26320. });
  26321. }
  26322. });
  26323. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  26324. return ret[0];
  26325. }
  26326. }
  26327. var eventChannels = {};
  26328. function getEventChannel(id) {
  26329. var eventChannel = eventChannels[id];
  26330. delete eventChannels[id];
  26331. return eventChannel;
  26332. }
  26333. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  26334. function initEventChannel() {
  26335. _vue.default.prototype.getOpenerEventChannel = function () {
  26336. // 微信小程序使用自身getOpenerEventChannel
  26337. {
  26338. return this.$scope.getOpenerEventChannel();
  26339. }
  26340. };
  26341. var callHook = _vue.default.prototype.__call_hook;
  26342. _vue.default.prototype.__call_hook = function (hook, args) {
  26343. if (hook === 'onLoad' && args && args.__id__) {
  26344. this.__eventChannel__ = getEventChannel(args.__id__);
  26345. delete args.__id__;
  26346. }
  26347. return callHook.call(this, hook, args);
  26348. };
  26349. }
  26350. function initScopedSlotsParams() {
  26351. var center = {};
  26352. var parents = {};
  26353. function currentId(fn) {
  26354. var vueIds = this.$options.propsData.vueId;
  26355. if (vueIds) {
  26356. var vueId = vueIds.split(',')[0];
  26357. fn(vueId);
  26358. }
  26359. }
  26360. _vue.default.prototype.$hasSSP = function (vueId) {
  26361. var slot = center[vueId];
  26362. if (!slot) {
  26363. parents[vueId] = this;
  26364. this.$on('hook:destroyed', function () {
  26365. delete parents[vueId];
  26366. });
  26367. }
  26368. return slot;
  26369. };
  26370. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  26371. var slot = center[vueId];
  26372. if (slot) {
  26373. var params = slot[name] || [];
  26374. if (needAll) {
  26375. return params;
  26376. }
  26377. return params[0];
  26378. }
  26379. };
  26380. _vue.default.prototype.$setSSP = function (name, value) {
  26381. var index = 0;
  26382. currentId.call(this, function (vueId) {
  26383. var slot = center[vueId];
  26384. var params = slot[name] = slot[name] || [];
  26385. params.push(value);
  26386. index = params.length - 1;
  26387. });
  26388. return index;
  26389. };
  26390. _vue.default.prototype.$initSSP = function () {
  26391. currentId.call(this, function (vueId) {
  26392. center[vueId] = {};
  26393. });
  26394. };
  26395. _vue.default.prototype.$callSSP = function () {
  26396. currentId.call(this, function (vueId) {
  26397. if (parents[vueId]) {
  26398. parents[vueId].$forceUpdate();
  26399. }
  26400. });
  26401. };
  26402. _vue.default.mixin({
  26403. destroyed: function destroyed() {
  26404. var propsData = this.$options.propsData;
  26405. var vueId = propsData && propsData.vueId;
  26406. if (vueId) {
  26407. delete center[vueId];
  26408. delete parents[vueId];
  26409. }
  26410. }
  26411. });
  26412. }
  26413. function parseBaseApp(vm, _ref4) {
  26414. var mocks = _ref4.mocks,
  26415. initRefs = _ref4.initRefs;
  26416. initEventChannel();
  26417. {
  26418. initScopedSlotsParams();
  26419. }
  26420. if (vm.$options.store) {
  26421. _vue.default.prototype.$store = vm.$options.store;
  26422. }
  26423. uniIdMixin(_vue.default);
  26424. _vue.default.prototype.mpHost = "mp-weixin";
  26425. _vue.default.mixin({
  26426. beforeCreate: function beforeCreate() {
  26427. if (!this.$options.mpType) {
  26428. return;
  26429. }
  26430. this.mpType = this.$options.mpType;
  26431. this.$mp = (0, _defineProperty2.default)({
  26432. data: {}
  26433. }, this.mpType, this.$options.mpInstance);
  26434. this.$scope = this.$options.mpInstance;
  26435. delete this.$options.mpType;
  26436. delete this.$options.mpInstance;
  26437. if (this.mpType === 'page' && typeof getApp === 'function') {
  26438. // hack vue-i18n
  26439. var app = getApp();
  26440. if (app.$vm && app.$vm.$i18n) {
  26441. this._i18n = app.$vm.$i18n;
  26442. }
  26443. }
  26444. if (this.mpType !== 'app') {
  26445. initRefs(this);
  26446. initMocks(this, mocks);
  26447. }
  26448. }
  26449. });
  26450. var appOptions = {
  26451. onLaunch: function onLaunch(args) {
  26452. if (this.$vm) {
  26453. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  26454. return;
  26455. }
  26456. {
  26457. if (wx.canIUse && !wx.canIUse('nextTick')) {
  26458. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  26459. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  26460. }
  26461. }
  26462. this.$vm = vm;
  26463. this.$vm.$mp = {
  26464. app: this
  26465. };
  26466. this.$vm.$scope = this;
  26467. // vm 上也挂载 globalData
  26468. this.$vm.globalData = this.globalData;
  26469. this.$vm._isMounted = true;
  26470. this.$vm.__call_hook('mounted', args);
  26471. this.$vm.__call_hook('onLaunch', args);
  26472. }
  26473. };
  26474. // 兼容旧版本 globalData
  26475. appOptions.globalData = vm.$options.globalData || {};
  26476. // 将 methods 中的方法挂在 getApp() 中
  26477. var methods = vm.$options.methods;
  26478. if (methods) {
  26479. Object.keys(methods).forEach(function (name) {
  26480. appOptions[name] = methods[name];
  26481. });
  26482. }
  26483. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  26484. initHooks(appOptions, hooks);
  26485. initUnknownHooks(appOptions, vm.$options);
  26486. return appOptions;
  26487. }
  26488. function parseApp(vm) {
  26489. return parseBaseApp(vm, {
  26490. mocks: mocks,
  26491. initRefs: initRefs
  26492. });
  26493. }
  26494. function createApp(vm) {
  26495. App(parseApp(vm));
  26496. return vm;
  26497. }
  26498. var encodeReserveRE = /[!'()*]/g;
  26499. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  26500. return '%' + c.charCodeAt(0).toString(16);
  26501. };
  26502. var commaRE = /%2C/g;
  26503. // fixed encodeURIComponent which is more conformant to RFC3986:
  26504. // - escapes [!'()*]
  26505. // - preserve commas
  26506. var encode = function encode(str) {
  26507. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  26508. };
  26509. function stringifyQuery(obj) {
  26510. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  26511. var res = obj ? Object.keys(obj).map(function (key) {
  26512. var val = obj[key];
  26513. if (val === undefined) {
  26514. return '';
  26515. }
  26516. if (val === null) {
  26517. return encodeStr(key);
  26518. }
  26519. if (Array.isArray(val)) {
  26520. var result = [];
  26521. val.forEach(function (val2) {
  26522. if (val2 === undefined) {
  26523. return;
  26524. }
  26525. if (val2 === null) {
  26526. result.push(encodeStr(key));
  26527. } else {
  26528. result.push(encodeStr(key) + '=' + encodeStr(val2));
  26529. }
  26530. });
  26531. return result.join('&');
  26532. }
  26533. return encodeStr(key) + '=' + encodeStr(val);
  26534. }).filter(function (x) {
  26535. return x.length > 0;
  26536. }).join('&') : null;
  26537. return res ? "?".concat(res) : '';
  26538. }
  26539. function parseBaseComponent(vueComponentOptions) {
  26540. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  26541. isPage = _ref5.isPage,
  26542. initRelation = _ref5.initRelation;
  26543. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  26544. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  26545. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  26546. VueComponent = _initVueComponent2[0],
  26547. vueOptions = _initVueComponent2[1];
  26548. var options = _objectSpread({
  26549. multipleSlots: true,
  26550. // styleIsolation: 'apply-shared',
  26551. addGlobalClass: true
  26552. }, vueOptions.options || {});
  26553. {
  26554. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  26555. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  26556. Object.assign(options, vueOptions['mp-weixin'].options);
  26557. }
  26558. }
  26559. var componentOptions = {
  26560. options: options,
  26561. data: initData(vueOptions, _vue.default.prototype),
  26562. behaviors: initBehaviors(vueOptions, initBehavior),
  26563. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  26564. lifetimes: {
  26565. attached: function attached() {
  26566. var properties = this.properties;
  26567. var options = {
  26568. mpType: isPage.call(this) ? 'page' : 'component',
  26569. mpInstance: this,
  26570. propsData: properties
  26571. };
  26572. initVueIds(properties.vueId, this);
  26573. // 处理父子关系
  26574. initRelation.call(this, {
  26575. vuePid: this._$vuePid,
  26576. vueOptions: options
  26577. });
  26578. // 初始化 vue 实例
  26579. this.$vm = new VueComponent(options);
  26580. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  26581. initSlots(this.$vm, properties.vueSlots);
  26582. // 触发首次 setData
  26583. this.$vm.$mount();
  26584. },
  26585. ready: function ready() {
  26586. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  26587. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  26588. if (this.$vm) {
  26589. this.$vm._isMounted = true;
  26590. this.$vm.__call_hook('mounted');
  26591. this.$vm.__call_hook('onReady');
  26592. }
  26593. },
  26594. detached: function detached() {
  26595. this.$vm && this.$vm.$destroy();
  26596. }
  26597. },
  26598. pageLifetimes: {
  26599. show: function show(args) {
  26600. this.$vm && this.$vm.__call_hook('onPageShow', args);
  26601. },
  26602. hide: function hide() {
  26603. this.$vm && this.$vm.__call_hook('onPageHide');
  26604. },
  26605. resize: function resize(size) {
  26606. this.$vm && this.$vm.__call_hook('onPageResize', size);
  26607. }
  26608. },
  26609. methods: {
  26610. __l: handleLink,
  26611. __e: handleEvent
  26612. }
  26613. };
  26614. // externalClasses
  26615. if (vueOptions.externalClasses) {
  26616. componentOptions.externalClasses = vueOptions.externalClasses;
  26617. }
  26618. if (Array.isArray(vueOptions.wxsCallMethods)) {
  26619. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  26620. componentOptions.methods[callMethod] = function (args) {
  26621. return this.$vm[callMethod](args);
  26622. };
  26623. });
  26624. }
  26625. if (needVueOptions) {
  26626. return [componentOptions, vueOptions, VueComponent];
  26627. }
  26628. if (isPage) {
  26629. return componentOptions;
  26630. }
  26631. return [componentOptions, VueComponent];
  26632. }
  26633. function parseComponent(vueComponentOptions, needVueOptions) {
  26634. return parseBaseComponent(vueComponentOptions, {
  26635. isPage: isPage,
  26636. initRelation: initRelation
  26637. }, needVueOptions);
  26638. }
  26639. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  26640. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  26641. function parseBasePage(vuePageOptions) {
  26642. var _parseComponent = parseComponent(vuePageOptions, true),
  26643. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  26644. pageOptions = _parseComponent2[0],
  26645. vueOptions = _parseComponent2[1];
  26646. initHooks(pageOptions.methods, hooks$1, vueOptions);
  26647. pageOptions.methods.onLoad = function (query) {
  26648. this.options = query;
  26649. var copyQuery = Object.assign({}, query);
  26650. delete copyQuery.__id__;
  26651. this.$page = {
  26652. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  26653. };
  26654. this.$vm.$mp.query = query; // 兼容 mpvue
  26655. this.$vm.__call_hook('onLoad', query);
  26656. };
  26657. {
  26658. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  26659. }
  26660. {
  26661. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  26662. }
  26663. return pageOptions;
  26664. }
  26665. function parsePage(vuePageOptions) {
  26666. return parseBasePage(vuePageOptions);
  26667. }
  26668. function createPage(vuePageOptions) {
  26669. {
  26670. return Component(parsePage(vuePageOptions));
  26671. }
  26672. }
  26673. function createComponent(vueOptions) {
  26674. {
  26675. return Component(parseComponent(vueOptions));
  26676. }
  26677. }
  26678. function createSubpackageApp(vm) {
  26679. var appOptions = parseApp(vm);
  26680. var app = getApp({
  26681. allowDefault: true
  26682. });
  26683. vm.$scope = app;
  26684. var globalData = app.globalData;
  26685. if (globalData) {
  26686. Object.keys(appOptions.globalData).forEach(function (name) {
  26687. if (!hasOwn(globalData, name)) {
  26688. globalData[name] = appOptions.globalData[name];
  26689. }
  26690. });
  26691. }
  26692. Object.keys(appOptions).forEach(function (name) {
  26693. if (!hasOwn(app, name)) {
  26694. app[name] = appOptions[name];
  26695. }
  26696. });
  26697. if (isFn(appOptions.onShow) && wx.onAppShow) {
  26698. wx.onAppShow(function () {
  26699. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  26700. args[_key5] = arguments[_key5];
  26701. }
  26702. vm.__call_hook('onShow', args);
  26703. });
  26704. }
  26705. if (isFn(appOptions.onHide) && wx.onAppHide) {
  26706. wx.onAppHide(function () {
  26707. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  26708. args[_key6] = arguments[_key6];
  26709. }
  26710. vm.__call_hook('onHide', args);
  26711. });
  26712. }
  26713. if (isFn(appOptions.onLaunch)) {
  26714. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  26715. vm.__call_hook('onLaunch', args);
  26716. }
  26717. return vm;
  26718. }
  26719. function createPlugin(vm) {
  26720. var appOptions = parseApp(vm);
  26721. if (isFn(appOptions.onShow) && wx.onAppShow) {
  26722. wx.onAppShow(function () {
  26723. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  26724. args[_key7] = arguments[_key7];
  26725. }
  26726. vm.__call_hook('onShow', args);
  26727. });
  26728. }
  26729. if (isFn(appOptions.onHide) && wx.onAppHide) {
  26730. wx.onAppHide(function () {
  26731. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  26732. args[_key8] = arguments[_key8];
  26733. }
  26734. vm.__call_hook('onHide', args);
  26735. });
  26736. }
  26737. if (isFn(appOptions.onLaunch)) {
  26738. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  26739. vm.__call_hook('onLaunch', args);
  26740. }
  26741. return vm;
  26742. }
  26743. todos.forEach(function (todoApi) {
  26744. protocols[todoApi] = false;
  26745. });
  26746. canIUses.forEach(function (canIUseApi) {
  26747. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  26748. if (!wx.canIUse(apiName)) {
  26749. protocols[canIUseApi] = false;
  26750. }
  26751. });
  26752. var uni = {};
  26753. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  26754. uni = new Proxy({}, {
  26755. get: function get(target, name) {
  26756. if (hasOwn(target, name)) {
  26757. return target[name];
  26758. }
  26759. if (baseApi[name]) {
  26760. return baseApi[name];
  26761. }
  26762. if (api[name]) {
  26763. return promisify(name, api[name]);
  26764. }
  26765. {
  26766. if (extraApi[name]) {
  26767. return promisify(name, extraApi[name]);
  26768. }
  26769. if (todoApis[name]) {
  26770. return promisify(name, todoApis[name]);
  26771. }
  26772. }
  26773. if (eventApi[name]) {
  26774. return eventApi[name];
  26775. }
  26776. return promisify(name, wrapper(name, wx[name]));
  26777. },
  26778. set: function set(target, name, value) {
  26779. target[name] = value;
  26780. return true;
  26781. }
  26782. });
  26783. } else {
  26784. Object.keys(baseApi).forEach(function (name) {
  26785. uni[name] = baseApi[name];
  26786. });
  26787. {
  26788. Object.keys(todoApis).forEach(function (name) {
  26789. uni[name] = promisify(name, todoApis[name]);
  26790. });
  26791. Object.keys(extraApi).forEach(function (name) {
  26792. uni[name] = promisify(name, extraApi[name]);
  26793. });
  26794. }
  26795. Object.keys(eventApi).forEach(function (name) {
  26796. uni[name] = eventApi[name];
  26797. });
  26798. Object.keys(api).forEach(function (name) {
  26799. uni[name] = promisify(name, api[name]);
  26800. });
  26801. Object.keys(wx).forEach(function (name) {
  26802. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  26803. uni[name] = promisify(name, wrapper(name, wx[name]));
  26804. }
  26805. });
  26806. }
  26807. wx.createApp = createApp;
  26808. wx.createPage = createPage;
  26809. wx.createComponent = createComponent;
  26810. wx.createSubpackageApp = createSubpackageApp;
  26811. wx.createPlugin = createPlugin;
  26812. var uni$1 = uni;
  26813. var _default = uni$1;
  26814. exports.default = _default;
  26815. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  26816. /***/ }),
  26817. /***/ 20:
  26818. /*!****************************************************************!*\
  26819. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  26820. \****************************************************************/
  26821. /*! no static exports found */
  26822. /***/ (function(module, exports) {
  26823. function _iterableToArray(iter) {
  26824. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  26825. }
  26826. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  26827. /***/ }),
  26828. /***/ 200:
  26829. /*!***********************************************************!*\
  26830. !*** ./node_modules/elliptic/lib/elliptic/eddsa/index.js ***!
  26831. \***********************************************************/
  26832. /*! no static exports found */
  26833. /***/ (function(module, exports, __webpack_require__) {
  26834. "use strict";
  26835. var hash = __webpack_require__(/*! hash.js */ 183);
  26836. var curves = __webpack_require__(/*! ../curves */ 182);
  26837. var utils = __webpack_require__(/*! ../utils */ 175);
  26838. var assert = utils.assert;
  26839. var parseBytes = utils.parseBytes;
  26840. var KeyPair = __webpack_require__(/*! ./key */ 201);
  26841. var Signature = __webpack_require__(/*! ./signature */ 202);
  26842. function EDDSA(curve) {
  26843. assert(curve === 'ed25519', 'only tested with ed25519 so far');
  26844. if (!(this instanceof EDDSA))
  26845. return new EDDSA(curve);
  26846. curve = curves[curve].curve;
  26847. this.curve = curve;
  26848. this.g = curve.g;
  26849. this.g.precompute(curve.n.bitLength() + 1);
  26850. this.pointClass = curve.point().constructor;
  26851. this.encodingLength = Math.ceil(curve.n.bitLength() / 8);
  26852. this.hash = hash.sha512;
  26853. }
  26854. module.exports = EDDSA;
  26855. /**
  26856. * @param {Array|String} message - message bytes
  26857. * @param {Array|String|KeyPair} secret - secret bytes or a keypair
  26858. * @returns {Signature} - signature
  26859. */
  26860. EDDSA.prototype.sign = function sign(message, secret) {
  26861. message = parseBytes(message);
  26862. var key = this.keyFromSecret(secret);
  26863. var r = this.hashInt(key.messagePrefix(), message);
  26864. var R = this.g.mul(r);
  26865. var Rencoded = this.encodePoint(R);
  26866. var s_ = this.hashInt(Rencoded, key.pubBytes(), message)
  26867. .mul(key.priv());
  26868. var S = r.add(s_).umod(this.curve.n);
  26869. return this.makeSignature({ R: R, S: S, Rencoded: Rencoded });
  26870. };
  26871. /**
  26872. * @param {Array} message - message bytes
  26873. * @param {Array|String|Signature} sig - sig bytes
  26874. * @param {Array|String|Point|KeyPair} pub - public key
  26875. * @returns {Boolean} - true if public key matches sig of message
  26876. */
  26877. EDDSA.prototype.verify = function verify(message, sig, pub) {
  26878. message = parseBytes(message);
  26879. sig = this.makeSignature(sig);
  26880. var key = this.keyFromPublic(pub);
  26881. var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message);
  26882. var SG = this.g.mul(sig.S());
  26883. var RplusAh = sig.R().add(key.pub().mul(h));
  26884. return RplusAh.eq(SG);
  26885. };
  26886. EDDSA.prototype.hashInt = function hashInt() {
  26887. var hash = this.hash();
  26888. for (var i = 0; i < arguments.length; i++)
  26889. hash.update(arguments[i]);
  26890. return utils.intFromLE(hash.digest()).umod(this.curve.n);
  26891. };
  26892. EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {
  26893. return KeyPair.fromPublic(this, pub);
  26894. };
  26895. EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {
  26896. return KeyPair.fromSecret(this, secret);
  26897. };
  26898. EDDSA.prototype.makeSignature = function makeSignature(sig) {
  26899. if (sig instanceof Signature)
  26900. return sig;
  26901. return new Signature(this, sig);
  26902. };
  26903. /**
  26904. * * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2
  26905. *
  26906. * EDDSA defines methods for encoding and decoding points and integers. These are
  26907. * helper convenience methods, that pass along to utility functions implied
  26908. * parameters.
  26909. *
  26910. */
  26911. EDDSA.prototype.encodePoint = function encodePoint(point) {
  26912. var enc = point.getY().toArray('le', this.encodingLength);
  26913. enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0;
  26914. return enc;
  26915. };
  26916. EDDSA.prototype.decodePoint = function decodePoint(bytes) {
  26917. bytes = utils.parseBytes(bytes);
  26918. var lastIx = bytes.length - 1;
  26919. var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80);
  26920. var xIsOdd = (bytes[lastIx] & 0x80) !== 0;
  26921. var y = utils.intFromLE(normed);
  26922. return this.curve.pointFromY(y, xIsOdd);
  26923. };
  26924. EDDSA.prototype.encodeInt = function encodeInt(num) {
  26925. return num.toArray('le', this.encodingLength);
  26926. };
  26927. EDDSA.prototype.decodeInt = function decodeInt(bytes) {
  26928. return utils.intFromLE(bytes);
  26929. };
  26930. EDDSA.prototype.isPoint = function isPoint(val) {
  26931. return val instanceof this.pointClass;
  26932. };
  26933. /***/ }),
  26934. /***/ 201:
  26935. /*!*********************************************************!*\
  26936. !*** ./node_modules/elliptic/lib/elliptic/eddsa/key.js ***!
  26937. \*********************************************************/
  26938. /*! no static exports found */
  26939. /***/ (function(module, exports, __webpack_require__) {
  26940. "use strict";
  26941. var utils = __webpack_require__(/*! ../utils */ 175);
  26942. var assert = utils.assert;
  26943. var parseBytes = utils.parseBytes;
  26944. var cachedProperty = utils.cachedProperty;
  26945. /**
  26946. * @param {EDDSA} eddsa - instance
  26947. * @param {Object} params - public/private key parameters
  26948. *
  26949. * @param {Array<Byte>} [params.secret] - secret seed bytes
  26950. * @param {Point} [params.pub] - public key point (aka `A` in eddsa terms)
  26951. * @param {Array<Byte>} [params.pub] - public key point encoded as bytes
  26952. *
  26953. */
  26954. function KeyPair(eddsa, params) {
  26955. this.eddsa = eddsa;
  26956. this._secret = parseBytes(params.secret);
  26957. if (eddsa.isPoint(params.pub))
  26958. this._pub = params.pub;
  26959. else
  26960. this._pubBytes = parseBytes(params.pub);
  26961. }
  26962. KeyPair.fromPublic = function fromPublic(eddsa, pub) {
  26963. if (pub instanceof KeyPair)
  26964. return pub;
  26965. return new KeyPair(eddsa, { pub: pub });
  26966. };
  26967. KeyPair.fromSecret = function fromSecret(eddsa, secret) {
  26968. if (secret instanceof KeyPair)
  26969. return secret;
  26970. return new KeyPair(eddsa, { secret: secret });
  26971. };
  26972. KeyPair.prototype.secret = function secret() {
  26973. return this._secret;
  26974. };
  26975. cachedProperty(KeyPair, 'pubBytes', function pubBytes() {
  26976. return this.eddsa.encodePoint(this.pub());
  26977. });
  26978. cachedProperty(KeyPair, 'pub', function pub() {
  26979. if (this._pubBytes)
  26980. return this.eddsa.decodePoint(this._pubBytes);
  26981. return this.eddsa.g.mul(this.priv());
  26982. });
  26983. cachedProperty(KeyPair, 'privBytes', function privBytes() {
  26984. var eddsa = this.eddsa;
  26985. var hash = this.hash();
  26986. var lastIx = eddsa.encodingLength - 1;
  26987. var a = hash.slice(0, eddsa.encodingLength);
  26988. a[0] &= 248;
  26989. a[lastIx] &= 127;
  26990. a[lastIx] |= 64;
  26991. return a;
  26992. });
  26993. cachedProperty(KeyPair, 'priv', function priv() {
  26994. return this.eddsa.decodeInt(this.privBytes());
  26995. });
  26996. cachedProperty(KeyPair, 'hash', function hash() {
  26997. return this.eddsa.hash().update(this.secret()).digest();
  26998. });
  26999. cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() {
  27000. return this.hash().slice(this.eddsa.encodingLength);
  27001. });
  27002. KeyPair.prototype.sign = function sign(message) {
  27003. assert(this._secret, 'KeyPair can only verify');
  27004. return this.eddsa.sign(message, this);
  27005. };
  27006. KeyPair.prototype.verify = function verify(message, sig) {
  27007. return this.eddsa.verify(message, sig, this);
  27008. };
  27009. KeyPair.prototype.getSecret = function getSecret(enc) {
  27010. assert(this._secret, 'KeyPair is public only');
  27011. return utils.encode(this.secret(), enc);
  27012. };
  27013. KeyPair.prototype.getPublic = function getPublic(enc) {
  27014. return utils.encode(this.pubBytes(), enc);
  27015. };
  27016. module.exports = KeyPair;
  27017. /***/ }),
  27018. /***/ 202:
  27019. /*!***************************************************************!*\
  27020. !*** ./node_modules/elliptic/lib/elliptic/eddsa/signature.js ***!
  27021. \***************************************************************/
  27022. /*! no static exports found */
  27023. /***/ (function(module, exports, __webpack_require__) {
  27024. "use strict";
  27025. var BN = __webpack_require__(/*! bn.js */ 162);
  27026. var utils = __webpack_require__(/*! ../utils */ 175);
  27027. var assert = utils.assert;
  27028. var cachedProperty = utils.cachedProperty;
  27029. var parseBytes = utils.parseBytes;
  27030. /**
  27031. * @param {EDDSA} eddsa - eddsa instance
  27032. * @param {Array<Bytes>|Object} sig -
  27033. * @param {Array<Bytes>|Point} [sig.R] - R point as Point or bytes
  27034. * @param {Array<Bytes>|bn} [sig.S] - S scalar as bn or bytes
  27035. * @param {Array<Bytes>} [sig.Rencoded] - R point encoded
  27036. * @param {Array<Bytes>} [sig.Sencoded] - S scalar encoded
  27037. */
  27038. function Signature(eddsa, sig) {
  27039. this.eddsa = eddsa;
  27040. if (typeof sig !== 'object')
  27041. sig = parseBytes(sig);
  27042. if (Array.isArray(sig)) {
  27043. sig = {
  27044. R: sig.slice(0, eddsa.encodingLength),
  27045. S: sig.slice(eddsa.encodingLength),
  27046. };
  27047. }
  27048. assert(sig.R && sig.S, 'Signature without R or S');
  27049. if (eddsa.isPoint(sig.R))
  27050. this._R = sig.R;
  27051. if (sig.S instanceof BN)
  27052. this._S = sig.S;
  27053. this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;
  27054. this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;
  27055. }
  27056. cachedProperty(Signature, 'S', function S() {
  27057. return this.eddsa.decodeInt(this.Sencoded());
  27058. });
  27059. cachedProperty(Signature, 'R', function R() {
  27060. return this.eddsa.decodePoint(this.Rencoded());
  27061. });
  27062. cachedProperty(Signature, 'Rencoded', function Rencoded() {
  27063. return this.eddsa.encodePoint(this.R());
  27064. });
  27065. cachedProperty(Signature, 'Sencoded', function Sencoded() {
  27066. return this.eddsa.encodeInt(this.S());
  27067. });
  27068. Signature.prototype.toBytes = function toBytes() {
  27069. return this.Rencoded().concat(this.Sencoded());
  27070. };
  27071. Signature.prototype.toHex = function toHex() {
  27072. return utils.encode(this.toBytes(), 'hex').toUpperCase();
  27073. };
  27074. module.exports = Signature;
  27075. /***/ }),
  27076. /***/ 203:
  27077. /*!******************************************!*\
  27078. !*** ./node_modules/parse-asn1/index.js ***!
  27079. \******************************************/
  27080. /*! no static exports found */
  27081. /***/ (function(module, exports, __webpack_require__) {
  27082. var asn1 = __webpack_require__(/*! ./asn1 */ 204)
  27083. var aesid = __webpack_require__(/*! ./aesid.json */ 221)
  27084. var fixProc = __webpack_require__(/*! ./fixProc */ 222)
  27085. var ciphers = __webpack_require__(/*! browserify-aes */ 140)
  27086. var compat = __webpack_require__(/*! pbkdf2 */ 125)
  27087. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  27088. module.exports = parseKeys
  27089. function parseKeys (buffer) {
  27090. var password
  27091. if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) {
  27092. password = buffer.passphrase
  27093. buffer = buffer.key
  27094. }
  27095. if (typeof buffer === 'string') {
  27096. buffer = Buffer.from(buffer)
  27097. }
  27098. var stripped = fixProc(buffer, password)
  27099. var type = stripped.tag
  27100. var data = stripped.data
  27101. var subtype, ndata
  27102. switch (type) {
  27103. case 'CERTIFICATE':
  27104. ndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo
  27105. // falls through
  27106. case 'PUBLIC KEY':
  27107. if (!ndata) {
  27108. ndata = asn1.PublicKey.decode(data, 'der')
  27109. }
  27110. subtype = ndata.algorithm.algorithm.join('.')
  27111. switch (subtype) {
  27112. case '1.2.840.113549.1.1.1':
  27113. return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der')
  27114. case '1.2.840.10045.2.1':
  27115. ndata.subjectPrivateKey = ndata.subjectPublicKey
  27116. return {
  27117. type: 'ec',
  27118. data: ndata
  27119. }
  27120. case '1.2.840.10040.4.1':
  27121. ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der')
  27122. return {
  27123. type: 'dsa',
  27124. data: ndata.algorithm.params
  27125. }
  27126. default: throw new Error('unknown key id ' + subtype)
  27127. }
  27128. // throw new Error('unknown key type ' + type)
  27129. case 'ENCRYPTED PRIVATE KEY':
  27130. data = asn1.EncryptedPrivateKey.decode(data, 'der')
  27131. data = decrypt(data, password)
  27132. // falls through
  27133. case 'PRIVATE KEY':
  27134. ndata = asn1.PrivateKey.decode(data, 'der')
  27135. subtype = ndata.algorithm.algorithm.join('.')
  27136. switch (subtype) {
  27137. case '1.2.840.113549.1.1.1':
  27138. return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der')
  27139. case '1.2.840.10045.2.1':
  27140. return {
  27141. curve: ndata.algorithm.curve,
  27142. privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey
  27143. }
  27144. case '1.2.840.10040.4.1':
  27145. ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der')
  27146. return {
  27147. type: 'dsa',
  27148. params: ndata.algorithm.params
  27149. }
  27150. default: throw new Error('unknown key id ' + subtype)
  27151. }
  27152. // throw new Error('unknown key type ' + type)
  27153. case 'RSA PUBLIC KEY':
  27154. return asn1.RSAPublicKey.decode(data, 'der')
  27155. case 'RSA PRIVATE KEY':
  27156. return asn1.RSAPrivateKey.decode(data, 'der')
  27157. case 'DSA PRIVATE KEY':
  27158. return {
  27159. type: 'dsa',
  27160. params: asn1.DSAPrivateKey.decode(data, 'der')
  27161. }
  27162. case 'EC PRIVATE KEY':
  27163. data = asn1.ECPrivateKey.decode(data, 'der')
  27164. return {
  27165. curve: data.parameters.value,
  27166. privateKey: data.privateKey
  27167. }
  27168. default: throw new Error('unknown key type ' + type)
  27169. }
  27170. }
  27171. parseKeys.signature = asn1.signature
  27172. function decrypt (data, password) {
  27173. var salt = data.algorithm.decrypt.kde.kdeparams.salt
  27174. var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10)
  27175. var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')]
  27176. var iv = data.algorithm.decrypt.cipher.iv
  27177. var cipherText = data.subjectPrivateKey
  27178. var keylen = parseInt(algo.split('-')[1], 10) / 8
  27179. var key = compat.pbkdf2Sync(password, salt, iters, keylen, 'sha1')
  27180. var cipher = ciphers.createDecipheriv(algo, key, iv)
  27181. var out = []
  27182. out.push(cipher.update(cipherText))
  27183. out.push(cipher.final())
  27184. return Buffer.concat(out)
  27185. }
  27186. /***/ }),
  27187. /***/ 204:
  27188. /*!*****************************************!*\
  27189. !*** ./node_modules/parse-asn1/asn1.js ***!
  27190. \*****************************************/
  27191. /*! no static exports found */
  27192. /***/ (function(module, exports, __webpack_require__) {
  27193. "use strict";
  27194. // from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js
  27195. // Fedor, you are amazing.
  27196. var asn1 = __webpack_require__(/*! asn1.js */ 205)
  27197. exports.certificate = __webpack_require__(/*! ./certificate */ 220)
  27198. var RSAPrivateKey = asn1.define('RSAPrivateKey', function () {
  27199. this.seq().obj(
  27200. this.key('version').int(),
  27201. this.key('modulus').int(),
  27202. this.key('publicExponent').int(),
  27203. this.key('privateExponent').int(),
  27204. this.key('prime1').int(),
  27205. this.key('prime2').int(),
  27206. this.key('exponent1').int(),
  27207. this.key('exponent2').int(),
  27208. this.key('coefficient').int()
  27209. )
  27210. })
  27211. exports.RSAPrivateKey = RSAPrivateKey
  27212. var RSAPublicKey = asn1.define('RSAPublicKey', function () {
  27213. this.seq().obj(
  27214. this.key('modulus').int(),
  27215. this.key('publicExponent').int()
  27216. )
  27217. })
  27218. exports.RSAPublicKey = RSAPublicKey
  27219. var PublicKey = asn1.define('SubjectPublicKeyInfo', function () {
  27220. this.seq().obj(
  27221. this.key('algorithm').use(AlgorithmIdentifier),
  27222. this.key('subjectPublicKey').bitstr()
  27223. )
  27224. })
  27225. exports.PublicKey = PublicKey
  27226. var AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () {
  27227. this.seq().obj(
  27228. this.key('algorithm').objid(),
  27229. this.key('none').null_().optional(),
  27230. this.key('curve').objid().optional(),
  27231. this.key('params').seq().obj(
  27232. this.key('p').int(),
  27233. this.key('q').int(),
  27234. this.key('g').int()
  27235. ).optional()
  27236. )
  27237. })
  27238. var PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () {
  27239. this.seq().obj(
  27240. this.key('version').int(),
  27241. this.key('algorithm').use(AlgorithmIdentifier),
  27242. this.key('subjectPrivateKey').octstr()
  27243. )
  27244. })
  27245. exports.PrivateKey = PrivateKeyInfo
  27246. var EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () {
  27247. this.seq().obj(
  27248. this.key('algorithm').seq().obj(
  27249. this.key('id').objid(),
  27250. this.key('decrypt').seq().obj(
  27251. this.key('kde').seq().obj(
  27252. this.key('id').objid(),
  27253. this.key('kdeparams').seq().obj(
  27254. this.key('salt').octstr(),
  27255. this.key('iters').int()
  27256. )
  27257. ),
  27258. this.key('cipher').seq().obj(
  27259. this.key('algo').objid(),
  27260. this.key('iv').octstr()
  27261. )
  27262. )
  27263. ),
  27264. this.key('subjectPrivateKey').octstr()
  27265. )
  27266. })
  27267. exports.EncryptedPrivateKey = EncryptedPrivateKeyInfo
  27268. var DSAPrivateKey = asn1.define('DSAPrivateKey', function () {
  27269. this.seq().obj(
  27270. this.key('version').int(),
  27271. this.key('p').int(),
  27272. this.key('q').int(),
  27273. this.key('g').int(),
  27274. this.key('pub_key').int(),
  27275. this.key('priv_key').int()
  27276. )
  27277. })
  27278. exports.DSAPrivateKey = DSAPrivateKey
  27279. exports.DSAparam = asn1.define('DSAparam', function () {
  27280. this.int()
  27281. })
  27282. var ECPrivateKey = asn1.define('ECPrivateKey', function () {
  27283. this.seq().obj(
  27284. this.key('version').int(),
  27285. this.key('privateKey').octstr(),
  27286. this.key('parameters').optional().explicit(0).use(ECParameters),
  27287. this.key('publicKey').optional().explicit(1).bitstr()
  27288. )
  27289. })
  27290. exports.ECPrivateKey = ECPrivateKey
  27291. var ECParameters = asn1.define('ECParameters', function () {
  27292. this.choice({
  27293. namedCurve: this.objid()
  27294. })
  27295. })
  27296. exports.signature = asn1.define('signature', function () {
  27297. this.seq().obj(
  27298. this.key('r').int(),
  27299. this.key('s').int()
  27300. )
  27301. })
  27302. /***/ }),
  27303. /***/ 205:
  27304. /*!******************************************!*\
  27305. !*** ./node_modules/asn1.js/lib/asn1.js ***!
  27306. \******************************************/
  27307. /*! no static exports found */
  27308. /***/ (function(module, exports, __webpack_require__) {
  27309. "use strict";
  27310. const asn1 = exports;
  27311. asn1.bignum = __webpack_require__(/*! bn.js */ 162);
  27312. asn1.define = __webpack_require__(/*! ./asn1/api */ 206).define;
  27313. asn1.base = __webpack_require__(/*! ./asn1/base */ 218);
  27314. asn1.constants = __webpack_require__(/*! ./asn1/constants */ 219);
  27315. asn1.decoders = __webpack_require__(/*! ./asn1/decoders */ 215);
  27316. asn1.encoders = __webpack_require__(/*! ./asn1/encoders */ 207);
  27317. /***/ }),
  27318. /***/ 206:
  27319. /*!**********************************************!*\
  27320. !*** ./node_modules/asn1.js/lib/asn1/api.js ***!
  27321. \**********************************************/
  27322. /*! no static exports found */
  27323. /***/ (function(module, exports, __webpack_require__) {
  27324. "use strict";
  27325. const encoders = __webpack_require__(/*! ./encoders */ 207);
  27326. const decoders = __webpack_require__(/*! ./decoders */ 215);
  27327. const inherits = __webpack_require__(/*! inherits */ 86);
  27328. const api = exports;
  27329. api.define = function define(name, body) {
  27330. return new Entity(name, body);
  27331. };
  27332. function Entity(name, body) {
  27333. this.name = name;
  27334. this.body = body;
  27335. this.decoders = {};
  27336. this.encoders = {};
  27337. }
  27338. Entity.prototype._createNamed = function createNamed(Base) {
  27339. const name = this.name;
  27340. function Generated(entity) {
  27341. this._initNamed(entity, name);
  27342. }
  27343. inherits(Generated, Base);
  27344. Generated.prototype._initNamed = function _initNamed(entity, name) {
  27345. Base.call(this, entity, name);
  27346. };
  27347. return new Generated(this);
  27348. };
  27349. Entity.prototype._getDecoder = function _getDecoder(enc) {
  27350. enc = enc || 'der';
  27351. // Lazily create decoder
  27352. if (!this.decoders.hasOwnProperty(enc))
  27353. this.decoders[enc] = this._createNamed(decoders[enc]);
  27354. return this.decoders[enc];
  27355. };
  27356. Entity.prototype.decode = function decode(data, enc, options) {
  27357. return this._getDecoder(enc).decode(data, options);
  27358. };
  27359. Entity.prototype._getEncoder = function _getEncoder(enc) {
  27360. enc = enc || 'der';
  27361. // Lazily create encoder
  27362. if (!this.encoders.hasOwnProperty(enc))
  27363. this.encoders[enc] = this._createNamed(encoders[enc]);
  27364. return this.encoders[enc];
  27365. };
  27366. Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) {
  27367. return this._getEncoder(enc).encode(data, reporter);
  27368. };
  27369. /***/ }),
  27370. /***/ 207:
  27371. /*!*********************************************************!*\
  27372. !*** ./node_modules/asn1.js/lib/asn1/encoders/index.js ***!
  27373. \*********************************************************/
  27374. /*! no static exports found */
  27375. /***/ (function(module, exports, __webpack_require__) {
  27376. "use strict";
  27377. const encoders = exports;
  27378. encoders.der = __webpack_require__(/*! ./der */ 208);
  27379. encoders.pem = __webpack_require__(/*! ./pem */ 214);
  27380. /***/ }),
  27381. /***/ 208:
  27382. /*!*******************************************************!*\
  27383. !*** ./node_modules/asn1.js/lib/asn1/encoders/der.js ***!
  27384. \*******************************************************/
  27385. /*! no static exports found */
  27386. /***/ (function(module, exports, __webpack_require__) {
  27387. "use strict";
  27388. const inherits = __webpack_require__(/*! inherits */ 86);
  27389. const Buffer = __webpack_require__(/*! safer-buffer */ 209).Buffer;
  27390. const Node = __webpack_require__(/*! ../base/node */ 210);
  27391. // Import DER constants
  27392. const der = __webpack_require__(/*! ../constants/der */ 213);
  27393. function DEREncoder(entity) {
  27394. this.enc = 'der';
  27395. this.name = entity.name;
  27396. this.entity = entity;
  27397. // Construct base tree
  27398. this.tree = new DERNode();
  27399. this.tree._init(entity.body);
  27400. }
  27401. module.exports = DEREncoder;
  27402. DEREncoder.prototype.encode = function encode(data, reporter) {
  27403. return this.tree._encode(data, reporter).join();
  27404. };
  27405. // Tree methods
  27406. function DERNode(parent) {
  27407. Node.call(this, 'der', parent);
  27408. }
  27409. inherits(DERNode, Node);
  27410. DERNode.prototype._encodeComposite = function encodeComposite(tag,
  27411. primitive,
  27412. cls,
  27413. content) {
  27414. const encodedTag = encodeTag(tag, primitive, cls, this.reporter);
  27415. // Short form
  27416. if (content.length < 0x80) {
  27417. const header = Buffer.alloc(2);
  27418. header[0] = encodedTag;
  27419. header[1] = content.length;
  27420. return this._createEncoderBuffer([ header, content ]);
  27421. }
  27422. // Long form
  27423. // Count octets required to store length
  27424. let lenOctets = 1;
  27425. for (let i = content.length; i >= 0x100; i >>= 8)
  27426. lenOctets++;
  27427. const header = Buffer.alloc(1 + 1 + lenOctets);
  27428. header[0] = encodedTag;
  27429. header[1] = 0x80 | lenOctets;
  27430. for (let i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8)
  27431. header[i] = j & 0xff;
  27432. return this._createEncoderBuffer([ header, content ]);
  27433. };
  27434. DERNode.prototype._encodeStr = function encodeStr(str, tag) {
  27435. if (tag === 'bitstr') {
  27436. return this._createEncoderBuffer([ str.unused | 0, str.data ]);
  27437. } else if (tag === 'bmpstr') {
  27438. const buf = Buffer.alloc(str.length * 2);
  27439. for (let i = 0; i < str.length; i++) {
  27440. buf.writeUInt16BE(str.charCodeAt(i), i * 2);
  27441. }
  27442. return this._createEncoderBuffer(buf);
  27443. } else if (tag === 'numstr') {
  27444. if (!this._isNumstr(str)) {
  27445. return this.reporter.error('Encoding of string type: numstr supports ' +
  27446. 'only digits and space');
  27447. }
  27448. return this._createEncoderBuffer(str);
  27449. } else if (tag === 'printstr') {
  27450. if (!this._isPrintstr(str)) {
  27451. return this.reporter.error('Encoding of string type: printstr supports ' +
  27452. 'only latin upper and lower case letters, ' +
  27453. 'digits, space, apostrophe, left and rigth ' +
  27454. 'parenthesis, plus sign, comma, hyphen, ' +
  27455. 'dot, slash, colon, equal sign, ' +
  27456. 'question mark');
  27457. }
  27458. return this._createEncoderBuffer(str);
  27459. } else if (/str$/.test(tag)) {
  27460. return this._createEncoderBuffer(str);
  27461. } else if (tag === 'objDesc') {
  27462. return this._createEncoderBuffer(str);
  27463. } else {
  27464. return this.reporter.error('Encoding of string type: ' + tag +
  27465. ' unsupported');
  27466. }
  27467. };
  27468. DERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) {
  27469. if (typeof id === 'string') {
  27470. if (!values)
  27471. return this.reporter.error('string objid given, but no values map found');
  27472. if (!values.hasOwnProperty(id))
  27473. return this.reporter.error('objid not found in values map');
  27474. id = values[id].split(/[\s.]+/g);
  27475. for (let i = 0; i < id.length; i++)
  27476. id[i] |= 0;
  27477. } else if (Array.isArray(id)) {
  27478. id = id.slice();
  27479. for (let i = 0; i < id.length; i++)
  27480. id[i] |= 0;
  27481. }
  27482. if (!Array.isArray(id)) {
  27483. return this.reporter.error('objid() should be either array or string, ' +
  27484. 'got: ' + JSON.stringify(id));
  27485. }
  27486. if (!relative) {
  27487. if (id[1] >= 40)
  27488. return this.reporter.error('Second objid identifier OOB');
  27489. id.splice(0, 2, id[0] * 40 + id[1]);
  27490. }
  27491. // Count number of octets
  27492. let size = 0;
  27493. for (let i = 0; i < id.length; i++) {
  27494. let ident = id[i];
  27495. for (size++; ident >= 0x80; ident >>= 7)
  27496. size++;
  27497. }
  27498. const objid = Buffer.alloc(size);
  27499. let offset = objid.length - 1;
  27500. for (let i = id.length - 1; i >= 0; i--) {
  27501. let ident = id[i];
  27502. objid[offset--] = ident & 0x7f;
  27503. while ((ident >>= 7) > 0)
  27504. objid[offset--] = 0x80 | (ident & 0x7f);
  27505. }
  27506. return this._createEncoderBuffer(objid);
  27507. };
  27508. function two(num) {
  27509. if (num < 10)
  27510. return '0' + num;
  27511. else
  27512. return num;
  27513. }
  27514. DERNode.prototype._encodeTime = function encodeTime(time, tag) {
  27515. let str;
  27516. const date = new Date(time);
  27517. if (tag === 'gentime') {
  27518. str = [
  27519. two(date.getUTCFullYear()),
  27520. two(date.getUTCMonth() + 1),
  27521. two(date.getUTCDate()),
  27522. two(date.getUTCHours()),
  27523. two(date.getUTCMinutes()),
  27524. two(date.getUTCSeconds()),
  27525. 'Z'
  27526. ].join('');
  27527. } else if (tag === 'utctime') {
  27528. str = [
  27529. two(date.getUTCFullYear() % 100),
  27530. two(date.getUTCMonth() + 1),
  27531. two(date.getUTCDate()),
  27532. two(date.getUTCHours()),
  27533. two(date.getUTCMinutes()),
  27534. two(date.getUTCSeconds()),
  27535. 'Z'
  27536. ].join('');
  27537. } else {
  27538. this.reporter.error('Encoding ' + tag + ' time is not supported yet');
  27539. }
  27540. return this._encodeStr(str, 'octstr');
  27541. };
  27542. DERNode.prototype._encodeNull = function encodeNull() {
  27543. return this._createEncoderBuffer('');
  27544. };
  27545. DERNode.prototype._encodeInt = function encodeInt(num, values) {
  27546. if (typeof num === 'string') {
  27547. if (!values)
  27548. return this.reporter.error('String int or enum given, but no values map');
  27549. if (!values.hasOwnProperty(num)) {
  27550. return this.reporter.error('Values map doesn\'t contain: ' +
  27551. JSON.stringify(num));
  27552. }
  27553. num = values[num];
  27554. }
  27555. // Bignum, assume big endian
  27556. if (typeof num !== 'number' && !Buffer.isBuffer(num)) {
  27557. const numArray = num.toArray();
  27558. if (!num.sign && numArray[0] & 0x80) {
  27559. numArray.unshift(0);
  27560. }
  27561. num = Buffer.from(numArray);
  27562. }
  27563. if (Buffer.isBuffer(num)) {
  27564. let size = num.length;
  27565. if (num.length === 0)
  27566. size++;
  27567. const out = Buffer.alloc(size);
  27568. num.copy(out);
  27569. if (num.length === 0)
  27570. out[0] = 0;
  27571. return this._createEncoderBuffer(out);
  27572. }
  27573. if (num < 0x80)
  27574. return this._createEncoderBuffer(num);
  27575. if (num < 0x100)
  27576. return this._createEncoderBuffer([0, num]);
  27577. let size = 1;
  27578. for (let i = num; i >= 0x100; i >>= 8)
  27579. size++;
  27580. const out = new Array(size);
  27581. for (let i = out.length - 1; i >= 0; i--) {
  27582. out[i] = num & 0xff;
  27583. num >>= 8;
  27584. }
  27585. if(out[0] & 0x80) {
  27586. out.unshift(0);
  27587. }
  27588. return this._createEncoderBuffer(Buffer.from(out));
  27589. };
  27590. DERNode.prototype._encodeBool = function encodeBool(value) {
  27591. return this._createEncoderBuffer(value ? 0xff : 0);
  27592. };
  27593. DERNode.prototype._use = function use(entity, obj) {
  27594. if (typeof entity === 'function')
  27595. entity = entity(obj);
  27596. return entity._getEncoder('der').tree;
  27597. };
  27598. DERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) {
  27599. const state = this._baseState;
  27600. let i;
  27601. if (state['default'] === null)
  27602. return false;
  27603. const data = dataBuffer.join();
  27604. if (state.defaultBuffer === undefined)
  27605. state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join();
  27606. if (data.length !== state.defaultBuffer.length)
  27607. return false;
  27608. for (i=0; i < data.length; i++)
  27609. if (data[i] !== state.defaultBuffer[i])
  27610. return false;
  27611. return true;
  27612. };
  27613. // Utility methods
  27614. function encodeTag(tag, primitive, cls, reporter) {
  27615. let res;
  27616. if (tag === 'seqof')
  27617. tag = 'seq';
  27618. else if (tag === 'setof')
  27619. tag = 'set';
  27620. if (der.tagByName.hasOwnProperty(tag))
  27621. res = der.tagByName[tag];
  27622. else if (typeof tag === 'number' && (tag | 0) === tag)
  27623. res = tag;
  27624. else
  27625. return reporter.error('Unknown tag: ' + tag);
  27626. if (res >= 0x1f)
  27627. return reporter.error('Multi-octet tag encoding unsupported');
  27628. if (!primitive)
  27629. res |= 0x20;
  27630. res |= (der.tagClassByName[cls || 'universal'] << 6);
  27631. return res;
  27632. }
  27633. /***/ }),
  27634. /***/ 209:
  27635. /*!********************************************!*\
  27636. !*** ./node_modules/safer-buffer/safer.js ***!
  27637. \********************************************/
  27638. /*! no static exports found */
  27639. /***/ (function(module, exports, __webpack_require__) {
  27640. "use strict";
  27641. /* WEBPACK VAR INJECTION */(function(process) {/* eslint-disable node/no-deprecated-api */
  27642. var buffer = __webpack_require__(/*! buffer */ 81)
  27643. var Buffer = buffer.Buffer
  27644. var safer = {}
  27645. var key
  27646. for (key in buffer) {
  27647. if (!buffer.hasOwnProperty(key)) continue
  27648. if (key === 'SlowBuffer' || key === 'Buffer') continue
  27649. safer[key] = buffer[key]
  27650. }
  27651. var Safer = safer.Buffer = {}
  27652. for (key in Buffer) {
  27653. if (!Buffer.hasOwnProperty(key)) continue
  27654. if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue
  27655. Safer[key] = Buffer[key]
  27656. }
  27657. safer.Buffer.prototype = Buffer.prototype
  27658. if (!Safer.from || Safer.from === Uint8Array.from) {
  27659. Safer.from = function (value, encodingOrOffset, length) {
  27660. if (typeof value === 'number') {
  27661. throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value)
  27662. }
  27663. if (value && typeof value.length === 'undefined') {
  27664. throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value)
  27665. }
  27666. return Buffer(value, encodingOrOffset, length)
  27667. }
  27668. }
  27669. if (!Safer.alloc) {
  27670. Safer.alloc = function (size, fill, encoding) {
  27671. if (typeof size !== 'number') {
  27672. throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size)
  27673. }
  27674. if (size < 0 || size >= 2 * (1 << 30)) {
  27675. throw new RangeError('The value "' + size + '" is invalid for option "size"')
  27676. }
  27677. var buf = Buffer(size)
  27678. if (!fill || fill.length === 0) {
  27679. buf.fill(0)
  27680. } else if (typeof encoding === 'string') {
  27681. buf.fill(fill, encoding)
  27682. } else {
  27683. buf.fill(fill)
  27684. }
  27685. return buf
  27686. }
  27687. }
  27688. if (!safer.kStringMaxLength) {
  27689. try {
  27690. safer.kStringMaxLength = process.binding('buffer').kStringMaxLength
  27691. } catch (e) {
  27692. // we can't determine kStringMaxLength in environments where process.binding
  27693. // is unsupported, so let's not set it
  27694. }
  27695. }
  27696. if (!safer.constants) {
  27697. safer.constants = {
  27698. MAX_LENGTH: safer.kMaxLength
  27699. }
  27700. if (safer.kStringMaxLength) {
  27701. safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength
  27702. }
  27703. }
  27704. module.exports = safer
  27705. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 78)))
  27706. /***/ }),
  27707. /***/ 21:
  27708. /*!******************************************************************!*\
  27709. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  27710. \******************************************************************/
  27711. /*! no static exports found */
  27712. /***/ (function(module, exports) {
  27713. function _nonIterableSpread() {
  27714. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  27715. }
  27716. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  27717. /***/ }),
  27718. /***/ 210:
  27719. /*!****************************************************!*\
  27720. !*** ./node_modules/asn1.js/lib/asn1/base/node.js ***!
  27721. \****************************************************/
  27722. /*! no static exports found */
  27723. /***/ (function(module, exports, __webpack_require__) {
  27724. "use strict";
  27725. const Reporter = __webpack_require__(/*! ../base/reporter */ 211).Reporter;
  27726. const EncoderBuffer = __webpack_require__(/*! ../base/buffer */ 212).EncoderBuffer;
  27727. const DecoderBuffer = __webpack_require__(/*! ../base/buffer */ 212).DecoderBuffer;
  27728. const assert = __webpack_require__(/*! minimalistic-assert */ 136);
  27729. // Supported tags
  27730. const tags = [
  27731. 'seq', 'seqof', 'set', 'setof', 'objid', 'bool',
  27732. 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc',
  27733. 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str',
  27734. 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'
  27735. ];
  27736. // Public methods list
  27737. const methods = [
  27738. 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',
  27739. 'any', 'contains'
  27740. ].concat(tags);
  27741. // Overrided methods list
  27742. const overrided = [
  27743. '_peekTag', '_decodeTag', '_use',
  27744. '_decodeStr', '_decodeObjid', '_decodeTime',
  27745. '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',
  27746. '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',
  27747. '_encodeNull', '_encodeInt', '_encodeBool'
  27748. ];
  27749. function Node(enc, parent, name) {
  27750. const state = {};
  27751. this._baseState = state;
  27752. state.name = name;
  27753. state.enc = enc;
  27754. state.parent = parent || null;
  27755. state.children = null;
  27756. // State
  27757. state.tag = null;
  27758. state.args = null;
  27759. state.reverseArgs = null;
  27760. state.choice = null;
  27761. state.optional = false;
  27762. state.any = false;
  27763. state.obj = false;
  27764. state.use = null;
  27765. state.useDecoder = null;
  27766. state.key = null;
  27767. state['default'] = null;
  27768. state.explicit = null;
  27769. state.implicit = null;
  27770. state.contains = null;
  27771. // Should create new instance on each method
  27772. if (!state.parent) {
  27773. state.children = [];
  27774. this._wrap();
  27775. }
  27776. }
  27777. module.exports = Node;
  27778. const stateProps = [
  27779. 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',
  27780. 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',
  27781. 'implicit', 'contains'
  27782. ];
  27783. Node.prototype.clone = function clone() {
  27784. const state = this._baseState;
  27785. const cstate = {};
  27786. stateProps.forEach(function(prop) {
  27787. cstate[prop] = state[prop];
  27788. });
  27789. const res = new this.constructor(cstate.parent);
  27790. res._baseState = cstate;
  27791. return res;
  27792. };
  27793. Node.prototype._wrap = function wrap() {
  27794. const state = this._baseState;
  27795. methods.forEach(function(method) {
  27796. this[method] = function _wrappedMethod() {
  27797. const clone = new this.constructor(this);
  27798. state.children.push(clone);
  27799. return clone[method].apply(clone, arguments);
  27800. };
  27801. }, this);
  27802. };
  27803. Node.prototype._init = function init(body) {
  27804. const state = this._baseState;
  27805. assert(state.parent === null);
  27806. body.call(this);
  27807. // Filter children
  27808. state.children = state.children.filter(function(child) {
  27809. return child._baseState.parent === this;
  27810. }, this);
  27811. assert.equal(state.children.length, 1, 'Root node can have only one child');
  27812. };
  27813. Node.prototype._useArgs = function useArgs(args) {
  27814. const state = this._baseState;
  27815. // Filter children and args
  27816. const children = args.filter(function(arg) {
  27817. return arg instanceof this.constructor;
  27818. }, this);
  27819. args = args.filter(function(arg) {
  27820. return !(arg instanceof this.constructor);
  27821. }, this);
  27822. if (children.length !== 0) {
  27823. assert(state.children === null);
  27824. state.children = children;
  27825. // Replace parent to maintain backward link
  27826. children.forEach(function(child) {
  27827. child._baseState.parent = this;
  27828. }, this);
  27829. }
  27830. if (args.length !== 0) {
  27831. assert(state.args === null);
  27832. state.args = args;
  27833. state.reverseArgs = args.map(function(arg) {
  27834. if (typeof arg !== 'object' || arg.constructor !== Object)
  27835. return arg;
  27836. const res = {};
  27837. Object.keys(arg).forEach(function(key) {
  27838. if (key == (key | 0))
  27839. key |= 0;
  27840. const value = arg[key];
  27841. res[value] = key;
  27842. });
  27843. return res;
  27844. });
  27845. }
  27846. };
  27847. //
  27848. // Overrided methods
  27849. //
  27850. overrided.forEach(function(method) {
  27851. Node.prototype[method] = function _overrided() {
  27852. const state = this._baseState;
  27853. throw new Error(method + ' not implemented for encoding: ' + state.enc);
  27854. };
  27855. });
  27856. //
  27857. // Public methods
  27858. //
  27859. tags.forEach(function(tag) {
  27860. Node.prototype[tag] = function _tagMethod() {
  27861. const state = this._baseState;
  27862. const args = Array.prototype.slice.call(arguments);
  27863. assert(state.tag === null);
  27864. state.tag = tag;
  27865. this._useArgs(args);
  27866. return this;
  27867. };
  27868. });
  27869. Node.prototype.use = function use(item) {
  27870. assert(item);
  27871. const state = this._baseState;
  27872. assert(state.use === null);
  27873. state.use = item;
  27874. return this;
  27875. };
  27876. Node.prototype.optional = function optional() {
  27877. const state = this._baseState;
  27878. state.optional = true;
  27879. return this;
  27880. };
  27881. Node.prototype.def = function def(val) {
  27882. const state = this._baseState;
  27883. assert(state['default'] === null);
  27884. state['default'] = val;
  27885. state.optional = true;
  27886. return this;
  27887. };
  27888. Node.prototype.explicit = function explicit(num) {
  27889. const state = this._baseState;
  27890. assert(state.explicit === null && state.implicit === null);
  27891. state.explicit = num;
  27892. return this;
  27893. };
  27894. Node.prototype.implicit = function implicit(num) {
  27895. const state = this._baseState;
  27896. assert(state.explicit === null && state.implicit === null);
  27897. state.implicit = num;
  27898. return this;
  27899. };
  27900. Node.prototype.obj = function obj() {
  27901. const state = this._baseState;
  27902. const args = Array.prototype.slice.call(arguments);
  27903. state.obj = true;
  27904. if (args.length !== 0)
  27905. this._useArgs(args);
  27906. return this;
  27907. };
  27908. Node.prototype.key = function key(newKey) {
  27909. const state = this._baseState;
  27910. assert(state.key === null);
  27911. state.key = newKey;
  27912. return this;
  27913. };
  27914. Node.prototype.any = function any() {
  27915. const state = this._baseState;
  27916. state.any = true;
  27917. return this;
  27918. };
  27919. Node.prototype.choice = function choice(obj) {
  27920. const state = this._baseState;
  27921. assert(state.choice === null);
  27922. state.choice = obj;
  27923. this._useArgs(Object.keys(obj).map(function(key) {
  27924. return obj[key];
  27925. }));
  27926. return this;
  27927. };
  27928. Node.prototype.contains = function contains(item) {
  27929. const state = this._baseState;
  27930. assert(state.use === null);
  27931. state.contains = item;
  27932. return this;
  27933. };
  27934. //
  27935. // Decoding
  27936. //
  27937. Node.prototype._decode = function decode(input, options) {
  27938. const state = this._baseState;
  27939. // Decode root node
  27940. if (state.parent === null)
  27941. return input.wrapResult(state.children[0]._decode(input, options));
  27942. let result = state['default'];
  27943. let present = true;
  27944. let prevKey = null;
  27945. if (state.key !== null)
  27946. prevKey = input.enterKey(state.key);
  27947. // Check if tag is there
  27948. if (state.optional) {
  27949. let tag = null;
  27950. if (state.explicit !== null)
  27951. tag = state.explicit;
  27952. else if (state.implicit !== null)
  27953. tag = state.implicit;
  27954. else if (state.tag !== null)
  27955. tag = state.tag;
  27956. if (tag === null && !state.any) {
  27957. // Trial and Error
  27958. const save = input.save();
  27959. try {
  27960. if (state.choice === null)
  27961. this._decodeGeneric(state.tag, input, options);
  27962. else
  27963. this._decodeChoice(input, options);
  27964. present = true;
  27965. } catch (e) {
  27966. present = false;
  27967. }
  27968. input.restore(save);
  27969. } else {
  27970. present = this._peekTag(input, tag, state.any);
  27971. if (input.isError(present))
  27972. return present;
  27973. }
  27974. }
  27975. // Push object on stack
  27976. let prevObj;
  27977. if (state.obj && present)
  27978. prevObj = input.enterObject();
  27979. if (present) {
  27980. // Unwrap explicit values
  27981. if (state.explicit !== null) {
  27982. const explicit = this._decodeTag(input, state.explicit);
  27983. if (input.isError(explicit))
  27984. return explicit;
  27985. input = explicit;
  27986. }
  27987. const start = input.offset;
  27988. // Unwrap implicit and normal values
  27989. if (state.use === null && state.choice === null) {
  27990. let save;
  27991. if (state.any)
  27992. save = input.save();
  27993. const body = this._decodeTag(
  27994. input,
  27995. state.implicit !== null ? state.implicit : state.tag,
  27996. state.any
  27997. );
  27998. if (input.isError(body))
  27999. return body;
  28000. if (state.any)
  28001. result = input.raw(save);
  28002. else
  28003. input = body;
  28004. }
  28005. if (options && options.track && state.tag !== null)
  28006. options.track(input.path(), start, input.length, 'tagged');
  28007. if (options && options.track && state.tag !== null)
  28008. options.track(input.path(), input.offset, input.length, 'content');
  28009. // Select proper method for tag
  28010. if (state.any) {
  28011. // no-op
  28012. } else if (state.choice === null) {
  28013. result = this._decodeGeneric(state.tag, input, options);
  28014. } else {
  28015. result = this._decodeChoice(input, options);
  28016. }
  28017. if (input.isError(result))
  28018. return result;
  28019. // Decode children
  28020. if (!state.any && state.choice === null && state.children !== null) {
  28021. state.children.forEach(function decodeChildren(child) {
  28022. // NOTE: We are ignoring errors here, to let parser continue with other
  28023. // parts of encoded data
  28024. child._decode(input, options);
  28025. });
  28026. }
  28027. // Decode contained/encoded by schema, only in bit or octet strings
  28028. if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {
  28029. const data = new DecoderBuffer(result);
  28030. result = this._getUse(state.contains, input._reporterState.obj)
  28031. ._decode(data, options);
  28032. }
  28033. }
  28034. // Pop object
  28035. if (state.obj && present)
  28036. result = input.leaveObject(prevObj);
  28037. // Set key
  28038. if (state.key !== null && (result !== null || present === true))
  28039. input.leaveKey(prevKey, state.key, result);
  28040. else if (prevKey !== null)
  28041. input.exitKey(prevKey);
  28042. return result;
  28043. };
  28044. Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {
  28045. const state = this._baseState;
  28046. if (tag === 'seq' || tag === 'set')
  28047. return null;
  28048. if (tag === 'seqof' || tag === 'setof')
  28049. return this._decodeList(input, tag, state.args[0], options);
  28050. else if (/str$/.test(tag))
  28051. return this._decodeStr(input, tag, options);
  28052. else if (tag === 'objid' && state.args)
  28053. return this._decodeObjid(input, state.args[0], state.args[1], options);
  28054. else if (tag === 'objid')
  28055. return this._decodeObjid(input, null, null, options);
  28056. else if (tag === 'gentime' || tag === 'utctime')
  28057. return this._decodeTime(input, tag, options);
  28058. else if (tag === 'null_')
  28059. return this._decodeNull(input, options);
  28060. else if (tag === 'bool')
  28061. return this._decodeBool(input, options);
  28062. else if (tag === 'objDesc')
  28063. return this._decodeStr(input, tag, options);
  28064. else if (tag === 'int' || tag === 'enum')
  28065. return this._decodeInt(input, state.args && state.args[0], options);
  28066. if (state.use !== null) {
  28067. return this._getUse(state.use, input._reporterState.obj)
  28068. ._decode(input, options);
  28069. } else {
  28070. return input.error('unknown tag: ' + tag);
  28071. }
  28072. };
  28073. Node.prototype._getUse = function _getUse(entity, obj) {
  28074. const state = this._baseState;
  28075. // Create altered use decoder if implicit is set
  28076. state.useDecoder = this._use(entity, obj);
  28077. assert(state.useDecoder._baseState.parent === null);
  28078. state.useDecoder = state.useDecoder._baseState.children[0];
  28079. if (state.implicit !== state.useDecoder._baseState.implicit) {
  28080. state.useDecoder = state.useDecoder.clone();
  28081. state.useDecoder._baseState.implicit = state.implicit;
  28082. }
  28083. return state.useDecoder;
  28084. };
  28085. Node.prototype._decodeChoice = function decodeChoice(input, options) {
  28086. const state = this._baseState;
  28087. let result = null;
  28088. let match = false;
  28089. Object.keys(state.choice).some(function(key) {
  28090. const save = input.save();
  28091. const node = state.choice[key];
  28092. try {
  28093. const value = node._decode(input, options);
  28094. if (input.isError(value))
  28095. return false;
  28096. result = { type: key, value: value };
  28097. match = true;
  28098. } catch (e) {
  28099. input.restore(save);
  28100. return false;
  28101. }
  28102. return true;
  28103. }, this);
  28104. if (!match)
  28105. return input.error('Choice not matched');
  28106. return result;
  28107. };
  28108. //
  28109. // Encoding
  28110. //
  28111. Node.prototype._createEncoderBuffer = function createEncoderBuffer(data) {
  28112. return new EncoderBuffer(data, this.reporter);
  28113. };
  28114. Node.prototype._encode = function encode(data, reporter, parent) {
  28115. const state = this._baseState;
  28116. if (state['default'] !== null && state['default'] === data)
  28117. return;
  28118. const result = this._encodeValue(data, reporter, parent);
  28119. if (result === undefined)
  28120. return;
  28121. if (this._skipDefault(result, reporter, parent))
  28122. return;
  28123. return result;
  28124. };
  28125. Node.prototype._encodeValue = function encode(data, reporter, parent) {
  28126. const state = this._baseState;
  28127. // Decode root node
  28128. if (state.parent === null)
  28129. return state.children[0]._encode(data, reporter || new Reporter());
  28130. let result = null;
  28131. // Set reporter to share it with a child class
  28132. this.reporter = reporter;
  28133. // Check if data is there
  28134. if (state.optional && data === undefined) {
  28135. if (state['default'] !== null)
  28136. data = state['default'];
  28137. else
  28138. return;
  28139. }
  28140. // Encode children first
  28141. let content = null;
  28142. let primitive = false;
  28143. if (state.any) {
  28144. // Anything that was given is translated to buffer
  28145. result = this._createEncoderBuffer(data);
  28146. } else if (state.choice) {
  28147. result = this._encodeChoice(data, reporter);
  28148. } else if (state.contains) {
  28149. content = this._getUse(state.contains, parent)._encode(data, reporter);
  28150. primitive = true;
  28151. } else if (state.children) {
  28152. content = state.children.map(function(child) {
  28153. if (child._baseState.tag === 'null_')
  28154. return child._encode(null, reporter, data);
  28155. if (child._baseState.key === null)
  28156. return reporter.error('Child should have a key');
  28157. const prevKey = reporter.enterKey(child._baseState.key);
  28158. if (typeof data !== 'object')
  28159. return reporter.error('Child expected, but input is not object');
  28160. const res = child._encode(data[child._baseState.key], reporter, data);
  28161. reporter.leaveKey(prevKey);
  28162. return res;
  28163. }, this).filter(function(child) {
  28164. return child;
  28165. });
  28166. content = this._createEncoderBuffer(content);
  28167. } else {
  28168. if (state.tag === 'seqof' || state.tag === 'setof') {
  28169. // TODO(indutny): this should be thrown on DSL level
  28170. if (!(state.args && state.args.length === 1))
  28171. return reporter.error('Too many args for : ' + state.tag);
  28172. if (!Array.isArray(data))
  28173. return reporter.error('seqof/setof, but data is not Array');
  28174. const child = this.clone();
  28175. child._baseState.implicit = null;
  28176. content = this._createEncoderBuffer(data.map(function(item) {
  28177. const state = this._baseState;
  28178. return this._getUse(state.args[0], data)._encode(item, reporter);
  28179. }, child));
  28180. } else if (state.use !== null) {
  28181. result = this._getUse(state.use, parent)._encode(data, reporter);
  28182. } else {
  28183. content = this._encodePrimitive(state.tag, data);
  28184. primitive = true;
  28185. }
  28186. }
  28187. // Encode data itself
  28188. if (!state.any && state.choice === null) {
  28189. const tag = state.implicit !== null ? state.implicit : state.tag;
  28190. const cls = state.implicit === null ? 'universal' : 'context';
  28191. if (tag === null) {
  28192. if (state.use === null)
  28193. reporter.error('Tag could be omitted only for .use()');
  28194. } else {
  28195. if (state.use === null)
  28196. result = this._encodeComposite(tag, primitive, cls, content);
  28197. }
  28198. }
  28199. // Wrap in explicit
  28200. if (state.explicit !== null)
  28201. result = this._encodeComposite(state.explicit, false, 'context', result);
  28202. return result;
  28203. };
  28204. Node.prototype._encodeChoice = function encodeChoice(data, reporter) {
  28205. const state = this._baseState;
  28206. const node = state.choice[data.type];
  28207. if (!node) {
  28208. assert(
  28209. false,
  28210. data.type + ' not found in ' +
  28211. JSON.stringify(Object.keys(state.choice)));
  28212. }
  28213. return node._encode(data.value, reporter);
  28214. };
  28215. Node.prototype._encodePrimitive = function encodePrimitive(tag, data) {
  28216. const state = this._baseState;
  28217. if (/str$/.test(tag))
  28218. return this._encodeStr(data, tag);
  28219. else if (tag === 'objid' && state.args)
  28220. return this._encodeObjid(data, state.reverseArgs[0], state.args[1]);
  28221. else if (tag === 'objid')
  28222. return this._encodeObjid(data, null, null);
  28223. else if (tag === 'gentime' || tag === 'utctime')
  28224. return this._encodeTime(data, tag);
  28225. else if (tag === 'null_')
  28226. return this._encodeNull();
  28227. else if (tag === 'int' || tag === 'enum')
  28228. return this._encodeInt(data, state.args && state.reverseArgs[0]);
  28229. else if (tag === 'bool')
  28230. return this._encodeBool(data);
  28231. else if (tag === 'objDesc')
  28232. return this._encodeStr(data, tag);
  28233. else
  28234. throw new Error('Unsupported tag: ' + tag);
  28235. };
  28236. Node.prototype._isNumstr = function isNumstr(str) {
  28237. return /^[0-9 ]*$/.test(str);
  28238. };
  28239. Node.prototype._isPrintstr = function isPrintstr(str) {
  28240. return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str);
  28241. };
  28242. /***/ }),
  28243. /***/ 211:
  28244. /*!********************************************************!*\
  28245. !*** ./node_modules/asn1.js/lib/asn1/base/reporter.js ***!
  28246. \********************************************************/
  28247. /*! no static exports found */
  28248. /***/ (function(module, exports, __webpack_require__) {
  28249. "use strict";
  28250. const inherits = __webpack_require__(/*! inherits */ 86);
  28251. function Reporter(options) {
  28252. this._reporterState = {
  28253. obj: null,
  28254. path: [],
  28255. options: options || {},
  28256. errors: []
  28257. };
  28258. }
  28259. exports.Reporter = Reporter;
  28260. Reporter.prototype.isError = function isError(obj) {
  28261. return obj instanceof ReporterError;
  28262. };
  28263. Reporter.prototype.save = function save() {
  28264. const state = this._reporterState;
  28265. return { obj: state.obj, pathLen: state.path.length };
  28266. };
  28267. Reporter.prototype.restore = function restore(data) {
  28268. const state = this._reporterState;
  28269. state.obj = data.obj;
  28270. state.path = state.path.slice(0, data.pathLen);
  28271. };
  28272. Reporter.prototype.enterKey = function enterKey(key) {
  28273. return this._reporterState.path.push(key);
  28274. };
  28275. Reporter.prototype.exitKey = function exitKey(index) {
  28276. const state = this._reporterState;
  28277. state.path = state.path.slice(0, index - 1);
  28278. };
  28279. Reporter.prototype.leaveKey = function leaveKey(index, key, value) {
  28280. const state = this._reporterState;
  28281. this.exitKey(index);
  28282. if (state.obj !== null)
  28283. state.obj[key] = value;
  28284. };
  28285. Reporter.prototype.path = function path() {
  28286. return this._reporterState.path.join('/');
  28287. };
  28288. Reporter.prototype.enterObject = function enterObject() {
  28289. const state = this._reporterState;
  28290. const prev = state.obj;
  28291. state.obj = {};
  28292. return prev;
  28293. };
  28294. Reporter.prototype.leaveObject = function leaveObject(prev) {
  28295. const state = this._reporterState;
  28296. const now = state.obj;
  28297. state.obj = prev;
  28298. return now;
  28299. };
  28300. Reporter.prototype.error = function error(msg) {
  28301. let err;
  28302. const state = this._reporterState;
  28303. const inherited = msg instanceof ReporterError;
  28304. if (inherited) {
  28305. err = msg;
  28306. } else {
  28307. err = new ReporterError(state.path.map(function(elem) {
  28308. return '[' + JSON.stringify(elem) + ']';
  28309. }).join(''), msg.message || msg, msg.stack);
  28310. }
  28311. if (!state.options.partial)
  28312. throw err;
  28313. if (!inherited)
  28314. state.errors.push(err);
  28315. return err;
  28316. };
  28317. Reporter.prototype.wrapResult = function wrapResult(result) {
  28318. const state = this._reporterState;
  28319. if (!state.options.partial)
  28320. return result;
  28321. return {
  28322. result: this.isError(result) ? null : result,
  28323. errors: state.errors
  28324. };
  28325. };
  28326. function ReporterError(path, msg) {
  28327. this.path = path;
  28328. this.rethrow(msg);
  28329. }
  28330. inherits(ReporterError, Error);
  28331. ReporterError.prototype.rethrow = function rethrow(msg) {
  28332. this.message = msg + ' at: ' + (this.path || '(shallow)');
  28333. if (Error.captureStackTrace)
  28334. Error.captureStackTrace(this, ReporterError);
  28335. if (!this.stack) {
  28336. try {
  28337. // IE only adds stack when thrown
  28338. throw new Error(this.message);
  28339. } catch (e) {
  28340. this.stack = e.stack;
  28341. }
  28342. }
  28343. return this;
  28344. };
  28345. /***/ }),
  28346. /***/ 212:
  28347. /*!******************************************************!*\
  28348. !*** ./node_modules/asn1.js/lib/asn1/base/buffer.js ***!
  28349. \******************************************************/
  28350. /*! no static exports found */
  28351. /***/ (function(module, exports, __webpack_require__) {
  28352. "use strict";
  28353. const inherits = __webpack_require__(/*! inherits */ 86);
  28354. const Reporter = __webpack_require__(/*! ../base/reporter */ 211).Reporter;
  28355. const Buffer = __webpack_require__(/*! safer-buffer */ 209).Buffer;
  28356. function DecoderBuffer(base, options) {
  28357. Reporter.call(this, options);
  28358. if (!Buffer.isBuffer(base)) {
  28359. this.error('Input not Buffer');
  28360. return;
  28361. }
  28362. this.base = base;
  28363. this.offset = 0;
  28364. this.length = base.length;
  28365. }
  28366. inherits(DecoderBuffer, Reporter);
  28367. exports.DecoderBuffer = DecoderBuffer;
  28368. DecoderBuffer.isDecoderBuffer = function isDecoderBuffer(data) {
  28369. if (data instanceof DecoderBuffer) {
  28370. return true;
  28371. }
  28372. // Or accept compatible API
  28373. const isCompatible = typeof data === 'object' &&
  28374. Buffer.isBuffer(data.base) &&
  28375. data.constructor.name === 'DecoderBuffer' &&
  28376. typeof data.offset === 'number' &&
  28377. typeof data.length === 'number' &&
  28378. typeof data.save === 'function' &&
  28379. typeof data.restore === 'function' &&
  28380. typeof data.isEmpty === 'function' &&
  28381. typeof data.readUInt8 === 'function' &&
  28382. typeof data.skip === 'function' &&
  28383. typeof data.raw === 'function';
  28384. return isCompatible;
  28385. };
  28386. DecoderBuffer.prototype.save = function save() {
  28387. return { offset: this.offset, reporter: Reporter.prototype.save.call(this) };
  28388. };
  28389. DecoderBuffer.prototype.restore = function restore(save) {
  28390. // Return skipped data
  28391. const res = new DecoderBuffer(this.base);
  28392. res.offset = save.offset;
  28393. res.length = this.offset;
  28394. this.offset = save.offset;
  28395. Reporter.prototype.restore.call(this, save.reporter);
  28396. return res;
  28397. };
  28398. DecoderBuffer.prototype.isEmpty = function isEmpty() {
  28399. return this.offset === this.length;
  28400. };
  28401. DecoderBuffer.prototype.readUInt8 = function readUInt8(fail) {
  28402. if (this.offset + 1 <= this.length)
  28403. return this.base.readUInt8(this.offset++, true);
  28404. else
  28405. return this.error(fail || 'DecoderBuffer overrun');
  28406. };
  28407. DecoderBuffer.prototype.skip = function skip(bytes, fail) {
  28408. if (!(this.offset + bytes <= this.length))
  28409. return this.error(fail || 'DecoderBuffer overrun');
  28410. const res = new DecoderBuffer(this.base);
  28411. // Share reporter state
  28412. res._reporterState = this._reporterState;
  28413. res.offset = this.offset;
  28414. res.length = this.offset + bytes;
  28415. this.offset += bytes;
  28416. return res;
  28417. };
  28418. DecoderBuffer.prototype.raw = function raw(save) {
  28419. return this.base.slice(save ? save.offset : this.offset, this.length);
  28420. };
  28421. function EncoderBuffer(value, reporter) {
  28422. if (Array.isArray(value)) {
  28423. this.length = 0;
  28424. this.value = value.map(function(item) {
  28425. if (!EncoderBuffer.isEncoderBuffer(item))
  28426. item = new EncoderBuffer(item, reporter);
  28427. this.length += item.length;
  28428. return item;
  28429. }, this);
  28430. } else if (typeof value === 'number') {
  28431. if (!(0 <= value && value <= 0xff))
  28432. return reporter.error('non-byte EncoderBuffer value');
  28433. this.value = value;
  28434. this.length = 1;
  28435. } else if (typeof value === 'string') {
  28436. this.value = value;
  28437. this.length = Buffer.byteLength(value);
  28438. } else if (Buffer.isBuffer(value)) {
  28439. this.value = value;
  28440. this.length = value.length;
  28441. } else {
  28442. return reporter.error('Unsupported type: ' + typeof value);
  28443. }
  28444. }
  28445. exports.EncoderBuffer = EncoderBuffer;
  28446. EncoderBuffer.isEncoderBuffer = function isEncoderBuffer(data) {
  28447. if (data instanceof EncoderBuffer) {
  28448. return true;
  28449. }
  28450. // Or accept compatible API
  28451. const isCompatible = typeof data === 'object' &&
  28452. data.constructor.name === 'EncoderBuffer' &&
  28453. typeof data.length === 'number' &&
  28454. typeof data.join === 'function';
  28455. return isCompatible;
  28456. };
  28457. EncoderBuffer.prototype.join = function join(out, offset) {
  28458. if (!out)
  28459. out = Buffer.alloc(this.length);
  28460. if (!offset)
  28461. offset = 0;
  28462. if (this.length === 0)
  28463. return out;
  28464. if (Array.isArray(this.value)) {
  28465. this.value.forEach(function(item) {
  28466. item.join(out, offset);
  28467. offset += item.length;
  28468. });
  28469. } else {
  28470. if (typeof this.value === 'number')
  28471. out[offset] = this.value;
  28472. else if (typeof this.value === 'string')
  28473. out.write(this.value, offset);
  28474. else if (Buffer.isBuffer(this.value))
  28475. this.value.copy(out, offset);
  28476. offset += this.length;
  28477. }
  28478. return out;
  28479. };
  28480. /***/ }),
  28481. /***/ 213:
  28482. /*!********************************************************!*\
  28483. !*** ./node_modules/asn1.js/lib/asn1/constants/der.js ***!
  28484. \********************************************************/
  28485. /*! no static exports found */
  28486. /***/ (function(module, exports, __webpack_require__) {
  28487. "use strict";
  28488. // Helper
  28489. function reverse(map) {
  28490. const res = {};
  28491. Object.keys(map).forEach(function(key) {
  28492. // Convert key to integer if it is stringified
  28493. if ((key | 0) == key)
  28494. key = key | 0;
  28495. const value = map[key];
  28496. res[value] = key;
  28497. });
  28498. return res;
  28499. }
  28500. exports.tagClass = {
  28501. 0: 'universal',
  28502. 1: 'application',
  28503. 2: 'context',
  28504. 3: 'private'
  28505. };
  28506. exports.tagClassByName = reverse(exports.tagClass);
  28507. exports.tag = {
  28508. 0x00: 'end',
  28509. 0x01: 'bool',
  28510. 0x02: 'int',
  28511. 0x03: 'bitstr',
  28512. 0x04: 'octstr',
  28513. 0x05: 'null_',
  28514. 0x06: 'objid',
  28515. 0x07: 'objDesc',
  28516. 0x08: 'external',
  28517. 0x09: 'real',
  28518. 0x0a: 'enum',
  28519. 0x0b: 'embed',
  28520. 0x0c: 'utf8str',
  28521. 0x0d: 'relativeOid',
  28522. 0x10: 'seq',
  28523. 0x11: 'set',
  28524. 0x12: 'numstr',
  28525. 0x13: 'printstr',
  28526. 0x14: 't61str',
  28527. 0x15: 'videostr',
  28528. 0x16: 'ia5str',
  28529. 0x17: 'utctime',
  28530. 0x18: 'gentime',
  28531. 0x19: 'graphstr',
  28532. 0x1a: 'iso646str',
  28533. 0x1b: 'genstr',
  28534. 0x1c: 'unistr',
  28535. 0x1d: 'charstr',
  28536. 0x1e: 'bmpstr'
  28537. };
  28538. exports.tagByName = reverse(exports.tag);
  28539. /***/ }),
  28540. /***/ 214:
  28541. /*!*******************************************************!*\
  28542. !*** ./node_modules/asn1.js/lib/asn1/encoders/pem.js ***!
  28543. \*******************************************************/
  28544. /*! no static exports found */
  28545. /***/ (function(module, exports, __webpack_require__) {
  28546. "use strict";
  28547. const inherits = __webpack_require__(/*! inherits */ 86);
  28548. const DEREncoder = __webpack_require__(/*! ./der */ 208);
  28549. function PEMEncoder(entity) {
  28550. DEREncoder.call(this, entity);
  28551. this.enc = 'pem';
  28552. }
  28553. inherits(PEMEncoder, DEREncoder);
  28554. module.exports = PEMEncoder;
  28555. PEMEncoder.prototype.encode = function encode(data, options) {
  28556. const buf = DEREncoder.prototype.encode.call(this, data);
  28557. const p = buf.toString('base64');
  28558. const out = [ '-----BEGIN ' + options.label + '-----' ];
  28559. for (let i = 0; i < p.length; i += 64)
  28560. out.push(p.slice(i, i + 64));
  28561. out.push('-----END ' + options.label + '-----');
  28562. return out.join('\n');
  28563. };
  28564. /***/ }),
  28565. /***/ 215:
  28566. /*!*********************************************************!*\
  28567. !*** ./node_modules/asn1.js/lib/asn1/decoders/index.js ***!
  28568. \*********************************************************/
  28569. /*! no static exports found */
  28570. /***/ (function(module, exports, __webpack_require__) {
  28571. "use strict";
  28572. const decoders = exports;
  28573. decoders.der = __webpack_require__(/*! ./der */ 216);
  28574. decoders.pem = __webpack_require__(/*! ./pem */ 217);
  28575. /***/ }),
  28576. /***/ 216:
  28577. /*!*******************************************************!*\
  28578. !*** ./node_modules/asn1.js/lib/asn1/decoders/der.js ***!
  28579. \*******************************************************/
  28580. /*! no static exports found */
  28581. /***/ (function(module, exports, __webpack_require__) {
  28582. "use strict";
  28583. const inherits = __webpack_require__(/*! inherits */ 86);
  28584. const bignum = __webpack_require__(/*! bn.js */ 162);
  28585. const DecoderBuffer = __webpack_require__(/*! ../base/buffer */ 212).DecoderBuffer;
  28586. const Node = __webpack_require__(/*! ../base/node */ 210);
  28587. // Import DER constants
  28588. const der = __webpack_require__(/*! ../constants/der */ 213);
  28589. function DERDecoder(entity) {
  28590. this.enc = 'der';
  28591. this.name = entity.name;
  28592. this.entity = entity;
  28593. // Construct base tree
  28594. this.tree = new DERNode();
  28595. this.tree._init(entity.body);
  28596. }
  28597. module.exports = DERDecoder;
  28598. DERDecoder.prototype.decode = function decode(data, options) {
  28599. if (!DecoderBuffer.isDecoderBuffer(data)) {
  28600. data = new DecoderBuffer(data, options);
  28601. }
  28602. return this.tree._decode(data, options);
  28603. };
  28604. // Tree methods
  28605. function DERNode(parent) {
  28606. Node.call(this, 'der', parent);
  28607. }
  28608. inherits(DERNode, Node);
  28609. DERNode.prototype._peekTag = function peekTag(buffer, tag, any) {
  28610. if (buffer.isEmpty())
  28611. return false;
  28612. const state = buffer.save();
  28613. const decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"');
  28614. if (buffer.isError(decodedTag))
  28615. return decodedTag;
  28616. buffer.restore(state);
  28617. return decodedTag.tag === tag || decodedTag.tagStr === tag ||
  28618. (decodedTag.tagStr + 'of') === tag || any;
  28619. };
  28620. DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) {
  28621. const decodedTag = derDecodeTag(buffer,
  28622. 'Failed to decode tag of "' + tag + '"');
  28623. if (buffer.isError(decodedTag))
  28624. return decodedTag;
  28625. let len = derDecodeLen(buffer,
  28626. decodedTag.primitive,
  28627. 'Failed to get length of "' + tag + '"');
  28628. // Failure
  28629. if (buffer.isError(len))
  28630. return len;
  28631. if (!any &&
  28632. decodedTag.tag !== tag &&
  28633. decodedTag.tagStr !== tag &&
  28634. decodedTag.tagStr + 'of' !== tag) {
  28635. return buffer.error('Failed to match tag: "' + tag + '"');
  28636. }
  28637. if (decodedTag.primitive || len !== null)
  28638. return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
  28639. // Indefinite length... find END tag
  28640. const state = buffer.save();
  28641. const res = this._skipUntilEnd(
  28642. buffer,
  28643. 'Failed to skip indefinite length body: "' + this.tag + '"');
  28644. if (buffer.isError(res))
  28645. return res;
  28646. len = buffer.offset - state.offset;
  28647. buffer.restore(state);
  28648. return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
  28649. };
  28650. DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {
  28651. for (;;) {
  28652. const tag = derDecodeTag(buffer, fail);
  28653. if (buffer.isError(tag))
  28654. return tag;
  28655. const len = derDecodeLen(buffer, tag.primitive, fail);
  28656. if (buffer.isError(len))
  28657. return len;
  28658. let res;
  28659. if (tag.primitive || len !== null)
  28660. res = buffer.skip(len);
  28661. else
  28662. res = this._skipUntilEnd(buffer, fail);
  28663. // Failure
  28664. if (buffer.isError(res))
  28665. return res;
  28666. if (tag.tagStr === 'end')
  28667. break;
  28668. }
  28669. };
  28670. DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder,
  28671. options) {
  28672. const result = [];
  28673. while (!buffer.isEmpty()) {
  28674. const possibleEnd = this._peekTag(buffer, 'end');
  28675. if (buffer.isError(possibleEnd))
  28676. return possibleEnd;
  28677. const res = decoder.decode(buffer, 'der', options);
  28678. if (buffer.isError(res) && possibleEnd)
  28679. break;
  28680. result.push(res);
  28681. }
  28682. return result;
  28683. };
  28684. DERNode.prototype._decodeStr = function decodeStr(buffer, tag) {
  28685. if (tag === 'bitstr') {
  28686. const unused = buffer.readUInt8();
  28687. if (buffer.isError(unused))
  28688. return unused;
  28689. return { unused: unused, data: buffer.raw() };
  28690. } else if (tag === 'bmpstr') {
  28691. const raw = buffer.raw();
  28692. if (raw.length % 2 === 1)
  28693. return buffer.error('Decoding of string type: bmpstr length mismatch');
  28694. let str = '';
  28695. for (let i = 0; i < raw.length / 2; i++) {
  28696. str += String.fromCharCode(raw.readUInt16BE(i * 2));
  28697. }
  28698. return str;
  28699. } else if (tag === 'numstr') {
  28700. const numstr = buffer.raw().toString('ascii');
  28701. if (!this._isNumstr(numstr)) {
  28702. return buffer.error('Decoding of string type: ' +
  28703. 'numstr unsupported characters');
  28704. }
  28705. return numstr;
  28706. } else if (tag === 'octstr') {
  28707. return buffer.raw();
  28708. } else if (tag === 'objDesc') {
  28709. return buffer.raw();
  28710. } else if (tag === 'printstr') {
  28711. const printstr = buffer.raw().toString('ascii');
  28712. if (!this._isPrintstr(printstr)) {
  28713. return buffer.error('Decoding of string type: ' +
  28714. 'printstr unsupported characters');
  28715. }
  28716. return printstr;
  28717. } else if (/str$/.test(tag)) {
  28718. return buffer.raw().toString();
  28719. } else {
  28720. return buffer.error('Decoding of string type: ' + tag + ' unsupported');
  28721. }
  28722. };
  28723. DERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) {
  28724. let result;
  28725. const identifiers = [];
  28726. let ident = 0;
  28727. let subident = 0;
  28728. while (!buffer.isEmpty()) {
  28729. subident = buffer.readUInt8();
  28730. ident <<= 7;
  28731. ident |= subident & 0x7f;
  28732. if ((subident & 0x80) === 0) {
  28733. identifiers.push(ident);
  28734. ident = 0;
  28735. }
  28736. }
  28737. if (subident & 0x80)
  28738. identifiers.push(ident);
  28739. const first = (identifiers[0] / 40) | 0;
  28740. const second = identifiers[0] % 40;
  28741. if (relative)
  28742. result = identifiers;
  28743. else
  28744. result = [first, second].concat(identifiers.slice(1));
  28745. if (values) {
  28746. let tmp = values[result.join(' ')];
  28747. if (tmp === undefined)
  28748. tmp = values[result.join('.')];
  28749. if (tmp !== undefined)
  28750. result = tmp;
  28751. }
  28752. return result;
  28753. };
  28754. DERNode.prototype._decodeTime = function decodeTime(buffer, tag) {
  28755. const str = buffer.raw().toString();
  28756. let year;
  28757. let mon;
  28758. let day;
  28759. let hour;
  28760. let min;
  28761. let sec;
  28762. if (tag === 'gentime') {
  28763. year = str.slice(0, 4) | 0;
  28764. mon = str.slice(4, 6) | 0;
  28765. day = str.slice(6, 8) | 0;
  28766. hour = str.slice(8, 10) | 0;
  28767. min = str.slice(10, 12) | 0;
  28768. sec = str.slice(12, 14) | 0;
  28769. } else if (tag === 'utctime') {
  28770. year = str.slice(0, 2) | 0;
  28771. mon = str.slice(2, 4) | 0;
  28772. day = str.slice(4, 6) | 0;
  28773. hour = str.slice(6, 8) | 0;
  28774. min = str.slice(8, 10) | 0;
  28775. sec = str.slice(10, 12) | 0;
  28776. if (year < 70)
  28777. year = 2000 + year;
  28778. else
  28779. year = 1900 + year;
  28780. } else {
  28781. return buffer.error('Decoding ' + tag + ' time is not supported yet');
  28782. }
  28783. return Date.UTC(year, mon - 1, day, hour, min, sec, 0);
  28784. };
  28785. DERNode.prototype._decodeNull = function decodeNull() {
  28786. return null;
  28787. };
  28788. DERNode.prototype._decodeBool = function decodeBool(buffer) {
  28789. const res = buffer.readUInt8();
  28790. if (buffer.isError(res))
  28791. return res;
  28792. else
  28793. return res !== 0;
  28794. };
  28795. DERNode.prototype._decodeInt = function decodeInt(buffer, values) {
  28796. // Bigint, return as it is (assume big endian)
  28797. const raw = buffer.raw();
  28798. let res = new bignum(raw);
  28799. if (values)
  28800. res = values[res.toString(10)] || res;
  28801. return res;
  28802. };
  28803. DERNode.prototype._use = function use(entity, obj) {
  28804. if (typeof entity === 'function')
  28805. entity = entity(obj);
  28806. return entity._getDecoder('der').tree;
  28807. };
  28808. // Utility methods
  28809. function derDecodeTag(buf, fail) {
  28810. let tag = buf.readUInt8(fail);
  28811. if (buf.isError(tag))
  28812. return tag;
  28813. const cls = der.tagClass[tag >> 6];
  28814. const primitive = (tag & 0x20) === 0;
  28815. // Multi-octet tag - load
  28816. if ((tag & 0x1f) === 0x1f) {
  28817. let oct = tag;
  28818. tag = 0;
  28819. while ((oct & 0x80) === 0x80) {
  28820. oct = buf.readUInt8(fail);
  28821. if (buf.isError(oct))
  28822. return oct;
  28823. tag <<= 7;
  28824. tag |= oct & 0x7f;
  28825. }
  28826. } else {
  28827. tag &= 0x1f;
  28828. }
  28829. const tagStr = der.tag[tag];
  28830. return {
  28831. cls: cls,
  28832. primitive: primitive,
  28833. tag: tag,
  28834. tagStr: tagStr
  28835. };
  28836. }
  28837. function derDecodeLen(buf, primitive, fail) {
  28838. let len = buf.readUInt8(fail);
  28839. if (buf.isError(len))
  28840. return len;
  28841. // Indefinite form
  28842. if (!primitive && len === 0x80)
  28843. return null;
  28844. // Definite form
  28845. if ((len & 0x80) === 0) {
  28846. // Short form
  28847. return len;
  28848. }
  28849. // Long form
  28850. const num = len & 0x7f;
  28851. if (num > 4)
  28852. return buf.error('length octect is too long');
  28853. len = 0;
  28854. for (let i = 0; i < num; i++) {
  28855. len <<= 8;
  28856. const j = buf.readUInt8(fail);
  28857. if (buf.isError(j))
  28858. return j;
  28859. len |= j;
  28860. }
  28861. return len;
  28862. }
  28863. /***/ }),
  28864. /***/ 217:
  28865. /*!*******************************************************!*\
  28866. !*** ./node_modules/asn1.js/lib/asn1/decoders/pem.js ***!
  28867. \*******************************************************/
  28868. /*! no static exports found */
  28869. /***/ (function(module, exports, __webpack_require__) {
  28870. "use strict";
  28871. const inherits = __webpack_require__(/*! inherits */ 86);
  28872. const Buffer = __webpack_require__(/*! safer-buffer */ 209).Buffer;
  28873. const DERDecoder = __webpack_require__(/*! ./der */ 216);
  28874. function PEMDecoder(entity) {
  28875. DERDecoder.call(this, entity);
  28876. this.enc = 'pem';
  28877. }
  28878. inherits(PEMDecoder, DERDecoder);
  28879. module.exports = PEMDecoder;
  28880. PEMDecoder.prototype.decode = function decode(data, options) {
  28881. const lines = data.toString().split(/[\r\n]+/g);
  28882. const label = options.label.toUpperCase();
  28883. const re = /^-----(BEGIN|END) ([^-]+)-----$/;
  28884. let start = -1;
  28885. let end = -1;
  28886. for (let i = 0; i < lines.length; i++) {
  28887. const match = lines[i].match(re);
  28888. if (match === null)
  28889. continue;
  28890. if (match[2] !== label)
  28891. continue;
  28892. if (start === -1) {
  28893. if (match[1] !== 'BEGIN')
  28894. break;
  28895. start = i;
  28896. } else {
  28897. if (match[1] !== 'END')
  28898. break;
  28899. end = i;
  28900. break;
  28901. }
  28902. }
  28903. if (start === -1 || end === -1)
  28904. throw new Error('PEM section not found for: ' + label);
  28905. const base64 = lines.slice(start + 1, end).join('');
  28906. // Remove excessive symbols
  28907. base64.replace(/[^a-z0-9+/=]+/gi, '');
  28908. const input = Buffer.from(base64, 'base64');
  28909. return DERDecoder.prototype.decode.call(this, input, options);
  28910. };
  28911. /***/ }),
  28912. /***/ 218:
  28913. /*!*****************************************************!*\
  28914. !*** ./node_modules/asn1.js/lib/asn1/base/index.js ***!
  28915. \*****************************************************/
  28916. /*! no static exports found */
  28917. /***/ (function(module, exports, __webpack_require__) {
  28918. "use strict";
  28919. const base = exports;
  28920. base.Reporter = __webpack_require__(/*! ./reporter */ 211).Reporter;
  28921. base.DecoderBuffer = __webpack_require__(/*! ./buffer */ 212).DecoderBuffer;
  28922. base.EncoderBuffer = __webpack_require__(/*! ./buffer */ 212).EncoderBuffer;
  28923. base.Node = __webpack_require__(/*! ./node */ 210);
  28924. /***/ }),
  28925. /***/ 219:
  28926. /*!**********************************************************!*\
  28927. !*** ./node_modules/asn1.js/lib/asn1/constants/index.js ***!
  28928. \**********************************************************/
  28929. /*! no static exports found */
  28930. /***/ (function(module, exports, __webpack_require__) {
  28931. "use strict";
  28932. const constants = exports;
  28933. // Helper
  28934. constants._reverse = function reverse(map) {
  28935. const res = {};
  28936. Object.keys(map).forEach(function(key) {
  28937. // Convert key to integer if it is stringified
  28938. if ((key | 0) == key)
  28939. key = key | 0;
  28940. const value = map[key];
  28941. res[value] = key;
  28942. });
  28943. return res;
  28944. };
  28945. constants.der = __webpack_require__(/*! ./der */ 213);
  28946. /***/ }),
  28947. /***/ 22:
  28948. /*!*************************************************************!*\
  28949. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  28950. \*************************************************************/
  28951. /*! no static exports found */
  28952. /***/ (function(module, exports, __webpack_require__) {
  28953. "use strict";
  28954. /* WEBPACK VAR INJECTION */(function(uni, global) {
  28955. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  28956. Object.defineProperty(exports, "__esModule", {
  28957. value: true
  28958. });
  28959. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  28960. exports.compileI18nJsonStr = compileI18nJsonStr;
  28961. exports.hasI18nJson = hasI18nJson;
  28962. exports.initVueI18n = initVueI18n;
  28963. exports.isI18nStr = isI18nStr;
  28964. exports.isString = void 0;
  28965. exports.normalizeLocale = normalizeLocale;
  28966. exports.parseI18nJson = parseI18nJson;
  28967. exports.resolveLocale = resolveLocale;
  28968. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  28969. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  28970. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  28971. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  28972. var isObject = function isObject(val) {
  28973. return val !== null && (0, _typeof2.default)(val) === 'object';
  28974. };
  28975. var defaultDelimiters = ['{', '}'];
  28976. var BaseFormatter = /*#__PURE__*/function () {
  28977. function BaseFormatter() {
  28978. (0, _classCallCheck2.default)(this, BaseFormatter);
  28979. this._caches = Object.create(null);
  28980. }
  28981. (0, _createClass2.default)(BaseFormatter, [{
  28982. key: "interpolate",
  28983. value: function interpolate(message, values) {
  28984. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  28985. if (!values) {
  28986. return [message];
  28987. }
  28988. var tokens = this._caches[message];
  28989. if (!tokens) {
  28990. tokens = parse(message, delimiters);
  28991. this._caches[message] = tokens;
  28992. }
  28993. return compile(tokens, values);
  28994. }
  28995. }]);
  28996. return BaseFormatter;
  28997. }();
  28998. exports.Formatter = BaseFormatter;
  28999. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  29000. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  29001. function parse(format, _ref) {
  29002. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  29003. startDelimiter = _ref2[0],
  29004. endDelimiter = _ref2[1];
  29005. var tokens = [];
  29006. var position = 0;
  29007. var text = '';
  29008. while (position < format.length) {
  29009. var char = format[position++];
  29010. if (char === startDelimiter) {
  29011. if (text) {
  29012. tokens.push({
  29013. type: 'text',
  29014. value: text
  29015. });
  29016. }
  29017. text = '';
  29018. var sub = '';
  29019. char = format[position++];
  29020. while (char !== undefined && char !== endDelimiter) {
  29021. sub += char;
  29022. char = format[position++];
  29023. }
  29024. var isClosed = char === endDelimiter;
  29025. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  29026. tokens.push({
  29027. value: sub,
  29028. type: type
  29029. });
  29030. }
  29031. // else if (char === '%') {
  29032. // // when found rails i18n syntax, skip text capture
  29033. // if (format[position] !== '{') {
  29034. // text += char
  29035. // }
  29036. // }
  29037. else {
  29038. text += char;
  29039. }
  29040. }
  29041. text && tokens.push({
  29042. type: 'text',
  29043. value: text
  29044. });
  29045. return tokens;
  29046. }
  29047. function compile(tokens, values) {
  29048. var compiled = [];
  29049. var index = 0;
  29050. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  29051. if (mode === 'unknown') {
  29052. return compiled;
  29053. }
  29054. while (index < tokens.length) {
  29055. var token = tokens[index];
  29056. switch (token.type) {
  29057. case 'text':
  29058. compiled.push(token.value);
  29059. break;
  29060. case 'list':
  29061. compiled.push(values[parseInt(token.value, 10)]);
  29062. break;
  29063. case 'named':
  29064. if (mode === 'named') {
  29065. compiled.push(values[token.value]);
  29066. } else {
  29067. if (true) {
  29068. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  29069. }
  29070. }
  29071. break;
  29072. case 'unknown':
  29073. if (true) {
  29074. console.warn("Detect 'unknown' type of token!");
  29075. }
  29076. break;
  29077. }
  29078. index++;
  29079. }
  29080. return compiled;
  29081. }
  29082. var LOCALE_ZH_HANS = 'zh-Hans';
  29083. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  29084. var LOCALE_ZH_HANT = 'zh-Hant';
  29085. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  29086. var LOCALE_EN = 'en';
  29087. exports.LOCALE_EN = LOCALE_EN;
  29088. var LOCALE_FR = 'fr';
  29089. exports.LOCALE_FR = LOCALE_FR;
  29090. var LOCALE_ES = 'es';
  29091. exports.LOCALE_ES = LOCALE_ES;
  29092. var hasOwnProperty = Object.prototype.hasOwnProperty;
  29093. var hasOwn = function hasOwn(val, key) {
  29094. return hasOwnProperty.call(val, key);
  29095. };
  29096. var defaultFormatter = new BaseFormatter();
  29097. function include(str, parts) {
  29098. return !!parts.find(function (part) {
  29099. return str.indexOf(part) !== -1;
  29100. });
  29101. }
  29102. function startsWith(str, parts) {
  29103. return parts.find(function (part) {
  29104. return str.indexOf(part) === 0;
  29105. });
  29106. }
  29107. function normalizeLocale(locale, messages) {
  29108. if (!locale) {
  29109. return;
  29110. }
  29111. locale = locale.trim().replace(/_/g, '-');
  29112. if (messages && messages[locale]) {
  29113. return locale;
  29114. }
  29115. locale = locale.toLowerCase();
  29116. if (locale === 'chinese') {
  29117. // 支付宝
  29118. return LOCALE_ZH_HANS;
  29119. }
  29120. if (locale.indexOf('zh') === 0) {
  29121. if (locale.indexOf('-hans') > -1) {
  29122. return LOCALE_ZH_HANS;
  29123. }
  29124. if (locale.indexOf('-hant') > -1) {
  29125. return LOCALE_ZH_HANT;
  29126. }
  29127. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  29128. return LOCALE_ZH_HANT;
  29129. }
  29130. return LOCALE_ZH_HANS;
  29131. }
  29132. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  29133. if (messages && Object.keys(messages).length > 0) {
  29134. locales = Object.keys(messages);
  29135. }
  29136. var lang = startsWith(locale, locales);
  29137. if (lang) {
  29138. return lang;
  29139. }
  29140. }
  29141. var I18n = /*#__PURE__*/function () {
  29142. function I18n(_ref3) {
  29143. var locale = _ref3.locale,
  29144. fallbackLocale = _ref3.fallbackLocale,
  29145. messages = _ref3.messages,
  29146. watcher = _ref3.watcher,
  29147. formater = _ref3.formater;
  29148. (0, _classCallCheck2.default)(this, I18n);
  29149. this.locale = LOCALE_EN;
  29150. this.fallbackLocale = LOCALE_EN;
  29151. this.message = {};
  29152. this.messages = {};
  29153. this.watchers = [];
  29154. if (fallbackLocale) {
  29155. this.fallbackLocale = fallbackLocale;
  29156. }
  29157. this.formater = formater || defaultFormatter;
  29158. this.messages = messages || {};
  29159. this.setLocale(locale || LOCALE_EN);
  29160. if (watcher) {
  29161. this.watchLocale(watcher);
  29162. }
  29163. }
  29164. (0, _createClass2.default)(I18n, [{
  29165. key: "setLocale",
  29166. value: function setLocale(locale) {
  29167. var _this = this;
  29168. var oldLocale = this.locale;
  29169. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  29170. if (!this.messages[this.locale]) {
  29171. // 可能初始化时不存在
  29172. this.messages[this.locale] = {};
  29173. }
  29174. this.message = this.messages[this.locale];
  29175. // 仅发生变化时,通知
  29176. if (oldLocale !== this.locale) {
  29177. this.watchers.forEach(function (watcher) {
  29178. watcher(_this.locale, oldLocale);
  29179. });
  29180. }
  29181. }
  29182. }, {
  29183. key: "getLocale",
  29184. value: function getLocale() {
  29185. return this.locale;
  29186. }
  29187. }, {
  29188. key: "watchLocale",
  29189. value: function watchLocale(fn) {
  29190. var _this2 = this;
  29191. var index = this.watchers.push(fn) - 1;
  29192. return function () {
  29193. _this2.watchers.splice(index, 1);
  29194. };
  29195. }
  29196. }, {
  29197. key: "add",
  29198. value: function add(locale, message) {
  29199. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  29200. var curMessages = this.messages[locale];
  29201. if (curMessages) {
  29202. if (override) {
  29203. Object.assign(curMessages, message);
  29204. } else {
  29205. Object.keys(message).forEach(function (key) {
  29206. if (!hasOwn(curMessages, key)) {
  29207. curMessages[key] = message[key];
  29208. }
  29209. });
  29210. }
  29211. } else {
  29212. this.messages[locale] = message;
  29213. }
  29214. }
  29215. }, {
  29216. key: "f",
  29217. value: function f(message, values, delimiters) {
  29218. return this.formater.interpolate(message, values, delimiters).join('');
  29219. }
  29220. }, {
  29221. key: "t",
  29222. value: function t(key, locale, values) {
  29223. var message = this.message;
  29224. if (typeof locale === 'string') {
  29225. locale = normalizeLocale(locale, this.messages);
  29226. locale && (message = this.messages[locale]);
  29227. } else {
  29228. values = locale;
  29229. }
  29230. if (!hasOwn(message, key)) {
  29231. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  29232. return key;
  29233. }
  29234. return this.formater.interpolate(message[key], values).join('');
  29235. }
  29236. }]);
  29237. return I18n;
  29238. }();
  29239. exports.I18n = I18n;
  29240. function watchAppLocale(appVm, i18n) {
  29241. // 需要保证 watch 的触发在组件渲染之前
  29242. if (appVm.$watchLocale) {
  29243. // vue2
  29244. appVm.$watchLocale(function (newLocale) {
  29245. i18n.setLocale(newLocale);
  29246. });
  29247. } else {
  29248. appVm.$watch(function () {
  29249. return appVm.$locale;
  29250. }, function (newLocale) {
  29251. i18n.setLocale(newLocale);
  29252. });
  29253. }
  29254. }
  29255. function getDefaultLocale() {
  29256. if (typeof uni !== 'undefined' && uni.getLocale) {
  29257. return uni.getLocale();
  29258. }
  29259. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  29260. if (typeof global !== 'undefined' && global.getLocale) {
  29261. return global.getLocale();
  29262. }
  29263. return LOCALE_EN;
  29264. }
  29265. function initVueI18n(locale) {
  29266. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  29267. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  29268. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  29269. // 兼容旧版本入参
  29270. if (typeof locale !== 'string') {
  29271. var _ref4 = [messages, locale];
  29272. locale = _ref4[0];
  29273. messages = _ref4[1];
  29274. }
  29275. if (typeof locale !== 'string') {
  29276. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  29277. locale = getDefaultLocale();
  29278. }
  29279. if (typeof fallbackLocale !== 'string') {
  29280. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  29281. }
  29282. var i18n = new I18n({
  29283. locale: locale,
  29284. fallbackLocale: fallbackLocale,
  29285. messages: messages,
  29286. watcher: watcher
  29287. });
  29288. var _t = function t(key, values) {
  29289. if (typeof getApp !== 'function') {
  29290. // app view
  29291. /* eslint-disable no-func-assign */
  29292. _t = function t(key, values) {
  29293. return i18n.t(key, values);
  29294. };
  29295. } else {
  29296. var isWatchedAppLocale = false;
  29297. _t = function t(key, values) {
  29298. var appVm = getApp().$vm;
  29299. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  29300. // options: {
  29301. // type: Array,
  29302. // default () {
  29303. // return [{
  29304. // icon: 'shop',
  29305. // text: t("uni-goods-nav.options.shop"),
  29306. // }, {
  29307. // icon: 'cart',
  29308. // text: t("uni-goods-nav.options.cart")
  29309. // }]
  29310. // }
  29311. // },
  29312. if (appVm) {
  29313. // 触发响应式
  29314. appVm.$locale;
  29315. if (!isWatchedAppLocale) {
  29316. isWatchedAppLocale = true;
  29317. watchAppLocale(appVm, i18n);
  29318. }
  29319. }
  29320. return i18n.t(key, values);
  29321. };
  29322. }
  29323. return _t(key, values);
  29324. };
  29325. return {
  29326. i18n: i18n,
  29327. f: function f(message, values, delimiters) {
  29328. return i18n.f(message, values, delimiters);
  29329. },
  29330. t: function t(key, values) {
  29331. return _t(key, values);
  29332. },
  29333. add: function add(locale, message) {
  29334. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  29335. return i18n.add(locale, message, override);
  29336. },
  29337. watch: function watch(fn) {
  29338. return i18n.watchLocale(fn);
  29339. },
  29340. getLocale: function getLocale() {
  29341. return i18n.getLocale();
  29342. },
  29343. setLocale: function setLocale(newLocale) {
  29344. return i18n.setLocale(newLocale);
  29345. }
  29346. };
  29347. }
  29348. var isString = function isString(val) {
  29349. return typeof val === 'string';
  29350. };
  29351. exports.isString = isString;
  29352. var formater;
  29353. function hasI18nJson(jsonObj, delimiters) {
  29354. if (!formater) {
  29355. formater = new BaseFormatter();
  29356. }
  29357. return walkJsonObj(jsonObj, function (jsonObj, key) {
  29358. var value = jsonObj[key];
  29359. if (isString(value)) {
  29360. if (isI18nStr(value, delimiters)) {
  29361. return true;
  29362. }
  29363. } else {
  29364. return hasI18nJson(value, delimiters);
  29365. }
  29366. });
  29367. }
  29368. function parseI18nJson(jsonObj, values, delimiters) {
  29369. if (!formater) {
  29370. formater = new BaseFormatter();
  29371. }
  29372. walkJsonObj(jsonObj, function (jsonObj, key) {
  29373. var value = jsonObj[key];
  29374. if (isString(value)) {
  29375. if (isI18nStr(value, delimiters)) {
  29376. jsonObj[key] = compileStr(value, values, delimiters);
  29377. }
  29378. } else {
  29379. parseI18nJson(value, values, delimiters);
  29380. }
  29381. });
  29382. return jsonObj;
  29383. }
  29384. function compileI18nJsonStr(jsonStr, _ref5) {
  29385. var locale = _ref5.locale,
  29386. locales = _ref5.locales,
  29387. delimiters = _ref5.delimiters;
  29388. if (!isI18nStr(jsonStr, delimiters)) {
  29389. return jsonStr;
  29390. }
  29391. if (!formater) {
  29392. formater = new BaseFormatter();
  29393. }
  29394. var localeValues = [];
  29395. Object.keys(locales).forEach(function (name) {
  29396. if (name !== locale) {
  29397. localeValues.push({
  29398. locale: name,
  29399. values: locales[name]
  29400. });
  29401. }
  29402. });
  29403. localeValues.unshift({
  29404. locale: locale,
  29405. values: locales[locale]
  29406. });
  29407. try {
  29408. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  29409. } catch (e) {}
  29410. return jsonStr;
  29411. }
  29412. function isI18nStr(value, delimiters) {
  29413. return value.indexOf(delimiters[0]) > -1;
  29414. }
  29415. function compileStr(value, values, delimiters) {
  29416. return formater.interpolate(value, values, delimiters).join('');
  29417. }
  29418. function compileValue(jsonObj, key, localeValues, delimiters) {
  29419. var value = jsonObj[key];
  29420. if (isString(value)) {
  29421. // 存在国际化
  29422. if (isI18nStr(value, delimiters)) {
  29423. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  29424. if (localeValues.length > 1) {
  29425. // 格式化国际化语言
  29426. var valueLocales = jsonObj[key + 'Locales'] = {};
  29427. localeValues.forEach(function (localValue) {
  29428. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  29429. });
  29430. }
  29431. }
  29432. } else {
  29433. compileJsonObj(value, localeValues, delimiters);
  29434. }
  29435. }
  29436. function compileJsonObj(jsonObj, localeValues, delimiters) {
  29437. walkJsonObj(jsonObj, function (jsonObj, key) {
  29438. compileValue(jsonObj, key, localeValues, delimiters);
  29439. });
  29440. return jsonObj;
  29441. }
  29442. function walkJsonObj(jsonObj, walk) {
  29443. if (Array.isArray(jsonObj)) {
  29444. for (var i = 0; i < jsonObj.length; i++) {
  29445. if (walk(jsonObj, i)) {
  29446. return true;
  29447. }
  29448. }
  29449. } else if (isObject(jsonObj)) {
  29450. for (var key in jsonObj) {
  29451. if (walk(jsonObj, key)) {
  29452. return true;
  29453. }
  29454. }
  29455. }
  29456. return false;
  29457. }
  29458. function resolveLocale(locales) {
  29459. return function (locale) {
  29460. if (!locale) {
  29461. return locale;
  29462. }
  29463. locale = normalizeLocale(locale) || locale;
  29464. return resolveLocaleChain(locale).find(function (locale) {
  29465. return locales.indexOf(locale) > -1;
  29466. });
  29467. };
  29468. }
  29469. function resolveLocaleChain(locale) {
  29470. var chain = [];
  29471. var tokens = locale.split('-');
  29472. while (tokens.length) {
  29473. chain.push(tokens.join('-'));
  29474. tokens.pop();
  29475. }
  29476. return chain;
  29477. }
  29478. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  29479. /***/ }),
  29480. /***/ 220:
  29481. /*!************************************************!*\
  29482. !*** ./node_modules/parse-asn1/certificate.js ***!
  29483. \************************************************/
  29484. /*! no static exports found */
  29485. /***/ (function(module, exports, __webpack_require__) {
  29486. "use strict";
  29487. // from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js
  29488. // thanks to @Rantanen
  29489. var asn = __webpack_require__(/*! asn1.js */ 205)
  29490. var Time = asn.define('Time', function () {
  29491. this.choice({
  29492. utcTime: this.utctime(),
  29493. generalTime: this.gentime()
  29494. })
  29495. })
  29496. var AttributeTypeValue = asn.define('AttributeTypeValue', function () {
  29497. this.seq().obj(
  29498. this.key('type').objid(),
  29499. this.key('value').any()
  29500. )
  29501. })
  29502. var AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () {
  29503. this.seq().obj(
  29504. this.key('algorithm').objid(),
  29505. this.key('parameters').optional(),
  29506. this.key('curve').objid().optional()
  29507. )
  29508. })
  29509. var SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () {
  29510. this.seq().obj(
  29511. this.key('algorithm').use(AlgorithmIdentifier),
  29512. this.key('subjectPublicKey').bitstr()
  29513. )
  29514. })
  29515. var RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () {
  29516. this.setof(AttributeTypeValue)
  29517. })
  29518. var RDNSequence = asn.define('RDNSequence', function () {
  29519. this.seqof(RelativeDistinguishedName)
  29520. })
  29521. var Name = asn.define('Name', function () {
  29522. this.choice({
  29523. rdnSequence: this.use(RDNSequence)
  29524. })
  29525. })
  29526. var Validity = asn.define('Validity', function () {
  29527. this.seq().obj(
  29528. this.key('notBefore').use(Time),
  29529. this.key('notAfter').use(Time)
  29530. )
  29531. })
  29532. var Extension = asn.define('Extension', function () {
  29533. this.seq().obj(
  29534. this.key('extnID').objid(),
  29535. this.key('critical').bool().def(false),
  29536. this.key('extnValue').octstr()
  29537. )
  29538. })
  29539. var TBSCertificate = asn.define('TBSCertificate', function () {
  29540. this.seq().obj(
  29541. this.key('version').explicit(0).int().optional(),
  29542. this.key('serialNumber').int(),
  29543. this.key('signature').use(AlgorithmIdentifier),
  29544. this.key('issuer').use(Name),
  29545. this.key('validity').use(Validity),
  29546. this.key('subject').use(Name),
  29547. this.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo),
  29548. this.key('issuerUniqueID').implicit(1).bitstr().optional(),
  29549. this.key('subjectUniqueID').implicit(2).bitstr().optional(),
  29550. this.key('extensions').explicit(3).seqof(Extension).optional()
  29551. )
  29552. })
  29553. var X509Certificate = asn.define('X509Certificate', function () {
  29554. this.seq().obj(
  29555. this.key('tbsCertificate').use(TBSCertificate),
  29556. this.key('signatureAlgorithm').use(AlgorithmIdentifier),
  29557. this.key('signatureValue').bitstr()
  29558. )
  29559. })
  29560. module.exports = X509Certificate
  29561. /***/ }),
  29562. /***/ 221:
  29563. /*!********************************************!*\
  29564. !*** ./node_modules/parse-asn1/aesid.json ***!
  29565. \********************************************/
  29566. /*! exports provided: 2.16.840.1.101.3.4.1.1, 2.16.840.1.101.3.4.1.2, 2.16.840.1.101.3.4.1.3, 2.16.840.1.101.3.4.1.4, 2.16.840.1.101.3.4.1.21, 2.16.840.1.101.3.4.1.22, 2.16.840.1.101.3.4.1.23, 2.16.840.1.101.3.4.1.24, 2.16.840.1.101.3.4.1.41, 2.16.840.1.101.3.4.1.42, 2.16.840.1.101.3.4.1.43, 2.16.840.1.101.3.4.1.44, default */
  29567. /***/ (function(module) {
  29568. module.exports = JSON.parse("{\"2.16.840.1.101.3.4.1.1\":\"aes-128-ecb\",\"2.16.840.1.101.3.4.1.2\":\"aes-128-cbc\",\"2.16.840.1.101.3.4.1.3\":\"aes-128-ofb\",\"2.16.840.1.101.3.4.1.4\":\"aes-128-cfb\",\"2.16.840.1.101.3.4.1.21\":\"aes-192-ecb\",\"2.16.840.1.101.3.4.1.22\":\"aes-192-cbc\",\"2.16.840.1.101.3.4.1.23\":\"aes-192-ofb\",\"2.16.840.1.101.3.4.1.24\":\"aes-192-cfb\",\"2.16.840.1.101.3.4.1.41\":\"aes-256-ecb\",\"2.16.840.1.101.3.4.1.42\":\"aes-256-cbc\",\"2.16.840.1.101.3.4.1.43\":\"aes-256-ofb\",\"2.16.840.1.101.3.4.1.44\":\"aes-256-cfb\"}");
  29569. /***/ }),
  29570. /***/ 222:
  29571. /*!********************************************!*\
  29572. !*** ./node_modules/parse-asn1/fixProc.js ***!
  29573. \********************************************/
  29574. /*! no static exports found */
  29575. /***/ (function(module, exports, __webpack_require__) {
  29576. // adapted from https://github.com/apatil/pemstrip
  29577. var findProc = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m
  29578. var startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m
  29579. var fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m
  29580. var evp = __webpack_require__(/*! evp_bytestokey */ 157)
  29581. var ciphers = __webpack_require__(/*! browserify-aes */ 140)
  29582. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  29583. module.exports = function (okey, password) {
  29584. var key = okey.toString()
  29585. var match = key.match(findProc)
  29586. var decrypted
  29587. if (!match) {
  29588. var match2 = key.match(fullRegex)
  29589. decrypted = Buffer.from(match2[2].replace(/[\r\n]/g, ''), 'base64')
  29590. } else {
  29591. var suite = 'aes' + match[1]
  29592. var iv = Buffer.from(match[2], 'hex')
  29593. var cipherText = Buffer.from(match[3].replace(/[\r\n]/g, ''), 'base64')
  29594. var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key
  29595. var out = []
  29596. var cipher = ciphers.createDecipheriv(suite, cipherKey, iv)
  29597. out.push(cipher.update(cipherText))
  29598. out.push(cipher.final())
  29599. decrypted = Buffer.concat(out)
  29600. }
  29601. var tag = key.match(startRegex)[1]
  29602. return {
  29603. tag: tag,
  29604. data: decrypted
  29605. }
  29606. }
  29607. /***/ }),
  29608. /***/ 223:
  29609. /*!**********************************************************!*\
  29610. !*** ./node_modules/browserify-sign/browser/curves.json ***!
  29611. \**********************************************************/
  29612. /*! exports provided: 1.3.132.0.10, 1.3.132.0.33, 1.2.840.10045.3.1.1, 1.2.840.10045.3.1.7, 1.3.132.0.34, 1.3.132.0.35, default */
  29613. /***/ (function(module) {
  29614. module.exports = JSON.parse("{\"1.3.132.0.10\":\"secp256k1\",\"1.3.132.0.33\":\"p224\",\"1.2.840.10045.3.1.1\":\"p192\",\"1.2.840.10045.3.1.7\":\"p256\",\"1.3.132.0.34\":\"p384\",\"1.3.132.0.35\":\"p521\"}");
  29615. /***/ }),
  29616. /***/ 224:
  29617. /*!********************************************************!*\
  29618. !*** ./node_modules/browserify-sign/browser/verify.js ***!
  29619. \********************************************************/
  29620. /*! no static exports found */
  29621. /***/ (function(module, exports, __webpack_require__) {
  29622. // much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js
  29623. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  29624. var BN = __webpack_require__(/*! bn.js */ 162)
  29625. var EC = __webpack_require__(/*! elliptic */ 173).ec
  29626. var parseKeys = __webpack_require__(/*! parse-asn1 */ 203)
  29627. var curves = __webpack_require__(/*! ./curves.json */ 223)
  29628. function verify (sig, hash, key, signType, tag) {
  29629. var pub = parseKeys(key)
  29630. if (pub.type === 'ec') {
  29631. // rsa keys can be interpreted as ecdsa ones in openssl
  29632. if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') throw new Error('wrong public key type')
  29633. return ecVerify(sig, hash, pub)
  29634. } else if (pub.type === 'dsa') {
  29635. if (signType !== 'dsa') throw new Error('wrong public key type')
  29636. return dsaVerify(sig, hash, pub)
  29637. } else {
  29638. if (signType !== 'rsa' && signType !== 'ecdsa/rsa') throw new Error('wrong public key type')
  29639. }
  29640. hash = Buffer.concat([tag, hash])
  29641. var len = pub.modulus.byteLength()
  29642. var pad = [1]
  29643. var padNum = 0
  29644. while (hash.length + pad.length + 2 < len) {
  29645. pad.push(0xff)
  29646. padNum++
  29647. }
  29648. pad.push(0x00)
  29649. var i = -1
  29650. while (++i < hash.length) {
  29651. pad.push(hash[i])
  29652. }
  29653. pad = Buffer.from(pad)
  29654. var red = BN.mont(pub.modulus)
  29655. sig = new BN(sig).toRed(red)
  29656. sig = sig.redPow(new BN(pub.publicExponent))
  29657. sig = Buffer.from(sig.fromRed().toArray())
  29658. var out = padNum < 8 ? 1 : 0
  29659. len = Math.min(sig.length, pad.length)
  29660. if (sig.length !== pad.length) out = 1
  29661. i = -1
  29662. while (++i < len) out |= sig[i] ^ pad[i]
  29663. return out === 0
  29664. }
  29665. function ecVerify (sig, hash, pub) {
  29666. var curveId = curves[pub.data.algorithm.curve.join('.')]
  29667. if (!curveId) throw new Error('unknown curve ' + pub.data.algorithm.curve.join('.'))
  29668. var curve = new EC(curveId)
  29669. var pubkey = pub.data.subjectPrivateKey.data
  29670. return curve.verify(hash, sig, pubkey)
  29671. }
  29672. function dsaVerify (sig, hash, pub) {
  29673. var p = pub.data.p
  29674. var q = pub.data.q
  29675. var g = pub.data.g
  29676. var y = pub.data.pub_key
  29677. var unpacked = parseKeys.signature.decode(sig, 'der')
  29678. var s = unpacked.s
  29679. var r = unpacked.r
  29680. checkValue(s, q)
  29681. checkValue(r, q)
  29682. var montp = BN.mont(p)
  29683. var w = s.invm(q)
  29684. var v = g.toRed(montp)
  29685. .redPow(new BN(hash).mul(w).mod(q))
  29686. .fromRed()
  29687. .mul(y.toRed(montp).redPow(r.mul(w).mod(q)).fromRed())
  29688. .mod(p)
  29689. .mod(q)
  29690. return v.cmp(r) === 0
  29691. }
  29692. function checkValue (b, q) {
  29693. if (b.cmpn(0) <= 0) throw new Error('invalid sig')
  29694. if (b.cmp(q) >= q) throw new Error('invalid sig')
  29695. }
  29696. module.exports = verify
  29697. /***/ }),
  29698. /***/ 225:
  29699. /*!*********************************************!*\
  29700. !*** ./node_modules/create-ecdh/browser.js ***!
  29701. \*********************************************/
  29702. /*! no static exports found */
  29703. /***/ (function(module, exports, __webpack_require__) {
  29704. /* WEBPACK VAR INJECTION */(function(Buffer) {var elliptic = __webpack_require__(/*! elliptic */ 173)
  29705. var BN = __webpack_require__(/*! bn.js */ 162)
  29706. module.exports = function createECDH (curve) {
  29707. return new ECDH(curve)
  29708. }
  29709. var aliases = {
  29710. secp256k1: {
  29711. name: 'secp256k1',
  29712. byteLength: 32
  29713. },
  29714. secp224r1: {
  29715. name: 'p224',
  29716. byteLength: 28
  29717. },
  29718. prime256v1: {
  29719. name: 'p256',
  29720. byteLength: 32
  29721. },
  29722. prime192v1: {
  29723. name: 'p192',
  29724. byteLength: 24
  29725. },
  29726. ed25519: {
  29727. name: 'ed25519',
  29728. byteLength: 32
  29729. },
  29730. secp384r1: {
  29731. name: 'p384',
  29732. byteLength: 48
  29733. },
  29734. secp521r1: {
  29735. name: 'p521',
  29736. byteLength: 66
  29737. }
  29738. }
  29739. aliases.p224 = aliases.secp224r1
  29740. aliases.p256 = aliases.secp256r1 = aliases.prime256v1
  29741. aliases.p192 = aliases.secp192r1 = aliases.prime192v1
  29742. aliases.p384 = aliases.secp384r1
  29743. aliases.p521 = aliases.secp521r1
  29744. function ECDH (curve) {
  29745. this.curveType = aliases[curve]
  29746. if (!this.curveType) {
  29747. this.curveType = {
  29748. name: curve
  29749. }
  29750. }
  29751. this.curve = new elliptic.ec(this.curveType.name) // eslint-disable-line new-cap
  29752. this.keys = void 0
  29753. }
  29754. ECDH.prototype.generateKeys = function (enc, format) {
  29755. this.keys = this.curve.genKeyPair()
  29756. return this.getPublicKey(enc, format)
  29757. }
  29758. ECDH.prototype.computeSecret = function (other, inenc, enc) {
  29759. inenc = inenc || 'utf8'
  29760. if (!Buffer.isBuffer(other)) {
  29761. other = new Buffer(other, inenc)
  29762. }
  29763. var otherPub = this.curve.keyFromPublic(other).getPublic()
  29764. var out = otherPub.mul(this.keys.getPrivate()).getX()
  29765. return formatReturnValue(out, enc, this.curveType.byteLength)
  29766. }
  29767. ECDH.prototype.getPublicKey = function (enc, format) {
  29768. var key = this.keys.getPublic(format === 'compressed', true)
  29769. if (format === 'hybrid') {
  29770. if (key[key.length - 1] % 2) {
  29771. key[0] = 7
  29772. } else {
  29773. key[0] = 6
  29774. }
  29775. }
  29776. return formatReturnValue(key, enc)
  29777. }
  29778. ECDH.prototype.getPrivateKey = function (enc) {
  29779. return formatReturnValue(this.keys.getPrivate(), enc)
  29780. }
  29781. ECDH.prototype.setPublicKey = function (pub, enc) {
  29782. enc = enc || 'utf8'
  29783. if (!Buffer.isBuffer(pub)) {
  29784. pub = new Buffer(pub, enc)
  29785. }
  29786. this.keys._importPublic(pub)
  29787. return this
  29788. }
  29789. ECDH.prototype.setPrivateKey = function (priv, enc) {
  29790. enc = enc || 'utf8'
  29791. if (!Buffer.isBuffer(priv)) {
  29792. priv = new Buffer(priv, enc)
  29793. }
  29794. var _priv = new BN(priv)
  29795. _priv = _priv.toString(16)
  29796. this.keys = this.curve.genKeyPair()
  29797. this.keys._importPrivate(_priv)
  29798. return this
  29799. }
  29800. function formatReturnValue (bn, enc, len) {
  29801. if (!Array.isArray(bn)) {
  29802. bn = bn.toArray()
  29803. }
  29804. var buf = new Buffer(bn)
  29805. if (len && buf.length < len) {
  29806. var zeros = new Buffer(len - buf.length)
  29807. zeros.fill(0)
  29808. buf = Buffer.concat([zeros, buf])
  29809. }
  29810. if (!enc) {
  29811. return buf
  29812. } else {
  29813. return buf.toString(enc)
  29814. }
  29815. }
  29816. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ 81).Buffer))
  29817. /***/ }),
  29818. /***/ 226:
  29819. /*!************************************************!*\
  29820. !*** ./node_modules/public-encrypt/browser.js ***!
  29821. \************************************************/
  29822. /*! no static exports found */
  29823. /***/ (function(module, exports, __webpack_require__) {
  29824. exports.publicEncrypt = __webpack_require__(/*! ./publicEncrypt */ 227)
  29825. exports.privateDecrypt = __webpack_require__(/*! ./privateDecrypt */ 231)
  29826. exports.privateEncrypt = function privateEncrypt (key, buf) {
  29827. return exports.publicEncrypt(key, buf, true)
  29828. }
  29829. exports.publicDecrypt = function publicDecrypt (key, buf) {
  29830. return exports.privateDecrypt(key, buf, true)
  29831. }
  29832. /***/ }),
  29833. /***/ 227:
  29834. /*!******************************************************!*\
  29835. !*** ./node_modules/public-encrypt/publicEncrypt.js ***!
  29836. \******************************************************/
  29837. /*! no static exports found */
  29838. /***/ (function(module, exports, __webpack_require__) {
  29839. var parseKeys = __webpack_require__(/*! parse-asn1 */ 203)
  29840. var randomBytes = __webpack_require__(/*! randombytes */ 77)
  29841. var createHash = __webpack_require__(/*! create-hash */ 85)
  29842. var mgf = __webpack_require__(/*! ./mgf */ 228)
  29843. var xor = __webpack_require__(/*! ./xor */ 229)
  29844. var BN = __webpack_require__(/*! bn.js */ 162)
  29845. var withPublic = __webpack_require__(/*! ./withPublic */ 230)
  29846. var crt = __webpack_require__(/*! browserify-rsa */ 172)
  29847. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  29848. module.exports = function publicEncrypt (publicKey, msg, reverse) {
  29849. var padding
  29850. if (publicKey.padding) {
  29851. padding = publicKey.padding
  29852. } else if (reverse) {
  29853. padding = 1
  29854. } else {
  29855. padding = 4
  29856. }
  29857. var key = parseKeys(publicKey)
  29858. var paddedMsg
  29859. if (padding === 4) {
  29860. paddedMsg = oaep(key, msg)
  29861. } else if (padding === 1) {
  29862. paddedMsg = pkcs1(key, msg, reverse)
  29863. } else if (padding === 3) {
  29864. paddedMsg = new BN(msg)
  29865. if (paddedMsg.cmp(key.modulus) >= 0) {
  29866. throw new Error('data too long for modulus')
  29867. }
  29868. } else {
  29869. throw new Error('unknown padding')
  29870. }
  29871. if (reverse) {
  29872. return crt(paddedMsg, key)
  29873. } else {
  29874. return withPublic(paddedMsg, key)
  29875. }
  29876. }
  29877. function oaep (key, msg) {
  29878. var k = key.modulus.byteLength()
  29879. var mLen = msg.length
  29880. var iHash = createHash('sha1').update(Buffer.alloc(0)).digest()
  29881. var hLen = iHash.length
  29882. var hLen2 = 2 * hLen
  29883. if (mLen > k - hLen2 - 2) {
  29884. throw new Error('message too long')
  29885. }
  29886. var ps = Buffer.alloc(k - mLen - hLen2 - 2)
  29887. var dblen = k - hLen - 1
  29888. var seed = randomBytes(hLen)
  29889. var maskedDb = xor(Buffer.concat([iHash, ps, Buffer.alloc(1, 1), msg], dblen), mgf(seed, dblen))
  29890. var maskedSeed = xor(seed, mgf(maskedDb, hLen))
  29891. return new BN(Buffer.concat([Buffer.alloc(1), maskedSeed, maskedDb], k))
  29892. }
  29893. function pkcs1 (key, msg, reverse) {
  29894. var mLen = msg.length
  29895. var k = key.modulus.byteLength()
  29896. if (mLen > k - 11) {
  29897. throw new Error('message too long')
  29898. }
  29899. var ps
  29900. if (reverse) {
  29901. ps = Buffer.alloc(k - mLen - 3, 0xff)
  29902. } else {
  29903. ps = nonZero(k - mLen - 3)
  29904. }
  29905. return new BN(Buffer.concat([Buffer.from([0, reverse ? 1 : 2]), ps, Buffer.alloc(1), msg], k))
  29906. }
  29907. function nonZero (len) {
  29908. var out = Buffer.allocUnsafe(len)
  29909. var i = 0
  29910. var cache = randomBytes(len * 2)
  29911. var cur = 0
  29912. var num
  29913. while (i < len) {
  29914. if (cur === cache.length) {
  29915. cache = randomBytes(len * 2)
  29916. cur = 0
  29917. }
  29918. num = cache[cur++]
  29919. if (num) {
  29920. out[i++] = num
  29921. }
  29922. }
  29923. return out
  29924. }
  29925. /***/ }),
  29926. /***/ 228:
  29927. /*!********************************************!*\
  29928. !*** ./node_modules/public-encrypt/mgf.js ***!
  29929. \********************************************/
  29930. /*! no static exports found */
  29931. /***/ (function(module, exports, __webpack_require__) {
  29932. var createHash = __webpack_require__(/*! create-hash */ 85)
  29933. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  29934. module.exports = function (seed, len) {
  29935. var t = Buffer.alloc(0)
  29936. var i = 0
  29937. var c
  29938. while (t.length < len) {
  29939. c = i2ops(i++)
  29940. t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()])
  29941. }
  29942. return t.slice(0, len)
  29943. }
  29944. function i2ops (c) {
  29945. var out = Buffer.allocUnsafe(4)
  29946. out.writeUInt32BE(c, 0)
  29947. return out
  29948. }
  29949. /***/ }),
  29950. /***/ 229:
  29951. /*!********************************************!*\
  29952. !*** ./node_modules/public-encrypt/xor.js ***!
  29953. \********************************************/
  29954. /*! no static exports found */
  29955. /***/ (function(module, exports) {
  29956. module.exports = function xor (a, b) {
  29957. var len = a.length
  29958. var i = -1
  29959. while (++i < len) {
  29960. a[i] ^= b[i]
  29961. }
  29962. return a
  29963. }
  29964. /***/ }),
  29965. /***/ 23:
  29966. /*!***************************************************************!*\
  29967. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  29968. \***************************************************************/
  29969. /*! no static exports found */
  29970. /***/ (function(module, exports) {
  29971. function _classCallCheck(instance, Constructor) {
  29972. if (!(instance instanceof Constructor)) {
  29973. throw new TypeError("Cannot call a class as a function");
  29974. }
  29975. }
  29976. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  29977. /***/ }),
  29978. /***/ 230:
  29979. /*!***************************************************!*\
  29980. !*** ./node_modules/public-encrypt/withPublic.js ***!
  29981. \***************************************************/
  29982. /*! no static exports found */
  29983. /***/ (function(module, exports, __webpack_require__) {
  29984. var BN = __webpack_require__(/*! bn.js */ 162)
  29985. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  29986. function withPublic (paddedMsg, key) {
  29987. return Buffer.from(paddedMsg
  29988. .toRed(BN.mont(key.modulus))
  29989. .redPow(new BN(key.publicExponent))
  29990. .fromRed()
  29991. .toArray())
  29992. }
  29993. module.exports = withPublic
  29994. /***/ }),
  29995. /***/ 231:
  29996. /*!*******************************************************!*\
  29997. !*** ./node_modules/public-encrypt/privateDecrypt.js ***!
  29998. \*******************************************************/
  29999. /*! no static exports found */
  30000. /***/ (function(module, exports, __webpack_require__) {
  30001. var parseKeys = __webpack_require__(/*! parse-asn1 */ 203)
  30002. var mgf = __webpack_require__(/*! ./mgf */ 228)
  30003. var xor = __webpack_require__(/*! ./xor */ 229)
  30004. var BN = __webpack_require__(/*! bn.js */ 162)
  30005. var crt = __webpack_require__(/*! browserify-rsa */ 172)
  30006. var createHash = __webpack_require__(/*! create-hash */ 85)
  30007. var withPublic = __webpack_require__(/*! ./withPublic */ 230)
  30008. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  30009. module.exports = function privateDecrypt (privateKey, enc, reverse) {
  30010. var padding
  30011. if (privateKey.padding) {
  30012. padding = privateKey.padding
  30013. } else if (reverse) {
  30014. padding = 1
  30015. } else {
  30016. padding = 4
  30017. }
  30018. var key = parseKeys(privateKey)
  30019. var k = key.modulus.byteLength()
  30020. if (enc.length > k || new BN(enc).cmp(key.modulus) >= 0) {
  30021. throw new Error('decryption error')
  30022. }
  30023. var msg
  30024. if (reverse) {
  30025. msg = withPublic(new BN(enc), key)
  30026. } else {
  30027. msg = crt(enc, key)
  30028. }
  30029. var zBuffer = Buffer.alloc(k - msg.length)
  30030. msg = Buffer.concat([zBuffer, msg], k)
  30031. if (padding === 4) {
  30032. return oaep(key, msg)
  30033. } else if (padding === 1) {
  30034. return pkcs1(key, msg, reverse)
  30035. } else if (padding === 3) {
  30036. return msg
  30037. } else {
  30038. throw new Error('unknown padding')
  30039. }
  30040. }
  30041. function oaep (key, msg) {
  30042. var k = key.modulus.byteLength()
  30043. var iHash = createHash('sha1').update(Buffer.alloc(0)).digest()
  30044. var hLen = iHash.length
  30045. if (msg[0] !== 0) {
  30046. throw new Error('decryption error')
  30047. }
  30048. var maskedSeed = msg.slice(1, hLen + 1)
  30049. var maskedDb = msg.slice(hLen + 1)
  30050. var seed = xor(maskedSeed, mgf(maskedDb, hLen))
  30051. var db = xor(maskedDb, mgf(seed, k - hLen - 1))
  30052. if (compare(iHash, db.slice(0, hLen))) {
  30053. throw new Error('decryption error')
  30054. }
  30055. var i = hLen
  30056. while (db[i] === 0) {
  30057. i++
  30058. }
  30059. if (db[i++] !== 1) {
  30060. throw new Error('decryption error')
  30061. }
  30062. return db.slice(i)
  30063. }
  30064. function pkcs1 (key, msg, reverse) {
  30065. var p1 = msg.slice(0, 2)
  30066. var i = 2
  30067. var status = 0
  30068. while (msg[i++] !== 0) {
  30069. if (i >= msg.length) {
  30070. status++
  30071. break
  30072. }
  30073. }
  30074. var ps = msg.slice(2, i - 1)
  30075. if ((p1.toString('hex') !== '0002' && !reverse) || (p1.toString('hex') !== '0001' && reverse)) {
  30076. status++
  30077. }
  30078. if (ps.length < 8) {
  30079. status++
  30080. }
  30081. if (status) {
  30082. throw new Error('decryption error')
  30083. }
  30084. return msg.slice(i)
  30085. }
  30086. function compare (a, b) {
  30087. a = Buffer.from(a)
  30088. b = Buffer.from(b)
  30089. var dif = 0
  30090. var len = a.length
  30091. if (a.length !== b.length) {
  30092. dif++
  30093. len = Math.min(a.length, b.length)
  30094. }
  30095. var i = -1
  30096. while (++i < len) {
  30097. dif += (a[i] ^ b[i])
  30098. }
  30099. return dif
  30100. }
  30101. /***/ }),
  30102. /***/ 232:
  30103. /*!********************************************!*\
  30104. !*** ./node_modules/randomfill/browser.js ***!
  30105. \********************************************/
  30106. /*! no static exports found */
  30107. /***/ (function(module, exports, __webpack_require__) {
  30108. "use strict";
  30109. /* WEBPACK VAR INJECTION */(function(global, process) {
  30110. function oldBrowser () {
  30111. throw new Error('secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11')
  30112. }
  30113. var safeBuffer = __webpack_require__(/*! safe-buffer */ 80)
  30114. var randombytes = __webpack_require__(/*! randombytes */ 77)
  30115. var Buffer = safeBuffer.Buffer
  30116. var kBufferMaxLength = safeBuffer.kMaxLength
  30117. var crypto = global.crypto || global.msCrypto
  30118. var kMaxUint32 = Math.pow(2, 32) - 1
  30119. function assertOffset (offset, length) {
  30120. if (typeof offset !== 'number' || offset !== offset) { // eslint-disable-line no-self-compare
  30121. throw new TypeError('offset must be a number')
  30122. }
  30123. if (offset > kMaxUint32 || offset < 0) {
  30124. throw new TypeError('offset must be a uint32')
  30125. }
  30126. if (offset > kBufferMaxLength || offset > length) {
  30127. throw new RangeError('offset out of range')
  30128. }
  30129. }
  30130. function assertSize (size, offset, length) {
  30131. if (typeof size !== 'number' || size !== size) { // eslint-disable-line no-self-compare
  30132. throw new TypeError('size must be a number')
  30133. }
  30134. if (size > kMaxUint32 || size < 0) {
  30135. throw new TypeError('size must be a uint32')
  30136. }
  30137. if (size + offset > length || size > kBufferMaxLength) {
  30138. throw new RangeError('buffer too small')
  30139. }
  30140. }
  30141. if ((crypto && crypto.getRandomValues) || !process.browser) {
  30142. exports.randomFill = randomFill
  30143. exports.randomFillSync = randomFillSync
  30144. } else {
  30145. exports.randomFill = oldBrowser
  30146. exports.randomFillSync = oldBrowser
  30147. }
  30148. function randomFill (buf, offset, size, cb) {
  30149. if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) {
  30150. throw new TypeError('"buf" argument must be a Buffer or Uint8Array')
  30151. }
  30152. if (typeof offset === 'function') {
  30153. cb = offset
  30154. offset = 0
  30155. size = buf.length
  30156. } else if (typeof size === 'function') {
  30157. cb = size
  30158. size = buf.length - offset
  30159. } else if (typeof cb !== 'function') {
  30160. throw new TypeError('"cb" argument must be a function')
  30161. }
  30162. assertOffset(offset, buf.length)
  30163. assertSize(size, offset, buf.length)
  30164. return actualFill(buf, offset, size, cb)
  30165. }
  30166. function actualFill (buf, offset, size, cb) {
  30167. if (process.browser) {
  30168. var ourBuf = buf.buffer
  30169. var uint = new Uint8Array(ourBuf, offset, size)
  30170. crypto.getRandomValues(uint)
  30171. if (cb) {
  30172. process.nextTick(function () {
  30173. cb(null, buf)
  30174. })
  30175. return
  30176. }
  30177. return buf
  30178. }
  30179. if (cb) {
  30180. randombytes(size, function (err, bytes) {
  30181. if (err) {
  30182. return cb(err)
  30183. }
  30184. bytes.copy(buf, offset)
  30185. cb(null, buf)
  30186. })
  30187. return
  30188. }
  30189. var bytes = randombytes(size)
  30190. bytes.copy(buf, offset)
  30191. return buf
  30192. }
  30193. function randomFillSync (buf, offset, size) {
  30194. if (typeof offset === 'undefined') {
  30195. offset = 0
  30196. }
  30197. if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) {
  30198. throw new TypeError('"buf" argument must be a Buffer or Uint8Array')
  30199. }
  30200. assertOffset(offset, buf.length)
  30201. if (size === undefined) size = buf.length - offset
  30202. assertSize(size, offset, buf.length)
  30203. return actualFill(buf, offset, size)
  30204. }
  30205. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 3), __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 78)))
  30206. /***/ }),
  30207. /***/ 24:
  30208. /*!************************************************************!*\
  30209. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  30210. \************************************************************/
  30211. /*! no static exports found */
  30212. /***/ (function(module, exports, __webpack_require__) {
  30213. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  30214. function _defineProperties(target, props) {
  30215. for (var i = 0; i < props.length; i++) {
  30216. var descriptor = props[i];
  30217. descriptor.enumerable = descriptor.enumerable || false;
  30218. descriptor.configurable = true;
  30219. if ("value" in descriptor) descriptor.writable = true;
  30220. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  30221. }
  30222. }
  30223. function _createClass(Constructor, protoProps, staticProps) {
  30224. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  30225. if (staticProps) _defineProperties(Constructor, staticProps);
  30226. Object.defineProperty(Constructor, "prototype", {
  30227. writable: false
  30228. });
  30229. return Constructor;
  30230. }
  30231. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  30232. /***/ }),
  30233. /***/ 25:
  30234. /*!******************************************************************************************!*\
  30235. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  30236. \******************************************************************************************/
  30237. /*! exports provided: default */
  30238. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  30239. "use strict";
  30240. __webpack_require__.r(__webpack_exports__);
  30241. /* WEBPACK VAR INJECTION */(function(global) {/*!
  30242. * Vue.js v2.6.11
  30243. * (c) 2014-2023 Evan You
  30244. * Released under the MIT License.
  30245. */
  30246. /* */
  30247. var emptyObject = Object.freeze({});
  30248. // These helpers produce better VM code in JS engines due to their
  30249. // explicitness and function inlining.
  30250. function isUndef (v) {
  30251. return v === undefined || v === null
  30252. }
  30253. function isDef (v) {
  30254. return v !== undefined && v !== null
  30255. }
  30256. function isTrue (v) {
  30257. return v === true
  30258. }
  30259. function isFalse (v) {
  30260. return v === false
  30261. }
  30262. /**
  30263. * Check if value is primitive.
  30264. */
  30265. function isPrimitive (value) {
  30266. return (
  30267. typeof value === 'string' ||
  30268. typeof value === 'number' ||
  30269. // $flow-disable-line
  30270. typeof value === 'symbol' ||
  30271. typeof value === 'boolean'
  30272. )
  30273. }
  30274. /**
  30275. * Quick object check - this is primarily used to tell
  30276. * Objects from primitive values when we know the value
  30277. * is a JSON-compliant type.
  30278. */
  30279. function isObject (obj) {
  30280. return obj !== null && typeof obj === 'object'
  30281. }
  30282. /**
  30283. * Get the raw type string of a value, e.g., [object Object].
  30284. */
  30285. var _toString = Object.prototype.toString;
  30286. function toRawType (value) {
  30287. return _toString.call(value).slice(8, -1)
  30288. }
  30289. /**
  30290. * Strict object type check. Only returns true
  30291. * for plain JavaScript objects.
  30292. */
  30293. function isPlainObject (obj) {
  30294. return _toString.call(obj) === '[object Object]'
  30295. }
  30296. function isRegExp (v) {
  30297. return _toString.call(v) === '[object RegExp]'
  30298. }
  30299. /**
  30300. * Check if val is a valid array index.
  30301. */
  30302. function isValidArrayIndex (val) {
  30303. var n = parseFloat(String(val));
  30304. return n >= 0 && Math.floor(n) === n && isFinite(val)
  30305. }
  30306. function isPromise (val) {
  30307. return (
  30308. isDef(val) &&
  30309. typeof val.then === 'function' &&
  30310. typeof val.catch === 'function'
  30311. )
  30312. }
  30313. /**
  30314. * Convert a value to a string that is actually rendered.
  30315. */
  30316. function toString (val) {
  30317. return val == null
  30318. ? ''
  30319. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  30320. ? JSON.stringify(val, null, 2)
  30321. : String(val)
  30322. }
  30323. /**
  30324. * Convert an input value to a number for persistence.
  30325. * If the conversion fails, return original string.
  30326. */
  30327. function toNumber (val) {
  30328. var n = parseFloat(val);
  30329. return isNaN(n) ? val : n
  30330. }
  30331. /**
  30332. * Make a map and return a function for checking if a key
  30333. * is in that map.
  30334. */
  30335. function makeMap (
  30336. str,
  30337. expectsLowerCase
  30338. ) {
  30339. var map = Object.create(null);
  30340. var list = str.split(',');
  30341. for (var i = 0; i < list.length; i++) {
  30342. map[list[i]] = true;
  30343. }
  30344. return expectsLowerCase
  30345. ? function (val) { return map[val.toLowerCase()]; }
  30346. : function (val) { return map[val]; }
  30347. }
  30348. /**
  30349. * Check if a tag is a built-in tag.
  30350. */
  30351. var isBuiltInTag = makeMap('slot,component', true);
  30352. /**
  30353. * Check if an attribute is a reserved attribute.
  30354. */
  30355. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  30356. /**
  30357. * Remove an item from an array.
  30358. */
  30359. function remove (arr, item) {
  30360. if (arr.length) {
  30361. var index = arr.indexOf(item);
  30362. if (index > -1) {
  30363. return arr.splice(index, 1)
  30364. }
  30365. }
  30366. }
  30367. /**
  30368. * Check whether an object has the property.
  30369. */
  30370. var hasOwnProperty = Object.prototype.hasOwnProperty;
  30371. function hasOwn (obj, key) {
  30372. return hasOwnProperty.call(obj, key)
  30373. }
  30374. /**
  30375. * Create a cached version of a pure function.
  30376. */
  30377. function cached (fn) {
  30378. var cache = Object.create(null);
  30379. return (function cachedFn (str) {
  30380. var hit = cache[str];
  30381. return hit || (cache[str] = fn(str))
  30382. })
  30383. }
  30384. /**
  30385. * Camelize a hyphen-delimited string.
  30386. */
  30387. var camelizeRE = /-(\w)/g;
  30388. var camelize = cached(function (str) {
  30389. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  30390. });
  30391. /**
  30392. * Capitalize a string.
  30393. */
  30394. var capitalize = cached(function (str) {
  30395. return str.charAt(0).toUpperCase() + str.slice(1)
  30396. });
  30397. /**
  30398. * Hyphenate a camelCase string.
  30399. */
  30400. var hyphenateRE = /\B([A-Z])/g;
  30401. var hyphenate = cached(function (str) {
  30402. return str.replace(hyphenateRE, '-$1').toLowerCase()
  30403. });
  30404. /**
  30405. * Simple bind polyfill for environments that do not support it,
  30406. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  30407. * since native bind is now performant enough in most browsers.
  30408. * But removing it would mean breaking code that was able to run in
  30409. * PhantomJS 1.x, so this must be kept for backward compatibility.
  30410. */
  30411. /* istanbul ignore next */
  30412. function polyfillBind (fn, ctx) {
  30413. function boundFn (a) {
  30414. var l = arguments.length;
  30415. return l
  30416. ? l > 1
  30417. ? fn.apply(ctx, arguments)
  30418. : fn.call(ctx, a)
  30419. : fn.call(ctx)
  30420. }
  30421. boundFn._length = fn.length;
  30422. return boundFn
  30423. }
  30424. function nativeBind (fn, ctx) {
  30425. return fn.bind(ctx)
  30426. }
  30427. var bind = Function.prototype.bind
  30428. ? nativeBind
  30429. : polyfillBind;
  30430. /**
  30431. * Convert an Array-like object to a real Array.
  30432. */
  30433. function toArray (list, start) {
  30434. start = start || 0;
  30435. var i = list.length - start;
  30436. var ret = new Array(i);
  30437. while (i--) {
  30438. ret[i] = list[i + start];
  30439. }
  30440. return ret
  30441. }
  30442. /**
  30443. * Mix properties into target object.
  30444. */
  30445. function extend (to, _from) {
  30446. for (var key in _from) {
  30447. to[key] = _from[key];
  30448. }
  30449. return to
  30450. }
  30451. /**
  30452. * Merge an Array of Objects into a single Object.
  30453. */
  30454. function toObject (arr) {
  30455. var res = {};
  30456. for (var i = 0; i < arr.length; i++) {
  30457. if (arr[i]) {
  30458. extend(res, arr[i]);
  30459. }
  30460. }
  30461. return res
  30462. }
  30463. /* eslint-disable no-unused-vars */
  30464. /**
  30465. * Perform no operation.
  30466. * Stubbing args to make Flow happy without leaving useless transpiled code
  30467. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  30468. */
  30469. function noop (a, b, c) {}
  30470. /**
  30471. * Always return false.
  30472. */
  30473. var no = function (a, b, c) { return false; };
  30474. /* eslint-enable no-unused-vars */
  30475. /**
  30476. * Return the same value.
  30477. */
  30478. var identity = function (_) { return _; };
  30479. /**
  30480. * Check if two values are loosely equal - that is,
  30481. * if they are plain objects, do they have the same shape?
  30482. */
  30483. function looseEqual (a, b) {
  30484. if (a === b) { return true }
  30485. var isObjectA = isObject(a);
  30486. var isObjectB = isObject(b);
  30487. if (isObjectA && isObjectB) {
  30488. try {
  30489. var isArrayA = Array.isArray(a);
  30490. var isArrayB = Array.isArray(b);
  30491. if (isArrayA && isArrayB) {
  30492. return a.length === b.length && a.every(function (e, i) {
  30493. return looseEqual(e, b[i])
  30494. })
  30495. } else if (a instanceof Date && b instanceof Date) {
  30496. return a.getTime() === b.getTime()
  30497. } else if (!isArrayA && !isArrayB) {
  30498. var keysA = Object.keys(a);
  30499. var keysB = Object.keys(b);
  30500. return keysA.length === keysB.length && keysA.every(function (key) {
  30501. return looseEqual(a[key], b[key])
  30502. })
  30503. } else {
  30504. /* istanbul ignore next */
  30505. return false
  30506. }
  30507. } catch (e) {
  30508. /* istanbul ignore next */
  30509. return false
  30510. }
  30511. } else if (!isObjectA && !isObjectB) {
  30512. return String(a) === String(b)
  30513. } else {
  30514. return false
  30515. }
  30516. }
  30517. /**
  30518. * Return the first index at which a loosely equal value can be
  30519. * found in the array (if value is a plain object, the array must
  30520. * contain an object of the same shape), or -1 if it is not present.
  30521. */
  30522. function looseIndexOf (arr, val) {
  30523. for (var i = 0; i < arr.length; i++) {
  30524. if (looseEqual(arr[i], val)) { return i }
  30525. }
  30526. return -1
  30527. }
  30528. /**
  30529. * Ensure a function is called only once.
  30530. */
  30531. function once (fn) {
  30532. var called = false;
  30533. return function () {
  30534. if (!called) {
  30535. called = true;
  30536. fn.apply(this, arguments);
  30537. }
  30538. }
  30539. }
  30540. var ASSET_TYPES = [
  30541. 'component',
  30542. 'directive',
  30543. 'filter'
  30544. ];
  30545. var LIFECYCLE_HOOKS = [
  30546. 'beforeCreate',
  30547. 'created',
  30548. 'beforeMount',
  30549. 'mounted',
  30550. 'beforeUpdate',
  30551. 'updated',
  30552. 'beforeDestroy',
  30553. 'destroyed',
  30554. 'activated',
  30555. 'deactivated',
  30556. 'errorCaptured',
  30557. 'serverPrefetch'
  30558. ];
  30559. /* */
  30560. var config = ({
  30561. /**
  30562. * Option merge strategies (used in core/util/options)
  30563. */
  30564. // $flow-disable-line
  30565. optionMergeStrategies: Object.create(null),
  30566. /**
  30567. * Whether to suppress warnings.
  30568. */
  30569. silent: false,
  30570. /**
  30571. * Show production mode tip message on boot?
  30572. */
  30573. productionTip: "development" !== 'production',
  30574. /**
  30575. * Whether to enable devtools
  30576. */
  30577. devtools: "development" !== 'production',
  30578. /**
  30579. * Whether to record perf
  30580. */
  30581. performance: false,
  30582. /**
  30583. * Error handler for watcher errors
  30584. */
  30585. errorHandler: null,
  30586. /**
  30587. * Warn handler for watcher warns
  30588. */
  30589. warnHandler: null,
  30590. /**
  30591. * Ignore certain custom elements
  30592. */
  30593. ignoredElements: [],
  30594. /**
  30595. * Custom user key aliases for v-on
  30596. */
  30597. // $flow-disable-line
  30598. keyCodes: Object.create(null),
  30599. /**
  30600. * Check if a tag is reserved so that it cannot be registered as a
  30601. * component. This is platform-dependent and may be overwritten.
  30602. */
  30603. isReservedTag: no,
  30604. /**
  30605. * Check if an attribute is reserved so that it cannot be used as a component
  30606. * prop. This is platform-dependent and may be overwritten.
  30607. */
  30608. isReservedAttr: no,
  30609. /**
  30610. * Check if a tag is an unknown element.
  30611. * Platform-dependent.
  30612. */
  30613. isUnknownElement: no,
  30614. /**
  30615. * Get the namespace of an element
  30616. */
  30617. getTagNamespace: noop,
  30618. /**
  30619. * Parse the real tag name for the specific platform.
  30620. */
  30621. parsePlatformTagName: identity,
  30622. /**
  30623. * Check if an attribute must be bound using property, e.g. value
  30624. * Platform-dependent.
  30625. */
  30626. mustUseProp: no,
  30627. /**
  30628. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  30629. * This will significantly reduce performance if set to false.
  30630. */
  30631. async: true,
  30632. /**
  30633. * Exposed for legacy reasons
  30634. */
  30635. _lifecycleHooks: LIFECYCLE_HOOKS
  30636. });
  30637. /* */
  30638. /**
  30639. * unicode letters used for parsing html tags, component names and property paths.
  30640. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  30641. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  30642. */
  30643. var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
  30644. /**
  30645. * Check if a string starts with $ or _
  30646. */
  30647. function isReserved (str) {
  30648. var c = (str + '').charCodeAt(0);
  30649. return c === 0x24 || c === 0x5F
  30650. }
  30651. /**
  30652. * Define a property.
  30653. */
  30654. function def (obj, key, val, enumerable) {
  30655. Object.defineProperty(obj, key, {
  30656. value: val,
  30657. enumerable: !!enumerable,
  30658. writable: true,
  30659. configurable: true
  30660. });
  30661. }
  30662. /**
  30663. * Parse simple path.
  30664. */
  30665. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  30666. function parsePath (path) {
  30667. if (bailRE.test(path)) {
  30668. return
  30669. }
  30670. var segments = path.split('.');
  30671. return function (obj) {
  30672. for (var i = 0; i < segments.length; i++) {
  30673. if (!obj) { return }
  30674. obj = obj[segments[i]];
  30675. }
  30676. return obj
  30677. }
  30678. }
  30679. /* */
  30680. // can we use __proto__?
  30681. var hasProto = '__proto__' in {};
  30682. // Browser environment sniffing
  30683. var inBrowser = typeof window !== 'undefined';
  30684. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  30685. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  30686. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  30687. var isIE = UA && /msie|trident/.test(UA);
  30688. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  30689. var isEdge = UA && UA.indexOf('edge/') > 0;
  30690. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  30691. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  30692. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  30693. var isPhantomJS = UA && /phantomjs/.test(UA);
  30694. var isFF = UA && UA.match(/firefox\/(\d+)/);
  30695. // Firefox has a "watch" function on Object.prototype...
  30696. var nativeWatch = ({}).watch;
  30697. if (inBrowser) {
  30698. try {
  30699. var opts = {};
  30700. Object.defineProperty(opts, 'passive', ({
  30701. get: function get () {
  30702. }
  30703. })); // https://github.com/facebook/flow/issues/285
  30704. window.addEventListener('test-passive', null, opts);
  30705. } catch (e) {}
  30706. }
  30707. // this needs to be lazy-evaled because vue may be required before
  30708. // vue-server-renderer can set VUE_ENV
  30709. var _isServer;
  30710. var isServerRendering = function () {
  30711. if (_isServer === undefined) {
  30712. /* istanbul ignore if */
  30713. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  30714. // detect presence of vue-server-renderer and avoid
  30715. // Webpack shimming the process
  30716. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  30717. } else {
  30718. _isServer = false;
  30719. }
  30720. }
  30721. return _isServer
  30722. };
  30723. // detect devtools
  30724. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  30725. /* istanbul ignore next */
  30726. function isNative (Ctor) {
  30727. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  30728. }
  30729. var hasSymbol =
  30730. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  30731. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  30732. var _Set;
  30733. /* istanbul ignore if */ // $flow-disable-line
  30734. if (typeof Set !== 'undefined' && isNative(Set)) {
  30735. // use native Set when available.
  30736. _Set = Set;
  30737. } else {
  30738. // a non-standard Set polyfill that only works with primitive keys.
  30739. _Set = /*@__PURE__*/(function () {
  30740. function Set () {
  30741. this.set = Object.create(null);
  30742. }
  30743. Set.prototype.has = function has (key) {
  30744. return this.set[key] === true
  30745. };
  30746. Set.prototype.add = function add (key) {
  30747. this.set[key] = true;
  30748. };
  30749. Set.prototype.clear = function clear () {
  30750. this.set = Object.create(null);
  30751. };
  30752. return Set;
  30753. }());
  30754. }
  30755. /* */
  30756. var warn = noop;
  30757. var tip = noop;
  30758. var generateComponentTrace = (noop); // work around flow check
  30759. var formatComponentName = (noop);
  30760. if (true) {
  30761. var hasConsole = typeof console !== 'undefined';
  30762. var classifyRE = /(?:^|[-_])(\w)/g;
  30763. var classify = function (str) { return str
  30764. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  30765. .replace(/[-_]/g, ''); };
  30766. warn = function (msg, vm) {
  30767. var trace = vm ? generateComponentTrace(vm) : '';
  30768. if (config.warnHandler) {
  30769. config.warnHandler.call(null, msg, vm, trace);
  30770. } else if (hasConsole && (!config.silent)) {
  30771. console.error(("[Vue warn]: " + msg + trace));
  30772. }
  30773. };
  30774. tip = function (msg, vm) {
  30775. if (hasConsole && (!config.silent)) {
  30776. console.warn("[Vue tip]: " + msg + (
  30777. vm ? generateComponentTrace(vm) : ''
  30778. ));
  30779. }
  30780. };
  30781. formatComponentName = function (vm, includeFile) {
  30782. if (vm.$root === vm) {
  30783. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  30784. return ('') + vm.$options.__file
  30785. }
  30786. return '<Root>'
  30787. }
  30788. var options = typeof vm === 'function' && vm.cid != null
  30789. ? vm.options
  30790. : vm._isVue
  30791. ? vm.$options || vm.constructor.options
  30792. : vm;
  30793. var name = options.name || options._componentTag;
  30794. var file = options.__file;
  30795. if (!name && file) {
  30796. var match = file.match(/([^/\\]+)\.vue$/);
  30797. name = match && match[1];
  30798. }
  30799. return (
  30800. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  30801. (file && includeFile !== false ? (" at " + file) : '')
  30802. )
  30803. };
  30804. var repeat = function (str, n) {
  30805. var res = '';
  30806. while (n) {
  30807. if (n % 2 === 1) { res += str; }
  30808. if (n > 1) { str += str; }
  30809. n >>= 1;
  30810. }
  30811. return res
  30812. };
  30813. generateComponentTrace = function (vm) {
  30814. if (vm._isVue && vm.$parent) {
  30815. var tree = [];
  30816. var currentRecursiveSequence = 0;
  30817. while (vm && vm.$options.name !== 'PageBody') {
  30818. if (tree.length > 0) {
  30819. var last = tree[tree.length - 1];
  30820. if (last.constructor === vm.constructor) {
  30821. currentRecursiveSequence++;
  30822. vm = vm.$parent;
  30823. continue
  30824. } else if (currentRecursiveSequence > 0) {
  30825. tree[tree.length - 1] = [last, currentRecursiveSequence];
  30826. currentRecursiveSequence = 0;
  30827. }
  30828. }
  30829. !vm.$options.isReserved && tree.push(vm);
  30830. vm = vm.$parent;
  30831. }
  30832. return '\n\nfound in\n\n' + tree
  30833. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  30834. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  30835. : formatComponentName(vm))); })
  30836. .join('\n')
  30837. } else {
  30838. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  30839. }
  30840. };
  30841. }
  30842. /* */
  30843. var uid = 0;
  30844. /**
  30845. * A dep is an observable that can have multiple
  30846. * directives subscribing to it.
  30847. */
  30848. var Dep = function Dep () {
  30849. this.id = uid++;
  30850. this.subs = [];
  30851. };
  30852. Dep.prototype.addSub = function addSub (sub) {
  30853. this.subs.push(sub);
  30854. };
  30855. Dep.prototype.removeSub = function removeSub (sub) {
  30856. remove(this.subs, sub);
  30857. };
  30858. Dep.prototype.depend = function depend () {
  30859. if (Dep.SharedObject.target) {
  30860. Dep.SharedObject.target.addDep(this);
  30861. }
  30862. };
  30863. Dep.prototype.notify = function notify () {
  30864. // stabilize the subscriber list first
  30865. var subs = this.subs.slice();
  30866. if ( true && !config.async) {
  30867. // subs aren't sorted in scheduler if not running async
  30868. // we need to sort them now to make sure they fire in correct
  30869. // order
  30870. subs.sort(function (a, b) { return a.id - b.id; });
  30871. }
  30872. for (var i = 0, l = subs.length; i < l; i++) {
  30873. subs[i].update();
  30874. }
  30875. };
  30876. // The current target watcher being evaluated.
  30877. // This is globally unique because only one watcher
  30878. // can be evaluated at a time.
  30879. // fixed by xxxxxx (nvue shared vuex)
  30880. /* eslint-disable no-undef */
  30881. Dep.SharedObject = {};
  30882. Dep.SharedObject.target = null;
  30883. Dep.SharedObject.targetStack = [];
  30884. function pushTarget (target) {
  30885. Dep.SharedObject.targetStack.push(target);
  30886. Dep.SharedObject.target = target;
  30887. Dep.target = target;
  30888. }
  30889. function popTarget () {
  30890. Dep.SharedObject.targetStack.pop();
  30891. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  30892. Dep.target = Dep.SharedObject.target;
  30893. }
  30894. /* */
  30895. var VNode = function VNode (
  30896. tag,
  30897. data,
  30898. children,
  30899. text,
  30900. elm,
  30901. context,
  30902. componentOptions,
  30903. asyncFactory
  30904. ) {
  30905. this.tag = tag;
  30906. this.data = data;
  30907. this.children = children;
  30908. this.text = text;
  30909. this.elm = elm;
  30910. this.ns = undefined;
  30911. this.context = context;
  30912. this.fnContext = undefined;
  30913. this.fnOptions = undefined;
  30914. this.fnScopeId = undefined;
  30915. this.key = data && data.key;
  30916. this.componentOptions = componentOptions;
  30917. this.componentInstance = undefined;
  30918. this.parent = undefined;
  30919. this.raw = false;
  30920. this.isStatic = false;
  30921. this.isRootInsert = true;
  30922. this.isComment = false;
  30923. this.isCloned = false;
  30924. this.isOnce = false;
  30925. this.asyncFactory = asyncFactory;
  30926. this.asyncMeta = undefined;
  30927. this.isAsyncPlaceholder = false;
  30928. };
  30929. var prototypeAccessors = { child: { configurable: true } };
  30930. // DEPRECATED: alias for componentInstance for backwards compat.
  30931. /* istanbul ignore next */
  30932. prototypeAccessors.child.get = function () {
  30933. return this.componentInstance
  30934. };
  30935. Object.defineProperties( VNode.prototype, prototypeAccessors );
  30936. var createEmptyVNode = function (text) {
  30937. if ( text === void 0 ) text = '';
  30938. var node = new VNode();
  30939. node.text = text;
  30940. node.isComment = true;
  30941. return node
  30942. };
  30943. function createTextVNode (val) {
  30944. return new VNode(undefined, undefined, undefined, String(val))
  30945. }
  30946. // optimized shallow clone
  30947. // used for static nodes and slot nodes because they may be reused across
  30948. // multiple renders, cloning them avoids errors when DOM manipulations rely
  30949. // on their elm reference.
  30950. function cloneVNode (vnode) {
  30951. var cloned = new VNode(
  30952. vnode.tag,
  30953. vnode.data,
  30954. // #7975
  30955. // clone children array to avoid mutating original in case of cloning
  30956. // a child.
  30957. vnode.children && vnode.children.slice(),
  30958. vnode.text,
  30959. vnode.elm,
  30960. vnode.context,
  30961. vnode.componentOptions,
  30962. vnode.asyncFactory
  30963. );
  30964. cloned.ns = vnode.ns;
  30965. cloned.isStatic = vnode.isStatic;
  30966. cloned.key = vnode.key;
  30967. cloned.isComment = vnode.isComment;
  30968. cloned.fnContext = vnode.fnContext;
  30969. cloned.fnOptions = vnode.fnOptions;
  30970. cloned.fnScopeId = vnode.fnScopeId;
  30971. cloned.asyncMeta = vnode.asyncMeta;
  30972. cloned.isCloned = true;
  30973. return cloned
  30974. }
  30975. /*
  30976. * not type checking this file because flow doesn't play well with
  30977. * dynamically accessing methods on Array prototype
  30978. */
  30979. var arrayProto = Array.prototype;
  30980. var arrayMethods = Object.create(arrayProto);
  30981. var methodsToPatch = [
  30982. 'push',
  30983. 'pop',
  30984. 'shift',
  30985. 'unshift',
  30986. 'splice',
  30987. 'sort',
  30988. 'reverse'
  30989. ];
  30990. /**
  30991. * Intercept mutating methods and emit events
  30992. */
  30993. methodsToPatch.forEach(function (method) {
  30994. // cache original method
  30995. var original = arrayProto[method];
  30996. def(arrayMethods, method, function mutator () {
  30997. var args = [], len = arguments.length;
  30998. while ( len-- ) args[ len ] = arguments[ len ];
  30999. var result = original.apply(this, args);
  31000. var ob = this.__ob__;
  31001. var inserted;
  31002. switch (method) {
  31003. case 'push':
  31004. case 'unshift':
  31005. inserted = args;
  31006. break
  31007. case 'splice':
  31008. inserted = args.slice(2);
  31009. break
  31010. }
  31011. if (inserted) { ob.observeArray(inserted); }
  31012. // notify change
  31013. ob.dep.notify();
  31014. return result
  31015. });
  31016. });
  31017. /* */
  31018. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  31019. /**
  31020. * In some cases we may want to disable observation inside a component's
  31021. * update computation.
  31022. */
  31023. var shouldObserve = true;
  31024. function toggleObserving (value) {
  31025. shouldObserve = value;
  31026. }
  31027. /**
  31028. * Observer class that is attached to each observed
  31029. * object. Once attached, the observer converts the target
  31030. * object's property keys into getter/setters that
  31031. * collect dependencies and dispatch updates.
  31032. */
  31033. var Observer = function Observer (value) {
  31034. this.value = value;
  31035. this.dep = new Dep();
  31036. this.vmCount = 0;
  31037. def(value, '__ob__', this);
  31038. if (Array.isArray(value)) {
  31039. if (hasProto) {
  31040. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  31041. if(value.push !== value.__proto__.push){
  31042. copyAugment(value, arrayMethods, arrayKeys);
  31043. } else {
  31044. protoAugment(value, arrayMethods);
  31045. }
  31046. }
  31047. } else {
  31048. copyAugment(value, arrayMethods, arrayKeys);
  31049. }
  31050. this.observeArray(value);
  31051. } else {
  31052. this.walk(value);
  31053. }
  31054. };
  31055. /**
  31056. * Walk through all properties and convert them into
  31057. * getter/setters. This method should only be called when
  31058. * value type is Object.
  31059. */
  31060. Observer.prototype.walk = function walk (obj) {
  31061. var keys = Object.keys(obj);
  31062. for (var i = 0; i < keys.length; i++) {
  31063. defineReactive$$1(obj, keys[i]);
  31064. }
  31065. };
  31066. /**
  31067. * Observe a list of Array items.
  31068. */
  31069. Observer.prototype.observeArray = function observeArray (items) {
  31070. for (var i = 0, l = items.length; i < l; i++) {
  31071. observe(items[i]);
  31072. }
  31073. };
  31074. // helpers
  31075. /**
  31076. * Augment a target Object or Array by intercepting
  31077. * the prototype chain using __proto__
  31078. */
  31079. function protoAugment (target, src) {
  31080. /* eslint-disable no-proto */
  31081. target.__proto__ = src;
  31082. /* eslint-enable no-proto */
  31083. }
  31084. /**
  31085. * Augment a target Object or Array by defining
  31086. * hidden properties.
  31087. */
  31088. /* istanbul ignore next */
  31089. function copyAugment (target, src, keys) {
  31090. for (var i = 0, l = keys.length; i < l; i++) {
  31091. var key = keys[i];
  31092. def(target, key, src[key]);
  31093. }
  31094. }
  31095. /**
  31096. * Attempt to create an observer instance for a value,
  31097. * returns the new observer if successfully observed,
  31098. * or the existing observer if the value already has one.
  31099. */
  31100. function observe (value, asRootData) {
  31101. if (!isObject(value) || value instanceof VNode) {
  31102. return
  31103. }
  31104. var ob;
  31105. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  31106. ob = value.__ob__;
  31107. } else if (
  31108. shouldObserve &&
  31109. !isServerRendering() &&
  31110. (Array.isArray(value) || isPlainObject(value)) &&
  31111. Object.isExtensible(value) &&
  31112. !value._isVue &&
  31113. !value.__v_isMPComponent
  31114. ) {
  31115. ob = new Observer(value);
  31116. }
  31117. if (asRootData && ob) {
  31118. ob.vmCount++;
  31119. }
  31120. return ob
  31121. }
  31122. /**
  31123. * Define a reactive property on an Object.
  31124. */
  31125. function defineReactive$$1 (
  31126. obj,
  31127. key,
  31128. val,
  31129. customSetter,
  31130. shallow
  31131. ) {
  31132. var dep = new Dep();
  31133. var property = Object.getOwnPropertyDescriptor(obj, key);
  31134. if (property && property.configurable === false) {
  31135. return
  31136. }
  31137. // cater for pre-defined getter/setters
  31138. var getter = property && property.get;
  31139. var setter = property && property.set;
  31140. if ((!getter || setter) && arguments.length === 2) {
  31141. val = obj[key];
  31142. }
  31143. var childOb = !shallow && observe(val);
  31144. Object.defineProperty(obj, key, {
  31145. enumerable: true,
  31146. configurable: true,
  31147. get: function reactiveGetter () {
  31148. var value = getter ? getter.call(obj) : val;
  31149. if (Dep.SharedObject.target) { // fixed by xxxxxx
  31150. dep.depend();
  31151. if (childOb) {
  31152. childOb.dep.depend();
  31153. if (Array.isArray(value)) {
  31154. dependArray(value);
  31155. }
  31156. }
  31157. }
  31158. return value
  31159. },
  31160. set: function reactiveSetter (newVal) {
  31161. var value = getter ? getter.call(obj) : val;
  31162. /* eslint-disable no-self-compare */
  31163. if (newVal === value || (newVal !== newVal && value !== value)) {
  31164. return
  31165. }
  31166. /* eslint-enable no-self-compare */
  31167. if ( true && customSetter) {
  31168. customSetter();
  31169. }
  31170. // #7981: for accessor properties without setter
  31171. if (getter && !setter) { return }
  31172. if (setter) {
  31173. setter.call(obj, newVal);
  31174. } else {
  31175. val = newVal;
  31176. }
  31177. childOb = !shallow && observe(newVal);
  31178. dep.notify();
  31179. }
  31180. });
  31181. }
  31182. /**
  31183. * Set a property on an object. Adds the new property and
  31184. * triggers change notification if the property doesn't
  31185. * already exist.
  31186. */
  31187. function set (target, key, val) {
  31188. if ( true &&
  31189. (isUndef(target) || isPrimitive(target))
  31190. ) {
  31191. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  31192. }
  31193. if (Array.isArray(target) && isValidArrayIndex(key)) {
  31194. target.length = Math.max(target.length, key);
  31195. target.splice(key, 1, val);
  31196. return val
  31197. }
  31198. if (key in target && !(key in Object.prototype)) {
  31199. target[key] = val;
  31200. return val
  31201. }
  31202. var ob = (target).__ob__;
  31203. if (target._isVue || (ob && ob.vmCount)) {
  31204. true && warn(
  31205. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  31206. 'at runtime - declare it upfront in the data option.'
  31207. );
  31208. return val
  31209. }
  31210. if (!ob) {
  31211. target[key] = val;
  31212. return val
  31213. }
  31214. defineReactive$$1(ob.value, key, val);
  31215. ob.dep.notify();
  31216. return val
  31217. }
  31218. /**
  31219. * Delete a property and trigger change if necessary.
  31220. */
  31221. function del (target, key) {
  31222. if ( true &&
  31223. (isUndef(target) || isPrimitive(target))
  31224. ) {
  31225. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  31226. }
  31227. if (Array.isArray(target) && isValidArrayIndex(key)) {
  31228. target.splice(key, 1);
  31229. return
  31230. }
  31231. var ob = (target).__ob__;
  31232. if (target._isVue || (ob && ob.vmCount)) {
  31233. true && warn(
  31234. 'Avoid deleting properties on a Vue instance or its root $data ' +
  31235. '- just set it to null.'
  31236. );
  31237. return
  31238. }
  31239. if (!hasOwn(target, key)) {
  31240. return
  31241. }
  31242. delete target[key];
  31243. if (!ob) {
  31244. return
  31245. }
  31246. ob.dep.notify();
  31247. }
  31248. /**
  31249. * Collect dependencies on array elements when the array is touched, since
  31250. * we cannot intercept array element access like property getters.
  31251. */
  31252. function dependArray (value) {
  31253. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  31254. e = value[i];
  31255. e && e.__ob__ && e.__ob__.dep.depend();
  31256. if (Array.isArray(e)) {
  31257. dependArray(e);
  31258. }
  31259. }
  31260. }
  31261. /* */
  31262. /**
  31263. * Option overwriting strategies are functions that handle
  31264. * how to merge a parent option value and a child option
  31265. * value into the final value.
  31266. */
  31267. var strats = config.optionMergeStrategies;
  31268. /**
  31269. * Options with restrictions
  31270. */
  31271. if (true) {
  31272. strats.el = strats.propsData = function (parent, child, vm, key) {
  31273. if (!vm) {
  31274. warn(
  31275. "option \"" + key + "\" can only be used during instance " +
  31276. 'creation with the `new` keyword.'
  31277. );
  31278. }
  31279. return defaultStrat(parent, child)
  31280. };
  31281. }
  31282. /**
  31283. * Helper that recursively merges two data objects together.
  31284. */
  31285. function mergeData (to, from) {
  31286. if (!from) { return to }
  31287. var key, toVal, fromVal;
  31288. var keys = hasSymbol
  31289. ? Reflect.ownKeys(from)
  31290. : Object.keys(from);
  31291. for (var i = 0; i < keys.length; i++) {
  31292. key = keys[i];
  31293. // in case the object is already observed...
  31294. if (key === '__ob__') { continue }
  31295. toVal = to[key];
  31296. fromVal = from[key];
  31297. if (!hasOwn(to, key)) {
  31298. set(to, key, fromVal);
  31299. } else if (
  31300. toVal !== fromVal &&
  31301. isPlainObject(toVal) &&
  31302. isPlainObject(fromVal)
  31303. ) {
  31304. mergeData(toVal, fromVal);
  31305. }
  31306. }
  31307. return to
  31308. }
  31309. /**
  31310. * Data
  31311. */
  31312. function mergeDataOrFn (
  31313. parentVal,
  31314. childVal,
  31315. vm
  31316. ) {
  31317. if (!vm) {
  31318. // in a Vue.extend merge, both should be functions
  31319. if (!childVal) {
  31320. return parentVal
  31321. }
  31322. if (!parentVal) {
  31323. return childVal
  31324. }
  31325. // when parentVal & childVal are both present,
  31326. // we need to return a function that returns the
  31327. // merged result of both functions... no need to
  31328. // check if parentVal is a function here because
  31329. // it has to be a function to pass previous merges.
  31330. return function mergedDataFn () {
  31331. return mergeData(
  31332. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  31333. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  31334. )
  31335. }
  31336. } else {
  31337. return function mergedInstanceDataFn () {
  31338. // instance merge
  31339. var instanceData = typeof childVal === 'function'
  31340. ? childVal.call(vm, vm)
  31341. : childVal;
  31342. var defaultData = typeof parentVal === 'function'
  31343. ? parentVal.call(vm, vm)
  31344. : parentVal;
  31345. if (instanceData) {
  31346. return mergeData(instanceData, defaultData)
  31347. } else {
  31348. return defaultData
  31349. }
  31350. }
  31351. }
  31352. }
  31353. strats.data = function (
  31354. parentVal,
  31355. childVal,
  31356. vm
  31357. ) {
  31358. if (!vm) {
  31359. if (childVal && typeof childVal !== 'function') {
  31360. true && warn(
  31361. 'The "data" option should be a function ' +
  31362. 'that returns a per-instance value in component ' +
  31363. 'definitions.',
  31364. vm
  31365. );
  31366. return parentVal
  31367. }
  31368. return mergeDataOrFn(parentVal, childVal)
  31369. }
  31370. return mergeDataOrFn(parentVal, childVal, vm)
  31371. };
  31372. /**
  31373. * Hooks and props are merged as arrays.
  31374. */
  31375. function mergeHook (
  31376. parentVal,
  31377. childVal
  31378. ) {
  31379. var res = childVal
  31380. ? parentVal
  31381. ? parentVal.concat(childVal)
  31382. : Array.isArray(childVal)
  31383. ? childVal
  31384. : [childVal]
  31385. : parentVal;
  31386. return res
  31387. ? dedupeHooks(res)
  31388. : res
  31389. }
  31390. function dedupeHooks (hooks) {
  31391. var res = [];
  31392. for (var i = 0; i < hooks.length; i++) {
  31393. if (res.indexOf(hooks[i]) === -1) {
  31394. res.push(hooks[i]);
  31395. }
  31396. }
  31397. return res
  31398. }
  31399. LIFECYCLE_HOOKS.forEach(function (hook) {
  31400. strats[hook] = mergeHook;
  31401. });
  31402. /**
  31403. * Assets
  31404. *
  31405. * When a vm is present (instance creation), we need to do
  31406. * a three-way merge between constructor options, instance
  31407. * options and parent options.
  31408. */
  31409. function mergeAssets (
  31410. parentVal,
  31411. childVal,
  31412. vm,
  31413. key
  31414. ) {
  31415. var res = Object.create(parentVal || null);
  31416. if (childVal) {
  31417. true && assertObjectType(key, childVal, vm);
  31418. return extend(res, childVal)
  31419. } else {
  31420. return res
  31421. }
  31422. }
  31423. ASSET_TYPES.forEach(function (type) {
  31424. strats[type + 's'] = mergeAssets;
  31425. });
  31426. /**
  31427. * Watchers.
  31428. *
  31429. * Watchers hashes should not overwrite one
  31430. * another, so we merge them as arrays.
  31431. */
  31432. strats.watch = function (
  31433. parentVal,
  31434. childVal,
  31435. vm,
  31436. key
  31437. ) {
  31438. // work around Firefox's Object.prototype.watch...
  31439. if (parentVal === nativeWatch) { parentVal = undefined; }
  31440. if (childVal === nativeWatch) { childVal = undefined; }
  31441. /* istanbul ignore if */
  31442. if (!childVal) { return Object.create(parentVal || null) }
  31443. if (true) {
  31444. assertObjectType(key, childVal, vm);
  31445. }
  31446. if (!parentVal) { return childVal }
  31447. var ret = {};
  31448. extend(ret, parentVal);
  31449. for (var key$1 in childVal) {
  31450. var parent = ret[key$1];
  31451. var child = childVal[key$1];
  31452. if (parent && !Array.isArray(parent)) {
  31453. parent = [parent];
  31454. }
  31455. ret[key$1] = parent
  31456. ? parent.concat(child)
  31457. : Array.isArray(child) ? child : [child];
  31458. }
  31459. return ret
  31460. };
  31461. /**
  31462. * Other object hashes.
  31463. */
  31464. strats.props =
  31465. strats.methods =
  31466. strats.inject =
  31467. strats.computed = function (
  31468. parentVal,
  31469. childVal,
  31470. vm,
  31471. key
  31472. ) {
  31473. if (childVal && "development" !== 'production') {
  31474. assertObjectType(key, childVal, vm);
  31475. }
  31476. if (!parentVal) { return childVal }
  31477. var ret = Object.create(null);
  31478. extend(ret, parentVal);
  31479. if (childVal) { extend(ret, childVal); }
  31480. return ret
  31481. };
  31482. strats.provide = mergeDataOrFn;
  31483. /**
  31484. * Default strategy.
  31485. */
  31486. var defaultStrat = function (parentVal, childVal) {
  31487. return childVal === undefined
  31488. ? parentVal
  31489. : childVal
  31490. };
  31491. /**
  31492. * Validate component names
  31493. */
  31494. function checkComponents (options) {
  31495. for (var key in options.components) {
  31496. validateComponentName(key);
  31497. }
  31498. }
  31499. function validateComponentName (name) {
  31500. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  31501. warn(
  31502. 'Invalid component name: "' + name + '". Component names ' +
  31503. 'should conform to valid custom element name in html5 specification.'
  31504. );
  31505. }
  31506. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  31507. warn(
  31508. 'Do not use built-in or reserved HTML elements as component ' +
  31509. 'id: ' + name
  31510. );
  31511. }
  31512. }
  31513. /**
  31514. * Ensure all props option syntax are normalized into the
  31515. * Object-based format.
  31516. */
  31517. function normalizeProps (options, vm) {
  31518. var props = options.props;
  31519. if (!props) { return }
  31520. var res = {};
  31521. var i, val, name;
  31522. if (Array.isArray(props)) {
  31523. i = props.length;
  31524. while (i--) {
  31525. val = props[i];
  31526. if (typeof val === 'string') {
  31527. name = camelize(val);
  31528. res[name] = { type: null };
  31529. } else if (true) {
  31530. warn('props must be strings when using array syntax.');
  31531. }
  31532. }
  31533. } else if (isPlainObject(props)) {
  31534. for (var key in props) {
  31535. val = props[key];
  31536. name = camelize(key);
  31537. res[name] = isPlainObject(val)
  31538. ? val
  31539. : { type: val };
  31540. }
  31541. } else if (true) {
  31542. warn(
  31543. "Invalid value for option \"props\": expected an Array or an Object, " +
  31544. "but got " + (toRawType(props)) + ".",
  31545. vm
  31546. );
  31547. }
  31548. options.props = res;
  31549. }
  31550. /**
  31551. * Normalize all injections into Object-based format
  31552. */
  31553. function normalizeInject (options, vm) {
  31554. var inject = options.inject;
  31555. if (!inject) { return }
  31556. var normalized = options.inject = {};
  31557. if (Array.isArray(inject)) {
  31558. for (var i = 0; i < inject.length; i++) {
  31559. normalized[inject[i]] = { from: inject[i] };
  31560. }
  31561. } else if (isPlainObject(inject)) {
  31562. for (var key in inject) {
  31563. var val = inject[key];
  31564. normalized[key] = isPlainObject(val)
  31565. ? extend({ from: key }, val)
  31566. : { from: val };
  31567. }
  31568. } else if (true) {
  31569. warn(
  31570. "Invalid value for option \"inject\": expected an Array or an Object, " +
  31571. "but got " + (toRawType(inject)) + ".",
  31572. vm
  31573. );
  31574. }
  31575. }
  31576. /**
  31577. * Normalize raw function directives into object format.
  31578. */
  31579. function normalizeDirectives (options) {
  31580. var dirs = options.directives;
  31581. if (dirs) {
  31582. for (var key in dirs) {
  31583. var def$$1 = dirs[key];
  31584. if (typeof def$$1 === 'function') {
  31585. dirs[key] = { bind: def$$1, update: def$$1 };
  31586. }
  31587. }
  31588. }
  31589. }
  31590. function assertObjectType (name, value, vm) {
  31591. if (!isPlainObject(value)) {
  31592. warn(
  31593. "Invalid value for option \"" + name + "\": expected an Object, " +
  31594. "but got " + (toRawType(value)) + ".",
  31595. vm
  31596. );
  31597. }
  31598. }
  31599. /**
  31600. * Merge two option objects into a new one.
  31601. * Core utility used in both instantiation and inheritance.
  31602. */
  31603. function mergeOptions (
  31604. parent,
  31605. child,
  31606. vm
  31607. ) {
  31608. if (true) {
  31609. checkComponents(child);
  31610. }
  31611. if (typeof child === 'function') {
  31612. child = child.options;
  31613. }
  31614. normalizeProps(child, vm);
  31615. normalizeInject(child, vm);
  31616. normalizeDirectives(child);
  31617. // Apply extends and mixins on the child options,
  31618. // but only if it is a raw options object that isn't
  31619. // the result of another mergeOptions call.
  31620. // Only merged options has the _base property.
  31621. if (!child._base) {
  31622. if (child.extends) {
  31623. parent = mergeOptions(parent, child.extends, vm);
  31624. }
  31625. if (child.mixins) {
  31626. for (var i = 0, l = child.mixins.length; i < l; i++) {
  31627. parent = mergeOptions(parent, child.mixins[i], vm);
  31628. }
  31629. }
  31630. }
  31631. var options = {};
  31632. var key;
  31633. for (key in parent) {
  31634. mergeField(key);
  31635. }
  31636. for (key in child) {
  31637. if (!hasOwn(parent, key)) {
  31638. mergeField(key);
  31639. }
  31640. }
  31641. function mergeField (key) {
  31642. var strat = strats[key] || defaultStrat;
  31643. options[key] = strat(parent[key], child[key], vm, key);
  31644. }
  31645. return options
  31646. }
  31647. /**
  31648. * Resolve an asset.
  31649. * This function is used because child instances need access
  31650. * to assets defined in its ancestor chain.
  31651. */
  31652. function resolveAsset (
  31653. options,
  31654. type,
  31655. id,
  31656. warnMissing
  31657. ) {
  31658. /* istanbul ignore if */
  31659. if (typeof id !== 'string') {
  31660. return
  31661. }
  31662. var assets = options[type];
  31663. // check local registration variations first
  31664. if (hasOwn(assets, id)) { return assets[id] }
  31665. var camelizedId = camelize(id);
  31666. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  31667. var PascalCaseId = capitalize(camelizedId);
  31668. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  31669. // fallback to prototype chain
  31670. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  31671. if ( true && warnMissing && !res) {
  31672. warn(
  31673. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  31674. options
  31675. );
  31676. }
  31677. return res
  31678. }
  31679. /* */
  31680. function validateProp (
  31681. key,
  31682. propOptions,
  31683. propsData,
  31684. vm
  31685. ) {
  31686. var prop = propOptions[key];
  31687. var absent = !hasOwn(propsData, key);
  31688. var value = propsData[key];
  31689. // boolean casting
  31690. var booleanIndex = getTypeIndex(Boolean, prop.type);
  31691. if (booleanIndex > -1) {
  31692. if (absent && !hasOwn(prop, 'default')) {
  31693. value = false;
  31694. } else if (value === '' || value === hyphenate(key)) {
  31695. // only cast empty string / same name to boolean if
  31696. // boolean has higher priority
  31697. var stringIndex = getTypeIndex(String, prop.type);
  31698. if (stringIndex < 0 || booleanIndex < stringIndex) {
  31699. value = true;
  31700. }
  31701. }
  31702. }
  31703. // check default value
  31704. if (value === undefined) {
  31705. value = getPropDefaultValue(vm, prop, key);
  31706. // since the default value is a fresh copy,
  31707. // make sure to observe it.
  31708. var prevShouldObserve = shouldObserve;
  31709. toggleObserving(true);
  31710. observe(value);
  31711. toggleObserving(prevShouldObserve);
  31712. }
  31713. if (
  31714. true
  31715. ) {
  31716. assertProp(prop, key, value, vm, absent);
  31717. }
  31718. return value
  31719. }
  31720. /**
  31721. * Get the default value of a prop.
  31722. */
  31723. function getPropDefaultValue (vm, prop, key) {
  31724. // no default, return undefined
  31725. if (!hasOwn(prop, 'default')) {
  31726. return undefined
  31727. }
  31728. var def = prop.default;
  31729. // warn against non-factory defaults for Object & Array
  31730. if ( true && isObject(def)) {
  31731. warn(
  31732. 'Invalid default value for prop "' + key + '": ' +
  31733. 'Props with type Object/Array must use a factory function ' +
  31734. 'to return the default value.',
  31735. vm
  31736. );
  31737. }
  31738. // the raw prop value was also undefined from previous render,
  31739. // return previous default value to avoid unnecessary watcher trigger
  31740. if (vm && vm.$options.propsData &&
  31741. vm.$options.propsData[key] === undefined &&
  31742. vm._props[key] !== undefined
  31743. ) {
  31744. return vm._props[key]
  31745. }
  31746. // call factory function for non-Function types
  31747. // a value is Function if its prototype is function even across different execution context
  31748. return typeof def === 'function' && getType(prop.type) !== 'Function'
  31749. ? def.call(vm)
  31750. : def
  31751. }
  31752. /**
  31753. * Assert whether a prop is valid.
  31754. */
  31755. function assertProp (
  31756. prop,
  31757. name,
  31758. value,
  31759. vm,
  31760. absent
  31761. ) {
  31762. if (prop.required && absent) {
  31763. warn(
  31764. 'Missing required prop: "' + name + '"',
  31765. vm
  31766. );
  31767. return
  31768. }
  31769. if (value == null && !prop.required) {
  31770. return
  31771. }
  31772. var type = prop.type;
  31773. var valid = !type || type === true;
  31774. var expectedTypes = [];
  31775. if (type) {
  31776. if (!Array.isArray(type)) {
  31777. type = [type];
  31778. }
  31779. for (var i = 0; i < type.length && !valid; i++) {
  31780. var assertedType = assertType(value, type[i]);
  31781. expectedTypes.push(assertedType.expectedType || '');
  31782. valid = assertedType.valid;
  31783. }
  31784. }
  31785. if (!valid) {
  31786. warn(
  31787. getInvalidTypeMessage(name, value, expectedTypes),
  31788. vm
  31789. );
  31790. return
  31791. }
  31792. var validator = prop.validator;
  31793. if (validator) {
  31794. if (!validator(value)) {
  31795. warn(
  31796. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  31797. vm
  31798. );
  31799. }
  31800. }
  31801. }
  31802. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  31803. function assertType (value, type) {
  31804. var valid;
  31805. var expectedType = getType(type);
  31806. if (simpleCheckRE.test(expectedType)) {
  31807. var t = typeof value;
  31808. valid = t === expectedType.toLowerCase();
  31809. // for primitive wrapper objects
  31810. if (!valid && t === 'object') {
  31811. valid = value instanceof type;
  31812. }
  31813. } else if (expectedType === 'Object') {
  31814. valid = isPlainObject(value);
  31815. } else if (expectedType === 'Array') {
  31816. valid = Array.isArray(value);
  31817. } else {
  31818. valid = value instanceof type;
  31819. }
  31820. return {
  31821. valid: valid,
  31822. expectedType: expectedType
  31823. }
  31824. }
  31825. /**
  31826. * Use function string name to check built-in types,
  31827. * because a simple equality check will fail when running
  31828. * across different vms / iframes.
  31829. */
  31830. function getType (fn) {
  31831. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  31832. return match ? match[1] : ''
  31833. }
  31834. function isSameType (a, b) {
  31835. return getType(a) === getType(b)
  31836. }
  31837. function getTypeIndex (type, expectedTypes) {
  31838. if (!Array.isArray(expectedTypes)) {
  31839. return isSameType(expectedTypes, type) ? 0 : -1
  31840. }
  31841. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  31842. if (isSameType(expectedTypes[i], type)) {
  31843. return i
  31844. }
  31845. }
  31846. return -1
  31847. }
  31848. function getInvalidTypeMessage (name, value, expectedTypes) {
  31849. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  31850. " Expected " + (expectedTypes.map(capitalize).join(', '));
  31851. var expectedType = expectedTypes[0];
  31852. var receivedType = toRawType(value);
  31853. var expectedValue = styleValue(value, expectedType);
  31854. var receivedValue = styleValue(value, receivedType);
  31855. // check if we need to specify expected value
  31856. if (expectedTypes.length === 1 &&
  31857. isExplicable(expectedType) &&
  31858. !isBoolean(expectedType, receivedType)) {
  31859. message += " with value " + expectedValue;
  31860. }
  31861. message += ", got " + receivedType + " ";
  31862. // check if we need to specify received value
  31863. if (isExplicable(receivedType)) {
  31864. message += "with value " + receivedValue + ".";
  31865. }
  31866. return message
  31867. }
  31868. function styleValue (value, type) {
  31869. if (type === 'String') {
  31870. return ("\"" + value + "\"")
  31871. } else if (type === 'Number') {
  31872. return ("" + (Number(value)))
  31873. } else {
  31874. return ("" + value)
  31875. }
  31876. }
  31877. function isExplicable (value) {
  31878. var explicitTypes = ['string', 'number', 'boolean'];
  31879. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  31880. }
  31881. function isBoolean () {
  31882. var args = [], len = arguments.length;
  31883. while ( len-- ) args[ len ] = arguments[ len ];
  31884. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  31885. }
  31886. /* */
  31887. function handleError (err, vm, info) {
  31888. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  31889. // See: https://github.com/vuejs/vuex/issues/1505
  31890. pushTarget();
  31891. try {
  31892. if (vm) {
  31893. var cur = vm;
  31894. while ((cur = cur.$parent)) {
  31895. var hooks = cur.$options.errorCaptured;
  31896. if (hooks) {
  31897. for (var i = 0; i < hooks.length; i++) {
  31898. try {
  31899. var capture = hooks[i].call(cur, err, vm, info) === false;
  31900. if (capture) { return }
  31901. } catch (e) {
  31902. globalHandleError(e, cur, 'errorCaptured hook');
  31903. }
  31904. }
  31905. }
  31906. }
  31907. }
  31908. globalHandleError(err, vm, info);
  31909. } finally {
  31910. popTarget();
  31911. }
  31912. }
  31913. function invokeWithErrorHandling (
  31914. handler,
  31915. context,
  31916. args,
  31917. vm,
  31918. info
  31919. ) {
  31920. var res;
  31921. try {
  31922. res = args ? handler.apply(context, args) : handler.call(context);
  31923. if (res && !res._isVue && isPromise(res) && !res._handled) {
  31924. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  31925. // issue #9511
  31926. // avoid catch triggering multiple times when nested calls
  31927. res._handled = true;
  31928. }
  31929. } catch (e) {
  31930. handleError(e, vm, info);
  31931. }
  31932. return res
  31933. }
  31934. function globalHandleError (err, vm, info) {
  31935. if (config.errorHandler) {
  31936. try {
  31937. return config.errorHandler.call(null, err, vm, info)
  31938. } catch (e) {
  31939. // if the user intentionally throws the original error in the handler,
  31940. // do not log it twice
  31941. if (e !== err) {
  31942. logError(e, null, 'config.errorHandler');
  31943. }
  31944. }
  31945. }
  31946. logError(err, vm, info);
  31947. }
  31948. function logError (err, vm, info) {
  31949. if (true) {
  31950. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  31951. }
  31952. /* istanbul ignore else */
  31953. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  31954. console.error(err);
  31955. } else {
  31956. throw err
  31957. }
  31958. }
  31959. /* */
  31960. var callbacks = [];
  31961. var pending = false;
  31962. function flushCallbacks () {
  31963. pending = false;
  31964. var copies = callbacks.slice(0);
  31965. callbacks.length = 0;
  31966. for (var i = 0; i < copies.length; i++) {
  31967. copies[i]();
  31968. }
  31969. }
  31970. // Here we have async deferring wrappers using microtasks.
  31971. // In 2.5 we used (macro) tasks (in combination with microtasks).
  31972. // However, it has subtle problems when state is changed right before repaint
  31973. // (e.g. #6813, out-in transitions).
  31974. // Also, using (macro) tasks in event handler would cause some weird behaviors
  31975. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  31976. // So we now use microtasks everywhere, again.
  31977. // A major drawback of this tradeoff is that there are some scenarios
  31978. // where microtasks have too high a priority and fire in between supposedly
  31979. // sequential events (e.g. #4521, #6690, which have workarounds)
  31980. // or even between bubbling of the same event (#6566).
  31981. var timerFunc;
  31982. // The nextTick behavior leverages the microtask queue, which can be accessed
  31983. // via either native Promise.then or MutationObserver.
  31984. // MutationObserver has wider support, however it is seriously bugged in
  31985. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  31986. // completely stops working after triggering a few times... so, if native
  31987. // Promise is available, we will use it:
  31988. /* istanbul ignore next, $flow-disable-line */
  31989. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  31990. var p = Promise.resolve();
  31991. timerFunc = function () {
  31992. p.then(flushCallbacks);
  31993. // In problematic UIWebViews, Promise.then doesn't completely break, but
  31994. // it can get stuck in a weird state where callbacks are pushed into the
  31995. // microtask queue but the queue isn't being flushed, until the browser
  31996. // needs to do some other work, e.g. handle a timer. Therefore we can
  31997. // "force" the microtask queue to be flushed by adding an empty timer.
  31998. if (isIOS) { setTimeout(noop); }
  31999. };
  32000. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  32001. isNative(MutationObserver) ||
  32002. // PhantomJS and iOS 7.x
  32003. MutationObserver.toString() === '[object MutationObserverConstructor]'
  32004. )) {
  32005. // Use MutationObserver where native Promise is not available,
  32006. // e.g. PhantomJS, iOS7, Android 4.4
  32007. // (#6466 MutationObserver is unreliable in IE11)
  32008. var counter = 1;
  32009. var observer = new MutationObserver(flushCallbacks);
  32010. var textNode = document.createTextNode(String(counter));
  32011. observer.observe(textNode, {
  32012. characterData: true
  32013. });
  32014. timerFunc = function () {
  32015. counter = (counter + 1) % 2;
  32016. textNode.data = String(counter);
  32017. };
  32018. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  32019. // Fallback to setImmediate.
  32020. // Technically it leverages the (macro) task queue,
  32021. // but it is still a better choice than setTimeout.
  32022. timerFunc = function () {
  32023. setImmediate(flushCallbacks);
  32024. };
  32025. } else {
  32026. // Fallback to setTimeout.
  32027. timerFunc = function () {
  32028. setTimeout(flushCallbacks, 0);
  32029. };
  32030. }
  32031. function nextTick (cb, ctx) {
  32032. var _resolve;
  32033. callbacks.push(function () {
  32034. if (cb) {
  32035. try {
  32036. cb.call(ctx);
  32037. } catch (e) {
  32038. handleError(e, ctx, 'nextTick');
  32039. }
  32040. } else if (_resolve) {
  32041. _resolve(ctx);
  32042. }
  32043. });
  32044. if (!pending) {
  32045. pending = true;
  32046. timerFunc();
  32047. }
  32048. // $flow-disable-line
  32049. if (!cb && typeof Promise !== 'undefined') {
  32050. return new Promise(function (resolve) {
  32051. _resolve = resolve;
  32052. })
  32053. }
  32054. }
  32055. /* */
  32056. /* not type checking this file because flow doesn't play well with Proxy */
  32057. var initProxy;
  32058. if (true) {
  32059. var allowedGlobals = makeMap(
  32060. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  32061. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  32062. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  32063. 'require' // for Webpack/Browserify
  32064. );
  32065. var warnNonPresent = function (target, key) {
  32066. warn(
  32067. "Property or method \"" + key + "\" is not defined on the instance but " +
  32068. 'referenced during render. Make sure that this property is reactive, ' +
  32069. 'either in the data option, or for class-based components, by ' +
  32070. 'initializing the property. ' +
  32071. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  32072. target
  32073. );
  32074. };
  32075. var warnReservedPrefix = function (target, key) {
  32076. warn(
  32077. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  32078. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  32079. 'prevent conflicts with Vue internals. ' +
  32080. 'See: https://vuejs.org/v2/api/#data',
  32081. target
  32082. );
  32083. };
  32084. var hasProxy =
  32085. typeof Proxy !== 'undefined' && isNative(Proxy);
  32086. if (hasProxy) {
  32087. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  32088. config.keyCodes = new Proxy(config.keyCodes, {
  32089. set: function set (target, key, value) {
  32090. if (isBuiltInModifier(key)) {
  32091. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  32092. return false
  32093. } else {
  32094. target[key] = value;
  32095. return true
  32096. }
  32097. }
  32098. });
  32099. }
  32100. var hasHandler = {
  32101. has: function has (target, key) {
  32102. var has = key in target;
  32103. var isAllowed = allowedGlobals(key) ||
  32104. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  32105. if (!has && !isAllowed) {
  32106. if (key in target.$data) { warnReservedPrefix(target, key); }
  32107. else { warnNonPresent(target, key); }
  32108. }
  32109. return has || !isAllowed
  32110. }
  32111. };
  32112. var getHandler = {
  32113. get: function get (target, key) {
  32114. if (typeof key === 'string' && !(key in target)) {
  32115. if (key in target.$data) { warnReservedPrefix(target, key); }
  32116. else { warnNonPresent(target, key); }
  32117. }
  32118. return target[key]
  32119. }
  32120. };
  32121. initProxy = function initProxy (vm) {
  32122. if (hasProxy) {
  32123. // determine which proxy handler to use
  32124. var options = vm.$options;
  32125. var handlers = options.render && options.render._withStripped
  32126. ? getHandler
  32127. : hasHandler;
  32128. vm._renderProxy = new Proxy(vm, handlers);
  32129. } else {
  32130. vm._renderProxy = vm;
  32131. }
  32132. };
  32133. }
  32134. /* */
  32135. var seenObjects = new _Set();
  32136. /**
  32137. * Recursively traverse an object to evoke all converted
  32138. * getters, so that every nested property inside the object
  32139. * is collected as a "deep" dependency.
  32140. */
  32141. function traverse (val) {
  32142. _traverse(val, seenObjects);
  32143. seenObjects.clear();
  32144. }
  32145. function _traverse (val, seen) {
  32146. var i, keys;
  32147. var isA = Array.isArray(val);
  32148. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  32149. return
  32150. }
  32151. if (val.__ob__) {
  32152. var depId = val.__ob__.dep.id;
  32153. if (seen.has(depId)) {
  32154. return
  32155. }
  32156. seen.add(depId);
  32157. }
  32158. if (isA) {
  32159. i = val.length;
  32160. while (i--) { _traverse(val[i], seen); }
  32161. } else {
  32162. keys = Object.keys(val);
  32163. i = keys.length;
  32164. while (i--) { _traverse(val[keys[i]], seen); }
  32165. }
  32166. }
  32167. var mark;
  32168. var measure;
  32169. if (true) {
  32170. var perf = inBrowser && window.performance;
  32171. /* istanbul ignore if */
  32172. if (
  32173. perf &&
  32174. perf.mark &&
  32175. perf.measure &&
  32176. perf.clearMarks &&
  32177. perf.clearMeasures
  32178. ) {
  32179. mark = function (tag) { return perf.mark(tag); };
  32180. measure = function (name, startTag, endTag) {
  32181. perf.measure(name, startTag, endTag);
  32182. perf.clearMarks(startTag);
  32183. perf.clearMarks(endTag);
  32184. // perf.clearMeasures(name)
  32185. };
  32186. }
  32187. }
  32188. /* */
  32189. var normalizeEvent = cached(function (name) {
  32190. var passive = name.charAt(0) === '&';
  32191. name = passive ? name.slice(1) : name;
  32192. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  32193. name = once$$1 ? name.slice(1) : name;
  32194. var capture = name.charAt(0) === '!';
  32195. name = capture ? name.slice(1) : name;
  32196. return {
  32197. name: name,
  32198. once: once$$1,
  32199. capture: capture,
  32200. passive: passive
  32201. }
  32202. });
  32203. function createFnInvoker (fns, vm) {
  32204. function invoker () {
  32205. var arguments$1 = arguments;
  32206. var fns = invoker.fns;
  32207. if (Array.isArray(fns)) {
  32208. var cloned = fns.slice();
  32209. for (var i = 0; i < cloned.length; i++) {
  32210. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  32211. }
  32212. } else {
  32213. // return handler return value for single handlers
  32214. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  32215. }
  32216. }
  32217. invoker.fns = fns;
  32218. return invoker
  32219. }
  32220. function updateListeners (
  32221. on,
  32222. oldOn,
  32223. add,
  32224. remove$$1,
  32225. createOnceHandler,
  32226. vm
  32227. ) {
  32228. var name, def$$1, cur, old, event;
  32229. for (name in on) {
  32230. def$$1 = cur = on[name];
  32231. old = oldOn[name];
  32232. event = normalizeEvent(name);
  32233. if (isUndef(cur)) {
  32234. true && warn(
  32235. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  32236. vm
  32237. );
  32238. } else if (isUndef(old)) {
  32239. if (isUndef(cur.fns)) {
  32240. cur = on[name] = createFnInvoker(cur, vm);
  32241. }
  32242. if (isTrue(event.once)) {
  32243. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  32244. }
  32245. add(event.name, cur, event.capture, event.passive, event.params);
  32246. } else if (cur !== old) {
  32247. old.fns = cur;
  32248. on[name] = old;
  32249. }
  32250. }
  32251. for (name in oldOn) {
  32252. if (isUndef(on[name])) {
  32253. event = normalizeEvent(name);
  32254. remove$$1(event.name, oldOn[name], event.capture);
  32255. }
  32256. }
  32257. }
  32258. /* */
  32259. /* */
  32260. // fixed by xxxxxx (mp properties)
  32261. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  32262. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  32263. if (isUndef(propOptions)) {
  32264. return res
  32265. }
  32266. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  32267. var attrs = data.attrs;
  32268. var props = data.props;
  32269. if (isDef(attrs) || isDef(props)) {
  32270. for (var key in propOptions) {
  32271. var altKey = hyphenate(key);
  32272. var result = checkProp(res, props, key, altKey, true) ||
  32273. checkProp(res, attrs, key, altKey, false);
  32274. // externalClass
  32275. if (
  32276. result &&
  32277. res[key] &&
  32278. externalClasses.indexOf(altKey) !== -1 &&
  32279. context[camelize(res[key])]
  32280. ) {
  32281. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  32282. res[key] = context[camelize(res[key])];
  32283. }
  32284. }
  32285. }
  32286. return res
  32287. }
  32288. function extractPropsFromVNodeData (
  32289. data,
  32290. Ctor,
  32291. tag,
  32292. context// fixed by xxxxxx
  32293. ) {
  32294. // we are only extracting raw values here.
  32295. // validation and default values are handled in the child
  32296. // component itself.
  32297. var propOptions = Ctor.options.props;
  32298. if (isUndef(propOptions)) {
  32299. // fixed by xxxxxx
  32300. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  32301. }
  32302. var res = {};
  32303. var attrs = data.attrs;
  32304. var props = data.props;
  32305. if (isDef(attrs) || isDef(props)) {
  32306. for (var key in propOptions) {
  32307. var altKey = hyphenate(key);
  32308. if (true) {
  32309. var keyInLowerCase = key.toLowerCase();
  32310. if (
  32311. key !== keyInLowerCase &&
  32312. attrs && hasOwn(attrs, keyInLowerCase)
  32313. ) {
  32314. tip(
  32315. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  32316. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  32317. " \"" + key + "\". " +
  32318. "Note that HTML attributes are case-insensitive and camelCased " +
  32319. "props need to use their kebab-case equivalents when using in-DOM " +
  32320. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  32321. );
  32322. }
  32323. }
  32324. checkProp(res, props, key, altKey, true) ||
  32325. checkProp(res, attrs, key, altKey, false);
  32326. }
  32327. }
  32328. // fixed by xxxxxx
  32329. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  32330. }
  32331. function checkProp (
  32332. res,
  32333. hash,
  32334. key,
  32335. altKey,
  32336. preserve
  32337. ) {
  32338. if (isDef(hash)) {
  32339. if (hasOwn(hash, key)) {
  32340. res[key] = hash[key];
  32341. if (!preserve) {
  32342. delete hash[key];
  32343. }
  32344. return true
  32345. } else if (hasOwn(hash, altKey)) {
  32346. res[key] = hash[altKey];
  32347. if (!preserve) {
  32348. delete hash[altKey];
  32349. }
  32350. return true
  32351. }
  32352. }
  32353. return false
  32354. }
  32355. /* */
  32356. // The template compiler attempts to minimize the need for normalization by
  32357. // statically analyzing the template at compile time.
  32358. //
  32359. // For plain HTML markup, normalization can be completely skipped because the
  32360. // generated render function is guaranteed to return Array<VNode>. There are
  32361. // two cases where extra normalization is needed:
  32362. // 1. When the children contains components - because a functional component
  32363. // may return an Array instead of a single root. In this case, just a simple
  32364. // normalization is needed - if any child is an Array, we flatten the whole
  32365. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  32366. // because functional components already normalize their own children.
  32367. function simpleNormalizeChildren (children) {
  32368. for (var i = 0; i < children.length; i++) {
  32369. if (Array.isArray(children[i])) {
  32370. return Array.prototype.concat.apply([], children)
  32371. }
  32372. }
  32373. return children
  32374. }
  32375. // 2. When the children contains constructs that always generated nested Arrays,
  32376. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  32377. // with hand-written render functions / JSX. In such cases a full normalization
  32378. // is needed to cater to all possible types of children values.
  32379. function normalizeChildren (children) {
  32380. return isPrimitive(children)
  32381. ? [createTextVNode(children)]
  32382. : Array.isArray(children)
  32383. ? normalizeArrayChildren(children)
  32384. : undefined
  32385. }
  32386. function isTextNode (node) {
  32387. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  32388. }
  32389. function normalizeArrayChildren (children, nestedIndex) {
  32390. var res = [];
  32391. var i, c, lastIndex, last;
  32392. for (i = 0; i < children.length; i++) {
  32393. c = children[i];
  32394. if (isUndef(c) || typeof c === 'boolean') { continue }
  32395. lastIndex = res.length - 1;
  32396. last = res[lastIndex];
  32397. // nested
  32398. if (Array.isArray(c)) {
  32399. if (c.length > 0) {
  32400. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  32401. // merge adjacent text nodes
  32402. if (isTextNode(c[0]) && isTextNode(last)) {
  32403. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  32404. c.shift();
  32405. }
  32406. res.push.apply(res, c);
  32407. }
  32408. } else if (isPrimitive(c)) {
  32409. if (isTextNode(last)) {
  32410. // merge adjacent text nodes
  32411. // this is necessary for SSR hydration because text nodes are
  32412. // essentially merged when rendered to HTML strings
  32413. res[lastIndex] = createTextVNode(last.text + c);
  32414. } else if (c !== '') {
  32415. // convert primitive to vnode
  32416. res.push(createTextVNode(c));
  32417. }
  32418. } else {
  32419. if (isTextNode(c) && isTextNode(last)) {
  32420. // merge adjacent text nodes
  32421. res[lastIndex] = createTextVNode(last.text + c.text);
  32422. } else {
  32423. // default key for nested array children (likely generated by v-for)
  32424. if (isTrue(children._isVList) &&
  32425. isDef(c.tag) &&
  32426. isUndef(c.key) &&
  32427. isDef(nestedIndex)) {
  32428. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  32429. }
  32430. res.push(c);
  32431. }
  32432. }
  32433. }
  32434. return res
  32435. }
  32436. /* */
  32437. function initProvide (vm) {
  32438. var provide = vm.$options.provide;
  32439. if (provide) {
  32440. vm._provided = typeof provide === 'function'
  32441. ? provide.call(vm)
  32442. : provide;
  32443. }
  32444. }
  32445. function initInjections (vm) {
  32446. var result = resolveInject(vm.$options.inject, vm);
  32447. if (result) {
  32448. toggleObserving(false);
  32449. Object.keys(result).forEach(function (key) {
  32450. /* istanbul ignore else */
  32451. if (true) {
  32452. defineReactive$$1(vm, key, result[key], function () {
  32453. warn(
  32454. "Avoid mutating an injected value directly since the changes will be " +
  32455. "overwritten whenever the provided component re-renders. " +
  32456. "injection being mutated: \"" + key + "\"",
  32457. vm
  32458. );
  32459. });
  32460. } else {}
  32461. });
  32462. toggleObserving(true);
  32463. }
  32464. }
  32465. function resolveInject (inject, vm) {
  32466. if (inject) {
  32467. // inject is :any because flow is not smart enough to figure out cached
  32468. var result = Object.create(null);
  32469. var keys = hasSymbol
  32470. ? Reflect.ownKeys(inject)
  32471. : Object.keys(inject);
  32472. for (var i = 0; i < keys.length; i++) {
  32473. var key = keys[i];
  32474. // #6574 in case the inject object is observed...
  32475. if (key === '__ob__') { continue }
  32476. var provideKey = inject[key].from;
  32477. var source = vm;
  32478. while (source) {
  32479. if (source._provided && hasOwn(source._provided, provideKey)) {
  32480. result[key] = source._provided[provideKey];
  32481. break
  32482. }
  32483. source = source.$parent;
  32484. }
  32485. if (!source) {
  32486. if ('default' in inject[key]) {
  32487. var provideDefault = inject[key].default;
  32488. result[key] = typeof provideDefault === 'function'
  32489. ? provideDefault.call(vm)
  32490. : provideDefault;
  32491. } else if (true) {
  32492. warn(("Injection \"" + key + "\" not found"), vm);
  32493. }
  32494. }
  32495. }
  32496. return result
  32497. }
  32498. }
  32499. /* */
  32500. /**
  32501. * Runtime helper for resolving raw children VNodes into a slot object.
  32502. */
  32503. function resolveSlots (
  32504. children,
  32505. context
  32506. ) {
  32507. if (!children || !children.length) {
  32508. return {}
  32509. }
  32510. var slots = {};
  32511. for (var i = 0, l = children.length; i < l; i++) {
  32512. var child = children[i];
  32513. var data = child.data;
  32514. // remove slot attribute if the node is resolved as a Vue slot node
  32515. if (data && data.attrs && data.attrs.slot) {
  32516. delete data.attrs.slot;
  32517. }
  32518. // named slots should only be respected if the vnode was rendered in the
  32519. // same context.
  32520. if ((child.context === context || child.fnContext === context) &&
  32521. data && data.slot != null
  32522. ) {
  32523. var name = data.slot;
  32524. var slot = (slots[name] || (slots[name] = []));
  32525. if (child.tag === 'template') {
  32526. slot.push.apply(slot, child.children || []);
  32527. } else {
  32528. slot.push(child);
  32529. }
  32530. } else {
  32531. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  32532. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  32533. (slots['page'] || (slots['page'] = [])).push(child);
  32534. }else{
  32535. (slots.default || (slots.default = [])).push(child);
  32536. }
  32537. }
  32538. }
  32539. // ignore slots that contains only whitespace
  32540. for (var name$1 in slots) {
  32541. if (slots[name$1].every(isWhitespace)) {
  32542. delete slots[name$1];
  32543. }
  32544. }
  32545. return slots
  32546. }
  32547. function isWhitespace (node) {
  32548. return (node.isComment && !node.asyncFactory) || node.text === ' '
  32549. }
  32550. /* */
  32551. function normalizeScopedSlots (
  32552. slots,
  32553. normalSlots,
  32554. prevSlots
  32555. ) {
  32556. var res;
  32557. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  32558. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  32559. var key = slots && slots.$key;
  32560. if (!slots) {
  32561. res = {};
  32562. } else if (slots._normalized) {
  32563. // fast path 1: child component re-render only, parent did not change
  32564. return slots._normalized
  32565. } else if (
  32566. isStable &&
  32567. prevSlots &&
  32568. prevSlots !== emptyObject &&
  32569. key === prevSlots.$key &&
  32570. !hasNormalSlots &&
  32571. !prevSlots.$hasNormal
  32572. ) {
  32573. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  32574. // only need to normalize once
  32575. return prevSlots
  32576. } else {
  32577. res = {};
  32578. for (var key$1 in slots) {
  32579. if (slots[key$1] && key$1[0] !== '$') {
  32580. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  32581. }
  32582. }
  32583. }
  32584. // expose normal slots on scopedSlots
  32585. for (var key$2 in normalSlots) {
  32586. if (!(key$2 in res)) {
  32587. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  32588. }
  32589. }
  32590. // avoriaz seems to mock a non-extensible $scopedSlots object
  32591. // and when that is passed down this would cause an error
  32592. if (slots && Object.isExtensible(slots)) {
  32593. (slots)._normalized = res;
  32594. }
  32595. def(res, '$stable', isStable);
  32596. def(res, '$key', key);
  32597. def(res, '$hasNormal', hasNormalSlots);
  32598. return res
  32599. }
  32600. function normalizeScopedSlot(normalSlots, key, fn) {
  32601. var normalized = function () {
  32602. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  32603. res = res && typeof res === 'object' && !Array.isArray(res)
  32604. ? [res] // single vnode
  32605. : normalizeChildren(res);
  32606. return res && (
  32607. res.length === 0 ||
  32608. (res.length === 1 && res[0].isComment) // #9658
  32609. ) ? undefined
  32610. : res
  32611. };
  32612. // this is a slot using the new v-slot syntax without scope. although it is
  32613. // compiled as a scoped slot, render fn users would expect it to be present
  32614. // on this.$slots because the usage is semantically a normal slot.
  32615. if (fn.proxy) {
  32616. Object.defineProperty(normalSlots, key, {
  32617. get: normalized,
  32618. enumerable: true,
  32619. configurable: true
  32620. });
  32621. }
  32622. return normalized
  32623. }
  32624. function proxyNormalSlot(slots, key) {
  32625. return function () { return slots[key]; }
  32626. }
  32627. /* */
  32628. /**
  32629. * Runtime helper for rendering v-for lists.
  32630. */
  32631. function renderList (
  32632. val,
  32633. render
  32634. ) {
  32635. var ret, i, l, keys, key;
  32636. if (Array.isArray(val) || typeof val === 'string') {
  32637. ret = new Array(val.length);
  32638. for (i = 0, l = val.length; i < l; i++) {
  32639. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  32640. }
  32641. } else if (typeof val === 'number') {
  32642. ret = new Array(val);
  32643. for (i = 0; i < val; i++) {
  32644. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  32645. }
  32646. } else if (isObject(val)) {
  32647. if (hasSymbol && val[Symbol.iterator]) {
  32648. ret = [];
  32649. var iterator = val[Symbol.iterator]();
  32650. var result = iterator.next();
  32651. while (!result.done) {
  32652. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  32653. result = iterator.next();
  32654. }
  32655. } else {
  32656. keys = Object.keys(val);
  32657. ret = new Array(keys.length);
  32658. for (i = 0, l = keys.length; i < l; i++) {
  32659. key = keys[i];
  32660. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  32661. }
  32662. }
  32663. }
  32664. if (!isDef(ret)) {
  32665. ret = [];
  32666. }
  32667. (ret)._isVList = true;
  32668. return ret
  32669. }
  32670. /* */
  32671. /**
  32672. * Runtime helper for rendering <slot>
  32673. */
  32674. function renderSlot (
  32675. name,
  32676. fallback,
  32677. props,
  32678. bindObject
  32679. ) {
  32680. var scopedSlotFn = this.$scopedSlots[name];
  32681. var nodes;
  32682. if (scopedSlotFn) { // scoped slot
  32683. props = props || {};
  32684. if (bindObject) {
  32685. if ( true && !isObject(bindObject)) {
  32686. warn(
  32687. 'slot v-bind without argument expects an Object',
  32688. this
  32689. );
  32690. }
  32691. props = extend(extend({}, bindObject), props);
  32692. }
  32693. // fixed by xxxxxx app-plus scopedSlot
  32694. nodes = scopedSlotFn(props, this, props._i) || fallback;
  32695. } else {
  32696. nodes = this.$slots[name] || fallback;
  32697. }
  32698. var target = props && props.slot;
  32699. if (target) {
  32700. return this.$createElement('template', { slot: target }, nodes)
  32701. } else {
  32702. return nodes
  32703. }
  32704. }
  32705. /* */
  32706. /**
  32707. * Runtime helper for resolving filters
  32708. */
  32709. function resolveFilter (id) {
  32710. return resolveAsset(this.$options, 'filters', id, true) || identity
  32711. }
  32712. /* */
  32713. function isKeyNotMatch (expect, actual) {
  32714. if (Array.isArray(expect)) {
  32715. return expect.indexOf(actual) === -1
  32716. } else {
  32717. return expect !== actual
  32718. }
  32719. }
  32720. /**
  32721. * Runtime helper for checking keyCodes from config.
  32722. * exposed as Vue.prototype._k
  32723. * passing in eventKeyName as last argument separately for backwards compat
  32724. */
  32725. function checkKeyCodes (
  32726. eventKeyCode,
  32727. key,
  32728. builtInKeyCode,
  32729. eventKeyName,
  32730. builtInKeyName
  32731. ) {
  32732. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  32733. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  32734. return isKeyNotMatch(builtInKeyName, eventKeyName)
  32735. } else if (mappedKeyCode) {
  32736. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  32737. } else if (eventKeyName) {
  32738. return hyphenate(eventKeyName) !== key
  32739. }
  32740. }
  32741. /* */
  32742. /**
  32743. * Runtime helper for merging v-bind="object" into a VNode's data.
  32744. */
  32745. function bindObjectProps (
  32746. data,
  32747. tag,
  32748. value,
  32749. asProp,
  32750. isSync
  32751. ) {
  32752. if (value) {
  32753. if (!isObject(value)) {
  32754. true && warn(
  32755. 'v-bind without argument expects an Object or Array value',
  32756. this
  32757. );
  32758. } else {
  32759. if (Array.isArray(value)) {
  32760. value = toObject(value);
  32761. }
  32762. var hash;
  32763. var loop = function ( key ) {
  32764. if (
  32765. key === 'class' ||
  32766. key === 'style' ||
  32767. isReservedAttribute(key)
  32768. ) {
  32769. hash = data;
  32770. } else {
  32771. var type = data.attrs && data.attrs.type;
  32772. hash = asProp || config.mustUseProp(tag, type, key)
  32773. ? data.domProps || (data.domProps = {})
  32774. : data.attrs || (data.attrs = {});
  32775. }
  32776. var camelizedKey = camelize(key);
  32777. var hyphenatedKey = hyphenate(key);
  32778. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  32779. hash[key] = value[key];
  32780. if (isSync) {
  32781. var on = data.on || (data.on = {});
  32782. on[("update:" + key)] = function ($event) {
  32783. value[key] = $event;
  32784. };
  32785. }
  32786. }
  32787. };
  32788. for (var key in value) loop( key );
  32789. }
  32790. }
  32791. return data
  32792. }
  32793. /* */
  32794. /**
  32795. * Runtime helper for rendering static trees.
  32796. */
  32797. function renderStatic (
  32798. index,
  32799. isInFor
  32800. ) {
  32801. var cached = this._staticTrees || (this._staticTrees = []);
  32802. var tree = cached[index];
  32803. // if has already-rendered static tree and not inside v-for,
  32804. // we can reuse the same tree.
  32805. if (tree && !isInFor) {
  32806. return tree
  32807. }
  32808. // otherwise, render a fresh tree.
  32809. tree = cached[index] = this.$options.staticRenderFns[index].call(
  32810. this._renderProxy,
  32811. null,
  32812. this // for render fns generated for functional component templates
  32813. );
  32814. markStatic(tree, ("__static__" + index), false);
  32815. return tree
  32816. }
  32817. /**
  32818. * Runtime helper for v-once.
  32819. * Effectively it means marking the node as static with a unique key.
  32820. */
  32821. function markOnce (
  32822. tree,
  32823. index,
  32824. key
  32825. ) {
  32826. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  32827. return tree
  32828. }
  32829. function markStatic (
  32830. tree,
  32831. key,
  32832. isOnce
  32833. ) {
  32834. if (Array.isArray(tree)) {
  32835. for (var i = 0; i < tree.length; i++) {
  32836. if (tree[i] && typeof tree[i] !== 'string') {
  32837. markStaticNode(tree[i], (key + "_" + i), isOnce);
  32838. }
  32839. }
  32840. } else {
  32841. markStaticNode(tree, key, isOnce);
  32842. }
  32843. }
  32844. function markStaticNode (node, key, isOnce) {
  32845. node.isStatic = true;
  32846. node.key = key;
  32847. node.isOnce = isOnce;
  32848. }
  32849. /* */
  32850. function bindObjectListeners (data, value) {
  32851. if (value) {
  32852. if (!isPlainObject(value)) {
  32853. true && warn(
  32854. 'v-on without argument expects an Object value',
  32855. this
  32856. );
  32857. } else {
  32858. var on = data.on = data.on ? extend({}, data.on) : {};
  32859. for (var key in value) {
  32860. var existing = on[key];
  32861. var ours = value[key];
  32862. on[key] = existing ? [].concat(existing, ours) : ours;
  32863. }
  32864. }
  32865. }
  32866. return data
  32867. }
  32868. /* */
  32869. function resolveScopedSlots (
  32870. fns, // see flow/vnode
  32871. res,
  32872. // the following are added in 2.6
  32873. hasDynamicKeys,
  32874. contentHashKey
  32875. ) {
  32876. res = res || { $stable: !hasDynamicKeys };
  32877. for (var i = 0; i < fns.length; i++) {
  32878. var slot = fns[i];
  32879. if (Array.isArray(slot)) {
  32880. resolveScopedSlots(slot, res, hasDynamicKeys);
  32881. } else if (slot) {
  32882. // marker for reverse proxying v-slot without scope on this.$slots
  32883. if (slot.proxy) {
  32884. slot.fn.proxy = true;
  32885. }
  32886. res[slot.key] = slot.fn;
  32887. }
  32888. }
  32889. if (contentHashKey) {
  32890. (res).$key = contentHashKey;
  32891. }
  32892. return res
  32893. }
  32894. /* */
  32895. function bindDynamicKeys (baseObj, values) {
  32896. for (var i = 0; i < values.length; i += 2) {
  32897. var key = values[i];
  32898. if (typeof key === 'string' && key) {
  32899. baseObj[values[i]] = values[i + 1];
  32900. } else if ( true && key !== '' && key !== null) {
  32901. // null is a special value for explicitly removing a binding
  32902. warn(
  32903. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  32904. this
  32905. );
  32906. }
  32907. }
  32908. return baseObj
  32909. }
  32910. // helper to dynamically append modifier runtime markers to event names.
  32911. // ensure only append when value is already string, otherwise it will be cast
  32912. // to string and cause the type check to miss.
  32913. function prependModifier (value, symbol) {
  32914. return typeof value === 'string' ? symbol + value : value
  32915. }
  32916. /* */
  32917. function installRenderHelpers (target) {
  32918. target._o = markOnce;
  32919. target._n = toNumber;
  32920. target._s = toString;
  32921. target._l = renderList;
  32922. target._t = renderSlot;
  32923. target._q = looseEqual;
  32924. target._i = looseIndexOf;
  32925. target._m = renderStatic;
  32926. target._f = resolveFilter;
  32927. target._k = checkKeyCodes;
  32928. target._b = bindObjectProps;
  32929. target._v = createTextVNode;
  32930. target._e = createEmptyVNode;
  32931. target._u = resolveScopedSlots;
  32932. target._g = bindObjectListeners;
  32933. target._d = bindDynamicKeys;
  32934. target._p = prependModifier;
  32935. }
  32936. /* */
  32937. function FunctionalRenderContext (
  32938. data,
  32939. props,
  32940. children,
  32941. parent,
  32942. Ctor
  32943. ) {
  32944. var this$1 = this;
  32945. var options = Ctor.options;
  32946. // ensure the createElement function in functional components
  32947. // gets a unique context - this is necessary for correct named slot check
  32948. var contextVm;
  32949. if (hasOwn(parent, '_uid')) {
  32950. contextVm = Object.create(parent);
  32951. // $flow-disable-line
  32952. contextVm._original = parent;
  32953. } else {
  32954. // the context vm passed in is a functional context as well.
  32955. // in this case we want to make sure we are able to get a hold to the
  32956. // real context instance.
  32957. contextVm = parent;
  32958. // $flow-disable-line
  32959. parent = parent._original;
  32960. }
  32961. var isCompiled = isTrue(options._compiled);
  32962. var needNormalization = !isCompiled;
  32963. this.data = data;
  32964. this.props = props;
  32965. this.children = children;
  32966. this.parent = parent;
  32967. this.listeners = data.on || emptyObject;
  32968. this.injections = resolveInject(options.inject, parent);
  32969. this.slots = function () {
  32970. if (!this$1.$slots) {
  32971. normalizeScopedSlots(
  32972. data.scopedSlots,
  32973. this$1.$slots = resolveSlots(children, parent)
  32974. );
  32975. }
  32976. return this$1.$slots
  32977. };
  32978. Object.defineProperty(this, 'scopedSlots', ({
  32979. enumerable: true,
  32980. get: function get () {
  32981. return normalizeScopedSlots(data.scopedSlots, this.slots())
  32982. }
  32983. }));
  32984. // support for compiled functional template
  32985. if (isCompiled) {
  32986. // exposing $options for renderStatic()
  32987. this.$options = options;
  32988. // pre-resolve slots for renderSlot()
  32989. this.$slots = this.slots();
  32990. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  32991. }
  32992. if (options._scopeId) {
  32993. this._c = function (a, b, c, d) {
  32994. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  32995. if (vnode && !Array.isArray(vnode)) {
  32996. vnode.fnScopeId = options._scopeId;
  32997. vnode.fnContext = parent;
  32998. }
  32999. return vnode
  33000. };
  33001. } else {
  33002. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  33003. }
  33004. }
  33005. installRenderHelpers(FunctionalRenderContext.prototype);
  33006. function createFunctionalComponent (
  33007. Ctor,
  33008. propsData,
  33009. data,
  33010. contextVm,
  33011. children
  33012. ) {
  33013. var options = Ctor.options;
  33014. var props = {};
  33015. var propOptions = options.props;
  33016. if (isDef(propOptions)) {
  33017. for (var key in propOptions) {
  33018. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  33019. }
  33020. } else {
  33021. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  33022. if (isDef(data.props)) { mergeProps(props, data.props); }
  33023. }
  33024. var renderContext = new FunctionalRenderContext(
  33025. data,
  33026. props,
  33027. children,
  33028. contextVm,
  33029. Ctor
  33030. );
  33031. var vnode = options.render.call(null, renderContext._c, renderContext);
  33032. if (vnode instanceof VNode) {
  33033. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  33034. } else if (Array.isArray(vnode)) {
  33035. var vnodes = normalizeChildren(vnode) || [];
  33036. var res = new Array(vnodes.length);
  33037. for (var i = 0; i < vnodes.length; i++) {
  33038. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  33039. }
  33040. return res
  33041. }
  33042. }
  33043. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  33044. // #7817 clone node before setting fnContext, otherwise if the node is reused
  33045. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  33046. // that should not be matched to match.
  33047. var clone = cloneVNode(vnode);
  33048. clone.fnContext = contextVm;
  33049. clone.fnOptions = options;
  33050. if (true) {
  33051. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  33052. }
  33053. if (data.slot) {
  33054. (clone.data || (clone.data = {})).slot = data.slot;
  33055. }
  33056. return clone
  33057. }
  33058. function mergeProps (to, from) {
  33059. for (var key in from) {
  33060. to[camelize(key)] = from[key];
  33061. }
  33062. }
  33063. /* */
  33064. /* */
  33065. /* */
  33066. /* */
  33067. // inline hooks to be invoked on component VNodes during patch
  33068. var componentVNodeHooks = {
  33069. init: function init (vnode, hydrating) {
  33070. if (
  33071. vnode.componentInstance &&
  33072. !vnode.componentInstance._isDestroyed &&
  33073. vnode.data.keepAlive
  33074. ) {
  33075. // kept-alive components, treat as a patch
  33076. var mountedNode = vnode; // work around flow
  33077. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  33078. } else {
  33079. var child = vnode.componentInstance = createComponentInstanceForVnode(
  33080. vnode,
  33081. activeInstance
  33082. );
  33083. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  33084. }
  33085. },
  33086. prepatch: function prepatch (oldVnode, vnode) {
  33087. var options = vnode.componentOptions;
  33088. var child = vnode.componentInstance = oldVnode.componentInstance;
  33089. updateChildComponent(
  33090. child,
  33091. options.propsData, // updated props
  33092. options.listeners, // updated listeners
  33093. vnode, // new parent vnode
  33094. options.children // new children
  33095. );
  33096. },
  33097. insert: function insert (vnode) {
  33098. var context = vnode.context;
  33099. var componentInstance = vnode.componentInstance;
  33100. if (!componentInstance._isMounted) {
  33101. callHook(componentInstance, 'onServiceCreated');
  33102. callHook(componentInstance, 'onServiceAttached');
  33103. componentInstance._isMounted = true;
  33104. callHook(componentInstance, 'mounted');
  33105. }
  33106. if (vnode.data.keepAlive) {
  33107. if (context._isMounted) {
  33108. // vue-router#1212
  33109. // During updates, a kept-alive component's child components may
  33110. // change, so directly walking the tree here may call activated hooks
  33111. // on incorrect children. Instead we push them into a queue which will
  33112. // be processed after the whole patch process ended.
  33113. queueActivatedComponent(componentInstance);
  33114. } else {
  33115. activateChildComponent(componentInstance, true /* direct */);
  33116. }
  33117. }
  33118. },
  33119. destroy: function destroy (vnode) {
  33120. var componentInstance = vnode.componentInstance;
  33121. if (!componentInstance._isDestroyed) {
  33122. if (!vnode.data.keepAlive) {
  33123. componentInstance.$destroy();
  33124. } else {
  33125. deactivateChildComponent(componentInstance, true /* direct */);
  33126. }
  33127. }
  33128. }
  33129. };
  33130. var hooksToMerge = Object.keys(componentVNodeHooks);
  33131. function createComponent (
  33132. Ctor,
  33133. data,
  33134. context,
  33135. children,
  33136. tag
  33137. ) {
  33138. if (isUndef(Ctor)) {
  33139. return
  33140. }
  33141. var baseCtor = context.$options._base;
  33142. // plain options object: turn it into a constructor
  33143. if (isObject(Ctor)) {
  33144. Ctor = baseCtor.extend(Ctor);
  33145. }
  33146. // if at this stage it's not a constructor or an async component factory,
  33147. // reject.
  33148. if (typeof Ctor !== 'function') {
  33149. if (true) {
  33150. warn(("Invalid Component definition: " + (String(Ctor))), context);
  33151. }
  33152. return
  33153. }
  33154. // async component
  33155. var asyncFactory;
  33156. if (isUndef(Ctor.cid)) {
  33157. asyncFactory = Ctor;
  33158. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  33159. if (Ctor === undefined) {
  33160. // return a placeholder node for async component, which is rendered
  33161. // as a comment node but preserves all the raw information for the node.
  33162. // the information will be used for async server-rendering and hydration.
  33163. return createAsyncPlaceholder(
  33164. asyncFactory,
  33165. data,
  33166. context,
  33167. children,
  33168. tag
  33169. )
  33170. }
  33171. }
  33172. data = data || {};
  33173. // resolve constructor options in case global mixins are applied after
  33174. // component constructor creation
  33175. resolveConstructorOptions(Ctor);
  33176. // transform component v-model data into props & events
  33177. if (isDef(data.model)) {
  33178. transformModel(Ctor.options, data);
  33179. }
  33180. // extract props
  33181. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  33182. // functional component
  33183. if (isTrue(Ctor.options.functional)) {
  33184. return createFunctionalComponent(Ctor, propsData, data, context, children)
  33185. }
  33186. // extract listeners, since these needs to be treated as
  33187. // child component listeners instead of DOM listeners
  33188. var listeners = data.on;
  33189. // replace with listeners with .native modifier
  33190. // so it gets processed during parent component patch.
  33191. data.on = data.nativeOn;
  33192. if (isTrue(Ctor.options.abstract)) {
  33193. // abstract components do not keep anything
  33194. // other than props & listeners & slot
  33195. // work around flow
  33196. var slot = data.slot;
  33197. data = {};
  33198. if (slot) {
  33199. data.slot = slot;
  33200. }
  33201. }
  33202. // install component management hooks onto the placeholder node
  33203. installComponentHooks(data);
  33204. // return a placeholder vnode
  33205. var name = Ctor.options.name || tag;
  33206. var vnode = new VNode(
  33207. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  33208. data, undefined, undefined, undefined, context,
  33209. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  33210. asyncFactory
  33211. );
  33212. return vnode
  33213. }
  33214. function createComponentInstanceForVnode (
  33215. vnode, // we know it's MountedComponentVNode but flow doesn't
  33216. parent // activeInstance in lifecycle state
  33217. ) {
  33218. var options = {
  33219. _isComponent: true,
  33220. _parentVnode: vnode,
  33221. parent: parent
  33222. };
  33223. // check inline-template render functions
  33224. var inlineTemplate = vnode.data.inlineTemplate;
  33225. if (isDef(inlineTemplate)) {
  33226. options.render = inlineTemplate.render;
  33227. options.staticRenderFns = inlineTemplate.staticRenderFns;
  33228. }
  33229. return new vnode.componentOptions.Ctor(options)
  33230. }
  33231. function installComponentHooks (data) {
  33232. var hooks = data.hook || (data.hook = {});
  33233. for (var i = 0; i < hooksToMerge.length; i++) {
  33234. var key = hooksToMerge[i];
  33235. var existing = hooks[key];
  33236. var toMerge = componentVNodeHooks[key];
  33237. if (existing !== toMerge && !(existing && existing._merged)) {
  33238. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  33239. }
  33240. }
  33241. }
  33242. function mergeHook$1 (f1, f2) {
  33243. var merged = function (a, b) {
  33244. // flow complains about extra args which is why we use any
  33245. f1(a, b);
  33246. f2(a, b);
  33247. };
  33248. merged._merged = true;
  33249. return merged
  33250. }
  33251. // transform component v-model info (value and callback) into
  33252. // prop and event handler respectively.
  33253. function transformModel (options, data) {
  33254. var prop = (options.model && options.model.prop) || 'value';
  33255. var event = (options.model && options.model.event) || 'input'
  33256. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  33257. var on = data.on || (data.on = {});
  33258. var existing = on[event];
  33259. var callback = data.model.callback;
  33260. if (isDef(existing)) {
  33261. if (
  33262. Array.isArray(existing)
  33263. ? existing.indexOf(callback) === -1
  33264. : existing !== callback
  33265. ) {
  33266. on[event] = [callback].concat(existing);
  33267. }
  33268. } else {
  33269. on[event] = callback;
  33270. }
  33271. }
  33272. /* */
  33273. var SIMPLE_NORMALIZE = 1;
  33274. var ALWAYS_NORMALIZE = 2;
  33275. // wrapper function for providing a more flexible interface
  33276. // without getting yelled at by flow
  33277. function createElement (
  33278. context,
  33279. tag,
  33280. data,
  33281. children,
  33282. normalizationType,
  33283. alwaysNormalize
  33284. ) {
  33285. if (Array.isArray(data) || isPrimitive(data)) {
  33286. normalizationType = children;
  33287. children = data;
  33288. data = undefined;
  33289. }
  33290. if (isTrue(alwaysNormalize)) {
  33291. normalizationType = ALWAYS_NORMALIZE;
  33292. }
  33293. return _createElement(context, tag, data, children, normalizationType)
  33294. }
  33295. function _createElement (
  33296. context,
  33297. tag,
  33298. data,
  33299. children,
  33300. normalizationType
  33301. ) {
  33302. if (isDef(data) && isDef((data).__ob__)) {
  33303. true && warn(
  33304. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  33305. 'Always create fresh vnode data objects in each render!',
  33306. context
  33307. );
  33308. return createEmptyVNode()
  33309. }
  33310. // object syntax in v-bind
  33311. if (isDef(data) && isDef(data.is)) {
  33312. tag = data.is;
  33313. }
  33314. if (!tag) {
  33315. // in case of component :is set to falsy value
  33316. return createEmptyVNode()
  33317. }
  33318. // warn against non-primitive key
  33319. if ( true &&
  33320. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  33321. ) {
  33322. {
  33323. warn(
  33324. 'Avoid using non-primitive value as key, ' +
  33325. 'use string/number value instead.',
  33326. context
  33327. );
  33328. }
  33329. }
  33330. // support single function children as default scoped slot
  33331. if (Array.isArray(children) &&
  33332. typeof children[0] === 'function'
  33333. ) {
  33334. data = data || {};
  33335. data.scopedSlots = { default: children[0] };
  33336. children.length = 0;
  33337. }
  33338. if (normalizationType === ALWAYS_NORMALIZE) {
  33339. children = normalizeChildren(children);
  33340. } else if (normalizationType === SIMPLE_NORMALIZE) {
  33341. children = simpleNormalizeChildren(children);
  33342. }
  33343. var vnode, ns;
  33344. if (typeof tag === 'string') {
  33345. var Ctor;
  33346. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  33347. if (config.isReservedTag(tag)) {
  33348. // platform built-in elements
  33349. if ( true && isDef(data) && isDef(data.nativeOn)) {
  33350. warn(
  33351. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  33352. context
  33353. );
  33354. }
  33355. vnode = new VNode(
  33356. config.parsePlatformTagName(tag), data, children,
  33357. undefined, undefined, context
  33358. );
  33359. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  33360. // component
  33361. vnode = createComponent(Ctor, data, context, children, tag);
  33362. } else {
  33363. // unknown or unlisted namespaced elements
  33364. // check at runtime because it may get assigned a namespace when its
  33365. // parent normalizes children
  33366. vnode = new VNode(
  33367. tag, data, children,
  33368. undefined, undefined, context
  33369. );
  33370. }
  33371. } else {
  33372. // direct component options / constructor
  33373. vnode = createComponent(tag, data, context, children);
  33374. }
  33375. if (Array.isArray(vnode)) {
  33376. return vnode
  33377. } else if (isDef(vnode)) {
  33378. if (isDef(ns)) { applyNS(vnode, ns); }
  33379. if (isDef(data)) { registerDeepBindings(data); }
  33380. return vnode
  33381. } else {
  33382. return createEmptyVNode()
  33383. }
  33384. }
  33385. function applyNS (vnode, ns, force) {
  33386. vnode.ns = ns;
  33387. if (vnode.tag === 'foreignObject') {
  33388. // use default namespace inside foreignObject
  33389. ns = undefined;
  33390. force = true;
  33391. }
  33392. if (isDef(vnode.children)) {
  33393. for (var i = 0, l = vnode.children.length; i < l; i++) {
  33394. var child = vnode.children[i];
  33395. if (isDef(child.tag) && (
  33396. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  33397. applyNS(child, ns, force);
  33398. }
  33399. }
  33400. }
  33401. }
  33402. // ref #5318
  33403. // necessary to ensure parent re-render when deep bindings like :style and
  33404. // :class are used on slot nodes
  33405. function registerDeepBindings (data) {
  33406. if (isObject(data.style)) {
  33407. traverse(data.style);
  33408. }
  33409. if (isObject(data.class)) {
  33410. traverse(data.class);
  33411. }
  33412. }
  33413. /* */
  33414. function initRender (vm) {
  33415. vm._vnode = null; // the root of the child tree
  33416. vm._staticTrees = null; // v-once cached trees
  33417. var options = vm.$options;
  33418. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  33419. var renderContext = parentVnode && parentVnode.context;
  33420. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  33421. vm.$scopedSlots = emptyObject;
  33422. // bind the createElement fn to this instance
  33423. // so that we get proper render context inside it.
  33424. // args order: tag, data, children, normalizationType, alwaysNormalize
  33425. // internal version is used by render functions compiled from templates
  33426. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  33427. // normalization is always applied for the public version, used in
  33428. // user-written render functions.
  33429. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  33430. // $attrs & $listeners are exposed for easier HOC creation.
  33431. // they need to be reactive so that HOCs using them are always updated
  33432. var parentData = parentVnode && parentVnode.data;
  33433. /* istanbul ignore else */
  33434. if (true) {
  33435. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  33436. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  33437. }, true);
  33438. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  33439. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  33440. }, true);
  33441. } else {}
  33442. }
  33443. var currentRenderingInstance = null;
  33444. function renderMixin (Vue) {
  33445. // install runtime convenience helpers
  33446. installRenderHelpers(Vue.prototype);
  33447. Vue.prototype.$nextTick = function (fn) {
  33448. return nextTick(fn, this)
  33449. };
  33450. Vue.prototype._render = function () {
  33451. var vm = this;
  33452. var ref = vm.$options;
  33453. var render = ref.render;
  33454. var _parentVnode = ref._parentVnode;
  33455. if (_parentVnode) {
  33456. vm.$scopedSlots = normalizeScopedSlots(
  33457. _parentVnode.data.scopedSlots,
  33458. vm.$slots,
  33459. vm.$scopedSlots
  33460. );
  33461. }
  33462. // set parent vnode. this allows render functions to have access
  33463. // to the data on the placeholder node.
  33464. vm.$vnode = _parentVnode;
  33465. // render self
  33466. var vnode;
  33467. try {
  33468. // There's no need to maintain a stack because all render fns are called
  33469. // separately from one another. Nested component's render fns are called
  33470. // when parent component is patched.
  33471. currentRenderingInstance = vm;
  33472. vnode = render.call(vm._renderProxy, vm.$createElement);
  33473. } catch (e) {
  33474. handleError(e, vm, "render");
  33475. // return error render result,
  33476. // or previous vnode to prevent render error causing blank component
  33477. /* istanbul ignore else */
  33478. if ( true && vm.$options.renderError) {
  33479. try {
  33480. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  33481. } catch (e) {
  33482. handleError(e, vm, "renderError");
  33483. vnode = vm._vnode;
  33484. }
  33485. } else {
  33486. vnode = vm._vnode;
  33487. }
  33488. } finally {
  33489. currentRenderingInstance = null;
  33490. }
  33491. // if the returned array contains only a single node, allow it
  33492. if (Array.isArray(vnode) && vnode.length === 1) {
  33493. vnode = vnode[0];
  33494. }
  33495. // return empty vnode in case the render function errored out
  33496. if (!(vnode instanceof VNode)) {
  33497. if ( true && Array.isArray(vnode)) {
  33498. warn(
  33499. 'Multiple root nodes returned from render function. Render function ' +
  33500. 'should return a single root node.',
  33501. vm
  33502. );
  33503. }
  33504. vnode = createEmptyVNode();
  33505. }
  33506. // set parent
  33507. vnode.parent = _parentVnode;
  33508. return vnode
  33509. };
  33510. }
  33511. /* */
  33512. function ensureCtor (comp, base) {
  33513. if (
  33514. comp.__esModule ||
  33515. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  33516. ) {
  33517. comp = comp.default;
  33518. }
  33519. return isObject(comp)
  33520. ? base.extend(comp)
  33521. : comp
  33522. }
  33523. function createAsyncPlaceholder (
  33524. factory,
  33525. data,
  33526. context,
  33527. children,
  33528. tag
  33529. ) {
  33530. var node = createEmptyVNode();
  33531. node.asyncFactory = factory;
  33532. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  33533. return node
  33534. }
  33535. function resolveAsyncComponent (
  33536. factory,
  33537. baseCtor
  33538. ) {
  33539. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  33540. return factory.errorComp
  33541. }
  33542. if (isDef(factory.resolved)) {
  33543. return factory.resolved
  33544. }
  33545. var owner = currentRenderingInstance;
  33546. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  33547. // already pending
  33548. factory.owners.push(owner);
  33549. }
  33550. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  33551. return factory.loadingComp
  33552. }
  33553. if (owner && !isDef(factory.owners)) {
  33554. var owners = factory.owners = [owner];
  33555. var sync = true;
  33556. var timerLoading = null;
  33557. var timerTimeout = null
  33558. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  33559. var forceRender = function (renderCompleted) {
  33560. for (var i = 0, l = owners.length; i < l; i++) {
  33561. (owners[i]).$forceUpdate();
  33562. }
  33563. if (renderCompleted) {
  33564. owners.length = 0;
  33565. if (timerLoading !== null) {
  33566. clearTimeout(timerLoading);
  33567. timerLoading = null;
  33568. }
  33569. if (timerTimeout !== null) {
  33570. clearTimeout(timerTimeout);
  33571. timerTimeout = null;
  33572. }
  33573. }
  33574. };
  33575. var resolve = once(function (res) {
  33576. // cache resolved
  33577. factory.resolved = ensureCtor(res, baseCtor);
  33578. // invoke callbacks only if this is not a synchronous resolve
  33579. // (async resolves are shimmed as synchronous during SSR)
  33580. if (!sync) {
  33581. forceRender(true);
  33582. } else {
  33583. owners.length = 0;
  33584. }
  33585. });
  33586. var reject = once(function (reason) {
  33587. true && warn(
  33588. "Failed to resolve async component: " + (String(factory)) +
  33589. (reason ? ("\nReason: " + reason) : '')
  33590. );
  33591. if (isDef(factory.errorComp)) {
  33592. factory.error = true;
  33593. forceRender(true);
  33594. }
  33595. });
  33596. var res = factory(resolve, reject);
  33597. if (isObject(res)) {
  33598. if (isPromise(res)) {
  33599. // () => Promise
  33600. if (isUndef(factory.resolved)) {
  33601. res.then(resolve, reject);
  33602. }
  33603. } else if (isPromise(res.component)) {
  33604. res.component.then(resolve, reject);
  33605. if (isDef(res.error)) {
  33606. factory.errorComp = ensureCtor(res.error, baseCtor);
  33607. }
  33608. if (isDef(res.loading)) {
  33609. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  33610. if (res.delay === 0) {
  33611. factory.loading = true;
  33612. } else {
  33613. timerLoading = setTimeout(function () {
  33614. timerLoading = null;
  33615. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  33616. factory.loading = true;
  33617. forceRender(false);
  33618. }
  33619. }, res.delay || 200);
  33620. }
  33621. }
  33622. if (isDef(res.timeout)) {
  33623. timerTimeout = setTimeout(function () {
  33624. timerTimeout = null;
  33625. if (isUndef(factory.resolved)) {
  33626. reject(
  33627. true
  33628. ? ("timeout (" + (res.timeout) + "ms)")
  33629. : undefined
  33630. );
  33631. }
  33632. }, res.timeout);
  33633. }
  33634. }
  33635. }
  33636. sync = false;
  33637. // return in case resolved synchronously
  33638. return factory.loading
  33639. ? factory.loadingComp
  33640. : factory.resolved
  33641. }
  33642. }
  33643. /* */
  33644. function isAsyncPlaceholder (node) {
  33645. return node.isComment && node.asyncFactory
  33646. }
  33647. /* */
  33648. function getFirstComponentChild (children) {
  33649. if (Array.isArray(children)) {
  33650. for (var i = 0; i < children.length; i++) {
  33651. var c = children[i];
  33652. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  33653. return c
  33654. }
  33655. }
  33656. }
  33657. }
  33658. /* */
  33659. /* */
  33660. function initEvents (vm) {
  33661. vm._events = Object.create(null);
  33662. vm._hasHookEvent = false;
  33663. // init parent attached events
  33664. var listeners = vm.$options._parentListeners;
  33665. if (listeners) {
  33666. updateComponentListeners(vm, listeners);
  33667. }
  33668. }
  33669. var target;
  33670. function add (event, fn) {
  33671. target.$on(event, fn);
  33672. }
  33673. function remove$1 (event, fn) {
  33674. target.$off(event, fn);
  33675. }
  33676. function createOnceHandler (event, fn) {
  33677. var _target = target;
  33678. return function onceHandler () {
  33679. var res = fn.apply(null, arguments);
  33680. if (res !== null) {
  33681. _target.$off(event, onceHandler);
  33682. }
  33683. }
  33684. }
  33685. function updateComponentListeners (
  33686. vm,
  33687. listeners,
  33688. oldListeners
  33689. ) {
  33690. target = vm;
  33691. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  33692. target = undefined;
  33693. }
  33694. function eventsMixin (Vue) {
  33695. var hookRE = /^hook:/;
  33696. Vue.prototype.$on = function (event, fn) {
  33697. var vm = this;
  33698. if (Array.isArray(event)) {
  33699. for (var i = 0, l = event.length; i < l; i++) {
  33700. vm.$on(event[i], fn);
  33701. }
  33702. } else {
  33703. (vm._events[event] || (vm._events[event] = [])).push(fn);
  33704. // optimize hook:event cost by using a boolean flag marked at registration
  33705. // instead of a hash lookup
  33706. if (hookRE.test(event)) {
  33707. vm._hasHookEvent = true;
  33708. }
  33709. }
  33710. return vm
  33711. };
  33712. Vue.prototype.$once = function (event, fn) {
  33713. var vm = this;
  33714. function on () {
  33715. vm.$off(event, on);
  33716. fn.apply(vm, arguments);
  33717. }
  33718. on.fn = fn;
  33719. vm.$on(event, on);
  33720. return vm
  33721. };
  33722. Vue.prototype.$off = function (event, fn) {
  33723. var vm = this;
  33724. // all
  33725. if (!arguments.length) {
  33726. vm._events = Object.create(null);
  33727. return vm
  33728. }
  33729. // array of events
  33730. if (Array.isArray(event)) {
  33731. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  33732. vm.$off(event[i$1], fn);
  33733. }
  33734. return vm
  33735. }
  33736. // specific event
  33737. var cbs = vm._events[event];
  33738. if (!cbs) {
  33739. return vm
  33740. }
  33741. if (!fn) {
  33742. vm._events[event] = null;
  33743. return vm
  33744. }
  33745. // specific handler
  33746. var cb;
  33747. var i = cbs.length;
  33748. while (i--) {
  33749. cb = cbs[i];
  33750. if (cb === fn || cb.fn === fn) {
  33751. cbs.splice(i, 1);
  33752. break
  33753. }
  33754. }
  33755. return vm
  33756. };
  33757. Vue.prototype.$emit = function (event) {
  33758. var vm = this;
  33759. if (true) {
  33760. var lowerCaseEvent = event.toLowerCase();
  33761. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  33762. tip(
  33763. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  33764. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  33765. "Note that HTML attributes are case-insensitive and you cannot use " +
  33766. "v-on to listen to camelCase events when using in-DOM templates. " +
  33767. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  33768. );
  33769. }
  33770. }
  33771. var cbs = vm._events[event];
  33772. if (cbs) {
  33773. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  33774. var args = toArray(arguments, 1);
  33775. var info = "event handler for \"" + event + "\"";
  33776. for (var i = 0, l = cbs.length; i < l; i++) {
  33777. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  33778. }
  33779. }
  33780. return vm
  33781. };
  33782. }
  33783. /* */
  33784. var activeInstance = null;
  33785. var isUpdatingChildComponent = false;
  33786. function setActiveInstance(vm) {
  33787. var prevActiveInstance = activeInstance;
  33788. activeInstance = vm;
  33789. return function () {
  33790. activeInstance = prevActiveInstance;
  33791. }
  33792. }
  33793. function initLifecycle (vm) {
  33794. var options = vm.$options;
  33795. // locate first non-abstract parent
  33796. var parent = options.parent;
  33797. if (parent && !options.abstract) {
  33798. while (parent.$options.abstract && parent.$parent) {
  33799. parent = parent.$parent;
  33800. }
  33801. parent.$children.push(vm);
  33802. }
  33803. vm.$parent = parent;
  33804. vm.$root = parent ? parent.$root : vm;
  33805. vm.$children = [];
  33806. vm.$refs = {};
  33807. vm._watcher = null;
  33808. vm._inactive = null;
  33809. vm._directInactive = false;
  33810. vm._isMounted = false;
  33811. vm._isDestroyed = false;
  33812. vm._isBeingDestroyed = false;
  33813. }
  33814. function lifecycleMixin (Vue) {
  33815. Vue.prototype._update = function (vnode, hydrating) {
  33816. var vm = this;
  33817. var prevEl = vm.$el;
  33818. var prevVnode = vm._vnode;
  33819. var restoreActiveInstance = setActiveInstance(vm);
  33820. vm._vnode = vnode;
  33821. // Vue.prototype.__patch__ is injected in entry points
  33822. // based on the rendering backend used.
  33823. if (!prevVnode) {
  33824. // initial render
  33825. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  33826. } else {
  33827. // updates
  33828. vm.$el = vm.__patch__(prevVnode, vnode);
  33829. }
  33830. restoreActiveInstance();
  33831. // update __vue__ reference
  33832. if (prevEl) {
  33833. prevEl.__vue__ = null;
  33834. }
  33835. if (vm.$el) {
  33836. vm.$el.__vue__ = vm;
  33837. }
  33838. // if parent is an HOC, update its $el as well
  33839. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  33840. vm.$parent.$el = vm.$el;
  33841. }
  33842. // updated hook is called by the scheduler to ensure that children are
  33843. // updated in a parent's updated hook.
  33844. };
  33845. Vue.prototype.$forceUpdate = function () {
  33846. var vm = this;
  33847. if (vm._watcher) {
  33848. vm._watcher.update();
  33849. }
  33850. };
  33851. Vue.prototype.$destroy = function () {
  33852. var vm = this;
  33853. if (vm._isBeingDestroyed) {
  33854. return
  33855. }
  33856. callHook(vm, 'beforeDestroy');
  33857. vm._isBeingDestroyed = true;
  33858. // remove self from parent
  33859. var parent = vm.$parent;
  33860. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  33861. remove(parent.$children, vm);
  33862. }
  33863. // teardown watchers
  33864. if (vm._watcher) {
  33865. vm._watcher.teardown();
  33866. }
  33867. var i = vm._watchers.length;
  33868. while (i--) {
  33869. vm._watchers[i].teardown();
  33870. }
  33871. // remove reference from data ob
  33872. // frozen object may not have observer.
  33873. if (vm._data.__ob__) {
  33874. vm._data.__ob__.vmCount--;
  33875. }
  33876. // call the last hook...
  33877. vm._isDestroyed = true;
  33878. // invoke destroy hooks on current rendered tree
  33879. vm.__patch__(vm._vnode, null);
  33880. // fire destroyed hook
  33881. callHook(vm, 'destroyed');
  33882. // turn off all instance listeners.
  33883. vm.$off();
  33884. // remove __vue__ reference
  33885. if (vm.$el) {
  33886. vm.$el.__vue__ = null;
  33887. }
  33888. // release circular reference (#6759)
  33889. if (vm.$vnode) {
  33890. vm.$vnode.parent = null;
  33891. }
  33892. };
  33893. }
  33894. function updateChildComponent (
  33895. vm,
  33896. propsData,
  33897. listeners,
  33898. parentVnode,
  33899. renderChildren
  33900. ) {
  33901. if (true) {
  33902. isUpdatingChildComponent = true;
  33903. }
  33904. // determine whether component has slot children
  33905. // we need to do this before overwriting $options._renderChildren.
  33906. // check if there are dynamic scopedSlots (hand-written or compiled but with
  33907. // dynamic slot names). Static scoped slots compiled from template has the
  33908. // "$stable" marker.
  33909. var newScopedSlots = parentVnode.data.scopedSlots;
  33910. var oldScopedSlots = vm.$scopedSlots;
  33911. var hasDynamicScopedSlot = !!(
  33912. (newScopedSlots && !newScopedSlots.$stable) ||
  33913. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  33914. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  33915. );
  33916. // Any static slot children from the parent may have changed during parent's
  33917. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  33918. // update is necessary to ensure correctness.
  33919. var needsForceUpdate = !!(
  33920. renderChildren || // has new static slots
  33921. vm.$options._renderChildren || // has old static slots
  33922. hasDynamicScopedSlot
  33923. );
  33924. vm.$options._parentVnode = parentVnode;
  33925. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  33926. if (vm._vnode) { // update child tree's parent
  33927. vm._vnode.parent = parentVnode;
  33928. }
  33929. vm.$options._renderChildren = renderChildren;
  33930. // update $attrs and $listeners hash
  33931. // these are also reactive so they may trigger child update if the child
  33932. // used them during render
  33933. vm.$attrs = parentVnode.data.attrs || emptyObject;
  33934. vm.$listeners = listeners || emptyObject;
  33935. // update props
  33936. if (propsData && vm.$options.props) {
  33937. toggleObserving(false);
  33938. var props = vm._props;
  33939. var propKeys = vm.$options._propKeys || [];
  33940. for (var i = 0; i < propKeys.length; i++) {
  33941. var key = propKeys[i];
  33942. var propOptions = vm.$options.props; // wtf flow?
  33943. props[key] = validateProp(key, propOptions, propsData, vm);
  33944. }
  33945. toggleObserving(true);
  33946. // keep a copy of raw propsData
  33947. vm.$options.propsData = propsData;
  33948. }
  33949. // fixed by xxxxxx update properties(mp runtime)
  33950. vm._$updateProperties && vm._$updateProperties(vm);
  33951. // update listeners
  33952. listeners = listeners || emptyObject;
  33953. var oldListeners = vm.$options._parentListeners;
  33954. vm.$options._parentListeners = listeners;
  33955. updateComponentListeners(vm, listeners, oldListeners);
  33956. // resolve slots + force update if has children
  33957. if (needsForceUpdate) {
  33958. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  33959. vm.$forceUpdate();
  33960. }
  33961. if (true) {
  33962. isUpdatingChildComponent = false;
  33963. }
  33964. }
  33965. function isInInactiveTree (vm) {
  33966. while (vm && (vm = vm.$parent)) {
  33967. if (vm._inactive) { return true }
  33968. }
  33969. return false
  33970. }
  33971. function activateChildComponent (vm, direct) {
  33972. if (direct) {
  33973. vm._directInactive = false;
  33974. if (isInInactiveTree(vm)) {
  33975. return
  33976. }
  33977. } else if (vm._directInactive) {
  33978. return
  33979. }
  33980. if (vm._inactive || vm._inactive === null) {
  33981. vm._inactive = false;
  33982. for (var i = 0; i < vm.$children.length; i++) {
  33983. activateChildComponent(vm.$children[i]);
  33984. }
  33985. callHook(vm, 'activated');
  33986. }
  33987. }
  33988. function deactivateChildComponent (vm, direct) {
  33989. if (direct) {
  33990. vm._directInactive = true;
  33991. if (isInInactiveTree(vm)) {
  33992. return
  33993. }
  33994. }
  33995. if (!vm._inactive) {
  33996. vm._inactive = true;
  33997. for (var i = 0; i < vm.$children.length; i++) {
  33998. deactivateChildComponent(vm.$children[i]);
  33999. }
  34000. callHook(vm, 'deactivated');
  34001. }
  34002. }
  34003. function callHook (vm, hook) {
  34004. // #7573 disable dep collection when invoking lifecycle hooks
  34005. pushTarget();
  34006. var handlers = vm.$options[hook];
  34007. var info = hook + " hook";
  34008. if (handlers) {
  34009. for (var i = 0, j = handlers.length; i < j; i++) {
  34010. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  34011. }
  34012. }
  34013. if (vm._hasHookEvent) {
  34014. vm.$emit('hook:' + hook);
  34015. }
  34016. popTarget();
  34017. }
  34018. /* */
  34019. var MAX_UPDATE_COUNT = 100;
  34020. var queue = [];
  34021. var activatedChildren = [];
  34022. var has = {};
  34023. var circular = {};
  34024. var waiting = false;
  34025. var flushing = false;
  34026. var index = 0;
  34027. /**
  34028. * Reset the scheduler's state.
  34029. */
  34030. function resetSchedulerState () {
  34031. index = queue.length = activatedChildren.length = 0;
  34032. has = {};
  34033. if (true) {
  34034. circular = {};
  34035. }
  34036. waiting = flushing = false;
  34037. }
  34038. // Async edge case #6566 requires saving the timestamp when event listeners are
  34039. // attached. However, calling performance.now() has a perf overhead especially
  34040. // if the page has thousands of event listeners. Instead, we take a timestamp
  34041. // every time the scheduler flushes and use that for all event listeners
  34042. // attached during that flush.
  34043. var currentFlushTimestamp = 0;
  34044. // Async edge case fix requires storing an event listener's attach timestamp.
  34045. var getNow = Date.now;
  34046. // Determine what event timestamp the browser is using. Annoyingly, the
  34047. // timestamp can either be hi-res (relative to page load) or low-res
  34048. // (relative to UNIX epoch), so in order to compare time we have to use the
  34049. // same timestamp type when saving the flush timestamp.
  34050. // All IE versions use low-res event timestamps, and have problematic clock
  34051. // implementations (#9632)
  34052. if (inBrowser && !isIE) {
  34053. var performance = window.performance;
  34054. if (
  34055. performance &&
  34056. typeof performance.now === 'function' &&
  34057. getNow() > document.createEvent('Event').timeStamp
  34058. ) {
  34059. // if the event timestamp, although evaluated AFTER the Date.now(), is
  34060. // smaller than it, it means the event is using a hi-res timestamp,
  34061. // and we need to use the hi-res version for event listener timestamps as
  34062. // well.
  34063. getNow = function () { return performance.now(); };
  34064. }
  34065. }
  34066. /**
  34067. * Flush both queues and run the watchers.
  34068. */
  34069. function flushSchedulerQueue () {
  34070. currentFlushTimestamp = getNow();
  34071. flushing = true;
  34072. var watcher, id;
  34073. // Sort queue before flush.
  34074. // This ensures that:
  34075. // 1. Components are updated from parent to child. (because parent is always
  34076. // created before the child)
  34077. // 2. A component's user watchers are run before its render watcher (because
  34078. // user watchers are created before the render watcher)
  34079. // 3. If a component is destroyed during a parent component's watcher run,
  34080. // its watchers can be skipped.
  34081. queue.sort(function (a, b) { return a.id - b.id; });
  34082. // do not cache length because more watchers might be pushed
  34083. // as we run existing watchers
  34084. for (index = 0; index < queue.length; index++) {
  34085. watcher = queue[index];
  34086. if (watcher.before) {
  34087. watcher.before();
  34088. }
  34089. id = watcher.id;
  34090. has[id] = null;
  34091. watcher.run();
  34092. // in dev build, check and stop circular updates.
  34093. if ( true && has[id] != null) {
  34094. circular[id] = (circular[id] || 0) + 1;
  34095. if (circular[id] > MAX_UPDATE_COUNT) {
  34096. warn(
  34097. 'You may have an infinite update loop ' + (
  34098. watcher.user
  34099. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  34100. : "in a component render function."
  34101. ),
  34102. watcher.vm
  34103. );
  34104. break
  34105. }
  34106. }
  34107. }
  34108. // keep copies of post queues before resetting state
  34109. var activatedQueue = activatedChildren.slice();
  34110. var updatedQueue = queue.slice();
  34111. resetSchedulerState();
  34112. // call component updated and activated hooks
  34113. callActivatedHooks(activatedQueue);
  34114. callUpdatedHooks(updatedQueue);
  34115. // devtool hook
  34116. /* istanbul ignore if */
  34117. if (devtools && config.devtools) {
  34118. devtools.emit('flush');
  34119. }
  34120. }
  34121. function callUpdatedHooks (queue) {
  34122. var i = queue.length;
  34123. while (i--) {
  34124. var watcher = queue[i];
  34125. var vm = watcher.vm;
  34126. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  34127. callHook(vm, 'updated');
  34128. }
  34129. }
  34130. }
  34131. /**
  34132. * Queue a kept-alive component that was activated during patch.
  34133. * The queue will be processed after the entire tree has been patched.
  34134. */
  34135. function queueActivatedComponent (vm) {
  34136. // setting _inactive to false here so that a render function can
  34137. // rely on checking whether it's in an inactive tree (e.g. router-view)
  34138. vm._inactive = false;
  34139. activatedChildren.push(vm);
  34140. }
  34141. function callActivatedHooks (queue) {
  34142. for (var i = 0; i < queue.length; i++) {
  34143. queue[i]._inactive = true;
  34144. activateChildComponent(queue[i], true /* true */);
  34145. }
  34146. }
  34147. /**
  34148. * Push a watcher into the watcher queue.
  34149. * Jobs with duplicate IDs will be skipped unless it's
  34150. * pushed when the queue is being flushed.
  34151. */
  34152. function queueWatcher (watcher) {
  34153. var id = watcher.id;
  34154. if (has[id] == null) {
  34155. has[id] = true;
  34156. if (!flushing) {
  34157. queue.push(watcher);
  34158. } else {
  34159. // if already flushing, splice the watcher based on its id
  34160. // if already past its id, it will be run next immediately.
  34161. var i = queue.length - 1;
  34162. while (i > index && queue[i].id > watcher.id) {
  34163. i--;
  34164. }
  34165. queue.splice(i + 1, 0, watcher);
  34166. }
  34167. // queue the flush
  34168. if (!waiting) {
  34169. waiting = true;
  34170. if ( true && !config.async) {
  34171. flushSchedulerQueue();
  34172. return
  34173. }
  34174. nextTick(flushSchedulerQueue);
  34175. }
  34176. }
  34177. }
  34178. /* */
  34179. var uid$2 = 0;
  34180. /**
  34181. * A watcher parses an expression, collects dependencies,
  34182. * and fires callback when the expression value changes.
  34183. * This is used for both the $watch() api and directives.
  34184. */
  34185. var Watcher = function Watcher (
  34186. vm,
  34187. expOrFn,
  34188. cb,
  34189. options,
  34190. isRenderWatcher
  34191. ) {
  34192. this.vm = vm;
  34193. if (isRenderWatcher) {
  34194. vm._watcher = this;
  34195. }
  34196. vm._watchers.push(this);
  34197. // options
  34198. if (options) {
  34199. this.deep = !!options.deep;
  34200. this.user = !!options.user;
  34201. this.lazy = !!options.lazy;
  34202. this.sync = !!options.sync;
  34203. this.before = options.before;
  34204. } else {
  34205. this.deep = this.user = this.lazy = this.sync = false;
  34206. }
  34207. this.cb = cb;
  34208. this.id = ++uid$2; // uid for batching
  34209. this.active = true;
  34210. this.dirty = this.lazy; // for lazy watchers
  34211. this.deps = [];
  34212. this.newDeps = [];
  34213. this.depIds = new _Set();
  34214. this.newDepIds = new _Set();
  34215. this.expression = true
  34216. ? expOrFn.toString()
  34217. : undefined;
  34218. // parse expression for getter
  34219. if (typeof expOrFn === 'function') {
  34220. this.getter = expOrFn;
  34221. } else {
  34222. this.getter = parsePath(expOrFn);
  34223. if (!this.getter) {
  34224. this.getter = noop;
  34225. true && warn(
  34226. "Failed watching path: \"" + expOrFn + "\" " +
  34227. 'Watcher only accepts simple dot-delimited paths. ' +
  34228. 'For full control, use a function instead.',
  34229. vm
  34230. );
  34231. }
  34232. }
  34233. this.value = this.lazy
  34234. ? undefined
  34235. : this.get();
  34236. };
  34237. /**
  34238. * Evaluate the getter, and re-collect dependencies.
  34239. */
  34240. Watcher.prototype.get = function get () {
  34241. pushTarget(this);
  34242. var value;
  34243. var vm = this.vm;
  34244. try {
  34245. value = this.getter.call(vm, vm);
  34246. } catch (e) {
  34247. if (this.user) {
  34248. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  34249. } else {
  34250. throw e
  34251. }
  34252. } finally {
  34253. // "touch" every property so they are all tracked as
  34254. // dependencies for deep watching
  34255. if (this.deep) {
  34256. traverse(value);
  34257. }
  34258. popTarget();
  34259. this.cleanupDeps();
  34260. }
  34261. return value
  34262. };
  34263. /**
  34264. * Add a dependency to this directive.
  34265. */
  34266. Watcher.prototype.addDep = function addDep (dep) {
  34267. var id = dep.id;
  34268. if (!this.newDepIds.has(id)) {
  34269. this.newDepIds.add(id);
  34270. this.newDeps.push(dep);
  34271. if (!this.depIds.has(id)) {
  34272. dep.addSub(this);
  34273. }
  34274. }
  34275. };
  34276. /**
  34277. * Clean up for dependency collection.
  34278. */
  34279. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  34280. var i = this.deps.length;
  34281. while (i--) {
  34282. var dep = this.deps[i];
  34283. if (!this.newDepIds.has(dep.id)) {
  34284. dep.removeSub(this);
  34285. }
  34286. }
  34287. var tmp = this.depIds;
  34288. this.depIds = this.newDepIds;
  34289. this.newDepIds = tmp;
  34290. this.newDepIds.clear();
  34291. tmp = this.deps;
  34292. this.deps = this.newDeps;
  34293. this.newDeps = tmp;
  34294. this.newDeps.length = 0;
  34295. };
  34296. /**
  34297. * Subscriber interface.
  34298. * Will be called when a dependency changes.
  34299. */
  34300. Watcher.prototype.update = function update () {
  34301. /* istanbul ignore else */
  34302. if (this.lazy) {
  34303. this.dirty = true;
  34304. } else if (this.sync) {
  34305. this.run();
  34306. } else {
  34307. queueWatcher(this);
  34308. }
  34309. };
  34310. /**
  34311. * Scheduler job interface.
  34312. * Will be called by the scheduler.
  34313. */
  34314. Watcher.prototype.run = function run () {
  34315. if (this.active) {
  34316. var value = this.get();
  34317. if (
  34318. value !== this.value ||
  34319. // Deep watchers and watchers on Object/Arrays should fire even
  34320. // when the value is the same, because the value may
  34321. // have mutated.
  34322. isObject(value) ||
  34323. this.deep
  34324. ) {
  34325. // set new value
  34326. var oldValue = this.value;
  34327. this.value = value;
  34328. if (this.user) {
  34329. try {
  34330. this.cb.call(this.vm, value, oldValue);
  34331. } catch (e) {
  34332. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  34333. }
  34334. } else {
  34335. this.cb.call(this.vm, value, oldValue);
  34336. }
  34337. }
  34338. }
  34339. };
  34340. /**
  34341. * Evaluate the value of the watcher.
  34342. * This only gets called for lazy watchers.
  34343. */
  34344. Watcher.prototype.evaluate = function evaluate () {
  34345. this.value = this.get();
  34346. this.dirty = false;
  34347. };
  34348. /**
  34349. * Depend on all deps collected by this watcher.
  34350. */
  34351. Watcher.prototype.depend = function depend () {
  34352. var i = this.deps.length;
  34353. while (i--) {
  34354. this.deps[i].depend();
  34355. }
  34356. };
  34357. /**
  34358. * Remove self from all dependencies' subscriber list.
  34359. */
  34360. Watcher.prototype.teardown = function teardown () {
  34361. if (this.active) {
  34362. // remove self from vm's watcher list
  34363. // this is a somewhat expensive operation so we skip it
  34364. // if the vm is being destroyed.
  34365. if (!this.vm._isBeingDestroyed) {
  34366. remove(this.vm._watchers, this);
  34367. }
  34368. var i = this.deps.length;
  34369. while (i--) {
  34370. this.deps[i].removeSub(this);
  34371. }
  34372. this.active = false;
  34373. }
  34374. };
  34375. /* */
  34376. var sharedPropertyDefinition = {
  34377. enumerable: true,
  34378. configurable: true,
  34379. get: noop,
  34380. set: noop
  34381. };
  34382. function proxy (target, sourceKey, key) {
  34383. sharedPropertyDefinition.get = function proxyGetter () {
  34384. return this[sourceKey][key]
  34385. };
  34386. sharedPropertyDefinition.set = function proxySetter (val) {
  34387. this[sourceKey][key] = val;
  34388. };
  34389. Object.defineProperty(target, key, sharedPropertyDefinition);
  34390. }
  34391. function initState (vm) {
  34392. vm._watchers = [];
  34393. var opts = vm.$options;
  34394. if (opts.props) { initProps(vm, opts.props); }
  34395. if (opts.methods) { initMethods(vm, opts.methods); }
  34396. if (opts.data) {
  34397. initData(vm);
  34398. } else {
  34399. observe(vm._data = {}, true /* asRootData */);
  34400. }
  34401. if (opts.computed) { initComputed(vm, opts.computed); }
  34402. if (opts.watch && opts.watch !== nativeWatch) {
  34403. initWatch(vm, opts.watch);
  34404. }
  34405. }
  34406. function initProps (vm, propsOptions) {
  34407. var propsData = vm.$options.propsData || {};
  34408. var props = vm._props = {};
  34409. // cache prop keys so that future props updates can iterate using Array
  34410. // instead of dynamic object key enumeration.
  34411. var keys = vm.$options._propKeys = [];
  34412. var isRoot = !vm.$parent;
  34413. // root instance props should be converted
  34414. if (!isRoot) {
  34415. toggleObserving(false);
  34416. }
  34417. var loop = function ( key ) {
  34418. keys.push(key);
  34419. var value = validateProp(key, propsOptions, propsData, vm);
  34420. /* istanbul ignore else */
  34421. if (true) {
  34422. var hyphenatedKey = hyphenate(key);
  34423. if (isReservedAttribute(hyphenatedKey) ||
  34424. config.isReservedAttr(hyphenatedKey)) {
  34425. warn(
  34426. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  34427. vm
  34428. );
  34429. }
  34430. defineReactive$$1(props, key, value, function () {
  34431. if (!isRoot && !isUpdatingChildComponent) {
  34432. {
  34433. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  34434. return
  34435. }
  34436. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  34437. if(
  34438. key === 'value' &&
  34439. Array.isArray(vm.$options.behaviors) &&
  34440. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  34441. ){
  34442. return
  34443. }
  34444. if(vm._getFormData){
  34445. return
  34446. }
  34447. var $parent = vm.$parent;
  34448. while($parent){
  34449. if($parent.__next_tick_pending){
  34450. return
  34451. }
  34452. $parent = $parent.$parent;
  34453. }
  34454. }
  34455. warn(
  34456. "Avoid mutating a prop directly since the value will be " +
  34457. "overwritten whenever the parent component re-renders. " +
  34458. "Instead, use a data or computed property based on the prop's " +
  34459. "value. Prop being mutated: \"" + key + "\"",
  34460. vm
  34461. );
  34462. }
  34463. });
  34464. } else {}
  34465. // static props are already proxied on the component's prototype
  34466. // during Vue.extend(). We only need to proxy props defined at
  34467. // instantiation here.
  34468. if (!(key in vm)) {
  34469. proxy(vm, "_props", key);
  34470. }
  34471. };
  34472. for (var key in propsOptions) loop( key );
  34473. toggleObserving(true);
  34474. }
  34475. function initData (vm) {
  34476. var data = vm.$options.data;
  34477. data = vm._data = typeof data === 'function'
  34478. ? getData(data, vm)
  34479. : data || {};
  34480. if (!isPlainObject(data)) {
  34481. data = {};
  34482. true && warn(
  34483. 'data functions should return an object:\n' +
  34484. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  34485. vm
  34486. );
  34487. }
  34488. // proxy data on instance
  34489. var keys = Object.keys(data);
  34490. var props = vm.$options.props;
  34491. var methods = vm.$options.methods;
  34492. var i = keys.length;
  34493. while (i--) {
  34494. var key = keys[i];
  34495. if (true) {
  34496. if (methods && hasOwn(methods, key)) {
  34497. warn(
  34498. ("Method \"" + key + "\" has already been defined as a data property."),
  34499. vm
  34500. );
  34501. }
  34502. }
  34503. if (props && hasOwn(props, key)) {
  34504. true && warn(
  34505. "The data property \"" + key + "\" is already declared as a prop. " +
  34506. "Use prop default value instead.",
  34507. vm
  34508. );
  34509. } else if (!isReserved(key)) {
  34510. proxy(vm, "_data", key);
  34511. }
  34512. }
  34513. // observe data
  34514. observe(data, true /* asRootData */);
  34515. }
  34516. function getData (data, vm) {
  34517. // #7573 disable dep collection when invoking data getters
  34518. pushTarget();
  34519. try {
  34520. return data.call(vm, vm)
  34521. } catch (e) {
  34522. handleError(e, vm, "data()");
  34523. return {}
  34524. } finally {
  34525. popTarget();
  34526. }
  34527. }
  34528. var computedWatcherOptions = { lazy: true };
  34529. function initComputed (vm, computed) {
  34530. // $flow-disable-line
  34531. var watchers = vm._computedWatchers = Object.create(null);
  34532. // computed properties are just getters during SSR
  34533. var isSSR = isServerRendering();
  34534. for (var key in computed) {
  34535. var userDef = computed[key];
  34536. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  34537. if ( true && getter == null) {
  34538. warn(
  34539. ("Getter is missing for computed property \"" + key + "\"."),
  34540. vm
  34541. );
  34542. }
  34543. if (!isSSR) {
  34544. // create internal watcher for the computed property.
  34545. watchers[key] = new Watcher(
  34546. vm,
  34547. getter || noop,
  34548. noop,
  34549. computedWatcherOptions
  34550. );
  34551. }
  34552. // component-defined computed properties are already defined on the
  34553. // component prototype. We only need to define computed properties defined
  34554. // at instantiation here.
  34555. if (!(key in vm)) {
  34556. defineComputed(vm, key, userDef);
  34557. } else if (true) {
  34558. if (key in vm.$data) {
  34559. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  34560. } else if (vm.$options.props && key in vm.$options.props) {
  34561. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  34562. }
  34563. }
  34564. }
  34565. }
  34566. function defineComputed (
  34567. target,
  34568. key,
  34569. userDef
  34570. ) {
  34571. var shouldCache = !isServerRendering();
  34572. if (typeof userDef === 'function') {
  34573. sharedPropertyDefinition.get = shouldCache
  34574. ? createComputedGetter(key)
  34575. : createGetterInvoker(userDef);
  34576. sharedPropertyDefinition.set = noop;
  34577. } else {
  34578. sharedPropertyDefinition.get = userDef.get
  34579. ? shouldCache && userDef.cache !== false
  34580. ? createComputedGetter(key)
  34581. : createGetterInvoker(userDef.get)
  34582. : noop;
  34583. sharedPropertyDefinition.set = userDef.set || noop;
  34584. }
  34585. if ( true &&
  34586. sharedPropertyDefinition.set === noop) {
  34587. sharedPropertyDefinition.set = function () {
  34588. warn(
  34589. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  34590. this
  34591. );
  34592. };
  34593. }
  34594. Object.defineProperty(target, key, sharedPropertyDefinition);
  34595. }
  34596. function createComputedGetter (key) {
  34597. return function computedGetter () {
  34598. var watcher = this._computedWatchers && this._computedWatchers[key];
  34599. if (watcher) {
  34600. if (watcher.dirty) {
  34601. watcher.evaluate();
  34602. }
  34603. if (Dep.SharedObject.target) {// fixed by xxxxxx
  34604. watcher.depend();
  34605. }
  34606. return watcher.value
  34607. }
  34608. }
  34609. }
  34610. function createGetterInvoker(fn) {
  34611. return function computedGetter () {
  34612. return fn.call(this, this)
  34613. }
  34614. }
  34615. function initMethods (vm, methods) {
  34616. var props = vm.$options.props;
  34617. for (var key in methods) {
  34618. if (true) {
  34619. if (typeof methods[key] !== 'function') {
  34620. warn(
  34621. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  34622. "Did you reference the function correctly?",
  34623. vm
  34624. );
  34625. }
  34626. if (props && hasOwn(props, key)) {
  34627. warn(
  34628. ("Method \"" + key + "\" has already been defined as a prop."),
  34629. vm
  34630. );
  34631. }
  34632. if ((key in vm) && isReserved(key)) {
  34633. warn(
  34634. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  34635. "Avoid defining component methods that start with _ or $."
  34636. );
  34637. }
  34638. }
  34639. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  34640. }
  34641. }
  34642. function initWatch (vm, watch) {
  34643. for (var key in watch) {
  34644. var handler = watch[key];
  34645. if (Array.isArray(handler)) {
  34646. for (var i = 0; i < handler.length; i++) {
  34647. createWatcher(vm, key, handler[i]);
  34648. }
  34649. } else {
  34650. createWatcher(vm, key, handler);
  34651. }
  34652. }
  34653. }
  34654. function createWatcher (
  34655. vm,
  34656. expOrFn,
  34657. handler,
  34658. options
  34659. ) {
  34660. if (isPlainObject(handler)) {
  34661. options = handler;
  34662. handler = handler.handler;
  34663. }
  34664. if (typeof handler === 'string') {
  34665. handler = vm[handler];
  34666. }
  34667. return vm.$watch(expOrFn, handler, options)
  34668. }
  34669. function stateMixin (Vue) {
  34670. // flow somehow has problems with directly declared definition object
  34671. // when using Object.defineProperty, so we have to procedurally build up
  34672. // the object here.
  34673. var dataDef = {};
  34674. dataDef.get = function () { return this._data };
  34675. var propsDef = {};
  34676. propsDef.get = function () { return this._props };
  34677. if (true) {
  34678. dataDef.set = function () {
  34679. warn(
  34680. 'Avoid replacing instance root $data. ' +
  34681. 'Use nested data properties instead.',
  34682. this
  34683. );
  34684. };
  34685. propsDef.set = function () {
  34686. warn("$props is readonly.", this);
  34687. };
  34688. }
  34689. Object.defineProperty(Vue.prototype, '$data', dataDef);
  34690. Object.defineProperty(Vue.prototype, '$props', propsDef);
  34691. Vue.prototype.$set = set;
  34692. Vue.prototype.$delete = del;
  34693. Vue.prototype.$watch = function (
  34694. expOrFn,
  34695. cb,
  34696. options
  34697. ) {
  34698. var vm = this;
  34699. if (isPlainObject(cb)) {
  34700. return createWatcher(vm, expOrFn, cb, options)
  34701. }
  34702. options = options || {};
  34703. options.user = true;
  34704. var watcher = new Watcher(vm, expOrFn, cb, options);
  34705. if (options.immediate) {
  34706. try {
  34707. cb.call(vm, watcher.value);
  34708. } catch (error) {
  34709. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  34710. }
  34711. }
  34712. return function unwatchFn () {
  34713. watcher.teardown();
  34714. }
  34715. };
  34716. }
  34717. /* */
  34718. var uid$3 = 0;
  34719. function initMixin (Vue) {
  34720. Vue.prototype._init = function (options) {
  34721. var vm = this;
  34722. // a uid
  34723. vm._uid = uid$3++;
  34724. var startTag, endTag;
  34725. /* istanbul ignore if */
  34726. if ( true && config.performance && mark) {
  34727. startTag = "vue-perf-start:" + (vm._uid);
  34728. endTag = "vue-perf-end:" + (vm._uid);
  34729. mark(startTag);
  34730. }
  34731. // a flag to avoid this being observed
  34732. vm._isVue = true;
  34733. // merge options
  34734. if (options && options._isComponent) {
  34735. // optimize internal component instantiation
  34736. // since dynamic options merging is pretty slow, and none of the
  34737. // internal component options needs special treatment.
  34738. initInternalComponent(vm, options);
  34739. } else {
  34740. vm.$options = mergeOptions(
  34741. resolveConstructorOptions(vm.constructor),
  34742. options || {},
  34743. vm
  34744. );
  34745. }
  34746. /* istanbul ignore else */
  34747. if (true) {
  34748. initProxy(vm);
  34749. } else {}
  34750. // expose real self
  34751. vm._self = vm;
  34752. initLifecycle(vm);
  34753. initEvents(vm);
  34754. initRender(vm);
  34755. callHook(vm, 'beforeCreate');
  34756. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  34757. initState(vm);
  34758. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  34759. !vm._$fallback && callHook(vm, 'created');
  34760. /* istanbul ignore if */
  34761. if ( true && config.performance && mark) {
  34762. vm._name = formatComponentName(vm, false);
  34763. mark(endTag);
  34764. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  34765. }
  34766. if (vm.$options.el) {
  34767. vm.$mount(vm.$options.el);
  34768. }
  34769. };
  34770. }
  34771. function initInternalComponent (vm, options) {
  34772. var opts = vm.$options = Object.create(vm.constructor.options);
  34773. // doing this because it's faster than dynamic enumeration.
  34774. var parentVnode = options._parentVnode;
  34775. opts.parent = options.parent;
  34776. opts._parentVnode = parentVnode;
  34777. var vnodeComponentOptions = parentVnode.componentOptions;
  34778. opts.propsData = vnodeComponentOptions.propsData;
  34779. opts._parentListeners = vnodeComponentOptions.listeners;
  34780. opts._renderChildren = vnodeComponentOptions.children;
  34781. opts._componentTag = vnodeComponentOptions.tag;
  34782. if (options.render) {
  34783. opts.render = options.render;
  34784. opts.staticRenderFns = options.staticRenderFns;
  34785. }
  34786. }
  34787. function resolveConstructorOptions (Ctor) {
  34788. var options = Ctor.options;
  34789. if (Ctor.super) {
  34790. var superOptions = resolveConstructorOptions(Ctor.super);
  34791. var cachedSuperOptions = Ctor.superOptions;
  34792. if (superOptions !== cachedSuperOptions) {
  34793. // super option changed,
  34794. // need to resolve new options.
  34795. Ctor.superOptions = superOptions;
  34796. // check if there are any late-modified/attached options (#4976)
  34797. var modifiedOptions = resolveModifiedOptions(Ctor);
  34798. // update base extend options
  34799. if (modifiedOptions) {
  34800. extend(Ctor.extendOptions, modifiedOptions);
  34801. }
  34802. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  34803. if (options.name) {
  34804. options.components[options.name] = Ctor;
  34805. }
  34806. }
  34807. }
  34808. return options
  34809. }
  34810. function resolveModifiedOptions (Ctor) {
  34811. var modified;
  34812. var latest = Ctor.options;
  34813. var sealed = Ctor.sealedOptions;
  34814. for (var key in latest) {
  34815. if (latest[key] !== sealed[key]) {
  34816. if (!modified) { modified = {}; }
  34817. modified[key] = latest[key];
  34818. }
  34819. }
  34820. return modified
  34821. }
  34822. function Vue (options) {
  34823. if ( true &&
  34824. !(this instanceof Vue)
  34825. ) {
  34826. warn('Vue is a constructor and should be called with the `new` keyword');
  34827. }
  34828. this._init(options);
  34829. }
  34830. initMixin(Vue);
  34831. stateMixin(Vue);
  34832. eventsMixin(Vue);
  34833. lifecycleMixin(Vue);
  34834. renderMixin(Vue);
  34835. /* */
  34836. function initUse (Vue) {
  34837. Vue.use = function (plugin) {
  34838. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  34839. if (installedPlugins.indexOf(plugin) > -1) {
  34840. return this
  34841. }
  34842. // additional parameters
  34843. var args = toArray(arguments, 1);
  34844. args.unshift(this);
  34845. if (typeof plugin.install === 'function') {
  34846. plugin.install.apply(plugin, args);
  34847. } else if (typeof plugin === 'function') {
  34848. plugin.apply(null, args);
  34849. }
  34850. installedPlugins.push(plugin);
  34851. return this
  34852. };
  34853. }
  34854. /* */
  34855. function initMixin$1 (Vue) {
  34856. Vue.mixin = function (mixin) {
  34857. this.options = mergeOptions(this.options, mixin);
  34858. return this
  34859. };
  34860. }
  34861. /* */
  34862. function initExtend (Vue) {
  34863. /**
  34864. * Each instance constructor, including Vue, has a unique
  34865. * cid. This enables us to create wrapped "child
  34866. * constructors" for prototypal inheritance and cache them.
  34867. */
  34868. Vue.cid = 0;
  34869. var cid = 1;
  34870. /**
  34871. * Class inheritance
  34872. */
  34873. Vue.extend = function (extendOptions) {
  34874. extendOptions = extendOptions || {};
  34875. var Super = this;
  34876. var SuperId = Super.cid;
  34877. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  34878. if (cachedCtors[SuperId]) {
  34879. return cachedCtors[SuperId]
  34880. }
  34881. var name = extendOptions.name || Super.options.name;
  34882. if ( true && name) {
  34883. validateComponentName(name);
  34884. }
  34885. var Sub = function VueComponent (options) {
  34886. this._init(options);
  34887. };
  34888. Sub.prototype = Object.create(Super.prototype);
  34889. Sub.prototype.constructor = Sub;
  34890. Sub.cid = cid++;
  34891. Sub.options = mergeOptions(
  34892. Super.options,
  34893. extendOptions
  34894. );
  34895. Sub['super'] = Super;
  34896. // For props and computed properties, we define the proxy getters on
  34897. // the Vue instances at extension time, on the extended prototype. This
  34898. // avoids Object.defineProperty calls for each instance created.
  34899. if (Sub.options.props) {
  34900. initProps$1(Sub);
  34901. }
  34902. if (Sub.options.computed) {
  34903. initComputed$1(Sub);
  34904. }
  34905. // allow further extension/mixin/plugin usage
  34906. Sub.extend = Super.extend;
  34907. Sub.mixin = Super.mixin;
  34908. Sub.use = Super.use;
  34909. // create asset registers, so extended classes
  34910. // can have their private assets too.
  34911. ASSET_TYPES.forEach(function (type) {
  34912. Sub[type] = Super[type];
  34913. });
  34914. // enable recursive self-lookup
  34915. if (name) {
  34916. Sub.options.components[name] = Sub;
  34917. }
  34918. // keep a reference to the super options at extension time.
  34919. // later at instantiation we can check if Super's options have
  34920. // been updated.
  34921. Sub.superOptions = Super.options;
  34922. Sub.extendOptions = extendOptions;
  34923. Sub.sealedOptions = extend({}, Sub.options);
  34924. // cache constructor
  34925. cachedCtors[SuperId] = Sub;
  34926. return Sub
  34927. };
  34928. }
  34929. function initProps$1 (Comp) {
  34930. var props = Comp.options.props;
  34931. for (var key in props) {
  34932. proxy(Comp.prototype, "_props", key);
  34933. }
  34934. }
  34935. function initComputed$1 (Comp) {
  34936. var computed = Comp.options.computed;
  34937. for (var key in computed) {
  34938. defineComputed(Comp.prototype, key, computed[key]);
  34939. }
  34940. }
  34941. /* */
  34942. function initAssetRegisters (Vue) {
  34943. /**
  34944. * Create asset registration methods.
  34945. */
  34946. ASSET_TYPES.forEach(function (type) {
  34947. Vue[type] = function (
  34948. id,
  34949. definition
  34950. ) {
  34951. if (!definition) {
  34952. return this.options[type + 's'][id]
  34953. } else {
  34954. /* istanbul ignore if */
  34955. if ( true && type === 'component') {
  34956. validateComponentName(id);
  34957. }
  34958. if (type === 'component' && isPlainObject(definition)) {
  34959. definition.name = definition.name || id;
  34960. definition = this.options._base.extend(definition);
  34961. }
  34962. if (type === 'directive' && typeof definition === 'function') {
  34963. definition = { bind: definition, update: definition };
  34964. }
  34965. this.options[type + 's'][id] = definition;
  34966. return definition
  34967. }
  34968. };
  34969. });
  34970. }
  34971. /* */
  34972. function getComponentName (opts) {
  34973. return opts && (opts.Ctor.options.name || opts.tag)
  34974. }
  34975. function matches (pattern, name) {
  34976. if (Array.isArray(pattern)) {
  34977. return pattern.indexOf(name) > -1
  34978. } else if (typeof pattern === 'string') {
  34979. return pattern.split(',').indexOf(name) > -1
  34980. } else if (isRegExp(pattern)) {
  34981. return pattern.test(name)
  34982. }
  34983. /* istanbul ignore next */
  34984. return false
  34985. }
  34986. function pruneCache (keepAliveInstance, filter) {
  34987. var cache = keepAliveInstance.cache;
  34988. var keys = keepAliveInstance.keys;
  34989. var _vnode = keepAliveInstance._vnode;
  34990. for (var key in cache) {
  34991. var cachedNode = cache[key];
  34992. if (cachedNode) {
  34993. var name = getComponentName(cachedNode.componentOptions);
  34994. if (name && !filter(name)) {
  34995. pruneCacheEntry(cache, key, keys, _vnode);
  34996. }
  34997. }
  34998. }
  34999. }
  35000. function pruneCacheEntry (
  35001. cache,
  35002. key,
  35003. keys,
  35004. current
  35005. ) {
  35006. var cached$$1 = cache[key];
  35007. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  35008. cached$$1.componentInstance.$destroy();
  35009. }
  35010. cache[key] = null;
  35011. remove(keys, key);
  35012. }
  35013. var patternTypes = [String, RegExp, Array];
  35014. var KeepAlive = {
  35015. name: 'keep-alive',
  35016. abstract: true,
  35017. props: {
  35018. include: patternTypes,
  35019. exclude: patternTypes,
  35020. max: [String, Number]
  35021. },
  35022. created: function created () {
  35023. this.cache = Object.create(null);
  35024. this.keys = [];
  35025. },
  35026. destroyed: function destroyed () {
  35027. for (var key in this.cache) {
  35028. pruneCacheEntry(this.cache, key, this.keys);
  35029. }
  35030. },
  35031. mounted: function mounted () {
  35032. var this$1 = this;
  35033. this.$watch('include', function (val) {
  35034. pruneCache(this$1, function (name) { return matches(val, name); });
  35035. });
  35036. this.$watch('exclude', function (val) {
  35037. pruneCache(this$1, function (name) { return !matches(val, name); });
  35038. });
  35039. },
  35040. render: function render () {
  35041. var slot = this.$slots.default;
  35042. var vnode = getFirstComponentChild(slot);
  35043. var componentOptions = vnode && vnode.componentOptions;
  35044. if (componentOptions) {
  35045. // check pattern
  35046. var name = getComponentName(componentOptions);
  35047. var ref = this;
  35048. var include = ref.include;
  35049. var exclude = ref.exclude;
  35050. if (
  35051. // not included
  35052. (include && (!name || !matches(include, name))) ||
  35053. // excluded
  35054. (exclude && name && matches(exclude, name))
  35055. ) {
  35056. return vnode
  35057. }
  35058. var ref$1 = this;
  35059. var cache = ref$1.cache;
  35060. var keys = ref$1.keys;
  35061. var key = vnode.key == null
  35062. // same constructor may get registered as different local components
  35063. // so cid alone is not enough (#3269)
  35064. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  35065. : vnode.key;
  35066. if (cache[key]) {
  35067. vnode.componentInstance = cache[key].componentInstance;
  35068. // make current key freshest
  35069. remove(keys, key);
  35070. keys.push(key);
  35071. } else {
  35072. cache[key] = vnode;
  35073. keys.push(key);
  35074. // prune oldest entry
  35075. if (this.max && keys.length > parseInt(this.max)) {
  35076. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  35077. }
  35078. }
  35079. vnode.data.keepAlive = true;
  35080. }
  35081. return vnode || (slot && slot[0])
  35082. }
  35083. };
  35084. var builtInComponents = {
  35085. KeepAlive: KeepAlive
  35086. };
  35087. /* */
  35088. function initGlobalAPI (Vue) {
  35089. // config
  35090. var configDef = {};
  35091. configDef.get = function () { return config; };
  35092. if (true) {
  35093. configDef.set = function () {
  35094. warn(
  35095. 'Do not replace the Vue.config object, set individual fields instead.'
  35096. );
  35097. };
  35098. }
  35099. Object.defineProperty(Vue, 'config', configDef);
  35100. // exposed util methods.
  35101. // NOTE: these are not considered part of the public API - avoid relying on
  35102. // them unless you are aware of the risk.
  35103. Vue.util = {
  35104. warn: warn,
  35105. extend: extend,
  35106. mergeOptions: mergeOptions,
  35107. defineReactive: defineReactive$$1
  35108. };
  35109. Vue.set = set;
  35110. Vue.delete = del;
  35111. Vue.nextTick = nextTick;
  35112. // 2.6 explicit observable API
  35113. Vue.observable = function (obj) {
  35114. observe(obj);
  35115. return obj
  35116. };
  35117. Vue.options = Object.create(null);
  35118. ASSET_TYPES.forEach(function (type) {
  35119. Vue.options[type + 's'] = Object.create(null);
  35120. });
  35121. // this is used to identify the "base" constructor to extend all plain-object
  35122. // components with in Weex's multi-instance scenarios.
  35123. Vue.options._base = Vue;
  35124. extend(Vue.options.components, builtInComponents);
  35125. initUse(Vue);
  35126. initMixin$1(Vue);
  35127. initExtend(Vue);
  35128. initAssetRegisters(Vue);
  35129. }
  35130. initGlobalAPI(Vue);
  35131. Object.defineProperty(Vue.prototype, '$isServer', {
  35132. get: isServerRendering
  35133. });
  35134. Object.defineProperty(Vue.prototype, '$ssrContext', {
  35135. get: function get () {
  35136. /* istanbul ignore next */
  35137. return this.$vnode && this.$vnode.ssrContext
  35138. }
  35139. });
  35140. // expose FunctionalRenderContext for ssr runtime helper installation
  35141. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  35142. value: FunctionalRenderContext
  35143. });
  35144. Vue.version = '2.6.11';
  35145. /**
  35146. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  35147. */
  35148. var ARRAYTYPE = '[object Array]';
  35149. var OBJECTTYPE = '[object Object]';
  35150. var NULLTYPE = '[object Null]';
  35151. var UNDEFINEDTYPE = '[object Undefined]';
  35152. // const FUNCTIONTYPE = '[object Function]'
  35153. function diff(current, pre) {
  35154. var result = {};
  35155. syncKeys(current, pre);
  35156. _diff(current, pre, '', result);
  35157. return result
  35158. }
  35159. function syncKeys(current, pre) {
  35160. if (current === pre) { return }
  35161. var rootCurrentType = type(current);
  35162. var rootPreType = type(pre);
  35163. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  35164. if(Object.keys(current).length >= Object.keys(pre).length){
  35165. for (var key in pre) {
  35166. var currentValue = current[key];
  35167. if (currentValue === undefined) {
  35168. current[key] = null;
  35169. } else {
  35170. syncKeys(currentValue, pre[key]);
  35171. }
  35172. }
  35173. }
  35174. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  35175. if (current.length >= pre.length) {
  35176. pre.forEach(function (item, index) {
  35177. syncKeys(current[index], item);
  35178. });
  35179. }
  35180. }
  35181. }
  35182. function nullOrUndefined(currentType, preType) {
  35183. if(
  35184. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  35185. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  35186. ) {
  35187. return false
  35188. }
  35189. return true
  35190. }
  35191. function _diff(current, pre, path, result) {
  35192. if (current === pre) { return }
  35193. var rootCurrentType = type(current);
  35194. var rootPreType = type(pre);
  35195. if (rootCurrentType == OBJECTTYPE) {
  35196. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  35197. setResult(result, path, current);
  35198. } else {
  35199. var loop = function ( key ) {
  35200. var currentValue = current[key];
  35201. var preValue = pre[key];
  35202. var currentType = type(currentValue);
  35203. var preType = type(preValue);
  35204. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  35205. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  35206. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  35207. }
  35208. } else if (currentType == ARRAYTYPE) {
  35209. if (preType != ARRAYTYPE) {
  35210. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  35211. } else {
  35212. if (currentValue.length < preValue.length) {
  35213. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  35214. } else {
  35215. currentValue.forEach(function (item, index) {
  35216. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  35217. });
  35218. }
  35219. }
  35220. } else if (currentType == OBJECTTYPE) {
  35221. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  35222. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  35223. } else {
  35224. for (var subKey in currentValue) {
  35225. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  35226. }
  35227. }
  35228. }
  35229. };
  35230. for (var key in current) loop( key );
  35231. }
  35232. } else if (rootCurrentType == ARRAYTYPE) {
  35233. if (rootPreType != ARRAYTYPE) {
  35234. setResult(result, path, current);
  35235. } else {
  35236. if (current.length < pre.length) {
  35237. setResult(result, path, current);
  35238. } else {
  35239. current.forEach(function (item, index) {
  35240. _diff(item, pre[index], path + '[' + index + ']', result);
  35241. });
  35242. }
  35243. }
  35244. } else {
  35245. setResult(result, path, current);
  35246. }
  35247. }
  35248. function setResult(result, k, v) {
  35249. // if (type(v) != FUNCTIONTYPE) {
  35250. result[k] = v;
  35251. // }
  35252. }
  35253. function type(obj) {
  35254. return Object.prototype.toString.call(obj)
  35255. }
  35256. /* */
  35257. function flushCallbacks$1(vm) {
  35258. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  35259. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"云飞智控","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  35260. var mpInstance = vm.$scope;
  35261. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  35262. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  35263. }
  35264. var copies = vm.__next_tick_callbacks.slice(0);
  35265. vm.__next_tick_callbacks.length = 0;
  35266. for (var i = 0; i < copies.length; i++) {
  35267. copies[i]();
  35268. }
  35269. }
  35270. }
  35271. function hasRenderWatcher(vm) {
  35272. return queue.find(function (watcher) { return vm._watcher === watcher; })
  35273. }
  35274. function nextTick$1(vm, cb) {
  35275. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  35276. //2.nextTick 之前存在 render watcher
  35277. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  35278. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"云飞智控","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  35279. var mpInstance = vm.$scope;
  35280. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  35281. ']:nextVueTick');
  35282. }
  35283. return nextTick(cb, vm)
  35284. }else{
  35285. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"云飞智控","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  35286. var mpInstance$1 = vm.$scope;
  35287. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  35288. ']:nextMPTick');
  35289. }
  35290. }
  35291. var _resolve;
  35292. if (!vm.__next_tick_callbacks) {
  35293. vm.__next_tick_callbacks = [];
  35294. }
  35295. vm.__next_tick_callbacks.push(function () {
  35296. if (cb) {
  35297. try {
  35298. cb.call(vm);
  35299. } catch (e) {
  35300. handleError(e, vm, 'nextTick');
  35301. }
  35302. } else if (_resolve) {
  35303. _resolve(vm);
  35304. }
  35305. });
  35306. // $flow-disable-line
  35307. if (!cb && typeof Promise !== 'undefined') {
  35308. return new Promise(function (resolve) {
  35309. _resolve = resolve;
  35310. })
  35311. }
  35312. }
  35313. /* */
  35314. function clearInstance(key, value) {
  35315. // 简易去除 Vue 和小程序组件实例
  35316. if (value) {
  35317. if (value._isVue || value.__v_isMPComponent) {
  35318. return {}
  35319. }
  35320. }
  35321. return value
  35322. }
  35323. function cloneWithData(vm) {
  35324. // 确保当前 vm 所有数据被同步
  35325. var ret = Object.create(null);
  35326. var dataKeys = [].concat(
  35327. Object.keys(vm._data || {}),
  35328. Object.keys(vm._computedWatchers || {}));
  35329. dataKeys.reduce(function(ret, key) {
  35330. ret[key] = vm[key];
  35331. return ret
  35332. }, ret);
  35333. // vue-composition-api
  35334. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  35335. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  35336. if (rawBindings) {
  35337. Object.keys(rawBindings).forEach(function (key) {
  35338. ret[key] = vm[key];
  35339. });
  35340. }
  35341. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  35342. Object.assign(ret, vm.$mp.data || {});
  35343. if (
  35344. Array.isArray(vm.$options.behaviors) &&
  35345. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  35346. ) { //form-field
  35347. ret['name'] = vm.name;
  35348. ret['value'] = vm.value;
  35349. }
  35350. return JSON.parse(JSON.stringify(ret, clearInstance))
  35351. }
  35352. var patch = function(oldVnode, vnode) {
  35353. var this$1 = this;
  35354. if (vnode === null) { //destroy
  35355. return
  35356. }
  35357. if (this.mpType === 'page' || this.mpType === 'component') {
  35358. var mpInstance = this.$scope;
  35359. var data = Object.create(null);
  35360. try {
  35361. data = cloneWithData(this);
  35362. } catch (err) {
  35363. console.error(err);
  35364. }
  35365. data.__webviewId__ = mpInstance.data.__webviewId__;
  35366. var mpData = Object.create(null);
  35367. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  35368. mpData[key] = mpInstance.data[key];
  35369. });
  35370. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  35371. if (Object.keys(diffData).length) {
  35372. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"云飞智控","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  35373. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  35374. ']差量更新',
  35375. JSON.stringify(diffData));
  35376. }
  35377. this.__next_tick_pending = true;
  35378. mpInstance.setData(diffData, function () {
  35379. this$1.__next_tick_pending = false;
  35380. flushCallbacks$1(this$1);
  35381. });
  35382. } else {
  35383. flushCallbacks$1(this);
  35384. }
  35385. }
  35386. };
  35387. /* */
  35388. function createEmptyRender() {
  35389. }
  35390. function mountComponent$1(
  35391. vm,
  35392. el,
  35393. hydrating
  35394. ) {
  35395. if (!vm.mpType) {//main.js 中的 new Vue
  35396. return vm
  35397. }
  35398. if (vm.mpType === 'app') {
  35399. vm.$options.render = createEmptyRender;
  35400. }
  35401. if (!vm.$options.render) {
  35402. vm.$options.render = createEmptyRender;
  35403. if (true) {
  35404. /* istanbul ignore if */
  35405. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  35406. vm.$options.el || el) {
  35407. warn(
  35408. 'You are using the runtime-only build of Vue where the template ' +
  35409. 'compiler is not available. Either pre-compile the templates into ' +
  35410. 'render functions, or use the compiler-included build.',
  35411. vm
  35412. );
  35413. } else {
  35414. warn(
  35415. 'Failed to mount component: template or render function not defined.',
  35416. vm
  35417. );
  35418. }
  35419. }
  35420. }
  35421. !vm._$fallback && callHook(vm, 'beforeMount');
  35422. var updateComponent = function () {
  35423. vm._update(vm._render(), hydrating);
  35424. };
  35425. // we set this to vm._watcher inside the watcher's constructor
  35426. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  35427. // component's mounted hook), which relies on vm._watcher being already defined
  35428. new Watcher(vm, updateComponent, noop, {
  35429. before: function before() {
  35430. if (vm._isMounted && !vm._isDestroyed) {
  35431. callHook(vm, 'beforeUpdate');
  35432. }
  35433. }
  35434. }, true /* isRenderWatcher */);
  35435. hydrating = false;
  35436. return vm
  35437. }
  35438. /* */
  35439. function renderClass (
  35440. staticClass,
  35441. dynamicClass
  35442. ) {
  35443. if (isDef(staticClass) || isDef(dynamicClass)) {
  35444. return concat(staticClass, stringifyClass(dynamicClass))
  35445. }
  35446. /* istanbul ignore next */
  35447. return ''
  35448. }
  35449. function concat (a, b) {
  35450. return a ? b ? (a + ' ' + b) : a : (b || '')
  35451. }
  35452. function stringifyClass (value) {
  35453. if (Array.isArray(value)) {
  35454. return stringifyArray(value)
  35455. }
  35456. if (isObject(value)) {
  35457. return stringifyObject(value)
  35458. }
  35459. if (typeof value === 'string') {
  35460. return value
  35461. }
  35462. /* istanbul ignore next */
  35463. return ''
  35464. }
  35465. function stringifyArray (value) {
  35466. var res = '';
  35467. var stringified;
  35468. for (var i = 0, l = value.length; i < l; i++) {
  35469. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  35470. if (res) { res += ' '; }
  35471. res += stringified;
  35472. }
  35473. }
  35474. return res
  35475. }
  35476. function stringifyObject (value) {
  35477. var res = '';
  35478. for (var key in value) {
  35479. if (value[key]) {
  35480. if (res) { res += ' '; }
  35481. res += key;
  35482. }
  35483. }
  35484. return res
  35485. }
  35486. /* */
  35487. var parseStyleText = cached(function (cssText) {
  35488. var res = {};
  35489. var listDelimiter = /;(?![^(]*\))/g;
  35490. var propertyDelimiter = /:(.+)/;
  35491. cssText.split(listDelimiter).forEach(function (item) {
  35492. if (item) {
  35493. var tmp = item.split(propertyDelimiter);
  35494. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  35495. }
  35496. });
  35497. return res
  35498. });
  35499. // normalize possible array / string values into Object
  35500. function normalizeStyleBinding (bindingStyle) {
  35501. if (Array.isArray(bindingStyle)) {
  35502. return toObject(bindingStyle)
  35503. }
  35504. if (typeof bindingStyle === 'string') {
  35505. return parseStyleText(bindingStyle)
  35506. }
  35507. return bindingStyle
  35508. }
  35509. /* */
  35510. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  35511. function getTarget(obj, path) {
  35512. var parts = path.split('.');
  35513. var key = parts[0];
  35514. if (key.indexOf('__$n') === 0) { //number index
  35515. key = parseInt(key.replace('__$n', ''));
  35516. }
  35517. if (parts.length === 1) {
  35518. return obj[key]
  35519. }
  35520. return getTarget(obj[key], parts.slice(1).join('.'))
  35521. }
  35522. function internalMixin(Vue) {
  35523. Vue.config.errorHandler = function(err, vm, info) {
  35524. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  35525. console.error(err);
  35526. /* eslint-disable no-undef */
  35527. var app = typeof getApp === 'function' && getApp();
  35528. if (app && app.onError) {
  35529. app.onError(err);
  35530. }
  35531. };
  35532. var oldEmit = Vue.prototype.$emit;
  35533. Vue.prototype.$emit = function(event) {
  35534. if (this.$scope && event) {
  35535. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  35536. if (triggerEvent) {
  35537. try {
  35538. triggerEvent.call(this.$scope, event, {
  35539. __args__: toArray(arguments, 1)
  35540. });
  35541. } catch (error) {
  35542. }
  35543. }
  35544. }
  35545. return oldEmit.apply(this, arguments)
  35546. };
  35547. Vue.prototype.$nextTick = function(fn) {
  35548. return nextTick$1(this, fn)
  35549. };
  35550. MP_METHODS.forEach(function (method) {
  35551. Vue.prototype[method] = function(args) {
  35552. if (this.$scope && this.$scope[method]) {
  35553. return this.$scope[method](args)
  35554. }
  35555. // mp-alipay
  35556. if (typeof my === 'undefined') {
  35557. return
  35558. }
  35559. if (method === 'createSelectorQuery') {
  35560. /* eslint-disable no-undef */
  35561. return my.createSelectorQuery(args)
  35562. } else if (method === 'createIntersectionObserver') {
  35563. /* eslint-disable no-undef */
  35564. return my.createIntersectionObserver(args)
  35565. }
  35566. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  35567. };
  35568. });
  35569. Vue.prototype.__init_provide = initProvide;
  35570. Vue.prototype.__init_injections = initInjections;
  35571. Vue.prototype.__call_hook = function(hook, args) {
  35572. var vm = this;
  35573. // #7573 disable dep collection when invoking lifecycle hooks
  35574. pushTarget();
  35575. var handlers = vm.$options[hook];
  35576. var info = hook + " hook";
  35577. var ret;
  35578. if (handlers) {
  35579. for (var i = 0, j = handlers.length; i < j; i++) {
  35580. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  35581. }
  35582. }
  35583. if (vm._hasHookEvent) {
  35584. vm.$emit('hook:' + hook, args);
  35585. }
  35586. popTarget();
  35587. return ret
  35588. };
  35589. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  35590. if (Array.isArray(modifiers)) {
  35591. if (modifiers.indexOf('trim') !== -1) {
  35592. value = value.trim();
  35593. }
  35594. if (modifiers.indexOf('number') !== -1) {
  35595. value = this._n(value);
  35596. }
  35597. }
  35598. if (!target) {
  35599. target = this;
  35600. }
  35601. // 解决动态属性添加
  35602. Vue.set(target, key, value);
  35603. };
  35604. Vue.prototype.__set_sync = function(target, key, value) {
  35605. if (!target) {
  35606. target = this;
  35607. }
  35608. // 解决动态属性添加
  35609. Vue.set(target, key, value);
  35610. };
  35611. Vue.prototype.__get_orig = function(item) {
  35612. if (isPlainObject(item)) {
  35613. return item['$orig'] || item
  35614. }
  35615. return item
  35616. };
  35617. Vue.prototype.__get_value = function(dataPath, target) {
  35618. return getTarget(target || this, dataPath)
  35619. };
  35620. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  35621. return renderClass(staticClass, dynamicClass)
  35622. };
  35623. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  35624. if (!dynamicStyle && !staticStyle) {
  35625. return ''
  35626. }
  35627. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  35628. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  35629. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  35630. };
  35631. Vue.prototype.__map = function(val, iteratee) {
  35632. //TODO 暂不考虑 string
  35633. var ret, i, l, keys, key;
  35634. if (Array.isArray(val)) {
  35635. ret = new Array(val.length);
  35636. for (i = 0, l = val.length; i < l; i++) {
  35637. ret[i] = iteratee(val[i], i);
  35638. }
  35639. return ret
  35640. } else if (isObject(val)) {
  35641. keys = Object.keys(val);
  35642. ret = Object.create(null);
  35643. for (i = 0, l = keys.length; i < l; i++) {
  35644. key = keys[i];
  35645. ret[key] = iteratee(val[key], key, i);
  35646. }
  35647. return ret
  35648. } else if (typeof val === 'number') {
  35649. ret = new Array(val);
  35650. for (i = 0, l = val; i < l; i++) {
  35651. // 第一个参数暂时仍和小程序一致
  35652. ret[i] = iteratee(i, i);
  35653. }
  35654. return ret
  35655. }
  35656. return []
  35657. };
  35658. }
  35659. /* */
  35660. var LIFECYCLE_HOOKS$1 = [
  35661. //App
  35662. 'onLaunch',
  35663. 'onShow',
  35664. 'onHide',
  35665. 'onUniNViewMessage',
  35666. 'onPageNotFound',
  35667. 'onThemeChange',
  35668. 'onError',
  35669. 'onUnhandledRejection',
  35670. //Page
  35671. 'onInit',
  35672. 'onLoad',
  35673. // 'onShow',
  35674. 'onReady',
  35675. // 'onHide',
  35676. 'onUnload',
  35677. 'onPullDownRefresh',
  35678. 'onReachBottom',
  35679. 'onTabItemTap',
  35680. 'onAddToFavorites',
  35681. 'onShareTimeline',
  35682. 'onShareAppMessage',
  35683. 'onResize',
  35684. 'onPageScroll',
  35685. 'onNavigationBarButtonTap',
  35686. 'onBackPress',
  35687. 'onNavigationBarSearchInputChanged',
  35688. 'onNavigationBarSearchInputConfirmed',
  35689. 'onNavigationBarSearchInputClicked',
  35690. 'onUploadDouyinVideo',
  35691. 'onNFCReadMessage',
  35692. //Component
  35693. // 'onReady', // 兼容旧版本,应该移除该事件
  35694. 'onPageShow',
  35695. 'onPageHide',
  35696. 'onPageResize'
  35697. ];
  35698. function lifecycleMixin$1(Vue) {
  35699. //fixed vue-class-component
  35700. var oldExtend = Vue.extend;
  35701. Vue.extend = function(extendOptions) {
  35702. extendOptions = extendOptions || {};
  35703. var methods = extendOptions.methods;
  35704. if (methods) {
  35705. Object.keys(methods).forEach(function (methodName) {
  35706. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  35707. extendOptions[methodName] = methods[methodName];
  35708. delete methods[methodName];
  35709. }
  35710. });
  35711. }
  35712. return oldExtend.call(this, extendOptions)
  35713. };
  35714. var strategies = Vue.config.optionMergeStrategies;
  35715. var mergeHook = strategies.created;
  35716. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  35717. strategies[hook] = mergeHook;
  35718. });
  35719. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  35720. }
  35721. /* */
  35722. // install platform patch function
  35723. Vue.prototype.__patch__ = patch;
  35724. // public mount method
  35725. Vue.prototype.$mount = function(
  35726. el ,
  35727. hydrating
  35728. ) {
  35729. return mountComponent$1(this, el, hydrating)
  35730. };
  35731. lifecycleMixin$1(Vue);
  35732. internalMixin(Vue);
  35733. /* */
  35734. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  35735. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  35736. /***/ }),
  35737. /***/ 257:
  35738. /*!**********************************************!*\
  35739. !*** E:/project/bigdata_WX/util/anitthro.js ***!
  35740. \**********************************************/
  35741. /*! no static exports found */
  35742. /***/ (function(module, exports) {
  35743. var timer1 = null; //防抖,
  35744. var timer2 = null; //节流
  35745. function Debounce(fn, t) {
  35746. //防抖
  35747. var delay = t || 500;
  35748. return function () {
  35749. var _this = this;
  35750. var args = arguments;
  35751. // let timer1 = null
  35752. // console.log(timer1);
  35753. if (timer1) {
  35754. clearTimeout(timer1);
  35755. }
  35756. timer1 = setTimeout(function () {
  35757. fn.apply(_this, args);
  35758. timer1 = null;
  35759. }, delay);
  35760. };
  35761. }
  35762. // 使用
  35763. /*import {Debounce} from '@/common/debounceThrottle.js'
  35764. Debounce(() => {
  35765. //要执行的函数
  35766. }, 200)() */
  35767. function Throttle(fn, t) {
  35768. //节流
  35769. var last;
  35770. var interval = t || 500;
  35771. return function () {
  35772. var _this2 = this;
  35773. var args = arguments;
  35774. var now = +new Date();
  35775. if (last && now - last < interval) {
  35776. clearTimeout(timer2);
  35777. timer2 = setTimeout(function () {
  35778. last = now;
  35779. fn.apply(_this2, args);
  35780. }, interval);
  35781. } else {
  35782. last = now;
  35783. fn.apply(this, args);
  35784. }
  35785. };
  35786. }
  35787. module.exports = {
  35788. Debounce: Debounce,
  35789. Throttle: Throttle
  35790. };
  35791. /***/ }),
  35792. /***/ 26:
  35793. /*!****************************************!*\
  35794. !*** E:/project/bigdata_WX/pages.json ***!
  35795. \****************************************/
  35796. /*! no static exports found */
  35797. /***/ (function(module, exports) {
  35798. /***/ }),
  35799. /***/ 3:
  35800. /*!***********************************!*\
  35801. !*** (webpack)/buildin/global.js ***!
  35802. \***********************************/
  35803. /*! no static exports found */
  35804. /***/ (function(module, exports) {
  35805. var g;
  35806. // This works in non-strict mode
  35807. g = (function() {
  35808. return this;
  35809. })();
  35810. try {
  35811. // This works if eval is allowed (see CSP)
  35812. g = g || new Function("return this")();
  35813. } catch (e) {
  35814. // This works if the window reference is available
  35815. if (typeof window === "object") g = window;
  35816. }
  35817. // g can still be undefined, but nothing to do about it...
  35818. // We return undefined, instead of nothing here, so it's
  35819. // easier to handle this case. if(!global) { ...}
  35820. module.exports = g;
  35821. /***/ }),
  35822. /***/ 32:
  35823. /*!**********************************************************************************************************!*\
  35824. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  35825. \**********************************************************************************************************/
  35826. /*! exports provided: default */
  35827. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  35828. "use strict";
  35829. __webpack_require__.r(__webpack_exports__);
  35830. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  35831. /* globals __VUE_SSR_CONTEXT__ */
  35832. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  35833. // This module is a runtime utility for cleaner component module output and will
  35834. // be included in the final webpack user bundle.
  35835. function normalizeComponent (
  35836. scriptExports,
  35837. render,
  35838. staticRenderFns,
  35839. functionalTemplate,
  35840. injectStyles,
  35841. scopeId,
  35842. moduleIdentifier, /* server only */
  35843. shadowMode, /* vue-cli only */
  35844. components, // fixed by xxxxxx auto components
  35845. renderjs // fixed by xxxxxx renderjs
  35846. ) {
  35847. // Vue.extend constructor export interop
  35848. var options = typeof scriptExports === 'function'
  35849. ? scriptExports.options
  35850. : scriptExports
  35851. // fixed by xxxxxx auto components
  35852. if (components) {
  35853. if (!options.components) {
  35854. options.components = {}
  35855. }
  35856. var hasOwn = Object.prototype.hasOwnProperty
  35857. for (var name in components) {
  35858. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  35859. options.components[name] = components[name]
  35860. }
  35861. }
  35862. }
  35863. // fixed by xxxxxx renderjs
  35864. if (renderjs) {
  35865. if(typeof renderjs.beforeCreate === 'function'){
  35866. renderjs.beforeCreate = [renderjs.beforeCreate]
  35867. }
  35868. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  35869. this[renderjs.__module] = this
  35870. });
  35871. (options.mixins || (options.mixins = [])).push(renderjs)
  35872. }
  35873. // render functions
  35874. if (render) {
  35875. options.render = render
  35876. options.staticRenderFns = staticRenderFns
  35877. options._compiled = true
  35878. }
  35879. // functional template
  35880. if (functionalTemplate) {
  35881. options.functional = true
  35882. }
  35883. // scopedId
  35884. if (scopeId) {
  35885. options._scopeId = 'data-v-' + scopeId
  35886. }
  35887. var hook
  35888. if (moduleIdentifier) { // server build
  35889. hook = function (context) {
  35890. // 2.3 injection
  35891. context =
  35892. context || // cached call
  35893. (this.$vnode && this.$vnode.ssrContext) || // stateful
  35894. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  35895. // 2.2 with runInNewContext: true
  35896. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  35897. context = __VUE_SSR_CONTEXT__
  35898. }
  35899. // inject component styles
  35900. if (injectStyles) {
  35901. injectStyles.call(this, context)
  35902. }
  35903. // register component module identifier for async chunk inferrence
  35904. if (context && context._registeredComponents) {
  35905. context._registeredComponents.add(moduleIdentifier)
  35906. }
  35907. }
  35908. // used by ssr in case component is cached and beforeCreate
  35909. // never gets called
  35910. options._ssrRegister = hook
  35911. } else if (injectStyles) {
  35912. hook = shadowMode
  35913. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  35914. : injectStyles
  35915. }
  35916. if (hook) {
  35917. if (options.functional) {
  35918. // for template-only hot-reload because in that case the render fn doesn't
  35919. // go through the normalizer
  35920. options._injectStyles = hook
  35921. // register for functioal component in vue file
  35922. var originalRender = options.render
  35923. options.render = function renderWithStyleInjection (h, context) {
  35924. hook.call(context)
  35925. return originalRender(h, context)
  35926. }
  35927. } else {
  35928. // inject component registration as beforeCreate hook
  35929. var existing = options.beforeCreate
  35930. options.beforeCreate = existing
  35931. ? [].concat(existing, hook)
  35932. : [hook]
  35933. }
  35934. }
  35935. return {
  35936. exports: scriptExports,
  35937. options: options
  35938. }
  35939. }
  35940. /***/ }),
  35941. /***/ 33:
  35942. /*!***********************************************!*\
  35943. !*** E:/project/bigdata_WX/uview-ui/index.js ***!
  35944. \***********************************************/
  35945. /*! no static exports found */
  35946. /***/ (function(module, exports, __webpack_require__) {
  35947. "use strict";
  35948. /* WEBPACK VAR INJECTION */(function(uni) {
  35949. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  35950. Object.defineProperty(exports, "__esModule", {
  35951. value: true
  35952. });
  35953. exports.default = void 0;
  35954. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 34));
  35955. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 35));
  35956. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 39));
  35957. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 40));
  35958. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 44));
  35959. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 45));
  35960. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 46));
  35961. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 47));
  35962. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 48));
  35963. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 49));
  35964. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 50));
  35965. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 37));
  35966. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 36));
  35967. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 51));
  35968. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 38));
  35969. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 52));
  35970. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 53));
  35971. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 54));
  35972. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 55));
  35973. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 56));
  35974. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 57);
  35975. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 58));
  35976. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 59));
  35977. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 60));
  35978. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 61));
  35979. // 引入全局mixin
  35980. // 引入关于是否mixin集成小程序分享的配置
  35981. // import wxshare from './libs/mixin/mpShare.js'
  35982. // 全局挂载引入http相关请求拦截插件
  35983. function wranning(str) {
  35984. // 开发环境进行信息输出,主要是一些报错信息
  35985. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  35986. // https://uniapp.dcloud.io/frame?id=%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%92%8c%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83
  35987. if (true) {
  35988. console.warn(str);
  35989. }
  35990. }
  35991. // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  35992. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  35993. // let vuexStore = {};
  35994. // try {
  35995. // vuexStore = require("@/store/$u.mixin.js");
  35996. // } catch (e) {
  35997. // //TODO handle the exception
  35998. // }
  35999. // post类型对象参数转为get类型url参数
  36000. var $u = {
  36001. queryParams: _queryParams.default,
  36002. route: _route.default,
  36003. timeFormat: _timeFormat.default,
  36004. date: _timeFormat.default,
  36005. // 另名date
  36006. timeFrom: _timeFrom.default,
  36007. colorGradient: _colorGradient.default.colorGradient,
  36008. colorToRgba: _colorGradient.default.colorToRgba,
  36009. guid: _guid.default,
  36010. color: _color.default,
  36011. sys: _sys.sys,
  36012. os: _sys.os,
  36013. type2icon: _type2icon.default,
  36014. randomArray: _randomArray.default,
  36015. wranning: wranning,
  36016. get: _request.default.get,
  36017. post: _request.default.post,
  36018. put: _request.default.put,
  36019. 'delete': _request.default.delete,
  36020. hexToRgb: _colorGradient.default.hexToRgb,
  36021. rgbToHex: _colorGradient.default.rgbToHex,
  36022. test: _test.default,
  36023. random: _random.default,
  36024. deepClone: _deepClone.default,
  36025. deepMerge: _deepMerge.default,
  36026. getParent: _getParent.default,
  36027. $parent: _$parent.default,
  36028. addUnit: _addUnit.default,
  36029. trim: _trim.default,
  36030. type: ['primary', 'success', 'error', 'warning', 'info'],
  36031. http: _request.default,
  36032. toast: _toast.default,
  36033. config: _config.default,
  36034. // uView配置信息相关,比如版本号
  36035. zIndex: _zIndex.default,
  36036. debounce: _debounce.default,
  36037. throttle: _throttle.default
  36038. };
  36039. // $u挂载到uni对象上
  36040. uni.$u = $u;
  36041. var install = function install(Vue) {
  36042. Vue.mixin(_mixin.default);
  36043. if (Vue.prototype.openShare) {
  36044. Vue.mixin(mpShare);
  36045. }
  36046. // Vue.mixin(vuexStore);
  36047. // 时间格式化,同时两个名称,date和timeFormat
  36048. Vue.filter('timeFormat', function (timestamp, format) {
  36049. return (0, _timeFormat.default)(timestamp, format);
  36050. });
  36051. Vue.filter('date', function (timestamp, format) {
  36052. return (0, _timeFormat.default)(timestamp, format);
  36053. });
  36054. // 将多久以前的方法,注入到全局过滤器
  36055. Vue.filter('timeFrom', function (timestamp, format) {
  36056. return (0, _timeFrom.default)(timestamp, format);
  36057. });
  36058. Vue.prototype.$u = $u;
  36059. };
  36060. var _default = {
  36061. install: install
  36062. };
  36063. exports.default = _default;
  36064. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  36065. /***/ }),
  36066. /***/ 34:
  36067. /*!**********************************************************!*\
  36068. !*** E:/project/bigdata_WX/uview-ui/libs/mixin/mixin.js ***!
  36069. \**********************************************************/
  36070. /*! no static exports found */
  36071. /***/ (function(module, exports, __webpack_require__) {
  36072. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  36073. data: function data() {
  36074. return {};
  36075. },
  36076. onLoad: function onLoad() {
  36077. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  36078. this.$u.getRect = this.$uGetRect;
  36079. },
  36080. methods: {
  36081. // 查询节点信息
  36082. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  36083. // 解决办法为在组件根部再套一个没有任何作用的view元素
  36084. $uGetRect: function $uGetRect(selector, all) {
  36085. var _this = this;
  36086. return new Promise(function (resolve) {
  36087. uni.createSelectorQuery().in(_this)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
  36088. if (all && Array.isArray(rect) && rect.length) {
  36089. resolve(rect);
  36090. }
  36091. if (!all && rect) {
  36092. resolve(rect);
  36093. }
  36094. }).exec();
  36095. });
  36096. },
  36097. getParentData: function getParentData() {
  36098. var _this2 = this;
  36099. var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  36100. // 避免在created中去定义parent变量
  36101. if (!this.parent) this.parent = false;
  36102. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  36103. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  36104. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  36105. this.parent = this.$u.$parent.call(this, parentName);
  36106. if (this.parent) {
  36107. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  36108. Object.keys(this.parentData).map(function (key) {
  36109. _this2.parentData[key] = _this2.parent[key];
  36110. });
  36111. }
  36112. },
  36113. // 阻止事件冒泡
  36114. preventEvent: function preventEvent(e) {
  36115. e && e.stopPropagation && e.stopPropagation();
  36116. }
  36117. },
  36118. onReachBottom: function onReachBottom() {
  36119. uni.$emit('uOnReachBottom');
  36120. }
  36121. };
  36122. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  36123. /***/ }),
  36124. /***/ 35:
  36125. /*!************************************************************!*\
  36126. !*** E:/project/bigdata_WX/uview-ui/libs/request/index.js ***!
  36127. \************************************************************/
  36128. /*! no static exports found */
  36129. /***/ (function(module, exports, __webpack_require__) {
  36130. "use strict";
  36131. /* WEBPACK VAR INJECTION */(function(uni) {
  36132. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  36133. Object.defineProperty(exports, "__esModule", {
  36134. value: true
  36135. });
  36136. exports.default = void 0;
  36137. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  36138. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  36139. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 36));
  36140. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 38));
  36141. var Request = /*#__PURE__*/function () {
  36142. function Request() {
  36143. var _this = this;
  36144. (0, _classCallCheck2.default)(this, Request);
  36145. this.config = {
  36146. baseUrl: '',
  36147. // 请求的根域名
  36148. // 默认的请求头
  36149. header: {},
  36150. method: 'POST',
  36151. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  36152. dataType: 'json',
  36153. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  36154. responseType: 'text',
  36155. showLoading: true,
  36156. // 是否显示请求中的loading
  36157. loadingText: '请求中...',
  36158. loadingTime: 800,
  36159. // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  36160. timer: null,
  36161. // 定时器
  36162. originalData: false,
  36163. // 是否在拦截器中返回服务端的原始数据,见文档说明
  36164. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  36165. };
  36166. // 拦截器
  36167. this.interceptor = {
  36168. // 请求前的拦截
  36169. request: null,
  36170. // 请求后的拦截
  36171. response: null
  36172. };
  36173. // get请求
  36174. this.get = function (url) {
  36175. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  36176. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  36177. return _this.request({
  36178. method: 'GET',
  36179. url: url,
  36180. header: header,
  36181. data: data
  36182. });
  36183. };
  36184. // post请求
  36185. this.post = function (url) {
  36186. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  36187. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  36188. return _this.request({
  36189. url: url,
  36190. method: 'POST',
  36191. header: header,
  36192. data: data
  36193. });
  36194. };
  36195. // put请求,不支持支付宝小程序(HX2.6.15)
  36196. this.put = function (url) {
  36197. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  36198. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  36199. return _this.request({
  36200. url: url,
  36201. method: 'PUT',
  36202. header: header,
  36203. data: data
  36204. });
  36205. };
  36206. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  36207. this.delete = function (url) {
  36208. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  36209. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  36210. return _this.request({
  36211. url: url,
  36212. method: 'DELETE',
  36213. header: header,
  36214. data: data
  36215. });
  36216. };
  36217. }
  36218. (0, _createClass2.default)(Request, [{
  36219. key: "setConfig",
  36220. value:
  36221. // 设置全局默认配置
  36222. function setConfig(customConfig) {
  36223. // 深度合并对象,否则会造成对象深层属性丢失
  36224. this.config = (0, _deepMerge.default)(this.config, customConfig);
  36225. }
  36226. // 主要请求部分
  36227. }, {
  36228. key: "request",
  36229. value: function request() {
  36230. var _this2 = this;
  36231. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  36232. // 检查请求拦截
  36233. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  36234. var tmpConfig = {};
  36235. var interceptorRequest = this.interceptor.request(options);
  36236. if (interceptorRequest === false) {
  36237. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  36238. return new Promise(function () {});
  36239. }
  36240. this.options = interceptorRequest;
  36241. }
  36242. options.dataType = options.dataType || this.config.dataType;
  36243. options.responseType = options.responseType || this.config.responseType;
  36244. options.url = options.url || '';
  36245. options.params = options.params || {};
  36246. options.header = Object.assign(this.config.header, options.header);
  36247. options.method = options.method || this.config.method;
  36248. return new Promise(function (resolve, reject) {
  36249. options.complete = function (response) {
  36250. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  36251. uni.hideLoading();
  36252. // 清除定时器,如果请求回来了,就无需loading
  36253. clearTimeout(_this2.config.timer);
  36254. _this2.config.timer = null;
  36255. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  36256. if (_this2.config.originalData) {
  36257. // 判断是否存在拦截器
  36258. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  36259. var resInterceptors = _this2.interceptor.response(response);
  36260. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  36261. if (resInterceptors !== false) {
  36262. resolve(resInterceptors);
  36263. } else {
  36264. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  36265. reject(response);
  36266. }
  36267. } else {
  36268. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  36269. resolve(response);
  36270. }
  36271. } else {
  36272. if (response.statusCode == 200) {
  36273. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  36274. var _resInterceptors = _this2.interceptor.response(response.data);
  36275. if (_resInterceptors !== false) {
  36276. resolve(_resInterceptors);
  36277. } else {
  36278. reject(response.data);
  36279. }
  36280. } else {
  36281. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  36282. resolve(response.data);
  36283. }
  36284. } else {
  36285. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  36286. // if(response.errMsg) {
  36287. // uni.showModal({
  36288. // title: response.errMsg
  36289. // });
  36290. // }
  36291. reject(response);
  36292. }
  36293. }
  36294. };
  36295. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  36296. options.url = _test.default.url(options.url) ? options.url : _this2.config.baseUrl + (options.url.indexOf('/') == 0 ? options.url : '/' + options.url);
  36297. // 是否显示loading
  36298. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  36299. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  36300. if (_this2.config.showLoading && !_this2.config.timer) {
  36301. _this2.config.timer = setTimeout(function () {
  36302. uni.showLoading({
  36303. title: _this2.config.loadingText,
  36304. mask: _this2.config.loadingMask
  36305. });
  36306. _this2.config.timer = null;
  36307. }, _this2.config.loadingTime);
  36308. }
  36309. uni.request(options);
  36310. });
  36311. // .catch(res => {
  36312. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  36313. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  36314. // return new Promise(()=>{});
  36315. // })
  36316. }
  36317. }]);
  36318. return Request;
  36319. }();
  36320. var _default = new Request();
  36321. exports.default = _default;
  36322. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  36323. /***/ }),
  36324. /***/ 36:
  36325. /*!*****************************************************************!*\
  36326. !*** E:/project/bigdata_WX/uview-ui/libs/function/deepMerge.js ***!
  36327. \*****************************************************************/
  36328. /*! no static exports found */
  36329. /***/ (function(module, exports, __webpack_require__) {
  36330. "use strict";
  36331. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  36332. Object.defineProperty(exports, "__esModule", {
  36333. value: true
  36334. });
  36335. exports.default = void 0;
  36336. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  36337. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 37));
  36338. // JS对象深度合并
  36339. function deepMerge() {
  36340. var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  36341. var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  36342. target = (0, _deepClone.default)(target);
  36343. if ((0, _typeof2.default)(target) !== 'object' || (0, _typeof2.default)(source) !== 'object') return false;
  36344. for (var prop in source) {
  36345. if (!source.hasOwnProperty(prop)) continue;
  36346. if (prop in target) {
  36347. if ((0, _typeof2.default)(target[prop]) !== 'object') {
  36348. target[prop] = source[prop];
  36349. } else {
  36350. if ((0, _typeof2.default)(source[prop]) !== 'object') {
  36351. target[prop] = source[prop];
  36352. } else {
  36353. if (target[prop].concat && source[prop].concat) {
  36354. target[prop] = target[prop].concat(source[prop]);
  36355. } else {
  36356. target[prop] = deepMerge(target[prop], source[prop]);
  36357. }
  36358. }
  36359. }
  36360. } else {
  36361. target[prop] = source[prop];
  36362. }
  36363. }
  36364. return target;
  36365. }
  36366. var _default = deepMerge;
  36367. exports.default = _default;
  36368. /***/ }),
  36369. /***/ 37:
  36370. /*!*****************************************************************!*\
  36371. !*** E:/project/bigdata_WX/uview-ui/libs/function/deepClone.js ***!
  36372. \*****************************************************************/
  36373. /*! no static exports found */
  36374. /***/ (function(module, exports, __webpack_require__) {
  36375. "use strict";
  36376. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  36377. Object.defineProperty(exports, "__esModule", {
  36378. value: true
  36379. });
  36380. exports.default = void 0;
  36381. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  36382. // 判断arr是否为一个数组,返回一个bool值
  36383. function isArray(arr) {
  36384. return Object.prototype.toString.call(arr) === '[object Array]';
  36385. }
  36386. // 深度克隆
  36387. function deepClone(obj) {
  36388. // 对常见的“非”值,直接返回原来值
  36389. if ([null, undefined, NaN, false].includes(obj)) return obj;
  36390. if ((0, _typeof2.default)(obj) !== "object" && typeof obj !== 'function') {
  36391. //原始类型直接返回
  36392. return obj;
  36393. }
  36394. var o = isArray(obj) ? [] : {};
  36395. for (var i in obj) {
  36396. if (obj.hasOwnProperty(i)) {
  36397. o[i] = (0, _typeof2.default)(obj[i]) === "object" ? deepClone(obj[i]) : obj[i];
  36398. }
  36399. }
  36400. return o;
  36401. }
  36402. var _default = deepClone;
  36403. exports.default = _default;
  36404. /***/ }),
  36405. /***/ 370:
  36406. /*!*****************************************************************************!*\
  36407. !*** E:/project/bigdata_WX/components/js_sdk/u-charts/u-charts/u-charts.js ***!
  36408. \*****************************************************************************/
  36409. /*! no static exports found */
  36410. /***/ (function(module, exports, __webpack_require__) {
  36411. "use strict";
  36412. /* WEBPACK VAR INJECTION */(function(uni, module) {/*
  36413. * uCharts v1.9.6.20210214
  36414. * uni-app平台高性能跨全端图表,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)
  36415. * Copyright (c) 2021 QIUN秋云 https://www.ucharts.cn All rights reserved.
  36416. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  36417. *
  36418. * uCharts官方网站
  36419. * https://www.uCharts.cn
  36420. *
  36421. * 开源地址:
  36422. * https://gitee.com/uCharts/uCharts
  36423. *
  36424. * uni-app插件市场地址:
  36425. * http://ext.dcloud.net.cn/plugin?id=271
  36426. *
  36427. */
  36428. var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  36429. var config = {
  36430. yAxisWidth: 15,
  36431. yAxisSplit: 5,
  36432. xAxisHeight: 22,
  36433. xAxisLineHeight: 22,
  36434. legendHeight: 15,
  36435. yAxisTitleWidth: 15,
  36436. padding: [10, 10, 10, 10],
  36437. pixelRatio: 1,
  36438. rotate: false,
  36439. columePadding: 3,
  36440. fontSize: 13,
  36441. //dataPointShape: ['diamond', 'circle', 'triangle', 'rect'],
  36442. dataPointShape: ['circle', 'circle', 'circle', 'circle'],
  36443. colors: ['#1890ff', '#2fc25b', '#facc14', '#f04864', '#8543e0', '#90ed7d'],
  36444. pieChartLinePadding: 15,
  36445. pieChartTextPadding: 5,
  36446. xAxisTextPadding: 3,
  36447. titleColor: '#333333',
  36448. titleFontSize: 20,
  36449. subtitleColor: '#999999',
  36450. subtitleFontSize: 15,
  36451. toolTipPadding: 3,
  36452. toolTipBackground: '#000000',
  36453. toolTipOpacity: 0.7,
  36454. toolTipLineHeight: 20,
  36455. radarLabelTextMargin: 15,
  36456. gaugeLabelTextMargin: 15
  36457. };
  36458. var assign = function assign(target) {
  36459. for (var _len2 = arguments.length, varArgs = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  36460. varArgs[_key2 - 1] = arguments[_key2];
  36461. }
  36462. if (target == null) {
  36463. throw new TypeError('Cannot convert undefined or null to object');
  36464. }
  36465. if (!varArgs || varArgs.length <= 0) {
  36466. return target;
  36467. }
  36468. // 深度合并对象
  36469. function deepAssign(obj1, obj2) {
  36470. for (var key in obj2) {
  36471. obj1[key] = obj1[key] && obj1[key].toString() === "[object Object]" ? deepAssign(obj1[key], obj2[key]) : obj1[key] = obj2[key];
  36472. }
  36473. return obj1;
  36474. }
  36475. varArgs.forEach(function (val) {
  36476. target = deepAssign(target, val);
  36477. });
  36478. return target;
  36479. };
  36480. var util = {
  36481. toFixed: function toFixed(num, limit) {
  36482. limit = limit || 2;
  36483. if (this.isFloat(num)) {
  36484. num = num.toFixed(limit);
  36485. }
  36486. return num;
  36487. },
  36488. isFloat: function isFloat(num) {
  36489. return num % 1 !== 0;
  36490. },
  36491. approximatelyEqual: function approximatelyEqual(num1, num2) {
  36492. return Math.abs(num1 - num2) < 1e-10;
  36493. },
  36494. isSameSign: function isSameSign(num1, num2) {
  36495. return Math.abs(num1) === num1 && Math.abs(num2) === num2 || Math.abs(num1) !== num1 && Math.abs(num2) !== num2;
  36496. },
  36497. isSameXCoordinateArea: function isSameXCoordinateArea(p1, p2) {
  36498. return this.isSameSign(p1.x, p2.x);
  36499. },
  36500. isCollision: function isCollision(obj1, obj2) {
  36501. obj1.end = {};
  36502. obj1.end.x = obj1.start.x + obj1.width;
  36503. obj1.end.y = obj1.start.y - obj1.height;
  36504. obj2.end = {};
  36505. obj2.end.x = obj2.start.x + obj2.width;
  36506. obj2.end.y = obj2.start.y - obj2.height;
  36507. var flag = obj2.start.x > obj1.end.x || obj2.end.x < obj1.start.x || obj2.end.y > obj1.start.y || obj2.start.y < obj1.end.y;
  36508. return !flag;
  36509. }
  36510. };
  36511. //兼容H5点击事件
  36512. function getH5Offset(e) {
  36513. e.mp = {
  36514. changedTouches: []
  36515. };
  36516. e.mp.changedTouches.push({
  36517. x: e.offsetX,
  36518. y: e.offsetY
  36519. });
  36520. return e;
  36521. }
  36522. // hex 转 rgba
  36523. function hexToRgb(hexValue, opc) {
  36524. var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
  36525. var hex = hexValue.replace(rgx, function (m, r, g, b) {
  36526. return r + r + g + g + b + b;
  36527. });
  36528. var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
  36529. var r = parseInt(rgb[1], 16);
  36530. var g = parseInt(rgb[2], 16);
  36531. var b = parseInt(rgb[3], 16);
  36532. return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')';
  36533. }
  36534. function findRange(num, type, limit) {
  36535. if (isNaN(num)) {
  36536. throw new Error('[uCharts] unvalid series data!');
  36537. }
  36538. limit = limit || 10;
  36539. type = type ? type : 'upper';
  36540. var multiple = 1;
  36541. while (limit < 1) {
  36542. limit *= 10;
  36543. multiple *= 10;
  36544. }
  36545. if (type === 'upper') {
  36546. num = Math.ceil(num * multiple);
  36547. } else {
  36548. num = Math.floor(num * multiple);
  36549. }
  36550. while (num % limit !== 0) {
  36551. if (type === 'upper') {
  36552. num++;
  36553. } else {
  36554. num--;
  36555. }
  36556. }
  36557. return num / multiple;
  36558. }
  36559. function calCandleMA(dayArr, nameArr, colorArr, kdata) {
  36560. var seriesTemp = [];
  36561. for (var k = 0; k < dayArr.length; k++) {
  36562. var seriesItem = {
  36563. data: [],
  36564. name: nameArr[k],
  36565. color: colorArr[k]
  36566. };
  36567. for (var i = 0, len = kdata.length; i < len; i++) {
  36568. if (i < dayArr[k]) {
  36569. seriesItem.data.push(null);
  36570. continue;
  36571. }
  36572. var sum = 0;
  36573. for (var j = 0; j < dayArr[k]; j++) {
  36574. sum += kdata[i - j][1];
  36575. }
  36576. seriesItem.data.push(+(sum / dayArr[k]).toFixed(3));
  36577. }
  36578. seriesTemp.push(seriesItem);
  36579. }
  36580. return seriesTemp;
  36581. }
  36582. function calValidDistance(self, distance, chartData, config, opts) {
  36583. var dataChartAreaWidth = opts.width - opts.area[1] - opts.area[3];
  36584. var dataChartWidth = chartData.eachSpacing * (opts.chartData.xAxisData.xAxisPoints.length - 1);
  36585. var validDistance = distance;
  36586. if (distance >= 0) {
  36587. validDistance = 0;
  36588. self.event.trigger('scrollLeft');
  36589. } else if (Math.abs(distance) >= dataChartWidth - dataChartAreaWidth) {
  36590. validDistance = dataChartAreaWidth - dataChartWidth;
  36591. self.event.trigger('scrollRight');
  36592. }
  36593. return validDistance;
  36594. }
  36595. function isInAngleRange(angle, startAngle, endAngle) {
  36596. function adjust(angle) {
  36597. while (angle < 0) {
  36598. angle += 2 * Math.PI;
  36599. }
  36600. while (angle > 2 * Math.PI) {
  36601. angle -= 2 * Math.PI;
  36602. }
  36603. return angle;
  36604. }
  36605. angle = adjust(angle);
  36606. startAngle = adjust(startAngle);
  36607. endAngle = adjust(endAngle);
  36608. if (startAngle > endAngle) {
  36609. endAngle += 2 * Math.PI;
  36610. if (angle < startAngle) {
  36611. angle += 2 * Math.PI;
  36612. }
  36613. }
  36614. return angle >= startAngle && angle <= endAngle;
  36615. }
  36616. function calRotateTranslate(x, y, h) {
  36617. var xv = x;
  36618. var yv = h - y;
  36619. var transX = xv + (h - yv - xv) / Math.sqrt(2);
  36620. transX *= -1;
  36621. var transY = (h - yv) * (Math.sqrt(2) - 1) - (h - yv - xv) / Math.sqrt(2);
  36622. return {
  36623. transX: transX,
  36624. transY: transY
  36625. };
  36626. }
  36627. function createCurveControlPoints(points, i) {
  36628. function isNotMiddlePoint(points, i) {
  36629. if (points[i - 1] && points[i + 1]) {
  36630. return points[i].y >= Math.max(points[i - 1].y, points[i + 1].y) || points[i].y <= Math.min(points[i - 1].y, points[i + 1].y);
  36631. } else {
  36632. return false;
  36633. }
  36634. }
  36635. function isNotMiddlePointX(points, i) {
  36636. if (points[i - 1] && points[i + 1]) {
  36637. return points[i].x >= Math.max(points[i - 1].x, points[i + 1].x) || points[i].x <= Math.min(points[i - 1].x, points[i + 1].x);
  36638. } else {
  36639. return false;
  36640. }
  36641. }
  36642. var a = 0.2;
  36643. var b = 0.2;
  36644. var pAx = null;
  36645. var pAy = null;
  36646. var pBx = null;
  36647. var pBy = null;
  36648. if (i < 1) {
  36649. pAx = points[0].x + (points[1].x - points[0].x) * a;
  36650. pAy = points[0].y + (points[1].y - points[0].y) * a;
  36651. } else {
  36652. pAx = points[i].x + (points[i + 1].x - points[i - 1].x) * a;
  36653. pAy = points[i].y + (points[i + 1].y - points[i - 1].y) * a;
  36654. }
  36655. if (i > points.length - 3) {
  36656. var last = points.length - 1;
  36657. pBx = points[last].x - (points[last].x - points[last - 1].x) * b;
  36658. pBy = points[last].y - (points[last].y - points[last - 1].y) * b;
  36659. } else {
  36660. pBx = points[i + 1].x - (points[i + 2].x - points[i].x) * b;
  36661. pBy = points[i + 1].y - (points[i + 2].y - points[i].y) * b;
  36662. }
  36663. if (isNotMiddlePoint(points, i + 1)) {
  36664. pBy = points[i + 1].y;
  36665. }
  36666. if (isNotMiddlePoint(points, i)) {
  36667. pAy = points[i].y;
  36668. }
  36669. if (isNotMiddlePointX(points, i + 1)) {
  36670. pBx = points[i + 1].x;
  36671. }
  36672. if (isNotMiddlePointX(points, i)) {
  36673. pAx = points[i].x;
  36674. }
  36675. if (pAy >= Math.max(points[i].y, points[i + 1].y) || pAy <= Math.min(points[i].y, points[i + 1].y)) {
  36676. pAy = points[i].y;
  36677. }
  36678. if (pBy >= Math.max(points[i].y, points[i + 1].y) || pBy <= Math.min(points[i].y, points[i + 1].y)) {
  36679. pBy = points[i + 1].y;
  36680. }
  36681. if (pAx >= Math.max(points[i].x, points[i + 1].x) || pAx <= Math.min(points[i].x, points[i + 1].x)) {
  36682. pAx = points[i].x;
  36683. }
  36684. if (pBx >= Math.max(points[i].x, points[i + 1].x) || pBx <= Math.min(points[i].x, points[i + 1].x)) {
  36685. pBx = points[i + 1].x;
  36686. }
  36687. return {
  36688. ctrA: {
  36689. x: pAx,
  36690. y: pAy
  36691. },
  36692. ctrB: {
  36693. x: pBx,
  36694. y: pBy
  36695. }
  36696. };
  36697. }
  36698. function convertCoordinateOrigin(x, y, center) {
  36699. return {
  36700. x: center.x + x,
  36701. y: center.y - y
  36702. };
  36703. }
  36704. function avoidCollision(obj, target) {
  36705. if (target) {
  36706. // is collision test
  36707. while (util.isCollision(obj, target)) {
  36708. if (obj.start.x > 0) {
  36709. obj.start.y--;
  36710. } else if (obj.start.x < 0) {
  36711. obj.start.y++;
  36712. } else {
  36713. if (obj.start.y > 0) {
  36714. obj.start.y++;
  36715. } else {
  36716. obj.start.y--;
  36717. }
  36718. }
  36719. }
  36720. }
  36721. return obj;
  36722. }
  36723. function fillSeries(series, opts, config) {
  36724. var index = 0;
  36725. return series.map(function (item) {
  36726. if (!item.color) {
  36727. item.color = config.colors[index];
  36728. index = (index + 1) % config.colors.length;
  36729. }
  36730. if (!item.index) {
  36731. item.index = 0;
  36732. }
  36733. if (!item.type) {
  36734. item.type = opts.type;
  36735. }
  36736. if (typeof item.show == "undefined") {
  36737. item.show = true;
  36738. }
  36739. if (!item.type) {
  36740. item.type = opts.type;
  36741. }
  36742. if (!item.pointShape) {
  36743. item.pointShape = "circle";
  36744. }
  36745. if (!item.legendShape) {
  36746. switch (item.type) {
  36747. case 'line':
  36748. item.legendShape = "line";
  36749. break;
  36750. case 'column':
  36751. item.legendShape = "rect";
  36752. break;
  36753. case 'area':
  36754. item.legendShape = "triangle";
  36755. break;
  36756. default:
  36757. item.legendShape = "circle";
  36758. }
  36759. }
  36760. return item;
  36761. });
  36762. }
  36763. function getDataRange(minData, maxData) {
  36764. var limit = 0;
  36765. var range = maxData - minData;
  36766. if (range >= 10000) {
  36767. limit = 1000;
  36768. } else if (range >= 1000) {
  36769. limit = 100;
  36770. } else if (range >= 100) {
  36771. limit = 10;
  36772. } else if (range >= 10) {
  36773. limit = 5;
  36774. } else if (range >= 1) {
  36775. limit = 1;
  36776. } else if (range >= 0.1) {
  36777. limit = 0.1;
  36778. } else if (range >= 0.01) {
  36779. limit = 0.01;
  36780. } else if (range >= 0.001) {
  36781. limit = 0.001;
  36782. } else if (range >= 0.0001) {
  36783. limit = 0.0001;
  36784. } else if (range >= 0.00001) {
  36785. limit = 0.00001;
  36786. } else {
  36787. limit = 0.000001;
  36788. }
  36789. return {
  36790. minRange: findRange(minData, 'lower', limit),
  36791. maxRange: findRange(maxData, 'upper', limit)
  36792. };
  36793. }
  36794. function measureText(text) {
  36795. var fontSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : config.fontSize;
  36796. text = String(text);
  36797. var text = text.split('');
  36798. var width = 0;
  36799. for (var i = 0; i < text.length; i++) {
  36800. var item = text[i];
  36801. if (/[a-zA-Z]/.test(item)) {
  36802. width += 7;
  36803. } else if (/[0-9]/.test(item)) {
  36804. width += 5.5;
  36805. } else if (/\./.test(item)) {
  36806. width += 2.7;
  36807. } else if (/-/.test(item)) {
  36808. width += 3.25;
  36809. } else if (/[\u4e00-\u9fa5]/.test(item)) {
  36810. width += 10;
  36811. } else if (/\(|\)/.test(item)) {
  36812. width += 3.73;
  36813. } else if (/\s/.test(item)) {
  36814. width += 2.5;
  36815. } else if (/%/.test(item)) {
  36816. width += 8;
  36817. } else {
  36818. width += 10;
  36819. }
  36820. }
  36821. return width * fontSize / 10;
  36822. }
  36823. function dataCombine(series) {
  36824. return series.reduce(function (a, b) {
  36825. return (a.data ? a.data : a).concat(b.data);
  36826. }, []);
  36827. }
  36828. function dataCombineStack(series, len) {
  36829. var sum = new Array(len);
  36830. for (var j = 0; j < sum.length; j++) {
  36831. sum[j] = 0;
  36832. }
  36833. for (var i = 0; i < series.length; i++) {
  36834. for (var j = 0; j < sum.length; j++) {
  36835. sum[j] += series[i].data[j];
  36836. }
  36837. }
  36838. return series.reduce(function (a, b) {
  36839. return (a.data ? a.data : a).concat(b.data).concat(sum);
  36840. }, []);
  36841. }
  36842. function getTouches(touches, opts, e) {
  36843. var x, y;
  36844. if (touches.clientX) {
  36845. if (opts.rotate) {
  36846. y = opts.height - touches.clientX * opts.pixelRatio;
  36847. x = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pixelRatio / 2 * (opts.pixelRatio - 1)) * opts.pixelRatio;
  36848. } else {
  36849. x = touches.clientX * opts.pixelRatio;
  36850. y = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pixelRatio / 2 * (opts.pixelRatio - 1)) * opts.pixelRatio;
  36851. }
  36852. } else {
  36853. if (opts.rotate) {
  36854. y = opts.height - touches.x * opts.pixelRatio;
  36855. x = touches.y * opts.pixelRatio;
  36856. } else {
  36857. x = touches.x * opts.pixelRatio;
  36858. y = touches.y * opts.pixelRatio;
  36859. }
  36860. }
  36861. return {
  36862. x: x,
  36863. y: y
  36864. };
  36865. }
  36866. function getSeriesDataItem(series, index) {
  36867. var data = [];
  36868. for (var i = 0; i < series.length; i++) {
  36869. var item = series[i];
  36870. if (item.data[index] !== null && typeof item.data[index] !== 'undefined' && item.show) {
  36871. var seriesItem = {};
  36872. seriesItem.color = item.color;
  36873. seriesItem.type = item.type;
  36874. seriesItem.style = item.style;
  36875. seriesItem.pointShape = item.pointShape;
  36876. seriesItem.disableLegend = item.disableLegend;
  36877. seriesItem.name = item.name;
  36878. seriesItem.show = item.show;
  36879. seriesItem.data = item.format ? item.format(item.data[index]) : item.data[index];
  36880. data.push(seriesItem);
  36881. }
  36882. }
  36883. return data;
  36884. }
  36885. function getMaxTextListLength(list) {
  36886. var lengthList = list.map(function (item) {
  36887. return measureText(item);
  36888. });
  36889. return Math.max.apply(null, lengthList);
  36890. }
  36891. function getRadarCoordinateSeries(length) {
  36892. var eachAngle = 2 * Math.PI / length;
  36893. var CoordinateSeries = [];
  36894. for (var i = 0; i < length; i++) {
  36895. CoordinateSeries.push(eachAngle * i);
  36896. }
  36897. return CoordinateSeries.map(function (item) {
  36898. return -1 * item + Math.PI / 2;
  36899. });
  36900. }
  36901. function getToolTipData(seriesData, calPoints, index, categories) {
  36902. var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  36903. var textList = seriesData.map(function (item) {
  36904. var titleText = [];
  36905. if (categories) {
  36906. titleText = categories;
  36907. } else {
  36908. titleText = item.data;
  36909. }
  36910. return {
  36911. text: option.format ? option.format(item, titleText[index]) : item.name + ': ' + item.data,
  36912. color: item.color
  36913. };
  36914. });
  36915. var validCalPoints = [];
  36916. var offset = {
  36917. x: 0,
  36918. y: 0
  36919. };
  36920. for (var i = 0; i < calPoints.length; i++) {
  36921. var points = calPoints[i];
  36922. if (typeof points[index] !== 'undefined' && points[index] !== null) {
  36923. validCalPoints.push(points[index]);
  36924. }
  36925. }
  36926. for (var _i = 0; _i < validCalPoints.length; _i++) {
  36927. var item = validCalPoints[_i];
  36928. offset.x = Math.round(item.x);
  36929. offset.y += item.y;
  36930. }
  36931. offset.y /= validCalPoints.length;
  36932. return {
  36933. textList: textList,
  36934. offset: offset
  36935. };
  36936. }
  36937. function getMixToolTipData(seriesData, calPoints, index, categories) {
  36938. var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  36939. var textList = seriesData.map(function (item) {
  36940. return {
  36941. text: option.format ? option.format(item, categories[index]) : item.name + ': ' + item.data,
  36942. color: item.color,
  36943. disableLegend: item.disableLegend ? true : false
  36944. };
  36945. });
  36946. textList = textList.filter(function (item) {
  36947. if (item.disableLegend !== true) {
  36948. return item;
  36949. }
  36950. });
  36951. var validCalPoints = [];
  36952. var offset = {
  36953. x: 0,
  36954. y: 0
  36955. };
  36956. for (var i = 0; i < calPoints.length; i++) {
  36957. var points = calPoints[i];
  36958. if (typeof points[index] !== 'undefined' && points[index] !== null) {
  36959. validCalPoints.push(points[index]);
  36960. }
  36961. }
  36962. for (var _i2 = 0; _i2 < validCalPoints.length; _i2++) {
  36963. var item = validCalPoints[_i2];
  36964. offset.x = Math.round(item.x);
  36965. offset.y += item.y;
  36966. }
  36967. offset.y /= validCalPoints.length;
  36968. return {
  36969. textList: textList,
  36970. offset: offset
  36971. };
  36972. }
  36973. function getCandleToolTipData(series, seriesData, calPoints, index, categories, extra) {
  36974. var option = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
  36975. var upColor = extra.color.upFill;
  36976. var downColor = extra.color.downFill;
  36977. //颜色顺序为开盘,收盘,最低,最高
  36978. var color = [upColor, upColor, downColor, upColor];
  36979. var textList = [];
  36980. var text0 = {
  36981. text: categories[index],
  36982. color: null
  36983. };
  36984. textList.push(text0);
  36985. seriesData.map(function (item) {
  36986. if (index == 0) {
  36987. if (item.data[1] - item.data[0] < 0) {
  36988. color[1] = downColor;
  36989. } else {
  36990. color[1] = upColor;
  36991. }
  36992. } else {
  36993. if (item.data[0] < series[index - 1][1]) {
  36994. color[0] = downColor;
  36995. }
  36996. if (item.data[1] < item.data[0]) {
  36997. color[1] = downColor;
  36998. }
  36999. if (item.data[2] > series[index - 1][1]) {
  37000. color[2] = upColor;
  37001. }
  37002. if (item.data[3] < series[index - 1][1]) {
  37003. color[3] = downColor;
  37004. }
  37005. }
  37006. var text1 = {
  37007. text: '开盘:' + item.data[0],
  37008. color: color[0]
  37009. };
  37010. var text2 = {
  37011. text: '收盘:' + item.data[1],
  37012. color: color[1]
  37013. };
  37014. var text3 = {
  37015. text: '最低:' + item.data[2],
  37016. color: color[2]
  37017. };
  37018. var text4 = {
  37019. text: '最高:' + item.data[3],
  37020. color: color[3]
  37021. };
  37022. textList.push(text1, text2, text3, text4);
  37023. });
  37024. var validCalPoints = [];
  37025. var offset = {
  37026. x: 0,
  37027. y: 0
  37028. };
  37029. for (var i = 0; i < calPoints.length; i++) {
  37030. var points = calPoints[i];
  37031. if (typeof points[index] !== 'undefined' && points[index] !== null) {
  37032. validCalPoints.push(points[index]);
  37033. }
  37034. }
  37035. offset.x = Math.round(validCalPoints[0][0].x);
  37036. return {
  37037. textList: textList,
  37038. offset: offset
  37039. };
  37040. }
  37041. function filterSeries(series) {
  37042. var tempSeries = [];
  37043. for (var i = 0; i < series.length; i++) {
  37044. if (series[i].show == true) {
  37045. tempSeries.push(series[i]);
  37046. }
  37047. }
  37048. return tempSeries;
  37049. }
  37050. function findCurrentIndex(currentPoints, calPoints, opts, config) {
  37051. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  37052. var currentIndex = -1;
  37053. var spacing = opts.chartData.eachSpacing / 2;
  37054. var xAxisPoints = [];
  37055. if (calPoints && calPoints.length > 0) {
  37056. for (var i = 1; i < opts.chartData.xAxisPoints.length; i++) {
  37057. xAxisPoints.push(opts.chartData.xAxisPoints[i] - spacing);
  37058. }
  37059. if ((opts.type == 'line' || opts.type == 'area') && opts.xAxis.boundaryGap == 'justify') {
  37060. spacing = opts.chartData.eachSpacing / 2;
  37061. }
  37062. if (!opts.categories) {
  37063. spacing = 0;
  37064. }
  37065. if (isInExactChartArea(currentPoints, opts, config)) {
  37066. xAxisPoints.forEach(function (item, index) {
  37067. if (currentPoints.x + offset + spacing > item) {
  37068. currentIndex = index;
  37069. }
  37070. });
  37071. }
  37072. }
  37073. return currentIndex;
  37074. }
  37075. function findLegendIndex(currentPoints, legendData, opts) {
  37076. var currentIndex = -1;
  37077. if (isInExactLegendArea(currentPoints, legendData.area)) {
  37078. var points = legendData.points;
  37079. var index = -1;
  37080. for (var i = 0, len = points.length; i < len; i++) {
  37081. var item = points[i];
  37082. for (var j = 0; j < item.length; j++) {
  37083. index += 1;
  37084. var area = item[j]['area'];
  37085. if (currentPoints.x > area[0] && currentPoints.x < area[2] && currentPoints.y > area[1] && currentPoints.y < area[3]) {
  37086. currentIndex = index;
  37087. break;
  37088. }
  37089. }
  37090. }
  37091. return currentIndex;
  37092. }
  37093. return currentIndex;
  37094. }
  37095. function isInExactLegendArea(currentPoints, area) {
  37096. return currentPoints.x > area.start.x && currentPoints.x < area.end.x && currentPoints.y > area.start.y && currentPoints.y < area.end.y;
  37097. }
  37098. function isInExactChartArea(currentPoints, opts, config) {
  37099. return currentPoints.x <= opts.width - opts.area[1] + 10 && currentPoints.x >= opts.area[3] - 10 && currentPoints.y >= opts.area[0] && currentPoints.y <= opts.height - opts.area[2];
  37100. }
  37101. function findRadarChartCurrentIndex(currentPoints, radarData, count) {
  37102. var eachAngleArea = 2 * Math.PI / count;
  37103. var currentIndex = -1;
  37104. if (isInExactPieChartArea(currentPoints, radarData.center, radarData.radius)) {
  37105. var fixAngle = function fixAngle(angle) {
  37106. if (angle < 0) {
  37107. angle += 2 * Math.PI;
  37108. }
  37109. if (angle > 2 * Math.PI) {
  37110. angle -= 2 * Math.PI;
  37111. }
  37112. return angle;
  37113. };
  37114. var angle = Math.atan2(radarData.center.y - currentPoints.y, currentPoints.x - radarData.center.x);
  37115. angle = -1 * angle;
  37116. if (angle < 0) {
  37117. angle += 2 * Math.PI;
  37118. }
  37119. var angleList = radarData.angleList.map(function (item) {
  37120. item = fixAngle(-1 * item);
  37121. return item;
  37122. });
  37123. angleList.forEach(function (item, index) {
  37124. var rangeStart = fixAngle(item - eachAngleArea / 2);
  37125. var rangeEnd = fixAngle(item + eachAngleArea / 2);
  37126. if (rangeEnd < rangeStart) {
  37127. rangeEnd += 2 * Math.PI;
  37128. }
  37129. if (angle >= rangeStart && angle <= rangeEnd || angle + 2 * Math.PI >= rangeStart && angle + 2 * Math.PI <= rangeEnd) {
  37130. currentIndex = index;
  37131. }
  37132. });
  37133. }
  37134. return currentIndex;
  37135. }
  37136. function findFunnelChartCurrentIndex(currentPoints, funnelData) {
  37137. var currentIndex = -1;
  37138. for (var i = 0, len = funnelData.series.length; i < len; i++) {
  37139. var item = funnelData.series[i];
  37140. if (currentPoints.x > item.funnelArea[0] && currentPoints.x < item.funnelArea[2] && currentPoints.y > item.funnelArea[1] && currentPoints.y < item.funnelArea[3]) {
  37141. currentIndex = i;
  37142. break;
  37143. }
  37144. }
  37145. return currentIndex;
  37146. }
  37147. function findWordChartCurrentIndex(currentPoints, wordData) {
  37148. var currentIndex = -1;
  37149. for (var i = 0, len = wordData.length; i < len; i++) {
  37150. var item = wordData[i];
  37151. if (currentPoints.x > item.area[0] && currentPoints.x < item.area[2] && currentPoints.y > item.area[1] && currentPoints.y < item.area[3]) {
  37152. currentIndex = i;
  37153. break;
  37154. }
  37155. }
  37156. return currentIndex;
  37157. }
  37158. function findMapChartCurrentIndex(currentPoints, opts) {
  37159. var currentIndex = -1;
  37160. var cData = opts.chartData.mapData;
  37161. var data = opts.series;
  37162. var tmp = pointToCoordinate(currentPoints.y, currentPoints.x, cData.bounds, cData.scale, cData.xoffset, cData.yoffset);
  37163. var poi = [tmp.x, tmp.y];
  37164. for (var i = 0, len = data.length; i < len; i++) {
  37165. var item = data[i].geometry.coordinates;
  37166. if (isPoiWithinPoly(poi, item)) {
  37167. currentIndex = i;
  37168. break;
  37169. }
  37170. }
  37171. return currentIndex;
  37172. }
  37173. function findPieChartCurrentIndex(currentPoints, pieData) {
  37174. var currentIndex = -1;
  37175. if (isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  37176. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  37177. angle = -angle;
  37178. for (var i = 0, len = pieData.series.length; i < len; i++) {
  37179. var item = pieData.series[i];
  37180. if (isInAngleRange(angle, item._start_, item._start_ + item._proportion_ * 2 * Math.PI)) {
  37181. currentIndex = i;
  37182. break;
  37183. }
  37184. }
  37185. }
  37186. return currentIndex;
  37187. }
  37188. function isInExactPieChartArea(currentPoints, center, radius) {
  37189. return Math.pow(currentPoints.x - center.x, 2) + Math.pow(currentPoints.y - center.y, 2) <= Math.pow(radius, 2);
  37190. }
  37191. function splitPoints(points) {
  37192. var newPoints = [];
  37193. var items = [];
  37194. points.forEach(function (item, index) {
  37195. if (item !== null) {
  37196. items.push(item);
  37197. } else {
  37198. if (items.length) {
  37199. newPoints.push(items);
  37200. }
  37201. items = [];
  37202. }
  37203. });
  37204. if (items.length) {
  37205. newPoints.push(items);
  37206. }
  37207. return newPoints;
  37208. }
  37209. function calLegendData(series, opts, config, chartData) {
  37210. var legendData = {
  37211. area: {
  37212. start: {
  37213. x: 0,
  37214. y: 0
  37215. },
  37216. end: {
  37217. x: 0,
  37218. y: 0
  37219. },
  37220. width: 0,
  37221. height: 0,
  37222. wholeWidth: 0,
  37223. wholeHeight: 0
  37224. },
  37225. points: [],
  37226. widthArr: [],
  37227. heightArr: []
  37228. };
  37229. if (opts.legend.show === false) {
  37230. chartData.legendData = legendData;
  37231. return legendData;
  37232. }
  37233. var padding = opts.legend.padding;
  37234. var margin = opts.legend.margin;
  37235. var fontSize = opts.legend.fontSize;
  37236. var shapeWidth = 15 * opts.pixelRatio;
  37237. var shapeRight = 5 * opts.pixelRatio;
  37238. var lineHeight = Math.max(opts.legend.lineHeight * opts.pixelRatio, fontSize);
  37239. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  37240. var legendList = [];
  37241. var widthCount = 0;
  37242. var widthCountArr = [];
  37243. var currentRow = [];
  37244. for (var i = 0; i < series.length; i++) {
  37245. var item = series[i];
  37246. var itemWidth = shapeWidth + shapeRight + measureText(item.name || 'undefined', fontSize) + opts.legend.itemGap;
  37247. if (widthCount + itemWidth > opts.width - opts.padding[1] - opts.padding[3]) {
  37248. legendList.push(currentRow);
  37249. widthCountArr.push(widthCount - opts.legend.itemGap);
  37250. widthCount = itemWidth;
  37251. currentRow = [item];
  37252. } else {
  37253. widthCount += itemWidth;
  37254. currentRow.push(item);
  37255. }
  37256. }
  37257. if (currentRow.length) {
  37258. legendList.push(currentRow);
  37259. widthCountArr.push(widthCount - opts.legend.itemGap);
  37260. legendData.widthArr = widthCountArr;
  37261. var legendWidth = Math.max.apply(null, widthCountArr);
  37262. switch (opts.legend.float) {
  37263. case 'left':
  37264. legendData.area.start.x = opts.padding[3];
  37265. legendData.area.end.x = opts.padding[3] + 2 * padding;
  37266. break;
  37267. case 'right':
  37268. legendData.area.start.x = opts.width - opts.padding[1] - legendWidth - 2 * padding;
  37269. legendData.area.end.x = opts.width - opts.padding[1];
  37270. break;
  37271. default:
  37272. legendData.area.start.x = (opts.width - legendWidth) / 2 - padding;
  37273. legendData.area.end.x = (opts.width + legendWidth) / 2 + padding;
  37274. }
  37275. legendData.area.width = legendWidth + 2 * padding;
  37276. legendData.area.wholeWidth = legendWidth + 2 * padding;
  37277. legendData.area.height = legendList.length * lineHeight + 2 * padding;
  37278. legendData.area.wholeHeight = legendList.length * lineHeight + 2 * padding + 2 * margin;
  37279. legendData.points = legendList;
  37280. }
  37281. } else {
  37282. var len = series.length;
  37283. var maxHeight = opts.height - opts.padding[0] - opts.padding[2] - 2 * margin - 2 * padding;
  37284. var maxLength = Math.min(Math.floor(maxHeight / lineHeight), len);
  37285. legendData.area.height = maxLength * lineHeight + padding * 2;
  37286. legendData.area.wholeHeight = maxLength * lineHeight + padding * 2;
  37287. switch (opts.legend.float) {
  37288. case 'top':
  37289. legendData.area.start.y = opts.padding[0] + margin;
  37290. legendData.area.end.y = opts.padding[0] + margin + legendData.area.height;
  37291. break;
  37292. case 'bottom':
  37293. legendData.area.start.y = opts.height - opts.padding[2] - margin - legendData.area.height;
  37294. legendData.area.end.y = opts.height - opts.padding[2] - margin;
  37295. break;
  37296. default:
  37297. legendData.area.start.y = (opts.height - legendData.area.height) / 2;
  37298. legendData.area.end.y = (opts.height + legendData.area.height) / 2;
  37299. }
  37300. var lineNum = len % maxLength === 0 ? len / maxLength : Math.floor(len / maxLength + 1);
  37301. var _currentRow = [];
  37302. for (var _i3 = 0; _i3 < lineNum; _i3++) {
  37303. var temp = series.slice(_i3 * maxLength, _i3 * maxLength + maxLength);
  37304. _currentRow.push(temp);
  37305. }
  37306. legendData.points = _currentRow;
  37307. if (_currentRow.length) {
  37308. for (var _i4 = 0; _i4 < _currentRow.length; _i4++) {
  37309. var _item = _currentRow[_i4];
  37310. var maxWidth = 0;
  37311. for (var j = 0; j < _item.length; j++) {
  37312. var _itemWidth = shapeWidth + shapeRight + measureText(_item[j].name || 'undefined', fontSize) + opts.legend.itemGap;
  37313. if (_itemWidth > maxWidth) {
  37314. maxWidth = _itemWidth;
  37315. }
  37316. }
  37317. legendData.widthArr.push(maxWidth);
  37318. legendData.heightArr.push(_item.length * lineHeight + padding * 2);
  37319. }
  37320. var _legendWidth = 0;
  37321. for (var _i5 = 0; _i5 < legendData.widthArr.length; _i5++) {
  37322. _legendWidth += legendData.widthArr[_i5];
  37323. }
  37324. legendData.area.width = _legendWidth - opts.legend.itemGap + 2 * padding;
  37325. legendData.area.wholeWidth = legendData.area.width + padding;
  37326. }
  37327. }
  37328. switch (opts.legend.position) {
  37329. case 'top':
  37330. legendData.area.start.y = opts.padding[0] + margin;
  37331. legendData.area.end.y = opts.padding[0] + margin + legendData.area.height;
  37332. break;
  37333. case 'bottom':
  37334. legendData.area.start.y = opts.height - opts.padding[2] - legendData.area.height - margin;
  37335. legendData.area.end.y = opts.height - opts.padding[2] - margin;
  37336. break;
  37337. case 'left':
  37338. legendData.area.start.x = opts.padding[3];
  37339. legendData.area.end.x = opts.padding[3] + legendData.area.width;
  37340. break;
  37341. case 'right':
  37342. legendData.area.start.x = opts.width - opts.padding[1] - legendData.area.width;
  37343. legendData.area.end.x = opts.width - opts.padding[1];
  37344. break;
  37345. }
  37346. chartData.legendData = legendData;
  37347. return legendData;
  37348. }
  37349. function calCategoriesData(categories, opts, config, eachSpacing) {
  37350. var result = {
  37351. angle: 0,
  37352. xAxisHeight: config.xAxisHeight
  37353. };
  37354. var categoriesTextLenth = categories.map(function (item) {
  37355. return measureText(item, opts.xAxis.fontSize || config.fontSize);
  37356. });
  37357. var maxTextLength = Math.max.apply(this, categoriesTextLenth);
  37358. if (opts.xAxis.rotateLabel == true && maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  37359. result.angle = 45 * Math.PI / 180;
  37360. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  37361. }
  37362. return result;
  37363. }
  37364. function getXAxisTextList(series, opts, config) {
  37365. var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
  37366. var data = dataCombine(series);
  37367. var sorted = [];
  37368. // remove null from data
  37369. data = data.filter(function (item) {
  37370. //return item !== null;
  37371. if (_typeof(item) === 'object' && item !== null) {
  37372. if (item.constructor.toString().indexOf('Array') > -1) {
  37373. return item !== null;
  37374. } else {
  37375. return item.value !== null;
  37376. }
  37377. } else {
  37378. return item !== null;
  37379. }
  37380. });
  37381. data.map(function (item) {
  37382. if (_typeof(item) === 'object') {
  37383. if (item.constructor.toString().indexOf('Array') > -1) {
  37384. if (opts.type == 'candle') {
  37385. item.map(function (subitem) {
  37386. sorted.push(subitem);
  37387. });
  37388. } else {
  37389. sorted.push(item[0]);
  37390. }
  37391. } else {
  37392. sorted.push(item.value);
  37393. }
  37394. } else {
  37395. sorted.push(item);
  37396. }
  37397. });
  37398. var minData = 0;
  37399. var maxData = 0;
  37400. if (sorted.length > 0) {
  37401. minData = Math.min.apply(this, sorted);
  37402. maxData = Math.max.apply(this, sorted);
  37403. }
  37404. //为了兼容v1.9.0之前的项目
  37405. if (index > -1) {
  37406. if (typeof opts.xAxis.data[index].min === 'number') {
  37407. minData = Math.min(opts.xAxis.data[index].min, minData);
  37408. }
  37409. if (typeof opts.xAxis.data[index].max === 'number') {
  37410. maxData = Math.max(opts.xAxis.data[index].max, maxData);
  37411. }
  37412. } else {
  37413. if (typeof opts.xAxis.min === 'number') {
  37414. minData = Math.min(opts.xAxis.min, minData);
  37415. }
  37416. if (typeof opts.xAxis.max === 'number') {
  37417. maxData = Math.max(opts.xAxis.max, maxData);
  37418. }
  37419. }
  37420. if (minData === maxData) {
  37421. var rangeSpan = maxData || 10;
  37422. maxData += rangeSpan;
  37423. }
  37424. //var dataRange = getDataRange(minData, maxData);
  37425. var minRange = minData;
  37426. var maxRange = maxData;
  37427. var range = [];
  37428. var eachRange = (maxRange - minRange) / opts.xAxis.splitNumber;
  37429. for (var i = 0; i <= opts.xAxis.splitNumber; i++) {
  37430. range.push(minRange + eachRange * i);
  37431. }
  37432. return range;
  37433. }
  37434. function calXAxisData(series, opts, config) {
  37435. var result = {
  37436. angle: 0,
  37437. xAxisHeight: config.xAxisHeight
  37438. };
  37439. result.ranges = getXAxisTextList(series, opts, config);
  37440. result.rangesFormat = result.ranges.map(function (item) {
  37441. item = opts.xAxis.format ? opts.xAxis.format(item) : util.toFixed(item, 2);
  37442. return item;
  37443. });
  37444. var xAxisScaleValues = result.ranges.map(function (item) {
  37445. // 如果刻度值是浮点数,则保留两位小数
  37446. item = util.toFixed(item, 2);
  37447. // 若有自定义格式则调用自定义的格式化函数
  37448. item = opts.xAxis.format ? opts.xAxis.format(Number(item)) : item;
  37449. return item;
  37450. });
  37451. result = Object.assign(result, getXAxisPoints(xAxisScaleValues, opts, config));
  37452. // 计算X轴刻度的属性譬如每个刻度的间隔,刻度的起始点\结束点以及总长
  37453. var eachSpacing = result.eachSpacing;
  37454. var textLength = xAxisScaleValues.map(function (item) {
  37455. return measureText(item);
  37456. });
  37457. // get max length of categories text
  37458. var maxTextLength = Math.max.apply(this, textLength);
  37459. // 如果刻度值文本内容过长,则将其逆时针旋转45°
  37460. if (maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  37461. result.angle = 45 * Math.PI / 180;
  37462. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  37463. }
  37464. if (opts.xAxis.disabled === true) {
  37465. result.xAxisHeight = 0;
  37466. }
  37467. return result;
  37468. }
  37469. function getRadarDataPoints(angleList, center, radius, series, opts) {
  37470. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  37471. var radarOption = opts.extra.radar || {};
  37472. radarOption.max = radarOption.max || 0;
  37473. var maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series)));
  37474. var data = [];
  37475. var _loop2 = function _loop2(i) {
  37476. var each = series[i];
  37477. var listItem = {};
  37478. listItem.color = each.color;
  37479. listItem.legendShape = each.legendShape;
  37480. listItem.pointShape = each.pointShape;
  37481. listItem.data = [];
  37482. each.data.forEach(function (item, index) {
  37483. var tmp = {};
  37484. tmp.angle = angleList[index];
  37485. tmp.proportion = item / maxData;
  37486. tmp.position = convertCoordinateOrigin(radius * tmp.proportion * process * Math.cos(tmp.angle), radius * tmp.proportion * process * Math.sin(tmp.angle), center);
  37487. listItem.data.push(tmp);
  37488. });
  37489. data.push(listItem);
  37490. };
  37491. for (var i = 0; i < series.length; i++) {
  37492. _loop2(i);
  37493. }
  37494. return data;
  37495. }
  37496. function getPieDataPoints(series, radius) {
  37497. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  37498. var count = 0;
  37499. var _start_ = 0;
  37500. for (var i = 0; i < series.length; i++) {
  37501. var item = series[i];
  37502. item.data = item.data === null ? 0 : item.data;
  37503. count += item.data;
  37504. }
  37505. for (var _i6 = 0; _i6 < series.length; _i6++) {
  37506. var _item2 = series[_i6];
  37507. _item2.data = _item2.data === null ? 0 : _item2.data;
  37508. if (count === 0) {
  37509. _item2._proportion_ = 1 / series.length * process;
  37510. } else {
  37511. _item2._proportion_ = _item2.data / count * process;
  37512. }
  37513. _item2._radius_ = radius;
  37514. }
  37515. for (var _i7 = 0; _i7 < series.length; _i7++) {
  37516. var _item3 = series[_i7];
  37517. _item3._start_ = _start_;
  37518. _start_ += 2 * _item3._proportion_ * Math.PI;
  37519. }
  37520. return series;
  37521. }
  37522. function getFunnelDataPoints(series, radius) {
  37523. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  37524. series = series.sort(function (a, b) {
  37525. return parseInt(b.data) - parseInt(a.data);
  37526. });
  37527. for (var i = 0; i < series.length; i++) {
  37528. series[i].radius = series[i].data / series[0].data * radius * process;
  37529. series[i]._proportion_ = series[i].data / series[0].data;
  37530. }
  37531. return series.reverse();
  37532. }
  37533. function getRoseDataPoints(series, type, minRadius, radius) {
  37534. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37535. var count = 0;
  37536. var _start_ = 0;
  37537. var dataArr = [];
  37538. for (var i = 0; i < series.length; i++) {
  37539. var item = series[i];
  37540. item.data = item.data === null ? 0 : item.data;
  37541. count += item.data;
  37542. dataArr.push(item.data);
  37543. }
  37544. var minData = Math.min.apply(null, dataArr);
  37545. var maxData = Math.max.apply(null, dataArr);
  37546. var radiusLength = radius - minRadius;
  37547. for (var _i8 = 0; _i8 < series.length; _i8++) {
  37548. var _item4 = series[_i8];
  37549. _item4.data = _item4.data === null ? 0 : _item4.data;
  37550. if (count === 0 || type == 'area') {
  37551. _item4._proportion_ = _item4.data / count * process;
  37552. _item4._rose_proportion_ = 1 / series.length * process;
  37553. } else {
  37554. _item4._proportion_ = _item4.data / count * process;
  37555. _item4._rose_proportion_ = _item4.data / count * process;
  37556. }
  37557. _item4._radius_ = minRadius + radiusLength * ((_item4.data - minData) / (maxData - minData));
  37558. }
  37559. for (var _i9 = 0; _i9 < series.length; _i9++) {
  37560. var _item5 = series[_i9];
  37561. _item5._start_ = _start_;
  37562. _start_ += 2 * _item5._rose_proportion_ * Math.PI;
  37563. }
  37564. return series;
  37565. }
  37566. function getArcbarDataPoints(series, arcbarOption) {
  37567. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  37568. if (process == 1) {
  37569. process = 0.999999;
  37570. }
  37571. for (var i = 0; i < series.length; i++) {
  37572. var item = series[i];
  37573. item.data = item.data === null ? 0 : item.data;
  37574. var totalAngle = void 0;
  37575. if (arcbarOption.type == 'circle') {
  37576. totalAngle = 2;
  37577. } else {
  37578. if (arcbarOption.endAngle < arcbarOption.startAngle) {
  37579. totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle;
  37580. } else {
  37581. totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;
  37582. }
  37583. }
  37584. item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle;
  37585. if (item._proportion_ >= 2) {
  37586. item._proportion_ = item._proportion_ % 2;
  37587. }
  37588. }
  37589. return series;
  37590. }
  37591. function getGaugeAxisPoints(categories, startAngle, endAngle) {
  37592. var totalAngle = startAngle - endAngle + 1;
  37593. var tempStartAngle = startAngle;
  37594. for (var i = 0; i < categories.length; i++) {
  37595. categories[i].value = categories[i].value === null ? 0 : categories[i].value;
  37596. categories[i]._startAngle_ = tempStartAngle;
  37597. categories[i]._endAngle_ = totalAngle * categories[i].value + startAngle;
  37598. if (categories[i]._endAngle_ >= 2) {
  37599. categories[i]._endAngle_ = categories[i]._endAngle_ % 2;
  37600. }
  37601. tempStartAngle = categories[i]._endAngle_;
  37602. }
  37603. return categories;
  37604. }
  37605. function getGaugeDataPoints(series, categories, gaugeOption) {
  37606. var process = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
  37607. for (var i = 0; i < series.length; i++) {
  37608. var item = series[i];
  37609. item.data = item.data === null ? 0 : item.data;
  37610. if (gaugeOption.pointer.color == 'auto') {
  37611. for (var _i10 = 0; _i10 < categories.length; _i10++) {
  37612. if (item.data <= categories[_i10].value) {
  37613. item.color = categories[_i10].color;
  37614. break;
  37615. }
  37616. }
  37617. } else {
  37618. item.color = gaugeOption.pointer.color;
  37619. }
  37620. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  37621. item._endAngle_ = totalAngle * item.data + gaugeOption.startAngle;
  37622. item._oldAngle_ = gaugeOption.oldAngle;
  37623. if (gaugeOption.oldAngle < gaugeOption.endAngle) {
  37624. item._oldAngle_ += 2;
  37625. }
  37626. if (item.data >= gaugeOption.oldData) {
  37627. item._proportion_ = (item._endAngle_ - item._oldAngle_) * process + gaugeOption.oldAngle;
  37628. } else {
  37629. item._proportion_ = item._oldAngle_ - (item._oldAngle_ - item._endAngle_) * process;
  37630. }
  37631. if (item._proportion_ >= 2) {
  37632. item._proportion_ = item._proportion_ % 2;
  37633. }
  37634. }
  37635. return series;
  37636. }
  37637. function getPieTextMaxLength(series) {
  37638. series = getPieDataPoints(series);
  37639. var maxLength = 0;
  37640. for (var i = 0; i < series.length; i++) {
  37641. var item = series[i];
  37642. var text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%';
  37643. maxLength = Math.max(maxLength, measureText(text));
  37644. }
  37645. return maxLength;
  37646. }
  37647. function fixColumeData(points, eachSpacing, columnLen, index, config, opts) {
  37648. return points.map(function (item) {
  37649. if (item === null) {
  37650. return null;
  37651. }
  37652. item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / columnLen);
  37653. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  37654. item.width = Math.min(item.width, +opts.extra.column.width);
  37655. }
  37656. if (item.width <= 0) {
  37657. item.width = 1;
  37658. }
  37659. item.x += (index + 0.5 - columnLen / 2) * item.width;
  37660. return item;
  37661. });
  37662. }
  37663. function fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) {
  37664. return points.map(function (item) {
  37665. if (item === null) {
  37666. return null;
  37667. }
  37668. item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / 2);
  37669. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  37670. item.width = Math.min(item.width, +opts.extra.column.width);
  37671. }
  37672. if (index > 0) {
  37673. item.width -= 2 * border;
  37674. }
  37675. return item;
  37676. });
  37677. }
  37678. function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  37679. return points.map(function (item, indexn) {
  37680. if (item === null) {
  37681. return null;
  37682. }
  37683. item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / 2);
  37684. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  37685. item.width = Math.min(item.width, +opts.extra.column.width);
  37686. }
  37687. return item;
  37688. });
  37689. }
  37690. function getXAxisPoints(categories, opts, config) {
  37691. var spacingValid = opts.width - opts.area[1] - opts.area[3];
  37692. var dataCount = opts.enableScroll ? Math.min(opts.xAxis.itemCount, categories.length) : categories.length;
  37693. if ((opts.type == 'line' || opts.type == 'area') && dataCount > 1 && opts.xAxis.boundaryGap == 'justify') {
  37694. dataCount -= 1;
  37695. }
  37696. var eachSpacing = spacingValid / dataCount;
  37697. var xAxisPoints = [];
  37698. var startX = opts.area[3];
  37699. var endX = opts.width - opts.area[1];
  37700. categories.forEach(function (item, index) {
  37701. xAxisPoints.push(startX + index * eachSpacing);
  37702. });
  37703. if (opts.xAxis.boundaryGap !== 'justify') {
  37704. if (opts.enableScroll === true) {
  37705. xAxisPoints.push(startX + categories.length * eachSpacing);
  37706. } else {
  37707. xAxisPoints.push(endX);
  37708. }
  37709. }
  37710. return {
  37711. xAxisPoints: xAxisPoints,
  37712. startX: startX,
  37713. endX: endX,
  37714. eachSpacing: eachSpacing
  37715. };
  37716. }
  37717. function getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  37718. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  37719. var points = [];
  37720. var validHeight = opts.height - opts.area[0] - opts.area[2];
  37721. data.forEach(function (item, index) {
  37722. if (item === null) {
  37723. points.push(null);
  37724. } else {
  37725. var cPoints = [];
  37726. item.forEach(function (items, indexs) {
  37727. var point = {};
  37728. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  37729. var value = items.value || items;
  37730. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37731. height *= process;
  37732. point.y = opts.height - Math.round(height) - opts.area[2];
  37733. cPoints.push(point);
  37734. });
  37735. points.push(cPoints);
  37736. }
  37737. });
  37738. return points;
  37739. }
  37740. function getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  37741. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  37742. var boundaryGap = 'center';
  37743. if (opts.type == 'line' || opts.type == 'area') {
  37744. boundaryGap = opts.xAxis.boundaryGap;
  37745. }
  37746. var points = [];
  37747. var validHeight = opts.height - opts.area[0] - opts.area[2];
  37748. var validWidth = opts.width - opts.area[1] - opts.area[3];
  37749. data.forEach(function (item, index) {
  37750. if (item === null) {
  37751. points.push(null);
  37752. } else {
  37753. var point = {};
  37754. point.color = item.color;
  37755. point.x = xAxisPoints[index];
  37756. var value = item;
  37757. if (_typeof(item) === 'object' && item !== null) {
  37758. if (item.constructor.toString().indexOf('Array') > -1) {
  37759. var xranges, xminRange, xmaxRange;
  37760. xranges = [].concat(opts.chartData.xAxisData.ranges);
  37761. xminRange = xranges.shift();
  37762. xmaxRange = xranges.pop();
  37763. value = item[1];
  37764. point.x = opts.area[3] + validWidth * (item[0] - xminRange) / (xmaxRange - xminRange);
  37765. } else {
  37766. value = item.value;
  37767. }
  37768. }
  37769. if (boundaryGap == 'center') {
  37770. point.x += Math.round(eachSpacing / 2);
  37771. }
  37772. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37773. height *= process;
  37774. point.y = opts.height - Math.round(height) - opts.area[2];
  37775. points.push(point);
  37776. }
  37777. });
  37778. return points;
  37779. }
  37780. function getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  37781. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  37782. var points = [];
  37783. var validHeight = opts.height - opts.area[0] - opts.area[2];
  37784. data.forEach(function (item, index) {
  37785. if (item === null) {
  37786. points.push(null);
  37787. } else {
  37788. var point = {};
  37789. point.color = item.color;
  37790. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  37791. if (seriesIndex > 0) {
  37792. var value = 0;
  37793. for (var i = 0; i <= seriesIndex; i++) {
  37794. value += stackSeries[i].data[index];
  37795. }
  37796. var value0 = value - item;
  37797. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37798. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  37799. } else {
  37800. var value = item;
  37801. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37802. var height0 = 0;
  37803. }
  37804. var heightc = height0;
  37805. height *= process;
  37806. heightc *= process;
  37807. point.y = opts.height - Math.round(height) - opts.area[2];
  37808. point.y0 = opts.height - Math.round(heightc) - opts.area[2];
  37809. points.push(point);
  37810. }
  37811. });
  37812. return points;
  37813. }
  37814. function getYAxisTextList(series, opts, config, stack) {
  37815. var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
  37816. var data;
  37817. if (stack == 'stack') {
  37818. data = dataCombineStack(series, opts.categories.length);
  37819. } else {
  37820. data = dataCombine(series);
  37821. }
  37822. var sorted = [];
  37823. // remove null from data
  37824. data = data.filter(function (item) {
  37825. //return item !== null;
  37826. if (_typeof(item) === 'object' && item !== null) {
  37827. if (item.constructor.toString().indexOf('Array') > -1) {
  37828. return item !== null;
  37829. } else {
  37830. return item.value !== null;
  37831. }
  37832. } else {
  37833. return item !== null;
  37834. }
  37835. });
  37836. data.map(function (item) {
  37837. if (_typeof(item) === 'object') {
  37838. if (item.constructor.toString().indexOf('Array') > -1) {
  37839. if (opts.type == 'candle') {
  37840. item.map(function (subitem) {
  37841. sorted.push(subitem);
  37842. });
  37843. } else {
  37844. sorted.push(item[1]);
  37845. }
  37846. } else {
  37847. sorted.push(item.value);
  37848. }
  37849. } else {
  37850. sorted.push(item);
  37851. }
  37852. });
  37853. var minData = 0;
  37854. var maxData = 0;
  37855. if (sorted.length > 0) {
  37856. minData = Math.min.apply(this, sorted);
  37857. maxData = Math.max.apply(this, sorted);
  37858. }
  37859. //为了兼容v1.9.0之前的项目
  37860. if (index > -1) {
  37861. if (typeof opts.yAxis.data[index].min === 'number') {
  37862. minData = Math.min(opts.yAxis.data[index].min, minData);
  37863. }
  37864. if (typeof opts.yAxis.data[index].max === 'number') {
  37865. maxData = Math.max(opts.yAxis.data[index].max, maxData);
  37866. }
  37867. } else {
  37868. if (typeof opts.yAxis.min === 'number') {
  37869. minData = Math.min(opts.yAxis.min, minData);
  37870. }
  37871. if (typeof opts.yAxis.max === 'number') {
  37872. maxData = Math.max(opts.yAxis.max, maxData);
  37873. }
  37874. }
  37875. if (minData === maxData) {
  37876. var rangeSpan = maxData || 10;
  37877. maxData += rangeSpan;
  37878. }
  37879. var dataRange = getDataRange(minData, maxData);
  37880. var minRange = dataRange.minRange;
  37881. var maxRange = dataRange.maxRange;
  37882. var range = [];
  37883. var eachRange = (maxRange - minRange) / opts.yAxis.splitNumber;
  37884. for (var i = 0; i <= opts.yAxis.splitNumber; i++) {
  37885. range.push(minRange + eachRange * i);
  37886. }
  37887. return range.reverse();
  37888. }
  37889. function calYAxisData(series, opts, config) {
  37890. //堆叠图重算Y轴
  37891. var columnstyle = assign({}, {
  37892. type: ""
  37893. }, opts.extra.column);
  37894. //如果是多Y轴,重新计算
  37895. var YLength = opts.yAxis.data.length;
  37896. var newSeries = new Array(YLength);
  37897. if (YLength > 0) {
  37898. for (var i = 0; i < YLength; i++) {
  37899. newSeries[i] = [];
  37900. for (var j = 0; j < series.length; j++) {
  37901. if (series[j].index == i) {
  37902. newSeries[i].push(series[j]);
  37903. }
  37904. }
  37905. }
  37906. var rangesArr = new Array(YLength);
  37907. var rangesFormatArr = new Array(YLength);
  37908. var yAxisWidthArr = new Array(YLength);
  37909. var _loop3 = function _loop3(_i11) {
  37910. var yData = opts.yAxis.data[_i11];
  37911. //如果总开关不显示,强制每个Y轴为不显示
  37912. if (opts.yAxis.disabled == true) {
  37913. yData.disabled = true;
  37914. }
  37915. rangesArr[_i11] = getYAxisTextList(newSeries[_i11], opts, config, columnstyle.type, _i11);
  37916. var yAxisFontSizes = yData.fontSize || config.fontSize;
  37917. yAxisWidthArr[_i11] = {
  37918. position: yData.position ? yData.position : 'left',
  37919. width: 0
  37920. };
  37921. rangesFormatArr[_i11] = rangesArr[_i11].map(function (items) {
  37922. items = util.toFixed(items, 6);
  37923. items = yData.format ? yData.format(Number(items)) : items;
  37924. yAxisWidthArr[_i11].width = Math.max(yAxisWidthArr[_i11].width, measureText(items, yAxisFontSizes) + 5);
  37925. return items;
  37926. });
  37927. var calibration = yData.calibration ? 4 * opts.pixelRatio : 0;
  37928. yAxisWidthArr[_i11].width += calibration + 3 * opts.pixelRatio;
  37929. if (yData.disabled === true) {
  37930. yAxisWidthArr[_i11].width = 0;
  37931. }
  37932. };
  37933. for (var _i11 = 0; _i11 < YLength; _i11++) {
  37934. _loop3(_i11);
  37935. }
  37936. } else {
  37937. var rangesArr = new Array(1);
  37938. var rangesFormatArr = new Array(1);
  37939. var yAxisWidthArr = new Array(1);
  37940. rangesArr[0] = getYAxisTextList(series, opts, config, columnstyle.type);
  37941. yAxisWidthArr[0] = {
  37942. position: 'left',
  37943. width: 0
  37944. };
  37945. var yAxisFontSize = opts.yAxis.fontSize || config.fontSize;
  37946. rangesFormatArr[0] = rangesArr[0].map(function (item) {
  37947. item = util.toFixed(item, 6);
  37948. item = opts.yAxis.format ? opts.yAxis.format(Number(item)) : item;
  37949. yAxisWidthArr[0].width = Math.max(yAxisWidthArr[0].width, measureText(item, yAxisFontSize) + 5);
  37950. return item;
  37951. });
  37952. yAxisWidthArr[0].width += 3 * opts.pixelRatio;
  37953. if (opts.yAxis.disabled === true) {
  37954. yAxisWidthArr[0] = {
  37955. position: 'left',
  37956. width: 0
  37957. };
  37958. opts.yAxis.data[0] = {
  37959. disabled: true
  37960. };
  37961. } else {
  37962. opts.yAxis.data[0] = {
  37963. disabled: false,
  37964. position: 'left',
  37965. max: opts.yAxis.max,
  37966. min: opts.yAxis.min,
  37967. format: opts.yAxis.format
  37968. };
  37969. }
  37970. }
  37971. return {
  37972. rangesFormat: rangesFormatArr,
  37973. ranges: rangesArr,
  37974. yAxisWidth: yAxisWidthArr
  37975. };
  37976. }
  37977. function calTooltipYAxisData(point, series, opts, config, eachSpacing) {
  37978. var ranges = [].concat(opts.chartData.yAxisData.ranges);
  37979. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  37980. var minAxis = opts.area[0];
  37981. var items = [];
  37982. for (var i = 0; i < ranges.length; i++) {
  37983. var maxVal = ranges[i].shift();
  37984. var minVal = ranges[i].pop();
  37985. var item = maxVal - (maxVal - minVal) * (point - minAxis) / spacingValid;
  37986. item = opts.yAxis.data[i].format ? opts.yAxis.data[i].format(Number(item)) : item.toFixed(0);
  37987. items.push(String(item));
  37988. }
  37989. return items;
  37990. }
  37991. function calMarkLineData(points, opts) {
  37992. var minRange, maxRange;
  37993. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  37994. for (var i = 0; i < points.length; i++) {
  37995. points[i].yAxisIndex = points[i].yAxisIndex ? points[i].yAxisIndex : 0;
  37996. var range = [].concat(opts.chartData.yAxisData.ranges[points[i].yAxisIndex]);
  37997. minRange = range.pop();
  37998. maxRange = range.shift();
  37999. var height = spacingValid * (points[i].value - minRange) / (maxRange - minRange);
  38000. points[i].y = opts.height - Math.round(height) - opts.area[2];
  38001. }
  38002. return points;
  38003. }
  38004. function contextRotate(context, opts) {
  38005. if (opts.rotateLock !== true) {
  38006. context.translate(opts.height, 0);
  38007. context.rotate(90 * Math.PI / 180);
  38008. } else if (opts._rotate_ !== true) {
  38009. context.translate(opts.height, 0);
  38010. context.rotate(90 * Math.PI / 180);
  38011. opts._rotate_ = true;
  38012. }
  38013. }
  38014. function drawPointShape(points, color, shape, context, opts) {
  38015. context.beginPath();
  38016. if (opts.dataPointShapeType == 'hollow') {
  38017. context.setStrokeStyle(color);
  38018. context.setFillStyle(opts.background);
  38019. context.setLineWidth(2 * opts.pixelRatio);
  38020. } else {
  38021. context.setStrokeStyle("#ffffff");
  38022. context.setFillStyle(color);
  38023. context.setLineWidth(1 * opts.pixelRatio);
  38024. }
  38025. if (shape === 'diamond') {
  38026. points.forEach(function (item, index) {
  38027. if (item !== null) {
  38028. context.moveTo(item.x, item.y - 4.5);
  38029. context.lineTo(item.x - 4.5, item.y);
  38030. context.lineTo(item.x, item.y + 4.5);
  38031. context.lineTo(item.x + 4.5, item.y);
  38032. context.lineTo(item.x, item.y - 4.5);
  38033. }
  38034. });
  38035. } else if (shape === 'circle') {
  38036. points.forEach(function (item, index) {
  38037. if (item !== null) {
  38038. context.moveTo(item.x + 2.5 * opts.pixelRatio, item.y);
  38039. context.arc(item.x, item.y, 3 * opts.pixelRatio, 0, 2 * Math.PI, false);
  38040. }
  38041. });
  38042. } else if (shape === 'rect') {
  38043. points.forEach(function (item, index) {
  38044. if (item !== null) {
  38045. context.moveTo(item.x - 3.5, item.y - 3.5);
  38046. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  38047. }
  38048. });
  38049. } else if (shape === 'triangle') {
  38050. points.forEach(function (item, index) {
  38051. if (item !== null) {
  38052. context.moveTo(item.x, item.y - 4.5);
  38053. context.lineTo(item.x - 4.5, item.y + 4.5);
  38054. context.lineTo(item.x + 4.5, item.y + 4.5);
  38055. context.lineTo(item.x, item.y - 4.5);
  38056. }
  38057. });
  38058. }
  38059. context.closePath();
  38060. context.fill();
  38061. context.stroke();
  38062. }
  38063. function drawRingTitle(opts, config, context, center) {
  38064. var titlefontSize = opts.title.fontSize || config.titleFontSize;
  38065. var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize;
  38066. var title = opts.title.name || '';
  38067. var subtitle = opts.subtitle.name || '';
  38068. var titleFontColor = opts.title.color || config.titleColor;
  38069. var subtitleFontColor = opts.subtitle.color || config.subtitleColor;
  38070. var titleHeight = title ? titlefontSize : 0;
  38071. var subtitleHeight = subtitle ? subtitlefontSize : 0;
  38072. var margin = 5;
  38073. if (subtitle) {
  38074. var textWidth = measureText(subtitle, subtitlefontSize);
  38075. var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0);
  38076. var startY = center.y + subtitlefontSize / 2 + (opts.subtitle.offsetY || 0);
  38077. if (title) {
  38078. startY += (titleHeight + margin) / 2;
  38079. }
  38080. context.beginPath();
  38081. context.setFontSize(subtitlefontSize);
  38082. context.setFillStyle(subtitleFontColor);
  38083. context.fillText(subtitle, startX, startY);
  38084. context.closePath();
  38085. context.stroke();
  38086. }
  38087. if (title) {
  38088. var _textWidth = measureText(title, titlefontSize);
  38089. var _startX = center.x - _textWidth / 2 + (opts.title.offsetX || 0);
  38090. var _startY = center.y + titlefontSize / 2 + (opts.title.offsetY || 0);
  38091. if (subtitle) {
  38092. _startY -= (subtitleHeight + margin) / 2;
  38093. }
  38094. context.beginPath();
  38095. context.setFontSize(titlefontSize);
  38096. context.setFillStyle(titleFontColor);
  38097. context.fillText(title, _startX, _startY);
  38098. context.closePath();
  38099. context.stroke();
  38100. }
  38101. }
  38102. function drawPointText(points, series, config, context) {
  38103. // 绘制数据文案
  38104. var data = series.data;
  38105. points.forEach(function (item, index) {
  38106. if (item !== null) {
  38107. //var formatVal = series.format ? series.format(data[index]) : data[index];
  38108. context.beginPath();
  38109. context.setFontSize(series.textSize || config.fontSize);
  38110. context.setFillStyle(series.textColor || '#666666');
  38111. var value = data[index];
  38112. if (_typeof(data[index]) === 'object' && data[index] !== null) {
  38113. if (data[index].constructor == Array) {
  38114. value = data[index][1];
  38115. } else {
  38116. value = data[index].value;
  38117. }
  38118. }
  38119. var formatVal = series.format ? series.format(value) : value;
  38120. context.fillText(String(formatVal), item.x - measureText(formatVal, series.textSize || config.fontSize) / 2, item.y - 4);
  38121. context.closePath();
  38122. context.stroke();
  38123. }
  38124. });
  38125. }
  38126. function drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context) {
  38127. radius -= gaugeOption.width / 2 + config.gaugeLabelTextMargin;
  38128. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  38129. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  38130. var totalNumber = gaugeOption.endNumber - gaugeOption.startNumber;
  38131. var splitNumber = totalNumber / gaugeOption.splitLine.splitNumber;
  38132. var nowAngle = gaugeOption.startAngle;
  38133. var nowNumber = gaugeOption.startNumber;
  38134. for (var i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {
  38135. var pos = {
  38136. x: radius * Math.cos(nowAngle * Math.PI),
  38137. y: radius * Math.sin(nowAngle * Math.PI)
  38138. };
  38139. var labelText = gaugeOption.labelFormat ? gaugeOption.labelFormat(nowNumber) : nowNumber;
  38140. pos.x += centerPosition.x - measureText(labelText) / 2;
  38141. pos.y += centerPosition.y;
  38142. var startX = pos.x;
  38143. var startY = pos.y;
  38144. context.beginPath();
  38145. context.setFontSize(config.fontSize);
  38146. context.setFillStyle(gaugeOption.labelColor || '#666666');
  38147. context.fillText(labelText, startX, startY + config.fontSize / 2);
  38148. context.closePath();
  38149. context.stroke();
  38150. nowAngle += splitAngle;
  38151. if (nowAngle >= 2) {
  38152. nowAngle = nowAngle % 2;
  38153. }
  38154. nowNumber += splitNumber;
  38155. }
  38156. }
  38157. function drawRadarLabel(angleList, radius, centerPosition, opts, config, context) {
  38158. var radarOption = opts.extra.radar || {};
  38159. radius += config.radarLabelTextMargin;
  38160. angleList.forEach(function (angle, index) {
  38161. var pos = {
  38162. x: radius * Math.cos(angle),
  38163. y: radius * Math.sin(angle)
  38164. };
  38165. var posRelativeCanvas = convertCoordinateOrigin(pos.x, pos.y, centerPosition);
  38166. var startX = posRelativeCanvas.x;
  38167. var startY = posRelativeCanvas.y;
  38168. if (util.approximatelyEqual(pos.x, 0)) {
  38169. startX -= measureText(opts.categories[index] || '') / 2;
  38170. } else if (pos.x < 0) {
  38171. startX -= measureText(opts.categories[index] || '');
  38172. }
  38173. context.beginPath();
  38174. context.setFontSize(config.fontSize);
  38175. context.setFillStyle(radarOption.labelColor || '#666666');
  38176. context.fillText(opts.categories[index] || '', startX, startY + config.fontSize / 2);
  38177. context.closePath();
  38178. context.stroke();
  38179. });
  38180. }
  38181. function drawPieText(series, opts, config, context, radius, center) {
  38182. var lineRadius = config.pieChartLinePadding;
  38183. var textObjectCollection = [];
  38184. var lastTextObject = null;
  38185. var seriesConvert = series.map(function (item) {
  38186. var text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_.toFixed(4) * 100) + '%';
  38187. if (item._rose_proportion_) item._proportion_ = item._rose_proportion_;
  38188. var arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._proportion_ / 2);
  38189. var color = item.color;
  38190. var radius = item._radius_;
  38191. return {
  38192. arc: arc,
  38193. text: text,
  38194. color: color,
  38195. radius: radius,
  38196. textColor: item.textColor,
  38197. textSize: item.textSize
  38198. };
  38199. });
  38200. for (var i = 0; i < seriesConvert.length; i++) {
  38201. var item = seriesConvert[i];
  38202. // line end
  38203. var orginX1 = Math.cos(item.arc) * (item.radius + lineRadius);
  38204. var orginY1 = Math.sin(item.arc) * (item.radius + lineRadius);
  38205. // line start
  38206. var orginX2 = Math.cos(item.arc) * item.radius;
  38207. var orginY2 = Math.sin(item.arc) * item.radius;
  38208. // text start
  38209. var orginX3 = orginX1 >= 0 ? orginX1 + config.pieChartTextPadding : orginX1 - config.pieChartTextPadding;
  38210. var orginY3 = orginY1;
  38211. var textWidth = measureText(item.text, item.textSize || config.fontSize);
  38212. var startY = orginY3;
  38213. if (lastTextObject && util.isSameXCoordinateArea(lastTextObject.start, {
  38214. x: orginX3
  38215. })) {
  38216. if (orginX3 > 0) {
  38217. startY = Math.min(orginY3, lastTextObject.start.y);
  38218. } else if (orginX1 < 0) {
  38219. startY = Math.max(orginY3, lastTextObject.start.y);
  38220. } else {
  38221. if (orginY3 > 0) {
  38222. startY = Math.max(orginY3, lastTextObject.start.y);
  38223. } else {
  38224. startY = Math.min(orginY3, lastTextObject.start.y);
  38225. }
  38226. }
  38227. }
  38228. if (orginX3 < 0) {
  38229. orginX3 -= textWidth;
  38230. }
  38231. var textObject = {
  38232. lineStart: {
  38233. x: orginX2,
  38234. y: orginY2
  38235. },
  38236. lineEnd: {
  38237. x: orginX1,
  38238. y: orginY1
  38239. },
  38240. start: {
  38241. x: orginX3,
  38242. y: startY
  38243. },
  38244. width: textWidth,
  38245. height: config.fontSize,
  38246. text: item.text,
  38247. color: item.color,
  38248. textColor: item.textColor,
  38249. textSize: item.textSize
  38250. };
  38251. lastTextObject = avoidCollision(textObject, lastTextObject);
  38252. textObjectCollection.push(lastTextObject);
  38253. }
  38254. for (var _i12 = 0; _i12 < textObjectCollection.length; _i12++) {
  38255. var _item6 = textObjectCollection[_i12];
  38256. var lineStartPoistion = convertCoordinateOrigin(_item6.lineStart.x, _item6.lineStart.y, center);
  38257. var lineEndPoistion = convertCoordinateOrigin(_item6.lineEnd.x, _item6.lineEnd.y, center);
  38258. var textPosition = convertCoordinateOrigin(_item6.start.x, _item6.start.y, center);
  38259. context.setLineWidth(1 * opts.pixelRatio);
  38260. context.setFontSize(config.fontSize);
  38261. context.beginPath();
  38262. context.setStrokeStyle(_item6.color);
  38263. context.setFillStyle(_item6.color);
  38264. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  38265. var curveStartX = _item6.start.x < 0 ? textPosition.x + _item6.width : textPosition.x;
  38266. var textStartX = _item6.start.x < 0 ? textPosition.x - 5 : textPosition.x + 5;
  38267. context.quadraticCurveTo(lineEndPoistion.x, lineEndPoistion.y, curveStartX, textPosition.y);
  38268. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  38269. context.stroke();
  38270. context.closePath();
  38271. context.beginPath();
  38272. context.moveTo(textPosition.x + _item6.width, textPosition.y);
  38273. context.arc(curveStartX, textPosition.y, 2, 0, 2 * Math.PI);
  38274. context.closePath();
  38275. context.fill();
  38276. context.beginPath();
  38277. context.setFontSize(_item6.textSize || config.fontSize);
  38278. context.setFillStyle(_item6.textColor || '#666666');
  38279. context.fillText(_item6.text, textStartX, textPosition.y + 3);
  38280. context.closePath();
  38281. context.stroke();
  38282. context.closePath();
  38283. }
  38284. }
  38285. function drawToolTipSplitLine(offsetX, opts, config, context) {
  38286. var toolTipOption = opts.extra.tooltip || {};
  38287. toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType;
  38288. toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength;
  38289. var startY = opts.area[0];
  38290. var endY = opts.height - opts.area[2];
  38291. if (toolTipOption.gridType == 'dash') {
  38292. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  38293. }
  38294. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  38295. context.setLineWidth(1 * opts.pixelRatio);
  38296. context.beginPath();
  38297. context.moveTo(offsetX, startY);
  38298. context.lineTo(offsetX, endY);
  38299. context.stroke();
  38300. context.setLineDash([]);
  38301. if (toolTipOption.xAxisLabel) {
  38302. var labelText = opts.categories[opts.tooltip.index];
  38303. context.setFontSize(config.fontSize);
  38304. var textWidth = measureText(labelText, config.fontSize);
  38305. var textX = offsetX - 0.5 * textWidth;
  38306. var textY = endY;
  38307. context.beginPath();
  38308. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  38309. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  38310. context.setLineWidth(1 * opts.pixelRatio);
  38311. context.rect(textX - config.toolTipPadding, textY, textWidth + 2 * config.toolTipPadding, config.fontSize + 2 * config.toolTipPadding);
  38312. context.closePath();
  38313. context.stroke();
  38314. context.fill();
  38315. context.beginPath();
  38316. context.setFontSize(config.fontSize);
  38317. context.setFillStyle(toolTipOption.labelFontColor || config.fontColor);
  38318. context.fillText(String(labelText), textX, textY + config.toolTipPadding + config.fontSize);
  38319. context.closePath();
  38320. context.stroke();
  38321. }
  38322. }
  38323. function drawMarkLine(opts, config, context) {
  38324. var markLineOption = assign({}, {
  38325. type: 'solid',
  38326. dashLength: 4,
  38327. data: []
  38328. }, opts.extra.markLine);
  38329. var startX = opts.area[3];
  38330. var endX = opts.width - opts.area[1];
  38331. var points = calMarkLineData(markLineOption.data, opts);
  38332. for (var i = 0; i < points.length; i++) {
  38333. var item = assign({}, {
  38334. lineColor: '#DE4A42',
  38335. showLabel: false,
  38336. labelFontColor: '#666666',
  38337. labelBgColor: '#DFE8FF',
  38338. labelBgOpacity: 0.8,
  38339. yAxisIndex: 0
  38340. }, points[i]);
  38341. if (markLineOption.type == 'dash') {
  38342. context.setLineDash([markLineOption.dashLength, markLineOption.dashLength]);
  38343. }
  38344. context.setStrokeStyle(item.lineColor);
  38345. context.setLineWidth(1 * opts.pixelRatio);
  38346. context.beginPath();
  38347. context.moveTo(startX, item.y);
  38348. context.lineTo(endX, item.y);
  38349. context.stroke();
  38350. context.setLineDash([]);
  38351. if (item.showLabel) {
  38352. var labelText = opts.yAxis.format ? opts.yAxis.format(Number(item.value)) : item.value;
  38353. context.setFontSize(config.fontSize);
  38354. var textWidth = measureText(labelText, config.fontSize);
  38355. var bgStartX = opts.padding[3] + config.yAxisTitleWidth - config.toolTipPadding;
  38356. var bgEndX = Math.max(opts.area[3], textWidth + config.toolTipPadding * 2);
  38357. var bgWidth = bgEndX - bgStartX;
  38358. var textX = bgStartX + (bgWidth - textWidth) / 2;
  38359. var textY = item.y;
  38360. context.setFillStyle(hexToRgb(item.labelBgColor, item.labelBgOpacity));
  38361. context.setStrokeStyle(item.labelBgColor);
  38362. context.setLineWidth(1 * opts.pixelRatio);
  38363. context.beginPath();
  38364. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  38365. context.closePath();
  38366. context.stroke();
  38367. context.fill();
  38368. context.beginPath();
  38369. context.setFontSize(config.fontSize);
  38370. context.setFillStyle(item.labelFontColor);
  38371. context.fillText(String(labelText), textX, textY + 0.5 * config.fontSize);
  38372. context.stroke();
  38373. }
  38374. }
  38375. }
  38376. function drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) {
  38377. var toolTipOption = assign({}, {
  38378. gridType: 'solid',
  38379. dashLength: 4
  38380. }, opts.extra.tooltip);
  38381. var startX = opts.area[3];
  38382. var endX = opts.width - opts.area[1];
  38383. if (toolTipOption.gridType == 'dash') {
  38384. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  38385. }
  38386. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  38387. context.setLineWidth(1 * opts.pixelRatio);
  38388. context.beginPath();
  38389. context.moveTo(startX, opts.tooltip.offset.y);
  38390. context.lineTo(endX, opts.tooltip.offset.y);
  38391. context.stroke();
  38392. context.setLineDash([]);
  38393. if (toolTipOption.yAxisLabel) {
  38394. var labelText = calTooltipYAxisData(opts.tooltip.offset.y, opts.series, opts, config, eachSpacing);
  38395. var widthArr = opts.chartData.yAxisData.yAxisWidth;
  38396. var tStartLeft = opts.area[3];
  38397. var tStartRight = opts.width - opts.area[1];
  38398. for (var i = 0; i < labelText.length; i++) {
  38399. context.setFontSize(config.fontSize);
  38400. var textWidth = measureText(labelText[i], config.fontSize);
  38401. var bgStartX = void 0,
  38402. bgEndX = void 0,
  38403. bgWidth = void 0;
  38404. if (widthArr[i].position == 'left') {
  38405. bgStartX = tStartLeft - widthArr[i].width;
  38406. bgEndX = Math.max(bgStartX, bgStartX + textWidth + config.toolTipPadding * 2);
  38407. } else {
  38408. bgStartX = tStartRight;
  38409. bgEndX = Math.max(bgStartX + widthArr[i].width, bgStartX + textWidth + config.toolTipPadding * 2);
  38410. }
  38411. bgWidth = bgEndX - bgStartX;
  38412. var textX = bgStartX + (bgWidth - textWidth) / 2;
  38413. var textY = opts.tooltip.offset.y;
  38414. context.beginPath();
  38415. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  38416. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  38417. context.setLineWidth(1 * opts.pixelRatio);
  38418. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  38419. context.closePath();
  38420. context.stroke();
  38421. context.fill();
  38422. context.beginPath();
  38423. context.setFontSize(config.fontSize);
  38424. context.setFillStyle(toolTipOption.labelFontColor || config.fontColor);
  38425. context.fillText(labelText[i], textX, textY + 0.5 * config.fontSize);
  38426. context.closePath();
  38427. context.stroke();
  38428. if (widthArr[i].position == 'left') {
  38429. tStartLeft -= widthArr[i].width + opts.yAxis.padding;
  38430. } else {
  38431. tStartRight += widthArr[i].width + opts.yAxis.padding;
  38432. }
  38433. }
  38434. }
  38435. }
  38436. function drawToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  38437. var toolTipOption = assign({}, {
  38438. activeBgColor: '#000000',
  38439. activeBgOpacity: 0.08
  38440. }, opts.extra.tooltip);
  38441. var startY = opts.area[0];
  38442. var endY = opts.height - opts.area[2];
  38443. context.beginPath();
  38444. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  38445. context.rect(offsetX - eachSpacing / 2, startY, eachSpacing, endY - startY);
  38446. context.closePath();
  38447. context.fill();
  38448. }
  38449. function drawToolTip(textList, offset, opts, config, context, eachSpacing, xAxisPoints) {
  38450. var toolTipOption = assign({}, {
  38451. showBox: true,
  38452. bgColor: '#000000',
  38453. bgOpacity: 0.7,
  38454. fontColor: '#FFFFFF'
  38455. }, opts.extra.tooltip);
  38456. var legendWidth = 4 * opts.pixelRatio;
  38457. var legendMarginRight = 5 * opts.pixelRatio;
  38458. var arrowWidth = 8 * opts.pixelRatio;
  38459. var isOverRightBorder = false;
  38460. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'candle' || opts.type == 'mix') {
  38461. drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context);
  38462. }
  38463. offset = assign({
  38464. x: 0,
  38465. y: 0
  38466. }, offset);
  38467. offset.y -= 8 * opts.pixelRatio;
  38468. var textWidth = textList.map(function (item) {
  38469. return measureText(item.text, config.fontSize);
  38470. });
  38471. var toolTipWidth = legendWidth + legendMarginRight + 4 * config.toolTipPadding + Math.max.apply(null, textWidth);
  38472. var toolTipHeight = 2 * config.toolTipPadding + textList.length * config.toolTipLineHeight;
  38473. if (toolTipOption.showBox == false) {
  38474. return;
  38475. }
  38476. // if beyond the right border
  38477. if (offset.x - Math.abs(opts._scrollDistance_) + arrowWidth + toolTipWidth > opts.width) {
  38478. isOverRightBorder = true;
  38479. }
  38480. if (toolTipHeight + offset.y > opts.height) {
  38481. offset.y = opts.height - toolTipHeight;
  38482. }
  38483. // draw background rect
  38484. context.beginPath();
  38485. context.setFillStyle(hexToRgb(toolTipOption.bgColor || config.toolTipBackground, toolTipOption.bgOpacity || config.toolTipOpacity));
  38486. if (isOverRightBorder) {
  38487. context.moveTo(offset.x, offset.y + 10 * opts.pixelRatio);
  38488. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pixelRatio - 5 * opts.pixelRatio);
  38489. context.lineTo(offset.x - arrowWidth, offset.y);
  38490. context.lineTo(offset.x - arrowWidth - Math.round(toolTipWidth), offset.y);
  38491. context.lineTo(offset.x - arrowWidth - Math.round(toolTipWidth), offset.y + toolTipHeight);
  38492. context.lineTo(offset.x - arrowWidth, offset.y + toolTipHeight);
  38493. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pixelRatio + 5 * opts.pixelRatio);
  38494. context.lineTo(offset.x, offset.y + 10 * opts.pixelRatio);
  38495. } else {
  38496. context.moveTo(offset.x, offset.y + 10 * opts.pixelRatio);
  38497. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pixelRatio - 5 * opts.pixelRatio);
  38498. context.lineTo(offset.x + arrowWidth, offset.y);
  38499. context.lineTo(offset.x + arrowWidth + Math.round(toolTipWidth), offset.y);
  38500. context.lineTo(offset.x + arrowWidth + Math.round(toolTipWidth), offset.y + toolTipHeight);
  38501. context.lineTo(offset.x + arrowWidth, offset.y + toolTipHeight);
  38502. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pixelRatio + 5 * opts.pixelRatio);
  38503. context.lineTo(offset.x, offset.y + 10 * opts.pixelRatio);
  38504. }
  38505. context.closePath();
  38506. context.fill();
  38507. // draw legend
  38508. textList.forEach(function (item, index) {
  38509. if (item.color !== null) {
  38510. context.beginPath();
  38511. context.setFillStyle(item.color);
  38512. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding;
  38513. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding + 1;
  38514. if (isOverRightBorder) {
  38515. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding;
  38516. }
  38517. context.fillRect(startX, startY, legendWidth, config.fontSize);
  38518. context.closePath();
  38519. }
  38520. });
  38521. // draw text list
  38522. textList.forEach(function (item, index) {
  38523. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding + legendWidth + legendMarginRight;
  38524. if (isOverRightBorder) {
  38525. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding + +legendWidth + legendMarginRight;
  38526. }
  38527. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding;
  38528. context.beginPath();
  38529. context.setFontSize(config.fontSize);
  38530. context.setFillStyle(toolTipOption.fontColor);
  38531. context.fillText(item.text, startX, startY + config.fontSize);
  38532. context.closePath();
  38533. context.stroke();
  38534. });
  38535. }
  38536. function drawYAxisTitle(title, opts, config, context) {
  38537. var startX = config.xAxisHeight + (opts.height - config.xAxisHeight - measureText(title)) / 2;
  38538. context.save();
  38539. context.beginPath();
  38540. context.setFontSize(config.fontSize);
  38541. context.setFillStyle(opts.yAxis.titleFontColor || '#333333');
  38542. context.translate(0, opts.height);
  38543. context.rotate(-90 * Math.PI / 180);
  38544. context.fillText(title, startX, opts.padding[3] + 0.5 * config.fontSize);
  38545. context.closePath();
  38546. context.stroke();
  38547. context.restore();
  38548. }
  38549. function drawColumnDataPoints(series, opts, config, context) {
  38550. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38551. var xAxisData = opts.chartData.xAxisData,
  38552. xAxisPoints = xAxisData.xAxisPoints,
  38553. eachSpacing = xAxisData.eachSpacing;
  38554. var columnOption = assign({}, {
  38555. type: 'group',
  38556. width: eachSpacing / 2,
  38557. meter: {
  38558. border: 4,
  38559. fillColor: '#FFFFFF'
  38560. }
  38561. }, opts.extra.column);
  38562. var calPoints = [];
  38563. context.save();
  38564. var leftNum = -2;
  38565. var rightNum = xAxisPoints.length + 2;
  38566. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  38567. context.translate(opts._scrollDistance_, 0);
  38568. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  38569. rightNum = leftNum + opts.xAxis.itemCount + 4;
  38570. }
  38571. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  38572. drawToolTipSplitArea(opts.tooltip.offset.x, opts, config, context, eachSpacing);
  38573. }
  38574. series.forEach(function (eachSeries, seriesIndex) {
  38575. var ranges, minRange, maxRange;
  38576. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38577. minRange = ranges.pop();
  38578. maxRange = ranges.shift();
  38579. var data = eachSeries.data;
  38580. switch (columnOption.type) {
  38581. case 'group':
  38582. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38583. var tooltipPoints = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38584. calPoints.push(tooltipPoints);
  38585. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  38586. for (var i = 0; i < points.length; i++) {
  38587. var item = points[i];
  38588. if (item !== null && i > leftNum && i < rightNum) {
  38589. context.beginPath();
  38590. context.setStrokeStyle(item.color || eachSeries.color);
  38591. context.setLineWidth(1);
  38592. context.setFillStyle(item.color || eachSeries.color);
  38593. var startX = item.x - item.width / 2;
  38594. var height = opts.height - item.y - opts.area[2];
  38595. context.moveTo(startX, item.y);
  38596. context.lineTo(startX + item.width - 2, item.y);
  38597. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  38598. context.lineTo(startX, opts.height - opts.area[2]);
  38599. context.lineTo(startX, item.y);
  38600. context.closePath();
  38601. context.stroke();
  38602. context.fill();
  38603. }
  38604. }
  38605. ;
  38606. break;
  38607. case 'stack':
  38608. // 绘制堆叠数据图
  38609. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38610. calPoints.push(points);
  38611. points = fixColumeStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  38612. for (var _i13 = 0; _i13 < points.length; _i13++) {
  38613. var _item7 = points[_i13];
  38614. if (_item7 !== null && _i13 > leftNum && _i13 < rightNum) {
  38615. context.beginPath();
  38616. context.setFillStyle(_item7.color || eachSeries.color);
  38617. var startX = _item7.x - _item7.width / 2 + 1;
  38618. var height = opts.height - _item7.y - opts.area[2];
  38619. var height0 = opts.height - _item7.y0 - opts.area[2];
  38620. if (seriesIndex > 0) {
  38621. height -= height0;
  38622. }
  38623. context.moveTo(startX, _item7.y);
  38624. context.fillRect(startX, _item7.y, _item7.width - 2, height);
  38625. context.closePath();
  38626. context.fill();
  38627. }
  38628. }
  38629. ;
  38630. break;
  38631. case 'meter':
  38632. // 绘制温度计数据图
  38633. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38634. calPoints.push(points);
  38635. points = fixColumeMeterData(points, eachSpacing, series.length, seriesIndex, config, opts, columnOption.meter.border);
  38636. if (seriesIndex == 0) {
  38637. for (var _i14 = 0; _i14 < points.length; _i14++) {
  38638. var _item8 = points[_i14];
  38639. if (_item8 !== null && _i14 > leftNum && _i14 < rightNum) {
  38640. //画背景颜色
  38641. context.beginPath();
  38642. context.setFillStyle(columnOption.meter.fillColor);
  38643. var startX = _item8.x - _item8.width / 2;
  38644. var height = opts.height - _item8.y - opts.area[2];
  38645. context.moveTo(startX, _item8.y);
  38646. context.fillRect(startX, _item8.y, _item8.width, height);
  38647. context.closePath();
  38648. context.fill();
  38649. //画边框线
  38650. if (columnOption.meter.border > 0) {
  38651. context.beginPath();
  38652. context.setStrokeStyle(eachSeries.color);
  38653. context.setLineWidth(columnOption.meter.border * opts.pixelRatio);
  38654. context.moveTo(startX + columnOption.meter.border * 0.5, _item8.y + height);
  38655. context.lineTo(startX + columnOption.meter.border * 0.5, _item8.y + columnOption.meter.border * 0.5);
  38656. context.lineTo(startX + _item8.width - columnOption.meter.border * 0.5, _item8.y + columnOption.meter.border * 0.5);
  38657. context.lineTo(startX + _item8.width - columnOption.meter.border * 0.5, _item8.y + height);
  38658. context.stroke();
  38659. }
  38660. }
  38661. }
  38662. ;
  38663. } else {
  38664. for (var _i15 = 0; _i15 < points.length; _i15++) {
  38665. var _item9 = points[_i15];
  38666. if (_item9 !== null && _i15 > leftNum && _i15 < rightNum) {
  38667. context.beginPath();
  38668. context.setFillStyle(_item9.color || eachSeries.color);
  38669. var startX = _item9.x - _item9.width / 2;
  38670. var height = opts.height - _item9.y - opts.area[2];
  38671. context.moveTo(startX, _item9.y);
  38672. context.fillRect(startX, _item9.y, _item9.width, height);
  38673. context.closePath();
  38674. context.fill();
  38675. }
  38676. }
  38677. ;
  38678. }
  38679. break;
  38680. }
  38681. });
  38682. if (opts.dataLabel !== false && process === 1) {
  38683. series.forEach(function (eachSeries, seriesIndex) {
  38684. var ranges, minRange, maxRange;
  38685. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38686. minRange = ranges.pop();
  38687. maxRange = ranges.shift();
  38688. var data = eachSeries.data;
  38689. switch (columnOption.type) {
  38690. case 'group':
  38691. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38692. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  38693. drawPointText(points, eachSeries, config, context);
  38694. break;
  38695. case 'stack':
  38696. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38697. drawPointText(points, eachSeries, config, context);
  38698. break;
  38699. case 'meter':
  38700. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38701. drawPointText(points, eachSeries, config, context);
  38702. break;
  38703. }
  38704. });
  38705. }
  38706. context.restore();
  38707. return {
  38708. xAxisPoints: xAxisPoints,
  38709. calPoints: calPoints,
  38710. eachSpacing: eachSpacing
  38711. };
  38712. }
  38713. function drawCandleDataPoints(series, seriesMA, opts, config, context) {
  38714. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  38715. var candleOption = assign({}, {
  38716. color: {},
  38717. average: {}
  38718. }, opts.extra.candle);
  38719. candleOption.color = assign({}, {
  38720. upLine: '#f04864',
  38721. upFill: '#f04864',
  38722. downLine: '#2fc25b',
  38723. downFill: '#2fc25b'
  38724. }, candleOption.color);
  38725. candleOption.average = assign({}, {
  38726. show: false,
  38727. name: [],
  38728. day: [],
  38729. color: config.colors
  38730. }, candleOption.average);
  38731. opts.extra.candle = candleOption;
  38732. var xAxisData = opts.chartData.xAxisData,
  38733. xAxisPoints = xAxisData.xAxisPoints,
  38734. eachSpacing = xAxisData.eachSpacing;
  38735. var calPoints = [];
  38736. context.save();
  38737. var leftNum = -2;
  38738. var rightNum = xAxisPoints.length + 2;
  38739. var leftSpace = 0;
  38740. var rightSpace = opts.width + eachSpacing;
  38741. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  38742. context.translate(opts._scrollDistance_, 0);
  38743. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  38744. rightNum = leftNum + opts.xAxis.itemCount + 4;
  38745. leftSpace = -opts._scrollDistance_ - eachSpacing + opts.area[3];
  38746. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  38747. }
  38748. //画均线
  38749. if (candleOption.average.show || seriesMA) {
  38750. //Merge pull request !12 from 邱贵翔
  38751. seriesMA.forEach(function (eachSeries, seriesIndex) {
  38752. var ranges, minRange, maxRange;
  38753. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38754. minRange = ranges.pop();
  38755. maxRange = ranges.shift();
  38756. var data = eachSeries.data;
  38757. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38758. var splitPointList = splitPoints(points);
  38759. for (var i = 0; i < splitPointList.length; i++) {
  38760. var _points = splitPointList[i];
  38761. context.beginPath();
  38762. context.setStrokeStyle(eachSeries.color);
  38763. context.setLineWidth(1);
  38764. if (_points.length === 1) {
  38765. context.moveTo(_points[0].x, _points[0].y);
  38766. context.arc(_points[0].x, _points[0].y, 1, 0, 2 * Math.PI);
  38767. } else {
  38768. context.moveTo(_points[0].x, _points[0].y);
  38769. var startPoint = 0;
  38770. for (var j = 0; j < _points.length; j++) {
  38771. var item = _points[j];
  38772. if (startPoint == 0 && item.x > leftSpace) {
  38773. context.moveTo(item.x, item.y);
  38774. startPoint = 1;
  38775. }
  38776. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  38777. var ctrlPoint = createCurveControlPoints(_points, j - 1);
  38778. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  38779. }
  38780. }
  38781. context.moveTo(_points[0].x, _points[0].y);
  38782. }
  38783. context.closePath();
  38784. context.stroke();
  38785. }
  38786. });
  38787. }
  38788. //画K线
  38789. series.forEach(function (eachSeries, seriesIndex) {
  38790. var ranges, minRange, maxRange;
  38791. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38792. minRange = ranges.pop();
  38793. maxRange = ranges.shift();
  38794. var data = eachSeries.data;
  38795. var points = getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38796. calPoints.push(points);
  38797. var splitPointList = splitPoints(points);
  38798. for (var i = 0; i < splitPointList[0].length; i++) {
  38799. if (i > leftNum && i < rightNum) {
  38800. var item = splitPointList[0][i];
  38801. context.beginPath();
  38802. //如果上涨
  38803. if (data[i][1] - data[i][0] > 0) {
  38804. context.setStrokeStyle(candleOption.color.upLine);
  38805. context.setFillStyle(candleOption.color.upFill);
  38806. context.setLineWidth(1 * opts.pixelRatio);
  38807. context.moveTo(item[3].x, item[3].y); //顶点
  38808. context.lineTo(item[1].x, item[1].y); //收盘中间点
  38809. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  38810. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  38811. context.lineTo(item[0].x, item[0].y); //开盘中间点
  38812. context.lineTo(item[2].x, item[2].y); //底点
  38813. context.lineTo(item[0].x, item[0].y); //开盘中间点
  38814. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  38815. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  38816. context.lineTo(item[1].x, item[1].y); //收盘中间点
  38817. context.moveTo(item[3].x, item[3].y); //顶点
  38818. } else {
  38819. context.setStrokeStyle(candleOption.color.downLine);
  38820. context.setFillStyle(candleOption.color.downFill);
  38821. context.setLineWidth(1 * opts.pixelRatio);
  38822. context.moveTo(item[3].x, item[3].y); //顶点
  38823. context.lineTo(item[0].x, item[0].y); //开盘中间点
  38824. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  38825. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  38826. context.lineTo(item[1].x, item[1].y); //收盘中间点
  38827. context.lineTo(item[2].x, item[2].y); //底点
  38828. context.lineTo(item[1].x, item[1].y); //收盘中间点
  38829. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  38830. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  38831. context.lineTo(item[0].x, item[0].y); //开盘中间点
  38832. context.moveTo(item[3].x, item[3].y); //顶点
  38833. }
  38834. context.closePath();
  38835. context.fill();
  38836. context.stroke();
  38837. }
  38838. }
  38839. });
  38840. context.restore();
  38841. return {
  38842. xAxisPoints: xAxisPoints,
  38843. calPoints: calPoints,
  38844. eachSpacing: eachSpacing
  38845. };
  38846. }
  38847. function drawAreaDataPoints(series, opts, config, context) {
  38848. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38849. var areaOption = assign({}, {
  38850. type: 'straight',
  38851. opacity: 0.2,
  38852. addLine: false,
  38853. width: 2,
  38854. gradient: false
  38855. }, opts.extra.area);
  38856. var xAxisData = opts.chartData.xAxisData,
  38857. xAxisPoints = xAxisData.xAxisPoints,
  38858. eachSpacing = xAxisData.eachSpacing;
  38859. var endY = opts.height - opts.area[2];
  38860. var calPoints = [];
  38861. context.save();
  38862. var leftSpace = 0;
  38863. var rightSpace = opts.width + eachSpacing;
  38864. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  38865. context.translate(opts._scrollDistance_, 0);
  38866. leftSpace = -opts._scrollDistance_ - eachSpacing + opts.area[3];
  38867. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  38868. }
  38869. series.forEach(function (eachSeries, seriesIndex) {
  38870. var ranges, minRange, maxRange;
  38871. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38872. minRange = ranges.pop();
  38873. maxRange = ranges.shift();
  38874. var data = eachSeries.data;
  38875. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38876. calPoints.push(points);
  38877. var splitPointList = splitPoints(points);
  38878. for (var i = 0; i < splitPointList.length; i++) {
  38879. var _points2 = splitPointList[i];
  38880. // 绘制区域数
  38881. context.beginPath();
  38882. context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  38883. if (areaOption.gradient) {
  38884. var gradient = context.createLinearGradient(0, opts.area[0], 0, opts.height - opts.area[2]);
  38885. gradient.addColorStop('0', hexToRgb(eachSeries.color, areaOption.opacity));
  38886. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  38887. context.setFillStyle(gradient);
  38888. } else {
  38889. context.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  38890. }
  38891. context.setLineWidth(areaOption.width * opts.pixelRatio);
  38892. if (_points2.length > 1) {
  38893. var firstPoint = _points2[0];
  38894. var lastPoint = _points2[_points2.length - 1];
  38895. context.moveTo(firstPoint.x, firstPoint.y);
  38896. var startPoint = 0;
  38897. if (areaOption.type === 'curve') {
  38898. for (var j = 0; j < _points2.length; j++) {
  38899. var item = _points2[j];
  38900. if (startPoint == 0 && item.x > leftSpace) {
  38901. context.moveTo(item.x, item.y);
  38902. startPoint = 1;
  38903. }
  38904. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  38905. var ctrlPoint = createCurveControlPoints(_points2, j - 1);
  38906. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  38907. }
  38908. }
  38909. ;
  38910. } else {
  38911. for (var _j = 0; _j < _points2.length; _j++) {
  38912. var _item10 = _points2[_j];
  38913. if (startPoint == 0 && _item10.x > leftSpace) {
  38914. context.moveTo(_item10.x, _item10.y);
  38915. startPoint = 1;
  38916. }
  38917. if (_j > 0 && _item10.x > leftSpace && _item10.x < rightSpace) {
  38918. context.lineTo(_item10.x, _item10.y);
  38919. }
  38920. }
  38921. ;
  38922. }
  38923. context.lineTo(lastPoint.x, endY);
  38924. context.lineTo(firstPoint.x, endY);
  38925. context.lineTo(firstPoint.x, firstPoint.y);
  38926. } else {
  38927. var _item11 = _points2[0];
  38928. context.moveTo(_item11.x - eachSpacing / 2, _item11.y);
  38929. context.lineTo(_item11.x + eachSpacing / 2, _item11.y);
  38930. context.lineTo(_item11.x + eachSpacing / 2, endY);
  38931. context.lineTo(_item11.x - eachSpacing / 2, endY);
  38932. context.moveTo(_item11.x - eachSpacing / 2, _item11.y);
  38933. }
  38934. context.closePath();
  38935. context.fill();
  38936. //画连线
  38937. if (areaOption.addLine) {
  38938. if (eachSeries.lineType == 'dash') {
  38939. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  38940. dashLength *= opts.pixelRatio;
  38941. context.setLineDash([dashLength, dashLength]);
  38942. }
  38943. context.beginPath();
  38944. context.setStrokeStyle(eachSeries.color);
  38945. context.setLineWidth(areaOption.width * opts.pixelRatio);
  38946. if (_points2.length === 1) {
  38947. context.moveTo(_points2[0].x, _points2[0].y);
  38948. context.arc(_points2[0].x, _points2[0].y, 1, 0, 2 * Math.PI);
  38949. } else {
  38950. context.moveTo(_points2[0].x, _points2[0].y);
  38951. var _startPoint = 0;
  38952. if (areaOption.type === 'curve') {
  38953. for (var _j2 = 0; _j2 < _points2.length; _j2++) {
  38954. var _item12 = _points2[_j2];
  38955. if (_startPoint == 0 && _item12.x > leftSpace) {
  38956. context.moveTo(_item12.x, _item12.y);
  38957. _startPoint = 1;
  38958. }
  38959. if (_j2 > 0 && _item12.x > leftSpace && _item12.x < rightSpace) {
  38960. var _ctrlPoint = createCurveControlPoints(_points2, _j2 - 1);
  38961. context.bezierCurveTo(_ctrlPoint.ctrA.x, _ctrlPoint.ctrA.y, _ctrlPoint.ctrB.x, _ctrlPoint.ctrB.y, _item12.x, _item12.y);
  38962. }
  38963. }
  38964. ;
  38965. } else {
  38966. for (var _j3 = 0; _j3 < _points2.length; _j3++) {
  38967. var _item13 = _points2[_j3];
  38968. if (_startPoint == 0 && _item13.x > leftSpace) {
  38969. context.moveTo(_item13.x, _item13.y);
  38970. _startPoint = 1;
  38971. }
  38972. if (_j3 > 0 && _item13.x > leftSpace && _item13.x < rightSpace) {
  38973. context.lineTo(_item13.x, _item13.y);
  38974. }
  38975. }
  38976. ;
  38977. }
  38978. context.moveTo(_points2[0].x, _points2[0].y);
  38979. }
  38980. context.stroke();
  38981. context.setLineDash([]);
  38982. }
  38983. }
  38984. //画点
  38985. if (opts.dataPointShape !== false) {
  38986. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  38987. }
  38988. });
  38989. if (opts.dataLabel !== false && process === 1) {
  38990. series.forEach(function (eachSeries, seriesIndex) {
  38991. var ranges, minRange, maxRange;
  38992. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38993. minRange = ranges.pop();
  38994. maxRange = ranges.shift();
  38995. var data = eachSeries.data;
  38996. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38997. drawPointText(points, eachSeries, config, context);
  38998. });
  38999. }
  39000. context.restore();
  39001. return {
  39002. xAxisPoints: xAxisPoints,
  39003. calPoints: calPoints,
  39004. eachSpacing: eachSpacing
  39005. };
  39006. }
  39007. function drawLineDataPoints(series, opts, config, context) {
  39008. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39009. var lineOption = assign({}, {
  39010. type: 'straight',
  39011. width: 2
  39012. }, opts.extra.line);
  39013. lineOption.width *= opts.pixelRatio;
  39014. var xAxisData = opts.chartData.xAxisData,
  39015. xAxisPoints = xAxisData.xAxisPoints,
  39016. eachSpacing = xAxisData.eachSpacing;
  39017. var calPoints = [];
  39018. context.save();
  39019. var leftSpace = 0;
  39020. var rightSpace = opts.width + eachSpacing;
  39021. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  39022. context.translate(opts._scrollDistance_, 0);
  39023. leftSpace = -opts._scrollDistance_ - eachSpacing + opts.area[3];
  39024. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  39025. }
  39026. series.forEach(function (eachSeries, seriesIndex) {
  39027. var ranges, minRange, maxRange;
  39028. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39029. minRange = ranges.pop();
  39030. maxRange = ranges.shift();
  39031. var data = eachSeries.data;
  39032. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39033. calPoints.push(points);
  39034. var splitPointList = splitPoints(points);
  39035. if (eachSeries.lineType == 'dash') {
  39036. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  39037. dashLength *= opts.pixelRatio;
  39038. context.setLineDash([dashLength, dashLength]);
  39039. }
  39040. context.beginPath();
  39041. context.setStrokeStyle(eachSeries.color);
  39042. context.setLineWidth(lineOption.width);
  39043. splitPointList.forEach(function (points, index) {
  39044. if (points.length === 1) {
  39045. context.moveTo(points[0].x, points[0].y);
  39046. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  39047. } else {
  39048. context.moveTo(points[0].x, points[0].y);
  39049. var startPoint = 0;
  39050. if (lineOption.type === 'curve') {
  39051. for (var j = 0; j < points.length; j++) {
  39052. var item = points[j];
  39053. if (startPoint == 0 && item.x > leftSpace) {
  39054. context.moveTo(item.x, item.y);
  39055. startPoint = 1;
  39056. }
  39057. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  39058. var ctrlPoint = createCurveControlPoints(points, j - 1);
  39059. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  39060. }
  39061. }
  39062. ;
  39063. }
  39064. if (lineOption.type === 'straight') {
  39065. for (var _j4 = 0; _j4 < points.length; _j4++) {
  39066. var _item14 = points[_j4];
  39067. if (startPoint == 0 && _item14.x > leftSpace) {
  39068. context.moveTo(_item14.x, _item14.y);
  39069. startPoint = 1;
  39070. }
  39071. if (_j4 > 0 && _item14.x > leftSpace && _item14.x < rightSpace) {
  39072. context.lineTo(_item14.x, _item14.y);
  39073. }
  39074. }
  39075. ;
  39076. }
  39077. if (lineOption.type === 'step') {
  39078. for (var _j5 = 0; _j5 < points.length; _j5++) {
  39079. var _item15 = points[_j5];
  39080. if (startPoint == 0 && _item15.x > leftSpace) {
  39081. context.moveTo(_item15.x, _item15.y);
  39082. startPoint = 1;
  39083. }
  39084. if (_j5 > 0 && _item15.x > leftSpace && _item15.x < rightSpace) {
  39085. context.lineTo(_item15.x, points[_j5 - 1].y);
  39086. context.lineTo(_item15.x, _item15.y);
  39087. }
  39088. }
  39089. ;
  39090. }
  39091. context.moveTo(points[0].x, points[0].y);
  39092. }
  39093. });
  39094. context.stroke();
  39095. context.setLineDash([]);
  39096. if (opts.dataPointShape !== false) {
  39097. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  39098. }
  39099. });
  39100. if (opts.dataLabel !== false && process === 1) {
  39101. series.forEach(function (eachSeries, seriesIndex) {
  39102. var ranges, minRange, maxRange;
  39103. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39104. minRange = ranges.pop();
  39105. maxRange = ranges.shift();
  39106. var data = eachSeries.data;
  39107. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39108. drawPointText(points, eachSeries, config, context);
  39109. });
  39110. }
  39111. context.restore();
  39112. return {
  39113. xAxisPoints: xAxisPoints,
  39114. calPoints: calPoints,
  39115. eachSpacing: eachSpacing
  39116. };
  39117. }
  39118. function drawMixDataPoints(series, opts, config, context) {
  39119. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39120. var xAxisData = opts.chartData.xAxisData,
  39121. xAxisPoints = xAxisData.xAxisPoints,
  39122. eachSpacing = xAxisData.eachSpacing;
  39123. var endY = opts.height - opts.area[2];
  39124. var calPoints = [];
  39125. var columnIndex = 0;
  39126. var columnLength = 0;
  39127. series.forEach(function (eachSeries, seriesIndex) {
  39128. if (eachSeries.type == 'column') {
  39129. columnLength += 1;
  39130. }
  39131. });
  39132. context.save();
  39133. var leftNum = -2;
  39134. var rightNum = xAxisPoints.length + 2;
  39135. var leftSpace = 0;
  39136. var rightSpace = opts.width + eachSpacing;
  39137. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  39138. context.translate(opts._scrollDistance_, 0);
  39139. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  39140. rightNum = leftNum + opts.xAxis.itemCount + 4;
  39141. leftSpace = -opts._scrollDistance_ - eachSpacing + opts.area[3];
  39142. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  39143. }
  39144. series.forEach(function (eachSeries, seriesIndex) {
  39145. var ranges, minRange, maxRange;
  39146. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39147. minRange = ranges.pop();
  39148. maxRange = ranges.shift();
  39149. var data = eachSeries.data;
  39150. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39151. calPoints.push(points);
  39152. // 绘制柱状数据图
  39153. if (eachSeries.type == 'column') {
  39154. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  39155. for (var i = 0; i < points.length; i++) {
  39156. var item = points[i];
  39157. if (item !== null && i > leftNum && i < rightNum) {
  39158. context.beginPath();
  39159. context.setStrokeStyle(item.color || eachSeries.color);
  39160. context.setLineWidth(1);
  39161. context.setFillStyle(item.color || eachSeries.color);
  39162. var startX = item.x - item.width / 2;
  39163. var height = opts.height - item.y - opts.area[2];
  39164. context.moveTo(startX, item.y);
  39165. context.moveTo(startX, item.y);
  39166. context.lineTo(startX + item.width - 2, item.y);
  39167. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  39168. context.lineTo(startX, opts.height - opts.area[2]);
  39169. context.lineTo(startX, item.y);
  39170. context.closePath();
  39171. context.stroke();
  39172. context.fill();
  39173. context.closePath();
  39174. context.fill();
  39175. }
  39176. }
  39177. columnIndex += 1;
  39178. }
  39179. //绘制区域图数据
  39180. if (eachSeries.type == 'area') {
  39181. var _splitPointList = splitPoints(points);
  39182. for (var _i16 = 0; _i16 < _splitPointList.length; _i16++) {
  39183. var _points3 = _splitPointList[_i16];
  39184. // 绘制区域数据
  39185. context.beginPath();
  39186. context.setStrokeStyle(eachSeries.color);
  39187. context.setFillStyle(hexToRgb(eachSeries.color, 0.2));
  39188. context.setLineWidth(2 * opts.pixelRatio);
  39189. if (_points3.length > 1) {
  39190. var firstPoint = _points3[0];
  39191. var lastPoint = _points3[_points3.length - 1];
  39192. context.moveTo(firstPoint.x, firstPoint.y);
  39193. var startPoint = 0;
  39194. if (eachSeries.style === 'curve') {
  39195. for (var j = 0; j < _points3.length; j++) {
  39196. var _item16 = _points3[j];
  39197. if (startPoint == 0 && _item16.x > leftSpace) {
  39198. context.moveTo(_item16.x, _item16.y);
  39199. startPoint = 1;
  39200. }
  39201. if (j > 0 && _item16.x > leftSpace && _item16.x < rightSpace) {
  39202. var ctrlPoint = createCurveControlPoints(_points3, j - 1);
  39203. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item16.x, _item16.y);
  39204. }
  39205. }
  39206. ;
  39207. } else {
  39208. for (var _j6 = 0; _j6 < _points3.length; _j6++) {
  39209. var _item17 = _points3[_j6];
  39210. if (startPoint == 0 && _item17.x > leftSpace) {
  39211. context.moveTo(_item17.x, _item17.y);
  39212. startPoint = 1;
  39213. }
  39214. if (_j6 > 0 && _item17.x > leftSpace && _item17.x < rightSpace) {
  39215. context.lineTo(_item17.x, _item17.y);
  39216. }
  39217. }
  39218. ;
  39219. }
  39220. context.lineTo(lastPoint.x, endY);
  39221. context.lineTo(firstPoint.x, endY);
  39222. context.lineTo(firstPoint.x, firstPoint.y);
  39223. } else {
  39224. var _item18 = _points3[0];
  39225. context.moveTo(_item18.x - eachSpacing / 2, _item18.y);
  39226. context.lineTo(_item18.x + eachSpacing / 2, _item18.y);
  39227. context.lineTo(_item18.x + eachSpacing / 2, endY);
  39228. context.lineTo(_item18.x - eachSpacing / 2, endY);
  39229. context.moveTo(_item18.x - eachSpacing / 2, _item18.y);
  39230. }
  39231. context.closePath();
  39232. context.fill();
  39233. }
  39234. }
  39235. // 绘制折线数据图
  39236. if (eachSeries.type == 'line') {
  39237. var splitPointList = splitPoints(points);
  39238. splitPointList.forEach(function (points, index) {
  39239. if (eachSeries.lineType == 'dash') {
  39240. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  39241. dashLength *= opts.pixelRatio;
  39242. context.setLineDash([dashLength, dashLength]);
  39243. }
  39244. context.beginPath();
  39245. context.setStrokeStyle(eachSeries.color);
  39246. context.setLineWidth(2 * opts.pixelRatio);
  39247. if (points.length === 1) {
  39248. context.moveTo(points[0].x, points[0].y);
  39249. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  39250. } else {
  39251. context.moveTo(points[0].x, points[0].y);
  39252. var _startPoint2 = 0;
  39253. if (eachSeries.style == 'curve') {
  39254. for (var _j7 = 0; _j7 < points.length; _j7++) {
  39255. var _item19 = points[_j7];
  39256. if (_startPoint2 == 0 && _item19.x > leftSpace) {
  39257. context.moveTo(_item19.x, _item19.y);
  39258. _startPoint2 = 1;
  39259. }
  39260. if (_j7 > 0 && _item19.x > leftSpace && _item19.x < rightSpace) {
  39261. var ctrlPoint = createCurveControlPoints(points, _j7 - 1);
  39262. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item19.x, _item19.y);
  39263. }
  39264. }
  39265. } else {
  39266. for (var _j8 = 0; _j8 < points.length; _j8++) {
  39267. var _item20 = points[_j8];
  39268. if (_startPoint2 == 0 && _item20.x > leftSpace) {
  39269. context.moveTo(_item20.x, _item20.y);
  39270. _startPoint2 = 1;
  39271. }
  39272. if (_j8 > 0 && _item20.x > leftSpace && _item20.x < rightSpace) {
  39273. context.lineTo(_item20.x, _item20.y);
  39274. }
  39275. }
  39276. }
  39277. context.moveTo(points[0].x, points[0].y);
  39278. }
  39279. context.stroke();
  39280. context.setLineDash([]);
  39281. });
  39282. }
  39283. // 绘制点数据图
  39284. if (eachSeries.type == 'point') {
  39285. eachSeries.addPoint = true;
  39286. }
  39287. if (eachSeries.addPoint == true && eachSeries.type !== 'column') {
  39288. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  39289. }
  39290. });
  39291. if (opts.dataLabel !== false && process === 1) {
  39292. var columnIndex = 0;
  39293. series.forEach(function (eachSeries, seriesIndex) {
  39294. var ranges, minRange, maxRange;
  39295. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39296. minRange = ranges.pop();
  39297. maxRange = ranges.shift();
  39298. var data = eachSeries.data;
  39299. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39300. if (eachSeries.type !== 'column') {
  39301. drawPointText(points, eachSeries, config, context);
  39302. } else {
  39303. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  39304. drawPointText(points, eachSeries, config, context);
  39305. columnIndex += 1;
  39306. }
  39307. });
  39308. }
  39309. context.restore();
  39310. return {
  39311. xAxisPoints: xAxisPoints,
  39312. calPoints: calPoints,
  39313. eachSpacing: eachSpacing
  39314. };
  39315. }
  39316. function drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints) {
  39317. var toolTipOption = opts.extra.tooltip || {};
  39318. if (toolTipOption.horizentalLine && opts.tooltip && process === 1 && (opts.type == 'line' || opts.type == 'area' || opts.type == 'column' || opts.type == 'candle' || opts.type == 'mix')) {
  39319. drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints);
  39320. }
  39321. context.save();
  39322. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  39323. context.translate(opts._scrollDistance_, 0);
  39324. }
  39325. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  39326. drawToolTip(opts.tooltip.textList, opts.tooltip.offset, opts, config, context, eachSpacing, xAxisPoints);
  39327. }
  39328. context.restore();
  39329. }
  39330. function drawXAxis(categories, opts, config, context) {
  39331. var xAxisData = opts.chartData.xAxisData,
  39332. xAxisPoints = xAxisData.xAxisPoints,
  39333. startX = xAxisData.startX,
  39334. endX = xAxisData.endX,
  39335. eachSpacing = xAxisData.eachSpacing;
  39336. var boundaryGap = 'center';
  39337. if (opts.type == 'line' || opts.type == 'area') {
  39338. boundaryGap = opts.xAxis.boundaryGap;
  39339. }
  39340. var startY = opts.height - opts.area[2];
  39341. var endY = opts.area[0];
  39342. //绘制滚动条
  39343. if (opts.enableScroll && opts.xAxis.scrollShow) {
  39344. var scrollY = opts.height - opts.area[2] + config.xAxisHeight;
  39345. var scrollScreenWidth = endX - startX;
  39346. var scrollTotalWidth = eachSpacing * (xAxisPoints.length - 1);
  39347. var scrollWidth = scrollScreenWidth * scrollScreenWidth / scrollTotalWidth;
  39348. var scrollLeft = 0;
  39349. if (opts._scrollDistance_) {
  39350. scrollLeft = -opts._scrollDistance_ * scrollScreenWidth / scrollTotalWidth;
  39351. }
  39352. context.beginPath();
  39353. context.setLineCap('round');
  39354. context.setLineWidth(6 * opts.pixelRatio);
  39355. context.setStrokeStyle(opts.xAxis.scrollBackgroundColor || "#EFEBEF");
  39356. context.moveTo(startX, scrollY);
  39357. context.lineTo(endX, scrollY);
  39358. context.stroke();
  39359. context.closePath();
  39360. context.beginPath();
  39361. context.setLineCap('round');
  39362. context.setLineWidth(6 * opts.pixelRatio);
  39363. context.setStrokeStyle(opts.xAxis.scrollColor || "#A6A6A6");
  39364. context.moveTo(startX + scrollLeft, scrollY);
  39365. context.lineTo(startX + scrollLeft + scrollWidth, scrollY);
  39366. context.stroke();
  39367. context.closePath();
  39368. context.setLineCap('butt');
  39369. }
  39370. context.save();
  39371. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  39372. context.translate(opts._scrollDistance_, 0);
  39373. }
  39374. //绘制X轴刻度线
  39375. if (opts.xAxis.calibration === true) {
  39376. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  39377. context.setLineCap('butt');
  39378. context.setLineWidth(1 * opts.pixelRatio);
  39379. xAxisPoints.forEach(function (item, index) {
  39380. if (index > 0) {
  39381. context.beginPath();
  39382. context.moveTo(item - eachSpacing / 2, startY);
  39383. context.lineTo(item - eachSpacing / 2, startY + 3 * opts.pixelRatio);
  39384. context.closePath();
  39385. context.stroke();
  39386. }
  39387. });
  39388. }
  39389. //绘制X轴网格
  39390. if (opts.xAxis.disableGrid !== true) {
  39391. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  39392. context.setLineCap('butt');
  39393. context.setLineWidth(1 * opts.pixelRatio);
  39394. if (opts.xAxis.gridType == 'dash') {
  39395. context.setLineDash([opts.xAxis.dashLength, opts.xAxis.dashLength]);
  39396. }
  39397. opts.xAxis.gridEval = opts.xAxis.gridEval || 1;
  39398. xAxisPoints.forEach(function (item, index) {
  39399. if (index % opts.xAxis.gridEval == 0) {
  39400. context.beginPath();
  39401. context.moveTo(item, startY);
  39402. context.lineTo(item, endY);
  39403. context.stroke();
  39404. }
  39405. });
  39406. context.setLineDash([]);
  39407. }
  39408. //绘制X轴文案
  39409. if (opts.xAxis.disabled !== true) {
  39410. // 对X轴列表做抽稀处理
  39411. //默认全部显示X轴标签
  39412. var maxXAxisListLength = categories.length;
  39413. //如果设置了X轴单屏数量
  39414. if (opts.xAxis.labelCount) {
  39415. //如果设置X轴密度
  39416. if (opts.xAxis.itemCount) {
  39417. maxXAxisListLength = Math.ceil(categories.length / opts.xAxis.itemCount * opts.xAxis.labelCount);
  39418. } else {
  39419. maxXAxisListLength = opts.xAxis.labelCount;
  39420. }
  39421. maxXAxisListLength -= 1;
  39422. }
  39423. var ratio = Math.ceil(categories.length / maxXAxisListLength);
  39424. var newCategories = [];
  39425. var cgLength = categories.length;
  39426. for (var i = 0; i < cgLength; i++) {
  39427. if (i % ratio !== 0) {
  39428. newCategories.push("");
  39429. } else {
  39430. newCategories.push(categories[i]);
  39431. }
  39432. }
  39433. newCategories[cgLength - 1] = categories[cgLength - 1];
  39434. var xAxisFontSize = opts.xAxis.fontSize || config.fontSize;
  39435. if (config._xAxisTextAngle_ === 0) {
  39436. newCategories.forEach(function (item, index) {
  39437. var offset = -measureText(String(item), xAxisFontSize) / 2;
  39438. if (boundaryGap == 'center') {
  39439. offset += eachSpacing / 2;
  39440. }
  39441. var scrollHeight = 0;
  39442. if (opts.xAxis.scrollShow) {
  39443. scrollHeight = 6 * opts.pixelRatio;
  39444. }
  39445. context.beginPath();
  39446. context.setFontSize(xAxisFontSize);
  39447. context.setFillStyle(opts.xAxis.fontColor || '#666666');
  39448. context.fillText(String(item), xAxisPoints[index] + offset, startY + xAxisFontSize + (config.xAxisHeight - scrollHeight - xAxisFontSize) / 2);
  39449. context.closePath();
  39450. context.stroke();
  39451. });
  39452. } else {
  39453. newCategories.forEach(function (item, index) {
  39454. context.save();
  39455. context.beginPath();
  39456. context.setFontSize(xAxisFontSize);
  39457. context.setFillStyle(opts.xAxis.fontColor || '#666666');
  39458. var textWidth = measureText(String(item), xAxisFontSize);
  39459. var offset = -textWidth;
  39460. if (boundaryGap == 'center') {
  39461. offset += eachSpacing / 2;
  39462. }
  39463. var _calRotateTranslate = calRotateTranslate(xAxisPoints[index] + eachSpacing / 2, startY + xAxisFontSize / 2 + 5, opts.height),
  39464. transX = _calRotateTranslate.transX,
  39465. transY = _calRotateTranslate.transY;
  39466. context.rotate(-1 * config._xAxisTextAngle_);
  39467. context.translate(transX, transY);
  39468. context.fillText(String(item), xAxisPoints[index] + offset, startY + xAxisFontSize + 5);
  39469. context.closePath();
  39470. context.stroke();
  39471. context.restore();
  39472. });
  39473. }
  39474. }
  39475. context.restore();
  39476. //绘制X轴轴线
  39477. if (opts.xAxis.axisLine) {
  39478. context.beginPath();
  39479. context.setStrokeStyle(opts.xAxis.axisLineColor);
  39480. context.setLineWidth(1 * opts.pixelRatio);
  39481. context.moveTo(startX, opts.height - opts.area[2]);
  39482. context.lineTo(endX, opts.height - opts.area[2]);
  39483. context.stroke();
  39484. }
  39485. }
  39486. function drawYAxisGrid(categories, opts, config, context) {
  39487. if (opts.yAxis.disableGrid === true) {
  39488. return;
  39489. }
  39490. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  39491. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  39492. var startX = opts.area[3];
  39493. var xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  39494. xAxiseachSpacing = opts.chartData.xAxisData.eachSpacing;
  39495. var TotalWidth = xAxiseachSpacing * (xAxisPoints.length - 1);
  39496. var endX = startX + TotalWidth;
  39497. var points = [];
  39498. for (var i = 0; i < opts.yAxis.splitNumber + 1; i++) {
  39499. points.push(opts.height - opts.area[2] - eachSpacing * i);
  39500. }
  39501. context.save();
  39502. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  39503. context.translate(opts._scrollDistance_, 0);
  39504. }
  39505. if (opts.yAxis.gridType == 'dash') {
  39506. context.setLineDash([opts.yAxis.dashLength, opts.yAxis.dashLength]);
  39507. }
  39508. context.setStrokeStyle(opts.yAxis.gridColor);
  39509. context.setLineWidth(1 * opts.pixelRatio);
  39510. points.forEach(function (item, index) {
  39511. context.beginPath();
  39512. context.moveTo(startX, item);
  39513. context.lineTo(endX, item);
  39514. context.stroke();
  39515. });
  39516. context.setLineDash([]);
  39517. context.restore();
  39518. }
  39519. function drawYAxis(series, opts, config, context) {
  39520. if (opts.yAxis.disabled === true) {
  39521. return;
  39522. }
  39523. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  39524. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  39525. var startX = opts.area[3];
  39526. var endX = opts.width - opts.area[1];
  39527. var endY = opts.height - opts.area[2];
  39528. var fillEndY = endY + config.xAxisHeight;
  39529. if (opts.xAxis.scrollShow) {
  39530. fillEndY -= 3 * opts.pixelRatio;
  39531. }
  39532. if (opts.xAxis.rotateLabel) {
  39533. fillEndY = opts.height - opts.area[2] + 3;
  39534. }
  39535. // set YAxis background
  39536. context.beginPath();
  39537. context.setFillStyle(opts.background || '#ffffff');
  39538. if (opts._scrollDistance_ < 0) {
  39539. context.fillRect(0, 0, startX, fillEndY);
  39540. }
  39541. if (opts.enableScroll == true) {
  39542. context.fillRect(endX, 0, opts.width, fillEndY);
  39543. }
  39544. context.closePath();
  39545. context.stroke();
  39546. var points = [];
  39547. for (var i = 0; i <= opts.yAxis.splitNumber; i++) {
  39548. points.push(opts.area[0] + eachSpacing * i);
  39549. }
  39550. var tStartLeft = opts.area[3];
  39551. var tStartRight = opts.width - opts.area[1];
  39552. var _loop4 = function _loop4(_i17) {
  39553. var yData = opts.yAxis.data[_i17];
  39554. if (yData.disabled !== true) {
  39555. var rangesFormat = opts.chartData.yAxisData.rangesFormat[_i17];
  39556. var yAxisFontSize = yData.fontSize || config.fontSize;
  39557. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[_i17];
  39558. //画Y轴刻度及文案
  39559. rangesFormat.forEach(function (item, index) {
  39560. var pos = points[index] ? points[index] : endY;
  39561. context.beginPath();
  39562. context.setFontSize(yAxisFontSize);
  39563. context.setLineWidth(1 * opts.pixelRatio);
  39564. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  39565. context.setFillStyle(yData.fontColor || '#666666');
  39566. if (yAxisWidth.position == 'left') {
  39567. context.fillText(String(item), tStartLeft - yAxisWidth.width, pos + yAxisFontSize / 2);
  39568. //画刻度线
  39569. if (yData.calibration == true) {
  39570. context.moveTo(tStartLeft, pos);
  39571. context.lineTo(tStartLeft - 3 * opts.pixelRatio, pos);
  39572. }
  39573. } else {
  39574. context.fillText(String(item), tStartRight + 4 * opts.pixelRatio, pos + yAxisFontSize / 2);
  39575. //画刻度线
  39576. if (yData.calibration == true) {
  39577. context.moveTo(tStartRight, pos);
  39578. context.lineTo(tStartRight + 3 * opts.pixelRatio, pos);
  39579. }
  39580. }
  39581. context.closePath();
  39582. context.stroke();
  39583. });
  39584. //画Y轴轴线
  39585. if (yData.axisLine !== false) {
  39586. context.beginPath();
  39587. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  39588. context.setLineWidth(1 * opts.pixelRatio);
  39589. if (yAxisWidth.position == 'left') {
  39590. context.moveTo(tStartLeft, opts.height - opts.area[2]);
  39591. context.lineTo(tStartLeft, opts.area[0]);
  39592. } else {
  39593. context.moveTo(tStartRight, opts.height - opts.area[2]);
  39594. context.lineTo(tStartRight, opts.area[0]);
  39595. }
  39596. context.stroke();
  39597. }
  39598. //画Y轴标题
  39599. if (opts.yAxis.showTitle) {
  39600. var titleFontSize = yData.titleFontSize || config.fontSize;
  39601. var title = yData.title;
  39602. context.beginPath();
  39603. context.setFontSize(titleFontSize);
  39604. context.setFillStyle(yData.titleFontColor || '#666666');
  39605. if (yAxisWidth.position == 'left') {
  39606. context.fillText(title, tStartLeft - measureText(title, titleFontSize) / 2, opts.area[0] - 10 * opts.pixelRatio);
  39607. } else {
  39608. context.fillText(title, tStartRight - measureText(title, titleFontSize) / 2, opts.area[0] - 10 * opts.pixelRatio);
  39609. }
  39610. context.closePath();
  39611. context.stroke();
  39612. }
  39613. if (yAxisWidth.position == 'left') {
  39614. tStartLeft -= yAxisWidth.width + opts.yAxis.padding;
  39615. } else {
  39616. tStartRight += yAxisWidth.width + opts.yAxis.padding;
  39617. }
  39618. }
  39619. };
  39620. for (var _i17 = 0; _i17 < opts.yAxis.data.length; _i17++) {
  39621. _loop4(_i17);
  39622. }
  39623. }
  39624. function drawLegend(series, opts, config, context, chartData) {
  39625. if (opts.legend.show === false) {
  39626. return;
  39627. }
  39628. var legendData = chartData.legendData;
  39629. var legendList = legendData.points;
  39630. var legendArea = legendData.area;
  39631. var padding = opts.legend.padding;
  39632. var fontSize = opts.legend.fontSize;
  39633. var shapeWidth = 15 * opts.pixelRatio;
  39634. var shapeRight = 5 * opts.pixelRatio;
  39635. var itemGap = opts.legend.itemGap;
  39636. var lineHeight = Math.max(opts.legend.lineHeight * opts.pixelRatio, fontSize);
  39637. //画背景及边框
  39638. context.beginPath();
  39639. context.setLineWidth(opts.legend.borderWidth);
  39640. context.setStrokeStyle(opts.legend.borderColor);
  39641. context.setFillStyle(opts.legend.backgroundColor);
  39642. context.moveTo(legendArea.start.x, legendArea.start.y);
  39643. context.rect(legendArea.start.x, legendArea.start.y, legendArea.width, legendArea.height);
  39644. context.closePath();
  39645. context.fill();
  39646. context.stroke();
  39647. legendList.forEach(function (itemList, listIndex) {
  39648. var width = 0;
  39649. var height = 0;
  39650. width = legendData.widthArr[listIndex];
  39651. height = legendData.heightArr[listIndex];
  39652. var startX = 0;
  39653. var startY = 0;
  39654. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  39655. startX = legendArea.start.x + (legendArea.width - width) / 2;
  39656. startY = legendArea.start.y + padding + listIndex * lineHeight;
  39657. } else {
  39658. if (listIndex == 0) {
  39659. width = 0;
  39660. } else {
  39661. width = legendData.widthArr[listIndex - 1];
  39662. }
  39663. startX = legendArea.start.x + padding + width;
  39664. startY = legendArea.start.y + padding + (legendArea.height - height) / 2;
  39665. }
  39666. context.setFontSize(config.fontSize);
  39667. for (var i = 0; i < itemList.length; i++) {
  39668. var item = itemList[i];
  39669. item.area = [0, 0, 0, 0];
  39670. item.area[0] = startX;
  39671. item.area[1] = startY;
  39672. item.area[3] = startY + lineHeight;
  39673. context.beginPath();
  39674. context.setLineWidth(1 * opts.pixelRatio);
  39675. context.setStrokeStyle(item.show ? item.color : opts.legend.hiddenColor);
  39676. context.setFillStyle(item.show ? item.color : opts.legend.hiddenColor);
  39677. switch (item.legendShape) {
  39678. case 'line':
  39679. context.moveTo(startX, startY + 0.5 * lineHeight - 2 * opts.pixelRatio);
  39680. context.fillRect(startX, startY + 0.5 * lineHeight - 2 * opts.pixelRatio, 15 * opts.pixelRatio, 4 * opts.pixelRatio);
  39681. break;
  39682. case 'triangle':
  39683. context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
  39684. context.lineTo(startX + 2.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio);
  39685. context.lineTo(startX + 12.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio);
  39686. context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
  39687. break;
  39688. case 'diamond':
  39689. context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
  39690. context.lineTo(startX + 2.5 * opts.pixelRatio, startY + 0.5 * lineHeight);
  39691. context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio);
  39692. context.lineTo(startX + 12.5 * opts.pixelRatio, startY + 0.5 * lineHeight);
  39693. context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
  39694. break;
  39695. case 'circle':
  39696. context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight);
  39697. context.arc(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight, 5 * opts.pixelRatio, 0, 2 * Math.PI);
  39698. break;
  39699. case 'rect':
  39700. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
  39701. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio, 15 * opts.pixelRatio, 10 * opts.pixelRatio);
  39702. break;
  39703. default:
  39704. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
  39705. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio, 15 * opts.pixelRatio, 10 * opts.pixelRatio);
  39706. }
  39707. context.closePath();
  39708. context.fill();
  39709. context.stroke();
  39710. startX += shapeWidth + shapeRight;
  39711. var fontTrans = 0.5 * lineHeight + 0.5 * fontSize - 2;
  39712. context.beginPath();
  39713. context.setFontSize(fontSize);
  39714. context.setFillStyle(item.show ? opts.legend.fontColor : opts.legend.hiddenColor);
  39715. context.fillText(item.name, startX, startY + fontTrans);
  39716. context.closePath();
  39717. context.stroke();
  39718. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  39719. startX += measureText(item.name, fontSize) + itemGap;
  39720. item.area[2] = startX;
  39721. } else {
  39722. item.area[2] = startX + measureText(item.name, fontSize) + itemGap;
  39723. ;
  39724. startX -= shapeWidth + shapeRight;
  39725. startY += lineHeight;
  39726. }
  39727. }
  39728. });
  39729. }
  39730. function drawPieDataPoints(series, opts, config, context) {
  39731. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39732. var pieOption = assign({}, {
  39733. activeOpacity: 0.5,
  39734. activeRadius: 10 * opts.pixelRatio,
  39735. offsetAngle: 0,
  39736. labelWidth: 15 * opts.pixelRatio,
  39737. ringWidth: 0,
  39738. border: false,
  39739. borderWidth: 2,
  39740. borderColor: '#FFFFFF'
  39741. }, opts.extra.pie);
  39742. var centerPosition = {
  39743. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  39744. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  39745. };
  39746. if (config.pieChartLinePadding == 0) {
  39747. config.pieChartLinePadding = pieOption.activeRadius;
  39748. }
  39749. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);
  39750. series = getPieDataPoints(series, radius, process);
  39751. var activeRadius = pieOption.activeRadius;
  39752. series = series.map(function (eachSeries) {
  39753. eachSeries._start_ += pieOption.offsetAngle * Math.PI / 180;
  39754. return eachSeries;
  39755. });
  39756. series.forEach(function (eachSeries, seriesIndex) {
  39757. if (opts.tooltip) {
  39758. if (opts.tooltip.index == seriesIndex) {
  39759. context.beginPath();
  39760. context.setFillStyle(hexToRgb(eachSeries.color, opts.extra.pie.activeOpacity || 0.5));
  39761. context.moveTo(centerPosition.x, centerPosition.y);
  39762. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_ + activeRadius, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  39763. context.closePath();
  39764. context.fill();
  39765. }
  39766. }
  39767. context.beginPath();
  39768. context.setLineWidth(pieOption.borderWidth * opts.pixelRatio);
  39769. context.lineJoin = "round";
  39770. context.setStrokeStyle(pieOption.borderColor);
  39771. context.setFillStyle(eachSeries.color);
  39772. context.moveTo(centerPosition.x, centerPosition.y);
  39773. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  39774. context.closePath();
  39775. context.fill();
  39776. if (pieOption.border == true) {
  39777. context.stroke();
  39778. }
  39779. });
  39780. if (opts.type === 'ring') {
  39781. var innerPieWidth = radius * 0.6;
  39782. if (typeof opts.extra.pie.ringWidth === 'number' && opts.extra.pie.ringWidth > 0) {
  39783. innerPieWidth = Math.max(0, radius - opts.extra.pie.ringWidth);
  39784. }
  39785. context.beginPath();
  39786. context.setFillStyle(opts.background || '#ffffff');
  39787. context.moveTo(centerPosition.x, centerPosition.y);
  39788. context.arc(centerPosition.x, centerPosition.y, innerPieWidth, 0, 2 * Math.PI);
  39789. context.closePath();
  39790. context.fill();
  39791. }
  39792. if (opts.dataLabel !== false && process === 1) {
  39793. var valid = false;
  39794. for (var i = 0, len = series.length; i < len; i++) {
  39795. if (series[i].data > 0) {
  39796. valid = true;
  39797. break;
  39798. }
  39799. }
  39800. if (valid) {
  39801. drawPieText(series, opts, config, context, radius, centerPosition);
  39802. }
  39803. }
  39804. if (process === 1 && opts.type === 'ring') {
  39805. drawRingTitle(opts, config, context, centerPosition);
  39806. }
  39807. return {
  39808. center: centerPosition,
  39809. radius: radius,
  39810. series: series
  39811. };
  39812. }
  39813. function drawRoseDataPoints(series, opts, config, context) {
  39814. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39815. var roseOption = assign({}, {
  39816. type: 'area',
  39817. activeOpacity: 0.5,
  39818. activeRadius: 10 * opts.pixelRatio,
  39819. offsetAngle: 0,
  39820. labelWidth: 15 * opts.pixelRatio,
  39821. border: false,
  39822. borderWidth: 2,
  39823. borderColor: '#FFFFFF'
  39824. }, opts.extra.rose);
  39825. if (config.pieChartLinePadding == 0) {
  39826. config.pieChartLinePadding = roseOption.activeRadius;
  39827. }
  39828. var centerPosition = {
  39829. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  39830. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  39831. };
  39832. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);
  39833. var minRadius = roseOption.minRadius || radius * 0.5;
  39834. series = getRoseDataPoints(series, roseOption.type, minRadius, radius, process);
  39835. var activeRadius = roseOption.activeRadius;
  39836. series = series.map(function (eachSeries) {
  39837. eachSeries._start_ += (roseOption.offsetAngle || 0) * Math.PI / 180;
  39838. return eachSeries;
  39839. });
  39840. series.forEach(function (eachSeries, seriesIndex) {
  39841. if (opts.tooltip) {
  39842. if (opts.tooltip.index == seriesIndex) {
  39843. context.beginPath();
  39844. context.setFillStyle(hexToRgb(eachSeries.color, roseOption.activeOpacity || 0.5));
  39845. context.moveTo(centerPosition.x, centerPosition.y);
  39846. context.arc(centerPosition.x, centerPosition.y, activeRadius + eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  39847. context.closePath();
  39848. context.fill();
  39849. }
  39850. }
  39851. context.beginPath();
  39852. context.setLineWidth(roseOption.borderWidth * opts.pixelRatio);
  39853. context.lineJoin = "round";
  39854. context.setStrokeStyle(roseOption.borderColor);
  39855. context.setFillStyle(eachSeries.color);
  39856. context.moveTo(centerPosition.x, centerPosition.y);
  39857. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  39858. context.closePath();
  39859. context.fill();
  39860. if (roseOption.border == true) {
  39861. context.stroke();
  39862. }
  39863. });
  39864. if (opts.dataLabel !== false && process === 1) {
  39865. var valid = false;
  39866. for (var i = 0, len = series.length; i < len; i++) {
  39867. if (series[i].data > 0) {
  39868. valid = true;
  39869. break;
  39870. }
  39871. }
  39872. if (valid) {
  39873. drawPieText(series, opts, config, context, radius, centerPosition);
  39874. }
  39875. }
  39876. return {
  39877. center: centerPosition,
  39878. radius: radius,
  39879. series: series
  39880. };
  39881. }
  39882. function drawArcbarDataPoints(series, opts, config, context) {
  39883. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39884. var arcbarOption = assign({}, {
  39885. startAngle: 0.75,
  39886. endAngle: 0.25,
  39887. type: 'default',
  39888. width: 12 * opts.pixelRatio,
  39889. gap: 2 * opts.pixelRatio
  39890. }, opts.extra.arcbar);
  39891. series = getArcbarDataPoints(series, arcbarOption, process);
  39892. var centerPosition;
  39893. if (arcbarOption.center) {
  39894. centerPosition = arcbarOption.center;
  39895. } else {
  39896. centerPosition = {
  39897. x: opts.width / 2,
  39898. y: opts.height / 2
  39899. };
  39900. }
  39901. var radius;
  39902. if (arcbarOption.radius) {
  39903. radius = arcbarOption.radius;
  39904. } else {
  39905. radius = Math.min(centerPosition.x, centerPosition.y);
  39906. radius -= 5 * opts.pixelRatio;
  39907. radius -= arcbarOption.width / 2;
  39908. }
  39909. for (var i = 0; i < series.length; i++) {
  39910. var eachSeries = series[i];
  39911. //背景颜色
  39912. context.setLineWidth(arcbarOption.width);
  39913. context.setStrokeStyle(arcbarOption.backgroundColor || '#E9E9E9');
  39914. context.setLineCap('round');
  39915. context.beginPath();
  39916. if (arcbarOption.type == 'default') {
  39917. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width + arcbarOption.gap) * i, arcbarOption.startAngle * Math.PI, arcbarOption.endAngle * Math.PI, false);
  39918. } else {
  39919. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width + arcbarOption.gap) * i, 0, 2 * Math.PI, false);
  39920. }
  39921. context.stroke();
  39922. //进度条
  39923. context.setLineWidth(arcbarOption.width);
  39924. context.setStrokeStyle(eachSeries.color);
  39925. context.setLineCap('round');
  39926. context.beginPath();
  39927. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width + arcbarOption.gap) * i, arcbarOption.startAngle * Math.PI, eachSeries._proportion_ * Math.PI, false);
  39928. context.stroke();
  39929. }
  39930. drawRingTitle(opts, config, context, centerPosition);
  39931. return {
  39932. center: centerPosition,
  39933. radius: radius,
  39934. series: series
  39935. };
  39936. }
  39937. function drawGaugeDataPoints(categories, series, opts, config, context) {
  39938. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  39939. var gaugeOption = assign({}, {
  39940. type: 'default',
  39941. startAngle: 0.75,
  39942. endAngle: 0.25,
  39943. width: 15,
  39944. splitLine: {
  39945. fixRadius: 0,
  39946. splitNumber: 10,
  39947. width: 15,
  39948. color: '#FFFFFF',
  39949. childNumber: 5,
  39950. childWidth: 5
  39951. },
  39952. pointer: {
  39953. width: 15,
  39954. color: 'auto'
  39955. }
  39956. }, opts.extra.gauge);
  39957. if (gaugeOption.oldAngle == undefined) {
  39958. gaugeOption.oldAngle = gaugeOption.startAngle;
  39959. }
  39960. if (gaugeOption.oldData == undefined) {
  39961. gaugeOption.oldData = 0;
  39962. }
  39963. categories = getGaugeAxisPoints(categories, gaugeOption.startAngle, gaugeOption.endAngle);
  39964. var centerPosition = {
  39965. x: opts.width / 2,
  39966. y: opts.height / 2
  39967. };
  39968. var radius = Math.min(centerPosition.x, centerPosition.y);
  39969. radius -= 5 * opts.pixelRatio;
  39970. radius -= gaugeOption.width / 2;
  39971. var innerRadius = radius - gaugeOption.width;
  39972. var totalAngle = 0;
  39973. //判断仪表盘的样式:default百度样式,progress新样式
  39974. if (gaugeOption.type == 'progress') {
  39975. //## 第一步画中心圆形背景和进度条背景
  39976. //中心圆形背景
  39977. var pieRadius = radius - gaugeOption.width * 3;
  39978. context.beginPath();
  39979. var gradient = context.createLinearGradient(centerPosition.x, centerPosition.y - pieRadius, centerPosition.x, centerPosition.y + pieRadius);
  39980. //配置渐变填充(起点:中心点向上减半径;结束点中心点向下加半径)
  39981. gradient.addColorStop('0', hexToRgb(series[0].color, 0.3));
  39982. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  39983. context.setFillStyle(gradient);
  39984. context.arc(centerPosition.x, centerPosition.y, pieRadius, 0, 2 * Math.PI, false);
  39985. context.fill();
  39986. //画进度条背景
  39987. context.setLineWidth(gaugeOption.width);
  39988. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  39989. context.setLineCap('round');
  39990. context.beginPath();
  39991. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, gaugeOption.endAngle * Math.PI, false);
  39992. context.stroke();
  39993. //## 第二步画刻度线
  39994. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  39995. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  39996. var childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  39997. var startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  39998. var endX = -radius - gaugeOption.width - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  39999. context.save();
  40000. context.translate(centerPosition.x, centerPosition.y);
  40001. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  40002. var len = gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1;
  40003. var proc = series[0].data * process;
  40004. for (var i = 0; i < len; i++) {
  40005. context.beginPath();
  40006. //刻度线随进度变色
  40007. if (proc > i / len) {
  40008. context.setStrokeStyle(hexToRgb(series[0].color, 1));
  40009. } else {
  40010. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  40011. }
  40012. context.setLineWidth(3 * opts.pixelRatio);
  40013. context.moveTo(startX, 0);
  40014. context.lineTo(endX, 0);
  40015. context.stroke();
  40016. context.rotate(childAngle * Math.PI);
  40017. }
  40018. context.restore();
  40019. //## 第三步画进度条
  40020. series = getArcbarDataPoints(series, gaugeOption, process);
  40021. context.setLineWidth(gaugeOption.width);
  40022. context.setStrokeStyle(series[0].color);
  40023. context.setLineCap('round');
  40024. context.beginPath();
  40025. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, series[0]._proportion_ * Math.PI, false);
  40026. context.stroke();
  40027. //## 第四步画指针
  40028. var pointerRadius = radius - gaugeOption.width * 2.5;
  40029. context.save();
  40030. context.translate(centerPosition.x, centerPosition.y);
  40031. context.rotate((series[0]._proportion_ - 1) * Math.PI);
  40032. context.beginPath();
  40033. context.setLineWidth(gaugeOption.width / 3);
  40034. var gradient3 = context.createLinearGradient(0, -pointerRadius * 0.6, 0, pointerRadius * 0.6);
  40035. gradient3.addColorStop('0', hexToRgb('#FFFFFF', 0));
  40036. gradient3.addColorStop('0.5', hexToRgb(series[0].color, 1));
  40037. gradient3.addColorStop('1.0', hexToRgb('#FFFFFF', 0));
  40038. context.setStrokeStyle(gradient3);
  40039. context.arc(0, 0, pointerRadius, 0.85 * Math.PI, 1.15 * Math.PI, false);
  40040. context.stroke();
  40041. context.beginPath();
  40042. context.setLineWidth(1);
  40043. context.setStrokeStyle(series[0].color);
  40044. context.setFillStyle(series[0].color);
  40045. context.moveTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  40046. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2 - 4, 0);
  40047. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, 4);
  40048. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  40049. context.stroke();
  40050. context.fill();
  40051. context.restore();
  40052. //default百度样式
  40053. } else {
  40054. //画背景
  40055. context.setLineWidth(gaugeOption.width);
  40056. context.setLineCap('butt');
  40057. for (var _i18 = 0; _i18 < categories.length; _i18++) {
  40058. var eachCategories = categories[_i18];
  40059. context.beginPath();
  40060. context.setStrokeStyle(eachCategories.color);
  40061. context.arc(centerPosition.x, centerPosition.y, radius, eachCategories._startAngle_ * Math.PI, eachCategories._endAngle_ * Math.PI, false);
  40062. context.stroke();
  40063. }
  40064. context.save();
  40065. //画刻度线
  40066. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  40067. var _splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  40068. var _childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  40069. var _startX2 = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  40070. var _endX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  40071. var childendX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.childWidth;
  40072. context.translate(centerPosition.x, centerPosition.y);
  40073. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  40074. for (var _i19 = 0; _i19 < gaugeOption.splitLine.splitNumber + 1; _i19++) {
  40075. context.beginPath();
  40076. context.setStrokeStyle(gaugeOption.splitLine.color);
  40077. context.setLineWidth(2 * opts.pixelRatio);
  40078. context.moveTo(_startX2, 0);
  40079. context.lineTo(_endX, 0);
  40080. context.stroke();
  40081. context.rotate(_splitAngle * Math.PI);
  40082. }
  40083. context.restore();
  40084. context.save();
  40085. context.translate(centerPosition.x, centerPosition.y);
  40086. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  40087. for (var _i20 = 0; _i20 < gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1; _i20++) {
  40088. context.beginPath();
  40089. context.setStrokeStyle(gaugeOption.splitLine.color);
  40090. context.setLineWidth(1 * opts.pixelRatio);
  40091. context.moveTo(_startX2, 0);
  40092. context.lineTo(childendX, 0);
  40093. context.stroke();
  40094. context.rotate(_childAngle * Math.PI);
  40095. }
  40096. context.restore();
  40097. //画指针
  40098. series = getGaugeDataPoints(series, categories, gaugeOption, process);
  40099. for (var _i21 = 0; _i21 < series.length; _i21++) {
  40100. var eachSeries = series[_i21];
  40101. context.save();
  40102. context.translate(centerPosition.x, centerPosition.y);
  40103. context.rotate((eachSeries._proportion_ - 1) * Math.PI);
  40104. context.beginPath();
  40105. context.setFillStyle(eachSeries.color);
  40106. context.moveTo(gaugeOption.pointer.width, 0);
  40107. context.lineTo(0, -gaugeOption.pointer.width / 2);
  40108. context.lineTo(-innerRadius, 0);
  40109. context.lineTo(0, gaugeOption.pointer.width / 2);
  40110. context.lineTo(gaugeOption.pointer.width, 0);
  40111. context.closePath();
  40112. context.fill();
  40113. context.beginPath();
  40114. context.setFillStyle('#FFFFFF');
  40115. context.arc(0, 0, gaugeOption.pointer.width / 6, 0, 2 * Math.PI, false);
  40116. context.fill();
  40117. context.restore();
  40118. }
  40119. if (opts.dataLabel !== false) {
  40120. drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context);
  40121. }
  40122. }
  40123. //画仪表盘标题,副标题
  40124. drawRingTitle(opts, config, context, centerPosition);
  40125. if (process === 1 && opts.type === 'gauge') {
  40126. opts.extra.gauge.oldAngle = series[0]._proportion_;
  40127. opts.extra.gauge.oldData = series[0].data;
  40128. }
  40129. return {
  40130. center: centerPosition,
  40131. radius: radius,
  40132. innerRadius: innerRadius,
  40133. categories: categories,
  40134. totalAngle: totalAngle
  40135. };
  40136. }
  40137. function drawRadarDataPoints(series, opts, config, context) {
  40138. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40139. var radarOption = assign({}, {
  40140. gridColor: '#cccccc',
  40141. gridType: 'radar',
  40142. labelColor: '#666666',
  40143. opacity: 0.2,
  40144. gridCount: 3
  40145. }, opts.extra.radar);
  40146. var coordinateAngle = getRadarCoordinateSeries(opts.categories.length);
  40147. var centerPosition = {
  40148. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  40149. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  40150. };
  40151. var radius = Math.min(centerPosition.x - (getMaxTextListLength(opts.categories) + config.radarLabelTextMargin), centerPosition.y - config.radarLabelTextMargin);
  40152. //TODO逻辑不对
  40153. radius -= opts.padding[1];
  40154. // 画分割线
  40155. context.beginPath();
  40156. context.setLineWidth(1 * opts.pixelRatio);
  40157. context.setStrokeStyle(radarOption.gridColor);
  40158. coordinateAngle.forEach(function (angle) {
  40159. var pos = convertCoordinateOrigin(radius * Math.cos(angle), radius * Math.sin(angle), centerPosition);
  40160. context.moveTo(centerPosition.x, centerPosition.y);
  40161. context.lineTo(pos.x, pos.y);
  40162. });
  40163. context.stroke();
  40164. context.closePath();
  40165. // 画背景网格
  40166. var _loop = function _loop(i) {
  40167. var startPos = {};
  40168. context.beginPath();
  40169. context.setLineWidth(1 * opts.pixelRatio);
  40170. context.setStrokeStyle(radarOption.gridColor);
  40171. if (radarOption.gridType == 'radar') {
  40172. coordinateAngle.forEach(function (angle, index) {
  40173. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(angle), radius / radarOption.gridCount * i * Math.sin(angle), centerPosition);
  40174. if (index === 0) {
  40175. startPos = pos;
  40176. context.moveTo(pos.x, pos.y);
  40177. } else {
  40178. context.lineTo(pos.x, pos.y);
  40179. }
  40180. });
  40181. context.lineTo(startPos.x, startPos.y);
  40182. } else {
  40183. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(1.5), radius / radarOption.gridCount * i * Math.sin(1.5), centerPosition);
  40184. context.arc(centerPosition.x, centerPosition.y, centerPosition.y - pos.y, 0, 2 * Math.PI, false);
  40185. }
  40186. context.stroke();
  40187. context.closePath();
  40188. };
  40189. for (var i = 1; i <= radarOption.gridCount; i++) {
  40190. _loop(i);
  40191. }
  40192. var radarDataPoints = getRadarDataPoints(coordinateAngle, centerPosition, radius, series, opts, process);
  40193. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  40194. // 绘制区域数据
  40195. context.beginPath();
  40196. context.setFillStyle(hexToRgb(eachSeries.color, radarOption.opacity));
  40197. eachSeries.data.forEach(function (item, index) {
  40198. if (index === 0) {
  40199. context.moveTo(item.position.x, item.position.y);
  40200. } else {
  40201. context.lineTo(item.position.x, item.position.y);
  40202. }
  40203. });
  40204. context.closePath();
  40205. context.fill();
  40206. if (opts.dataPointShape !== false) {
  40207. var points = eachSeries.data.map(function (item) {
  40208. return item.position;
  40209. });
  40210. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  40211. }
  40212. });
  40213. // draw label text
  40214. drawRadarLabel(coordinateAngle, radius, centerPosition, opts, config, context);
  40215. return {
  40216. center: centerPosition,
  40217. radius: radius,
  40218. angleList: coordinateAngle
  40219. };
  40220. }
  40221. function normalInt(min, max, iter) {
  40222. iter = iter == 0 ? 1 : iter;
  40223. var arr = [];
  40224. for (var i = 0; i < iter; i++) {
  40225. arr[i] = Math.random();
  40226. }
  40227. ;
  40228. return Math.floor(arr.reduce(function (i, j) {
  40229. return i + j;
  40230. }) / iter * (max - min)) + min;
  40231. }
  40232. ;
  40233. function collisionNew(area, points, width, height) {
  40234. var isIn = false;
  40235. for (var i = 0; i < points.length; i++) {
  40236. if (points[i].area) {
  40237. if (area[3] < points[i].area[1] || area[0] > points[i].area[2] || area[1] > points[i].area[3] || area[2] < points[i].area[0]) {
  40238. if (area[0] < 0 || area[1] < 0 || area[2] > width || area[3] > height) {
  40239. isIn = true;
  40240. break;
  40241. } else {
  40242. isIn = false;
  40243. }
  40244. } else {
  40245. isIn = true;
  40246. break;
  40247. }
  40248. }
  40249. }
  40250. return isIn;
  40251. }
  40252. ;
  40253. function getBoundingBox(data) {
  40254. var bounds = {},
  40255. coords;
  40256. bounds.xMin = 180;
  40257. bounds.xMax = 0;
  40258. bounds.yMin = 90;
  40259. bounds.yMax = 0;
  40260. for (var i = 0; i < data.length; i++) {
  40261. var coorda = data[i].geometry.coordinates;
  40262. for (var k = 0; k < coorda.length; k++) {
  40263. coords = coorda[k];
  40264. if (coords.length == 1) {
  40265. coords = coords[0];
  40266. }
  40267. for (var j = 0; j < coords.length; j++) {
  40268. var longitude = coords[j][0];
  40269. var latitude = coords[j][1];
  40270. var point = {
  40271. x: longitude,
  40272. y: latitude
  40273. };
  40274. bounds.xMin = bounds.xMin < point.x ? bounds.xMin : point.x;
  40275. bounds.xMax = bounds.xMax > point.x ? bounds.xMax : point.x;
  40276. bounds.yMin = bounds.yMin < point.y ? bounds.yMin : point.y;
  40277. bounds.yMax = bounds.yMax > point.y ? bounds.yMax : point.y;
  40278. }
  40279. }
  40280. }
  40281. return bounds;
  40282. }
  40283. function coordinateToPoint(latitude, longitude, bounds, scale, xoffset, yoffset) {
  40284. return {
  40285. x: (longitude - bounds.xMin) * scale + xoffset,
  40286. y: (bounds.yMax - latitude) * scale + yoffset
  40287. };
  40288. }
  40289. function pointToCoordinate(pointY, pointX, bounds, scale, xoffset, yoffset) {
  40290. return {
  40291. x: (pointX - xoffset) / scale + bounds.xMin,
  40292. y: bounds.yMax - (pointY - yoffset) / scale
  40293. };
  40294. }
  40295. function isRayIntersectsSegment(poi, s_poi, e_poi) {
  40296. if (s_poi[1] == e_poi[1]) {
  40297. return false;
  40298. }
  40299. if (s_poi[1] > poi[1] && e_poi[1] > poi[1]) {
  40300. return false;
  40301. }
  40302. if (s_poi[1] < poi[1] && e_poi[1] < poi[1]) {
  40303. return false;
  40304. }
  40305. if (s_poi[1] == poi[1] && e_poi[1] > poi[1]) {
  40306. return false;
  40307. }
  40308. if (e_poi[1] == poi[1] && s_poi[1] > poi[1]) {
  40309. return false;
  40310. }
  40311. if (s_poi[0] < poi[0] && e_poi[1] < poi[1]) {
  40312. return false;
  40313. }
  40314. var xseg = e_poi[0] - (e_poi[0] - s_poi[0]) * (e_poi[1] - poi[1]) / (e_poi[1] - s_poi[1]);
  40315. if (xseg < poi[0]) {
  40316. return false;
  40317. } else {
  40318. return true;
  40319. }
  40320. }
  40321. function isPoiWithinPoly(poi, poly) {
  40322. var sinsc = 0;
  40323. for (var i = 0; i < poly.length; i++) {
  40324. var epoly = poly[i][0];
  40325. if (poly.length == 1) {
  40326. epoly = poly[i][0];
  40327. }
  40328. for (var j = 0; j < epoly.length - 1; j++) {
  40329. var s_poi = epoly[j];
  40330. var e_poi = epoly[j + 1];
  40331. if (isRayIntersectsSegment(poi, s_poi, e_poi)) {
  40332. sinsc += 1;
  40333. }
  40334. }
  40335. }
  40336. if (sinsc % 2 == 1) {
  40337. return true;
  40338. } else {
  40339. return false;
  40340. }
  40341. }
  40342. function drawMapDataPoints(series, opts, config, context) {
  40343. var mapOption = assign({}, {
  40344. border: true,
  40345. borderWidth: 1,
  40346. borderColor: '#666666',
  40347. fillOpacity: 0.6,
  40348. activeBorderColor: '#f04864',
  40349. activeFillColor: '#facc14',
  40350. activeFillOpacity: 1
  40351. }, opts.extra.map);
  40352. var coords, point;
  40353. var data = series;
  40354. var bounds = getBoundingBox(data);
  40355. var xScale = opts.width / Math.abs(bounds.xMax - bounds.xMin);
  40356. var yScale = opts.height / Math.abs(bounds.yMax - bounds.yMin);
  40357. var scale = xScale < yScale ? xScale : yScale;
  40358. var xoffset = opts.width / 2 - Math.abs(bounds.xMax - bounds.xMin) / 2 * scale;
  40359. var yoffset = opts.height / 2 - Math.abs(bounds.yMax - bounds.yMin) / 2 * scale;
  40360. context.beginPath();
  40361. context.clearRect(0, 0, opts.width, opts.height);
  40362. context.setFillStyle(opts.background || '#FFFFFF');
  40363. context.rect(0, 0, opts.width, opts.height);
  40364. context.fill();
  40365. for (var i = 0; i < data.length; i++) {
  40366. context.beginPath();
  40367. context.setLineWidth(mapOption.borderWidth * opts.pixelRatio);
  40368. context.setStrokeStyle(mapOption.borderColor);
  40369. context.setFillStyle(hexToRgb(series[i].color, mapOption.fillOpacity));
  40370. if (opts.tooltip) {
  40371. if (opts.tooltip.index == i) {
  40372. context.setStrokeStyle(mapOption.activeBorderColor);
  40373. context.setFillStyle(hexToRgb(mapOption.activeFillColor, mapOption.activeFillOpacity));
  40374. }
  40375. }
  40376. var coorda = data[i].geometry.coordinates;
  40377. for (var k = 0; k < coorda.length; k++) {
  40378. coords = coorda[k];
  40379. if (coords.length == 1) {
  40380. coords = coords[0];
  40381. }
  40382. for (var j = 0; j < coords.length; j++) {
  40383. point = coordinateToPoint(coords[j][1], coords[j][0], bounds, scale, xoffset, yoffset);
  40384. if (j === 0) {
  40385. context.beginPath();
  40386. context.moveTo(point.x, point.y);
  40387. } else {
  40388. context.lineTo(point.x, point.y);
  40389. }
  40390. }
  40391. context.fill();
  40392. if (mapOption.border == true) {
  40393. context.stroke();
  40394. }
  40395. }
  40396. if (opts.dataLabel == true) {
  40397. var centerPoint = data[i].properties.centroid;
  40398. if (centerPoint) {
  40399. point = coordinateToPoint(centerPoint[1], centerPoint[0], bounds, scale, xoffset, yoffset);
  40400. var fontSize = data[i].textSize || config.fontSize;
  40401. var text = data[i].properties.name;
  40402. context.beginPath();
  40403. context.setFontSize(fontSize);
  40404. context.setFillStyle(data[i].textColor || '#666666');
  40405. context.fillText(text, point.x - measureText(text, fontSize) / 2, point.y + fontSize / 2);
  40406. context.closePath();
  40407. context.stroke();
  40408. }
  40409. }
  40410. }
  40411. opts.chartData.mapData = {
  40412. bounds: bounds,
  40413. scale: scale,
  40414. xoffset: xoffset,
  40415. yoffset: yoffset
  40416. };
  40417. drawToolTipBridge(opts, config, context, 1);
  40418. context.draw();
  40419. }
  40420. function getWordCloudPoint(opts, type) {
  40421. var points = opts.series.sort(function (a, b) {
  40422. return parseInt(b.textSize) - parseInt(a.textSize);
  40423. });
  40424. switch (type) {
  40425. case 'normal':
  40426. for (var i = 0; i < points.length; i++) {
  40427. var text = points[i].name;
  40428. var tHeight = points[i].textSize;
  40429. var tWidth = measureText(text, tHeight);
  40430. var x = void 0,
  40431. y = void 0;
  40432. var area = void 0;
  40433. var breaknum = 0;
  40434. while (true) {
  40435. breaknum++;
  40436. x = normalInt(-opts.width / 2, opts.width / 2, 5) - tWidth / 2;
  40437. y = normalInt(-opts.height / 2, opts.height / 2, 5) + tHeight / 2;
  40438. area = [x - 5 + opts.width / 2, y - 5 - tHeight + opts.height / 2, x + tWidth + 5 + opts.width / 2, y + 5 + opts.height / 2];
  40439. var isCollision = collisionNew(area, points, opts.width, opts.height);
  40440. if (!isCollision) break;
  40441. if (breaknum == 1000) {
  40442. area = [-100, -100, -100, -100];
  40443. break;
  40444. }
  40445. }
  40446. ;
  40447. points[i].area = area;
  40448. }
  40449. break;
  40450. case 'vertical':
  40451. var Spin = function Spin() {
  40452. //获取均匀随机值,是否旋转,旋转的概率为(1-0.5)
  40453. if (Math.random() > 0.7) {
  40454. return true;
  40455. } else {
  40456. return false;
  40457. }
  40458. ;
  40459. };
  40460. ;
  40461. for (var _i22 = 0; _i22 < points.length; _i22++) {
  40462. var _text = points[_i22].name;
  40463. var _tHeight = points[_i22].textSize;
  40464. var _tWidth = measureText(_text, _tHeight);
  40465. var isSpin = Spin();
  40466. var _x = void 0,
  40467. _y = void 0,
  40468. _area = void 0,
  40469. areav = void 0;
  40470. var _breaknum = 0;
  40471. while (true) {
  40472. _breaknum++;
  40473. var _isCollision = void 0;
  40474. if (isSpin) {
  40475. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  40476. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  40477. _area = [_y - 5 - _tWidth + opts.width / 2, -_x - 5 + opts.height / 2, _y + 5 + opts.width / 2, -_x + _tHeight + 5 + opts.height / 2];
  40478. areav = [opts.width - (opts.width / 2 - opts.height / 2) - (-_x + _tHeight + 5 + opts.height / 2) - 5, opts.height / 2 - opts.width / 2 + (_y - 5 - _tWidth + opts.width / 2) - 5, opts.width - (opts.width / 2 - opts.height / 2) - (-_x + _tHeight + 5 + opts.height / 2) + _tHeight, opts.height / 2 - opts.width / 2 + (_y - 5 - _tWidth + opts.width / 2) + _tWidth + 5];
  40479. _isCollision = collisionNew(areav, points, opts.height, opts.width);
  40480. } else {
  40481. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  40482. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  40483. _area = [_x - 5 + opts.width / 2, _y - 5 - _tHeight + opts.height / 2, _x + _tWidth + 5 + opts.width / 2, _y + 5 + opts.height / 2];
  40484. _isCollision = collisionNew(_area, points, opts.width, opts.height);
  40485. }
  40486. if (!_isCollision) break;
  40487. if (_breaknum == 1000) {
  40488. _area = [-1000, -1000, -1000, -1000];
  40489. break;
  40490. }
  40491. }
  40492. ;
  40493. if (isSpin) {
  40494. points[_i22].area = areav;
  40495. points[_i22].areav = _area;
  40496. } else {
  40497. points[_i22].area = _area;
  40498. }
  40499. points[_i22].rotate = isSpin;
  40500. }
  40501. ;
  40502. break;
  40503. }
  40504. return points;
  40505. }
  40506. function drawWordCloudDataPoints(series, opts, config, context) {
  40507. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40508. var wordOption = assign({}, {
  40509. type: 'normal',
  40510. autoColors: true
  40511. }, opts.extra.word);
  40512. context.beginPath();
  40513. context.setFillStyle(opts.background || '#FFFFFF');
  40514. context.rect(0, 0, opts.width, opts.height);
  40515. context.fill();
  40516. context.save();
  40517. var points = opts.chartData.wordCloudData;
  40518. context.translate(opts.width / 2, opts.height / 2);
  40519. for (var i = 0; i < points.length; i++) {
  40520. context.save();
  40521. if (points[i].rotate) {
  40522. context.rotate(90 * Math.PI / 180);
  40523. }
  40524. var text = points[i].name;
  40525. var tHeight = points[i].textSize;
  40526. var tWidth = measureText(text, tHeight);
  40527. context.beginPath();
  40528. context.setStrokeStyle(points[i].color);
  40529. context.setFillStyle(points[i].color);
  40530. context.setFontSize(tHeight);
  40531. if (points[i].rotate) {
  40532. if (points[i].areav[0] > 0) {
  40533. if (opts.tooltip) {
  40534. if (opts.tooltip.index == i) {
  40535. context.strokeText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  40536. } else {
  40537. context.fillText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  40538. }
  40539. } else {
  40540. context.fillText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  40541. }
  40542. }
  40543. } else {
  40544. if (points[i].area[0] > 0) {
  40545. if (opts.tooltip) {
  40546. if (opts.tooltip.index == i) {
  40547. context.strokeText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  40548. } else {
  40549. context.fillText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  40550. }
  40551. } else {
  40552. context.fillText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  40553. }
  40554. }
  40555. }
  40556. context.stroke();
  40557. context.restore();
  40558. }
  40559. context.restore();
  40560. }
  40561. function drawFunnelDataPoints(series, opts, config, context) {
  40562. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40563. var funnelOption = assign({}, {
  40564. activeWidth: 10,
  40565. activeOpacity: 0.3,
  40566. border: false,
  40567. borderWidth: 2,
  40568. borderColor: '#FFFFFF',
  40569. fillOpacity: 1,
  40570. labelAlign: 'right'
  40571. }, opts.extra.funnel);
  40572. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / series.length;
  40573. var centerPosition = {
  40574. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  40575. y: opts.height - opts.area[2]
  40576. };
  40577. var activeWidth = funnelOption.activeWidth;
  40578. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - activeWidth, (opts.height - opts.area[0] - opts.area[2]) / 2 - activeWidth);
  40579. series = getFunnelDataPoints(series, radius, process);
  40580. context.save();
  40581. context.translate(centerPosition.x, centerPosition.y);
  40582. for (var i = 0; i < series.length; i++) {
  40583. if (i == 0) {
  40584. if (opts.tooltip) {
  40585. if (opts.tooltip.index == i) {
  40586. context.beginPath();
  40587. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  40588. context.moveTo(-activeWidth, 0);
  40589. context.lineTo(-series[i].radius - activeWidth, -eachSpacing);
  40590. context.lineTo(series[i].radius + activeWidth, -eachSpacing);
  40591. context.lineTo(activeWidth, 0);
  40592. context.lineTo(-activeWidth, 0);
  40593. context.closePath();
  40594. context.fill();
  40595. }
  40596. }
  40597. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing, centerPosition.x + series[i].radius, centerPosition.y];
  40598. context.beginPath();
  40599. context.setLineWidth(funnelOption.borderWidth * opts.pixelRatio);
  40600. context.setStrokeStyle(funnelOption.borderColor);
  40601. context.setFillStyle(hexToRgb(series[i].color, funnelOption.fillOpacity));
  40602. context.moveTo(0, 0);
  40603. context.lineTo(-series[i].radius, -eachSpacing);
  40604. context.lineTo(series[i].radius, -eachSpacing);
  40605. context.lineTo(0, 0);
  40606. context.closePath();
  40607. context.fill();
  40608. if (funnelOption.border == true) {
  40609. context.stroke();
  40610. }
  40611. } else {
  40612. if (opts.tooltip) {
  40613. if (opts.tooltip.index == i) {
  40614. context.beginPath();
  40615. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  40616. context.moveTo(0, 0);
  40617. context.lineTo(-series[i - 1].radius - activeWidth, 0);
  40618. context.lineTo(-series[i].radius - activeWidth, -eachSpacing);
  40619. context.lineTo(series[i].radius + activeWidth, -eachSpacing);
  40620. context.lineTo(series[i - 1].radius + activeWidth, 0);
  40621. context.lineTo(0, 0);
  40622. context.closePath();
  40623. context.fill();
  40624. }
  40625. }
  40626. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  40627. context.beginPath();
  40628. context.setLineWidth(funnelOption.borderWidth * opts.pixelRatio);
  40629. context.setStrokeStyle(funnelOption.borderColor);
  40630. context.setFillStyle(hexToRgb(series[i].color, funnelOption.fillOpacity));
  40631. context.moveTo(0, 0);
  40632. context.lineTo(-series[i - 1].radius, 0);
  40633. context.lineTo(-series[i].radius, -eachSpacing);
  40634. context.lineTo(series[i].radius, -eachSpacing);
  40635. context.lineTo(series[i - 1].radius, 0);
  40636. context.lineTo(0, 0);
  40637. context.closePath();
  40638. context.fill();
  40639. if (funnelOption.border == true) {
  40640. context.stroke();
  40641. }
  40642. }
  40643. context.translate(0, -eachSpacing);
  40644. }
  40645. context.restore();
  40646. if (opts.dataLabel !== false && process === 1) {
  40647. drawFunnelText(series, opts, context, eachSpacing, funnelOption.labelAlign, activeWidth, centerPosition);
  40648. }
  40649. return {
  40650. center: centerPosition,
  40651. radius: radius,
  40652. series: series
  40653. };
  40654. }
  40655. function drawFunnelText(series, opts, context, eachSpacing, labelAlign, activeWidth, centerPosition) {
  40656. for (var i = 0; i < series.length; i++) {
  40657. var item = series[i];
  40658. var startX = void 0,
  40659. endX = void 0,
  40660. startY = void 0,
  40661. fontSize = void 0;
  40662. var text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%';
  40663. if (labelAlign == 'right') {
  40664. if (i == 0) {
  40665. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  40666. } else {
  40667. startX = (item.funnelArea[2] + series[i - 1].funnelArea[2]) / 2;
  40668. }
  40669. endX = startX + activeWidth * 2;
  40670. startY = item.funnelArea[1] + eachSpacing / 2;
  40671. fontSize = item.textSize || opts.fontSize;
  40672. context.setLineWidth(1 * opts.pixelRatio);
  40673. context.setStrokeStyle(item.color);
  40674. context.setFillStyle(item.color);
  40675. context.beginPath();
  40676. context.moveTo(startX, startY);
  40677. context.lineTo(endX, startY);
  40678. context.stroke();
  40679. context.closePath();
  40680. context.beginPath();
  40681. context.moveTo(endX, startY);
  40682. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  40683. context.closePath();
  40684. context.fill();
  40685. context.beginPath();
  40686. context.setFontSize(fontSize);
  40687. context.setFillStyle(item.textColor || '#666666');
  40688. context.fillText(text, endX + 5, startY + fontSize / 2 - 2);
  40689. context.closePath();
  40690. context.stroke();
  40691. context.closePath();
  40692. } else {
  40693. if (i == 0) {
  40694. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  40695. } else {
  40696. startX = (item.funnelArea[0] + series[i - 1].funnelArea[0]) / 2;
  40697. }
  40698. endX = startX - activeWidth * 2;
  40699. startY = item.funnelArea[1] + eachSpacing / 2;
  40700. fontSize = item.textSize || opts.fontSize;
  40701. context.setLineWidth(1 * opts.pixelRatio);
  40702. context.setStrokeStyle(item.color);
  40703. context.setFillStyle(item.color);
  40704. context.beginPath();
  40705. context.moveTo(startX, startY);
  40706. context.lineTo(endX, startY);
  40707. context.stroke();
  40708. context.closePath();
  40709. context.beginPath();
  40710. context.moveTo(endX, startY);
  40711. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  40712. context.closePath();
  40713. context.fill();
  40714. context.beginPath();
  40715. context.setFontSize(fontSize);
  40716. context.setFillStyle(item.textColor || '#666666');
  40717. context.fillText(text, endX - 5 - measureText(text), startY + fontSize / 2 - 2);
  40718. context.closePath();
  40719. context.stroke();
  40720. context.closePath();
  40721. }
  40722. }
  40723. }
  40724. function drawCanvas(opts, context) {
  40725. context.draw();
  40726. }
  40727. var Timing = {
  40728. easeIn: function easeIn(pos) {
  40729. return Math.pow(pos, 3);
  40730. },
  40731. easeOut: function easeOut(pos) {
  40732. return Math.pow(pos - 1, 3) + 1;
  40733. },
  40734. easeInOut: function easeInOut(pos) {
  40735. if ((pos /= 0.5) < 1) {
  40736. return 0.5 * Math.pow(pos, 3);
  40737. } else {
  40738. return 0.5 * (Math.pow(pos - 2, 3) + 2);
  40739. }
  40740. },
  40741. linear: function linear(pos) {
  40742. return pos;
  40743. }
  40744. };
  40745. function Animation(opts) {
  40746. this.isStop = false;
  40747. opts.duration = typeof opts.duration === 'undefined' ? 1000 : opts.duration;
  40748. opts.timing = opts.timing || 'linear';
  40749. var delay = 17;
  40750. function createAnimationFrame() {
  40751. if (typeof setTimeout !== 'undefined') {
  40752. return function (step, delay) {
  40753. setTimeout(function () {
  40754. var timeStamp = +new Date();
  40755. step(timeStamp);
  40756. }, delay);
  40757. };
  40758. } else if (typeof requestAnimationFrame !== 'undefined') {
  40759. return requestAnimationFrame;
  40760. } else {
  40761. return function (step) {
  40762. step(null);
  40763. };
  40764. }
  40765. }
  40766. ;
  40767. var animationFrame = createAnimationFrame();
  40768. var startTimeStamp = null;
  40769. var _step = function step(timestamp) {
  40770. if (timestamp === null || this.isStop === true) {
  40771. opts.onProcess && opts.onProcess(1);
  40772. opts.onAnimationFinish && opts.onAnimationFinish();
  40773. return;
  40774. }
  40775. if (startTimeStamp === null) {
  40776. startTimeStamp = timestamp;
  40777. }
  40778. if (timestamp - startTimeStamp < opts.duration) {
  40779. var process = (timestamp - startTimeStamp) / opts.duration;
  40780. var timingFunction = Timing[opts.timing];
  40781. process = timingFunction(process);
  40782. opts.onProcess && opts.onProcess(process);
  40783. animationFrame(_step, delay);
  40784. } else {
  40785. opts.onProcess && opts.onProcess(1);
  40786. opts.onAnimationFinish && opts.onAnimationFinish();
  40787. }
  40788. };
  40789. _step = _step.bind(this);
  40790. animationFrame(_step, delay);
  40791. }
  40792. // stop animation immediately
  40793. // and tigger onAnimationFinish
  40794. Animation.prototype.stop = function () {
  40795. this.isStop = true;
  40796. };
  40797. function drawCharts(type, opts, config, context) {
  40798. var _this = this;
  40799. var series = opts.series;
  40800. var categories = opts.categories;
  40801. series = fillSeries(series, opts, config);
  40802. var duration = opts.animation ? opts.duration : 0;
  40803. _this.animationInstance && _this.animationInstance.stop();
  40804. var seriesMA = null;
  40805. if (type == 'candle') {
  40806. var average = assign({}, opts.extra.candle.average);
  40807. if (average.show) {
  40808. seriesMA = calCandleMA(average.day, average.name, average.color, series[0].data);
  40809. seriesMA = fillSeries(seriesMA, opts, config);
  40810. opts.seriesMA = seriesMA;
  40811. } else if (opts.seriesMA) {
  40812. seriesMA = opts.seriesMA = fillSeries(opts.seriesMA, opts, config);
  40813. } else {
  40814. seriesMA = series;
  40815. }
  40816. } else {
  40817. seriesMA = series;
  40818. }
  40819. /* 过滤掉show=false的series */
  40820. opts._series_ = series = filterSeries(series);
  40821. //重新计算图表区域
  40822. opts.area = new Array(4);
  40823. //复位绘图区域
  40824. for (var j = 0; j < 4; j++) {
  40825. opts.area[j] = opts.padding[j];
  40826. }
  40827. //通过计算三大区域:图例、X轴、Y轴的大小,确定绘图区域
  40828. var _calLegendData = calLegendData(seriesMA, opts, config, opts.chartData),
  40829. legendHeight = _calLegendData.area.wholeHeight,
  40830. legendWidth = _calLegendData.area.wholeWidth;
  40831. switch (opts.legend.position) {
  40832. case 'top':
  40833. opts.area[0] += legendHeight;
  40834. break;
  40835. case 'bottom':
  40836. opts.area[2] += legendHeight;
  40837. break;
  40838. case 'left':
  40839. opts.area[3] += legendWidth;
  40840. break;
  40841. case 'right':
  40842. opts.area[1] += legendWidth;
  40843. break;
  40844. }
  40845. var _calYAxisData = {},
  40846. yAxisWidth = 0;
  40847. if (opts.type === 'line' || opts.type === 'column' || opts.type === 'area' || opts.type === 'mix' || opts.type === 'candle') {
  40848. _calYAxisData = calYAxisData(series, opts, config);
  40849. yAxisWidth = _calYAxisData.yAxisWidth;
  40850. //如果显示Y轴标题
  40851. if (opts.yAxis.showTitle) {
  40852. var maxTitleHeight = 0;
  40853. for (var i = 0; i < opts.yAxis.data.length; i++) {
  40854. maxTitleHeight = Math.max(maxTitleHeight, opts.yAxis.data[i].titleFontSize ? opts.yAxis.data[i].titleFontSize : config.fontSize);
  40855. }
  40856. opts.area[0] += (maxTitleHeight + 6) * opts.pixelRatio;
  40857. }
  40858. var rightIndex = 0,
  40859. leftIndex = 0;
  40860. //计算主绘图区域左右位置
  40861. for (var _i23 = 0; _i23 < yAxisWidth.length; _i23++) {
  40862. if (yAxisWidth[_i23].position == 'left') {
  40863. if (leftIndex > 0) {
  40864. opts.area[3] += yAxisWidth[_i23].width + opts.yAxis.padding;
  40865. } else {
  40866. opts.area[3] += yAxisWidth[_i23].width;
  40867. }
  40868. leftIndex += 1;
  40869. } else {
  40870. if (rightIndex > 0) {
  40871. opts.area[1] += yAxisWidth[_i23].width + opts.yAxis.padding;
  40872. } else {
  40873. opts.area[1] += yAxisWidth[_i23].width;
  40874. }
  40875. rightIndex += 1;
  40876. }
  40877. }
  40878. } else {
  40879. config.yAxisWidth = yAxisWidth;
  40880. }
  40881. opts.chartData.yAxisData = _calYAxisData;
  40882. if (opts.categories && opts.categories.length) {
  40883. opts.chartData.xAxisData = getXAxisPoints(opts.categories, opts, config);
  40884. var _calCategoriesData = calCategoriesData(opts.categories, opts, config, opts.chartData.xAxisData.eachSpacing),
  40885. xAxisHeight = _calCategoriesData.xAxisHeight,
  40886. angle = _calCategoriesData.angle;
  40887. config.xAxisHeight = xAxisHeight;
  40888. config._xAxisTextAngle_ = angle;
  40889. opts.area[2] += xAxisHeight;
  40890. opts.chartData.categoriesData = _calCategoriesData;
  40891. } else {
  40892. if (opts.type === 'line' || opts.type === 'area' || opts.type === 'points') {
  40893. opts.chartData.xAxisData = calXAxisData(series, opts, config);
  40894. categories = opts.chartData.xAxisData.rangesFormat;
  40895. var _calCategoriesData2 = calCategoriesData(categories, opts, config, opts.chartData.xAxisData.eachSpacing),
  40896. _xAxisHeight = _calCategoriesData2.xAxisHeight,
  40897. _angle = _calCategoriesData2.angle;
  40898. config.xAxisHeight = _xAxisHeight;
  40899. config._xAxisTextAngle_ = _angle;
  40900. opts.area[2] += _xAxisHeight;
  40901. opts.chartData.categoriesData = _calCategoriesData2;
  40902. } else {
  40903. opts.chartData.xAxisData = {
  40904. xAxisPoints: []
  40905. };
  40906. }
  40907. }
  40908. //计算右对齐偏移距离
  40909. if (opts.enableScroll && opts.xAxis.scrollAlign == 'right' && opts._scrollDistance_ === undefined) {
  40910. var offsetLeft = 0,
  40911. xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  40912. startX = opts.chartData.xAxisData.startX,
  40913. endX = opts.chartData.xAxisData.endX,
  40914. eachSpacing = opts.chartData.xAxisData.eachSpacing;
  40915. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  40916. var screenWidth = endX - startX;
  40917. offsetLeft = screenWidth - totalWidth;
  40918. _this.scrollOption = {
  40919. currentOffset: offsetLeft,
  40920. startTouchX: offsetLeft,
  40921. distance: 0,
  40922. lastMoveTime: 0
  40923. };
  40924. opts._scrollDistance_ = offsetLeft;
  40925. }
  40926. if (type === 'pie' || type === 'ring' || type === 'rose') {
  40927. config._pieTextMaxLength_ = opts.dataLabel === false ? 0 : getPieTextMaxLength(seriesMA);
  40928. }
  40929. switch (type) {
  40930. case 'word':
  40931. var wordOption = assign({}, {
  40932. type: 'normal',
  40933. autoColors: true
  40934. }, opts.extra.word);
  40935. if (opts.updateData == true || opts.updateData == undefined) {
  40936. opts.chartData.wordCloudData = getWordCloudPoint(opts, wordOption.type);
  40937. }
  40938. this.animationInstance = new Animation({
  40939. timing: 'easeInOut',
  40940. duration: duration,
  40941. onProcess: function onProcess(process) {
  40942. context.clearRect(0, 0, opts.width, opts.height);
  40943. if (opts.rotate) {
  40944. contextRotate(context, opts);
  40945. }
  40946. drawWordCloudDataPoints(series, opts, config, context, process);
  40947. drawCanvas(opts, context);
  40948. },
  40949. onAnimationFinish: function onAnimationFinish() {
  40950. _this.event.trigger('renderComplete');
  40951. }
  40952. });
  40953. break;
  40954. case 'map':
  40955. context.clearRect(0, 0, opts.width, opts.height);
  40956. drawMapDataPoints(series, opts, config, context);
  40957. break;
  40958. case 'funnel':
  40959. this.animationInstance = new Animation({
  40960. timing: 'easeInOut',
  40961. duration: duration,
  40962. onProcess: function onProcess(process) {
  40963. context.clearRect(0, 0, opts.width, opts.height);
  40964. if (opts.rotate) {
  40965. contextRotate(context, opts);
  40966. }
  40967. opts.chartData.funnelData = drawFunnelDataPoints(series, opts, config, context, process);
  40968. drawLegend(opts.series, opts, config, context, opts.chartData);
  40969. drawToolTipBridge(opts, config, context, process);
  40970. drawCanvas(opts, context);
  40971. },
  40972. onAnimationFinish: function onAnimationFinish() {
  40973. _this.event.trigger('renderComplete');
  40974. }
  40975. });
  40976. break;
  40977. case 'line':
  40978. this.animationInstance = new Animation({
  40979. timing: 'easeIn',
  40980. duration: duration,
  40981. onProcess: function onProcess(process) {
  40982. context.clearRect(0, 0, opts.width, opts.height);
  40983. if (opts.rotate) {
  40984. contextRotate(context, opts);
  40985. }
  40986. drawYAxisGrid(categories, opts, config, context);
  40987. drawXAxis(categories, opts, config, context);
  40988. var _drawLineDataPoints = drawLineDataPoints(series, opts, config, context, process),
  40989. xAxisPoints = _drawLineDataPoints.xAxisPoints,
  40990. calPoints = _drawLineDataPoints.calPoints,
  40991. eachSpacing = _drawLineDataPoints.eachSpacing;
  40992. opts.chartData.xAxisPoints = xAxisPoints;
  40993. opts.chartData.calPoints = calPoints;
  40994. opts.chartData.eachSpacing = eachSpacing;
  40995. drawYAxis(series, opts, config, context);
  40996. if (opts.enableMarkLine !== false && process === 1) {
  40997. drawMarkLine(opts, config, context);
  40998. }
  40999. drawLegend(opts.series, opts, config, context, opts.chartData);
  41000. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41001. drawCanvas(opts, context);
  41002. },
  41003. onAnimationFinish: function onAnimationFinish() {
  41004. _this.event.trigger('renderComplete');
  41005. }
  41006. });
  41007. break;
  41008. case 'mix':
  41009. this.animationInstance = new Animation({
  41010. timing: 'easeIn',
  41011. duration: duration,
  41012. onProcess: function onProcess(process) {
  41013. context.clearRect(0, 0, opts.width, opts.height);
  41014. if (opts.rotate) {
  41015. contextRotate(context, opts);
  41016. }
  41017. drawYAxisGrid(categories, opts, config, context);
  41018. drawXAxis(categories, opts, config, context);
  41019. var _drawMixDataPoints = drawMixDataPoints(series, opts, config, context, process),
  41020. xAxisPoints = _drawMixDataPoints.xAxisPoints,
  41021. calPoints = _drawMixDataPoints.calPoints,
  41022. eachSpacing = _drawMixDataPoints.eachSpacing;
  41023. opts.chartData.xAxisPoints = xAxisPoints;
  41024. opts.chartData.calPoints = calPoints;
  41025. opts.chartData.eachSpacing = eachSpacing;
  41026. drawYAxis(series, opts, config, context);
  41027. if (opts.enableMarkLine !== false && process === 1) {
  41028. drawMarkLine(opts, config, context);
  41029. }
  41030. drawLegend(opts.series, opts, config, context, opts.chartData);
  41031. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41032. drawCanvas(opts, context);
  41033. },
  41034. onAnimationFinish: function onAnimationFinish() {
  41035. _this.event.trigger('renderComplete');
  41036. }
  41037. });
  41038. break;
  41039. case 'column':
  41040. this.animationInstance = new Animation({
  41041. timing: 'easeIn',
  41042. duration: duration,
  41043. onProcess: function onProcess(process) {
  41044. context.clearRect(0, 0, opts.width, opts.height);
  41045. if (opts.rotate) {
  41046. contextRotate(context, opts);
  41047. }
  41048. drawYAxisGrid(categories, opts, config, context);
  41049. drawXAxis(categories, opts, config, context);
  41050. var _drawColumnDataPoints = drawColumnDataPoints(series, opts, config, context, process),
  41051. xAxisPoints = _drawColumnDataPoints.xAxisPoints,
  41052. calPoints = _drawColumnDataPoints.calPoints,
  41053. eachSpacing = _drawColumnDataPoints.eachSpacing;
  41054. opts.chartData.xAxisPoints = xAxisPoints;
  41055. opts.chartData.calPoints = calPoints;
  41056. opts.chartData.eachSpacing = eachSpacing;
  41057. drawYAxis(series, opts, config, context);
  41058. if (opts.enableMarkLine !== false && process === 1) {
  41059. drawMarkLine(opts, config, context);
  41060. }
  41061. drawLegend(opts.series, opts, config, context, opts.chartData);
  41062. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41063. drawCanvas(opts, context);
  41064. },
  41065. onAnimationFinish: function onAnimationFinish() {
  41066. _this.event.trigger('renderComplete');
  41067. }
  41068. });
  41069. break;
  41070. case 'area':
  41071. this.animationInstance = new Animation({
  41072. timing: 'easeIn',
  41073. duration: duration,
  41074. onProcess: function onProcess(process) {
  41075. context.clearRect(0, 0, opts.width, opts.height);
  41076. if (opts.rotate) {
  41077. contextRotate(context, opts);
  41078. }
  41079. drawYAxisGrid(categories, opts, config, context);
  41080. drawXAxis(categories, opts, config, context);
  41081. var _drawAreaDataPoints = drawAreaDataPoints(series, opts, config, context, process),
  41082. xAxisPoints = _drawAreaDataPoints.xAxisPoints,
  41083. calPoints = _drawAreaDataPoints.calPoints,
  41084. eachSpacing = _drawAreaDataPoints.eachSpacing;
  41085. opts.chartData.xAxisPoints = xAxisPoints;
  41086. opts.chartData.calPoints = calPoints;
  41087. opts.chartData.eachSpacing = eachSpacing;
  41088. drawYAxis(series, opts, config, context);
  41089. if (opts.enableMarkLine !== false && process === 1) {
  41090. drawMarkLine(opts, config, context);
  41091. }
  41092. drawLegend(opts.series, opts, config, context, opts.chartData);
  41093. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41094. drawCanvas(opts, context);
  41095. },
  41096. onAnimationFinish: function onAnimationFinish() {
  41097. _this.event.trigger('renderComplete');
  41098. }
  41099. });
  41100. break;
  41101. case 'ring':
  41102. case 'pie':
  41103. this.animationInstance = new Animation({
  41104. timing: 'easeInOut',
  41105. duration: duration,
  41106. onProcess: function onProcess(process) {
  41107. context.clearRect(0, 0, opts.width, opts.height);
  41108. if (opts.rotate) {
  41109. contextRotate(context, opts);
  41110. }
  41111. opts.chartData.pieData = drawPieDataPoints(series, opts, config, context, process);
  41112. drawLegend(opts.series, opts, config, context, opts.chartData);
  41113. drawToolTipBridge(opts, config, context, process);
  41114. drawCanvas(opts, context);
  41115. },
  41116. onAnimationFinish: function onAnimationFinish() {
  41117. _this.event.trigger('renderComplete');
  41118. }
  41119. });
  41120. break;
  41121. case 'rose':
  41122. this.animationInstance = new Animation({
  41123. timing: 'easeInOut',
  41124. duration: duration,
  41125. onProcess: function onProcess(process) {
  41126. context.clearRect(0, 0, opts.width, opts.height);
  41127. if (opts.rotate) {
  41128. contextRotate(context, opts);
  41129. }
  41130. opts.chartData.pieData = drawRoseDataPoints(series, opts, config, context, process);
  41131. drawLegend(opts.series, opts, config, context, opts.chartData);
  41132. drawToolTipBridge(opts, config, context, process);
  41133. drawCanvas(opts, context);
  41134. },
  41135. onAnimationFinish: function onAnimationFinish() {
  41136. _this.event.trigger('renderComplete');
  41137. }
  41138. });
  41139. break;
  41140. case 'radar':
  41141. this.animationInstance = new Animation({
  41142. timing: 'easeInOut',
  41143. duration: duration,
  41144. onProcess: function onProcess(process) {
  41145. context.clearRect(0, 0, opts.width, opts.height);
  41146. if (opts.rotate) {
  41147. contextRotate(context, opts);
  41148. }
  41149. opts.chartData.radarData = drawRadarDataPoints(series, opts, config, context, process);
  41150. drawLegend(opts.series, opts, config, context, opts.chartData);
  41151. drawToolTipBridge(opts, config, context, process);
  41152. drawCanvas(opts, context);
  41153. },
  41154. onAnimationFinish: function onAnimationFinish() {
  41155. _this.event.trigger('renderComplete');
  41156. }
  41157. });
  41158. break;
  41159. case 'arcbar':
  41160. this.animationInstance = new Animation({
  41161. timing: 'easeInOut',
  41162. duration: duration,
  41163. onProcess: function onProcess(process) {
  41164. context.clearRect(0, 0, opts.width, opts.height);
  41165. if (opts.rotate) {
  41166. contextRotate(context, opts);
  41167. }
  41168. opts.chartData.arcbarData = drawArcbarDataPoints(series, opts, config, context, process);
  41169. drawCanvas(opts, context);
  41170. },
  41171. onAnimationFinish: function onAnimationFinish() {
  41172. _this.event.trigger('renderComplete');
  41173. }
  41174. });
  41175. break;
  41176. case 'gauge':
  41177. this.animationInstance = new Animation({
  41178. timing: 'easeInOut',
  41179. duration: duration,
  41180. onProcess: function onProcess(process) {
  41181. context.clearRect(0, 0, opts.width, opts.height);
  41182. if (opts.rotate) {
  41183. contextRotate(context, opts);
  41184. }
  41185. opts.chartData.gaugeData = drawGaugeDataPoints(categories, series, opts, config, context, process);
  41186. drawCanvas(opts, context);
  41187. },
  41188. onAnimationFinish: function onAnimationFinish() {
  41189. _this.event.trigger('renderComplete');
  41190. }
  41191. });
  41192. break;
  41193. case 'candle':
  41194. this.animationInstance = new Animation({
  41195. timing: 'easeIn',
  41196. duration: duration,
  41197. onProcess: function onProcess(process) {
  41198. context.clearRect(0, 0, opts.width, opts.height);
  41199. if (opts.rotate) {
  41200. contextRotate(context, opts);
  41201. }
  41202. drawYAxisGrid(categories, opts, config, context);
  41203. drawXAxis(categories, opts, config, context);
  41204. var _drawCandleDataPoints = drawCandleDataPoints(series, seriesMA, opts, config, context, process),
  41205. xAxisPoints = _drawCandleDataPoints.xAxisPoints,
  41206. calPoints = _drawCandleDataPoints.calPoints,
  41207. eachSpacing = _drawCandleDataPoints.eachSpacing;
  41208. opts.chartData.xAxisPoints = xAxisPoints;
  41209. opts.chartData.calPoints = calPoints;
  41210. opts.chartData.eachSpacing = eachSpacing;
  41211. drawYAxis(series, opts, config, context);
  41212. if (opts.enableMarkLine !== false && process === 1) {
  41213. drawMarkLine(opts, config, context);
  41214. }
  41215. if (seriesMA) {
  41216. drawLegend(seriesMA, opts, config, context, opts.chartData);
  41217. } else {
  41218. drawLegend(opts.series, opts, config, context, opts.chartData);
  41219. }
  41220. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41221. drawCanvas(opts, context);
  41222. },
  41223. onAnimationFinish: function onAnimationFinish() {
  41224. _this.event.trigger('renderComplete');
  41225. }
  41226. });
  41227. break;
  41228. }
  41229. }
  41230. // simple event implement
  41231. function Event() {
  41232. this.events = {};
  41233. }
  41234. Event.prototype.addEventListener = function (type, listener) {
  41235. this.events[type] = this.events[type] || [];
  41236. this.events[type].push(listener);
  41237. };
  41238. Event.prototype.delEventListener = function (type) {
  41239. this.events[type] = [];
  41240. };
  41241. Event.prototype.trigger = function () {
  41242. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  41243. args[_key] = arguments[_key];
  41244. }
  41245. var type = args[0];
  41246. var params = args.slice(1);
  41247. if (!!this.events[type]) {
  41248. this.events[type].forEach(function (listener) {
  41249. try {
  41250. listener.apply(null, params);
  41251. } catch (e) {
  41252. console.error(e);
  41253. }
  41254. });
  41255. }
  41256. };
  41257. var Charts = function Charts(opts) {
  41258. opts.pixelRatio = opts.pixelRatio ? opts.pixelRatio : 1;
  41259. opts.fontSize = opts.fontSize ? opts.fontSize * opts.pixelRatio : 13 * opts.pixelRatio;
  41260. opts.title = assign({}, opts.title);
  41261. opts.subtitle = assign({}, opts.subtitle);
  41262. opts.duration = opts.duration ? opts.duration : 1000;
  41263. opts.yAxis = assign({}, {
  41264. data: [],
  41265. showTitle: false,
  41266. disabled: false,
  41267. disableGrid: false,
  41268. splitNumber: 5,
  41269. gridType: 'solid',
  41270. dashLength: 4 * opts.pixelRatio,
  41271. gridColor: '#cccccc',
  41272. padding: 10,
  41273. fontColor: '#666666'
  41274. }, opts.yAxis);
  41275. opts.yAxis.dashLength *= opts.pixelRatio;
  41276. opts.yAxis.padding *= opts.pixelRatio;
  41277. opts.xAxis = assign({}, {
  41278. rotateLabel: false,
  41279. type: 'calibration',
  41280. gridType: 'solid',
  41281. dashLength: 4,
  41282. scrollAlign: 'left',
  41283. boundaryGap: 'center',
  41284. axisLine: true,
  41285. axisLineColor: '#cccccc'
  41286. }, opts.xAxis);
  41287. opts.xAxis.dashLength *= opts.pixelRatio;
  41288. opts.legend = assign({}, {
  41289. show: true,
  41290. position: 'bottom',
  41291. float: 'center',
  41292. backgroundColor: 'rgba(0,0,0,0)',
  41293. borderColor: 'rgba(0,0,0,0)',
  41294. borderWidth: 0,
  41295. padding: 5,
  41296. margin: 5,
  41297. itemGap: 10,
  41298. fontSize: opts.fontSize,
  41299. lineHeight: opts.fontSize,
  41300. fontColor: '#333333',
  41301. format: {},
  41302. hiddenColor: '#CECECE'
  41303. }, opts.legend);
  41304. opts.legend.borderWidth = opts.legend.borderWidth * opts.pixelRatio;
  41305. opts.legend.itemGap = opts.legend.itemGap * opts.pixelRatio;
  41306. opts.legend.padding = opts.legend.padding * opts.pixelRatio;
  41307. opts.legend.margin = opts.legend.margin * opts.pixelRatio;
  41308. opts.extra = assign({}, opts.extra);
  41309. opts.rotate = opts.rotate ? true : false;
  41310. opts.animation = opts.animation ? true : false;
  41311. opts.rotate = opts.rotate ? true : false;
  41312. opts.canvas2d = opts.canvas2d ? true : false;
  41313. var config$$1 = JSON.parse(JSON.stringify(config));
  41314. config$$1.colors = opts.colors ? opts.colors : config$$1.colors;
  41315. config$$1.yAxisTitleWidth = opts.yAxis.disabled !== true && opts.yAxis.title ? config$$1.yAxisTitleWidth : 0;
  41316. if (opts.type == 'pie' || opts.type == 'ring') {
  41317. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.pie.labelWidth * opts.pixelRatio || config$$1.pieChartLinePadding * opts.pixelRatio;
  41318. }
  41319. if (opts.type == 'rose') {
  41320. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.rose.labelWidth * opts.pixelRatio || config$$1.pieChartLinePadding * opts.pixelRatio;
  41321. }
  41322. config$$1.pieChartTextPadding = opts.dataLabel === false ? 0 : config$$1.pieChartTextPadding * opts.pixelRatio;
  41323. config$$1.yAxisSplit = opts.yAxis.splitNumber ? opts.yAxis.splitNumber : config.yAxisSplit;
  41324. //屏幕旋转
  41325. config$$1.rotate = opts.rotate;
  41326. if (opts.rotate) {
  41327. var tempWidth = opts.width;
  41328. var tempHeight = opts.height;
  41329. opts.width = tempHeight;
  41330. opts.height = tempWidth;
  41331. }
  41332. //适配高分屏
  41333. opts.padding = opts.padding ? opts.padding : config$$1.padding;
  41334. for (var i = 0; i < 4; i++) {
  41335. opts.padding[i] *= opts.pixelRatio;
  41336. }
  41337. config$$1.yAxisWidth = config.yAxisWidth * opts.pixelRatio;
  41338. config$$1.xAxisHeight = config.xAxisHeight * opts.pixelRatio;
  41339. if (opts.enableScroll && opts.xAxis.scrollShow) {
  41340. config$$1.xAxisHeight += 6 * opts.pixelRatio;
  41341. }
  41342. config$$1.xAxisLineHeight = config.xAxisLineHeight * opts.pixelRatio;
  41343. config$$1.fontSize = opts.fontSize;
  41344. config$$1.titleFontSize = config.titleFontSize * opts.pixelRatio;
  41345. config$$1.subtitleFontSize = config.subtitleFontSize * opts.pixelRatio;
  41346. config$$1.toolTipPadding = config.toolTipPadding * opts.pixelRatio;
  41347. config$$1.toolTipLineHeight = config.toolTipLineHeight * opts.pixelRatio;
  41348. config$$1.columePadding = config.columePadding * opts.pixelRatio;
  41349. this.context = opts.context ? opts.context : uni.createCanvasContext(opts.canvasId, opts.$this);
  41350. if (opts.canvas2d) {
  41351. this.context.setStrokeStyle = function (e) {
  41352. return this.strokeStyle = e;
  41353. };
  41354. this.context.setLineWidth = function (e) {
  41355. return this.lineWidth = e;
  41356. };
  41357. this.context.setLineCap = function (e) {
  41358. return this.lineCap = e;
  41359. };
  41360. this.context.setFontSize = function (e) {
  41361. return this.font = e + "px sans-serif";
  41362. };
  41363. this.context.setFillStyle = function (e) {
  41364. return this.fillStyle = e;
  41365. };
  41366. this.context.draw = function () {};
  41367. }
  41368. /* 兼容原生H5
  41369. this.context = document.getElementById(opts.canvasId).getContext("2d");
  41370. this.context.setStrokeStyle = function(e){ return this.strokeStyle=e; }
  41371. this.context.setLineWidth = function(e){ return this.lineWidth=e; }
  41372. this.context.setLineCap = function(e){ return this.lineCap=e; }
  41373. this.context.setFontSize = function(e){ return this.font=e+"px sans-serif"; }
  41374. this.context.setFillStyle = function(e){ return this.fillStyle=e; }
  41375. this.context.draw = function(){ }
  41376. */
  41377. opts.chartData = {};
  41378. this.event = new Event();
  41379. this.scrollOption = {
  41380. currentOffset: 0,
  41381. startTouchX: 0,
  41382. distance: 0,
  41383. lastMoveTime: 0
  41384. };
  41385. this.opts = opts;
  41386. this.config = config$$1;
  41387. drawCharts.call(this, opts.type, opts, config$$1, this.context);
  41388. };
  41389. Charts.prototype.updateData = function () {
  41390. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  41391. this.opts = assign({}, this.opts, data);
  41392. this.opts.updateData = true;
  41393. var scrollPosition = data.scrollPosition || 'current';
  41394. switch (scrollPosition) {
  41395. case 'current':
  41396. this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  41397. break;
  41398. case 'left':
  41399. this.opts._scrollDistance_ = 0;
  41400. this.scrollOption = {
  41401. currentOffset: 0,
  41402. startTouchX: 0,
  41403. distance: 0,
  41404. lastMoveTime: 0
  41405. };
  41406. break;
  41407. case 'right':
  41408. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config),
  41409. yAxisWidth = _calYAxisData.yAxisWidth;
  41410. this.config.yAxisWidth = yAxisWidth;
  41411. var offsetLeft = 0;
  41412. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  41413. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  41414. startX = _getXAxisPoints0.startX,
  41415. endX = _getXAxisPoints0.endX,
  41416. eachSpacing = _getXAxisPoints0.eachSpacing;
  41417. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  41418. var screenWidth = endX - startX;
  41419. offsetLeft = screenWidth - totalWidth;
  41420. this.scrollOption = {
  41421. currentOffset: offsetLeft,
  41422. startTouchX: offsetLeft,
  41423. distance: 0,
  41424. lastMoveTime: 0
  41425. };
  41426. this.opts._scrollDistance_ = offsetLeft;
  41427. break;
  41428. }
  41429. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  41430. };
  41431. Charts.prototype.zoom = function () {
  41432. var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.opts.xAxis.itemCount;
  41433. if (this.opts.enableScroll !== true) {
  41434. console.log('请启用滚动条后使用!');
  41435. return;
  41436. }
  41437. //当前屏幕中间点
  41438. var centerPoint = Math.round(Math.abs(this.scrollOption.currentOffset) / this.opts.chartData.eachSpacing) + Math.round(this.opts.xAxis.itemCount / 2);
  41439. this.opts.animation = false;
  41440. this.opts.xAxis.itemCount = val.itemCount;
  41441. //重新计算x轴偏移距离
  41442. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config),
  41443. yAxisWidth = _calYAxisData.yAxisWidth;
  41444. this.config.yAxisWidth = yAxisWidth;
  41445. var offsetLeft = 0;
  41446. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  41447. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  41448. startX = _getXAxisPoints0.startX,
  41449. endX = _getXAxisPoints0.endX,
  41450. eachSpacing = _getXAxisPoints0.eachSpacing;
  41451. var centerLeft = eachSpacing * centerPoint;
  41452. var screenWidth = endX - startX;
  41453. var MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1);
  41454. offsetLeft = screenWidth / 2 - centerLeft;
  41455. if (offsetLeft > 0) {
  41456. offsetLeft = 0;
  41457. }
  41458. if (offsetLeft < MaxLeft) {
  41459. offsetLeft = MaxLeft;
  41460. }
  41461. this.scrollOption = {
  41462. currentOffset: offsetLeft,
  41463. startTouchX: offsetLeft,
  41464. distance: 0,
  41465. lastMoveTime: 0
  41466. };
  41467. this.opts._scrollDistance_ = offsetLeft;
  41468. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  41469. };
  41470. Charts.prototype.stopAnimation = function () {
  41471. this.animationInstance && this.animationInstance.stop();
  41472. };
  41473. Charts.prototype.addEventListener = function (type, listener) {
  41474. this.event.addEventListener(type, listener);
  41475. };
  41476. Charts.prototype.delEventListener = function (type) {
  41477. this.event.delEventListener(type);
  41478. };
  41479. Charts.prototype.getCurrentDataIndex = function (e) {
  41480. var touches = null;
  41481. if (e.changedTouches) {
  41482. touches = e.changedTouches[0];
  41483. } else {
  41484. touches = e.mp.changedTouches[0];
  41485. }
  41486. if (touches) {
  41487. var _touches$ = getTouches(touches, this.opts, e);
  41488. if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose') {
  41489. return findPieChartCurrentIndex({
  41490. x: _touches$.x,
  41491. y: _touches$.y
  41492. }, this.opts.chartData.pieData);
  41493. } else if (this.opts.type === 'radar') {
  41494. return findRadarChartCurrentIndex({
  41495. x: _touches$.x,
  41496. y: _touches$.y
  41497. }, this.opts.chartData.radarData, this.opts.categories.length);
  41498. } else if (this.opts.type === 'funnel') {
  41499. return findFunnelChartCurrentIndex({
  41500. x: _touches$.x,
  41501. y: _touches$.y
  41502. }, this.opts.chartData.funnelData);
  41503. } else if (this.opts.type === 'map') {
  41504. return findMapChartCurrentIndex({
  41505. x: _touches$.x,
  41506. y: _touches$.y
  41507. }, this.opts);
  41508. } else if (this.opts.type === 'word') {
  41509. return findWordChartCurrentIndex({
  41510. x: _touches$.x,
  41511. y: _touches$.y
  41512. }, this.opts.chartData.wordCloudData);
  41513. } else {
  41514. return findCurrentIndex({
  41515. x: _touches$.x,
  41516. y: _touches$.y
  41517. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  41518. }
  41519. }
  41520. return -1;
  41521. };
  41522. Charts.prototype.getLegendDataIndex = function (e) {
  41523. var touches = null;
  41524. if (e.changedTouches) {
  41525. touches = e.changedTouches[0];
  41526. } else {
  41527. touches = e.mp.changedTouches[0];
  41528. }
  41529. if (touches) {
  41530. var _touches$ = getTouches(touches, this.opts, e);
  41531. return findLegendIndex({
  41532. x: _touches$.x,
  41533. y: _touches$.y
  41534. }, this.opts.chartData.legendData);
  41535. }
  41536. return -1;
  41537. };
  41538. Charts.prototype.touchLegend = function (e) {
  41539. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  41540. var touches = null;
  41541. if (e.changedTouches) {
  41542. touches = e.changedTouches[0];
  41543. } else {
  41544. touches = e.mp.changedTouches[0];
  41545. }
  41546. if (touches) {
  41547. var _touches$ = getTouches(touches, this.opts, e);
  41548. var index = this.getLegendDataIndex(e);
  41549. if (index >= 0) {
  41550. this.opts.series[index].show = !this.opts.series[index].show;
  41551. this.opts.animation = option.animation ? true : false;
  41552. this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  41553. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  41554. }
  41555. }
  41556. };
  41557. Charts.prototype.showToolTip = function (e) {
  41558. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  41559. var touches = null;
  41560. if (e.changedTouches) {
  41561. touches = e.changedTouches[0];
  41562. } else {
  41563. touches = e.mp.changedTouches[0];
  41564. }
  41565. if (!touches) {
  41566. console.log("touchError");
  41567. }
  41568. var _touches$ = getTouches(touches, this.opts, e);
  41569. var currentOffset = this.scrollOption.currentOffset;
  41570. var opts = assign({}, this.opts, {
  41571. _scrollDistance_: currentOffset,
  41572. animation: false
  41573. });
  41574. if (this.opts.type === 'line' || this.opts.type === 'area' || this.opts.type === 'column') {
  41575. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  41576. if (index > -1) {
  41577. var seriesData = getSeriesDataItem(this.opts.series, index);
  41578. if (seriesData.length !== 0) {
  41579. var _getToolTipData = getToolTipData(seriesData, this.opts.chartData.calPoints, index, this.opts.categories, option),
  41580. textList = _getToolTipData.textList,
  41581. offset = _getToolTipData.offset;
  41582. offset.y = _touches$.y;
  41583. opts.tooltip = {
  41584. textList: option.textList ? option.textList : textList,
  41585. offset: offset,
  41586. option: option,
  41587. index: index
  41588. };
  41589. }
  41590. }
  41591. drawCharts.call(this, opts.type, opts, this.config, this.context);
  41592. }
  41593. if (this.opts.type === 'mix') {
  41594. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  41595. if (index > -1) {
  41596. var currentOffset = this.scrollOption.currentOffset;
  41597. var opts = assign({}, this.opts, {
  41598. _scrollDistance_: currentOffset,
  41599. animation: false
  41600. });
  41601. var seriesData = getSeriesDataItem(this.opts.series, index);
  41602. if (seriesData.length !== 0) {
  41603. var _getMixToolTipData = getMixToolTipData(seriesData, this.opts.chartData.calPoints, index, this.opts.categories, option),
  41604. textList = _getMixToolTipData.textList,
  41605. offset = _getMixToolTipData.offset;
  41606. offset.y = _touches$.y;
  41607. opts.tooltip = {
  41608. textList: option.textList ? option.textList : textList,
  41609. offset: offset,
  41610. option: option,
  41611. index: index
  41612. };
  41613. }
  41614. }
  41615. drawCharts.call(this, opts.type, opts, this.config, this.context);
  41616. }
  41617. if (this.opts.type === 'candle') {
  41618. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  41619. if (index > -1) {
  41620. var currentOffset = this.scrollOption.currentOffset;
  41621. var opts = assign({}, this.opts, {
  41622. _scrollDistance_: currentOffset,
  41623. animation: false
  41624. });
  41625. var seriesData = getSeriesDataItem(this.opts.series, index);
  41626. if (seriesData.length !== 0) {
  41627. var _getToolTipData = getCandleToolTipData(this.opts.series[0].data, seriesData, this.opts.chartData.calPoints, index, this.opts.categories, this.opts.extra.candle, option),
  41628. textList = _getToolTipData.textList,
  41629. offset = _getToolTipData.offset;
  41630. offset.y = _touches$.y;
  41631. opts.tooltip = {
  41632. textList: option.textList ? option.textList : textList,
  41633. offset: offset,
  41634. option: option,
  41635. index: index
  41636. };
  41637. }
  41638. }
  41639. drawCharts.call(this, opts.type, opts, this.config, this.context);
  41640. }
  41641. if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose' || this.opts.type === 'funnel') {
  41642. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  41643. if (index > -1) {
  41644. var currentOffset = this.scrollOption.currentOffset;
  41645. var opts = assign({}, this.opts, {
  41646. _scrollDistance_: currentOffset,
  41647. animation: false
  41648. });
  41649. var seriesData = this.opts._series_[index];
  41650. var textList = [{
  41651. text: option.format ? option.format(seriesData) : seriesData.name + ': ' + seriesData.data,
  41652. color: seriesData.color
  41653. }];
  41654. var offset = {
  41655. x: _touches$.x,
  41656. y: _touches$.y
  41657. };
  41658. opts.tooltip = {
  41659. textList: option.textList ? option.textList : textList,
  41660. offset: offset,
  41661. option: option,
  41662. index: index
  41663. };
  41664. }
  41665. drawCharts.call(this, opts.type, opts, this.config, this.context);
  41666. }
  41667. if (this.opts.type === 'map' || this.opts.type === 'word') {
  41668. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  41669. if (index > -1) {
  41670. var currentOffset = this.scrollOption.currentOffset;
  41671. var opts = assign({}, this.opts, {
  41672. _scrollDistance_: currentOffset,
  41673. animation: false
  41674. });
  41675. var seriesData = this.opts._series_[index];
  41676. var textList = [{
  41677. text: option.format ? option.format(seriesData) : seriesData.properties.name,
  41678. color: seriesData.color
  41679. }];
  41680. var offset = {
  41681. x: _touches$.x,
  41682. y: _touches$.y
  41683. };
  41684. opts.tooltip = {
  41685. textList: option.textList ? option.textList : textList,
  41686. offset: offset,
  41687. option: option,
  41688. index: index
  41689. };
  41690. }
  41691. opts.updateData = false;
  41692. drawCharts.call(this, opts.type, opts, this.config, this.context);
  41693. }
  41694. if (this.opts.type === 'radar') {
  41695. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  41696. if (index > -1) {
  41697. var currentOffset = this.scrollOption.currentOffset;
  41698. var opts = assign({}, this.opts, {
  41699. _scrollDistance_: currentOffset,
  41700. animation: false
  41701. });
  41702. var seriesData = getSeriesDataItem(this.opts.series, index);
  41703. if (seriesData.length !== 0) {
  41704. var textList = seriesData.map(function (item) {
  41705. return {
  41706. text: option.format ? option.format(item) : item.name + ': ' + item.data,
  41707. color: item.color
  41708. };
  41709. });
  41710. var offset = {
  41711. x: _touches$.x,
  41712. y: _touches$.y
  41713. };
  41714. opts.tooltip = {
  41715. textList: option.textList ? option.textList : textList,
  41716. offset: offset,
  41717. option: option,
  41718. index: index
  41719. };
  41720. }
  41721. }
  41722. drawCharts.call(this, opts.type, opts, this.config, this.context);
  41723. }
  41724. };
  41725. Charts.prototype.translate = function (distance) {
  41726. this.scrollOption = {
  41727. currentOffset: distance,
  41728. startTouchX: distance,
  41729. distance: 0,
  41730. lastMoveTime: 0
  41731. };
  41732. var opts = assign({}, this.opts, {
  41733. _scrollDistance_: distance,
  41734. animation: false
  41735. });
  41736. drawCharts.call(this, this.opts.type, opts, this.config, this.context);
  41737. };
  41738. Charts.prototype.scrollStart = function (e) {
  41739. var touches = null;
  41740. if (e.changedTouches) {
  41741. touches = e.changedTouches[0];
  41742. } else {
  41743. touches = e.mp.changedTouches[0];
  41744. }
  41745. var _touches$ = getTouches(touches, this.opts, e);
  41746. if (touches && this.opts.enableScroll === true) {
  41747. this.scrollOption.startTouchX = _touches$.x;
  41748. }
  41749. };
  41750. Charts.prototype.scroll = function (e) {
  41751. if (this.scrollOption.lastMoveTime === 0) {
  41752. this.scrollOption.lastMoveTime = Date.now();
  41753. }
  41754. var Limit = this.opts.extra.touchMoveLimit || 20;
  41755. var currMoveTime = Date.now();
  41756. var duration = currMoveTime - this.scrollOption.lastMoveTime;
  41757. if (duration < Math.floor(1000 / Limit)) return;
  41758. this.scrollOption.lastMoveTime = currMoveTime;
  41759. var touches = null;
  41760. if (e.changedTouches) {
  41761. touches = e.changedTouches[0];
  41762. } else {
  41763. touches = e.mp.changedTouches[0];
  41764. }
  41765. if (touches && this.opts.enableScroll === true) {
  41766. var _touches$ = getTouches(touches, this.opts, e);
  41767. var _distance;
  41768. _distance = _touches$.x - this.scrollOption.startTouchX;
  41769. var currentOffset = this.scrollOption.currentOffset;
  41770. var validDistance = calValidDistance(this, currentOffset + _distance, this.opts.chartData, this.config, this.opts);
  41771. this.scrollOption.distance = _distance = validDistance - currentOffset;
  41772. var opts = assign({}, this.opts, {
  41773. _scrollDistance_: currentOffset + _distance,
  41774. animation: false
  41775. });
  41776. drawCharts.call(this, opts.type, opts, this.config, this.context);
  41777. return currentOffset + _distance;
  41778. }
  41779. };
  41780. Charts.prototype.scrollEnd = function (e) {
  41781. if (this.opts.enableScroll === true) {
  41782. var _scrollOption = this.scrollOption,
  41783. currentOffset = _scrollOption.currentOffset,
  41784. distance = _scrollOption.distance;
  41785. this.scrollOption.currentOffset = currentOffset + distance;
  41786. this.scrollOption.distance = 0;
  41787. }
  41788. };
  41789. if (( false ? undefined : _typeof(module)) === "object" && _typeof(module.exports) === "object") {
  41790. module.exports = Charts;
  41791. //export default Charts;//建议使用nodejs的module导出方式,如报错请使用export方式导出
  41792. }
  41793. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! (webpack)/buildin/module.js */ 163)(module)))
  41794. /***/ }),
  41795. /***/ 371:
  41796. /*!************************************************************!*\
  41797. !*** E:/project/bigdata_WX/static/js/equipState_dict.json ***!
  41798. \************************************************************/
  41799. /*! exports provided: imei, iccid, csq, lat, lng, dtype, ws, dver, vbat, st, et, tps, lps, rps, dps, collt, current, hrt, hst, at, ah, stamp, dat_f, rcnt, htim, batStatus, tt, shake, shake_sec, ts, upds, dnds, lamp, fuse_voltage, ds, bt, tcs, clt_t, gps, cv, bv, ct, info, proj, btype, cs, bs, infr_ct, volt_ct, wind_drec, wind_sped, cold_sw, wind_sw, pre_temp, set_temp, usb_sta, work_sta, imgres, staytime, cul_time, coll_time, addtime, hs, is_online, gs, tph, tpl, boot, lux, clt, dattim, datt, tbs, type, simStatus, default */
  41800. /***/ (function(module) {
  41801. module.exports = JSON.parse("{\"imei\":{\"name\":\"设备ID\",\"unit\":\"\",\"desc\":\"通讯板唯一ID\"},\"iccid\":{\"name\":\"物联网卡\",\"unit\":\"\",\"desc\":\"用于查询物联网卡的套餐、流量信息等\"},\"csq\":{\"name\":\"信号强度\",\"unit\":\"\",\"desc\":\"\"},\"lat\":{\"name\":\"纬度\",\"unit\":\"\",\"desc\":\"\"},\"lng\":{\"name\":\"经度\",\"unit\":\"\",\"desc\":\"\"},\"dtype\":{\"name\":\"设备类型\",\"unit\":\"\",\"desc\":\"\"},\"ws\":{\"name\":\"工作状态\",\"unit\":\"\",\"value\":{\"0\":\"待机\",\"1\":\"工作\",\"2\":\"充电\"},\"desc\":\"工作状态、0 待机, 1 工作\"},\"dver\":{\"name\":\"设备版本\",\"unit\":\"\",\"desc\":\"设备固件版本\"},\"vbat\":{\"name\":\"电压\",\"unit\":\"V\",\"desc\":\"\"},\"st\":{\"name\":\"开始时间\",\"unit\":\"h\",\"desc\":\"时控开始时间:0-23\"},\"et\":{\"name\":\"结束时间\",\"unit\":\"h\",\"desc\":\"时控结束时间:0-23\"},\"tps\":{\"name\":\"温控状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"温控\"},\"desc\":\"0-正常,1-保护\"},\"lps\":{\"name\":\"光控状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"光控\"},\"desc\":\"0-正常,1-保护\"},\"rps\":{\"name\":\"雨控状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"雨控\"},\"desc\":\"0-正常,1-保护\"},\"dps\":{\"name\":\"倾倒状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"保护\"},\"desc\":\"0-正常,1-保护\"},\"collt\":{\"name\":\"收集时间\",\"unit\":\"\",\"desc\":\"收集时间:1-30\"},\"current\":{\"name\":\"功率\",\"unit\":\"mA\",\"desc\":\"功率:单位mA\"},\"hrt\":{\"name\":\"加热仓温度\",\"unit\":\"°C\",\"desc\":\"加热仓实时温度\"},\"hst\":{\"name\":\"加热仓设定温度\",\"unit\":\"°C\",\"desc\":\"加热仓设定温度:70-130\"},\"at\":{\"name\":\"环境温度\",\"unit\":\"°C\",\"desc\":\"\"},\"ah\":{\"name\":\"环境湿度\",\"unit\":\"%RH\",\"desc\":\"\"},\"stamp\":{\"name\":\"时间\",\"unit\":\"\",\"desc\":\"\"},\"dat_f\":{\"name\":\"数据上传间隔\",\"unit\":\"\",\"desc\":\"数据上传时间间隔\"},\"rcnt\":{\"name\":\"开机次数\",\"unit\":\"\",\"desc\":\"每次重启加1\"},\"htim\":{\"name\":\"加热时间\",\"unit\":\"min\",\"desc\":\"加热时间:1-30分钟\"},\"batStatus\":{\"name\":\"电压状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"电量过低\"},\"desc\":\"0-正常 1-欠压\"},\"tt\":{\"name\":\"定时时长\",\"unit\":\"h\",\"desc\":\"定时时间1~10\"},\"shake\":{\"name\":\"震动开关\",\"unit\":\"\",\"value\":{\"0\":\"关闭\",\"1\":\"开启\"},\"desc\":\"0-关,1-开\"},\"shake_sec\":{\"name\":\"震动时间\",\"unit\":\"ms\",\"desc\":\"1~20(步长:100ms)\"},\"ts\":{\"name\":\"定时模式\",\"unit\":\"\",\"value\":{\"0\":\"光控\",\"1\":\"时控\"},\"desc\":\"0-光控,1-时控\"},\"upds\":{\"name\":\"上仓门状态\",\"unit\":\"\",\"value\":{\"0\":\"关闭\",\"1\":\"开启\"},\"desc\":\"1 打开,0 关闭\"},\"dnds\":{\"name\":\"下仓门状态\",\"unit\":\"\",\"value\":{\"0\":\"关闭\",\"1\":\"开启\"},\"desc\":\"1 打开,0 关闭\"},\"lamp\":{\"name\":\"灯管状态\",\"unit\":\"\",\"value\":{\"0\":\"工作\",\"1\":\"异常\"},\"desc\":\"灯管/工作状态 0 工作 1未工\"},\"fuse_voltage\":{\"name\":\"保险丝电压\",\"unit\":\"V\",\"desc\":\"\"},\"ds\":{\"name\":\"设备开关\",\"unit\":\"\",\"value\":{\"0\":\"关机\",\"1\":\"开机\"},\"desc\":\"0 关机 1 开机\"},\"bt\":{\"name\":\"主板温度\",\"unit\":\"°C\",\"desc\":\"\"},\"tcs\":{\"name\":\"时控开关\",\"unit\":\"\",\"value\":{\"0\":\"关机\",\"1\":\"开机\"},\"desc\":\"0 关闭 1 开启\"},\"clt_t\":{\"name\":\"清虫间隔\",\"unit\":\"min\",\"desc\":\"清虫时间间隔\"},\"gps\":{\"name\":\"定位方式\",\"unit\":\"\",\"value\":{\"0\":\"手动定位\",\"1\":\"GPS 定位\",\"2\":\"LBS 定位\"},\"desc\":\"0 手动定位 1 GPS 定位 2 LBS 定位\"},\"cv\":{\"name\":\"充电电压\",\"unit\":\"V\",\"desc\":\"充电电压\"},\"bv\":{\"name\":\"电池电压\",\"unit\":\"V\",\"desc\":\"电池电压\"},\"ct\":{\"name\":\"电击次数\",\"unit\":\"\",\"desc\":\"电击次数 (最大255)\"},\"info\":{\"name\":\"重启信息\",\"unit\":\"\",\"desc\":\"1正常 2 socket重连 3 MQTT重连\"},\"proj\":{\"name\":\"设备型号\",\"unit\":\"\",\"desc\":\"性诱一型或者二型\"},\"btype\":{\"name\":\"电池类型\",\"unit\":\"\",\"value\":{\"0\":\"蓄电池\",\"1\":\"锂电池\"},\"desc\":\"0 蓄电池,1锂电池\"},\"cs\":{\"name\":\"充电状态\",\"unit\":\"\",\"value\":{\"0\":\"非充电\",\"1\":\"充电\"},\"desc\":\"0非充电,1充电\"},\"bs\":{\"name\":\"电池状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"欠压\",\"2\":\"过压\"},\"desc\":\"0 正常,1欠压, 2过压\"},\"infr_ct\":{\"name\":\"红外计数值\",\"unit\":\"\",\"desc\":\"性诱红外计数值\"},\"volt_ct\":{\"name\":\"高压计数值\",\"unit\":\"\",\"desc\":\"性诱高压计数值\"},\"wind_drec\":{\"name\":\"风向\",\"unit\":\"\",\"desc\":\"性诱风向\"},\"wind_sped\":{\"name\":\"风速\",\"unit\":\"\",\"desc\":\"性诱风向\"},\"cold_sw\":{\"name\":\"制冷开关\",\"unit\":\"\",\"value\":{\"0\":\"关闭\",\"1\":\"开启\"},\"desc\":\"制冷机开关 0 关闭, 1 开启\"},\"wind_sw\":{\"name\":\"风机开关\",\"unit\":\"\",\"value\":{\"0\":\"关闭\",\"1\":\"开启\"},\"desc\":\"风机开关 0 关闭, 1 开启\"},\"pre_temp\":{\"name\":\"保温仓温度\",\"unit\":\"℃\",\"desc\":\"保温仓当前温度-℃\"},\"set_temp\":{\"name\":\"保温仓设定温度\",\"unit\":\"℃\",\"desc\":\"保温仓设定温度-℃\"},\"usb_sta\":{\"name\":\"摄像头状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"异常\"},\"desc\":\"摄像头状态 0 正常, 1 异常\"},\"work_sta\":{\"name\":\"摄像头状态\",\"unit\":\"\",\"value\":{\"0\":\"待机\",\"1\":\"收集\",\"2\":\"培养\",\"3\":\"拍照\"},\"desc\":\"摄像头状态 0 待机, 1 收集, 2 培养, 3 拍照\"},\"imgres\":{\"name\":\"图片分辨率\",\"unit\":\"\",\"desc\":\"图片分辨率默认为7(最高)\"},\"staytime\":{\"name\":\"已培养时间\",\"unit\":\"h\",\"desc\":\"已培养时间-小时\"},\"cul_time\":{\"name\":\"孢子培养时间\",\"unit\":\"h\",\"desc\":\"孢子培养时间-小时\"},\"coll_time\":{\"name\":\"收集时间\",\"unit\":\"h\",\"desc\":\"收集时间[8-10,14-16]\"},\"addtime\":{\"name\":\"上报时间\",\"unit\":\"\",\"desc\":\"数据上报时间\"},\"hs\":{\"name\":\"加热状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"加热\"},\"desc\":\"测报灯状态0 正常, 1 加热\"},\"is_online\":{\"name\":\"在线状态\",\"unit\":\"\",\"value\":{\"0\":\"离线\",\"1\":\"在线\"},\"desc\":\"设备在线离线状态\"},\"gs\":{\"name\":\"通道状态\",\"unit\":\"\",\"value\":{\"0\":\"排水\",\"1\":\"落虫\"},\"desc\":\"通道状态\"},\"tph\":{\"name\":\"高温保护阀值\",\"unit\":\"°C\",\"desc\":\"高温保护阀值\"},\"tpl\":{\"name\":\"低温保护阀值\",\"unit\":\"°C\",\"desc\":\"低温保护阀值\"},\"boot\":{\"name\":\"禁止工作\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"使能(禁止工作)\"},\"desc\":\"禁止工作\"},\"lux\":{\"name\":\"光照强度\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"使能(禁止工作)\"},\"desc\":\"光照强度\"},\"clt\":{\"name\":\"清虫间隔\",\"unit\":\"min\",\"desc\":\"清虫时间间隔\"},\"dattim\":{\"name\":\"数据上传间隔\",\"unit\":\"\",\"desc\":\"数据上传时间间隔\"},\"datt\":{\"name\":\"数据上传间隔\",\"unit\":\"\",\"desc\":\"数据上传时间间隔\"},\"tbs\":{\"name\":\"灯管状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"异常\"},\"desc\":\"数据上传时间间隔\"},\"type\":{\"name\":\"设备类型\",\"unit\":\"\",\"value\":{\"0\":\"--\",\"1\":\"--\",\"2\":\"杀虫灯\",\"3\":\"测报灯\",\"4\":\"性诱器\",\"5\":\"气象站\",\"6\":\"--\",\"7\":\"孢子仪\"},\"desc\":\"设备类型\"},\"simStatus\":{\"name\":\"sim卡状态\",\"unit\":\"\",\"value\":[{\"name\":\"未知\",\"val\":0},{\"name\":\"测试期\",\"val\":1},{\"name\":\"沉默期\",\"val\":2},{\"name\":\"使用中\",\"val\":3},{\"name\":\"停机\",\"val\":4},{\"name\":\"停机保号\",\"val\":5},{\"name\":\"预销号\",\"val\":6},{\"name\":\"销号\",\"val\":7}],\"desc\":\"sim卡状态\"}}");
  41802. /***/ }),
  41803. /***/ 38:
  41804. /*!************************************************************!*\
  41805. !*** E:/project/bigdata_WX/uview-ui/libs/function/test.js ***!
  41806. \************************************************************/
  41807. /*! no static exports found */
  41808. /***/ (function(module, exports, __webpack_require__) {
  41809. "use strict";
  41810. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  41811. Object.defineProperty(exports, "__esModule", {
  41812. value: true
  41813. });
  41814. exports.default = void 0;
  41815. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  41816. /**
  41817. * 验证电子邮箱格式
  41818. */
  41819. function email(value) {
  41820. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
  41821. }
  41822. /**
  41823. * 验证手机格式
  41824. */
  41825. function mobile(value) {
  41826. return /^1[23456789]\d{9}$/.test(value);
  41827. }
  41828. /**
  41829. * 验证URL格式
  41830. */
  41831. function url(value) {
  41832. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  41833. }
  41834. /**
  41835. * 验证日期格式
  41836. */
  41837. function date(value) {
  41838. return !/Invalid|NaN/.test(new Date(value).toString());
  41839. }
  41840. /**
  41841. * 验证ISO类型的日期格式
  41842. */
  41843. function dateISO(value) {
  41844. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  41845. }
  41846. /**
  41847. * 验证十进制数字
  41848. */
  41849. function number(value) {
  41850. return /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
  41851. }
  41852. /**
  41853. * 验证整数
  41854. */
  41855. function digits(value) {
  41856. return /^\d+$/.test(value);
  41857. }
  41858. /**
  41859. * 验证身份证号码
  41860. */
  41861. function idCard(value) {
  41862. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value);
  41863. }
  41864. /**
  41865. * 是否车牌号
  41866. */
  41867. function carNo(value) {
  41868. // 新能源车牌
  41869. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  41870. // 旧车牌
  41871. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  41872. if (value.length === 7) {
  41873. return creg.test(value);
  41874. } else if (value.length === 8) {
  41875. return xreg.test(value);
  41876. } else {
  41877. return false;
  41878. }
  41879. }
  41880. /**
  41881. * 金额,只允许2位小数
  41882. */
  41883. function amount(value) {
  41884. //金额,只允许保留两位小数
  41885. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  41886. }
  41887. /**
  41888. * 中文
  41889. */
  41890. function chinese(value) {
  41891. var reg = /^[\u4e00-\u9fa5]+$/gi;
  41892. return reg.test(value);
  41893. }
  41894. /**
  41895. * 只能输入字母
  41896. */
  41897. function letter(value) {
  41898. return /^[a-zA-Z]*$/.test(value);
  41899. }
  41900. /**
  41901. * 只能是字母或者数字
  41902. */
  41903. function enOrNum(value) {
  41904. //英文或者数字
  41905. var reg = /^[0-9a-zA-Z]*$/g;
  41906. return reg.test(value);
  41907. }
  41908. /**
  41909. * 验证是否包含某个值
  41910. */
  41911. function contains(value, param) {
  41912. return value.indexOf(param) >= 0;
  41913. }
  41914. /**
  41915. * 验证一个值范围[min, max]
  41916. */
  41917. function range(value, param) {
  41918. return value >= param[0] && value <= param[1];
  41919. }
  41920. /**
  41921. * 验证一个长度范围[min, max]
  41922. */
  41923. function rangeLength(value, param) {
  41924. return value.length >= param[0] && value.length <= param[1];
  41925. }
  41926. /**
  41927. * 是否固定电话
  41928. */
  41929. function landline(value) {
  41930. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  41931. return reg.test(value);
  41932. }
  41933. /**
  41934. * 判断是否为空
  41935. */
  41936. function empty(value) {
  41937. switch ((0, _typeof2.default)(value)) {
  41938. case 'undefined':
  41939. return true;
  41940. case 'string':
  41941. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  41942. break;
  41943. case 'boolean':
  41944. if (!value) return true;
  41945. break;
  41946. case 'number':
  41947. if (0 === value || isNaN(value)) return true;
  41948. break;
  41949. case 'object':
  41950. if (null === value || value.length === 0) return true;
  41951. for (var i in value) {
  41952. return false;
  41953. }
  41954. return true;
  41955. }
  41956. return false;
  41957. }
  41958. /**
  41959. * 是否json字符串
  41960. */
  41961. function jsonString(value) {
  41962. if (typeof value == 'string') {
  41963. try {
  41964. var obj = JSON.parse(value);
  41965. if ((0, _typeof2.default)(obj) == 'object' && obj) {
  41966. return true;
  41967. } else {
  41968. return false;
  41969. }
  41970. } catch (e) {
  41971. return false;
  41972. }
  41973. }
  41974. return false;
  41975. }
  41976. /**
  41977. * 是否数组
  41978. */
  41979. function array(value) {
  41980. if (typeof Array.isArray === "function") {
  41981. return Array.isArray(value);
  41982. } else {
  41983. return Object.prototype.toString.call(value) === "[object Array]";
  41984. }
  41985. }
  41986. /**
  41987. * 是否对象
  41988. */
  41989. function object(value) {
  41990. return Object.prototype.toString.call(value) === '[object Object]';
  41991. }
  41992. /**
  41993. * 是否短信验证码
  41994. */
  41995. function code(value) {
  41996. var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  41997. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  41998. }
  41999. var _default = {
  42000. email: email,
  42001. mobile: mobile,
  42002. url: url,
  42003. date: date,
  42004. dateISO: dateISO,
  42005. number: number,
  42006. digits: digits,
  42007. idCard: idCard,
  42008. carNo: carNo,
  42009. amount: amount,
  42010. chinese: chinese,
  42011. letter: letter,
  42012. enOrNum: enOrNum,
  42013. contains: contains,
  42014. range: range,
  42015. rangeLength: rangeLength,
  42016. empty: empty,
  42017. isEmpty: empty,
  42018. jsonString: jsonString,
  42019. landline: landline,
  42020. object: object,
  42021. array: array,
  42022. code: code
  42023. };
  42024. exports.default = _default;
  42025. /***/ }),
  42026. /***/ 39:
  42027. /*!*******************************************************************!*\
  42028. !*** E:/project/bigdata_WX/uview-ui/libs/function/queryParams.js ***!
  42029. \*******************************************************************/
  42030. /*! no static exports found */
  42031. /***/ (function(module, exports, __webpack_require__) {
  42032. "use strict";
  42033. Object.defineProperty(exports, "__esModule", {
  42034. value: true
  42035. });
  42036. exports.default = void 0;
  42037. /**
  42038. * 对象转url参数
  42039. * @param {*} data,对象
  42040. * @param {*} isPrefix,是否自动加上"?"
  42041. */
  42042. function queryParams() {
  42043. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  42044. var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  42045. var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  42046. var prefix = isPrefix ? '?' : '';
  42047. var _result = [];
  42048. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';
  42049. var _loop = function _loop(key) {
  42050. var value = data[key];
  42051. // 去掉为空的参数
  42052. if (['', undefined, null].indexOf(value) >= 0) {
  42053. return "continue";
  42054. }
  42055. // 如果值为数组,另行处理
  42056. if (value.constructor === Array) {
  42057. // e.g. {ids: [1, 2, 3]}
  42058. switch (arrayFormat) {
  42059. case 'indices':
  42060. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  42061. for (var i = 0; i < value.length; i++) {
  42062. _result.push(key + '[' + i + ']=' + value[i]);
  42063. }
  42064. break;
  42065. case 'brackets':
  42066. // 结果: ids[]=1&ids[]=2&ids[]=3
  42067. value.forEach(function (_value) {
  42068. _result.push(key + '[]=' + _value);
  42069. });
  42070. break;
  42071. case 'repeat':
  42072. // 结果: ids=1&ids=2&ids=3
  42073. value.forEach(function (_value) {
  42074. _result.push(key + '=' + _value);
  42075. });
  42076. break;
  42077. case 'comma':
  42078. // 结果: ids=1,2,3
  42079. var commaStr = "";
  42080. value.forEach(function (_value) {
  42081. commaStr += (commaStr ? "," : "") + _value;
  42082. });
  42083. _result.push(key + '=' + commaStr);
  42084. break;
  42085. default:
  42086. value.forEach(function (_value) {
  42087. _result.push(key + '[]=' + _value);
  42088. });
  42089. }
  42090. } else {
  42091. _result.push(key + '=' + value);
  42092. }
  42093. };
  42094. for (var key in data) {
  42095. var _ret = _loop(key);
  42096. if (_ret === "continue") continue;
  42097. }
  42098. return _result.length ? prefix + _result.join('&') : '';
  42099. }
  42100. var _default = queryParams;
  42101. exports.default = _default;
  42102. /***/ }),
  42103. /***/ 4:
  42104. /*!**********************************************************************!*\
  42105. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  42106. \**********************************************************************/
  42107. /*! no static exports found */
  42108. /***/ (function(module, exports) {
  42109. function _interopRequireDefault(obj) {
  42110. return obj && obj.__esModule ? obj : {
  42111. "default": obj
  42112. };
  42113. }
  42114. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42115. /***/ }),
  42116. /***/ 40:
  42117. /*!*************************************************************!*\
  42118. !*** E:/project/bigdata_WX/uview-ui/libs/function/route.js ***!
  42119. \*************************************************************/
  42120. /*! no static exports found */
  42121. /***/ (function(module, exports, __webpack_require__) {
  42122. "use strict";
  42123. /* WEBPACK VAR INJECTION */(function(uni) {
  42124. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  42125. Object.defineProperty(exports, "__esModule", {
  42126. value: true
  42127. });
  42128. exports.default = void 0;
  42129. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 41));
  42130. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 43));
  42131. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  42132. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  42133. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  42134. /**
  42135. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  42136. * 并且带有路由拦截功能
  42137. */
  42138. var Router = /*#__PURE__*/function () {
  42139. // 原始属性定义
  42140. function Router() {
  42141. (0, _classCallCheck2.default)(this, Router);
  42142. (0, _defineProperty2.default)(this, "config", {
  42143. type: 'navigateTo',
  42144. url: '',
  42145. delta: 1,
  42146. // navigateBack页面后退时,回退的层数
  42147. params: {},
  42148. // 传递的参数
  42149. animationType: 'pop-in',
  42150. // 窗口动画,只在APP有效
  42151. animationDuration: 300,
  42152. // 窗口动画持续时间,单位毫秒,只在APP有效
  42153. intercept: false // 是否需要拦截
  42154. });
  42155. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  42156. // 这里在构造函数中进行this绑定
  42157. this.route = this.route.bind(this);
  42158. }
  42159. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  42160. (0, _createClass2.default)(Router, [{
  42161. key: "addRootPath",
  42162. value: function addRootPath(url) {
  42163. return url[0] === '/' ? url : "/".concat(url);
  42164. }
  42165. // 整合路由参数
  42166. }, {
  42167. key: "mixinParam",
  42168. value: function mixinParam(url, params) {
  42169. url = this.addRootPath(url);
  42170. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  42171. // 如果有url中有get参数,转换后无需带上"?"
  42172. var query = '';
  42173. if (/.*\/.*\?.*=.*/.test(url)) {
  42174. // object对象转为get类型的参数
  42175. query = uni.$u.queryParams(params, false);
  42176. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  42177. return url += "&" + query;
  42178. } else {
  42179. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  42180. query = uni.$u.queryParams(params);
  42181. return url += query;
  42182. }
  42183. }
  42184. // 对外的方法名称
  42185. }, {
  42186. key: "route",
  42187. value: function () {
  42188. var _route = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  42189. var options,
  42190. params,
  42191. mergeConfig,
  42192. isNext,
  42193. _args = arguments;
  42194. return _regenerator.default.wrap(function _callee$(_context) {
  42195. while (1) {
  42196. switch (_context.prev = _context.next) {
  42197. case 0:
  42198. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  42199. params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  42200. // 合并用户的配置和内部的默认配置
  42201. mergeConfig = {};
  42202. if (typeof options === 'string') {
  42203. // 如果options为字符串,则为route(url, params)的形式
  42204. mergeConfig.url = this.mixinParam(options, params);
  42205. mergeConfig.type = 'navigateTo';
  42206. } else {
  42207. mergeConfig = uni.$u.deepClone(options, this.config);
  42208. // 否则正常使用mergeConfig中的url和params进行拼接
  42209. mergeConfig.url = this.mixinParam(options.url, options.params);
  42210. }
  42211. if (params.intercept) {
  42212. this.config.intercept = params.intercept;
  42213. }
  42214. // params参数也带给拦截器
  42215. mergeConfig.params = params;
  42216. // 合并内外部参数
  42217. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  42218. // 判断用户是否定义了拦截器
  42219. if (!(typeof uni.$u.routeIntercept === 'function')) {
  42220. _context.next = 14;
  42221. break;
  42222. }
  42223. _context.next = 10;
  42224. return new Promise(function (resolve, reject) {
  42225. uni.$u.routeIntercept(mergeConfig, resolve);
  42226. });
  42227. case 10:
  42228. isNext = _context.sent;
  42229. // 如果isNext为true,则执行路由跳转
  42230. isNext && this.openPage(mergeConfig);
  42231. _context.next = 15;
  42232. break;
  42233. case 14:
  42234. this.openPage(mergeConfig);
  42235. case 15:
  42236. case "end":
  42237. return _context.stop();
  42238. }
  42239. }
  42240. }, _callee, this);
  42241. }));
  42242. function route() {
  42243. return _route.apply(this, arguments);
  42244. }
  42245. return route;
  42246. }() // 执行路由跳转
  42247. }, {
  42248. key: "openPage",
  42249. value: function openPage(config) {
  42250. // 解构参数
  42251. var url = config.url,
  42252. type = config.type,
  42253. delta = config.delta,
  42254. animationType = config.animationType,
  42255. animationDuration = config.animationDuration;
  42256. if (config.type == 'navigateTo' || config.type == 'to') {
  42257. uni.navigateTo({
  42258. url: url,
  42259. animationType: animationType,
  42260. animationDuration: animationDuration
  42261. });
  42262. }
  42263. if (config.type == 'redirectTo' || config.type == 'redirect') {
  42264. uni.redirectTo({
  42265. url: url
  42266. });
  42267. }
  42268. if (config.type == 'switchTab' || config.type == 'tab') {
  42269. uni.switchTab({
  42270. url: url
  42271. });
  42272. }
  42273. if (config.type == 'reLaunch' || config.type == 'launch') {
  42274. uni.reLaunch({
  42275. url: url
  42276. });
  42277. }
  42278. if (config.type == 'navigateBack' || config.type == 'back') {
  42279. uni.navigateBack({
  42280. delta: delta
  42281. });
  42282. }
  42283. }
  42284. }]);
  42285. return Router;
  42286. }();
  42287. var _default = new Router().route;
  42288. exports.default = _default;
  42289. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  42290. /***/ }),
  42291. /***/ 41:
  42292. /*!************************************************************************************************!*\
  42293. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  42294. \************************************************************************************************/
  42295. /*! no static exports found */
  42296. /***/ (function(module, exports, __webpack_require__) {
  42297. // TODO(Babel 8): Remove this file.
  42298. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 42)();
  42299. module.exports = runtime;
  42300. /***/ }),
  42301. /***/ 412:
  42302. /*!*************************************************************!*\
  42303. !*** E:/project/bigdata_WX/static/data/cbd_pest_library.js ***!
  42304. \*************************************************************/
  42305. /*! no static exports found */
  42306. /***/ (function(module, exports, __webpack_require__) {
  42307. "use strict";
  42308. Object.defineProperty(exports, "__esModule", {
  42309. value: true
  42310. });
  42311. exports.default = void 0;
  42312. // 害虫库
  42313. var insect_dict = {
  42314. '1': '金龟子',
  42315. '2': '夜蛾',
  42316. '3': '二点委夜蛾',
  42317. '4': '梨剑纹夜蛾',
  42318. '5': '杨扇舟蛾',
  42319. '6': '舟蛾',
  42320. '7': '旋幽夜蛾',
  42321. '8': '蝼蛄',
  42322. '9': '步甲',
  42323. '10': '螟蛾',
  42324. '11': '毛黄鳃金龟',
  42325. '12': '尺蛾',
  42326. '13': '剑纹夜蛾',
  42327. '14': '粉缘钻夜蛾',
  42328. '15': '夜蛾科',
  42329. '16': '七星瓢虫',
  42330. '17': '棉铃虫',
  42331. '18': '蜻蜓',
  42332. '19': '蚊',
  42333. '20': '东方粘虫',
  42334. '21': '叶蝉',
  42335. '22': '春尺蠖',
  42336. '23': '雄性春尺蠖',
  42337. '24': '杨小舟蛾',
  42338. '25': '甘蓝夜蛾',
  42339. '26': '小地老虎',
  42340. '27': '两点尼夜蛾',
  42341. '28': '柳阴翅斑螟',
  42342. '29': '桑褶翅尺蛾',
  42343. '30': '宽胫夜蛾',
  42344. '31': '尺蠖',
  42345. '32': '一点钻夜蛾',
  42346. '33': '天蛾',
  42347. '34': '裳夜蛾',
  42348. '35': '灯蛾',
  42349. '36': '美国白蛾',
  42350. '37': '八字白眉天蛾',
  42351. '38': '陌夜蛾',
  42352. '39': '豆天蛾',
  42353. '40': '麦蛾',
  42354. '41': '围连环夜蛾',
  42355. '42': '亚美尺蛾',
  42356. '43': '梨星毛虫',
  42357. '44': '银锭夜蛾',
  42358. '45': '黄臀灯蛾',
  42359. '46': '大螟',
  42360. '47': '燕尾舟蛾',
  42361. '48': '榆津尺蛾',
  42362. '49': '朽木夜蛾',
  42363. '50': '黄地老虎',
  42364. '51': '白钩粘夜蛾',
  42365. '52': '桃蛀螟',
  42366. '53': '甜菜夜蛾',
  42367. '54': '斜纹夜蛾',
  42368. '55': '蚀夜蛾',
  42369. '56': '淡银锭夜蛾',
  42370. '57': '齿美冬夜蛾',
  42371. '58': '一点金刚钻',
  42372. '59': '胡桃豹夜蛾',
  42373. '60': '桑剑纹夜蛾',
  42374. '61': '蓝目天蛾',
  42375. '62': '黑绒绢金龟',
  42376. '63': '烟青虫',
  42377. '64': '暗黑鳃金龟',
  42378. '65': '中华绒金龟',
  42379. '66': '八字地老虎',
  42380. '67': '榆绿天蛾',
  42381. '68': '红星雪灯蛾',
  42382. '69': '雀纹天蛾',
  42383. '70': '铜绿丽金龟',
  42384. '71': '水龟虫',
  42385. '72': '曲线尼夜蛾',
  42386. '73': '粘虫',
  42387. '74': '瘦银锭夜蛾',
  42388. '75': '红天蛾',
  42389. '76': '鳃金龟',
  42390. '77': '大黑鳃金龟',
  42391. '78': '大地老虎',
  42392. '79': '玉米螟',
  42393. '80': '赤角盲蝽',
  42394. '81': '槐尺蛾',
  42395. '82': '银纹夜蛾',
  42396. '83': '天牛',
  42397. '84': '乏夜蛾',
  42398. '85': '丁香天蛾',
  42399. '86': '构月天蛾',
  42400. '87': '虎甲',
  42401. '88': '劳氏粘虫',
  42402. '89': '白薯天蛾',
  42403. '90': '广鹿蛾',
  42404. '91': '二十八星瓢虫',
  42405. '92': '腮金龟',
  42406. '93': '人纹污夜蛾',
  42407. '94': '叩甲',
  42408. '95': '楸蠹野螟',
  42409. '96': '丝绵木金星尺蛾',
  42410. '97': '红缘灯蛾',
  42411. '98': '黄褐丽金龟',
  42412. '99': '螟蛾科',
  42413. '100': '红棕灰夜蛾',
  42414. '101': '黑绒绢金龟',
  42415. '102': '广鹿灯蛾',
  42416. '103': '蝽',
  42417. '104': '蜂',
  42418. '105': '大造桥虫',
  42419. '106': '童剑纹夜蛾',
  42420. '107': '晃剑纹夜蛾',
  42421. '108': '钩粘虫',
  42422. '109': '直影夜蛾',
  42423. '110': '毛黄绢金龟',
  42424. '111': '乌氏小尾天蚕蛾',
  42425. '112': '褐边绿刺蛾',
  42426. '113': '广鹿舟蛾',
  42427. '114': '颜倾城',
  42428. '115': '龙虱',
  42429. '116': '双带盘瓢虫',
  42430. '117': '槲犹冬夜蛾',
  42431. '118': '洋槐天蛾',
  42432. '119': '弧角散纹夜蛾',
  42433. '120': '黄脉天蛾',
  42434. '121': '葡萄天蛾',
  42435. '122': '桃六点天蛾',
  42436. '123': '异色瓢虫',
  42437. '124': '榆黄足毒蛾',
  42438. '125': '客来夜蛾',
  42439. '126': '桦尺蛾',
  42440. '127': '草地螟',
  42441. '128': '细条纹野螟',
  42442. '129': '污灯蛾属',
  42443. '130': '杨二尾舟蛾',
  42444. '131': '克什杆野螟',
  42445. '132': '筱客来夜蛾',
  42446. '133': '栗六点天蛾',
  42447. '134': '紫光盾天蛾',
  42448. '135': '款冬玉米螟',
  42449. '136': '草蛉',
  42450. '137': '亚麻篱灯蛾',
  42451. '138': '扁连环夜蛾',
  42452. '139': '圣蜣螂',
  42453. '140': '白钩粘虫',
  42454. '141': '苇实夜蛾',
  42455. '142': '姬蜂',
  42456. '143': '秘夜蛾',
  42457. '144': '织网夜蛾',
  42458. '145': '深色白眉天蛾',
  42459. '146': '短扇舟蛾',
  42460. '147': '白须天蛾',
  42461. '148': '歌梦尼夜蛾',
  42462. '149': '海安夜蛾',
  42463. '150': '满丫纹夜蛾',
  42464. '151': '蟋蟀',
  42465. '152': '双斑青步甲',
  42466. '153': '白条夜蛾',
  42467. '154': '蟪蛄',
  42468. '155': '负子蝽',
  42469. '156': '脊青步甲',
  42470. '157': '宽斑青步甲',
  42471. '158': '稻从卷叶螟',
  42472. '159': '淡剑夜蛾',
  42473. '160': '甜菜白带野螟',
  42474. '161': '樗蚕',
  42475. '162': '蒙古寒蝉',
  42476. '163': '中带三角夜蛾',
  42477. '164': '蝗虫',
  42478. '165': '多色异丽金龟',
  42479. '166': '白色小卷蛾',
  42480. '167': '狭边青步甲',
  42481. '168': '棉卷叶野螟',
  42482. '169': '豆荚野螟',
  42483. '170': '麻小食心虫',
  42484. '171': '星斑虎甲',
  42485. '172': '黄缘龙虱',
  42486. '173': '无斑弧丽金龟',
  42487. '174': '白额鹰翅天蛾',
  42488. '175': '日本真龙虱',
  42489. '176': '山东云斑螟',
  42490. '177': '小文夜蛾',
  42491. '178': '三条蛀野螟',
  42492. '179': '榆掌舟蛾',
  42493. '180': '刺槐掌舟蛾',
  42494. '181': '星绒天蛾',
  42495. '182': '杨剑舟蛾',
  42496. '183': '刀夜蛾',
  42497. '184': '红节天蛾',
  42498. '185': '星白雪灯蛾',
  42499. '186': '桃剑纹夜蛾',
  42500. '187': '谐夜蛾',
  42501. '188': '小剑纹夜蛾',
  42502. '189': '鸣鸣蝉',
  42503. '190': '姬夜蛾',
  42504. '191': '落叶松毛虫',
  42505. '192': '苹六点天蛾',
  42506. '193': '四斑绢野螟',
  42507. '194': '甘薯天蛾',
  42508. '195': '小线角木蠹蛾',
  42509. '196': '三斑蕊夜蛾',
  42510. '197': '白雪灯蛾',
  42511. '198': '黄刺蛾',
  42512. '199': '茶翅蝽',
  42513. '200': '杨树枯叶蛾',
  42514. "201": "标瑙夜蛾",
  42515. "202": "瓜绢野螟",
  42516. "203": "稻绿蝽",
  42517. "204": "杨雪毒蛾",
  42518. "205": "榆白边舟蛾",
  42519. "206": "扁刺蛾",
  42520. "207": "绒黏夜蛾",
  42521. "208": "庸肖毛翅夜蛾",
  42522. "209": "中华婪步甲",
  42523. "210": "褐黄前锹甲",
  42524. "211": "旱柳原野螟",
  42525. "212": "巨影夜蛾",
  42526. "213": "食蚜蝇",
  42527. "214": "双斑葬甲",
  42528. "215": "黄毒蛾",
  42529. "216": "婪步甲",
  42530. "217": "土甲",
  42531. "218": "中华真地鳖",
  42532. "219": "紫线夜蛾",
  42533. "220": "小黄鳃金龟",
  42534. "221": "中华真土鳖",
  42535. "222": "云斑虎甲",
  42536. "223": "中华黧尺蛾",
  42537. "224": "中华绿刺蛾",
  42538. "225": "巨豹纹尺蛾",
  42539. "226": "多斑豹蠹蛾",
  42540. "227": "桑尺蛾",
  42541. "228": "灰直纹螟",
  42542. "229": "中国绿刺蛾",
  42543. "230": "云杉梢斑螟",
  42544. "231": "桑绢野螟",
  42545. "232": "黄杨绢野螟",
  42546. "233": "突背斑红蝽",
  42547. "234": "高粱条螟",
  42548. "235": "小麦负泥虫",
  42549. "236": "苹掌舟蛾",
  42550. "237": "绒粘夜蛾",
  42551. "238": "灰白灯蛾",
  42552. "239": "隐丫纹夜蛾",
  42553. "240": "满纹夜蛾",
  42554. "241": "黑剑狼夜蛾",
  42555. "242": "蜣螂",
  42556. "243": "福婆鳃金龟",
  42557. "244": "雨尺蛾",
  42558. "245": "优美苔蛾",
  42559. "246": "黄斑野螟",
  42560. "247": "疆夜蛾",
  42561. "248": "六点天蛾",
  42562. "249": "斜线夜蛾",
  42563. "250": "石榴巾夜蛾",
  42564. "251": "绒星天蛾",
  42565. "252": "霜天蛾",
  42566. "253": "大田鳖",
  42567. "254": "灰双纹螟",
  42568. "255": "青尺蛾",
  42569. "256": "二线绿尺蛾",
  42570. "257": "散纹夜蛾",
  42571. "258": "红双线尺蛾",
  42572. "259": "胞短栉夜蛾",
  42573. "260": "飞虱科",
  42574. "261": "桃多斑野螟",
  42575. "262": "甜菜青野螟",
  42576. "263": "核桃鹰翅天蛾",
  42577. "264": "角顶尺蛾",
  42578. "265": "葡萄缺角天蛾",
  42579. "266": "绿尾大蚕蛾",
  42580. "267": "杨褐枯叶蝶",
  42581. "268": "双云尺蛾",
  42582. "269": "斑拟兜夜蛾",
  42583. "270": "阿莎尺蛾",
  42584. "271": "榄绿岐角螟",
  42585. "272": "青革土蝽",
  42586. "273": "核桃美舟蛾",
  42587. "274": "斑点卷叶螟",
  42588. "275": "黄褐箩纹蛾",
  42589. "276": "白环红天蛾",
  42590. "277": "白腹网丛螟",
  42591. "278": "枯叶蛾",
  42592. "279": "丹日明夜蛾",
  42593. "280": "仿白边舟蛾",
  42594. "281": "槐羽舟蛾",
  42595. "282": "草地贪夜蛾",
  42596. "283": "环夜蛾",
  42597. "284": "尘尺蛾",
  42598. "285": "黄二星舟蛾",
  42599. "286": "榆木蠹蛾",
  42600. "287": "水黾",
  42601. "288": "银装冬夜蛾",
  42602. "289": "饰奇尺蛾",
  42603. "290": "枯叶蝶",
  42604. "291": "步甲",
  42605. "292": "阔胸禾犀金龟",
  42606. "293": "眼斑钩蛾",
  42607. "294": "三开蜣螂",
  42608. "295": "金星步甲",
  42609. "296": "残夜蛾",
  42610. "297": "野蚕蛾",
  42611. "298": "芦苇豹蠹蛾",
  42612. "299": "华晓扁犀金龟",
  42613. "300": "灰胸突鳃金龟",
  42614. "301": "龟纹瓢虫",
  42615. "302": "麻皮蝽",
  42616. "303": "斑须蝽",
  42617. "304": "斜斑虎甲",
  42618. "305": "地鳖",
  42619. "306": "叶甲",
  42620. "307": "燕夜蛾",
  42621. "308": "黑纹北灯蛾",
  42622. "309": "网夜蛾",
  42623. "310": "棘翅夜蛾",
  42624. "311": "规尺蛾",
  42625. "312": "苜蓿银纹夜蛾",
  42626. "313": "拟扇舟蛾",
  42627. "314": "丁目大蚕蛾",
  42628. "315": "金黄蛾",
  42629. "316": "黄星雪灯蛾",
  42630. "317": "暗纹紫褐螟",
  42631. "318": "白眉天蛾",
  42632. "319": "黄板盘瓢虫",
  42633. "320": "玫岐角螟",
  42634. "321": "枯黄贡尺蛾",
  42635. "322": "小豆长喙天蛾",
  42636. "323": "橙拟灯蛾",
  42637. "324": "粉蝶灯蛾",
  42638. "325": "纹散丽灯蛾",
  42639. "326": "雪尾尺蛾",
  42640. "327": "鹰翅天蛾",
  42641. "328": "波纹蛾",
  42642. "329": "黑条灰灯蛾",
  42643. "330": "八点灰灯蛾",
  42644. "331": "间纹弦夜蛾",
  42645. "332": "缤夜蛾"
  42646. };
  42647. var _default = insect_dict;
  42648. exports.default = _default;
  42649. /***/ }),
  42650. /***/ 42:
  42651. /*!*******************************************************************!*\
  42652. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  42653. \*******************************************************************/
  42654. /*! no static exports found */
  42655. /***/ (function(module, exports, __webpack_require__) {
  42656. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  42657. function _regeneratorRuntime() {
  42658. "use strict";
  42659. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  42660. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  42661. return e;
  42662. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42663. var t,
  42664. e = {},
  42665. r = Object.prototype,
  42666. n = r.hasOwnProperty,
  42667. o = Object.defineProperty || function (t, e, r) {
  42668. t[e] = r.value;
  42669. },
  42670. i = "function" == typeof Symbol ? Symbol : {},
  42671. a = i.iterator || "@@iterator",
  42672. c = i.asyncIterator || "@@asyncIterator",
  42673. u = i.toStringTag || "@@toStringTag";
  42674. function define(t, e, r) {
  42675. return Object.defineProperty(t, e, {
  42676. value: r,
  42677. enumerable: !0,
  42678. configurable: !0,
  42679. writable: !0
  42680. }), t[e];
  42681. }
  42682. try {
  42683. define({}, "");
  42684. } catch (t) {
  42685. define = function define(t, e, r) {
  42686. return t[e] = r;
  42687. };
  42688. }
  42689. function wrap(t, e, r, n) {
  42690. var i = e && e.prototype instanceof Generator ? e : Generator,
  42691. a = Object.create(i.prototype),
  42692. c = new Context(n || []);
  42693. return o(a, "_invoke", {
  42694. value: makeInvokeMethod(t, r, c)
  42695. }), a;
  42696. }
  42697. function tryCatch(t, e, r) {
  42698. try {
  42699. return {
  42700. type: "normal",
  42701. arg: t.call(e, r)
  42702. };
  42703. } catch (t) {
  42704. return {
  42705. type: "throw",
  42706. arg: t
  42707. };
  42708. }
  42709. }
  42710. e.wrap = wrap;
  42711. var h = "suspendedStart",
  42712. l = "suspendedYield",
  42713. f = "executing",
  42714. s = "completed",
  42715. y = {};
  42716. function Generator() {}
  42717. function GeneratorFunction() {}
  42718. function GeneratorFunctionPrototype() {}
  42719. var p = {};
  42720. define(p, a, function () {
  42721. return this;
  42722. });
  42723. var d = Object.getPrototypeOf,
  42724. v = d && d(d(values([])));
  42725. v && v !== r && n.call(v, a) && (p = v);
  42726. var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
  42727. function defineIteratorMethods(t) {
  42728. ["next", "throw", "return"].forEach(function (e) {
  42729. define(t, e, function (t) {
  42730. return this._invoke(e, t);
  42731. });
  42732. });
  42733. }
  42734. function AsyncIterator(t, e) {
  42735. function invoke(r, o, i, a) {
  42736. var c = tryCatch(t[r], t, o);
  42737. if ("throw" !== c.type) {
  42738. var u = c.arg,
  42739. h = u.value;
  42740. return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
  42741. invoke("next", t, i, a);
  42742. }, function (t) {
  42743. invoke("throw", t, i, a);
  42744. }) : e.resolve(h).then(function (t) {
  42745. u.value = t, i(u);
  42746. }, function (t) {
  42747. return invoke("throw", t, i, a);
  42748. });
  42749. }
  42750. a(c.arg);
  42751. }
  42752. var r;
  42753. o(this, "_invoke", {
  42754. value: function value(t, n) {
  42755. function callInvokeWithMethodAndArg() {
  42756. return new e(function (e, r) {
  42757. invoke(t, n, e, r);
  42758. });
  42759. }
  42760. return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  42761. }
  42762. });
  42763. }
  42764. function makeInvokeMethod(e, r, n) {
  42765. var o = h;
  42766. return function (i, a) {
  42767. if (o === f) throw new Error("Generator is already running");
  42768. if (o === s) {
  42769. if ("throw" === i) throw a;
  42770. return {
  42771. value: t,
  42772. done: !0
  42773. };
  42774. }
  42775. for (n.method = i, n.arg = a;;) {
  42776. var c = n.delegate;
  42777. if (c) {
  42778. var u = maybeInvokeDelegate(c, n);
  42779. if (u) {
  42780. if (u === y) continue;
  42781. return u;
  42782. }
  42783. }
  42784. if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
  42785. if (o === h) throw o = s, n.arg;
  42786. n.dispatchException(n.arg);
  42787. } else "return" === n.method && n.abrupt("return", n.arg);
  42788. o = f;
  42789. var p = tryCatch(e, r, n);
  42790. if ("normal" === p.type) {
  42791. if (o = n.done ? s : l, p.arg === y) continue;
  42792. return {
  42793. value: p.arg,
  42794. done: n.done
  42795. };
  42796. }
  42797. "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
  42798. }
  42799. };
  42800. }
  42801. function maybeInvokeDelegate(e, r) {
  42802. var n = r.method,
  42803. o = e.iterator[n];
  42804. if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
  42805. var i = tryCatch(o, e.iterator, r.arg);
  42806. if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
  42807. var a = i.arg;
  42808. return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
  42809. }
  42810. function pushTryEntry(t) {
  42811. var e = {
  42812. tryLoc: t[0]
  42813. };
  42814. 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
  42815. }
  42816. function resetTryEntry(t) {
  42817. var e = t.completion || {};
  42818. e.type = "normal", delete e.arg, t.completion = e;
  42819. }
  42820. function Context(t) {
  42821. this.tryEntries = [{
  42822. tryLoc: "root"
  42823. }], t.forEach(pushTryEntry, this), this.reset(!0);
  42824. }
  42825. function values(e) {
  42826. if (e || "" === e) {
  42827. var r = e[a];
  42828. if (r) return r.call(e);
  42829. if ("function" == typeof e.next) return e;
  42830. if (!isNaN(e.length)) {
  42831. var o = -1,
  42832. i = function next() {
  42833. for (; ++o < e.length;) {
  42834. if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
  42835. }
  42836. return next.value = t, next.done = !0, next;
  42837. };
  42838. return i.next = i;
  42839. }
  42840. }
  42841. throw new TypeError(_typeof(e) + " is not iterable");
  42842. }
  42843. return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
  42844. value: GeneratorFunctionPrototype,
  42845. configurable: !0
  42846. }), o(GeneratorFunctionPrototype, "constructor", {
  42847. value: GeneratorFunction,
  42848. configurable: !0
  42849. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
  42850. var e = "function" == typeof t && t.constructor;
  42851. return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
  42852. }, e.mark = function (t) {
  42853. return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
  42854. }, e.awrap = function (t) {
  42855. return {
  42856. __await: t
  42857. };
  42858. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
  42859. return this;
  42860. }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
  42861. void 0 === i && (i = Promise);
  42862. var a = new AsyncIterator(wrap(t, r, n, o), i);
  42863. return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
  42864. return t.done ? t.value : a.next();
  42865. });
  42866. }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
  42867. return this;
  42868. }), define(g, "toString", function () {
  42869. return "[object Generator]";
  42870. }), e.keys = function (t) {
  42871. var e = Object(t),
  42872. r = [];
  42873. for (var n in e) {
  42874. r.push(n);
  42875. }
  42876. return r.reverse(), function next() {
  42877. for (; r.length;) {
  42878. var t = r.pop();
  42879. if (t in e) return next.value = t, next.done = !1, next;
  42880. }
  42881. return next.done = !0, next;
  42882. };
  42883. }, e.values = values, Context.prototype = {
  42884. constructor: Context,
  42885. reset: function reset(e) {
  42886. if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) {
  42887. "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
  42888. }
  42889. },
  42890. stop: function stop() {
  42891. this.done = !0;
  42892. var t = this.tryEntries[0].completion;
  42893. if ("throw" === t.type) throw t.arg;
  42894. return this.rval;
  42895. },
  42896. dispatchException: function dispatchException(e) {
  42897. if (this.done) throw e;
  42898. var r = this;
  42899. function handle(n, o) {
  42900. return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
  42901. }
  42902. for (var o = this.tryEntries.length - 1; o >= 0; --o) {
  42903. var i = this.tryEntries[o],
  42904. a = i.completion;
  42905. if ("root" === i.tryLoc) return handle("end");
  42906. if (i.tryLoc <= this.prev) {
  42907. var c = n.call(i, "catchLoc"),
  42908. u = n.call(i, "finallyLoc");
  42909. if (c && u) {
  42910. if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
  42911. if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
  42912. } else if (c) {
  42913. if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
  42914. } else {
  42915. if (!u) throw new Error("try statement without catch or finally");
  42916. if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
  42917. }
  42918. }
  42919. }
  42920. },
  42921. abrupt: function abrupt(t, e) {
  42922. for (var r = this.tryEntries.length - 1; r >= 0; --r) {
  42923. var o = this.tryEntries[r];
  42924. if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
  42925. var i = o;
  42926. break;
  42927. }
  42928. }
  42929. i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
  42930. var a = i ? i.completion : {};
  42931. return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
  42932. },
  42933. complete: function complete(t, e) {
  42934. if ("throw" === t.type) throw t.arg;
  42935. return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
  42936. },
  42937. finish: function finish(t) {
  42938. for (var e = this.tryEntries.length - 1; e >= 0; --e) {
  42939. var r = this.tryEntries[e];
  42940. if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
  42941. }
  42942. },
  42943. "catch": function _catch(t) {
  42944. for (var e = this.tryEntries.length - 1; e >= 0; --e) {
  42945. var r = this.tryEntries[e];
  42946. if (r.tryLoc === t) {
  42947. var n = r.completion;
  42948. if ("throw" === n.type) {
  42949. var o = n.arg;
  42950. resetTryEntry(r);
  42951. }
  42952. return o;
  42953. }
  42954. }
  42955. throw new Error("illegal catch attempt");
  42956. },
  42957. delegateYield: function delegateYield(e, r, n) {
  42958. return this.delegate = {
  42959. iterator: values(e),
  42960. resultName: r,
  42961. nextLoc: n
  42962. }, "next" === this.method && (this.arg = t), y;
  42963. }
  42964. }, e;
  42965. }
  42966. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42967. /***/ }),
  42968. /***/ 43:
  42969. /*!*****************************************************************!*\
  42970. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  42971. \*****************************************************************/
  42972. /*! no static exports found */
  42973. /***/ (function(module, exports) {
  42974. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  42975. try {
  42976. var info = gen[key](arg);
  42977. var value = info.value;
  42978. } catch (error) {
  42979. reject(error);
  42980. return;
  42981. }
  42982. if (info.done) {
  42983. resolve(value);
  42984. } else {
  42985. Promise.resolve(value).then(_next, _throw);
  42986. }
  42987. }
  42988. function _asyncToGenerator(fn) {
  42989. return function () {
  42990. var self = this,
  42991. args = arguments;
  42992. return new Promise(function (resolve, reject) {
  42993. var gen = fn.apply(self, args);
  42994. function _next(value) {
  42995. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  42996. }
  42997. function _throw(err) {
  42998. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  42999. }
  43000. _next(undefined);
  43001. });
  43002. };
  43003. }
  43004. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  43005. /***/ }),
  43006. /***/ 44:
  43007. /*!******************************************************************!*\
  43008. !*** E:/project/bigdata_WX/uview-ui/libs/function/timeFormat.js ***!
  43009. \******************************************************************/
  43010. /*! no static exports found */
  43011. /***/ (function(module, exports, __webpack_require__) {
  43012. "use strict";
  43013. Object.defineProperty(exports, "__esModule", {
  43014. value: true
  43015. });
  43016. exports.default = void 0;
  43017. // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  43018. // 所以这里做一个兼容polyfill的兼容处理
  43019. if (!String.prototype.padStart) {
  43020. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  43021. String.prototype.padStart = function (maxLength) {
  43022. var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  43023. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError('fillString must be String');
  43024. var str = this;
  43025. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  43026. if (str.length >= maxLength) return String(str);
  43027. var fillLength = maxLength - str.length,
  43028. times = Math.ceil(fillLength / fillString.length);
  43029. while (times >>= 1) {
  43030. fillString += fillString;
  43031. if (times === 1) {
  43032. fillString += fillString;
  43033. }
  43034. }
  43035. return fillString.slice(0, fillLength) + str;
  43036. };
  43037. }
  43038. // 其他更多是格式化有如下:
  43039. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  43040. function timeFormat() {
  43041. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  43042. var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  43043. // 如果为null,则格式化当前时间
  43044. if (!dateTime) dateTime = Number(new Date());
  43045. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  43046. if (dateTime.toString().length == 10) dateTime *= 1000;
  43047. var date = new Date(Number(dateTime));
  43048. var ret;
  43049. var opt = {
  43050. "y+": date.getFullYear().toString(),
  43051. // 年
  43052. "m+": (date.getMonth() + 1).toString(),
  43053. // 月
  43054. "d+": date.getDate().toString(),
  43055. // 日
  43056. "h+": date.getHours().toString(),
  43057. // 时
  43058. "M+": date.getMinutes().toString(),
  43059. // 分
  43060. "s+": date.getSeconds().toString() // 秒
  43061. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  43062. };
  43063. for (var k in opt) {
  43064. ret = new RegExp("(" + k + ")").exec(fmt);
  43065. if (ret) {
  43066. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  43067. }
  43068. ;
  43069. }
  43070. ;
  43071. return fmt;
  43072. }
  43073. var _default = timeFormat;
  43074. exports.default = _default;
  43075. /***/ }),
  43076. /***/ 45:
  43077. /*!****************************************************************!*\
  43078. !*** E:/project/bigdata_WX/uview-ui/libs/function/timeFrom.js ***!
  43079. \****************************************************************/
  43080. /*! no static exports found */
  43081. /***/ (function(module, exports, __webpack_require__) {
  43082. "use strict";
  43083. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  43084. Object.defineProperty(exports, "__esModule", {
  43085. value: true
  43086. });
  43087. exports.default = void 0;
  43088. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 44));
  43089. /**
  43090. * 时间戳转为多久之前
  43091. * @param String timestamp 时间戳
  43092. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  43093. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  43094. */
  43095. function timeFrom() {
  43096. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  43097. var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  43098. // 如果为null,则格式化当前时间
  43099. if (!dateTime) dateTime = Number(new Date());
  43100. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  43101. if (dateTime.toString().length == 10) dateTime *= 1000;
  43102. var timestamp = +new Date(Number(dateTime));
  43103. var timer = (Number(new Date()) - timestamp) / 1000;
  43104. // 如果小于5分钟,则返回"刚刚",其他以此类推
  43105. var tips = '';
  43106. switch (true) {
  43107. case timer < 300:
  43108. tips = '刚刚';
  43109. break;
  43110. case timer >= 300 && timer < 3600:
  43111. tips = parseInt(timer / 60) + '分钟前';
  43112. break;
  43113. case timer >= 3600 && timer < 86400:
  43114. tips = parseInt(timer / 3600) + '小时前';
  43115. break;
  43116. case timer >= 86400 && timer < 2592000:
  43117. tips = parseInt(timer / 86400) + '天前';
  43118. break;
  43119. default:
  43120. // 如果format为false,则无论什么时间戳,都显示xx之前
  43121. if (format === false) {
  43122. if (timer >= 2592000 && timer < 365 * 86400) {
  43123. tips = parseInt(timer / (86400 * 30)) + '个月前';
  43124. } else {
  43125. tips = parseInt(timer / (86400 * 365)) + '年前';
  43126. }
  43127. } else {
  43128. tips = (0, _timeFormat.default)(timestamp, format);
  43129. }
  43130. }
  43131. return tips;
  43132. }
  43133. var _default = timeFrom;
  43134. exports.default = _default;
  43135. /***/ }),
  43136. /***/ 46:
  43137. /*!*********************************************************************!*\
  43138. !*** E:/project/bigdata_WX/uview-ui/libs/function/colorGradient.js ***!
  43139. \*********************************************************************/
  43140. /*! no static exports found */
  43141. /***/ (function(module, exports, __webpack_require__) {
  43142. "use strict";
  43143. Object.defineProperty(exports, "__esModule", {
  43144. value: true
  43145. });
  43146. exports.default = void 0;
  43147. /**
  43148. * 求两个颜色之间的渐变值
  43149. * @param {string} startColor 开始的颜色
  43150. * @param {string} endColor 结束的颜色
  43151. * @param {number} step 颜色等分的份额
  43152. * */
  43153. function colorGradient() {
  43154. var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';
  43155. var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';
  43156. var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  43157. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  43158. var startR = startRGB[0];
  43159. var startG = startRGB[1];
  43160. var startB = startRGB[2];
  43161. var endRGB = hexToRgb(endColor, false);
  43162. var endR = endRGB[0];
  43163. var endG = endRGB[1];
  43164. var endB = endRGB[2];
  43165. var sR = (endR - startR) / step; //总差值
  43166. var sG = (endG - startG) / step;
  43167. var sB = (endB - startB) / step;
  43168. var colorArr = [];
  43169. for (var i = 0; i < step; i++) {
  43170. //计算每一步的hex值
  43171. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB * i + startB) + ')');
  43172. colorArr.push(hex);
  43173. }
  43174. return colorArr;
  43175. }
  43176. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  43177. function hexToRgb(sColor) {
  43178. var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  43179. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  43180. sColor = sColor.toLowerCase();
  43181. if (sColor && reg.test(sColor)) {
  43182. if (sColor.length === 4) {
  43183. var sColorNew = "#";
  43184. for (var i = 1; i < 4; i += 1) {
  43185. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  43186. }
  43187. sColor = sColorNew;
  43188. }
  43189. //处理六位的颜色值
  43190. var sColorChange = [];
  43191. for (var _i = 1; _i < 7; _i += 2) {
  43192. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  43193. }
  43194. if (!str) {
  43195. return sColorChange;
  43196. } else {
  43197. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  43198. }
  43199. } else if (/^(rgb|RGB)/.test(sColor)) {
  43200. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  43201. return arr.map(function (val) {
  43202. return Number(val);
  43203. });
  43204. } else {
  43205. return sColor;
  43206. }
  43207. }
  43208. ;
  43209. // 将rgb表示方式转换为hex表示方式
  43210. function rgbToHex(rgb) {
  43211. var _this = rgb;
  43212. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  43213. if (/^(rgb|RGB)/.test(_this)) {
  43214. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  43215. var strHex = "#";
  43216. for (var i = 0; i < aColor.length; i++) {
  43217. var hex = Number(aColor[i]).toString(16);
  43218. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  43219. if (hex === "0") {
  43220. hex += hex;
  43221. }
  43222. strHex += hex;
  43223. }
  43224. if (strHex.length !== 7) {
  43225. strHex = _this;
  43226. }
  43227. return strHex;
  43228. } else if (reg.test(_this)) {
  43229. var aNum = _this.replace(/#/, "").split("");
  43230. if (aNum.length === 6) {
  43231. return _this;
  43232. } else if (aNum.length === 3) {
  43233. var numHex = "#";
  43234. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  43235. numHex += aNum[_i2] + aNum[_i2];
  43236. }
  43237. return numHex;
  43238. }
  43239. } else {
  43240. return _this;
  43241. }
  43242. }
  43243. /**
  43244. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  43245. * sHex为传入的十六进制的色值
  43246. * alpha为rgba的透明度
  43247. */
  43248. function colorToRgba(color) {
  43249. var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  43250. color = rgbToHex(color);
  43251. // 十六进制颜色值的正则表达式
  43252. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  43253. /* 16进制颜色转为RGB格式 */
  43254. var sColor = color.toLowerCase();
  43255. if (sColor && reg.test(sColor)) {
  43256. if (sColor.length === 4) {
  43257. var sColorNew = '#';
  43258. for (var i = 1; i < 4; i += 1) {
  43259. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  43260. }
  43261. sColor = sColorNew;
  43262. }
  43263. // 处理六位的颜色值
  43264. var sColorChange = [];
  43265. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  43266. sColorChange.push(parseInt('0x' + sColor.slice(_i3, _i3 + 2)));
  43267. }
  43268. // return sColorChange.join(',')
  43269. return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')';
  43270. } else {
  43271. return sColor;
  43272. }
  43273. }
  43274. var _default = {
  43275. colorGradient: colorGradient,
  43276. hexToRgb: hexToRgb,
  43277. rgbToHex: rgbToHex,
  43278. colorToRgba: colorToRgba
  43279. };
  43280. exports.default = _default;
  43281. /***/ }),
  43282. /***/ 47:
  43283. /*!************************************************************!*\
  43284. !*** E:/project/bigdata_WX/uview-ui/libs/function/guid.js ***!
  43285. \************************************************************/
  43286. /*! no static exports found */
  43287. /***/ (function(module, exports, __webpack_require__) {
  43288. "use strict";
  43289. Object.defineProperty(exports, "__esModule", {
  43290. value: true
  43291. });
  43292. exports.default = void 0;
  43293. /**
  43294. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  43295. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  43296. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  43297. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  43298. * v-for的时候,推荐使用后端返回的id而不是循环的index
  43299. * @param {Number} len uuid的长度
  43300. * @param {Boolean} firstU 将返回的首字母置为"u"
  43301. * @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  43302. */
  43303. function guid() {
  43304. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  43305. var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  43306. var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  43307. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  43308. var uuid = [];
  43309. radix = radix || chars.length;
  43310. if (len) {
  43311. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  43312. for (var i = 0; i < len; i++) {
  43313. uuid[i] = chars[0 | Math.random() * radix];
  43314. }
  43315. } else {
  43316. var r;
  43317. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  43318. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  43319. uuid[14] = '4';
  43320. for (var _i = 0; _i < 36; _i++) {
  43321. if (!uuid[_i]) {
  43322. r = 0 | Math.random() * 16;
  43323. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  43324. }
  43325. }
  43326. }
  43327. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guuid不能用作id或者class
  43328. if (firstU) {
  43329. uuid.shift();
  43330. return 'u' + uuid.join('');
  43331. } else {
  43332. return uuid.join('');
  43333. }
  43334. }
  43335. var _default = guid;
  43336. exports.default = _default;
  43337. /***/ }),
  43338. /***/ 48:
  43339. /*!*************************************************************!*\
  43340. !*** E:/project/bigdata_WX/uview-ui/libs/function/color.js ***!
  43341. \*************************************************************/
  43342. /*! no static exports found */
  43343. /***/ (function(module, exports, __webpack_require__) {
  43344. "use strict";
  43345. Object.defineProperty(exports, "__esModule", {
  43346. value: true
  43347. });
  43348. exports.default = void 0;
  43349. // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  43350. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  43351. var color = {
  43352. primary: "#2979ff",
  43353. primaryDark: "#2b85e4",
  43354. primaryDisabled: "#a0cfff",
  43355. primaryLight: "#ecf5ff",
  43356. bgColor: "#f3f4f6",
  43357. info: "#909399",
  43358. infoDark: "#82848a",
  43359. infoDisabled: "#c8c9cc",
  43360. infoLight: "#f4f4f5",
  43361. warning: "#ff9900",
  43362. warningDark: "#f29100",
  43363. warningDisabled: "#fcbd71",
  43364. warningLight: "#fdf6ec",
  43365. error: "#fa3534",
  43366. errorDark: "#dd6161",
  43367. errorDisabled: "#fab6b6",
  43368. errorLight: "#fef0f0",
  43369. success: "#19be6b",
  43370. successDark: "#18b566",
  43371. successDisabled: "#71d5a1",
  43372. successLight: "#dbf1e1",
  43373. mainColor: "#303133",
  43374. contentColor: "#606266",
  43375. tipsColor: "#909399",
  43376. lightColor: "#c0c4cc",
  43377. borderColor: "#e4e7ed"
  43378. };
  43379. var _default = color;
  43380. exports.default = _default;
  43381. /***/ }),
  43382. /***/ 49:
  43383. /*!*****************************************************************!*\
  43384. !*** E:/project/bigdata_WX/uview-ui/libs/function/type2icon.js ***!
  43385. \*****************************************************************/
  43386. /*! no static exports found */
  43387. /***/ (function(module, exports, __webpack_require__) {
  43388. "use strict";
  43389. Object.defineProperty(exports, "__esModule", {
  43390. value: true
  43391. });
  43392. exports.default = void 0;
  43393. /**
  43394. * 根据主题type值,获取对应的图标
  43395. * @param String type 主题名称,primary|info|error|warning|success
  43396. * @param String fill 是否使用fill填充实体的图标
  43397. */
  43398. function type2icon() {
  43399. var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';
  43400. var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  43401. // 如果非预置值,默认为success
  43402. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  43403. var iconName = '';
  43404. // 目前(2019-12-12),info和primary使用同一个图标
  43405. switch (type) {
  43406. case 'primary':
  43407. iconName = 'info-circle';
  43408. break;
  43409. case 'info':
  43410. iconName = 'info-circle';
  43411. break;
  43412. case 'error':
  43413. iconName = 'close-circle';
  43414. break;
  43415. case 'warning':
  43416. iconName = 'error-circle';
  43417. break;
  43418. case 'success':
  43419. iconName = 'checkmark-circle';
  43420. break;
  43421. default:
  43422. iconName = 'checkmark-circle';
  43423. }
  43424. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  43425. if (fill) iconName += '-fill';
  43426. return iconName;
  43427. }
  43428. var _default = type2icon;
  43429. exports.default = _default;
  43430. /***/ }),
  43431. /***/ 5:
  43432. /*!**************************************************************!*\
  43433. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  43434. \**************************************************************/
  43435. /*! no static exports found */
  43436. /***/ (function(module, exports, __webpack_require__) {
  43437. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  43438. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  43439. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  43440. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  43441. function _slicedToArray(arr, i) {
  43442. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  43443. }
  43444. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  43445. /***/ }),
  43446. /***/ 50:
  43447. /*!*******************************************************************!*\
  43448. !*** E:/project/bigdata_WX/uview-ui/libs/function/randomArray.js ***!
  43449. \*******************************************************************/
  43450. /*! no static exports found */
  43451. /***/ (function(module, exports, __webpack_require__) {
  43452. "use strict";
  43453. Object.defineProperty(exports, "__esModule", {
  43454. value: true
  43455. });
  43456. exports.default = void 0;
  43457. // 打乱数组
  43458. function randomArray() {
  43459. var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  43460. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  43461. return array.sort(function () {
  43462. return Math.random() - 0.5;
  43463. });
  43464. }
  43465. var _default = randomArray;
  43466. exports.default = _default;
  43467. /***/ }),
  43468. /***/ 51:
  43469. /*!***************************************************************!*\
  43470. !*** E:/project/bigdata_WX/uview-ui/libs/function/addUnit.js ***!
  43471. \***************************************************************/
  43472. /*! no static exports found */
  43473. /***/ (function(module, exports, __webpack_require__) {
  43474. "use strict";
  43475. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  43476. Object.defineProperty(exports, "__esModule", {
  43477. value: true
  43478. });
  43479. exports.default = addUnit;
  43480. var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 38));
  43481. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  43482. function addUnit() {
  43483. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';
  43484. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  43485. value = String(value);
  43486. // 用uView内置验证规则中的number判断是否为数值
  43487. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  43488. }
  43489. /***/ }),
  43490. /***/ 52:
  43491. /*!**************************************************************!*\
  43492. !*** E:/project/bigdata_WX/uview-ui/libs/function/random.js ***!
  43493. \**************************************************************/
  43494. /*! no static exports found */
  43495. /***/ (function(module, exports, __webpack_require__) {
  43496. "use strict";
  43497. Object.defineProperty(exports, "__esModule", {
  43498. value: true
  43499. });
  43500. exports.default = void 0;
  43501. function random(min, max) {
  43502. if (min >= 0 && max > 0 && max >= min) {
  43503. var gab = max - min + 1;
  43504. return Math.floor(Math.random() * gab + min);
  43505. } else {
  43506. return 0;
  43507. }
  43508. }
  43509. var _default = random;
  43510. exports.default = _default;
  43511. /***/ }),
  43512. /***/ 53:
  43513. /*!************************************************************!*\
  43514. !*** E:/project/bigdata_WX/uview-ui/libs/function/trim.js ***!
  43515. \************************************************************/
  43516. /*! no static exports found */
  43517. /***/ (function(module, exports, __webpack_require__) {
  43518. "use strict";
  43519. Object.defineProperty(exports, "__esModule", {
  43520. value: true
  43521. });
  43522. exports.default = void 0;
  43523. function trim(str) {
  43524. var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  43525. if (pos == 'both') {
  43526. return str.replace(/^\s+|\s+$/g, "");
  43527. } else if (pos == "left") {
  43528. return str.replace(/^\s*/, '');
  43529. } else if (pos == 'right') {
  43530. return str.replace(/(\s*$)/g, "");
  43531. } else if (pos == 'all') {
  43532. return str.replace(/\s+/g, "");
  43533. } else {
  43534. return str;
  43535. }
  43536. }
  43537. var _default = trim;
  43538. exports.default = _default;
  43539. /***/ }),
  43540. /***/ 54:
  43541. /*!*************************************************************!*\
  43542. !*** E:/project/bigdata_WX/uview-ui/libs/function/toast.js ***!
  43543. \*************************************************************/
  43544. /*! no static exports found */
  43545. /***/ (function(module, exports, __webpack_require__) {
  43546. "use strict";
  43547. /* WEBPACK VAR INJECTION */(function(uni) {
  43548. Object.defineProperty(exports, "__esModule", {
  43549. value: true
  43550. });
  43551. exports.default = void 0;
  43552. function toast(title) {
  43553. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  43554. uni.showToast({
  43555. title: title,
  43556. icon: 'none',
  43557. duration: duration
  43558. });
  43559. }
  43560. var _default = toast;
  43561. exports.default = _default;
  43562. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  43563. /***/ }),
  43564. /***/ 55:
  43565. /*!*****************************************************************!*\
  43566. !*** E:/project/bigdata_WX/uview-ui/libs/function/getParent.js ***!
  43567. \*****************************************************************/
  43568. /*! no static exports found */
  43569. /***/ (function(module, exports, __webpack_require__) {
  43570. "use strict";
  43571. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  43572. Object.defineProperty(exports, "__esModule", {
  43573. value: true
  43574. });
  43575. exports.default = getParent;
  43576. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  43577. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  43578. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  43579. function getParent(name, keys) {
  43580. var parent = this.$parent;
  43581. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  43582. while (parent) {
  43583. // 父组件
  43584. if (parent.$options.name !== name) {
  43585. // 如果组件的name不相等,继续上一级寻找
  43586. parent = parent.$parent;
  43587. } else {
  43588. var _ret = function () {
  43589. var data = {};
  43590. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  43591. if (Array.isArray(keys)) {
  43592. keys.map(function (val) {
  43593. data[val] = parent[val] ? parent[val] : '';
  43594. });
  43595. } else {
  43596. // 历遍传过来的对象参数
  43597. for (var i in keys) {
  43598. // 如果子组件有此值则用,无此值则用父组件的值
  43599. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  43600. if (Array.isArray(keys[i])) {
  43601. if (keys[i].length) {
  43602. data[i] = keys[i];
  43603. } else {
  43604. data[i] = parent[i];
  43605. }
  43606. } else if (keys[i].constructor === Object) {
  43607. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  43608. if (Object.keys(keys[i]).length) {
  43609. data[i] = keys[i];
  43610. } else {
  43611. data[i] = parent[i];
  43612. }
  43613. } else {
  43614. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  43615. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  43616. }
  43617. }
  43618. }
  43619. return {
  43620. v: data
  43621. };
  43622. }();
  43623. if ((0, _typeof2.default)(_ret) === "object") return _ret.v;
  43624. }
  43625. }
  43626. return {};
  43627. }
  43628. /***/ }),
  43629. /***/ 56:
  43630. /*!***************************************************************!*\
  43631. !*** E:/project/bigdata_WX/uview-ui/libs/function/$parent.js ***!
  43632. \***************************************************************/
  43633. /*! no static exports found */
  43634. /***/ (function(module, exports, __webpack_require__) {
  43635. "use strict";
  43636. Object.defineProperty(exports, "__esModule", {
  43637. value: true
  43638. });
  43639. exports.default = $parent;
  43640. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  43641. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  43642. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  43643. // 值(默认为undefined),就是查找最顶层的$parent
  43644. function $parent() {
  43645. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  43646. var parent = this.$parent;
  43647. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  43648. while (parent) {
  43649. // 父组件
  43650. if (parent.$options && parent.$options.name !== name) {
  43651. // 如果组件的name不相等,继续上一级寻找
  43652. parent = parent.$parent;
  43653. } else {
  43654. return parent;
  43655. }
  43656. }
  43657. return false;
  43658. }
  43659. /***/ }),
  43660. /***/ 57:
  43661. /*!***********************************************************!*\
  43662. !*** E:/project/bigdata_WX/uview-ui/libs/function/sys.js ***!
  43663. \***********************************************************/
  43664. /*! no static exports found */
  43665. /***/ (function(module, exports, __webpack_require__) {
  43666. "use strict";
  43667. /* WEBPACK VAR INJECTION */(function(uni) {
  43668. Object.defineProperty(exports, "__esModule", {
  43669. value: true
  43670. });
  43671. exports.os = os;
  43672. exports.sys = sys;
  43673. function os() {
  43674. return uni.getSystemInfoSync().platform;
  43675. }
  43676. ;
  43677. function sys() {
  43678. return uni.getSystemInfoSync();
  43679. }
  43680. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  43681. /***/ }),
  43682. /***/ 58:
  43683. /*!****************************************************************!*\
  43684. !*** E:/project/bigdata_WX/uview-ui/libs/function/debounce.js ***!
  43685. \****************************************************************/
  43686. /*! no static exports found */
  43687. /***/ (function(module, exports, __webpack_require__) {
  43688. "use strict";
  43689. Object.defineProperty(exports, "__esModule", {
  43690. value: true
  43691. });
  43692. exports.default = void 0;
  43693. var timeout = null;
  43694. /**
  43695. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  43696. *
  43697. * @param {Function} func 要执行的回调函数
  43698. * @param {Number} wait 延时的时间
  43699. * @param {Boolean} immediate 是否立即执行
  43700. * @return null
  43701. */
  43702. function debounce(func) {
  43703. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  43704. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  43705. // 清除定时器
  43706. if (timeout !== null) clearTimeout(timeout);
  43707. // 立即执行,此类情况一般用不到
  43708. if (immediate) {
  43709. var callNow = !timeout;
  43710. timeout = setTimeout(function () {
  43711. timeout = null;
  43712. }, wait);
  43713. if (callNow) typeof func === 'function' && func();
  43714. } else {
  43715. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  43716. timeout = setTimeout(function () {
  43717. typeof func === 'function' && func();
  43718. }, wait);
  43719. }
  43720. }
  43721. var _default = debounce;
  43722. exports.default = _default;
  43723. /***/ }),
  43724. /***/ 59:
  43725. /*!****************************************************************!*\
  43726. !*** E:/project/bigdata_WX/uview-ui/libs/function/throttle.js ***!
  43727. \****************************************************************/
  43728. /*! no static exports found */
  43729. /***/ (function(module, exports, __webpack_require__) {
  43730. "use strict";
  43731. Object.defineProperty(exports, "__esModule", {
  43732. value: true
  43733. });
  43734. exports.default = void 0;
  43735. var timer, flag;
  43736. /**
  43737. * 节流原理:在一定时间内,只能触发一次
  43738. *
  43739. * @param {Function} func 要执行的回调函数
  43740. * @param {Number} wait 延时的时间
  43741. * @param {Boolean} immediate 是否立即执行
  43742. * @return null
  43743. */
  43744. function throttle(func) {
  43745. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  43746. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  43747. if (immediate) {
  43748. if (!flag) {
  43749. flag = true;
  43750. // 如果是立即执行,则在wait毫秒内开始时执行
  43751. typeof func === 'function' && func();
  43752. timer = setTimeout(function () {
  43753. flag = false;
  43754. }, wait);
  43755. }
  43756. } else {
  43757. if (!flag) {
  43758. flag = true;
  43759. // 如果是非立即执行,则在wait毫秒内的结束处执行
  43760. timer = setTimeout(function () {
  43761. flag = false;
  43762. typeof func === 'function' && func();
  43763. }, wait);
  43764. }
  43765. }
  43766. }
  43767. ;
  43768. var _default = throttle;
  43769. exports.default = _default;
  43770. /***/ }),
  43771. /***/ 6:
  43772. /*!***************************************************************!*\
  43773. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  43774. \***************************************************************/
  43775. /*! no static exports found */
  43776. /***/ (function(module, exports) {
  43777. function _arrayWithHoles(arr) {
  43778. if (Array.isArray(arr)) return arr;
  43779. }
  43780. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  43781. /***/ }),
  43782. /***/ 60:
  43783. /*!************************************************************!*\
  43784. !*** E:/project/bigdata_WX/uview-ui/libs/config/config.js ***!
  43785. \************************************************************/
  43786. /*! no static exports found */
  43787. /***/ (function(module, exports, __webpack_require__) {
  43788. "use strict";
  43789. Object.defineProperty(exports, "__esModule", {
  43790. value: true
  43791. });
  43792. exports.default = void 0;
  43793. // 此版本发布于2020-11-16
  43794. var version = '1.8.1';
  43795. var _default = {
  43796. v: version,
  43797. version: version,
  43798. // 主题名称
  43799. type: ['primary', 'success', 'info', 'error', 'warning']
  43800. };
  43801. exports.default = _default;
  43802. /***/ }),
  43803. /***/ 61:
  43804. /*!************************************************************!*\
  43805. !*** E:/project/bigdata_WX/uview-ui/libs/config/zIndex.js ***!
  43806. \************************************************************/
  43807. /*! no static exports found */
  43808. /***/ (function(module, exports, __webpack_require__) {
  43809. "use strict";
  43810. Object.defineProperty(exports, "__esModule", {
  43811. value: true
  43812. });
  43813. exports.default = void 0;
  43814. // uniapp在H5中各API的z-index值如下:
  43815. /**
  43816. * actionsheet: 999
  43817. * modal: 999
  43818. * navigate: 998
  43819. * tabbar: 998
  43820. * toast: 999
  43821. */
  43822. var _default = {
  43823. toast: 10090,
  43824. noNetwork: 10080,
  43825. // popup包含popup,actionsheet,keyboard,picker的值
  43826. popup: 10075,
  43827. mask: 10070,
  43828. navbar: 980,
  43829. topTips: 975,
  43830. sticky: 970,
  43831. indexListSticky: 965
  43832. };
  43833. exports.default = _default;
  43834. /***/ }),
  43835. /***/ 62:
  43836. /*!*****************************************!*\
  43837. !*** E:/project/bigdata_WX/util/api.js ***!
  43838. \*****************************************/
  43839. /*! no static exports found */
  43840. /***/ (function(module, exports, __webpack_require__) {
  43841. "use strict";
  43842. /* WEBPACK VAR INJECTION */(function(uni) {
  43843. Object.defineProperty(exports, "__esModule", {
  43844. value: true
  43845. });
  43846. exports.myRequest = void 0;
  43847. // let BASE_URL = 'http://114.115.147.140:8002'
  43848. // const BASE_URL='http://8.136.98.49:8002'
  43849. // let BASE_URL = 'http://192.168.0.36:8003'
  43850. var BASE_URL = 'https://wx.hnyfwlw.com';
  43851. var myRequest = function myRequest(options) {
  43852. // BASE_URL=uni.getStorageSync('http')
  43853. // if(BASE_URL==''){
  43854. // BASE_URL = 'https://wx.hnyfwlw.com/'
  43855. // }
  43856. // console.log(BASE_URL)
  43857. var session_key = "";
  43858. session_key = uni.getStorageSync('session_key');
  43859. var url = options.url;
  43860. var data = options.data || {};
  43861. if (url != 'user.login.login_user' && url != 'pest.pests.insect_discern' && url != 'pest.pests.plant_discern' && url != 'pest.pests.pests_contrast' && url != 'pest.pests.pests_expert_img' && url != 'pest.pests.pests_img' && url != 'recognizationSys' && url != 'base.bases.base_photo' && url != 'pest.warning_record.rolemanage_img' && url != 'home.homes.personal_photo' && url != 'ascend.ascend_manage.product_info' && url != 'ascend.ascend_manage.quality_info' && url != 'ascend.ascend_manage.grow_info' && url != 'ascend.ascend_manage.all_ascend' && url != 'after_sale.after_sale_manage.device_check' && url != 'after_sale.after_sale_manage.aftersale_apply') {
  43862. data.token = session_key;
  43863. }
  43864. return new Promise(function (resolve, reject) {
  43865. uni.request({
  43866. url: BASE_URL + options.url,
  43867. method: options.method || 'POST',
  43868. header: {
  43869. "Content-Type": "application/x-www-form-urlencoded"
  43870. },
  43871. data: data,
  43872. success: function success(res) {
  43873. if (res.data.message) {
  43874. if (res.data.message !== "识别无结果" && res.data.message !== "该设备未绑定SIM") {
  43875. return uni.showToast({
  43876. title: res.data.message,
  43877. icon: "none"
  43878. });
  43879. } else {
  43880. resolve(res.data.data);
  43881. }
  43882. }
  43883. resolve(res.data.data);
  43884. },
  43885. fail: function fail(err) {
  43886. uni.showToast({
  43887. title: '请求接口失败'
  43888. });
  43889. reject(err);
  43890. }
  43891. });
  43892. });
  43893. };
  43894. exports.myRequest = myRequest;
  43895. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  43896. /***/ }),
  43897. /***/ 63:
  43898. /*!*****************************************************!*\
  43899. !*** E:/project/bigdata_WX/util/QueryPermission.js ***!
  43900. \*****************************************************/
  43901. /*! no static exports found */
  43902. /***/ (function(module, exports, __webpack_require__) {
  43903. "use strict";
  43904. /* WEBPACK VAR INJECTION */(function(uni) {
  43905. Object.defineProperty(exports, "__esModule", {
  43906. value: true
  43907. });
  43908. exports.QueryPermission = QueryPermission;
  43909. var list = [];
  43910. function QueryPermission(id) {
  43911. uni.getStorage({
  43912. key: "jurisdiction",
  43913. success: function success(res) {
  43914. list = JSON.parse(res.data);
  43915. }
  43916. });
  43917. // console.log(list)
  43918. for (var i = 0; i < list.length; i++) {
  43919. if (list[i].children) {
  43920. var data = list[i].children;
  43921. for (var j = 0; j < data.length; j++) {
  43922. if (data[j].children) {
  43923. var item = data[j].children;
  43924. for (var k = 0; k < item.length; k++) {
  43925. if (item[k].pur_id == id) {
  43926. return true;
  43927. }
  43928. }
  43929. }
  43930. }
  43931. }
  43932. }
  43933. return false;
  43934. }
  43935. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  43936. /***/ }),
  43937. /***/ 7:
  43938. /*!*********************************************************************!*\
  43939. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  43940. \*********************************************************************/
  43941. /*! no static exports found */
  43942. /***/ (function(module, exports) {
  43943. function _iterableToArrayLimit(r, l) {
  43944. var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  43945. if (null != t) {
  43946. var e,
  43947. n,
  43948. i,
  43949. u,
  43950. a = [],
  43951. f = !0,
  43952. o = !1;
  43953. try {
  43954. if (i = (t = t.call(r)).next, 0 === l) {
  43955. if (Object(t) !== t) return;
  43956. f = !1;
  43957. } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) {
  43958. ;
  43959. }
  43960. } catch (r) {
  43961. o = !0, n = r;
  43962. } finally {
  43963. try {
  43964. if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
  43965. } finally {
  43966. if (o) throw n;
  43967. }
  43968. }
  43969. return a;
  43970. }
  43971. }
  43972. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  43973. /***/ }),
  43974. /***/ 75:
  43975. /*!*******************************************************************!*\
  43976. !*** E:/project/bigdata_WX/components/jsencrypt/jsencrypt.min.js ***!
  43977. \*******************************************************************/
  43978. /*! no static exports found */
  43979. /***/ (function(module, exports, __webpack_require__) {
  43980. /* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  43981. var CryptoJS = CryptoJS || function (a, b) {
  43982. var c, e, f, g, h, i, j, k, l, m, n, o, q;
  43983. if (!c && "undefined" != typeof global && global.crypto && (c = global.crypto), !c && "function" == "function") try {
  43984. c = __webpack_require__(/*! crypto */ 76);
  43985. } catch (d) {}
  43986. return e = function e() {
  43987. if (c) {
  43988. if ("function" == typeof c.getRandomValues) try {
  43989. return c.getRandomValues(new Uint32Array(1))[0];
  43990. } catch (a) {}
  43991. if ("function" == typeof c.randomBytes) try {
  43992. return c.randomBytes(4).readInt32LE();
  43993. } catch (a) {}
  43994. }
  43995. throw new Error("Native crypto module could not be used to get secure random number.");
  43996. }, f = Object.create || function () {
  43997. function a() {}
  43998. return function (b) {
  43999. var c;
  44000. return a.prototype = b, c = new a(), a.prototype = null, c;
  44001. };
  44002. }(), g = {}, h = g.lib = {}, i = h.Base = function () {
  44003. return {
  44004. extend: function extend(a) {
  44005. var b = f(this);
  44006. return a && b.mixIn(a), b.hasOwnProperty("init") && this.init !== b.init || (b.init = function () {
  44007. b.$super.init.apply(this, arguments);
  44008. }), b.init.prototype = b, b.$super = this, b;
  44009. },
  44010. create: function create() {
  44011. var a = this.extend();
  44012. return a.init.apply(a, arguments), a;
  44013. },
  44014. init: function init() {},
  44015. mixIn: function mixIn(a) {
  44016. for (var b in a) {
  44017. a.hasOwnProperty(b) && (this[b] = a[b]);
  44018. }
  44019. a.hasOwnProperty("toString") && (this.toString = a.toString);
  44020. },
  44021. clone: function clone() {
  44022. return this.init.prototype.extend(this);
  44023. }
  44024. };
  44025. }(), j = h.WordArray = i.extend({
  44026. init: function init(a, c) {
  44027. a = this.words = a || [], this.sigBytes = c != b ? c : 4 * a.length;
  44028. },
  44029. toString: function toString(a) {
  44030. return (a || l).stringify(this);
  44031. },
  44032. concat: function concat(a) {
  44033. var f,
  44034. g,
  44035. b = this.words,
  44036. c = a.words,
  44037. d = this.sigBytes,
  44038. e = a.sigBytes;
  44039. if (this.clamp(), d % 4) for (f = 0; e > f; f++) {
  44040. g = 255 & c[f >>> 2] >>> 24 - 8 * (f % 4), b[d + f >>> 2] |= g << 24 - 8 * ((d + f) % 4);
  44041. } else for (f = 0; e > f; f += 4) {
  44042. b[d + f >>> 2] = c[f >>> 2];
  44043. }
  44044. return this.sigBytes += e, this;
  44045. },
  44046. clamp: function clamp() {
  44047. var b = this.words,
  44048. c = this.sigBytes;
  44049. b[c >>> 2] &= 4294967295 << 32 - 8 * (c % 4), b.length = a.ceil(c / 4);
  44050. },
  44051. clone: function clone() {
  44052. var a = i.clone.call(this);
  44053. return a.words = this.words.slice(0), a;
  44054. },
  44055. random: function random(a) {
  44056. var c,
  44057. b = [];
  44058. for (c = 0; a > c; c += 4) {
  44059. b.push(e());
  44060. }
  44061. return new j.init(b, a);
  44062. }
  44063. }), k = g.enc = {}, l = k.Hex = {
  44064. stringify: function stringify(a) {
  44065. var e,
  44066. f,
  44067. b = a.words,
  44068. c = a.sigBytes,
  44069. d = [];
  44070. for (e = 0; c > e; e++) {
  44071. f = 255 & b[e >>> 2] >>> 24 - 8 * (e % 4), d.push((f >>> 4).toString(16)), d.push((15 & f).toString(16));
  44072. }
  44073. return d.join("");
  44074. },
  44075. parse: function parse(a) {
  44076. var d,
  44077. b = a.length,
  44078. c = [];
  44079. for (d = 0; b > d; d += 2) {
  44080. c[d >>> 3] |= parseInt(a.substr(d, 2), 16) << 24 - 4 * (d % 8);
  44081. }
  44082. return new j.init(c, b / 2);
  44083. }
  44084. }, m = k.Latin1 = {
  44085. stringify: function stringify(a) {
  44086. var e,
  44087. f,
  44088. b = a.words,
  44089. c = a.sigBytes,
  44090. d = [];
  44091. for (e = 0; c > e; e++) {
  44092. f = 255 & b[e >>> 2] >>> 24 - 8 * (e % 4), d.push(String.fromCharCode(f));
  44093. }
  44094. return d.join("");
  44095. },
  44096. parse: function parse(a) {
  44097. var d,
  44098. b = a.length,
  44099. c = [];
  44100. for (d = 0; b > d; d++) {
  44101. c[d >>> 2] |= (255 & a.charCodeAt(d)) << 24 - 8 * (d % 4);
  44102. }
  44103. return new j.init(c, b);
  44104. }
  44105. }, n = k.Utf8 = {
  44106. stringify: function stringify(a) {
  44107. try {
  44108. return decodeURIComponent(escape(m.stringify(a)));
  44109. } catch (b) {
  44110. throw new Error("Malformed UTF-8 data");
  44111. }
  44112. },
  44113. parse: function parse(a) {
  44114. return m.parse(unescape(encodeURIComponent(a)));
  44115. }
  44116. }, o = h.BufferedBlockAlgorithm = i.extend({
  44117. reset: function reset() {
  44118. this._data = new j.init(), this._nDataBytes = 0;
  44119. },
  44120. _append: function _append(a) {
  44121. "string" == typeof a && (a = n.parse(a)), this._data.concat(a), this._nDataBytes += a.sigBytes;
  44122. },
  44123. _process: function _process(b) {
  44124. var c,
  44125. k,
  44126. l,
  44127. m,
  44128. d = this._data,
  44129. e = d.words,
  44130. f = d.sigBytes,
  44131. g = this.blockSize,
  44132. h = 4 * g,
  44133. i = f / h;
  44134. if (i = b ? a.ceil(i) : a.max((0 | i) - this._minBufferSize, 0), k = i * g, l = a.min(4 * k, f), k) {
  44135. for (m = 0; k > m; m += g) {
  44136. this._doProcessBlock(e, m);
  44137. }
  44138. c = e.splice(0, k), d.sigBytes -= l;
  44139. }
  44140. return new j.init(c, l);
  44141. },
  44142. clone: function clone() {
  44143. var a = i.clone.call(this);
  44144. return a._data = this._data.clone(), a;
  44145. },
  44146. _minBufferSize: 0
  44147. }), h.Hasher = o.extend({
  44148. cfg: i.extend(),
  44149. init: function init(a) {
  44150. this.cfg = this.cfg.extend(a), this.reset();
  44151. },
  44152. reset: function reset() {
  44153. o.reset.call(this), this._doReset();
  44154. },
  44155. update: function update(a) {
  44156. return this._append(a), this._process(), this;
  44157. },
  44158. finalize: function finalize(a) {
  44159. a && this._append(a);
  44160. var b = this._doFinalize();
  44161. return b;
  44162. },
  44163. blockSize: 16,
  44164. _createHelper: function _createHelper(a) {
  44165. return function (b, c) {
  44166. return new a.init(c).finalize(b);
  44167. };
  44168. },
  44169. _createHmacHelper: function _createHmacHelper(a) {
  44170. return function (b, c) {
  44171. return new q.HMAC.init(a, c).finalize(b);
  44172. };
  44173. }
  44174. }), q = g.algo = {}, g;
  44175. }(Math);
  44176. !function () {
  44177. function f(a, b, d) {
  44178. var g,
  44179. h,
  44180. i,
  44181. j,
  44182. e = [],
  44183. f = 0;
  44184. for (g = 0; b > g; g++) {
  44185. g % 4 && (h = d[a.charCodeAt(g - 1)] << 2 * (g % 4), i = d[a.charCodeAt(g)] >>> 6 - 2 * (g % 4), j = h | i, e[f >>> 2] |= j << 24 - 8 * (f % 4), f++);
  44186. }
  44187. return c.create(e, f);
  44188. }
  44189. var a = CryptoJS,
  44190. b = a.lib,
  44191. c = b.WordArray,
  44192. d = a.enc;
  44193. d.Base64 = {
  44194. stringify: function stringify(a) {
  44195. var e,
  44196. f,
  44197. g,
  44198. h,
  44199. i,
  44200. j,
  44201. k,
  44202. l,
  44203. b = a.words,
  44204. c = a.sigBytes,
  44205. d = this._map;
  44206. for (a.clamp(), e = [], f = 0; c > f; f += 3) {
  44207. for (g = 255 & b[f >>> 2] >>> 24 - 8 * (f % 4), h = 255 & b[f + 1 >>> 2] >>> 24 - 8 * ((f + 1) % 4), i = 255 & b[f + 2 >>> 2] >>> 24 - 8 * ((f + 2) % 4), j = g << 16 | h << 8 | i, k = 0; 4 > k && c > f + .75 * k; k++) {
  44208. e.push(d.charAt(63 & j >>> 6 * (3 - k)));
  44209. }
  44210. }
  44211. if (l = d.charAt(64)) for (; e.length % 4;) {
  44212. e.push(l);
  44213. }
  44214. return e.join("");
  44215. },
  44216. parse: function parse(a) {
  44217. var e,
  44218. g,
  44219. h,
  44220. b = a.length,
  44221. c = this._map,
  44222. d = this._reverseMap;
  44223. if (!d) for (d = this._reverseMap = [], e = 0; e < c.length; e++) {
  44224. d[c.charCodeAt(e)] = e;
  44225. }
  44226. return g = c.charAt(64), g && (h = a.indexOf(g), -1 !== h && (b = h)), f(a, b, d);
  44227. },
  44228. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  44229. };
  44230. }(), function (a) {
  44231. function i(a, b, c, d, e, f, g) {
  44232. var h = a + (b & c | ~b & d) + e + g;
  44233. return (h << f | h >>> 32 - f) + b;
  44234. }
  44235. function j(a, b, c, d, e, f, g) {
  44236. var h = a + (b & d | c & ~d) + e + g;
  44237. return (h << f | h >>> 32 - f) + b;
  44238. }
  44239. function k(a, b, c, d, e, f, g) {
  44240. var h = a + (b ^ c ^ d) + e + g;
  44241. return (h << f | h >>> 32 - f) + b;
  44242. }
  44243. function l(a, b, c, d, e, f, g) {
  44244. var h = a + (c ^ (b | ~d)) + e + g;
  44245. return (h << f | h >>> 32 - f) + b;
  44246. }
  44247. var h,
  44248. b = CryptoJS,
  44249. c = b.lib,
  44250. d = c.WordArray,
  44251. e = c.Hasher,
  44252. f = b.algo,
  44253. g = [];
  44254. !function () {
  44255. for (var b = 0; 64 > b; b++) {
  44256. g[b] = 0 | 4294967296 * a.abs(a.sin(b + 1));
  44257. }
  44258. }(), h = f.MD5 = e.extend({
  44259. _doReset: function _doReset() {
  44260. this._hash = new d.init([1732584193, 4023233417, 2562383102, 271733878]);
  44261. },
  44262. _doProcessBlock: function _doProcessBlock(a, b) {
  44263. var c, d, e, f, h, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E;
  44264. for (c = 0; 16 > c; c++) {
  44265. d = b + c, e = a[d], a[d] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8);
  44266. }
  44267. f = this._hash.words, h = a[b + 0], m = a[b + 1], n = a[b + 2], o = a[b + 3], p = a[b + 4], q = a[b + 5], r = a[b + 6], s = a[b + 7], t = a[b + 8], u = a[b + 9], v = a[b + 10], w = a[b + 11], x = a[b + 12], y = a[b + 13], z = a[b + 14], A = a[b + 15], B = f[0], C = f[1], D = f[2], E = f[3], B = i(B, C, D, E, h, 7, g[0]), E = i(E, B, C, D, m, 12, g[1]), D = i(D, E, B, C, n, 17, g[2]), C = i(C, D, E, B, o, 22, g[3]), B = i(B, C, D, E, p, 7, g[4]), E = i(E, B, C, D, q, 12, g[5]), D = i(D, E, B, C, r, 17, g[6]), C = i(C, D, E, B, s, 22, g[7]), B = i(B, C, D, E, t, 7, g[8]), E = i(E, B, C, D, u, 12, g[9]), D = i(D, E, B, C, v, 17, g[10]), C = i(C, D, E, B, w, 22, g[11]), B = i(B, C, D, E, x, 7, g[12]), E = i(E, B, C, D, y, 12, g[13]), D = i(D, E, B, C, z, 17, g[14]), C = i(C, D, E, B, A, 22, g[15]), B = j(B, C, D, E, m, 5, g[16]), E = j(E, B, C, D, r, 9, g[17]), D = j(D, E, B, C, w, 14, g[18]), C = j(C, D, E, B, h, 20, g[19]), B = j(B, C, D, E, q, 5, g[20]), E = j(E, B, C, D, v, 9, g[21]), D = j(D, E, B, C, A, 14, g[22]), C = j(C, D, E, B, p, 20, g[23]), B = j(B, C, D, E, u, 5, g[24]), E = j(E, B, C, D, z, 9, g[25]), D = j(D, E, B, C, o, 14, g[26]), C = j(C, D, E, B, t, 20, g[27]), B = j(B, C, D, E, y, 5, g[28]), E = j(E, B, C, D, n, 9, g[29]), D = j(D, E, B, C, s, 14, g[30]), C = j(C, D, E, B, x, 20, g[31]), B = k(B, C, D, E, q, 4, g[32]), E = k(E, B, C, D, t, 11, g[33]), D = k(D, E, B, C, w, 16, g[34]), C = k(C, D, E, B, z, 23, g[35]), B = k(B, C, D, E, m, 4, g[36]), E = k(E, B, C, D, p, 11, g[37]), D = k(D, E, B, C, s, 16, g[38]), C = k(C, D, E, B, v, 23, g[39]), B = k(B, C, D, E, y, 4, g[40]), E = k(E, B, C, D, h, 11, g[41]), D = k(D, E, B, C, o, 16, g[42]), C = k(C, D, E, B, r, 23, g[43]), B = k(B, C, D, E, u, 4, g[44]), E = k(E, B, C, D, x, 11, g[45]), D = k(D, E, B, C, A, 16, g[46]), C = k(C, D, E, B, n, 23, g[47]), B = l(B, C, D, E, h, 6, g[48]), E = l(E, B, C, D, s, 10, g[49]), D = l(D, E, B, C, z, 15, g[50]), C = l(C, D, E, B, q, 21, g[51]), B = l(B, C, D, E, x, 6, g[52]), E = l(E, B, C, D, o, 10, g[53]), D = l(D, E, B, C, v, 15, g[54]), C = l(C, D, E, B, m, 21, g[55]), B = l(B, C, D, E, t, 6, g[56]), E = l(E, B, C, D, A, 10, g[57]), D = l(D, E, B, C, r, 15, g[58]), C = l(C, D, E, B, y, 21, g[59]), B = l(B, C, D, E, p, 6, g[60]), E = l(E, B, C, D, w, 10, g[61]), D = l(D, E, B, C, n, 15, g[62]), C = l(C, D, E, B, u, 21, g[63]), f[0] = 0 | f[0] + B, f[1] = 0 | f[1] + C, f[2] = 0 | f[2] + D, f[3] = 0 | f[3] + E;
  44268. },
  44269. _doFinalize: function _doFinalize() {
  44270. var f,
  44271. g,
  44272. h,
  44273. i,
  44274. j,
  44275. k,
  44276. b = this._data,
  44277. c = b.words,
  44278. d = 8 * this._nDataBytes,
  44279. e = 8 * b.sigBytes;
  44280. for (c[e >>> 5] |= 128 << 24 - e % 32, f = a.floor(d / 4294967296), g = d, c[(e + 64 >>> 9 << 4) + 15] = 16711935 & (f << 8 | f >>> 24) | 4278255360 & (f << 24 | f >>> 8), c[(e + 64 >>> 9 << 4) + 14] = 16711935 & (g << 8 | g >>> 24) | 4278255360 & (g << 24 | g >>> 8), b.sigBytes = 4 * (c.length + 1), this._process(), h = this._hash, i = h.words, j = 0; 4 > j; j++) {
  44281. k = i[j], i[j] = 16711935 & (k << 8 | k >>> 24) | 4278255360 & (k << 24 | k >>> 8);
  44282. }
  44283. return h;
  44284. },
  44285. clone: function clone() {
  44286. var a = e.clone.call(this);
  44287. return a._hash = this._hash.clone(), a;
  44288. }
  44289. }), b.MD5 = e._createHelper(h), b.HmacMD5 = e._createHmacHelper(h);
  44290. }(Math), function () {
  44291. var a = CryptoJS,
  44292. b = a.lib,
  44293. c = b.WordArray,
  44294. d = b.Hasher,
  44295. e = a.algo,
  44296. f = [],
  44297. g = e.SHA1 = d.extend({
  44298. _doReset: function _doReset() {
  44299. this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
  44300. },
  44301. _doProcessBlock: function _doProcessBlock(a, b) {
  44302. var j,
  44303. k,
  44304. l,
  44305. c = this._hash.words,
  44306. d = c[0],
  44307. e = c[1],
  44308. g = c[2],
  44309. h = c[3],
  44310. i = c[4];
  44311. for (j = 0; 80 > j; j++) {
  44312. 16 > j ? f[j] = 0 | a[b + j] : (k = f[j - 3] ^ f[j - 8] ^ f[j - 14] ^ f[j - 16], f[j] = k << 1 | k >>> 31), l = (d << 5 | d >>> 27) + i + f[j], l += 20 > j ? (e & g | ~e & h) + 1518500249 : 40 > j ? (e ^ g ^ h) + 1859775393 : 60 > j ? (e & g | e & h | g & h) - 1894007588 : (e ^ g ^ h) - 899497514, i = h, h = g, g = e << 30 | e >>> 2, e = d, d = l;
  44313. }
  44314. c[0] = 0 | c[0] + d, c[1] = 0 | c[1] + e, c[2] = 0 | c[2] + g, c[3] = 0 | c[3] + h, c[4] = 0 | c[4] + i;
  44315. },
  44316. _doFinalize: function _doFinalize() {
  44317. var a = this._data,
  44318. b = a.words,
  44319. c = 8 * this._nDataBytes,
  44320. d = 8 * a.sigBytes;
  44321. return b[d >>> 5] |= 128 << 24 - d % 32, b[(d + 64 >>> 9 << 4) + 14] = Math.floor(c / 4294967296), b[(d + 64 >>> 9 << 4) + 15] = c, a.sigBytes = 4 * b.length, this._process(), this._hash;
  44322. },
  44323. clone: function clone() {
  44324. var a = d.clone.call(this);
  44325. return a._hash = this._hash.clone(), a;
  44326. }
  44327. });
  44328. a.SHA1 = d._createHelper(g), a.HmacSHA1 = d._createHmacHelper(g);
  44329. }(), function (a) {
  44330. var i,
  44331. j,
  44332. b = CryptoJS,
  44333. c = b.lib,
  44334. d = c.WordArray,
  44335. e = c.Hasher,
  44336. f = b.algo,
  44337. g = [],
  44338. h = [];
  44339. !function () {
  44340. function b(b) {
  44341. var d,
  44342. c = a.sqrt(b);
  44343. for (d = 2; c >= d; d++) {
  44344. if (!(b % d)) return !1;
  44345. }
  44346. return !0;
  44347. }
  44348. function c(a) {
  44349. return 0 | 4294967296 * (a - (0 | a));
  44350. }
  44351. for (var d = 2, e = 0; 64 > e;) {
  44352. b(d) && (8 > e && (g[e] = c(a.pow(d, .5))), h[e] = c(a.pow(d, 1 / 3)), e++), d++;
  44353. }
  44354. }(), i = [], j = f.SHA256 = e.extend({
  44355. _doReset: function _doReset() {
  44356. this._hash = new d.init(g.slice(0));
  44357. },
  44358. _doProcessBlock: function _doProcessBlock(a, b) {
  44359. var n,
  44360. o,
  44361. p,
  44362. q,
  44363. r,
  44364. s,
  44365. t,
  44366. u,
  44367. v,
  44368. w,
  44369. x,
  44370. c = this._hash.words,
  44371. d = c[0],
  44372. e = c[1],
  44373. f = c[2],
  44374. g = c[3],
  44375. j = c[4],
  44376. k = c[5],
  44377. l = c[6],
  44378. m = c[7];
  44379. for (n = 0; 64 > n; n++) {
  44380. 16 > n ? i[n] = 0 | a[b + n] : (o = i[n - 15], p = (o << 25 | o >>> 7) ^ (o << 14 | o >>> 18) ^ o >>> 3, q = i[n - 2], r = (q << 15 | q >>> 17) ^ (q << 13 | q >>> 19) ^ q >>> 10, i[n] = p + i[n - 7] + r + i[n - 16]), s = j & k ^ ~j & l, t = d & e ^ d & f ^ e & f, u = (d << 30 | d >>> 2) ^ (d << 19 | d >>> 13) ^ (d << 10 | d >>> 22), v = (j << 26 | j >>> 6) ^ (j << 21 | j >>> 11) ^ (j << 7 | j >>> 25), w = m + v + s + h[n] + i[n], x = u + t, m = l, l = k, k = j, j = 0 | g + w, g = f, f = e, e = d, d = 0 | w + x;
  44381. }
  44382. c[0] = 0 | c[0] + d, c[1] = 0 | c[1] + e, c[2] = 0 | c[2] + f, c[3] = 0 | c[3] + g, c[4] = 0 | c[4] + j, c[5] = 0 | c[5] + k, c[6] = 0 | c[6] + l, c[7] = 0 | c[7] + m;
  44383. },
  44384. _doFinalize: function _doFinalize() {
  44385. var b = this._data,
  44386. c = b.words,
  44387. d = 8 * this._nDataBytes,
  44388. e = 8 * b.sigBytes;
  44389. return c[e >>> 5] |= 128 << 24 - e % 32, c[(e + 64 >>> 9 << 4) + 14] = a.floor(d / 4294967296), c[(e + 64 >>> 9 << 4) + 15] = d, b.sigBytes = 4 * c.length, this._process(), this._hash;
  44390. },
  44391. clone: function clone() {
  44392. var a = e.clone.call(this);
  44393. return a._hash = this._hash.clone(), a;
  44394. }
  44395. }), b.SHA256 = e._createHelper(j), b.HmacSHA256 = e._createHmacHelper(j);
  44396. }(Math), function () {
  44397. function f(a) {
  44398. return 4278255360 & a << 8 | 16711935 & a >>> 8;
  44399. }
  44400. var a = CryptoJS,
  44401. b = a.lib,
  44402. c = b.WordArray,
  44403. d = a.enc;
  44404. d.Utf16 = d.Utf16BE = {
  44405. stringify: function stringify(a) {
  44406. var e,
  44407. f,
  44408. b = a.words,
  44409. c = a.sigBytes,
  44410. d = [];
  44411. for (e = 0; c > e; e += 2) {
  44412. f = 65535 & b[e >>> 2] >>> 16 - 8 * (e % 4), d.push(String.fromCharCode(f));
  44413. }
  44414. return d.join("");
  44415. },
  44416. parse: function parse(a) {
  44417. var e,
  44418. b = a.length,
  44419. d = [];
  44420. for (e = 0; b > e; e++) {
  44421. d[e >>> 1] |= a.charCodeAt(e) << 16 - 16 * (e % 2);
  44422. }
  44423. return c.create(d, 2 * b);
  44424. }
  44425. }, d.Utf16LE = {
  44426. stringify: function stringify(a) {
  44427. var e,
  44428. g,
  44429. b = a.words,
  44430. c = a.sigBytes,
  44431. d = [];
  44432. for (e = 0; c > e; e += 2) {
  44433. g = f(65535 & b[e >>> 2] >>> 16 - 8 * (e % 4)), d.push(String.fromCharCode(g));
  44434. }
  44435. return d.join("");
  44436. },
  44437. parse: function parse(a) {
  44438. var e,
  44439. b = a.length,
  44440. d = [];
  44441. for (e = 0; b > e; e++) {
  44442. d[e >>> 1] |= f(a.charCodeAt(e) << 16 - 16 * (e % 2));
  44443. }
  44444. return c.create(d, 2 * b);
  44445. }
  44446. };
  44447. }(), function () {
  44448. var a, b, c, d, e;
  44449. "function" == typeof ArrayBuffer && (a = CryptoJS, b = a.lib, c = b.WordArray, d = c.init, e = c.init = function (a) {
  44450. var b, c, e;
  44451. if (a instanceof ArrayBuffer && (a = new Uint8Array(a)), (a instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && a instanceof Uint8ClampedArray || a instanceof Int16Array || a instanceof Uint16Array || a instanceof Int32Array || a instanceof Uint32Array || a instanceof Float32Array || a instanceof Float64Array) && (a = new Uint8Array(a.buffer, a.byteOffset, a.byteLength)), a instanceof Uint8Array) {
  44452. for (b = a.byteLength, c = [], e = 0; b > e; e++) {
  44453. c[e >>> 2] |= a[e] << 24 - 8 * (e % 4);
  44454. }
  44455. d.call(this, c, b);
  44456. } else d.apply(this, arguments);
  44457. }, e.prototype = c);
  44458. }(), function () {
  44459. function n(a, b, c) {
  44460. return a ^ b ^ c;
  44461. }
  44462. function o(a, b, c) {
  44463. return a & b | ~a & c;
  44464. }
  44465. function p(a, b, c) {
  44466. return (a | ~b) ^ c;
  44467. }
  44468. function q(a, b, c) {
  44469. return a & c | b & ~c;
  44470. }
  44471. function r(a, b, c) {
  44472. return a ^ (b | ~c);
  44473. }
  44474. function s(a, b) {
  44475. return a << b | a >>> 32 - b;
  44476. }
  44477. var b = CryptoJS,
  44478. c = b.lib,
  44479. d = c.WordArray,
  44480. e = c.Hasher,
  44481. f = b.algo,
  44482. g = d.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]),
  44483. h = d.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]),
  44484. i = d.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]),
  44485. j = d.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]),
  44486. k = d.create([0, 1518500249, 1859775393, 2400959708, 2840853838]),
  44487. l = d.create([1352829926, 1548603684, 1836072691, 2053994217, 0]),
  44488. m = f.RIPEMD160 = e.extend({
  44489. _doReset: function _doReset() {
  44490. this._hash = d.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
  44491. },
  44492. _doProcessBlock: function _doProcessBlock(a, b) {
  44493. var c, d, e, f, m, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I;
  44494. for (c = 0; 16 > c; c++) {
  44495. d = b + c, e = a[d], a[d] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8);
  44496. }
  44497. for (f = this._hash.words, m = k.words, t = l.words, u = g.words, v = h.words, w = i.words, x = j.words, D = y = f[0], E = z = f[1], F = A = f[2], G = B = f[3], H = C = f[4], c = 0; 80 > c; c += 1) {
  44498. I = 0 | y + a[b + u[c]], I += 16 > c ? n(z, A, B) + m[0] : 32 > c ? o(z, A, B) + m[1] : 48 > c ? p(z, A, B) + m[2] : 64 > c ? q(z, A, B) + m[3] : r(z, A, B) + m[4], I = 0 | I, I = s(I, w[c]), I = 0 | I + C, y = C, C = B, B = s(A, 10), A = z, z = I, I = 0 | D + a[b + v[c]], I += 16 > c ? r(E, F, G) + t[0] : 32 > c ? q(E, F, G) + t[1] : 48 > c ? p(E, F, G) + t[2] : 64 > c ? o(E, F, G) + t[3] : n(E, F, G) + t[4], I = 0 | I, I = s(I, x[c]), I = 0 | I + H, D = H, H = G, G = s(F, 10), F = E, E = I;
  44499. }
  44500. I = 0 | f[1] + A + G, f[1] = 0 | f[2] + B + H, f[2] = 0 | f[3] + C + D, f[3] = 0 | f[4] + y + E, f[4] = 0 | f[0] + z + F, f[0] = I;
  44501. },
  44502. _doFinalize: function _doFinalize() {
  44503. var e,
  44504. f,
  44505. g,
  44506. h,
  44507. a = this._data,
  44508. b = a.words,
  44509. c = 8 * this._nDataBytes,
  44510. d = 8 * a.sigBytes;
  44511. for (b[d >>> 5] |= 128 << 24 - d % 32, b[(d + 64 >>> 9 << 4) + 14] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), a.sigBytes = 4 * (b.length + 1), this._process(), e = this._hash, f = e.words, g = 0; 5 > g; g++) {
  44512. h = f[g], f[g] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);
  44513. }
  44514. return e;
  44515. },
  44516. clone: function clone() {
  44517. var a = e.clone.call(this);
  44518. return a._hash = this._hash.clone(), a;
  44519. }
  44520. });
  44521. b.RIPEMD160 = e._createHelper(m), b.HmacRIPEMD160 = e._createHmacHelper(m);
  44522. }(Math), function () {
  44523. var a = CryptoJS,
  44524. b = a.lib,
  44525. c = b.Base,
  44526. d = a.enc,
  44527. e = d.Utf8,
  44528. f = a.algo;
  44529. f.HMAC = c.extend({
  44530. init: function init(a, b) {
  44531. var c, d, f, g, h, i, j;
  44532. for (a = this._hasher = new a.init(), "string" == typeof b && (b = e.parse(b)), c = a.blockSize, d = 4 * c, b.sigBytes > d && (b = a.finalize(b)), b.clamp(), f = this._oKey = b.clone(), g = this._iKey = b.clone(), h = f.words, i = g.words, j = 0; c > j; j++) {
  44533. h[j] ^= 1549556828, i[j] ^= 909522486;
  44534. }
  44535. f.sigBytes = g.sigBytes = d, this.reset();
  44536. },
  44537. reset: function reset() {
  44538. var a = this._hasher;
  44539. a.reset(), a.update(this._iKey);
  44540. },
  44541. update: function update(a) {
  44542. return this._hasher.update(a), this;
  44543. },
  44544. finalize: function finalize(a) {
  44545. var d,
  44546. b = this._hasher,
  44547. c = b.finalize(a);
  44548. return b.reset(), d = b.finalize(this._oKey.clone().concat(c));
  44549. }
  44550. });
  44551. }(), function () {
  44552. var a = CryptoJS,
  44553. b = a.lib,
  44554. c = b.Base,
  44555. d = b.WordArray,
  44556. e = a.algo,
  44557. f = e.SHA1,
  44558. g = e.HMAC,
  44559. h = e.PBKDF2 = c.extend({
  44560. cfg: c.extend({
  44561. keySize: 4,
  44562. hasher: f,
  44563. iterations: 1
  44564. }),
  44565. init: function init(a) {
  44566. this.cfg = this.cfg.extend(a);
  44567. },
  44568. compute: function compute(a, b) {
  44569. for (var m, n, o, p, q, r, s, c = this.cfg, e = g.create(c.hasher, a), f = d.create(), h = d.create([1]), i = f.words, j = h.words, k = c.keySize, l = c.iterations; i.length < k;) {
  44570. for (m = e.update(b).finalize(h), e.reset(), n = m.words, o = n.length, p = m, q = 1; l > q; q++) {
  44571. for (p = e.finalize(p), e.reset(), r = p.words, s = 0; o > s; s++) {
  44572. n[s] ^= r[s];
  44573. }
  44574. }
  44575. f.concat(m), j[0]++;
  44576. }
  44577. return f.sigBytes = 4 * k, f;
  44578. }
  44579. });
  44580. a.PBKDF2 = function (a, b, c) {
  44581. return h.create(c).compute(a, b);
  44582. };
  44583. }(), function () {
  44584. var a = CryptoJS,
  44585. b = a.lib,
  44586. c = b.Base,
  44587. d = b.WordArray,
  44588. e = a.algo,
  44589. f = e.MD5,
  44590. g = e.EvpKDF = c.extend({
  44591. cfg: c.extend({
  44592. keySize: 4,
  44593. hasher: f,
  44594. iterations: 1
  44595. }),
  44596. init: function init(a) {
  44597. this.cfg = this.cfg.extend(a);
  44598. },
  44599. compute: function compute(a, b) {
  44600. for (var c, k, e = this.cfg, f = e.hasher.create(), g = d.create(), h = g.words, i = e.keySize, j = e.iterations; h.length < i;) {
  44601. for (c && f.update(c), c = f.update(a).finalize(b), f.reset(), k = 1; j > k; k++) {
  44602. c = f.finalize(c), f.reset();
  44603. }
  44604. g.concat(c);
  44605. }
  44606. return g.sigBytes = 4 * i, g;
  44607. }
  44608. });
  44609. a.EvpKDF = function (a, b, c) {
  44610. return g.create(c).compute(a, b);
  44611. };
  44612. }(), function () {
  44613. var a = CryptoJS,
  44614. b = a.lib,
  44615. c = b.WordArray,
  44616. d = a.algo,
  44617. e = d.SHA256,
  44618. f = d.SHA224 = e.extend({
  44619. _doReset: function _doReset() {
  44620. this._hash = new c.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]);
  44621. },
  44622. _doFinalize: function _doFinalize() {
  44623. var a = e._doFinalize.call(this);
  44624. return a.sigBytes -= 4, a;
  44625. }
  44626. });
  44627. a.SHA224 = e._createHelper(f), a.HmacSHA224 = e._createHmacHelper(f);
  44628. }(), function (a) {
  44629. var b = CryptoJS,
  44630. c = b.lib,
  44631. d = c.Base,
  44632. e = c.WordArray,
  44633. f = b.x64 = {};
  44634. f.Word = d.extend({
  44635. init: function init(a, b) {
  44636. this.high = a, this.low = b;
  44637. }
  44638. }), f.WordArray = d.extend({
  44639. init: function init(b, c) {
  44640. b = this.words = b || [], this.sigBytes = c != a ? c : 8 * b.length;
  44641. },
  44642. toX32: function toX32() {
  44643. var d,
  44644. f,
  44645. a = this.words,
  44646. b = a.length,
  44647. c = [];
  44648. for (d = 0; b > d; d++) {
  44649. f = a[d], c.push(f.high), c.push(f.low);
  44650. }
  44651. return e.create(c, this.sigBytes);
  44652. },
  44653. clone: function clone() {
  44654. var e,
  44655. a = d.clone.call(this),
  44656. b = a.words = this.words.slice(0),
  44657. c = b.length;
  44658. for (e = 0; c > e; e++) {
  44659. b[e] = b[e].clone();
  44660. }
  44661. return a;
  44662. }
  44663. });
  44664. }(), function (a) {
  44665. var l,
  44666. m,
  44667. b = CryptoJS,
  44668. c = b.lib,
  44669. d = c.WordArray,
  44670. e = c.Hasher,
  44671. f = b.x64,
  44672. g = f.Word,
  44673. h = b.algo,
  44674. i = [],
  44675. j = [],
  44676. k = [];
  44677. !function () {
  44678. var c,
  44679. d,
  44680. e,
  44681. f,
  44682. h,
  44683. l,
  44684. m,
  44685. n,
  44686. o,
  44687. a = 1,
  44688. b = 0;
  44689. for (c = 0; 24 > c; c++) {
  44690. i[a + 5 * b] = (c + 1) * (c + 2) / 2 % 64, d = b % 5, e = (2 * a + 3 * b) % 5, a = d, b = e;
  44691. }
  44692. for (a = 0; 5 > a; a++) {
  44693. for (b = 0; 5 > b; b++) {
  44694. j[a + 5 * b] = b + 5 * ((2 * a + 3 * b) % 5);
  44695. }
  44696. }
  44697. for (f = 1, h = 0; 24 > h; h++) {
  44698. for (l = 0, m = 0, n = 0; 7 > n; n++) {
  44699. 1 & f && (o = (1 << n) - 1, 32 > o ? m ^= 1 << o : l ^= 1 << o - 32), 128 & f ? f = 113 ^ f << 1 : f <<= 1;
  44700. }
  44701. k[h] = g.create(l, m);
  44702. }
  44703. }(), l = [], function () {
  44704. for (var a = 0; 25 > a; a++) {
  44705. l[a] = g.create();
  44706. }
  44707. }(), m = h.SHA3 = e.extend({
  44708. cfg: e.cfg.extend({
  44709. outputLength: 512
  44710. }),
  44711. _doReset: function _doReset() {
  44712. var b,
  44713. a = this._state = [];
  44714. for (b = 0; 25 > b; b++) {
  44715. a[b] = new g.init();
  44716. }
  44717. this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
  44718. },
  44719. _doProcessBlock: function _doProcessBlock(a, b) {
  44720. var e,
  44721. f,
  44722. g,
  44723. h,
  44724. m,
  44725. n,
  44726. o,
  44727. p,
  44728. q,
  44729. r,
  44730. s,
  44731. t,
  44732. u,
  44733. v,
  44734. w,
  44735. x,
  44736. y,
  44737. z,
  44738. A,
  44739. B,
  44740. C,
  44741. D,
  44742. E,
  44743. F,
  44744. G,
  44745. c = this._state,
  44746. d = this.blockSize / 2;
  44747. for (e = 0; d > e; e++) {
  44748. f = a[b + 2 * e], g = a[b + 2 * e + 1], f = 16711935 & (f << 8 | f >>> 24) | 4278255360 & (f << 24 | f >>> 8), g = 16711935 & (g << 8 | g >>> 24) | 4278255360 & (g << 24 | g >>> 8), h = c[e], h.high ^= g, h.low ^= f;
  44749. }
  44750. for (m = 0; 24 > m; m++) {
  44751. for (n = 0; 5 > n; n++) {
  44752. for (o = 0, p = 0, q = 0; 5 > q; q++) {
  44753. h = c[n + 5 * q], o ^= h.high, p ^= h.low;
  44754. }
  44755. r = l[n], r.high = o, r.low = p;
  44756. }
  44757. for (n = 0; 5 > n; n++) {
  44758. for (s = l[(n + 4) % 5], t = l[(n + 1) % 5], u = t.high, v = t.low, o = s.high ^ (u << 1 | v >>> 31), p = s.low ^ (v << 1 | u >>> 31), q = 0; 5 > q; q++) {
  44759. h = c[n + 5 * q], h.high ^= o, h.low ^= p;
  44760. }
  44761. }
  44762. for (w = 1; 25 > w; w++) {
  44763. h = c[w], x = h.high, y = h.low, z = i[w], 32 > z ? (o = x << z | y >>> 32 - z, p = y << z | x >>> 32 - z) : (o = y << z - 32 | x >>> 64 - z, p = x << z - 32 | y >>> 64 - z), A = l[j[w]], A.high = o, A.low = p;
  44764. }
  44765. for (B = l[0], C = c[0], B.high = C.high, B.low = C.low, n = 0; 5 > n; n++) {
  44766. for (q = 0; 5 > q; q++) {
  44767. w = n + 5 * q, h = c[w], D = l[w], E = l[(n + 1) % 5 + 5 * q], F = l[(n + 2) % 5 + 5 * q], h.high = D.high ^ ~E.high & F.high, h.low = D.low ^ ~E.low & F.low;
  44768. }
  44769. }
  44770. h = c[0], G = k[m], h.high ^= G.high, h.low ^= G.low;
  44771. }
  44772. },
  44773. _doFinalize: function _doFinalize() {
  44774. var f,
  44775. g,
  44776. h,
  44777. i,
  44778. j,
  44779. k,
  44780. l,
  44781. m,
  44782. n,
  44783. o,
  44784. b = this._data,
  44785. c = b.words;
  44786. for (8 * this._nDataBytes, f = 8 * b.sigBytes, g = 32 * this.blockSize, c[f >>> 5] |= 1 << 24 - f % 32, c[(a.ceil((f + 1) / g) * g >>> 5) - 1] |= 128, b.sigBytes = 4 * c.length, this._process(), h = this._state, i = this.cfg.outputLength / 8, j = i / 8, k = [], l = 0; j > l; l++) {
  44787. m = h[l], n = m.high, o = m.low, n = 16711935 & (n << 8 | n >>> 24) | 4278255360 & (n << 24 | n >>> 8), o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), k.push(o), k.push(n);
  44788. }
  44789. return new d.init(k, i);
  44790. },
  44791. clone: function clone() {
  44792. var c,
  44793. a = e.clone.call(this),
  44794. b = a._state = this._state.slice(0);
  44795. for (c = 0; 25 > c; c++) {
  44796. b[c] = b[c].clone();
  44797. }
  44798. return a;
  44799. }
  44800. }), b.SHA3 = e._createHelper(m), b.HmacSHA3 = e._createHmacHelper(m);
  44801. }(Math), function () {
  44802. function h() {
  44803. return e.create.apply(e, arguments);
  44804. }
  44805. var k,
  44806. a = CryptoJS,
  44807. b = a.lib,
  44808. c = b.Hasher,
  44809. d = a.x64,
  44810. e = d.Word,
  44811. f = d.WordArray,
  44812. g = a.algo,
  44813. i = [h(1116352408, 3609767458), h(1899447441, 602891725), h(3049323471, 3964484399), h(3921009573, 2173295548), h(961987163, 4081628472), h(1508970993, 3053834265), h(2453635748, 2937671579), h(2870763221, 3664609560), h(3624381080, 2734883394), h(310598401, 1164996542), h(607225278, 1323610764), h(1426881987, 3590304994), h(1925078388, 4068182383), h(2162078206, 991336113), h(2614888103, 633803317), h(3248222580, 3479774868), h(3835390401, 2666613458), h(4022224774, 944711139), h(264347078, 2341262773), h(604807628, 2007800933), h(770255983, 1495990901), h(1249150122, 1856431235), h(1555081692, 3175218132), h(1996064986, 2198950837), h(2554220882, 3999719339), h(2821834349, 766784016), h(2952996808, 2566594879), h(3210313671, 3203337956), h(3336571891, 1034457026), h(3584528711, 2466948901), h(113926993, 3758326383), h(338241895, 168717936), h(666307205, 1188179964), h(773529912, 1546045734), h(1294757372, 1522805485), h(1396182291, 2643833823), h(1695183700, 2343527390), h(1986661051, 1014477480), h(2177026350, 1206759142), h(2456956037, 344077627), h(2730485921, 1290863460), h(2820302411, 3158454273), h(3259730800, 3505952657), h(3345764771, 106217008), h(3516065817, 3606008344), h(3600352804, 1432725776), h(4094571909, 1467031594), h(275423344, 851169720), h(430227734, 3100823752), h(506948616, 1363258195), h(659060556, 3750685593), h(883997877, 3785050280), h(958139571, 3318307427), h(1322822218, 3812723403), h(1537002063, 2003034995), h(1747873779, 3602036899), h(1955562222, 1575990012), h(2024104815, 1125592928), h(2227730452, 2716904306), h(2361852424, 442776044), h(2428436474, 593698344), h(2756734187, 3733110249), h(3204031479, 2999351573), h(3329325298, 3815920427), h(3391569614, 3928383900), h(3515267271, 566280711), h(3940187606, 3454069534), h(4118630271, 4000239992), h(116418474, 1914138554), h(174292421, 2731055270), h(289380356, 3203993006), h(460393269, 320620315), h(685471733, 587496836), h(852142971, 1086792851), h(1017036298, 365543100), h(1126000580, 2618297676), h(1288033470, 3409855158), h(1501505948, 4234509866), h(1607167915, 987167468), h(1816402316, 1246189591)],
  44814. j = [];
  44815. !function () {
  44816. for (var a = 0; 80 > a; a++) {
  44817. j[a] = h();
  44818. }
  44819. }(), k = g.SHA512 = c.extend({
  44820. _doReset: function _doReset() {
  44821. this._hash = new f.init([new e.init(1779033703, 4089235720), new e.init(3144134277, 2227873595), new e.init(1013904242, 4271175723), new e.init(2773480762, 1595750129), new e.init(1359893119, 2917565137), new e.init(2600822924, 725511199), new e.init(528734635, 4215389547), new e.init(1541459225, 327033209)]);
  44822. },
  44823. _doProcessBlock: function _doProcessBlock(a, b) {
  44824. var T,
  44825. U,
  44826. V,
  44827. W,
  44828. X,
  44829. Y,
  44830. Z,
  44831. $,
  44832. _,
  44833. ab,
  44834. bb,
  44835. cb,
  44836. db,
  44837. eb,
  44838. fb,
  44839. gb,
  44840. hb,
  44841. ib,
  44842. jb,
  44843. kb,
  44844. lb,
  44845. mb,
  44846. nb,
  44847. ob,
  44848. pb,
  44849. qb,
  44850. rb,
  44851. sb,
  44852. tb,
  44853. ub,
  44854. vb,
  44855. wb,
  44856. xb,
  44857. yb,
  44858. zb,
  44859. c = this._hash.words,
  44860. d = c[0],
  44861. e = c[1],
  44862. f = c[2],
  44863. g = c[3],
  44864. h = c[4],
  44865. k = c[5],
  44866. l = c[6],
  44867. m = c[7],
  44868. n = d.high,
  44869. o = d.low,
  44870. p = e.high,
  44871. q = e.low,
  44872. r = f.high,
  44873. s = f.low,
  44874. t = g.high,
  44875. u = g.low,
  44876. v = h.high,
  44877. w = h.low,
  44878. x = k.high,
  44879. y = k.low,
  44880. z = l.high,
  44881. A = l.low,
  44882. B = m.high,
  44883. C = m.low,
  44884. D = n,
  44885. E = o,
  44886. F = p,
  44887. G = q,
  44888. H = r,
  44889. I = s,
  44890. J = t,
  44891. K = u,
  44892. L = v,
  44893. M = w,
  44894. N = x,
  44895. O = y,
  44896. P = z,
  44897. Q = A,
  44898. R = B,
  44899. S = C;
  44900. for (T = 0; 80 > T; T++) {
  44901. W = j[T], 16 > T ? (V = W.high = 0 | a[b + 2 * T], U = W.low = 0 | a[b + 2 * T + 1]) : (X = j[T - 15], Y = X.high, Z = X.low, $ = (Y >>> 1 | Z << 31) ^ (Y >>> 8 | Z << 24) ^ Y >>> 7, _ = (Z >>> 1 | Y << 31) ^ (Z >>> 8 | Y << 24) ^ (Z >>> 7 | Y << 25), ab = j[T - 2], bb = ab.high, cb = ab.low, db = (bb >>> 19 | cb << 13) ^ (bb << 3 | cb >>> 29) ^ bb >>> 6, eb = (cb >>> 19 | bb << 13) ^ (cb << 3 | bb >>> 29) ^ (cb >>> 6 | bb << 26), fb = j[T - 7], gb = fb.high, hb = fb.low, ib = j[T - 16], jb = ib.high, kb = ib.low, U = _ + hb, V = $ + gb + (_ >>> 0 > U >>> 0 ? 1 : 0), U += eb, V = V + db + (eb >>> 0 > U >>> 0 ? 1 : 0), U += kb, V = V + jb + (kb >>> 0 > U >>> 0 ? 1 : 0), W.high = V, W.low = U), lb = L & N ^ ~L & P, mb = M & O ^ ~M & Q, nb = D & F ^ D & H ^ F & H, ob = E & G ^ E & I ^ G & I, pb = (D >>> 28 | E << 4) ^ (D << 30 | E >>> 2) ^ (D << 25 | E >>> 7), qb = (E >>> 28 | D << 4) ^ (E << 30 | D >>> 2) ^ (E << 25 | D >>> 7), rb = (L >>> 14 | M << 18) ^ (L >>> 18 | M << 14) ^ (L << 23 | M >>> 9), sb = (M >>> 14 | L << 18) ^ (M >>> 18 | L << 14) ^ (M << 23 | L >>> 9), tb = i[T], ub = tb.high, vb = tb.low, wb = S + sb, xb = R + rb + (S >>> 0 > wb >>> 0 ? 1 : 0), wb += mb, xb = xb + lb + (mb >>> 0 > wb >>> 0 ? 1 : 0), wb += vb, xb = xb + ub + (vb >>> 0 > wb >>> 0 ? 1 : 0), wb += U, xb = xb + V + (U >>> 0 > wb >>> 0 ? 1 : 0), yb = qb + ob, zb = pb + nb + (qb >>> 0 > yb >>> 0 ? 1 : 0), R = P, S = Q, P = N, Q = O, N = L, O = M, M = 0 | K + wb, L = 0 | J + xb + (K >>> 0 > M >>> 0 ? 1 : 0), J = H, K = I, H = F, I = G, F = D, G = E, E = 0 | wb + yb, D = 0 | xb + zb + (wb >>> 0 > E >>> 0 ? 1 : 0);
  44902. }
  44903. o = d.low = o + E, d.high = n + D + (E >>> 0 > o >>> 0 ? 1 : 0), q = e.low = q + G, e.high = p + F + (G >>> 0 > q >>> 0 ? 1 : 0), s = f.low = s + I, f.high = r + H + (I >>> 0 > s >>> 0 ? 1 : 0), u = g.low = u + K, g.high = t + J + (K >>> 0 > u >>> 0 ? 1 : 0), w = h.low = w + M, h.high = v + L + (M >>> 0 > w >>> 0 ? 1 : 0), y = k.low = y + O, k.high = x + N + (O >>> 0 > y >>> 0 ? 1 : 0), A = l.low = A + Q, l.high = z + P + (Q >>> 0 > A >>> 0 ? 1 : 0), C = m.low = C + S, m.high = B + R + (S >>> 0 > C >>> 0 ? 1 : 0);
  44904. },
  44905. _doFinalize: function _doFinalize() {
  44906. var e,
  44907. a = this._data,
  44908. b = a.words,
  44909. c = 8 * this._nDataBytes,
  44910. d = 8 * a.sigBytes;
  44911. return b[d >>> 5] |= 128 << 24 - d % 32, b[(d + 128 >>> 10 << 5) + 30] = Math.floor(c / 4294967296), b[(d + 128 >>> 10 << 5) + 31] = c, a.sigBytes = 4 * b.length, this._process(), e = this._hash.toX32();
  44912. },
  44913. clone: function clone() {
  44914. var a = c.clone.call(this);
  44915. return a._hash = this._hash.clone(), a;
  44916. },
  44917. blockSize: 32
  44918. }), a.SHA512 = c._createHelper(k), a.HmacSHA512 = c._createHmacHelper(k);
  44919. }(), function () {
  44920. var a = CryptoJS,
  44921. b = a.x64,
  44922. c = b.Word,
  44923. d = b.WordArray,
  44924. e = a.algo,
  44925. f = e.SHA512,
  44926. g = e.SHA384 = f.extend({
  44927. _doReset: function _doReset() {
  44928. this._hash = new d.init([new c.init(3418070365, 3238371032), new c.init(1654270250, 914150663), new c.init(2438529370, 812702999), new c.init(355462360, 4144912697), new c.init(1731405415, 4290775857), new c.init(2394180231, 1750603025), new c.init(3675008525, 1694076839), new c.init(1203062813, 3204075428)]);
  44929. },
  44930. _doFinalize: function _doFinalize() {
  44931. var a = f._doFinalize.call(this);
  44932. return a.sigBytes -= 16, a;
  44933. }
  44934. });
  44935. a.SHA384 = f._createHelper(g), a.HmacSHA384 = f._createHmacHelper(g);
  44936. }(), CryptoJS.lib.Cipher || function (a) {
  44937. var i,
  44938. j,
  44939. k,
  44940. l,
  44941. n,
  44942. o,
  44943. p,
  44944. q,
  44945. r,
  44946. t,
  44947. u,
  44948. v,
  44949. w,
  44950. x,
  44951. y,
  44952. z,
  44953. b = CryptoJS,
  44954. c = b.lib,
  44955. d = c.Base,
  44956. e = c.WordArray,
  44957. f = c.BufferedBlockAlgorithm,
  44958. g = b.enc;
  44959. g.Utf8, i = g.Base64, j = b.algo, k = j.EvpKDF, l = c.Cipher = f.extend({
  44960. cfg: d.extend(),
  44961. createEncryptor: function createEncryptor(a, b) {
  44962. return this.create(this._ENC_XFORM_MODE, a, b);
  44963. },
  44964. createDecryptor: function createDecryptor(a, b) {
  44965. return this.create(this._DEC_XFORM_MODE, a, b);
  44966. },
  44967. init: function init(a, b, c) {
  44968. this.cfg = this.cfg.extend(c), this._xformMode = a, this._key = b, this.reset();
  44969. },
  44970. reset: function reset() {
  44971. f.reset.call(this), this._doReset();
  44972. },
  44973. process: function process(a) {
  44974. return this._append(a), this._process();
  44975. },
  44976. finalize: function finalize(a) {
  44977. a && this._append(a);
  44978. var b = this._doFinalize();
  44979. return b;
  44980. },
  44981. keySize: 4,
  44982. ivSize: 4,
  44983. _ENC_XFORM_MODE: 1,
  44984. _DEC_XFORM_MODE: 2,
  44985. _createHelper: function () {
  44986. function a(a) {
  44987. return "string" == typeof a ? z : w;
  44988. }
  44989. return function (b) {
  44990. return {
  44991. encrypt: function encrypt(c, d, e) {
  44992. return a(d).encrypt(b, c, d, e);
  44993. },
  44994. decrypt: function decrypt(c, d, e) {
  44995. return a(d).decrypt(b, c, d, e);
  44996. }
  44997. };
  44998. };
  44999. }()
  45000. }), c.StreamCipher = l.extend({
  45001. _doFinalize: function _doFinalize() {
  45002. var a = this._process(!0);
  45003. return a;
  45004. },
  45005. blockSize: 1
  45006. }), n = b.mode = {}, o = c.BlockCipherMode = d.extend({
  45007. createEncryptor: function createEncryptor(a, b) {
  45008. return this.Encryptor.create(a, b);
  45009. },
  45010. createDecryptor: function createDecryptor(a, b) {
  45011. return this.Decryptor.create(a, b);
  45012. },
  45013. init: function init(a, b) {
  45014. this._cipher = a, this._iv = b;
  45015. }
  45016. }), p = n.CBC = function () {
  45017. function c(b, c, d) {
  45018. var e,
  45019. g,
  45020. f = this._iv;
  45021. for (f ? (e = f, this._iv = a) : e = this._prevBlock, g = 0; d > g; g++) {
  45022. b[c + g] ^= e[g];
  45023. }
  45024. }
  45025. var b = o.extend();
  45026. return b.Encryptor = b.extend({
  45027. processBlock: function processBlock(a, b) {
  45028. var d = this._cipher,
  45029. e = d.blockSize;
  45030. c.call(this, a, b, e), d.encryptBlock(a, b), this._prevBlock = a.slice(b, b + e);
  45031. }
  45032. }), b.Decryptor = b.extend({
  45033. processBlock: function processBlock(a, b) {
  45034. var d = this._cipher,
  45035. e = d.blockSize,
  45036. f = a.slice(b, b + e);
  45037. d.decryptBlock(a, b), c.call(this, a, b, e), this._prevBlock = f;
  45038. }
  45039. }), b;
  45040. }(), q = b.pad = {}, r = q.Pkcs7 = {
  45041. pad: function pad(a, b) {
  45042. var h,
  45043. i,
  45044. c = 4 * b,
  45045. d = c - a.sigBytes % c,
  45046. f = d << 24 | d << 16 | d << 8 | d,
  45047. g = [];
  45048. for (h = 0; d > h; h += 4) {
  45049. g.push(f);
  45050. }
  45051. i = e.create(g, d), a.concat(i);
  45052. },
  45053. unpad: function unpad(a) {
  45054. var b = 255 & a.words[a.sigBytes - 1 >>> 2];
  45055. a.sigBytes -= b;
  45056. }
  45057. }, c.BlockCipher = l.extend({
  45058. cfg: l.cfg.extend({
  45059. mode: p,
  45060. padding: r
  45061. }),
  45062. reset: function reset() {
  45063. var a, b, c, d;
  45064. l.reset.call(this), b = this.cfg, c = b.iv, d = b.mode, this._xformMode == this._ENC_XFORM_MODE ? a = d.createEncryptor : (a = d.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == a ? this._mode.init(this, c && c.words) : (this._mode = a.call(d, this, c && c.words), this._mode.__creator = a);
  45065. },
  45066. _doProcessBlock: function _doProcessBlock(a, b) {
  45067. this._mode.processBlock(a, b);
  45068. },
  45069. _doFinalize: function _doFinalize() {
  45070. var a,
  45071. b = this.cfg.padding;
  45072. return this._xformMode == this._ENC_XFORM_MODE ? (b.pad(this._data, this.blockSize), a = this._process(!0)) : (a = this._process(!0), b.unpad(a)), a;
  45073. },
  45074. blockSize: 4
  45075. }), t = c.CipherParams = d.extend({
  45076. init: function init(a) {
  45077. this.mixIn(a);
  45078. },
  45079. toString: function toString(a) {
  45080. return (a || this.formatter).stringify(this);
  45081. }
  45082. }), u = b.format = {}, v = u.OpenSSL = {
  45083. stringify: function stringify(a) {
  45084. var b,
  45085. c = a.ciphertext,
  45086. d = a.salt;
  45087. return b = d ? e.create([1398893684, 1701076831]).concat(d).concat(c) : c, b.toString(i);
  45088. },
  45089. parse: function parse(a) {
  45090. var b,
  45091. c = i.parse(a),
  45092. d = c.words;
  45093. return 1398893684 == d[0] && 1701076831 == d[1] && (b = e.create(d.slice(2, 4)), d.splice(0, 4), c.sigBytes -= 16), t.create({
  45094. ciphertext: c,
  45095. salt: b
  45096. });
  45097. }
  45098. }, w = c.SerializableCipher = d.extend({
  45099. cfg: d.extend({
  45100. format: v
  45101. }),
  45102. encrypt: function encrypt(a, b, c, d) {
  45103. var e, f, g;
  45104. return d = this.cfg.extend(d), e = a.createEncryptor(c, d), f = e.finalize(b), g = e.cfg, t.create({
  45105. ciphertext: f,
  45106. key: c,
  45107. iv: g.iv,
  45108. algorithm: a,
  45109. mode: g.mode,
  45110. padding: g.padding,
  45111. blockSize: a.blockSize,
  45112. formatter: d.format
  45113. });
  45114. },
  45115. decrypt: function decrypt(a, b, c, d) {
  45116. d = this.cfg.extend(d), b = this._parse(b, d.format);
  45117. var e = a.createDecryptor(c, d).finalize(b.ciphertext);
  45118. return e;
  45119. },
  45120. _parse: function _parse(a, b) {
  45121. return "string" == typeof a ? b.parse(a, this) : a;
  45122. }
  45123. }), x = b.kdf = {}, y = x.OpenSSL = {
  45124. execute: function execute(a, b, c, d) {
  45125. var f, g;
  45126. return d || (d = e.random(8)), f = k.create({
  45127. keySize: b + c
  45128. }).compute(a, d), g = e.create(f.words.slice(b), 4 * c), f.sigBytes = 4 * b, t.create({
  45129. key: f,
  45130. iv: g,
  45131. salt: d
  45132. });
  45133. }
  45134. }, z = c.PasswordBasedCipher = w.extend({
  45135. cfg: w.cfg.extend({
  45136. kdf: y
  45137. }),
  45138. encrypt: function encrypt(a, b, c, d) {
  45139. var e, f;
  45140. return d = this.cfg.extend(d), e = d.kdf.execute(c, a.keySize, a.ivSize), d.iv = e.iv, f = w.encrypt.call(this, a, b, e.key, d), f.mixIn(e), f;
  45141. },
  45142. decrypt: function decrypt(a, b, c, d) {
  45143. var e, f;
  45144. return d = this.cfg.extend(d), b = this._parse(b, d.format), e = d.kdf.execute(c, a.keySize, a.ivSize, b.salt), d.iv = e.iv, f = w.decrypt.call(this, a, b, e.key, d);
  45145. }
  45146. });
  45147. }(), CryptoJS.mode.CFB = function () {
  45148. function b(a, b, c, d) {
  45149. var e,
  45150. g,
  45151. f = this._iv;
  45152. for (f ? (e = f.slice(0), this._iv = void 0) : e = this._prevBlock, d.encryptBlock(e, 0), g = 0; c > g; g++) {
  45153. a[b + g] ^= e[g];
  45154. }
  45155. }
  45156. var a = CryptoJS.lib.BlockCipherMode.extend();
  45157. return a.Encryptor = a.extend({
  45158. processBlock: function processBlock(a, c) {
  45159. var d = this._cipher,
  45160. e = d.blockSize;
  45161. b.call(this, a, c, e, d), this._prevBlock = a.slice(c, c + e);
  45162. }
  45163. }), a.Decryptor = a.extend({
  45164. processBlock: function processBlock(a, c) {
  45165. var d = this._cipher,
  45166. e = d.blockSize,
  45167. f = a.slice(c, c + e);
  45168. b.call(this, a, c, e, d), this._prevBlock = f;
  45169. }
  45170. }), a;
  45171. }(), CryptoJS.mode.ECB = function () {
  45172. var a = CryptoJS.lib.BlockCipherMode.extend();
  45173. return a.Encryptor = a.extend({
  45174. processBlock: function processBlock(a, b) {
  45175. this._cipher.encryptBlock(a, b);
  45176. }
  45177. }), a.Decryptor = a.extend({
  45178. processBlock: function processBlock(a, b) {
  45179. this._cipher.decryptBlock(a, b);
  45180. }
  45181. }), a;
  45182. }(), CryptoJS.pad.AnsiX923 = {
  45183. pad: function pad(a, b) {
  45184. var c = a.sigBytes,
  45185. d = 4 * b,
  45186. e = d - c % d,
  45187. f = c + e - 1;
  45188. a.clamp(), a.words[f >>> 2] |= e << 24 - 8 * (f % 4), a.sigBytes += e;
  45189. },
  45190. unpad: function unpad(a) {
  45191. var b = 255 & a.words[a.sigBytes - 1 >>> 2];
  45192. a.sigBytes -= b;
  45193. }
  45194. }, CryptoJS.pad.Iso10126 = {
  45195. pad: function pad(a, b) {
  45196. var c = 4 * b,
  45197. d = c - a.sigBytes % c;
  45198. a.concat(CryptoJS.lib.WordArray.random(d - 1)).concat(CryptoJS.lib.WordArray.create([d << 24], 1));
  45199. },
  45200. unpad: function unpad(a) {
  45201. var b = 255 & a.words[a.sigBytes - 1 >>> 2];
  45202. a.sigBytes -= b;
  45203. }
  45204. }, CryptoJS.pad.Iso97971 = {
  45205. pad: function pad(a, b) {
  45206. a.concat(CryptoJS.lib.WordArray.create([2147483648], 1)), CryptoJS.pad.ZeroPadding.pad(a, b);
  45207. },
  45208. unpad: function unpad(a) {
  45209. CryptoJS.pad.ZeroPadding.unpad(a), a.sigBytes--;
  45210. }
  45211. }, CryptoJS.mode.OFB = function () {
  45212. var a = CryptoJS.lib.BlockCipherMode.extend(),
  45213. b = a.Encryptor = a.extend({
  45214. processBlock: function processBlock(a, b) {
  45215. var g,
  45216. c = this._cipher,
  45217. d = c.blockSize,
  45218. e = this._iv,
  45219. f = this._keystream;
  45220. for (e && (f = this._keystream = e.slice(0), this._iv = void 0), c.encryptBlock(f, 0), g = 0; d > g; g++) {
  45221. a[b + g] ^= f[g];
  45222. }
  45223. }
  45224. });
  45225. return a.Decryptor = b, a;
  45226. }(), CryptoJS.pad.NoPadding = {
  45227. pad: function pad() {},
  45228. unpad: function unpad() {}
  45229. }, function () {
  45230. var b = CryptoJS,
  45231. c = b.lib,
  45232. d = c.CipherParams,
  45233. e = b.enc,
  45234. f = e.Hex,
  45235. g = b.format;
  45236. g.Hex = {
  45237. stringify: function stringify(a) {
  45238. return a.ciphertext.toString(f);
  45239. },
  45240. parse: function parse(a) {
  45241. var b = f.parse(a);
  45242. return d.create({
  45243. ciphertext: b
  45244. });
  45245. }
  45246. };
  45247. }(), function () {
  45248. var o,
  45249. p,
  45250. a = CryptoJS,
  45251. b = a.lib,
  45252. c = b.BlockCipher,
  45253. d = a.algo,
  45254. e = [],
  45255. f = [],
  45256. g = [],
  45257. h = [],
  45258. i = [],
  45259. j = [],
  45260. k = [],
  45261. l = [],
  45262. m = [],
  45263. n = [];
  45264. !function () {
  45265. var b,
  45266. c,
  45267. d,
  45268. o,
  45269. p,
  45270. q,
  45271. r,
  45272. s,
  45273. a = [];
  45274. for (b = 0; 256 > b; b++) {
  45275. a[b] = 128 > b ? b << 1 : 283 ^ b << 1;
  45276. }
  45277. for (c = 0, d = 0, b = 0; 256 > b; b++) {
  45278. o = d ^ d << 1 ^ d << 2 ^ d << 3 ^ d << 4, o = 99 ^ (o >>> 8 ^ 255 & o), e[c] = o, f[o] = c, p = a[c], q = a[p], r = a[q], s = 257 * a[o] ^ 16843008 * o, g[c] = s << 24 | s >>> 8, h[c] = s << 16 | s >>> 16, i[c] = s << 8 | s >>> 24, j[c] = s, s = 16843009 * r ^ 65537 * q ^ 257 * p ^ 16843008 * c, k[o] = s << 24 | s >>> 8, l[o] = s << 16 | s >>> 16, m[o] = s << 8 | s >>> 24, n[o] = s, c ? (c = p ^ a[a[a[r ^ p]]], d ^= a[a[d]]) : c = d = 1;
  45279. }
  45280. }(), o = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], p = d.AES = c.extend({
  45281. _doReset: function _doReset() {
  45282. var a, b, c, d, f, g, h, i, j, p;
  45283. if (!this._nRounds || this._keyPriorReset !== this._key) {
  45284. for (b = this._keyPriorReset = this._key, c = b.words, d = b.sigBytes / 4, f = this._nRounds = d + 6, g = 4 * (f + 1), h = this._keySchedule = [], i = 0; g > i; i++) {
  45285. d > i ? h[i] = c[i] : (a = h[i - 1], i % d ? d > 6 && 4 == i % d && (a = e[a >>> 24] << 24 | e[255 & a >>> 16] << 16 | e[255 & a >>> 8] << 8 | e[255 & a]) : (a = a << 8 | a >>> 24, a = e[a >>> 24] << 24 | e[255 & a >>> 16] << 16 | e[255 & a >>> 8] << 8 | e[255 & a], a ^= o[0 | i / d] << 24), h[i] = h[i - d] ^ a);
  45286. }
  45287. for (j = this._invKeySchedule = [], p = 0; g > p; p++) {
  45288. i = g - p, a = p % 4 ? h[i] : h[i - 4], j[p] = 4 > p || 4 >= i ? a : k[e[a >>> 24]] ^ l[e[255 & a >>> 16]] ^ m[e[255 & a >>> 8]] ^ n[e[255 & a]];
  45289. }
  45290. }
  45291. },
  45292. encryptBlock: function encryptBlock(a, b) {
  45293. this._doCryptBlock(a, b, this._keySchedule, g, h, i, j, e);
  45294. },
  45295. decryptBlock: function decryptBlock(a, b) {
  45296. var c = a[b + 1];
  45297. a[b + 1] = a[b + 3], a[b + 3] = c, this._doCryptBlock(a, b, this._invKeySchedule, k, l, m, n, f), c = a[b + 1], a[b + 1] = a[b + 3], a[b + 3] = c;
  45298. },
  45299. _doCryptBlock: function _doCryptBlock(a, b, c, d, e, f, g, h) {
  45300. var o,
  45301. p,
  45302. q,
  45303. r,
  45304. s,
  45305. i = this._nRounds,
  45306. j = a[b] ^ c[0],
  45307. k = a[b + 1] ^ c[1],
  45308. l = a[b + 2] ^ c[2],
  45309. m = a[b + 3] ^ c[3],
  45310. n = 4;
  45311. for (o = 1; i > o; o++) {
  45312. p = d[j >>> 24] ^ e[255 & k >>> 16] ^ f[255 & l >>> 8] ^ g[255 & m] ^ c[n++], q = d[k >>> 24] ^ e[255 & l >>> 16] ^ f[255 & m >>> 8] ^ g[255 & j] ^ c[n++], r = d[l >>> 24] ^ e[255 & m >>> 16] ^ f[255 & j >>> 8] ^ g[255 & k] ^ c[n++], s = d[m >>> 24] ^ e[255 & j >>> 16] ^ f[255 & k >>> 8] ^ g[255 & l] ^ c[n++], j = p, k = q, l = r, m = s;
  45313. }
  45314. p = (h[j >>> 24] << 24 | h[255 & k >>> 16] << 16 | h[255 & l >>> 8] << 8 | h[255 & m]) ^ c[n++], q = (h[k >>> 24] << 24 | h[255 & l >>> 16] << 16 | h[255 & m >>> 8] << 8 | h[255 & j]) ^ c[n++], r = (h[l >>> 24] << 24 | h[255 & m >>> 16] << 16 | h[255 & j >>> 8] << 8 | h[255 & k]) ^ c[n++], s = (h[m >>> 24] << 24 | h[255 & j >>> 16] << 16 | h[255 & k >>> 8] << 8 | h[255 & l]) ^ c[n++], a[b] = p, a[b + 1] = q, a[b + 2] = r, a[b + 3] = s;
  45315. },
  45316. keySize: 8
  45317. }), a.AES = c._createHelper(p);
  45318. }(), function () {
  45319. function l(a, b) {
  45320. var c = (this._lBlock >>> a ^ this._rBlock) & b;
  45321. this._rBlock ^= c, this._lBlock ^= c << a;
  45322. }
  45323. function m(a, b) {
  45324. var c = (this._rBlock >>> a ^ this._lBlock) & b;
  45325. this._lBlock ^= c, this._rBlock ^= c << a;
  45326. }
  45327. var n,
  45328. a = CryptoJS,
  45329. b = a.lib,
  45330. c = b.WordArray,
  45331. d = b.BlockCipher,
  45332. e = a.algo,
  45333. f = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4],
  45334. g = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32],
  45335. h = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28],
  45336. i = [{
  45337. 0: 8421888,
  45338. 268435456: 32768,
  45339. 536870912: 8421378,
  45340. 805306368: 2,
  45341. 1073741824: 512,
  45342. 1342177280: 8421890,
  45343. 1610612736: 8389122,
  45344. 1879048192: 8388608,
  45345. 2147483648: 514,
  45346. 2415919104: 8389120,
  45347. 2684354560: 33280,
  45348. 2952790016: 8421376,
  45349. 3221225472: 32770,
  45350. 3489660928: 8388610,
  45351. 3758096384: 0,
  45352. 4026531840: 33282,
  45353. 134217728: 0,
  45354. 402653184: 8421890,
  45355. 671088640: 33282,
  45356. 939524096: 32768,
  45357. 1207959552: 8421888,
  45358. 1476395008: 512,
  45359. 1744830464: 8421378,
  45360. 2013265920: 2,
  45361. 2281701376: 8389120,
  45362. 2550136832: 33280,
  45363. 2818572288: 8421376,
  45364. 3087007744: 8389122,
  45365. 3355443200: 8388610,
  45366. 3623878656: 32770,
  45367. 3892314112: 514,
  45368. 4160749568: 8388608,
  45369. 1: 32768,
  45370. 268435457: 2,
  45371. 536870913: 8421888,
  45372. 805306369: 8388608,
  45373. 1073741825: 8421378,
  45374. 1342177281: 33280,
  45375. 1610612737: 512,
  45376. 1879048193: 8389122,
  45377. 2147483649: 8421890,
  45378. 2415919105: 8421376,
  45379. 2684354561: 8388610,
  45380. 2952790017: 33282,
  45381. 3221225473: 514,
  45382. 3489660929: 8389120,
  45383. 3758096385: 32770,
  45384. 4026531841: 0,
  45385. 134217729: 8421890,
  45386. 402653185: 8421376,
  45387. 671088641: 8388608,
  45388. 939524097: 512,
  45389. 1207959553: 32768,
  45390. 1476395009: 8388610,
  45391. 1744830465: 2,
  45392. 2013265921: 33282,
  45393. 2281701377: 32770,
  45394. 2550136833: 8389122,
  45395. 2818572289: 514,
  45396. 3087007745: 8421888,
  45397. 3355443201: 8389120,
  45398. 3623878657: 0,
  45399. 3892314113: 33280,
  45400. 4160749569: 8421378
  45401. }, {
  45402. 0: 1074282512,
  45403. 16777216: 16384,
  45404. 33554432: 524288,
  45405. 50331648: 1074266128,
  45406. 67108864: 1073741840,
  45407. 83886080: 1074282496,
  45408. 100663296: 1073758208,
  45409. 117440512: 16,
  45410. 134217728: 540672,
  45411. 150994944: 1073758224,
  45412. 167772160: 1073741824,
  45413. 184549376: 540688,
  45414. 201326592: 524304,
  45415. 218103808: 0,
  45416. 234881024: 16400,
  45417. 251658240: 1074266112,
  45418. 8388608: 1073758208,
  45419. 25165824: 540688,
  45420. 41943040: 16,
  45421. 58720256: 1073758224,
  45422. 75497472: 1074282512,
  45423. 92274688: 1073741824,
  45424. 109051904: 524288,
  45425. 125829120: 1074266128,
  45426. 142606336: 524304,
  45427. 159383552: 0,
  45428. 176160768: 16384,
  45429. 192937984: 1074266112,
  45430. 209715200: 1073741840,
  45431. 226492416: 540672,
  45432. 243269632: 1074282496,
  45433. 260046848: 16400,
  45434. 268435456: 0,
  45435. 285212672: 1074266128,
  45436. 301989888: 1073758224,
  45437. 318767104: 1074282496,
  45438. 335544320: 1074266112,
  45439. 352321536: 16,
  45440. 369098752: 540688,
  45441. 385875968: 16384,
  45442. 402653184: 16400,
  45443. 419430400: 524288,
  45444. 436207616: 524304,
  45445. 452984832: 1073741840,
  45446. 469762048: 540672,
  45447. 486539264: 1073758208,
  45448. 503316480: 1073741824,
  45449. 520093696: 1074282512,
  45450. 276824064: 540688,
  45451. 293601280: 524288,
  45452. 310378496: 1074266112,
  45453. 327155712: 16384,
  45454. 343932928: 1073758208,
  45455. 360710144: 1074282512,
  45456. 377487360: 16,
  45457. 394264576: 1073741824,
  45458. 411041792: 1074282496,
  45459. 427819008: 1073741840,
  45460. 444596224: 1073758224,
  45461. 461373440: 524304,
  45462. 478150656: 0,
  45463. 494927872: 16400,
  45464. 511705088: 1074266128,
  45465. 528482304: 540672
  45466. }, {
  45467. 0: 260,
  45468. 1048576: 0,
  45469. 2097152: 67109120,
  45470. 3145728: 65796,
  45471. 4194304: 65540,
  45472. 5242880: 67108868,
  45473. 6291456: 67174660,
  45474. 7340032: 67174400,
  45475. 8388608: 67108864,
  45476. 9437184: 67174656,
  45477. 10485760: 65792,
  45478. 11534336: 67174404,
  45479. 12582912: 67109124,
  45480. 13631488: 65536,
  45481. 14680064: 4,
  45482. 15728640: 256,
  45483. 524288: 67174656,
  45484. 1572864: 67174404,
  45485. 2621440: 0,
  45486. 3670016: 67109120,
  45487. 4718592: 67108868,
  45488. 5767168: 65536,
  45489. 6815744: 65540,
  45490. 7864320: 260,
  45491. 8912896: 4,
  45492. 9961472: 256,
  45493. 11010048: 67174400,
  45494. 12058624: 65796,
  45495. 13107200: 65792,
  45496. 14155776: 67109124,
  45497. 15204352: 67174660,
  45498. 16252928: 67108864,
  45499. 16777216: 67174656,
  45500. 17825792: 65540,
  45501. 18874368: 65536,
  45502. 19922944: 67109120,
  45503. 20971520: 256,
  45504. 22020096: 67174660,
  45505. 23068672: 67108868,
  45506. 24117248: 0,
  45507. 25165824: 67109124,
  45508. 26214400: 67108864,
  45509. 27262976: 4,
  45510. 28311552: 65792,
  45511. 29360128: 67174400,
  45512. 30408704: 260,
  45513. 31457280: 65796,
  45514. 32505856: 67174404,
  45515. 17301504: 67108864,
  45516. 18350080: 260,
  45517. 19398656: 67174656,
  45518. 20447232: 0,
  45519. 21495808: 65540,
  45520. 22544384: 67109120,
  45521. 23592960: 256,
  45522. 24641536: 67174404,
  45523. 25690112: 65536,
  45524. 26738688: 67174660,
  45525. 27787264: 65796,
  45526. 28835840: 67108868,
  45527. 29884416: 67109124,
  45528. 30932992: 67174400,
  45529. 31981568: 4,
  45530. 33030144: 65792
  45531. }, {
  45532. 0: 2151682048,
  45533. 65536: 2147487808,
  45534. 131072: 4198464,
  45535. 196608: 2151677952,
  45536. 262144: 0,
  45537. 327680: 4198400,
  45538. 393216: 2147483712,
  45539. 458752: 4194368,
  45540. 524288: 2147483648,
  45541. 589824: 4194304,
  45542. 655360: 64,
  45543. 720896: 2147487744,
  45544. 786432: 2151678016,
  45545. 851968: 4160,
  45546. 917504: 4096,
  45547. 983040: 2151682112,
  45548. 32768: 2147487808,
  45549. 98304: 64,
  45550. 163840: 2151678016,
  45551. 229376: 2147487744,
  45552. 294912: 4198400,
  45553. 360448: 2151682112,
  45554. 425984: 0,
  45555. 491520: 2151677952,
  45556. 557056: 4096,
  45557. 622592: 2151682048,
  45558. 688128: 4194304,
  45559. 753664: 4160,
  45560. 819200: 2147483648,
  45561. 884736: 4194368,
  45562. 950272: 4198464,
  45563. 1015808: 2147483712,
  45564. 1048576: 4194368,
  45565. 1114112: 4198400,
  45566. 1179648: 2147483712,
  45567. 1245184: 0,
  45568. 1310720: 4160,
  45569. 1376256: 2151678016,
  45570. 1441792: 2151682048,
  45571. 1507328: 2147487808,
  45572. 1572864: 2151682112,
  45573. 1638400: 2147483648,
  45574. 1703936: 2151677952,
  45575. 1769472: 4198464,
  45576. 1835008: 2147487744,
  45577. 1900544: 4194304,
  45578. 1966080: 64,
  45579. 2031616: 4096,
  45580. 1081344: 2151677952,
  45581. 1146880: 2151682112,
  45582. 1212416: 0,
  45583. 1277952: 4198400,
  45584. 1343488: 4194368,
  45585. 1409024: 2147483648,
  45586. 1474560: 2147487808,
  45587. 1540096: 64,
  45588. 1605632: 2147483712,
  45589. 1671168: 4096,
  45590. 1736704: 2147487744,
  45591. 1802240: 2151678016,
  45592. 1867776: 4160,
  45593. 1933312: 2151682048,
  45594. 1998848: 4194304,
  45595. 2064384: 4198464
  45596. }, {
  45597. 0: 128,
  45598. 4096: 17039360,
  45599. 8192: 262144,
  45600. 12288: 536870912,
  45601. 16384: 537133184,
  45602. 20480: 16777344,
  45603. 24576: 553648256,
  45604. 28672: 262272,
  45605. 32768: 16777216,
  45606. 36864: 537133056,
  45607. 40960: 536871040,
  45608. 45056: 553910400,
  45609. 49152: 553910272,
  45610. 53248: 0,
  45611. 57344: 17039488,
  45612. 61440: 553648128,
  45613. 2048: 17039488,
  45614. 6144: 553648256,
  45615. 10240: 128,
  45616. 14336: 17039360,
  45617. 18432: 262144,
  45618. 22528: 537133184,
  45619. 26624: 553910272,
  45620. 30720: 536870912,
  45621. 34816: 537133056,
  45622. 38912: 0,
  45623. 43008: 553910400,
  45624. 47104: 16777344,
  45625. 51200: 536871040,
  45626. 55296: 553648128,
  45627. 59392: 16777216,
  45628. 63488: 262272,
  45629. 65536: 262144,
  45630. 69632: 128,
  45631. 73728: 536870912,
  45632. 77824: 553648256,
  45633. 81920: 16777344,
  45634. 86016: 553910272,
  45635. 90112: 537133184,
  45636. 94208: 16777216,
  45637. 98304: 553910400,
  45638. 102400: 553648128,
  45639. 106496: 17039360,
  45640. 110592: 537133056,
  45641. 114688: 262272,
  45642. 118784: 536871040,
  45643. 122880: 0,
  45644. 126976: 17039488,
  45645. 67584: 553648256,
  45646. 71680: 16777216,
  45647. 75776: 17039360,
  45648. 79872: 537133184,
  45649. 83968: 536870912,
  45650. 88064: 17039488,
  45651. 92160: 128,
  45652. 96256: 553910272,
  45653. 100352: 262272,
  45654. 104448: 553910400,
  45655. 108544: 0,
  45656. 112640: 553648128,
  45657. 116736: 16777344,
  45658. 120832: 262144,
  45659. 124928: 537133056,
  45660. 129024: 536871040
  45661. }, {
  45662. 0: 268435464,
  45663. 256: 8192,
  45664. 512: 270532608,
  45665. 768: 270540808,
  45666. 1024: 268443648,
  45667. 1280: 2097152,
  45668. 1536: 2097160,
  45669. 1792: 268435456,
  45670. 2048: 0,
  45671. 2304: 268443656,
  45672. 2560: 2105344,
  45673. 2816: 8,
  45674. 3072: 270532616,
  45675. 3328: 2105352,
  45676. 3584: 8200,
  45677. 3840: 270540800,
  45678. 128: 270532608,
  45679. 384: 270540808,
  45680. 640: 8,
  45681. 896: 2097152,
  45682. 1152: 2105352,
  45683. 1408: 268435464,
  45684. 1664: 268443648,
  45685. 1920: 8200,
  45686. 2176: 2097160,
  45687. 2432: 8192,
  45688. 2688: 268443656,
  45689. 2944: 270532616,
  45690. 3200: 0,
  45691. 3456: 270540800,
  45692. 3712: 2105344,
  45693. 3968: 268435456,
  45694. 4096: 268443648,
  45695. 4352: 270532616,
  45696. 4608: 270540808,
  45697. 4864: 8200,
  45698. 5120: 2097152,
  45699. 5376: 268435456,
  45700. 5632: 268435464,
  45701. 5888: 2105344,
  45702. 6144: 2105352,
  45703. 6400: 0,
  45704. 6656: 8,
  45705. 6912: 270532608,
  45706. 7168: 8192,
  45707. 7424: 268443656,
  45708. 7680: 270540800,
  45709. 7936: 2097160,
  45710. 4224: 8,
  45711. 4480: 2105344,
  45712. 4736: 2097152,
  45713. 4992: 268435464,
  45714. 5248: 268443648,
  45715. 5504: 8200,
  45716. 5760: 270540808,
  45717. 6016: 270532608,
  45718. 6272: 270540800,
  45719. 6528: 270532616,
  45720. 6784: 8192,
  45721. 7040: 2105352,
  45722. 7296: 2097160,
  45723. 7552: 0,
  45724. 7808: 268435456,
  45725. 8064: 268443656
  45726. }, {
  45727. 0: 1048576,
  45728. 16: 33555457,
  45729. 32: 1024,
  45730. 48: 1049601,
  45731. 64: 34604033,
  45732. 80: 0,
  45733. 96: 1,
  45734. 112: 34603009,
  45735. 128: 33555456,
  45736. 144: 1048577,
  45737. 160: 33554433,
  45738. 176: 34604032,
  45739. 192: 34603008,
  45740. 208: 1025,
  45741. 224: 1049600,
  45742. 240: 33554432,
  45743. 8: 34603009,
  45744. 24: 0,
  45745. 40: 33555457,
  45746. 56: 34604032,
  45747. 72: 1048576,
  45748. 88: 33554433,
  45749. 104: 33554432,
  45750. 120: 1025,
  45751. 136: 1049601,
  45752. 152: 33555456,
  45753. 168: 34603008,
  45754. 184: 1048577,
  45755. 200: 1024,
  45756. 216: 34604033,
  45757. 232: 1,
  45758. 248: 1049600,
  45759. 256: 33554432,
  45760. 272: 1048576,
  45761. 288: 33555457,
  45762. 304: 34603009,
  45763. 320: 1048577,
  45764. 336: 33555456,
  45765. 352: 34604032,
  45766. 368: 1049601,
  45767. 384: 1025,
  45768. 400: 34604033,
  45769. 416: 1049600,
  45770. 432: 1,
  45771. 448: 0,
  45772. 464: 34603008,
  45773. 480: 33554433,
  45774. 496: 1024,
  45775. 264: 1049600,
  45776. 280: 33555457,
  45777. 296: 34603009,
  45778. 312: 1,
  45779. 328: 33554432,
  45780. 344: 1048576,
  45781. 360: 1025,
  45782. 376: 34604032,
  45783. 392: 33554433,
  45784. 408: 34603008,
  45785. 424: 0,
  45786. 440: 34604033,
  45787. 456: 1049601,
  45788. 472: 1024,
  45789. 488: 33555456,
  45790. 504: 1048577
  45791. }, {
  45792. 0: 134219808,
  45793. 1: 131072,
  45794. 2: 134217728,
  45795. 3: 32,
  45796. 4: 131104,
  45797. 5: 134350880,
  45798. 6: 134350848,
  45799. 7: 2048,
  45800. 8: 134348800,
  45801. 9: 134219776,
  45802. 10: 133120,
  45803. 11: 134348832,
  45804. 12: 2080,
  45805. 13: 0,
  45806. 14: 134217760,
  45807. 15: 133152,
  45808. 2147483648: 2048,
  45809. 2147483649: 134350880,
  45810. 2147483650: 134219808,
  45811. 2147483651: 134217728,
  45812. 2147483652: 134348800,
  45813. 2147483653: 133120,
  45814. 2147483654: 133152,
  45815. 2147483655: 32,
  45816. 2147483656: 134217760,
  45817. 2147483657: 2080,
  45818. 2147483658: 131104,
  45819. 2147483659: 134350848,
  45820. 2147483660: 0,
  45821. 2147483661: 134348832,
  45822. 2147483662: 134219776,
  45823. 2147483663: 131072,
  45824. 16: 133152,
  45825. 17: 134350848,
  45826. 18: 32,
  45827. 19: 2048,
  45828. 20: 134219776,
  45829. 21: 134217760,
  45830. 22: 134348832,
  45831. 23: 131072,
  45832. 24: 0,
  45833. 25: 131104,
  45834. 26: 134348800,
  45835. 27: 134219808,
  45836. 28: 134350880,
  45837. 29: 133120,
  45838. 30: 2080,
  45839. 31: 134217728,
  45840. 2147483664: 131072,
  45841. 2147483665: 2048,
  45842. 2147483666: 134348832,
  45843. 2147483667: 133152,
  45844. 2147483668: 32,
  45845. 2147483669: 134348800,
  45846. 2147483670: 134217728,
  45847. 2147483671: 134219808,
  45848. 2147483672: 134350880,
  45849. 2147483673: 134217760,
  45850. 2147483674: 134219776,
  45851. 2147483675: 0,
  45852. 2147483676: 133120,
  45853. 2147483677: 2080,
  45854. 2147483678: 131104,
  45855. 2147483679: 134350848
  45856. }],
  45857. j = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679],
  45858. k = e.DES = d.extend({
  45859. _doReset: function _doReset() {
  45860. var d,
  45861. e,
  45862. i,
  45863. j,
  45864. k,
  45865. l,
  45866. m,
  45867. a = this._key,
  45868. b = a.words,
  45869. c = [];
  45870. for (d = 0; 56 > d; d++) {
  45871. e = f[d] - 1, c[d] = 1 & b[e >>> 5] >>> 31 - e % 32;
  45872. }
  45873. for (i = this._subKeys = [], j = 0; 16 > j; j++) {
  45874. for (k = i[j] = [], l = h[j], d = 0; 24 > d; d++) {
  45875. k[0 | d / 6] |= c[(g[d] - 1 + l) % 28] << 31 - d % 6, k[4 + (0 | d / 6)] |= c[28 + (g[d + 24] - 1 + l) % 28] << 31 - d % 6;
  45876. }
  45877. for (k[0] = k[0] << 1 | k[0] >>> 31, d = 1; 7 > d; d++) {
  45878. k[d] = k[d] >>> 4 * (d - 1) + 3;
  45879. }
  45880. k[7] = k[7] << 5 | k[7] >>> 27;
  45881. }
  45882. for (m = this._invSubKeys = [], d = 0; 16 > d; d++) {
  45883. m[d] = i[15 - d];
  45884. }
  45885. },
  45886. encryptBlock: function encryptBlock(a, b) {
  45887. this._doCryptBlock(a, b, this._subKeys);
  45888. },
  45889. decryptBlock: function decryptBlock(a, b) {
  45890. this._doCryptBlock(a, b, this._invSubKeys);
  45891. },
  45892. _doCryptBlock: function _doCryptBlock(a, b, c) {
  45893. var d, e, f, g, h, k, n;
  45894. for (this._lBlock = a[b], this._rBlock = a[b + 1], l.call(this, 4, 252645135), l.call(this, 16, 65535), m.call(this, 2, 858993459), m.call(this, 8, 16711935), l.call(this, 1, 1431655765), d = 0; 16 > d; d++) {
  45895. for (e = c[d], f = this._lBlock, g = this._rBlock, h = 0, k = 0; 8 > k; k++) {
  45896. h |= i[k][((g ^ e[k]) & j[k]) >>> 0];
  45897. }
  45898. this._lBlock = g, this._rBlock = f ^ h;
  45899. }
  45900. n = this._lBlock, this._lBlock = this._rBlock, this._rBlock = n, l.call(this, 1, 1431655765), m.call(this, 8, 16711935), m.call(this, 2, 858993459), l.call(this, 16, 65535), l.call(this, 4, 252645135), a[b] = this._lBlock, a[b + 1] = this._rBlock;
  45901. },
  45902. keySize: 2,
  45903. ivSize: 2,
  45904. blockSize: 2
  45905. });
  45906. a.DES = d._createHelper(k), n = e.TripleDES = d.extend({
  45907. _doReset: function _doReset() {
  45908. var d,
  45909. e,
  45910. f,
  45911. a = this._key,
  45912. b = a.words;
  45913. if (2 !== b.length && 4 !== b.length && b.length < 6) throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
  45914. d = b.slice(0, 2), e = b.length < 4 ? b.slice(0, 2) : b.slice(2, 4), f = b.length < 6 ? b.slice(0, 2) : b.slice(4, 6), this._des1 = k.createEncryptor(c.create(d)), this._des2 = k.createEncryptor(c.create(e)), this._des3 = k.createEncryptor(c.create(f));
  45915. },
  45916. encryptBlock: function encryptBlock(a, b) {
  45917. this._des1.encryptBlock(a, b), this._des2.decryptBlock(a, b), this._des3.encryptBlock(a, b);
  45918. },
  45919. decryptBlock: function decryptBlock(a, b) {
  45920. this._des3.decryptBlock(a, b), this._des2.encryptBlock(a, b), this._des1.decryptBlock(a, b);
  45921. },
  45922. keySize: 6,
  45923. ivSize: 2,
  45924. blockSize: 2
  45925. }), a.TripleDES = d._createHelper(n);
  45926. }(), function () {
  45927. function f() {
  45928. var e,
  45929. f,
  45930. a = this._S,
  45931. b = this._i,
  45932. c = this._j,
  45933. d = 0;
  45934. for (e = 0; 4 > e; e++) {
  45935. b = (b + 1) % 256, c = (c + a[b]) % 256, f = a[b], a[b] = a[c], a[c] = f, d |= a[(a[b] + a[c]) % 256] << 24 - 8 * e;
  45936. }
  45937. return this._i = b, this._j = c, d;
  45938. }
  45939. var g,
  45940. a = CryptoJS,
  45941. b = a.lib,
  45942. c = b.StreamCipher,
  45943. d = a.algo,
  45944. e = d.RC4 = c.extend({
  45945. _doReset: function _doReset() {
  45946. var e,
  45947. f,
  45948. g,
  45949. h,
  45950. i,
  45951. a = this._key,
  45952. b = a.words,
  45953. c = a.sigBytes,
  45954. d = this._S = [];
  45955. for (e = 0; 256 > e; e++) {
  45956. d[e] = e;
  45957. }
  45958. for (e = 0, f = 0; 256 > e; e++) {
  45959. g = e % c, h = 255 & b[g >>> 2] >>> 24 - 8 * (g % 4), f = (f + d[e] + h) % 256, i = d[e], d[e] = d[f], d[f] = i;
  45960. }
  45961. this._i = this._j = 0;
  45962. },
  45963. _doProcessBlock: function _doProcessBlock(a, b) {
  45964. a[b] ^= f.call(this);
  45965. },
  45966. keySize: 8,
  45967. ivSize: 0
  45968. });
  45969. a.RC4 = c._createHelper(e), g = d.RC4Drop = e.extend({
  45970. cfg: e.cfg.extend({
  45971. drop: 192
  45972. }),
  45973. _doReset: function _doReset() {
  45974. e._doReset.call(this);
  45975. for (var a = this.cfg.drop; a > 0; a--) {
  45976. f.call(this);
  45977. }
  45978. }
  45979. }), a.RC4Drop = c._createHelper(g);
  45980. }(), CryptoJS.mode.CTRGladman = function () {
  45981. function b(a) {
  45982. var b, c, d;
  45983. return 255 === (255 & a >> 24) ? (b = 255 & a >> 16, c = 255 & a >> 8, d = 255 & a, 255 === b ? (b = 0, 255 === c ? (c = 0, 255 === d ? d = 0 : ++d) : ++c) : ++b, a = 0, a += b << 16, a += c << 8, a += d) : a += 1 << 24, a;
  45984. }
  45985. function c(a) {
  45986. return 0 === (a[0] = b(a[0])) && (a[1] = b(a[1])), a;
  45987. }
  45988. var a = CryptoJS.lib.BlockCipherMode.extend(),
  45989. d = a.Encryptor = a.extend({
  45990. processBlock: function processBlock(a, b) {
  45991. var h,
  45992. i,
  45993. d = this._cipher,
  45994. e = d.blockSize,
  45995. f = this._iv,
  45996. g = this._counter;
  45997. for (f && (g = this._counter = f.slice(0), this._iv = void 0), c(g), h = g.slice(0), d.encryptBlock(h, 0), i = 0; e > i; i++) {
  45998. a[b + i] ^= h[i];
  45999. }
  46000. }
  46001. });
  46002. return a.Decryptor = d, a;
  46003. }(), function () {
  46004. function i() {
  46005. var c,
  46006. d,
  46007. e,
  46008. h,
  46009. i,
  46010. j,
  46011. a = this._X,
  46012. b = this._C;
  46013. for (c = 0; 8 > c; c++) {
  46014. f[c] = b[c];
  46015. }
  46016. for (b[0] = 0 | b[0] + 1295307597 + this._b, b[1] = 0 | b[1] + 3545052371 + (b[0] >>> 0 < f[0] >>> 0 ? 1 : 0), b[2] = 0 | b[2] + 886263092 + (b[1] >>> 0 < f[1] >>> 0 ? 1 : 0), b[3] = 0 | b[3] + 1295307597 + (b[2] >>> 0 < f[2] >>> 0 ? 1 : 0), b[4] = 0 | b[4] + 3545052371 + (b[3] >>> 0 < f[3] >>> 0 ? 1 : 0), b[5] = 0 | b[5] + 886263092 + (b[4] >>> 0 < f[4] >>> 0 ? 1 : 0), b[6] = 0 | b[6] + 1295307597 + (b[5] >>> 0 < f[5] >>> 0 ? 1 : 0), b[7] = 0 | b[7] + 3545052371 + (b[6] >>> 0 < f[6] >>> 0 ? 1 : 0), this._b = b[7] >>> 0 < f[7] >>> 0 ? 1 : 0, c = 0; 8 > c; c++) {
  46017. d = a[c] + b[c], e = 65535 & d, h = d >>> 16, i = ((e * e >>> 17) + e * h >>> 15) + h * h, j = (0 | (4294901760 & d) * d) + (0 | (65535 & d) * d), g[c] = i ^ j;
  46018. }
  46019. a[0] = 0 | g[0] + (g[7] << 16 | g[7] >>> 16) + (g[6] << 16 | g[6] >>> 16), a[1] = 0 | g[1] + (g[0] << 8 | g[0] >>> 24) + g[7], a[2] = 0 | g[2] + (g[1] << 16 | g[1] >>> 16) + (g[0] << 16 | g[0] >>> 16), a[3] = 0 | g[3] + (g[2] << 8 | g[2] >>> 24) + g[1], a[4] = 0 | g[4] + (g[3] << 16 | g[3] >>> 16) + (g[2] << 16 | g[2] >>> 16), a[5] = 0 | g[5] + (g[4] << 8 | g[4] >>> 24) + g[3], a[6] = 0 | g[6] + (g[5] << 16 | g[5] >>> 16) + (g[4] << 16 | g[4] >>> 16), a[7] = 0 | g[7] + (g[6] << 8 | g[6] >>> 24) + g[5];
  46020. }
  46021. var a = CryptoJS,
  46022. b = a.lib,
  46023. c = b.StreamCipher,
  46024. d = a.algo,
  46025. e = [],
  46026. f = [],
  46027. g = [],
  46028. h = d.Rabbit = c.extend({
  46029. _doReset: function _doReset() {
  46030. var c,
  46031. d,
  46032. e,
  46033. f,
  46034. g,
  46035. h,
  46036. j,
  46037. k,
  46038. l,
  46039. m,
  46040. a = this._key.words,
  46041. b = this.cfg.iv;
  46042. for (c = 0; 4 > c; c++) {
  46043. a[c] = 16711935 & (a[c] << 8 | a[c] >>> 24) | 4278255360 & (a[c] << 24 | a[c] >>> 8);
  46044. }
  46045. for (d = this._X = [a[0], a[3] << 16 | a[2] >>> 16, a[1], a[0] << 16 | a[3] >>> 16, a[2], a[1] << 16 | a[0] >>> 16, a[3], a[2] << 16 | a[1] >>> 16], e = this._C = [a[2] << 16 | a[2] >>> 16, 4294901760 & a[0] | 65535 & a[1], a[3] << 16 | a[3] >>> 16, 4294901760 & a[1] | 65535 & a[2], a[0] << 16 | a[0] >>> 16, 4294901760 & a[2] | 65535 & a[3], a[1] << 16 | a[1] >>> 16, 4294901760 & a[3] | 65535 & a[0]], this._b = 0, c = 0; 4 > c; c++) {
  46046. i.call(this);
  46047. }
  46048. for (c = 0; 8 > c; c++) {
  46049. e[c] ^= d[7 & c + 4];
  46050. }
  46051. if (b) for (f = b.words, g = f[0], h = f[1], j = 16711935 & (g << 8 | g >>> 24) | 4278255360 & (g << 24 | g >>> 8), k = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8), l = j >>> 16 | 4294901760 & k, m = k << 16 | 65535 & j, e[0] ^= j, e[1] ^= l, e[2] ^= k, e[3] ^= m, e[4] ^= j, e[5] ^= l, e[6] ^= k, e[7] ^= m, c = 0; 4 > c; c++) {
  46052. i.call(this);
  46053. }
  46054. },
  46055. _doProcessBlock: function _doProcessBlock(a, b) {
  46056. var d,
  46057. c = this._X;
  46058. for (i.call(this), e[0] = c[0] ^ c[5] >>> 16 ^ c[3] << 16, e[1] = c[2] ^ c[7] >>> 16 ^ c[5] << 16, e[2] = c[4] ^ c[1] >>> 16 ^ c[7] << 16, e[3] = c[6] ^ c[3] >>> 16 ^ c[1] << 16, d = 0; 4 > d; d++) {
  46059. e[d] = 16711935 & (e[d] << 8 | e[d] >>> 24) | 4278255360 & (e[d] << 24 | e[d] >>> 8), a[b + d] ^= e[d];
  46060. }
  46061. },
  46062. blockSize: 4,
  46063. ivSize: 2
  46064. });
  46065. a.Rabbit = c._createHelper(h);
  46066. }(), CryptoJS.mode.CTR = function () {
  46067. var a = CryptoJS.lib.BlockCipherMode.extend(),
  46068. b = a.Encryptor = a.extend({
  46069. processBlock: function processBlock(a, b) {
  46070. var g,
  46071. h,
  46072. c = this._cipher,
  46073. d = c.blockSize,
  46074. e = this._iv,
  46075. f = this._counter;
  46076. for (e && (f = this._counter = e.slice(0), this._iv = void 0), g = f.slice(0), c.encryptBlock(g, 0), f[d - 1] = 0 | f[d - 1] + 1, h = 0; d > h; h++) {
  46077. a[b + h] ^= g[h];
  46078. }
  46079. }
  46080. });
  46081. return a.Decryptor = b, a;
  46082. }(), function () {
  46083. function i() {
  46084. var c,
  46085. d,
  46086. e,
  46087. h,
  46088. i,
  46089. j,
  46090. a = this._X,
  46091. b = this._C;
  46092. for (c = 0; 8 > c; c++) {
  46093. f[c] = b[c];
  46094. }
  46095. for (b[0] = 0 | b[0] + 1295307597 + this._b, b[1] = 0 | b[1] + 3545052371 + (b[0] >>> 0 < f[0] >>> 0 ? 1 : 0), b[2] = 0 | b[2] + 886263092 + (b[1] >>> 0 < f[1] >>> 0 ? 1 : 0), b[3] = 0 | b[3] + 1295307597 + (b[2] >>> 0 < f[2] >>> 0 ? 1 : 0), b[4] = 0 | b[4] + 3545052371 + (b[3] >>> 0 < f[3] >>> 0 ? 1 : 0), b[5] = 0 | b[5] + 886263092 + (b[4] >>> 0 < f[4] >>> 0 ? 1 : 0), b[6] = 0 | b[6] + 1295307597 + (b[5] >>> 0 < f[5] >>> 0 ? 1 : 0), b[7] = 0 | b[7] + 3545052371 + (b[6] >>> 0 < f[6] >>> 0 ? 1 : 0), this._b = b[7] >>> 0 < f[7] >>> 0 ? 1 : 0, c = 0; 8 > c; c++) {
  46096. d = a[c] + b[c], e = 65535 & d, h = d >>> 16, i = ((e * e >>> 17) + e * h >>> 15) + h * h, j = (0 | (4294901760 & d) * d) + (0 | (65535 & d) * d), g[c] = i ^ j;
  46097. }
  46098. a[0] = 0 | g[0] + (g[7] << 16 | g[7] >>> 16) + (g[6] << 16 | g[6] >>> 16), a[1] = 0 | g[1] + (g[0] << 8 | g[0] >>> 24) + g[7], a[2] = 0 | g[2] + (g[1] << 16 | g[1] >>> 16) + (g[0] << 16 | g[0] >>> 16), a[3] = 0 | g[3] + (g[2] << 8 | g[2] >>> 24) + g[1], a[4] = 0 | g[4] + (g[3] << 16 | g[3] >>> 16) + (g[2] << 16 | g[2] >>> 16), a[5] = 0 | g[5] + (g[4] << 8 | g[4] >>> 24) + g[3], a[6] = 0 | g[6] + (g[5] << 16 | g[5] >>> 16) + (g[4] << 16 | g[4] >>> 16), a[7] = 0 | g[7] + (g[6] << 8 | g[6] >>> 24) + g[5];
  46099. }
  46100. var a = CryptoJS,
  46101. b = a.lib,
  46102. c = b.StreamCipher,
  46103. d = a.algo,
  46104. e = [],
  46105. f = [],
  46106. g = [],
  46107. h = d.RabbitLegacy = c.extend({
  46108. _doReset: function _doReset() {
  46109. var e,
  46110. f,
  46111. g,
  46112. h,
  46113. j,
  46114. k,
  46115. l,
  46116. m,
  46117. a = this._key.words,
  46118. b = this.cfg.iv,
  46119. c = this._X = [a[0], a[3] << 16 | a[2] >>> 16, a[1], a[0] << 16 | a[3] >>> 16, a[2], a[1] << 16 | a[0] >>> 16, a[3], a[2] << 16 | a[1] >>> 16],
  46120. d = this._C = [a[2] << 16 | a[2] >>> 16, 4294901760 & a[0] | 65535 & a[1], a[3] << 16 | a[3] >>> 16, 4294901760 & a[1] | 65535 & a[2], a[0] << 16 | a[0] >>> 16, 4294901760 & a[2] | 65535 & a[3], a[1] << 16 | a[1] >>> 16, 4294901760 & a[3] | 65535 & a[0]];
  46121. for (this._b = 0, e = 0; 4 > e; e++) {
  46122. i.call(this);
  46123. }
  46124. for (e = 0; 8 > e; e++) {
  46125. d[e] ^= c[7 & e + 4];
  46126. }
  46127. if (b) for (f = b.words, g = f[0], h = f[1], j = 16711935 & (g << 8 | g >>> 24) | 4278255360 & (g << 24 | g >>> 8), k = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8), l = j >>> 16 | 4294901760 & k, m = k << 16 | 65535 & j, d[0] ^= j, d[1] ^= l, d[2] ^= k, d[3] ^= m, d[4] ^= j, d[5] ^= l, d[6] ^= k, d[7] ^= m, e = 0; 4 > e; e++) {
  46128. i.call(this);
  46129. }
  46130. },
  46131. _doProcessBlock: function _doProcessBlock(a, b) {
  46132. var d,
  46133. c = this._X;
  46134. for (i.call(this), e[0] = c[0] ^ c[5] >>> 16 ^ c[3] << 16, e[1] = c[2] ^ c[7] >>> 16 ^ c[5] << 16, e[2] = c[4] ^ c[1] >>> 16 ^ c[7] << 16, e[3] = c[6] ^ c[3] >>> 16 ^ c[1] << 16, d = 0; 4 > d; d++) {
  46135. e[d] = 16711935 & (e[d] << 8 | e[d] >>> 24) | 4278255360 & (e[d] << 24 | e[d] >>> 8), a[b + d] ^= e[d];
  46136. }
  46137. },
  46138. blockSize: 4,
  46139. ivSize: 2
  46140. });
  46141. a.RabbitLegacy = c._createHelper(h);
  46142. }(), CryptoJS.pad.ZeroPadding = {
  46143. pad: function pad(a, b) {
  46144. var c = 4 * b;
  46145. a.clamp(), a.sigBytes += c - (a.sigBytes % c || c);
  46146. },
  46147. unpad: function unpad(a) {
  46148. var b = a.words,
  46149. c = a.sigBytes - 1;
  46150. for (c = a.sigBytes - 1; c >= 0; c--) {
  46151. if (255 & b[c >>> 2] >>> 24 - 8 * (c % 4)) {
  46152. a.sigBytes = c + 1;
  46153. break;
  46154. }
  46155. }
  46156. }
  46157. };
  46158. try {} catch (e) {}
  46159. !function (a, b) {
  46160. "object" == ( false ? undefined : _typeof(exports)) && "undefined" != typeof module ? b(exports) : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (b),
  46161. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  46162. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  46163. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
  46164. }(this, function (a) {
  46165. "use strict";
  46166. function c(a) {
  46167. return b.charAt(a);
  46168. }
  46169. function d(a, b) {
  46170. return a & b;
  46171. }
  46172. function e(a, b) {
  46173. return a | b;
  46174. }
  46175. function f(a, b) {
  46176. return a ^ b;
  46177. }
  46178. function g(a, b) {
  46179. return a & ~b;
  46180. }
  46181. function h(a) {
  46182. if (0 == a) return -1;
  46183. var b = 0;
  46184. return 0 == (65535 & a) && (a >>= 16, b += 16), 0 == (255 & a) && (a >>= 8, b += 8), 0 == (15 & a) && (a >>= 4, b += 4), 0 == (3 & a) && (a >>= 2, b += 2), 0 == (1 & a) && ++b, b;
  46185. }
  46186. function i(a) {
  46187. for (var b = 0; 0 != a;) {
  46188. a &= a - 1, ++b;
  46189. }
  46190. return b;
  46191. }
  46192. function l(a) {
  46193. var b,
  46194. c,
  46195. d = "";
  46196. for (b = 0; b + 3 <= a.length; b += 3) {
  46197. c = parseInt(a.substring(b, b + 3), 16), d += j.charAt(c >> 6) + j.charAt(63 & c);
  46198. }
  46199. for (b + 1 == a.length ? (c = parseInt(a.substring(b, b + 1), 16), d += j.charAt(c << 2)) : b + 2 == a.length && (c = parseInt(a.substring(b, b + 2), 16), d += j.charAt(c >> 2) + j.charAt((3 & c) << 4)); (3 & d.length) > 0;) {
  46200. d += k;
  46201. }
  46202. return d;
  46203. }
  46204. function m(a) {
  46205. var d,
  46206. g,
  46207. b = "",
  46208. e = 0,
  46209. f = 0;
  46210. for (d = 0; d < a.length && a.charAt(d) != k; ++d) {
  46211. g = j.indexOf(a.charAt(d)), 0 > g || (0 == e ? (b += c(g >> 2), f = 3 & g, e = 1) : 1 == e ? (b += c(f << 2 | g >> 4), f = 15 & g, e = 2) : 2 == e ? (b += c(f), b += c(g >> 2), f = 3 & g, e = 3) : (b += c(f << 2 | g >> 4), b += c(15 & g), e = 0));
  46212. }
  46213. return 1 == e && (b += c(f << 2)), b;
  46214. }
  46215. function o(a, b) {
  46216. function c() {
  46217. this.constructor = a;
  46218. }
  46219. _n(a, b), a.prototype = null === b ? Object.create(b) : (c.prototype = b.prototype, new c());
  46220. }
  46221. function y(a, b) {
  46222. return a.length > b && (a = a.substring(0, b) + v), a;
  46223. }
  46224. function M() {
  46225. return new H(null);
  46226. }
  46227. function N(a, b) {
  46228. return new H(a, b);
  46229. }
  46230. function Q(a, b, c, d, e, f) {
  46231. for (var i, j, k, g = 16383 & b, h = b >> 14; --f >= 0;) {
  46232. i = 16383 & this[a], j = this[a++] >> 14, k = h * i + j * g, i = g * i + ((16383 & k) << 14) + c[d] + e, e = (i >> 28) + (k >> 14) + h * j, c[d++] = 268435455 & i;
  46233. }
  46234. return e;
  46235. }
  46236. function V(a, b) {
  46237. var c = S[a.charCodeAt(b)];
  46238. return null == c ? -1 : c;
  46239. }
  46240. function W(a) {
  46241. var b = M();
  46242. return b.fromInt(a), b;
  46243. }
  46244. function X(a) {
  46245. var c,
  46246. b = 1;
  46247. return 0 != (c = a >>> 16) && (a = c, b += 16), 0 != (c = a >> 8) && (a = c, b += 8), 0 != (c = a >> 4) && (a = c, b += 4), 0 != (c = a >> 2) && (a = c, b += 2), 0 != (c = a >> 1) && (a = c, b += 1), b;
  46248. }
  46249. function Z() {
  46250. return new Y();
  46251. }
  46252. function fb() {
  46253. if (null == _) {
  46254. for (_ = Z(); $ > bb;) {
  46255. var a = Math.floor(65536 * Math.random());
  46256. ab[bb++] = 255 & a;
  46257. }
  46258. for (_.init(ab), bb = 0; bb < ab.length; ++bb) {
  46259. ab[bb] = 0;
  46260. }
  46261. bb = 0;
  46262. }
  46263. return _.next();
  46264. }
  46265. function hb(a, b) {
  46266. var c, d, e, f;
  46267. if (b < a.length + 22) return console.error("Message too long for RSA"), null;
  46268. for (c = b - a.length - 6, d = "", e = 0; c > e; e += 2) {
  46269. d += "ff";
  46270. }
  46271. return f = "0001" + d + "00" + a, N(f, 16);
  46272. }
  46273. function ib(a, b) {
  46274. var c, d, e, f, g;
  46275. if (b < a.length + 11) return console.error("Message too long for RSA"), null;
  46276. for (c = [], d = a.length - 1; d >= 0 && b > 0;) {
  46277. e = a.charCodeAt(d--), 128 > e ? c[--b] = e : e > 127 && 2048 > e ? (c[--b] = 128 | 63 & e, c[--b] = 192 | e >> 6) : (c[--b] = 128 | 63 & e, c[--b] = 128 | 63 & e >> 6, c[--b] = 224 | e >> 12);
  46278. }
  46279. for (c[--b] = 0, f = new gb(), g = []; b > 2;) {
  46280. for (g[0] = 0; 0 == g[0];) {
  46281. f.nextBytes(g);
  46282. }
  46283. c[--b] = g[0];
  46284. }
  46285. return c[--b] = 2, c[--b] = 0, new H(c);
  46286. }
  46287. function kb(a, b) {
  46288. for (var e, f, c = a.toByteArray(), d = 0; d < c.length && 0 == c[d];) {
  46289. ++d;
  46290. }
  46291. if (c.length - d != b - 1 || 2 != c[d]) return null;
  46292. for (++d; 0 != c[d];) {
  46293. if (++d >= c.length) return null;
  46294. }
  46295. for (e = ""; ++d < c.length;) {
  46296. f = 255 & c[d], 128 > f ? e += String.fromCharCode(f) : f > 191 && 224 > f ? (e += String.fromCharCode((31 & f) << 6 | 63 & c[d + 1]), ++d) : (e += String.fromCharCode((15 & f) << 12 | (63 & c[d + 1]) << 6 | 63 & c[d + 2]), d += 2);
  46297. }
  46298. return e;
  46299. }
  46300. function mb(a) {
  46301. return lb[a] || "";
  46302. }
  46303. function nb(a) {
  46304. var b, c, d;
  46305. for (b in lb) {
  46306. if (lb.hasOwnProperty(b) && (c = lb[b], d = c.length, a.substr(0, d) == c)) return a.substr(d);
  46307. }
  46308. return a;
  46309. }
  46310. var p,
  46311. r,
  46312. C,
  46313. R,
  46314. S,
  46315. T,
  46316. U,
  46317. Y,
  46318. $,
  46319. _,
  46320. ab,
  46321. bb,
  46322. cb,
  46323. db,
  46324. gb,
  46325. jb,
  46326. lb,
  46327. ob,
  46328. pb,
  46329. qb,
  46330. rb,
  46331. b = "0123456789abcdefghijklmnopqrstuvwxyz",
  46332. j = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
  46333. k = "=",
  46334. _n = function n(a, b) {
  46335. return _n = Object.setPrototypeOf || {
  46336. __proto__: []
  46337. } instanceof Array && function (a, b) {
  46338. a.__proto__ = b;
  46339. } || function (a, b) {
  46340. for (var c in b) {
  46341. b.hasOwnProperty(c) && (a[c] = b[c]);
  46342. }
  46343. }, _n(a, b);
  46344. },
  46345. q = {
  46346. decode: function decode(a) {
  46347. var b, c, d, e, f, g, h;
  46348. if (void 0 === p) {
  46349. for (c = "0123456789ABCDEF", d = " \f\n\r\t\xA0\u2028\u2029", p = {}, b = 0; 16 > b; ++b) {
  46350. p[c.charAt(b)] = b;
  46351. }
  46352. for (c = c.toLowerCase(), b = 10; 16 > b; ++b) {
  46353. p[c.charAt(b)] = b;
  46354. }
  46355. for (b = 0; b < d.length; ++b) {
  46356. p[d.charAt(b)] = -1;
  46357. }
  46358. }
  46359. for (e = [], f = 0, g = 0, b = 0; b < a.length && (h = a.charAt(b), "=" != h); ++b) {
  46360. if (h = p[h], -1 != h) {
  46361. if (void 0 === h) throw new Error("Illegal character at offset " + b);
  46362. f |= h, ++g >= 2 ? (e[e.length] = f, f = 0, g = 0) : f <<= 4;
  46363. }
  46364. }
  46365. if (g) throw new Error("Hex encoding incomplete: 4 bits missing");
  46366. return e;
  46367. }
  46368. },
  46369. s = {
  46370. decode: function decode(a) {
  46371. var b, c, d, e, f, g, h;
  46372. if (void 0 === r) {
  46373. for (c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", d = "= \f\n\r\t\xA0\u2028\u2029", r = Object.create(null), b = 0; 64 > b; ++b) {
  46374. r[c.charAt(b)] = b;
  46375. }
  46376. for (b = 0; b < d.length; ++b) {
  46377. r[d.charAt(b)] = -1;
  46378. }
  46379. }
  46380. for (e = [], f = 0, g = 0, b = 0; b < a.length && (h = a.charAt(b), "=" != h); ++b) {
  46381. if (h = r[h], -1 != h) {
  46382. if (void 0 === h) throw new Error("Illegal character at offset " + b);
  46383. f |= h, ++g >= 4 ? (e[e.length] = f >> 16, e[e.length] = 255 & f >> 8, e[e.length] = 255 & f, f = 0, g = 0) : f <<= 6;
  46384. }
  46385. }
  46386. switch (g) {
  46387. case 1:
  46388. throw new Error("Base64 encoding incomplete: at least 2 bits missing");
  46389. case 2:
  46390. e[e.length] = f >> 10;
  46391. break;
  46392. case 3:
  46393. e[e.length] = f >> 16, e[e.length] = 255 & f >> 8;
  46394. }
  46395. return e;
  46396. },
  46397. re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
  46398. unarmor: function unarmor(a) {
  46399. var b = s.re.exec(a);
  46400. if (b) if (b[1]) a = b[1];else {
  46401. if (!b[2]) throw new Error("RegExp out of sync");
  46402. a = b[2];
  46403. }
  46404. return s.decode(a);
  46405. }
  46406. },
  46407. t = 1e13,
  46408. u = function () {
  46409. function a(a) {
  46410. this.buf = [+a || 0];
  46411. }
  46412. return a.prototype.mulAdd = function (a, b) {
  46413. var e,
  46414. f,
  46415. c = this.buf,
  46416. d = c.length;
  46417. for (e = 0; d > e; ++e) {
  46418. f = c[e] * a + b, t > f ? b = 0 : (b = 0 | f / t, f -= b * t), c[e] = f;
  46419. }
  46420. b > 0 && (c[e] = b);
  46421. }, a.prototype.sub = function (a) {
  46422. var d,
  46423. e,
  46424. b = this.buf,
  46425. c = b.length;
  46426. for (d = 0; c > d; ++d) {
  46427. e = b[d] - a, 0 > e ? (e += t, a = 1) : a = 0, b[d] = e;
  46428. }
  46429. for (; 0 === b[b.length - 1];) {
  46430. b.pop();
  46431. }
  46432. }, a.prototype.toString = function (a) {
  46433. var b, c, d;
  46434. if (10 != (a || 10)) throw new Error("only base 10 is supported");
  46435. for (b = this.buf, c = b[b.length - 1].toString(), d = b.length - 2; d >= 0; --d) {
  46436. c += (t + b[d]).toString().substring(1);
  46437. }
  46438. return c;
  46439. }, a.prototype.valueOf = function () {
  46440. var c,
  46441. a = this.buf,
  46442. b = 0;
  46443. for (c = a.length - 1; c >= 0; --c) {
  46444. b = b * t + a[c];
  46445. }
  46446. return b;
  46447. }, a.prototype.simplify = function () {
  46448. var a = this.buf;
  46449. return 1 == a.length ? a[0] : this;
  46450. }, a;
  46451. }(),
  46452. v = "…",
  46453. w = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,
  46454. x = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,
  46455. z = function () {
  46456. function a(b, c) {
  46457. this.hexDigits = "0123456789ABCDEF", b instanceof a ? (this.enc = b.enc, this.pos = b.pos) : (this.enc = b, this.pos = c);
  46458. }
  46459. return a.prototype.get = function (a) {
  46460. if (void 0 === a && (a = this.pos++), a >= this.enc.length) throw new Error("Requesting byte offset " + a + " on a stream of length " + this.enc.length);
  46461. return "string" == typeof this.enc ? this.enc.charCodeAt(a) : this.enc[a];
  46462. }, a.prototype.hexByte = function (a) {
  46463. return this.hexDigits.charAt(15 & a >> 4) + this.hexDigits.charAt(15 & a);
  46464. }, a.prototype.hexDump = function (a, b, c) {
  46465. var e,
  46466. d = "";
  46467. for (e = a; b > e; ++e) {
  46468. if (d += this.hexByte(this.get(e)), c !== !0) switch (15 & e) {
  46469. case 7:
  46470. d += " ";
  46471. break;
  46472. case 15:
  46473. d += "\n";
  46474. break;
  46475. default:
  46476. d += " ";
  46477. }
  46478. }
  46479. return d;
  46480. }, a.prototype.isASCII = function (a, b) {
  46481. var c, d;
  46482. for (c = a; b > c; ++c) {
  46483. if (d = this.get(c), 32 > d || d > 176) return !1;
  46484. }
  46485. return !0;
  46486. }, a.prototype.parseStringISO = function (a, b) {
  46487. var d,
  46488. c = "";
  46489. for (d = a; b > d; ++d) {
  46490. c += String.fromCharCode(this.get(d));
  46491. }
  46492. return c;
  46493. }, a.prototype.parseStringUTF = function (a, b) {
  46494. var d,
  46495. e,
  46496. c = "";
  46497. for (d = a; b > d;) {
  46498. e = this.get(d++), c += 128 > e ? String.fromCharCode(e) : e > 191 && 224 > e ? String.fromCharCode((31 & e) << 6 | 63 & this.get(d++)) : String.fromCharCode((15 & e) << 12 | (63 & this.get(d++)) << 6 | 63 & this.get(d++));
  46499. }
  46500. return c;
  46501. }, a.prototype.parseStringBMP = function (a, b) {
  46502. var d,
  46503. e,
  46504. f,
  46505. c = "";
  46506. for (f = a; b > f;) {
  46507. d = this.get(f++), e = this.get(f++), c += String.fromCharCode(d << 8 | e);
  46508. }
  46509. return c;
  46510. }, a.prototype.parseTime = function (a, b, c) {
  46511. var d = this.parseStringISO(a, b),
  46512. e = (c ? w : x).exec(d);
  46513. return e ? (c && (e[1] = +e[1], e[1] += +e[1] < 70 ? 2e3 : 1900), d = e[1] + "-" + e[2] + "-" + e[3] + " " + e[4], e[5] && (d += ":" + e[5], e[6] && (d += ":" + e[6], e[7] && (d += "." + e[7]))), e[8] && (d += " UTC", "Z" != e[8] && (d += e[8], e[9] && (d += ":" + e[9]))), d) : "Unrecognized time: " + d;
  46514. }, a.prototype.parseInteger = function (a, b) {
  46515. for (var f, h, i, c = this.get(a), d = c > 127, e = d ? 255 : 0, g = ""; c == e && ++a < b;) {
  46516. c = this.get(a);
  46517. }
  46518. if (f = b - a, 0 === f) return d ? -1 : 0;
  46519. if (f > 4) {
  46520. for (g = c, f <<= 3; 0 == (128 & (+g ^ e));) {
  46521. g = +g << 1, --f;
  46522. }
  46523. g = "(" + f + " bit)\n";
  46524. }
  46525. for (d && (c -= 256), h = new u(c), i = a + 1; b > i; ++i) {
  46526. h.mulAdd(256, this.get(i));
  46527. }
  46528. return g + h.toString();
  46529. }, a.prototype.parseBitString = function (a, b, c) {
  46530. var h,
  46531. i,
  46532. j,
  46533. k,
  46534. d = this.get(a),
  46535. e = (b - a - 1 << 3) - d,
  46536. f = "(" + e + " bit)\n",
  46537. g = "";
  46538. for (h = a + 1; b > h; ++h) {
  46539. for (i = this.get(h), j = h == b - 1 ? d : 0, k = 7; k >= j; --k) {
  46540. g += 1 & i >> k ? "1" : "0";
  46541. }
  46542. if (g.length > c) return f + y(g, c);
  46543. }
  46544. return f + g;
  46545. }, a.prototype.parseOctetString = function (a, b, c) {
  46546. var d, e, f;
  46547. if (this.isASCII(a, b)) return y(this.parseStringISO(a, b), c);
  46548. for (d = b - a, e = "(" + d + " byte)\n", c /= 2, d > c && (b = a + c), f = a; b > f; ++f) {
  46549. e += this.hexByte(this.get(f));
  46550. }
  46551. return d > c && (e += v), e;
  46552. }, a.prototype.parseOID = function (a, b, c) {
  46553. var g,
  46554. h,
  46555. i,
  46556. d = "",
  46557. e = new u(),
  46558. f = 0;
  46559. for (g = a; b > g; ++g) {
  46560. if (h = this.get(g), e.mulAdd(128, 127 & h), f += 7, !(128 & h)) {
  46561. if ("" === d ? (e = e.simplify(), e instanceof u ? (e.sub(80), d = "2." + e.toString()) : (i = 80 > e ? 40 > e ? 0 : 1 : 2, d = i + "." + (e - 40 * i))) : d += "." + e.toString(), d.length > c) return y(d, c);
  46562. e = new u(), f = 0;
  46563. }
  46564. }
  46565. return f > 0 && (d += ".incomplete"), d;
  46566. }, a;
  46567. }(),
  46568. A = function () {
  46569. function a(a, b, c, d, e) {
  46570. if (!(d instanceof B)) throw new Error("Invalid tag value.");
  46571. this.stream = a, this.header = b, this.length = c, this.tag = d, this.sub = e;
  46572. }
  46573. return a.prototype.typeName = function () {
  46574. switch (this.tag.tagClass) {
  46575. case 0:
  46576. switch (this.tag.tagNumber) {
  46577. case 0:
  46578. return "EOC";
  46579. case 1:
  46580. return "BOOLEAN";
  46581. case 2:
  46582. return "INTEGER";
  46583. case 3:
  46584. return "BIT_STRING";
  46585. case 4:
  46586. return "OCTET_STRING";
  46587. case 5:
  46588. return "NULL";
  46589. case 6:
  46590. return "OBJECT_IDENTIFIER";
  46591. case 7:
  46592. return "ObjectDescriptor";
  46593. case 8:
  46594. return "EXTERNAL";
  46595. case 9:
  46596. return "REAL";
  46597. case 10:
  46598. return "ENUMERATED";
  46599. case 11:
  46600. return "EMBEDDED_PDV";
  46601. case 12:
  46602. return "UTF8String";
  46603. case 16:
  46604. return "SEQUENCE";
  46605. case 17:
  46606. return "SET";
  46607. case 18:
  46608. return "NumericString";
  46609. case 19:
  46610. return "PrintableString";
  46611. case 20:
  46612. return "TeletexString";
  46613. case 21:
  46614. return "VideotexString";
  46615. case 22:
  46616. return "IA5String";
  46617. case 23:
  46618. return "UTCTime";
  46619. case 24:
  46620. return "GeneralizedTime";
  46621. case 25:
  46622. return "GraphicString";
  46623. case 26:
  46624. return "VisibleString";
  46625. case 27:
  46626. return "GeneralString";
  46627. case 28:
  46628. return "UniversalString";
  46629. case 30:
  46630. return "BMPString";
  46631. }
  46632. return "Universal_" + this.tag.tagNumber.toString();
  46633. case 1:
  46634. return "Application_" + this.tag.tagNumber.toString();
  46635. case 2:
  46636. return "[" + this.tag.tagNumber.toString() + "]";
  46637. case 3:
  46638. return "Private_" + this.tag.tagNumber.toString();
  46639. }
  46640. }, a.prototype.content = function (a) {
  46641. var b, c;
  46642. if (void 0 === this.tag) return null;
  46643. if (void 0 === a && (a = 1 / 0), b = this.posContent(), c = Math.abs(this.length), !this.tag.isUniversal()) return null !== this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(b, b + c, a);
  46644. switch (this.tag.tagNumber) {
  46645. case 1:
  46646. return 0 === this.stream.get(b) ? "false" : "true";
  46647. case 2:
  46648. return this.stream.parseInteger(b, b + c);
  46649. case 3:
  46650. return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseBitString(b, b + c, a);
  46651. case 4:
  46652. return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(b, b + c, a);
  46653. case 6:
  46654. return this.stream.parseOID(b, b + c, a);
  46655. case 16:
  46656. case 17:
  46657. return null !== this.sub ? "(" + this.sub.length + " elem)" : "(no elem)";
  46658. case 12:
  46659. return y(this.stream.parseStringUTF(b, b + c), a);
  46660. case 18:
  46661. case 19:
  46662. case 20:
  46663. case 21:
  46664. case 22:
  46665. case 26:
  46666. return y(this.stream.parseStringISO(b, b + c), a);
  46667. case 30:
  46668. return y(this.stream.parseStringBMP(b, b + c), a);
  46669. case 23:
  46670. case 24:
  46671. return this.stream.parseTime(b, b + c, 23 == this.tag.tagNumber);
  46672. }
  46673. return null;
  46674. }, a.prototype.toString = function () {
  46675. return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (null === this.sub ? "null" : this.sub.length) + "]";
  46676. }, a.prototype.toPrettyString = function (a) {
  46677. var b, c, d;
  46678. if (void 0 === a && (a = ""), b = a + this.typeName() + " @" + this.stream.pos, this.length >= 0 && (b += "+"), b += this.length, this.tag.tagConstructed ? b += " (constructed)" : !this.tag.isUniversal() || 3 != this.tag.tagNumber && 4 != this.tag.tagNumber || null === this.sub || (b += " (encapsulates)"), b += "\n", null !== this.sub) for (a += " ", c = 0, d = this.sub.length; d > c; ++c) {
  46679. b += this.sub[c].toPrettyString(a);
  46680. }
  46681. return b;
  46682. }, a.prototype.posStart = function () {
  46683. return this.stream.pos;
  46684. }, a.prototype.posContent = function () {
  46685. return this.stream.pos + this.header;
  46686. }, a.prototype.posEnd = function () {
  46687. return this.stream.pos + this.header + Math.abs(this.length);
  46688. }, a.prototype.toHexString = function () {
  46689. return this.stream.hexDump(this.posStart(), this.posEnd(), !0);
  46690. }, a.decodeLength = function (a) {
  46691. var d,
  46692. b = a.get(),
  46693. c = 127 & b;
  46694. if (c == b) return c;
  46695. if (c > 6) throw new Error("Length over 48 bits not supported at position " + (a.pos - 1));
  46696. if (0 === c) return null;
  46697. for (b = 0, d = 0; c > d; ++d) {
  46698. b = 256 * b + a.get();
  46699. }
  46700. return b;
  46701. }, a.prototype.getHexStringValue = function () {
  46702. var a = this.toHexString(),
  46703. b = 2 * this.header,
  46704. c = 2 * this.length;
  46705. return a.substr(b, c);
  46706. }, a.decode = function (b) {
  46707. var c, d, e, f, g, h, i, j, k;
  46708. if (c = b instanceof z ? b : new z(b, 0), d = new z(c), e = new B(c), f = a.decodeLength(c), g = c.pos, h = g - d.pos, i = null, j = function j() {
  46709. var d,
  46710. e,
  46711. b = [];
  46712. if (null !== f) {
  46713. for (d = g + f; c.pos < d;) {
  46714. b[b.length] = a.decode(c);
  46715. }
  46716. if (c.pos != d) throw new Error("Content size is not correct for container starting at offset " + g);
  46717. } else try {
  46718. for (; e = a.decode(c), !e.tag.isEOC();) {
  46719. b[b.length] = e;
  46720. }
  46721. f = g - c.pos;
  46722. } catch (h) {
  46723. throw new Error("Exception while decoding undefined length content: " + h);
  46724. }
  46725. return b;
  46726. }, e.tagConstructed) i = j();else if (e.isUniversal() && (3 == e.tagNumber || 4 == e.tagNumber)) try {
  46727. if (3 == e.tagNumber && 0 != c.get()) throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
  46728. for (i = j(), k = 0; k < i.length; ++k) {
  46729. if (i[k].tag.isEOC()) throw new Error("EOC is not supposed to be actual content.");
  46730. }
  46731. } catch (l) {
  46732. i = null;
  46733. }
  46734. if (null === i) {
  46735. if (null === f) throw new Error("We can't skip over an invalid tag with undefined length at offset " + g);
  46736. c.pos = g + Math.abs(f);
  46737. }
  46738. return new a(d, h, f, e, i);
  46739. }, a;
  46740. }(),
  46741. B = function () {
  46742. function a(a) {
  46743. var c,
  46744. b = a.get();
  46745. if (this.tagClass = b >> 6, this.tagConstructed = 0 !== (32 & b), this.tagNumber = 31 & b, 31 == this.tagNumber) {
  46746. c = new u();
  46747. do {
  46748. b = a.get(), c.mulAdd(128, 127 & b);
  46749. } while (128 & b);
  46750. this.tagNumber = c.simplify();
  46751. }
  46752. }
  46753. return a.prototype.isUniversal = function () {
  46754. return 0 === this.tagClass;
  46755. }, a.prototype.isEOC = function () {
  46756. return 0 === this.tagClass && 0 === this.tagNumber;
  46757. }, a;
  46758. }(),
  46759. F = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997],
  46760. G = (1 << 26) / F[F.length - 1],
  46761. H = function () {
  46762. function a(a, b, c) {
  46763. null != a && ("number" == typeof a ? this.fromNumber(a, b, c) : null == b && "string" != typeof a ? this.fromString(a, 256) : this.fromString(a, b));
  46764. }
  46765. return a.prototype.toString = function (a) {
  46766. var b, d, e, f, g, h, i;
  46767. if (this.s < 0) return "-" + this.negate().toString(a);
  46768. if (16 == a) b = 4;else if (8 == a) b = 3;else if (2 == a) b = 1;else if (32 == a) b = 5;else {
  46769. if (4 != a) return this.toRadix(a);
  46770. b = 2;
  46771. }
  46772. if (d = (1 << b) - 1, f = !1, g = "", h = this.t, i = this.DB - h * this.DB % b, h-- > 0) for (i < this.DB && (e = this[h] >> i) > 0 && (f = !0, g = c(e)); h >= 0;) {
  46773. b > i ? (e = (this[h] & (1 << i) - 1) << b - i, e |= this[--h] >> (i += this.DB - b)) : (e = this[h] >> (i -= b) & d, 0 >= i && (i += this.DB, --h)), e > 0 && (f = !0), f && (g += c(e));
  46774. }
  46775. return f ? g : "0";
  46776. }, a.prototype.negate = function () {
  46777. var b = M();
  46778. return a.ZERO.subTo(this, b), b;
  46779. }, a.prototype.abs = function () {
  46780. return this.s < 0 ? this.negate() : this;
  46781. }, a.prototype.compareTo = function (a) {
  46782. var c,
  46783. b = this.s - a.s;
  46784. if (0 != b) return b;
  46785. if (c = this.t, b = c - a.t, 0 != b) return this.s < 0 ? -b : b;
  46786. for (; --c >= 0;) {
  46787. if (0 != (b = this[c] - a[c])) return b;
  46788. }
  46789. return 0;
  46790. }, a.prototype.bitLength = function () {
  46791. return this.t <= 0 ? 0 : this.DB * (this.t - 1) + X(this[this.t - 1] ^ this.s & this.DM);
  46792. }, a.prototype.mod = function (b) {
  46793. var c = M();
  46794. return this.abs().divRemTo(b, null, c), this.s < 0 && c.compareTo(a.ZERO) > 0 && b.subTo(c, c), c;
  46795. }, a.prototype.modPowInt = function (a, b) {
  46796. var c;
  46797. return c = 256 > a || b.isEven() ? new J(b) : new K(b), this.exp(a, c);
  46798. }, a.prototype.clone = function () {
  46799. var a = M();
  46800. return this.copyTo(a), a;
  46801. }, a.prototype.intValue = function () {
  46802. if (this.s < 0) {
  46803. if (1 == this.t) return this[0] - this.DV;
  46804. if (0 == this.t) return -1;
  46805. } else {
  46806. if (1 == this.t) return this[0];
  46807. if (0 == this.t) return 0;
  46808. }
  46809. return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
  46810. }, a.prototype.byteValue = function () {
  46811. return 0 == this.t ? this.s : this[0] << 24 >> 24;
  46812. }, a.prototype.shortValue = function () {
  46813. return 0 == this.t ? this.s : this[0] << 16 >> 16;
  46814. }, a.prototype.signum = function () {
  46815. return this.s < 0 ? -1 : this.t <= 0 || 1 == this.t && this[0] <= 0 ? 0 : 1;
  46816. }, a.prototype.toByteArray = function () {
  46817. var c,
  46818. d,
  46819. e,
  46820. a = this.t,
  46821. b = [];
  46822. if (b[0] = this.s, c = this.DB - a * this.DB % 8, e = 0, a-- > 0) for (c < this.DB && (d = this[a] >> c) != (this.s & this.DM) >> c && (b[e++] = d | this.s << this.DB - c); a >= 0;) {
  46823. 8 > c ? (d = (this[a] & (1 << c) - 1) << 8 - c, d |= this[--a] >> (c += this.DB - 8)) : (d = 255 & this[a] >> (c -= 8), 0 >= c && (c += this.DB, --a)), 0 != (128 & d) && (d |= -256), 0 == e && (128 & this.s) != (128 & d) && ++e, (e > 0 || d != this.s) && (b[e++] = d);
  46824. }
  46825. return b;
  46826. }, a.prototype.equals = function (a) {
  46827. return 0 == this.compareTo(a);
  46828. }, a.prototype.min = function (a) {
  46829. return this.compareTo(a) < 0 ? this : a;
  46830. }, a.prototype.max = function (a) {
  46831. return this.compareTo(a) > 0 ? this : a;
  46832. }, a.prototype.and = function (a) {
  46833. var b = M();
  46834. return this.bitwiseTo(a, d, b), b;
  46835. }, a.prototype.or = function (a) {
  46836. var b = M();
  46837. return this.bitwiseTo(a, e, b), b;
  46838. }, a.prototype.xor = function (a) {
  46839. var b = M();
  46840. return this.bitwiseTo(a, f, b), b;
  46841. }, a.prototype.andNot = function (a) {
  46842. var b = M();
  46843. return this.bitwiseTo(a, g, b), b;
  46844. }, a.prototype.not = function () {
  46845. var b,
  46846. a = M();
  46847. for (b = 0; b < this.t; ++b) {
  46848. a[b] = this.DM & ~this[b];
  46849. }
  46850. return a.t = this.t, a.s = ~this.s, a;
  46851. }, a.prototype.shiftLeft = function (a) {
  46852. var b = M();
  46853. return 0 > a ? this.rShiftTo(-a, b) : this.lShiftTo(a, b), b;
  46854. }, a.prototype.shiftRight = function (a) {
  46855. var b = M();
  46856. return 0 > a ? this.lShiftTo(-a, b) : this.rShiftTo(a, b), b;
  46857. }, a.prototype.getLowestSetBit = function () {
  46858. for (var a = 0; a < this.t; ++a) {
  46859. if (0 != this[a]) return a * this.DB + h(this[a]);
  46860. }
  46861. return this.s < 0 ? this.t * this.DB : -1;
  46862. }, a.prototype.bitCount = function () {
  46863. var c,
  46864. a = 0,
  46865. b = this.s & this.DM;
  46866. for (c = 0; c < this.t; ++c) {
  46867. a += i(this[c] ^ b);
  46868. }
  46869. return a;
  46870. }, a.prototype.testBit = function (a) {
  46871. var b = Math.floor(a / this.DB);
  46872. return b >= this.t ? 0 != this.s : 0 != (this[b] & 1 << a % this.DB);
  46873. }, a.prototype.setBit = function (a) {
  46874. return this.changeBit(a, e);
  46875. }, a.prototype.clearBit = function (a) {
  46876. return this.changeBit(a, g);
  46877. }, a.prototype.flipBit = function (a) {
  46878. return this.changeBit(a, f);
  46879. }, a.prototype.add = function (a) {
  46880. var b = M();
  46881. return this.addTo(a, b), b;
  46882. }, a.prototype.subtract = function (a) {
  46883. var b = M();
  46884. return this.subTo(a, b), b;
  46885. }, a.prototype.multiply = function (a) {
  46886. var b = M();
  46887. return this.multiplyTo(a, b), b;
  46888. }, a.prototype.divide = function (a) {
  46889. var b = M();
  46890. return this.divRemTo(a, b, null), b;
  46891. }, a.prototype.remainder = function (a) {
  46892. var b = M();
  46893. return this.divRemTo(a, null, b), b;
  46894. }, a.prototype.divideAndRemainder = function (a) {
  46895. var b = M(),
  46896. c = M();
  46897. return this.divRemTo(a, b, c), [b, c];
  46898. }, a.prototype.modPow = function (a, b) {
  46899. var d,
  46900. f,
  46901. g,
  46902. h,
  46903. i,
  46904. j,
  46905. k,
  46906. l,
  46907. m,
  46908. n,
  46909. o,
  46910. p,
  46911. c = a.bitLength(),
  46912. e = W(1);
  46913. if (0 >= c) return e;
  46914. if (d = 18 > c ? 1 : 48 > c ? 3 : 144 > c ? 4 : 768 > c ? 5 : 6, f = 8 > c ? new J(b) : b.isEven() ? new L(b) : new K(b), g = [], h = 3, i = d - 1, j = (1 << d) - 1, g[1] = f.convert(this), d > 1) for (k = M(), f.sqrTo(g[1], k); j >= h;) {
  46915. g[h] = M(), f.mulTo(k, g[h - 2], g[h]), h += 2;
  46916. }
  46917. for (l = a.t - 1, n = !0, o = M(), c = X(a[l]) - 1; l >= 0;) {
  46918. for (c >= i ? m = a[l] >> c - i & j : (m = (a[l] & (1 << c + 1) - 1) << i - c, l > 0 && (m |= a[l - 1] >> this.DB + c - i)), h = d; 0 == (1 & m);) {
  46919. m >>= 1, --h;
  46920. }
  46921. if ((c -= h) < 0 && (c += this.DB, --l), n) g[m].copyTo(e), n = !1;else {
  46922. for (; h > 1;) {
  46923. f.sqrTo(e, o), f.sqrTo(o, e), h -= 2;
  46924. }
  46925. h > 0 ? f.sqrTo(e, o) : (p = e, e = o, o = p), f.mulTo(o, g[m], e);
  46926. }
  46927. for (; l >= 0 && 0 == (a[l] & 1 << c);) {
  46928. f.sqrTo(e, o), p = e, e = o, o = p, --c < 0 && (c = this.DB - 1, --l);
  46929. }
  46930. }
  46931. return f.revert(e);
  46932. }, a.prototype.modInverse = function (b) {
  46933. var d,
  46934. e,
  46935. f,
  46936. g,
  46937. h,
  46938. i,
  46939. c = b.isEven();
  46940. if (this.isEven() && c || 0 == b.signum()) return a.ZERO;
  46941. for (d = b.clone(), e = this.clone(), f = W(1), g = W(0), h = W(0), i = W(1); 0 != d.signum();) {
  46942. for (; d.isEven();) {
  46943. d.rShiftTo(1, d), c ? (f.isEven() && g.isEven() || (f.addTo(this, f), g.subTo(b, g)), f.rShiftTo(1, f)) : g.isEven() || g.subTo(b, g), g.rShiftTo(1, g);
  46944. }
  46945. for (; e.isEven();) {
  46946. e.rShiftTo(1, e), c ? (h.isEven() && i.isEven() || (h.addTo(this, h), i.subTo(b, i)), h.rShiftTo(1, h)) : i.isEven() || i.subTo(b, i), i.rShiftTo(1, i);
  46947. }
  46948. d.compareTo(e) >= 0 ? (d.subTo(e, d), c && f.subTo(h, f), g.subTo(i, g)) : (e.subTo(d, e), c && h.subTo(f, h), i.subTo(g, i));
  46949. }
  46950. return 0 != e.compareTo(a.ONE) ? a.ZERO : i.compareTo(b) >= 0 ? i.subtract(b) : i.signum() < 0 ? (i.addTo(b, i), i.signum() < 0 ? i.add(b) : i) : i;
  46951. }, a.prototype.pow = function (a) {
  46952. return this.exp(a, new I());
  46953. }, a.prototype.gcd = function (a) {
  46954. var d,
  46955. e,
  46956. f,
  46957. b = this.s < 0 ? this.negate() : this.clone(),
  46958. c = a.s < 0 ? a.negate() : a.clone();
  46959. if (b.compareTo(c) < 0 && (d = b, b = c, c = d), e = b.getLowestSetBit(), f = c.getLowestSetBit(), 0 > f) return b;
  46960. for (f > e && (f = e), f > 0 && (b.rShiftTo(f, b), c.rShiftTo(f, c)); b.signum() > 0;) {
  46961. (e = b.getLowestSetBit()) > 0 && b.rShiftTo(e, b), (e = c.getLowestSetBit()) > 0 && c.rShiftTo(e, c), b.compareTo(c) >= 0 ? (b.subTo(c, b), b.rShiftTo(1, b)) : (c.subTo(b, c), c.rShiftTo(1, c));
  46962. }
  46963. return f > 0 && c.lShiftTo(f, c), c;
  46964. }, a.prototype.isProbablePrime = function (a) {
  46965. var b,
  46966. d,
  46967. e,
  46968. c = this.abs();
  46969. if (1 == c.t && c[0] <= F[F.length - 1]) {
  46970. for (b = 0; b < F.length; ++b) {
  46971. if (c[0] == F[b]) return !0;
  46972. }
  46973. return !1;
  46974. }
  46975. if (c.isEven()) return !1;
  46976. for (b = 1; b < F.length;) {
  46977. for (d = F[b], e = b + 1; e < F.length && G > d;) {
  46978. d *= F[e++];
  46979. }
  46980. for (d = c.modInt(d); e > b;) {
  46981. if (0 == d % F[b++]) return !1;
  46982. }
  46983. }
  46984. return c.millerRabin(a);
  46985. }, a.prototype.copyTo = function (a) {
  46986. for (var b = this.t - 1; b >= 0; --b) {
  46987. a[b] = this[b];
  46988. }
  46989. a.t = this.t, a.s = this.s;
  46990. }, a.prototype.fromInt = function (a) {
  46991. this.t = 1, this.s = 0 > a ? -1 : 0, a > 0 ? this[0] = a : -1 > a ? this[0] = a + this.DV : this.t = 0;
  46992. }, a.prototype.fromString = function (b, c) {
  46993. var d, e, f, g, h;
  46994. if (16 == c) d = 4;else if (8 == c) d = 3;else if (256 == c) d = 8;else if (2 == c) d = 1;else if (32 == c) d = 5;else {
  46995. if (4 != c) return this.fromRadix(b, c), void 0;
  46996. d = 2;
  46997. }
  46998. for (this.t = 0, this.s = 0, e = b.length, f = !1, g = 0; --e >= 0;) {
  46999. h = 8 == d ? 255 & +b[e] : V(b, e), 0 > h ? "-" == b.charAt(e) && (f = !0) : (f = !1, 0 == g ? this[this.t++] = h : g + d > this.DB ? (this[this.t - 1] |= (h & (1 << this.DB - g) - 1) << g, this[this.t++] = h >> this.DB - g) : this[this.t - 1] |= h << g, g += d, g >= this.DB && (g -= this.DB));
  47000. }
  47001. 8 == d && 0 != (128 & +b[0]) && (this.s = -1, g > 0 && (this[this.t - 1] |= (1 << this.DB - g) - 1 << g)), this.clamp(), f && a.ZERO.subTo(this, this);
  47002. }, a.prototype.clamp = function () {
  47003. for (var a = this.s & this.DM; this.t > 0 && this[this.t - 1] == a;) {
  47004. --this.t;
  47005. }
  47006. }, a.prototype.dlShiftTo = function (a, b) {
  47007. var c;
  47008. for (c = this.t - 1; c >= 0; --c) {
  47009. b[c + a] = this[c];
  47010. }
  47011. for (c = a - 1; c >= 0; --c) {
  47012. b[c] = 0;
  47013. }
  47014. b.t = this.t + a, b.s = this.s;
  47015. }, a.prototype.drShiftTo = function (a, b) {
  47016. for (var c = a; c < this.t; ++c) {
  47017. b[c - a] = this[c];
  47018. }
  47019. b.t = Math.max(this.t - a, 0), b.s = this.s;
  47020. }, a.prototype.lShiftTo = function (a, b) {
  47021. var h,
  47022. c = a % this.DB,
  47023. d = this.DB - c,
  47024. e = (1 << d) - 1,
  47025. f = Math.floor(a / this.DB),
  47026. g = this.s << c & this.DM;
  47027. for (h = this.t - 1; h >= 0; --h) {
  47028. b[h + f + 1] = this[h] >> d | g, g = (this[h] & e) << c;
  47029. }
  47030. for (h = f - 1; h >= 0; --h) {
  47031. b[h] = 0;
  47032. }
  47033. b[f] = g, b.t = this.t + f + 1, b.s = this.s, b.clamp();
  47034. }, a.prototype.rShiftTo = function (a, b) {
  47035. var c, d, e, f, g;
  47036. if (b.s = this.s, c = Math.floor(a / this.DB), c >= this.t) return b.t = 0, void 0;
  47037. for (d = a % this.DB, e = this.DB - d, f = (1 << d) - 1, b[0] = this[c] >> d, g = c + 1; g < this.t; ++g) {
  47038. b[g - c - 1] |= (this[g] & f) << e, b[g - c] = this[g] >> d;
  47039. }
  47040. d > 0 && (b[this.t - c - 1] |= (this.s & f) << e), b.t = this.t - c, b.clamp();
  47041. }, a.prototype.subTo = function (a, b) {
  47042. for (var c = 0, d = 0, e = Math.min(a.t, this.t); e > c;) {
  47043. d += this[c] - a[c], b[c++] = d & this.DM, d >>= this.DB;
  47044. }
  47045. if (a.t < this.t) {
  47046. for (d -= a.s; c < this.t;) {
  47047. d += this[c], b[c++] = d & this.DM, d >>= this.DB;
  47048. }
  47049. d += this.s;
  47050. } else {
  47051. for (d += this.s; c < a.t;) {
  47052. d -= a[c], b[c++] = d & this.DM, d >>= this.DB;
  47053. }
  47054. d -= a.s;
  47055. }
  47056. b.s = 0 > d ? -1 : 0, -1 > d ? b[c++] = this.DV + d : d > 0 && (b[c++] = d), b.t = c, b.clamp();
  47057. }, a.prototype.multiplyTo = function (b, c) {
  47058. var d = this.abs(),
  47059. e = b.abs(),
  47060. f = d.t;
  47061. for (c.t = f + e.t; --f >= 0;) {
  47062. c[f] = 0;
  47063. }
  47064. for (f = 0; f < e.t; ++f) {
  47065. c[f + d.t] = d.am(0, e[f], c, f, 0, d.t);
  47066. }
  47067. c.s = 0, c.clamp(), this.s != b.s && a.ZERO.subTo(c, c);
  47068. }, a.prototype.squareTo = function (a) {
  47069. for (var d, b = this.abs(), c = a.t = 2 * b.t; --c >= 0;) {
  47070. a[c] = 0;
  47071. }
  47072. for (c = 0; c < b.t - 1; ++c) {
  47073. d = b.am(c, b[c], a, 2 * c, 0, 1), (a[c + b.t] += b.am(c + 1, 2 * b[c], a, 2 * c + 1, d, b.t - c - 1)) >= b.DV && (a[c + b.t] -= b.DV, a[c + b.t + 1] = 1);
  47074. }
  47075. a.t > 0 && (a[a.t - 1] += b.am(c, b[c], a, 2 * c, 0, 1)), a.s = 0, a.clamp();
  47076. }, a.prototype.divRemTo = function (b, c, d) {
  47077. var f,
  47078. g,
  47079. h,
  47080. i,
  47081. j,
  47082. k,
  47083. l,
  47084. m,
  47085. n,
  47086. o,
  47087. p,
  47088. q,
  47089. r,
  47090. s,
  47091. t,
  47092. e = b.abs();
  47093. if (!(e.t <= 0)) {
  47094. if (f = this.abs(), f.t < e.t) return null != c && c.fromInt(0), null != d && this.copyTo(d), void 0;
  47095. if (null == d && (d = M()), g = M(), h = this.s, i = b.s, j = this.DB - X(e[e.t - 1]), j > 0 ? (e.lShiftTo(j, g), f.lShiftTo(j, d)) : (e.copyTo(g), f.copyTo(d)), k = g.t, l = g[k - 1], 0 != l) {
  47096. for (m = l * (1 << this.F1) + (k > 1 ? g[k - 2] >> this.F2 : 0), n = this.FV / m, o = (1 << this.F1) / m, p = 1 << this.F2, q = d.t, r = q - k, s = null == c ? M() : c, g.dlShiftTo(r, s), d.compareTo(s) >= 0 && (d[d.t++] = 1, d.subTo(s, d)), a.ONE.dlShiftTo(k, s), s.subTo(g, g); g.t < k;) {
  47097. g[g.t++] = 0;
  47098. }
  47099. for (; --r >= 0;) {
  47100. if (t = d[--q] == l ? this.DM : Math.floor(d[q] * n + (d[q - 1] + p) * o), (d[q] += g.am(0, t, d, r, 0, k)) < t) for (g.dlShiftTo(r, s), d.subTo(s, d); d[q] < --t;) {
  47101. d.subTo(s, d);
  47102. }
  47103. }
  47104. null != c && (d.drShiftTo(k, c), h != i && a.ZERO.subTo(c, c)), d.t = k, d.clamp(), j > 0 && d.rShiftTo(j, d), 0 > h && a.ZERO.subTo(d, d);
  47105. }
  47106. }
  47107. }, a.prototype.invDigit = function () {
  47108. var a, b;
  47109. return this.t < 1 ? 0 : (a = this[0], 0 == (1 & a) ? 0 : (b = 3 & a, b = 15 & b * (2 - (15 & a) * b), b = 255 & b * (2 - (255 & a) * b), b = 65535 & b * (2 - (65535 & (65535 & a) * b)), b = b * (2 - a * b % this.DV) % this.DV, b > 0 ? this.DV - b : -b));
  47110. }, a.prototype.isEven = function () {
  47111. return 0 == (this.t > 0 ? 1 & this[0] : this.s);
  47112. }, a.prototype.exp = function (b, c) {
  47113. var d, e, f, g, h;
  47114. if (b > 4294967295 || 1 > b) return a.ONE;
  47115. for (d = M(), e = M(), f = c.convert(this), g = X(b) - 1, f.copyTo(d); --g >= 0;) {
  47116. c.sqrTo(d, e), (b & 1 << g) > 0 ? c.mulTo(e, f, d) : (h = d, d = e, e = h);
  47117. }
  47118. return c.revert(d);
  47119. }, a.prototype.chunkSize = function (a) {
  47120. return Math.floor(Math.LN2 * this.DB / Math.log(a));
  47121. }, a.prototype.toRadix = function (a) {
  47122. var b, c, d, e, f, g;
  47123. if (null == a && (a = 10), 0 == this.signum() || 2 > a || a > 36) return "0";
  47124. for (b = this.chunkSize(a), c = Math.pow(a, b), d = W(c), e = M(), f = M(), g = "", this.divRemTo(d, e, f); e.signum() > 0;) {
  47125. g = (c + f.intValue()).toString(a).substr(1) + g, e.divRemTo(d, e, f);
  47126. }
  47127. return f.intValue().toString(a) + g;
  47128. }, a.prototype.fromRadix = function (b, c) {
  47129. var d, e, f, g, h, i, j;
  47130. for (this.fromInt(0), null == c && (c = 10), d = this.chunkSize(c), e = Math.pow(c, d), f = !1, g = 0, h = 0, i = 0; i < b.length; ++i) {
  47131. j = V(b, i), 0 > j ? "-" == b.charAt(i) && 0 == this.signum() && (f = !0) : (h = c * h + j, ++g >= d && (this.dMultiply(e), this.dAddOffset(h, 0), g = 0, h = 0));
  47132. }
  47133. g > 0 && (this.dMultiply(Math.pow(c, g)), this.dAddOffset(h, 0)), f && a.ZERO.subTo(this, this);
  47134. }, a.prototype.fromNumber = function (b, c, d) {
  47135. var f, g;
  47136. if ("number" == typeof c) {
  47137. if (2 > b) this.fromInt(1);else for (this.fromNumber(b, d), this.testBit(b - 1) || this.bitwiseTo(a.ONE.shiftLeft(b - 1), e, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(c);) {
  47138. this.dAddOffset(2, 0), this.bitLength() > b && this.subTo(a.ONE.shiftLeft(b - 1), this);
  47139. }
  47140. } else f = [], g = 7 & b, f.length = (b >> 3) + 1, c.nextBytes(f), g > 0 ? f[0] &= (1 << g) - 1 : f[0] = 0, this.fromString(f, 256);
  47141. }, a.prototype.bitwiseTo = function (a, b, c) {
  47142. var d,
  47143. e,
  47144. f = Math.min(a.t, this.t);
  47145. for (d = 0; f > d; ++d) {
  47146. c[d] = b(this[d], a[d]);
  47147. }
  47148. if (a.t < this.t) {
  47149. for (e = a.s & this.DM, d = f; d < this.t; ++d) {
  47150. c[d] = b(this[d], e);
  47151. }
  47152. c.t = this.t;
  47153. } else {
  47154. for (e = this.s & this.DM, d = f; d < a.t; ++d) {
  47155. c[d] = b(e, a[d]);
  47156. }
  47157. c.t = a.t;
  47158. }
  47159. c.s = b(this.s, a.s), c.clamp();
  47160. }, a.prototype.changeBit = function (b, c) {
  47161. var d = a.ONE.shiftLeft(b);
  47162. return this.bitwiseTo(d, c, d), d;
  47163. }, a.prototype.addTo = function (a, b) {
  47164. for (var c = 0, d = 0, e = Math.min(a.t, this.t); e > c;) {
  47165. d += this[c] + a[c], b[c++] = d & this.DM, d >>= this.DB;
  47166. }
  47167. if (a.t < this.t) {
  47168. for (d += a.s; c < this.t;) {
  47169. d += this[c], b[c++] = d & this.DM, d >>= this.DB;
  47170. }
  47171. d += this.s;
  47172. } else {
  47173. for (d += this.s; c < a.t;) {
  47174. d += a[c], b[c++] = d & this.DM, d >>= this.DB;
  47175. }
  47176. d += a.s;
  47177. }
  47178. b.s = 0 > d ? -1 : 0, d > 0 ? b[c++] = d : -1 > d && (b[c++] = this.DV + d), b.t = c, b.clamp();
  47179. }, a.prototype.dMultiply = function (a) {
  47180. this[this.t] = this.am(0, a - 1, this, 0, 0, this.t), ++this.t, this.clamp();
  47181. }, a.prototype.dAddOffset = function (a, b) {
  47182. if (0 != a) {
  47183. for (; this.t <= b;) {
  47184. this[this.t++] = 0;
  47185. }
  47186. for (this[b] += a; this[b] >= this.DV;) {
  47187. this[b] -= this.DV, ++b >= this.t && (this[this.t++] = 0), ++this[b];
  47188. }
  47189. }
  47190. }, a.prototype.multiplyLowerTo = function (a, b, c) {
  47191. var e,
  47192. d = Math.min(this.t + a.t, b);
  47193. for (c.s = 0, c.t = d; d > 0;) {
  47194. c[--d] = 0;
  47195. }
  47196. for (e = c.t - this.t; e > d; ++d) {
  47197. c[d + this.t] = this.am(0, a[d], c, d, 0, this.t);
  47198. }
  47199. for (e = Math.min(a.t, b); e > d; ++d) {
  47200. this.am(0, a[d], c, d, 0, b - d);
  47201. }
  47202. c.clamp();
  47203. }, a.prototype.multiplyUpperTo = function (a, b, c) {
  47204. --b;
  47205. var d = c.t = this.t + a.t - b;
  47206. for (c.s = 0; --d >= 0;) {
  47207. c[d] = 0;
  47208. }
  47209. for (d = Math.max(b - this.t, 0); d < a.t; ++d) {
  47210. c[this.t + d - b] = this.am(b - d, a[d], c, 0, 0, this.t + d - b);
  47211. }
  47212. c.clamp(), c.drShiftTo(1, c);
  47213. }, a.prototype.modInt = function (a) {
  47214. var b, c, d;
  47215. if (0 >= a) return 0;
  47216. if (b = this.DV % a, c = this.s < 0 ? a - 1 : 0, this.t > 0) if (0 == b) c = this[0] % a;else for (d = this.t - 1; d >= 0; --d) {
  47217. c = (b * c + this[d]) % a;
  47218. }
  47219. return c;
  47220. }, a.prototype.millerRabin = function (b) {
  47221. var e,
  47222. f,
  47223. g,
  47224. h,
  47225. i,
  47226. c = this.subtract(a.ONE),
  47227. d = c.getLowestSetBit();
  47228. if (0 >= d) return !1;
  47229. for (e = c.shiftRight(d), b = b + 1 >> 1, b > F.length && (b = F.length), f = M(), g = 0; b > g; ++g) {
  47230. if (f.fromInt(F[Math.floor(Math.random() * F.length)]), h = f.modPow(e, this), 0 != h.compareTo(a.ONE) && 0 != h.compareTo(c)) {
  47231. for (i = 1; i++ < d && 0 != h.compareTo(c);) {
  47232. if (h = h.modPowInt(2, this), 0 == h.compareTo(a.ONE)) return !1;
  47233. }
  47234. if (0 != h.compareTo(c)) return !1;
  47235. }
  47236. }
  47237. return !0;
  47238. }, a.prototype.square = function () {
  47239. var a = M();
  47240. return this.squareTo(a), a;
  47241. }, a.prototype.gcda = function (a, b) {
  47242. var e,
  47243. f,
  47244. g,
  47245. _h,
  47246. c = this.s < 0 ? this.negate() : this.clone(),
  47247. d = a.s < 0 ? a.negate() : a.clone();
  47248. return c.compareTo(d) < 0 && (e = c, c = d, d = e), f = c.getLowestSetBit(), g = d.getLowestSetBit(), 0 > g ? (b(c), void 0) : (g > f && (g = f), g > 0 && (c.rShiftTo(g, c), d.rShiftTo(g, d)), _h = function h() {
  47249. (f = c.getLowestSetBit()) > 0 && c.rShiftTo(f, c), (f = d.getLowestSetBit()) > 0 && d.rShiftTo(f, d), c.compareTo(d) >= 0 ? (c.subTo(d, c), c.rShiftTo(1, c)) : (d.subTo(c, d), d.rShiftTo(1, d)), c.signum() > 0 ? setTimeout(_h, 0) : (g > 0 && d.lShiftTo(g, d), setTimeout(function () {
  47250. b(d);
  47251. }, 0));
  47252. }, setTimeout(_h, 10), void 0);
  47253. }, a.prototype.fromNumberAsync = function (b, c, d, f) {
  47254. var g, _h2, i, j;
  47255. "number" == typeof c ? 2 > b ? this.fromInt(1) : (this.fromNumber(b, d), this.testBit(b - 1) || this.bitwiseTo(a.ONE.shiftLeft(b - 1), e, this), this.isEven() && this.dAddOffset(1, 0), g = this, _h2 = function h() {
  47256. g.dAddOffset(2, 0), g.bitLength() > b && g.subTo(a.ONE.shiftLeft(b - 1), g), g.isProbablePrime(c) ? setTimeout(function () {
  47257. f();
  47258. }, 0) : setTimeout(_h2, 0);
  47259. }, setTimeout(_h2, 0)) : (i = [], j = 7 & b, i.length = (b >> 3) + 1, c.nextBytes(i), j > 0 ? i[0] &= (1 << j) - 1 : i[0] = 0, this.fromString(i, 256));
  47260. }, a;
  47261. }(),
  47262. I = function () {
  47263. function a() {}
  47264. return a.prototype.convert = function (a) {
  47265. return a;
  47266. }, a.prototype.revert = function (a) {
  47267. return a;
  47268. }, a.prototype.mulTo = function (a, b, c) {
  47269. a.multiplyTo(b, c);
  47270. }, a.prototype.sqrTo = function (a, b) {
  47271. a.squareTo(b);
  47272. }, a;
  47273. }(),
  47274. J = function () {
  47275. function a(a) {
  47276. this.m = a;
  47277. }
  47278. return a.prototype.convert = function (a) {
  47279. return a.s < 0 || a.compareTo(this.m) >= 0 ? a.mod(this.m) : a;
  47280. }, a.prototype.revert = function (a) {
  47281. return a;
  47282. }, a.prototype.reduce = function (a) {
  47283. a.divRemTo(this.m, null, a);
  47284. }, a.prototype.mulTo = function (a, b, c) {
  47285. a.multiplyTo(b, c), this.reduce(c);
  47286. }, a.prototype.sqrTo = function (a, b) {
  47287. a.squareTo(b), this.reduce(b);
  47288. }, a;
  47289. }(),
  47290. K = function () {
  47291. function a(a) {
  47292. this.m = a, this.mp = a.invDigit(), this.mpl = 32767 & this.mp, this.mph = this.mp >> 15, this.um = (1 << a.DB - 15) - 1, this.mt2 = 2 * a.t;
  47293. }
  47294. return a.prototype.convert = function (a) {
  47295. var b = M();
  47296. return a.abs().dlShiftTo(this.m.t, b), b.divRemTo(this.m, null, b), a.s < 0 && b.compareTo(H.ZERO) > 0 && this.m.subTo(b, b), b;
  47297. }, a.prototype.revert = function (a) {
  47298. var b = M();
  47299. return a.copyTo(b), this.reduce(b), b;
  47300. }, a.prototype.reduce = function (a) {
  47301. for (var b, c, d; a.t <= this.mt2;) {
  47302. a[a.t++] = 0;
  47303. }
  47304. for (b = 0; b < this.m.t; ++b) {
  47305. for (c = 32767 & a[b], d = c * this.mpl + ((c * this.mph + (a[b] >> 15) * this.mpl & this.um) << 15) & a.DM, c = b + this.m.t, a[c] += this.m.am(0, d, a, b, 0, this.m.t); a[c] >= a.DV;) {
  47306. a[c] -= a.DV, a[++c]++;
  47307. }
  47308. }
  47309. a.clamp(), a.drShiftTo(this.m.t, a), a.compareTo(this.m) >= 0 && a.subTo(this.m, a);
  47310. }, a.prototype.mulTo = function (a, b, c) {
  47311. a.multiplyTo(b, c), this.reduce(c);
  47312. }, a.prototype.sqrTo = function (a, b) {
  47313. a.squareTo(b), this.reduce(b);
  47314. }, a;
  47315. }(),
  47316. L = function () {
  47317. function a(a) {
  47318. this.m = a, this.r2 = M(), this.q3 = M(), H.ONE.dlShiftTo(2 * a.t, this.r2), this.mu = this.r2.divide(a);
  47319. }
  47320. return a.prototype.convert = function (a) {
  47321. if (a.s < 0 || a.t > 2 * this.m.t) return a.mod(this.m);
  47322. if (a.compareTo(this.m) < 0) return a;
  47323. var b = M();
  47324. return a.copyTo(b), this.reduce(b), b;
  47325. }, a.prototype.revert = function (a) {
  47326. return a;
  47327. }, a.prototype.reduce = function (a) {
  47328. for (a.drShiftTo(this.m.t - 1, this.r2), a.t > this.m.t + 1 && (a.t = this.m.t + 1, a.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); a.compareTo(this.r2) < 0;) {
  47329. a.dAddOffset(1, this.m.t + 1);
  47330. }
  47331. for (a.subTo(this.r2, a); a.compareTo(this.m) >= 0;) {
  47332. a.subTo(this.m, a);
  47333. }
  47334. }, a.prototype.mulTo = function (a, b, c) {
  47335. a.multiplyTo(b, c), this.reduce(c);
  47336. }, a.prototype.sqrTo = function (a, b) {
  47337. a.squareTo(b), this.reduce(b);
  47338. }, a;
  47339. }();
  47340. for (H.prototype.am = Q, C = 28, H.prototype.DB = C, H.prototype.DM = (1 << C) - 1, H.prototype.DV = 1 << C, R = 52, H.prototype.FV = Math.pow(2, R), H.prototype.F1 = R - C, H.prototype.F2 = 2 * C - R, S = [], T = "0".charCodeAt(0), U = 0; 9 >= U; ++U) {
  47341. S[T++] = U;
  47342. }
  47343. for (T = "a".charCodeAt(0), U = 10; 36 > U; ++U) {
  47344. S[T++] = U;
  47345. }
  47346. for (T = "A".charCodeAt(0), U = 10; 36 > U; ++U) {
  47347. S[T++] = U;
  47348. }
  47349. if (H.ZERO = W(0), H.ONE = W(1), Y = function () {
  47350. function a() {
  47351. this.i = 0, this.j = 0, this.S = [];
  47352. }
  47353. return a.prototype.init = function (a) {
  47354. var b, c, d;
  47355. for (b = 0; 256 > b; ++b) {
  47356. this.S[b] = b;
  47357. }
  47358. for (c = 0, b = 0; 256 > b; ++b) {
  47359. c = 255 & c + this.S[b] + a[b % a.length], d = this.S[b], this.S[b] = this.S[c], this.S[c] = d;
  47360. }
  47361. this.i = 0, this.j = 0;
  47362. }, a.prototype.next = function () {
  47363. var a;
  47364. return this.i = 255 & this.i + 1, this.j = 255 & this.j + this.S[this.i], a = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = a, this.S[255 & a + this.S[this.i]];
  47365. }, a;
  47366. }(), $ = 256, ab = null, null == ab && (ab = [], bb = 0, cb = void 0, CryptoJS && CryptoJS.getRandomValues)) for (db = new Uint32Array(256), CryptoJS.getRandomValues(db), cb = 0; cb < db.length; ++cb) {
  47367. ab[bb++] = 255 & db[cb];
  47368. }
  47369. gb = function () {
  47370. function a() {}
  47371. return a.prototype.nextBytes = function (a) {
  47372. for (var b = 0; b < a.length; ++b) {
  47373. a[b] = fb();
  47374. }
  47375. }, a;
  47376. }(), jb = function () {
  47377. function a() {
  47378. this.n = null, this.e = 0, this.d = null, this.p = null, this.q = null, this.dmp1 = null, this.dmq1 = null, this.coeff = null;
  47379. }
  47380. return a.prototype.doPublic = function (a) {
  47381. return a.modPowInt(this.e, this.n);
  47382. }, a.prototype.doPrivate = function (a) {
  47383. var b, c;
  47384. if (null == this.p || null == this.q) return a.modPow(this.d, this.n);
  47385. for (b = a.mod(this.p).modPow(this.dmp1, this.p), c = a.mod(this.q).modPow(this.dmq1, this.q); b.compareTo(c) < 0;) {
  47386. b = b.add(this.p);
  47387. }
  47388. return b.subtract(c).multiply(this.coeff).mod(this.p).multiply(this.q).add(c);
  47389. }, a.prototype.setPublic = function (a, b) {
  47390. null != a && null != b && a.length > 0 && b.length > 0 ? (this.n = N(a, 16), this.e = parseInt(b, 16)) : console.error("Invalid RSA public key");
  47391. }, a.prototype.encrypt = function (a) {
  47392. var c,
  47393. d,
  47394. b = ib(a, this.n.bitLength() + 7 >> 3);
  47395. return null == b ? null : (c = this.doPublic(b), null == c ? null : (d = c.toString(16), 0 == (1 & d.length) ? d : "0" + d));
  47396. }, a.prototype.setPrivate = function (a, b, c) {
  47397. null != a && null != b && a.length > 0 && b.length > 0 ? (this.n = N(a, 16), this.e = parseInt(b, 16), this.d = N(c, 16)) : console.error("Invalid RSA private key");
  47398. }, a.prototype.setPrivateEx = function (a, b, c, d, e, f, g, h) {
  47399. null != a && null != b && a.length > 0 && b.length > 0 ? (this.n = N(a, 16), this.e = parseInt(b, 16), this.d = N(c, 16), this.p = N(d, 16), this.q = N(e, 16), this.dmp1 = N(f, 16), this.dmq1 = N(g, 16), this.coeff = N(h, 16)) : console.error("Invalid RSA private key");
  47400. }, a.prototype.generate = function (a, b) {
  47401. var e,
  47402. f,
  47403. g,
  47404. h,
  47405. i,
  47406. c = new gb(),
  47407. d = a >> 1;
  47408. for (this.e = parseInt(b, 16), e = new H(b, 16);;) {
  47409. for (; this.p = new H(a - d, 1, c), 0 != this.p.subtract(H.ONE).gcd(e).compareTo(H.ONE) || !this.p.isProbablePrime(10);) {
  47410. ;
  47411. }
  47412. for (; this.q = new H(d, 1, c), 0 != this.q.subtract(H.ONE).gcd(e).compareTo(H.ONE) || !this.q.isProbablePrime(10);) {
  47413. ;
  47414. }
  47415. if (this.p.compareTo(this.q) <= 0 && (f = this.p, this.p = this.q, this.q = f), g = this.p.subtract(H.ONE), h = this.q.subtract(H.ONE), i = g.multiply(h), 0 == i.gcd(e).compareTo(H.ONE)) {
  47416. this.n = this.p.multiply(this.q), this.d = e.modInverse(i), this.dmp1 = this.d.mod(g), this.dmq1 = this.d.mod(h), this.coeff = this.q.modInverse(this.p);
  47417. break;
  47418. }
  47419. }
  47420. }, a.prototype.decrypt = function (a) {
  47421. var b = N(a, 16),
  47422. c = this.doPrivate(b);
  47423. return null == c ? null : kb(c, this.n.bitLength() + 7 >> 3);
  47424. }, a.prototype.generateAsync = function (a, b, c) {
  47425. var f,
  47426. g,
  47427. _h3,
  47428. d = new gb(),
  47429. e = a >> 1;
  47430. this.e = parseInt(b, 16), f = new H(b, 16), g = this, _h3 = function h() {
  47431. var b = function b() {
  47432. var a, b, d, e;
  47433. g.p.compareTo(g.q) <= 0 && (a = g.p, g.p = g.q, g.q = a), b = g.p.subtract(H.ONE), d = g.q.subtract(H.ONE), e = b.multiply(d), 0 == e.gcd(f).compareTo(H.ONE) ? (g.n = g.p.multiply(g.q), g.d = f.modInverse(e), g.dmp1 = g.d.mod(b), g.dmq1 = g.d.mod(d), g.coeff = g.q.modInverse(g.p), setTimeout(function () {
  47434. c();
  47435. }, 0)) : setTimeout(_h3, 0);
  47436. },
  47437. i = function i() {
  47438. g.q = M(), g.q.fromNumberAsync(e, 1, d, function () {
  47439. g.q.subtract(H.ONE).gcda(f, function (a) {
  47440. 0 == a.compareTo(H.ONE) && g.q.isProbablePrime(10) ? setTimeout(b, 0) : setTimeout(i, 0);
  47441. });
  47442. });
  47443. },
  47444. j = function j() {
  47445. g.p = M(), g.p.fromNumberAsync(a - e, 1, d, function () {
  47446. g.p.subtract(H.ONE).gcda(f, function (a) {
  47447. 0 == a.compareTo(H.ONE) && g.p.isProbablePrime(10) ? setTimeout(i, 0) : setTimeout(j, 0);
  47448. });
  47449. });
  47450. };
  47451. setTimeout(j, 0);
  47452. }, setTimeout(_h3, 0);
  47453. }, a.prototype.sign = function (a, b, c) {
  47454. var g,
  47455. h,
  47456. d = mb(c),
  47457. e = d + b(a).toString(),
  47458. f = hb(e, this.n.bitLength() / 4);
  47459. return null == f ? null : (g = this.doPrivate(f), null == g ? null : (h = g.toString(16), 0 == (1 & h.length) ? h : "0" + h));
  47460. }, a.prototype.verify = function (a, b, c) {
  47461. var f,
  47462. g,
  47463. d = N(b, 16),
  47464. e = this.doPublic(d);
  47465. return null == e ? null : (f = e.toString(16).replace(/^1f+00/, ""), g = nb(f), g == c(a).toString());
  47466. }, a;
  47467. }(), lb = {
  47468. md2: "3020300c06082a864886f70d020205000410",
  47469. md5: "3020300c06082a864886f70d020505000410",
  47470. sha1: "3021300906052b0e03021a05000414",
  47471. sha224: "302d300d06096086480165030402040500041c",
  47472. sha256: "3031300d060960864801650304020105000420",
  47473. sha384: "3041300d060960864801650304020205000430",
  47474. sha512: "3051300d060960864801650304020305000440",
  47475. ripemd160: "3021300906052b2403020105000414"
  47476. }, ob = {}, ob.lang = {
  47477. extend: function extend(a, b, c) {
  47478. var d, e, f, g;
  47479. if (!b || !a) throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");
  47480. if (d = function d() {}, d.prototype = b.prototype, a.prototype = new d(), a.prototype.constructor = a, a.superclass = b.prototype, b.prototype.constructor == Object.prototype.constructor && (b.prototype.constructor = b), c) {
  47481. for (e in c) {
  47482. a.prototype[e] = c[e];
  47483. }
  47484. f = function f() {}, g = ["toString", "valueOf"];
  47485. try {
  47486. /MSIE/.test(navigator.userAgent) && (f = function f(a, b) {
  47487. for (e = 0; e < g.length; e += 1) {
  47488. var c = g[e],
  47489. d = b[c];
  47490. "function" == typeof d && d != Object.prototype[c] && (a[c] = d);
  47491. }
  47492. });
  47493. } catch (h) {}
  47494. f(a.prototype, c);
  47495. }
  47496. }
  47497. }, pb = {}, "undefined" != typeof pb.asn1 && pb.asn1 || (pb.asn1 = {}), pb.asn1.ASN1Util = new function () {
  47498. this.integerToByteHex = function (a) {
  47499. var b = a.toString(16);
  47500. return 1 == b.length % 2 && (b = "0" + b), b;
  47501. }, this.bigIntToMinTwosComplementsHex = function (a) {
  47502. var c,
  47503. d,
  47504. e,
  47505. f,
  47506. g,
  47507. h,
  47508. b = a.toString(16);
  47509. if ("-" != b.substr(0, 1)) 1 == b.length % 2 ? b = "0" + b : b.match(/^[0-7]/) || (b = "00" + b);else {
  47510. for (c = b.substr(1), d = c.length, 1 == d % 2 ? d += 1 : b.match(/^[0-7]/) || (d += 2), e = "", f = 0; d > f; f++) {
  47511. e += "f";
  47512. }
  47513. g = new H(e, 16), h = g.xor(a).add(H.ONE), b = h.toString(16).replace(/^-/, "");
  47514. }
  47515. return b;
  47516. }, this.getPEMStringFromHex = function (a, b) {
  47517. return hextopem(a, b);
  47518. }, this.newObject = function (a) {
  47519. var w,
  47520. x,
  47521. y,
  47522. z,
  47523. A,
  47524. B,
  47525. C,
  47526. D,
  47527. b = pb,
  47528. c = b.asn1,
  47529. d = c.DERBoolean,
  47530. e = c.DERInteger,
  47531. f = c.DERBitString,
  47532. g = c.DEROctetString,
  47533. h = c.DERNull,
  47534. i = c.DERObjectIdentifier,
  47535. j = c.DEREnumerated,
  47536. k = c.DERUTF8String,
  47537. l = c.DERNumericString,
  47538. m = c.DERPrintableString,
  47539. n = c.DERTeletexString,
  47540. o = c.DERIA5String,
  47541. p = c.DERUTCTime,
  47542. q = c.DERGeneralizedTime,
  47543. r = c.DERSequence,
  47544. s = c.DERSet,
  47545. t = c.DERTaggedObject,
  47546. u = c.ASN1Util.newObject,
  47547. v = Object.keys(a);
  47548. if (1 != v.length) throw "key of param shall be only one.";
  47549. if (w = v[0], -1 == ":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + w + ":")) throw "undefined key: " + w;
  47550. if ("bool" == w) return new d(a[w]);
  47551. if ("int" == w) return new e(a[w]);
  47552. if ("bitstr" == w) return new f(a[w]);
  47553. if ("octstr" == w) return new g(a[w]);
  47554. if ("null" == w) return new h(a[w]);
  47555. if ("oid" == w) return new i(a[w]);
  47556. if ("enum" == w) return new j(a[w]);
  47557. if ("utf8str" == w) return new k(a[w]);
  47558. if ("numstr" == w) return new l(a[w]);
  47559. if ("prnstr" == w) return new m(a[w]);
  47560. if ("telstr" == w) return new n(a[w]);
  47561. if ("ia5str" == w) return new o(a[w]);
  47562. if ("utctime" == w) return new p(a[w]);
  47563. if ("gentime" == w) return new q(a[w]);
  47564. if ("seq" == w) {
  47565. for (x = a[w], y = [], z = 0; z < x.length; z++) {
  47566. A = u(x[z]), y.push(A);
  47567. }
  47568. return new r({
  47569. array: y
  47570. });
  47571. }
  47572. if ("set" == w) {
  47573. for (x = a[w], y = [], z = 0; z < x.length; z++) {
  47574. A = u(x[z]), y.push(A);
  47575. }
  47576. return new s({
  47577. array: y
  47578. });
  47579. }
  47580. if ("tag" == w) {
  47581. if (B = a[w], "[object Array]" === Object.prototype.toString.call(B) && 3 == B.length) return C = u(B[2]), new t({
  47582. tag: B[0],
  47583. explicit: B[1],
  47584. obj: C
  47585. });
  47586. if (D = {}, void 0 !== B.explicit && (D.explicit = B.explicit), void 0 !== B.tag && (D.tag = B.tag), void 0 === B.obj) throw "obj shall be specified for 'tag'.";
  47587. return D.obj = u(B.obj), new t(D);
  47588. }
  47589. }, this.jsonToASN1HEX = function (a) {
  47590. var b = this.newObject(a);
  47591. return b.getEncodedHex();
  47592. };
  47593. }(), pb.asn1.ASN1Util.oidHexToInt = function (a) {
  47594. var f,
  47595. g,
  47596. h,
  47597. i,
  47598. j,
  47599. b = "",
  47600. c = parseInt(a.substr(0, 2), 16),
  47601. d = Math.floor(c / 40),
  47602. e = c % 40;
  47603. for (b = d + "." + e, f = "", g = 2; g < a.length; g += 2) {
  47604. h = parseInt(a.substr(g, 2), 16), i = ("00000000" + h.toString(2)).slice(-8), f += i.substr(1, 7), "0" == i.substr(0, 1) && (j = new H(f, 2), b = b + "." + j.toString(10), f = "");
  47605. }
  47606. return b;
  47607. }, pb.asn1.ASN1Util.oidIntToHex = function (a) {
  47608. var d,
  47609. e,
  47610. f,
  47611. g,
  47612. b = function b(a) {
  47613. var b = a.toString(16);
  47614. return 1 == b.length && (b = "0" + b), b;
  47615. },
  47616. c = function c(a) {
  47617. var g,
  47618. h,
  47619. i,
  47620. c = "",
  47621. d = new H(a, 10),
  47622. e = d.toString(2),
  47623. f = 7 - e.length % 7;
  47624. for (7 == f && (f = 0), g = "", h = 0; f > h; h++) {
  47625. g += "0";
  47626. }
  47627. for (e = g + e, h = 0; h < e.length - 1; h += 7) {
  47628. i = e.substr(h, 7), h != e.length - 7 && (i = "1" + i), c += b(parseInt(i, 2));
  47629. }
  47630. return c;
  47631. };
  47632. if (!a.match(/^[0-9.]+$/)) throw "malformed oid string: " + a;
  47633. for (d = "", e = a.split("."), f = 40 * parseInt(e[0]) + parseInt(e[1]), d += b(f), e.splice(0, 2), g = 0; g < e.length; g++) {
  47634. d += c(e[g]);
  47635. }
  47636. return d;
  47637. }, pb.asn1.ASN1Object = function () {
  47638. var a = "";
  47639. this.getLengthHexFromValue = function () {
  47640. var b, c, d, e;
  47641. if ("undefined" == typeof this.hV || null == this.hV) throw "this.hV is null or undefined.";
  47642. if (1 == this.hV.length % 2) throw "value hex must be even length: n=" + a.length + ",v=" + this.hV;
  47643. if (b = this.hV.length / 2, c = b.toString(16), 1 == c.length % 2 && (c = "0" + c), 128 > b) return c;
  47644. if (d = c.length / 2, d > 15) throw "ASN.1 length too long to represent by 8x: n = " + b.toString(16);
  47645. return e = 128 + d, e.toString(16) + c;
  47646. }, this.getEncodedHex = function () {
  47647. return (null == this.hTLV || this.isModified) && (this.hV = this.getFreshValueHex(), this.hL = this.getLengthHexFromValue(), this.hTLV = this.hT + this.hL + this.hV, this.isModified = !1), this.hTLV;
  47648. }, this.getValueHex = function () {
  47649. return this.getEncodedHex(), this.hV;
  47650. }, this.getFreshValueHex = function () {
  47651. return "";
  47652. };
  47653. }, pb.asn1.DERAbstractString = function (a) {
  47654. pb.asn1.DERAbstractString.superclass.constructor.call(this), this.getString = function () {
  47655. return this.s;
  47656. }, this.setString = function (a) {
  47657. this.hTLV = null, this.isModified = !0, this.s = a, this.hV = stohex(this.s);
  47658. }, this.setStringHex = function (a) {
  47659. this.hTLV = null, this.isModified = !0, this.s = null, this.hV = a;
  47660. }, this.getFreshValueHex = function () {
  47661. return this.hV;
  47662. }, "undefined" != typeof a && ("string" == typeof a ? this.setString(a) : "undefined" != typeof a["str"] ? this.setString(a["str"]) : "undefined" != typeof a["hex"] && this.setStringHex(a["hex"]));
  47663. }, ob.lang.extend(pb.asn1.DERAbstractString, pb.asn1.ASN1Object), pb.asn1.DERAbstractTime = function () {
  47664. pb.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function (a) {
  47665. utc = a.getTime() + 6e4 * a.getTimezoneOffset();
  47666. var b = new Date(utc);
  47667. return b;
  47668. }, this.formatDate = function (a, b, c) {
  47669. var g,
  47670. h,
  47671. i,
  47672. j,
  47673. k,
  47674. l,
  47675. m,
  47676. n,
  47677. d = this.zeroPadding,
  47678. e = this.localDateToUTC(a),
  47679. f = String(e.getFullYear());
  47680. return "utc" == b && (f = f.substr(2, 2)), g = d(String(e.getMonth() + 1), 2), h = d(String(e.getDate()), 2), i = d(String(e.getHours()), 2), j = d(String(e.getMinutes()), 2), k = d(String(e.getSeconds()), 2), l = f + g + h + i + j + k, c === !0 && (m = e.getMilliseconds(), 0 != m && (n = d(String(m), 3), n = n.replace(/[0]+$/, ""), l = l + "." + n)), l + "Z";
  47681. }, this.zeroPadding = function (a, b) {
  47682. return a.length >= b ? a : new Array(b - a.length + 1).join("0") + a;
  47683. }, this.getString = function () {
  47684. return this.s;
  47685. }, this.setString = function (a) {
  47686. this.hTLV = null, this.isModified = !0, this.s = a, this.hV = stohex(a);
  47687. }, this.setByDateValue = function (a, b, c, d, e, f) {
  47688. var g = new Date(Date.UTC(a, b - 1, c, d, e, f, 0));
  47689. this.setByDate(g);
  47690. }, this.getFreshValueHex = function () {
  47691. return this.hV;
  47692. };
  47693. }, ob.lang.extend(pb.asn1.DERAbstractTime, pb.asn1.ASN1Object), pb.asn1.DERAbstractStructured = function (a) {
  47694. pb.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function (a) {
  47695. this.hTLV = null, this.isModified = !0, this.asn1Array = a;
  47696. }, this.appendASN1Object = function (a) {
  47697. this.hTLV = null, this.isModified = !0, this.asn1Array.push(a);
  47698. }, this.asn1Array = new Array(), "undefined" != typeof a && "undefined" != typeof a["array"] && (this.asn1Array = a["array"]);
  47699. }, ob.lang.extend(pb.asn1.DERAbstractStructured, pb.asn1.ASN1Object), pb.asn1.DERBoolean = function () {
  47700. pb.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
  47701. }, ob.lang.extend(pb.asn1.DERBoolean, pb.asn1.ASN1Object), pb.asn1.DERInteger = function (a) {
  47702. pb.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function (a) {
  47703. this.hTLV = null, this.isModified = !0, this.hV = pb.asn1.ASN1Util.bigIntToMinTwosComplementsHex(a);
  47704. }, this.setByInteger = function (a) {
  47705. var b = new H(String(a), 10);
  47706. this.setByBigInteger(b);
  47707. }, this.setValueHex = function (a) {
  47708. this.hV = a;
  47709. }, this.getFreshValueHex = function () {
  47710. return this.hV;
  47711. }, "undefined" != typeof a && ("undefined" != typeof a["bigint"] ? this.setByBigInteger(a["bigint"]) : "undefined" != typeof a["int"] ? this.setByInteger(a["int"]) : "number" == typeof a ? this.setByInteger(a) : "undefined" != typeof a["hex"] && this.setValueHex(a["hex"]));
  47712. }, ob.lang.extend(pb.asn1.DERInteger, pb.asn1.ASN1Object), pb.asn1.DERBitString = function (a) {
  47713. if (void 0 !== a && "undefined" != typeof a.obj) {
  47714. var b = pb.asn1.ASN1Util.newObject(a.obj);
  47715. a.hex = "00" + b.getEncodedHex();
  47716. }
  47717. pb.asn1.DERBitString.superclass.constructor.call(this), this.hT = "03", this.setHexValueIncludingUnusedBits = function (a) {
  47718. this.hTLV = null, this.isModified = !0, this.hV = a;
  47719. }, this.setUnusedBitsAndHexValue = function (a, b) {
  47720. if (0 > a || a > 7) throw "unused bits shall be from 0 to 7: u = " + a;
  47721. var c = "0" + a;
  47722. this.hTLV = null, this.isModified = !0, this.hV = c + b;
  47723. }, this.setByBinaryString = function (a) {
  47724. var b, c, d, e, f;
  47725. for (a = a.replace(/0+$/, ""), b = 8 - a.length % 8, 8 == b && (b = 0), c = 0; b >= c; c++) {
  47726. a += "0";
  47727. }
  47728. for (d = "", c = 0; c < a.length - 1; c += 8) {
  47729. e = a.substr(c, 8), f = parseInt(e, 2).toString(16), 1 == f.length && (f = "0" + f), d += f;
  47730. }
  47731. this.hTLV = null, this.isModified = !0, this.hV = "0" + b + d;
  47732. }, this.setByBooleanArray = function (a) {
  47733. var c,
  47734. b = "";
  47735. for (c = 0; c < a.length; c++) {
  47736. b += 1 == a[c] ? "1" : "0";
  47737. }
  47738. this.setByBinaryString(b);
  47739. }, this.newFalseArray = function (a) {
  47740. var c,
  47741. b = new Array(a);
  47742. for (c = 0; a > c; c++) {
  47743. b[c] = !1;
  47744. }
  47745. return b;
  47746. }, this.getFreshValueHex = function () {
  47747. return this.hV;
  47748. }, "undefined" != typeof a && ("string" == typeof a && a.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(a) : "undefined" != typeof a["hex"] ? this.setHexValueIncludingUnusedBits(a["hex"]) : "undefined" != typeof a["bin"] ? this.setByBinaryString(a["bin"]) : "undefined" != typeof a["array"] && this.setByBooleanArray(a["array"]));
  47749. }, ob.lang.extend(pb.asn1.DERBitString, pb.asn1.ASN1Object), pb.asn1.DEROctetString = function (a) {
  47750. if (void 0 !== a && "undefined" != typeof a.obj) {
  47751. var b = pb.asn1.ASN1Util.newObject(a.obj);
  47752. a.hex = b.getEncodedHex();
  47753. }
  47754. pb.asn1.DEROctetString.superclass.constructor.call(this, a), this.hT = "04";
  47755. }, ob.lang.extend(pb.asn1.DEROctetString, pb.asn1.DERAbstractString), pb.asn1.DERNull = function () {
  47756. pb.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
  47757. }, ob.lang.extend(pb.asn1.DERNull, pb.asn1.ASN1Object), pb.asn1.DERObjectIdentifier = function (a) {
  47758. var b = function b(a) {
  47759. var b = a.toString(16);
  47760. return 1 == b.length && (b = "0" + b), b;
  47761. },
  47762. c = function c(a) {
  47763. var g,
  47764. h,
  47765. i,
  47766. c = "",
  47767. d = new H(a, 10),
  47768. e = d.toString(2),
  47769. f = 7 - e.length % 7;
  47770. for (7 == f && (f = 0), g = "", h = 0; f > h; h++) {
  47771. g += "0";
  47772. }
  47773. for (e = g + e, h = 0; h < e.length - 1; h += 7) {
  47774. i = e.substr(h, 7), h != e.length - 7 && (i = "1" + i), c += b(parseInt(i, 2));
  47775. }
  47776. return c;
  47777. };
  47778. pb.asn1.DERObjectIdentifier.superclass.constructor.call(this), this.hT = "06", this.setValueHex = function (a) {
  47779. this.hTLV = null, this.isModified = !0, this.s = null, this.hV = a;
  47780. }, this.setValueOidString = function (a) {
  47781. var d, e, f, g;
  47782. if (!a.match(/^[0-9.]+$/)) throw "malformed oid string: " + a;
  47783. for (d = "", e = a.split("."), f = 40 * parseInt(e[0]) + parseInt(e[1]), d += b(f), e.splice(0, 2), g = 0; g < e.length; g++) {
  47784. d += c(e[g]);
  47785. }
  47786. this.hTLV = null, this.isModified = !0, this.s = null, this.hV = d;
  47787. }, this.setValueName = function (a) {
  47788. var b = pb.asn1.x509.OID.name2oid(a);
  47789. if ("" === b) throw "DERObjectIdentifier oidName undefined: " + a;
  47790. this.setValueOidString(b);
  47791. }, this.getFreshValueHex = function () {
  47792. return this.hV;
  47793. }, void 0 !== a && ("string" == typeof a ? a.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(a) : this.setValueName(a) : void 0 !== a.oid ? this.setValueOidString(a.oid) : void 0 !== a.hex ? this.setValueHex(a.hex) : void 0 !== a.name && this.setValueName(a.name));
  47794. }, ob.lang.extend(pb.asn1.DERObjectIdentifier, pb.asn1.ASN1Object), pb.asn1.DEREnumerated = function (a) {
  47795. pb.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function (a) {
  47796. this.hTLV = null, this.isModified = !0, this.hV = pb.asn1.ASN1Util.bigIntToMinTwosComplementsHex(a);
  47797. }, this.setByInteger = function (a) {
  47798. var b = new H(String(a), 10);
  47799. this.setByBigInteger(b);
  47800. }, this.setValueHex = function (a) {
  47801. this.hV = a;
  47802. }, this.getFreshValueHex = function () {
  47803. return this.hV;
  47804. }, "undefined" != typeof a && ("undefined" != typeof a["int"] ? this.setByInteger(a["int"]) : "number" == typeof a ? this.setByInteger(a) : "undefined" != typeof a["hex"] && this.setValueHex(a["hex"]));
  47805. }, ob.lang.extend(pb.asn1.DEREnumerated, pb.asn1.ASN1Object), pb.asn1.DERUTF8String = function (a) {
  47806. pb.asn1.DERUTF8String.superclass.constructor.call(this, a), this.hT = "0c";
  47807. }, ob.lang.extend(pb.asn1.DERUTF8String, pb.asn1.DERAbstractString), pb.asn1.DERNumericString = function (a) {
  47808. pb.asn1.DERNumericString.superclass.constructor.call(this, a), this.hT = "12";
  47809. }, ob.lang.extend(pb.asn1.DERNumericString, pb.asn1.DERAbstractString), pb.asn1.DERPrintableString = function (a) {
  47810. pb.asn1.DERPrintableString.superclass.constructor.call(this, a), this.hT = "13";
  47811. }, ob.lang.extend(pb.asn1.DERPrintableString, pb.asn1.DERAbstractString), pb.asn1.DERTeletexString = function (a) {
  47812. pb.asn1.DERTeletexString.superclass.constructor.call(this, a), this.hT = "14";
  47813. }, ob.lang.extend(pb.asn1.DERTeletexString, pb.asn1.DERAbstractString), pb.asn1.DERIA5String = function (a) {
  47814. pb.asn1.DERIA5String.superclass.constructor.call(this, a), this.hT = "16";
  47815. }, ob.lang.extend(pb.asn1.DERIA5String, pb.asn1.DERAbstractString), pb.asn1.DERUTCTime = function (a) {
  47816. pb.asn1.DERUTCTime.superclass.constructor.call(this, a), this.hT = "17", this.setByDate = function (a) {
  47817. this.hTLV = null, this.isModified = !0, this.date = a, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
  47818. }, this.getFreshValueHex = function () {
  47819. return "undefined" == typeof this.date && "undefined" == typeof this.s && (this.date = new Date(), this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s)), this.hV;
  47820. }, void 0 !== a && (void 0 !== a.str ? this.setString(a.str) : "string" == typeof a && a.match(/^[0-9]{12}Z$/) ? this.setString(a) : void 0 !== a.hex ? this.setStringHex(a.hex) : void 0 !== a.date && this.setByDate(a.date));
  47821. }, ob.lang.extend(pb.asn1.DERUTCTime, pb.asn1.DERAbstractTime), pb.asn1.DERGeneralizedTime = function (a) {
  47822. pb.asn1.DERGeneralizedTime.superclass.constructor.call(this, a), this.hT = "18", this.withMillis = !1, this.setByDate = function (a) {
  47823. this.hTLV = null, this.isModified = !0, this.date = a, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
  47824. }, this.getFreshValueHex = function () {
  47825. return void 0 === this.date && void 0 === this.s && (this.date = new Date(), this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s)), this.hV;
  47826. }, void 0 !== a && (void 0 !== a.str ? this.setString(a.str) : "string" == typeof a && a.match(/^[0-9]{14}Z$/) ? this.setString(a) : void 0 !== a.hex ? this.setStringHex(a.hex) : void 0 !== a.date && this.setByDate(a.date), a.millis === !0 && (this.withMillis = !0));
  47827. }, ob.lang.extend(pb.asn1.DERGeneralizedTime, pb.asn1.DERAbstractTime), pb.asn1.DERSequence = function (a) {
  47828. pb.asn1.DERSequence.superclass.constructor.call(this, a), this.hT = "30", this.getFreshValueHex = function () {
  47829. var b,
  47830. c,
  47831. a = "";
  47832. for (b = 0; b < this.asn1Array.length; b++) {
  47833. c = this.asn1Array[b], a += c.getEncodedHex();
  47834. }
  47835. return this.hV = a, this.hV;
  47836. };
  47837. }, ob.lang.extend(pb.asn1.DERSequence, pb.asn1.DERAbstractStructured), pb.asn1.DERSet = function (a) {
  47838. pb.asn1.DERSet.superclass.constructor.call(this, a), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function () {
  47839. var b,
  47840. c,
  47841. a = new Array();
  47842. for (b = 0; b < this.asn1Array.length; b++) {
  47843. c = this.asn1Array[b], a.push(c.getEncodedHex());
  47844. }
  47845. return 1 == this.sortFlag && a.sort(), this.hV = a.join(""), this.hV;
  47846. }, "undefined" != typeof a && "undefined" != typeof a.sortflag && 0 == a.sortflag && (this.sortFlag = !1);
  47847. }, ob.lang.extend(pb.asn1.DERSet, pb.asn1.DERAbstractStructured), pb.asn1.DERTaggedObject = function (a) {
  47848. pb.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function (a, b, c) {
  47849. this.hT = b, this.isExplicit = a, this.asn1Object = c, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = c.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, b), this.isModified = !1);
  47850. }, this.getFreshValueHex = function () {
  47851. return this.hV;
  47852. }, "undefined" != typeof a && ("undefined" != typeof a["tag"] && (this.hT = a["tag"]), "undefined" != typeof a["explicit"] && (this.isExplicit = a["explicit"]), "undefined" != typeof a["obj"] && (this.asn1Object = a["obj"], this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
  47853. }, ob.lang.extend(pb.asn1.DERTaggedObject, pb.asn1.ASN1Object), qb = function (a) {
  47854. function b(c) {
  47855. var d = a.call(this) || this;
  47856. return c && ("string" == typeof c ? d.parseKey(c) : (b.hasPrivateKeyProperty(c) || b.hasPublicKeyProperty(c)) && d.parsePropertiesFrom(c)), d;
  47857. }
  47858. return o(b, a), b.prototype.parseKey = function (a) {
  47859. var b, c, d, e, f, g, h, i, j, k, l, m, n;
  47860. try {
  47861. if (b = 0, c = 0, d = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, e = d.test(a) ? q.decode(a) : s.unarmor(a), f = A.decode(e), 3 === f.sub.length && (f = f.sub[2].sub[0]), 9 === f.sub.length) b = f.sub[1].getHexStringValue(), this.n = N(b, 16), c = f.sub[2].getHexStringValue(), this.e = parseInt(c, 16), g = f.sub[3].getHexStringValue(), this.d = N(g, 16), h = f.sub[4].getHexStringValue(), this.p = N(h, 16), i = f.sub[5].getHexStringValue(), this.q = N(i, 16), j = f.sub[6].getHexStringValue(), this.dmp1 = N(j, 16), k = f.sub[7].getHexStringValue(), this.dmq1 = N(k, 16), l = f.sub[8].getHexStringValue(), this.coeff = N(l, 16);else {
  47862. if (2 !== f.sub.length) return !1;
  47863. m = f.sub[1], n = m.sub[0], b = n.sub[0].getHexStringValue(), this.n = N(b, 16), c = n.sub[1].getHexStringValue(), this.e = parseInt(c, 16);
  47864. }
  47865. return !0;
  47866. } catch (o) {
  47867. return !1;
  47868. }
  47869. }, b.prototype.getPrivateBaseKey = function () {
  47870. var a = {
  47871. array: [new pb.asn1.DERInteger({
  47872. "int": 0
  47873. }), new pb.asn1.DERInteger({
  47874. bigint: this.n
  47875. }), new pb.asn1.DERInteger({
  47876. "int": this.e
  47877. }), new pb.asn1.DERInteger({
  47878. bigint: this.d
  47879. }), new pb.asn1.DERInteger({
  47880. bigint: this.p
  47881. }), new pb.asn1.DERInteger({
  47882. bigint: this.q
  47883. }), new pb.asn1.DERInteger({
  47884. bigint: this.dmp1
  47885. }), new pb.asn1.DERInteger({
  47886. bigint: this.dmq1
  47887. }), new pb.asn1.DERInteger({
  47888. bigint: this.coeff
  47889. })]
  47890. },
  47891. b = new pb.asn1.DERSequence(a);
  47892. return b.getEncodedHex();
  47893. }, b.prototype.getPrivateBaseKeyB64 = function () {
  47894. return l(this.getPrivateBaseKey());
  47895. }, b.prototype.getPublicBaseKey = function () {
  47896. var a = new pb.asn1.DERSequence({
  47897. array: [new pb.asn1.DERObjectIdentifier({
  47898. oid: "1.2.840.113549.1.1.1"
  47899. }), new pb.asn1.DERNull()]
  47900. }),
  47901. b = new pb.asn1.DERSequence({
  47902. array: [new pb.asn1.DERInteger({
  47903. bigint: this.n
  47904. }), new pb.asn1.DERInteger({
  47905. "int": this.e
  47906. })]
  47907. }),
  47908. c = new pb.asn1.DERBitString({
  47909. hex: "00" + b.getEncodedHex()
  47910. }),
  47911. d = new pb.asn1.DERSequence({
  47912. array: [a, c]
  47913. });
  47914. return d.getEncodedHex();
  47915. }, b.prototype.getPublicBaseKeyB64 = function () {
  47916. return l(this.getPublicBaseKey());
  47917. }, b.wordwrap = function (a, b) {
  47918. if (b = b || 64, !a) return a;
  47919. var c = "(.{1," + b + "})( +|$\n?)|(.{1," + b + "})";
  47920. return a.match(RegExp(c, "g")).join("\n");
  47921. }, b.prototype.getPrivateKey = function () {
  47922. var a = "-----BEGIN RSA PRIVATE KEY-----\n";
  47923. return a += b.wordwrap(this.getPrivateBaseKeyB64()) + "\n", a += "-----END RSA PRIVATE KEY-----";
  47924. }, b.prototype.getPublicKey = function () {
  47925. var a = "-----BEGIN PUBLIC KEY-----\n";
  47926. return a += b.wordwrap(this.getPublicBaseKeyB64()) + "\n", a += "-----END PUBLIC KEY-----";
  47927. }, b.hasPublicKeyProperty = function (a) {
  47928. return a = a || {}, a.hasOwnProperty("n") && a.hasOwnProperty("e");
  47929. }, b.hasPrivateKeyProperty = function (a) {
  47930. return a = a || {}, a.hasOwnProperty("n") && a.hasOwnProperty("e") && a.hasOwnProperty("d") && a.hasOwnProperty("p") && a.hasOwnProperty("q") && a.hasOwnProperty("dmp1") && a.hasOwnProperty("dmq1") && a.hasOwnProperty("coeff");
  47931. }, b.prototype.parsePropertiesFrom = function (a) {
  47932. this.n = a.n, this.e = a.e, a.hasOwnProperty("d") && (this.d = a.d, this.p = a.p, this.q = a.q, this.dmp1 = a.dmp1, this.dmq1 = a.dmq1, this.coeff = a.coeff);
  47933. }, b;
  47934. }(jb), rb = function () {
  47935. function a(a) {
  47936. a = a || {}, this.default_key_size = parseInt(a.default_key_size, 10) || 1024, this.default_public_exponent = a.default_public_exponent || "010001", this.log = a.log || !1, this.key = null;
  47937. }
  47938. return a.prototype.setKey = function (a) {
  47939. this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new qb(a);
  47940. }, a.prototype.setPrivateKey = function (a) {
  47941. this.setKey(a);
  47942. }, a.prototype.setPublicKey = function (a) {
  47943. this.setKey(a);
  47944. }, a.prototype.decrypt = function (a) {
  47945. try {
  47946. return this.getKey().decrypt(m(a));
  47947. } catch (b) {
  47948. return !1;
  47949. }
  47950. }, a.prototype.encrypt = function (a) {
  47951. try {
  47952. return l(this.getKey().encrypt(a));
  47953. } catch (b) {
  47954. return !1;
  47955. }
  47956. }, a.prototype.sign = function (a, b, c) {
  47957. try {
  47958. return l(this.getKey().sign(a, b, c));
  47959. } catch (d) {
  47960. return !1;
  47961. }
  47962. }, a.prototype.verify = function (a, b, c) {
  47963. try {
  47964. return this.getKey().verify(a, m(b), c);
  47965. } catch (d) {
  47966. return !1;
  47967. }
  47968. }, a.prototype.getKey = function (a) {
  47969. if (!this.key) {
  47970. if (this.key = new qb(), a && "[object Function]" === {}.toString.call(a)) return this.key.generateAsync(this.default_key_size, this.default_public_exponent, a), void 0;
  47971. this.key.generate(this.default_key_size, this.default_public_exponent);
  47972. }
  47973. return this.key;
  47974. }, a.prototype.getPrivateKey = function () {
  47975. return this.getKey().getPrivateKey();
  47976. }, a.prototype.getPrivateKeyB64 = function () {
  47977. return this.getKey().getPrivateBaseKeyB64();
  47978. }, a.prototype.getPublicKey = function () {
  47979. return this.getKey().getPublicKey();
  47980. }, a.prototype.getPublicKeyB64 = function () {
  47981. return this.getKey().getPublicBaseKeyB64();
  47982. }, a.version = "3.0.0-rc.1", a;
  47983. }(), a.JSEncrypt = rb, a.default = rb, Object.defineProperty(a, "__esModule", {
  47984. value: !0
  47985. });
  47986. });
  47987. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! (webpack)/buildin/global.js */ 3)))
  47988. /***/ }),
  47989. /***/ 76:
  47990. /*!*************************************************!*\
  47991. !*** ./node_modules/crypto-browserify/index.js ***!
  47992. \*************************************************/
  47993. /*! no static exports found */
  47994. /***/ (function(module, exports, __webpack_require__) {
  47995. "use strict";
  47996. exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = __webpack_require__(/*! randombytes */ 77)
  47997. exports.createHash = exports.Hash = __webpack_require__(/*! create-hash */ 85)
  47998. exports.createHmac = exports.Hmac = __webpack_require__(/*! create-hmac */ 120)
  47999. var algos = __webpack_require__(/*! browserify-sign/algos */ 123)
  48000. var algoKeys = Object.keys(algos)
  48001. var hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys)
  48002. exports.getHashes = function () {
  48003. return hashes
  48004. }
  48005. var p = __webpack_require__(/*! pbkdf2 */ 125)
  48006. exports.pbkdf2 = p.pbkdf2
  48007. exports.pbkdf2Sync = p.pbkdf2Sync
  48008. var aes = __webpack_require__(/*! browserify-cipher */ 131)
  48009. exports.Cipher = aes.Cipher
  48010. exports.createCipher = aes.createCipher
  48011. exports.Cipheriv = aes.Cipheriv
  48012. exports.createCipheriv = aes.createCipheriv
  48013. exports.Decipher = aes.Decipher
  48014. exports.createDecipher = aes.createDecipher
  48015. exports.Decipheriv = aes.Decipheriv
  48016. exports.createDecipheriv = aes.createDecipheriv
  48017. exports.getCiphers = aes.getCiphers
  48018. exports.listCiphers = aes.listCiphers
  48019. var dh = __webpack_require__(/*! diffie-hellman */ 160)
  48020. exports.DiffieHellmanGroup = dh.DiffieHellmanGroup
  48021. exports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup
  48022. exports.getDiffieHellman = dh.getDiffieHellman
  48023. exports.createDiffieHellman = dh.createDiffieHellman
  48024. exports.DiffieHellman = dh.DiffieHellman
  48025. var sign = __webpack_require__(/*! browserify-sign */ 170)
  48026. exports.createSign = sign.createSign
  48027. exports.Sign = sign.Sign
  48028. exports.createVerify = sign.createVerify
  48029. exports.Verify = sign.Verify
  48030. exports.createECDH = __webpack_require__(/*! create-ecdh */ 225)
  48031. var publicEncrypt = __webpack_require__(/*! public-encrypt */ 226)
  48032. exports.publicEncrypt = publicEncrypt.publicEncrypt
  48033. exports.privateEncrypt = publicEncrypt.privateEncrypt
  48034. exports.publicDecrypt = publicEncrypt.publicDecrypt
  48035. exports.privateDecrypt = publicEncrypt.privateDecrypt
  48036. // the least I can do is make error messages for the rest of the node.js/crypto api.
  48037. // ;[
  48038. // 'createCredentials'
  48039. // ].forEach(function (name) {
  48040. // exports[name] = function () {
  48041. // throw new Error([
  48042. // 'sorry, ' + name + ' is not implemented yet',
  48043. // 'we accept pull requests',
  48044. // 'https://github.com/crypto-browserify/crypto-browserify'
  48045. // ].join('\n'))
  48046. // }
  48047. // })
  48048. var rf = __webpack_require__(/*! randomfill */ 232)
  48049. exports.randomFill = rf.randomFill
  48050. exports.randomFillSync = rf.randomFillSync
  48051. exports.createCredentials = function () {
  48052. throw new Error([
  48053. 'sorry, createCredentials is not implemented yet',
  48054. 'we accept pull requests',
  48055. 'https://github.com/crypto-browserify/crypto-browserify'
  48056. ].join('\n'))
  48057. }
  48058. exports.constants = {
  48059. 'DH_CHECK_P_NOT_SAFE_PRIME': 2,
  48060. 'DH_CHECK_P_NOT_PRIME': 1,
  48061. 'DH_UNABLE_TO_CHECK_GENERATOR': 4,
  48062. 'DH_NOT_SUITABLE_GENERATOR': 8,
  48063. 'NPN_ENABLED': 1,
  48064. 'ALPN_ENABLED': 1,
  48065. 'RSA_PKCS1_PADDING': 1,
  48066. 'RSA_SSLV23_PADDING': 2,
  48067. 'RSA_NO_PADDING': 3,
  48068. 'RSA_PKCS1_OAEP_PADDING': 4,
  48069. 'RSA_X931_PADDING': 5,
  48070. 'RSA_PKCS1_PSS_PADDING': 6,
  48071. 'POINT_CONVERSION_COMPRESSED': 2,
  48072. 'POINT_CONVERSION_UNCOMPRESSED': 4,
  48073. 'POINT_CONVERSION_HYBRID': 6
  48074. }
  48075. /***/ }),
  48076. /***/ 77:
  48077. /*!*********************************************!*\
  48078. !*** ./node_modules/randombytes/browser.js ***!
  48079. \*********************************************/
  48080. /*! no static exports found */
  48081. /***/ (function(module, exports, __webpack_require__) {
  48082. "use strict";
  48083. /* WEBPACK VAR INJECTION */(function(global, process) {
  48084. // limit of Crypto.getRandomValues()
  48085. // https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues
  48086. var MAX_BYTES = 65536
  48087. // Node supports requesting up to this number of bytes
  48088. // https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48
  48089. var MAX_UINT32 = 4294967295
  48090. function oldBrowser () {
  48091. throw new Error('Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11')
  48092. }
  48093. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  48094. var crypto = global.crypto || global.msCrypto
  48095. if (crypto && crypto.getRandomValues) {
  48096. module.exports = randomBytes
  48097. } else {
  48098. module.exports = oldBrowser
  48099. }
  48100. function randomBytes (size, cb) {
  48101. // phantomjs needs to throw
  48102. if (size > MAX_UINT32) throw new RangeError('requested too many random bytes')
  48103. var bytes = Buffer.allocUnsafe(size)
  48104. if (size > 0) { // getRandomValues fails on IE if size == 0
  48105. if (size > MAX_BYTES) { // this is the max bytes crypto.getRandomValues
  48106. // can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues
  48107. for (var generated = 0; generated < size; generated += MAX_BYTES) {
  48108. // buffer.slice automatically checks if the end is past the end of
  48109. // the buffer so we don't have to here
  48110. crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES))
  48111. }
  48112. } else {
  48113. crypto.getRandomValues(bytes)
  48114. }
  48115. }
  48116. if (typeof cb === 'function') {
  48117. return process.nextTick(function () {
  48118. cb(null, bytes)
  48119. })
  48120. }
  48121. return bytes
  48122. }
  48123. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 3), __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 78)))
  48124. /***/ }),
  48125. /***/ 78:
  48126. /*!********************************************************!*\
  48127. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  48128. \********************************************************/
  48129. /*! no static exports found */
  48130. /***/ (function(module, exports, __webpack_require__) {
  48131. exports.nextTick = function nextTick(fn) {
  48132. var args = Array.prototype.slice.call(arguments);
  48133. args.shift();
  48134. setTimeout(function () {
  48135. fn.apply(null, args);
  48136. }, 0);
  48137. };
  48138. exports.platform = exports.arch =
  48139. exports.execPath = exports.title = 'browser';
  48140. exports.pid = 1;
  48141. exports.browser = true;
  48142. exports.env = {};
  48143. exports.argv = [];
  48144. exports.binding = function (name) {
  48145. throw new Error('No such module. (Possibly not yet loaded)')
  48146. };
  48147. (function () {
  48148. var cwd = '/';
  48149. var path;
  48150. exports.cwd = function () { return cwd };
  48151. exports.chdir = function (dir) {
  48152. if (!path) path = __webpack_require__(/*! path */ 79);
  48153. cwd = path.resolve(dir, cwd);
  48154. };
  48155. })();
  48156. exports.exit = exports.kill =
  48157. exports.umask = exports.dlopen =
  48158. exports.uptime = exports.memoryUsage =
  48159. exports.uvCounters = function() {};
  48160. exports.features = {};
  48161. /***/ }),
  48162. /***/ 79:
  48163. /*!***********************************************!*\
  48164. !*** ./node_modules/path-browserify/index.js ***!
  48165. \***********************************************/
  48166. /*! no static exports found */
  48167. /***/ (function(module, exports, __webpack_require__) {
  48168. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  48169. // backported and transplited with Babel, with backwards-compat fixes
  48170. // Copyright Joyent, Inc. and other Node contributors.
  48171. //
  48172. // Permission is hereby granted, free of charge, to any person obtaining a
  48173. // copy of this software and associated documentation files (the
  48174. // "Software"), to deal in the Software without restriction, including
  48175. // without limitation the rights to use, copy, modify, merge, publish,
  48176. // distribute, sublicense, and/or sell copies of the Software, and to permit
  48177. // persons to whom the Software is furnished to do so, subject to the
  48178. // following conditions:
  48179. //
  48180. // The above copyright notice and this permission notice shall be included
  48181. // in all copies or substantial portions of the Software.
  48182. //
  48183. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  48184. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  48185. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  48186. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  48187. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  48188. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  48189. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  48190. // resolves . and .. elements in a path array with directory names there
  48191. // must be no slashes, empty elements, or device names (c:\) in the array
  48192. // (so also no leading and trailing slashes - it does not distinguish
  48193. // relative and absolute paths)
  48194. function normalizeArray(parts, allowAboveRoot) {
  48195. // if the path tries to go above the root, `up` ends up > 0
  48196. var up = 0;
  48197. for (var i = parts.length - 1; i >= 0; i--) {
  48198. var last = parts[i];
  48199. if (last === '.') {
  48200. parts.splice(i, 1);
  48201. } else if (last === '..') {
  48202. parts.splice(i, 1);
  48203. up++;
  48204. } else if (up) {
  48205. parts.splice(i, 1);
  48206. up--;
  48207. }
  48208. }
  48209. // if the path is allowed to go above the root, restore leading ..s
  48210. if (allowAboveRoot) {
  48211. for (; up--; up) {
  48212. parts.unshift('..');
  48213. }
  48214. }
  48215. return parts;
  48216. }
  48217. // path.resolve([from ...], to)
  48218. // posix version
  48219. exports.resolve = function() {
  48220. var resolvedPath = '',
  48221. resolvedAbsolute = false;
  48222. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  48223. var path = (i >= 0) ? arguments[i] : process.cwd();
  48224. // Skip empty and invalid entries
  48225. if (typeof path !== 'string') {
  48226. throw new TypeError('Arguments to path.resolve must be strings');
  48227. } else if (!path) {
  48228. continue;
  48229. }
  48230. resolvedPath = path + '/' + resolvedPath;
  48231. resolvedAbsolute = path.charAt(0) === '/';
  48232. }
  48233. // At this point the path should be resolved to a full absolute path, but
  48234. // handle relative paths to be safe (might happen when process.cwd() fails)
  48235. // Normalize the path
  48236. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  48237. return !!p;
  48238. }), !resolvedAbsolute).join('/');
  48239. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  48240. };
  48241. // path.normalize(path)
  48242. // posix version
  48243. exports.normalize = function(path) {
  48244. var isAbsolute = exports.isAbsolute(path),
  48245. trailingSlash = substr(path, -1) === '/';
  48246. // Normalize the path
  48247. path = normalizeArray(filter(path.split('/'), function(p) {
  48248. return !!p;
  48249. }), !isAbsolute).join('/');
  48250. if (!path && !isAbsolute) {
  48251. path = '.';
  48252. }
  48253. if (path && trailingSlash) {
  48254. path += '/';
  48255. }
  48256. return (isAbsolute ? '/' : '') + path;
  48257. };
  48258. // posix version
  48259. exports.isAbsolute = function(path) {
  48260. return path.charAt(0) === '/';
  48261. };
  48262. // posix version
  48263. exports.join = function() {
  48264. var paths = Array.prototype.slice.call(arguments, 0);
  48265. return exports.normalize(filter(paths, function(p, index) {
  48266. if (typeof p !== 'string') {
  48267. throw new TypeError('Arguments to path.join must be strings');
  48268. }
  48269. return p;
  48270. }).join('/'));
  48271. };
  48272. // path.relative(from, to)
  48273. // posix version
  48274. exports.relative = function(from, to) {
  48275. from = exports.resolve(from).substr(1);
  48276. to = exports.resolve(to).substr(1);
  48277. function trim(arr) {
  48278. var start = 0;
  48279. for (; start < arr.length; start++) {
  48280. if (arr[start] !== '') break;
  48281. }
  48282. var end = arr.length - 1;
  48283. for (; end >= 0; end--) {
  48284. if (arr[end] !== '') break;
  48285. }
  48286. if (start > end) return [];
  48287. return arr.slice(start, end - start + 1);
  48288. }
  48289. var fromParts = trim(from.split('/'));
  48290. var toParts = trim(to.split('/'));
  48291. var length = Math.min(fromParts.length, toParts.length);
  48292. var samePartsLength = length;
  48293. for (var i = 0; i < length; i++) {
  48294. if (fromParts[i] !== toParts[i]) {
  48295. samePartsLength = i;
  48296. break;
  48297. }
  48298. }
  48299. var outputParts = [];
  48300. for (var i = samePartsLength; i < fromParts.length; i++) {
  48301. outputParts.push('..');
  48302. }
  48303. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  48304. return outputParts.join('/');
  48305. };
  48306. exports.sep = '/';
  48307. exports.delimiter = ':';
  48308. exports.dirname = function (path) {
  48309. if (typeof path !== 'string') path = path + '';
  48310. if (path.length === 0) return '.';
  48311. var code = path.charCodeAt(0);
  48312. var hasRoot = code === 47 /*/*/;
  48313. var end = -1;
  48314. var matchedSlash = true;
  48315. for (var i = path.length - 1; i >= 1; --i) {
  48316. code = path.charCodeAt(i);
  48317. if (code === 47 /*/*/) {
  48318. if (!matchedSlash) {
  48319. end = i;
  48320. break;
  48321. }
  48322. } else {
  48323. // We saw the first non-path separator
  48324. matchedSlash = false;
  48325. }
  48326. }
  48327. if (end === -1) return hasRoot ? '/' : '.';
  48328. if (hasRoot && end === 1) {
  48329. // return '//';
  48330. // Backwards-compat fix:
  48331. return '/';
  48332. }
  48333. return path.slice(0, end);
  48334. };
  48335. function basename(path) {
  48336. if (typeof path !== 'string') path = path + '';
  48337. var start = 0;
  48338. var end = -1;
  48339. var matchedSlash = true;
  48340. var i;
  48341. for (i = path.length - 1; i >= 0; --i) {
  48342. if (path.charCodeAt(i) === 47 /*/*/) {
  48343. // If we reached a path separator that was not part of a set of path
  48344. // separators at the end of the string, stop now
  48345. if (!matchedSlash) {
  48346. start = i + 1;
  48347. break;
  48348. }
  48349. } else if (end === -1) {
  48350. // We saw the first non-path separator, mark this as the end of our
  48351. // path component
  48352. matchedSlash = false;
  48353. end = i + 1;
  48354. }
  48355. }
  48356. if (end === -1) return '';
  48357. return path.slice(start, end);
  48358. }
  48359. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  48360. // in new Node.js versions, so only basename() above is backported here
  48361. exports.basename = function (path, ext) {
  48362. var f = basename(path);
  48363. if (ext && f.substr(-1 * ext.length) === ext) {
  48364. f = f.substr(0, f.length - ext.length);
  48365. }
  48366. return f;
  48367. };
  48368. exports.extname = function (path) {
  48369. if (typeof path !== 'string') path = path + '';
  48370. var startDot = -1;
  48371. var startPart = 0;
  48372. var end = -1;
  48373. var matchedSlash = true;
  48374. // Track the state of characters (if any) we see before our first dot and
  48375. // after any path separator we find
  48376. var preDotState = 0;
  48377. for (var i = path.length - 1; i >= 0; --i) {
  48378. var code = path.charCodeAt(i);
  48379. if (code === 47 /*/*/) {
  48380. // If we reached a path separator that was not part of a set of path
  48381. // separators at the end of the string, stop now
  48382. if (!matchedSlash) {
  48383. startPart = i + 1;
  48384. break;
  48385. }
  48386. continue;
  48387. }
  48388. if (end === -1) {
  48389. // We saw the first non-path separator, mark this as the end of our
  48390. // extension
  48391. matchedSlash = false;
  48392. end = i + 1;
  48393. }
  48394. if (code === 46 /*.*/) {
  48395. // If this is our first dot, mark it as the start of our extension
  48396. if (startDot === -1)
  48397. startDot = i;
  48398. else if (preDotState !== 1)
  48399. preDotState = 1;
  48400. } else if (startDot !== -1) {
  48401. // We saw a non-dot and non-path separator before our dot, so we should
  48402. // have a good chance at having a non-empty extension
  48403. preDotState = -1;
  48404. }
  48405. }
  48406. if (startDot === -1 || end === -1 ||
  48407. // We saw a non-dot character immediately before the dot
  48408. preDotState === 0 ||
  48409. // The (right-most) trimmed path component is exactly '..'
  48410. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  48411. return '';
  48412. }
  48413. return path.slice(startDot, end);
  48414. };
  48415. function filter (xs, f) {
  48416. if (xs.filter) return xs.filter(f);
  48417. var res = [];
  48418. for (var i = 0; i < xs.length; i++) {
  48419. if (f(xs[i], i, xs)) res.push(xs[i]);
  48420. }
  48421. return res;
  48422. }
  48423. // String.prototype.substr - negative index don't work in IE8
  48424. var substr = 'ab'.substr(-1) === 'b'
  48425. ? function (str, start, len) { return str.substr(start, len) }
  48426. : function (str, start, len) {
  48427. if (start < 0) start = str.length + start;
  48428. return str.substr(start, len);
  48429. }
  48430. ;
  48431. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 78)))
  48432. /***/ }),
  48433. /***/ 8:
  48434. /*!***************************************************************************!*\
  48435. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  48436. \***************************************************************************/
  48437. /*! no static exports found */
  48438. /***/ (function(module, exports, __webpack_require__) {
  48439. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  48440. function _unsupportedIterableToArray(o, minLen) {
  48441. if (!o) return;
  48442. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  48443. var n = Object.prototype.toString.call(o).slice(8, -1);
  48444. if (n === "Object" && o.constructor) n = o.constructor.name;
  48445. if (n === "Map" || n === "Set") return Array.from(o);
  48446. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  48447. }
  48448. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  48449. /***/ }),
  48450. /***/ 80:
  48451. /*!*******************************************!*\
  48452. !*** ./node_modules/safe-buffer/index.js ***!
  48453. \*******************************************/
  48454. /*! no static exports found */
  48455. /***/ (function(module, exports, __webpack_require__) {
  48456. /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
  48457. /* eslint-disable node/no-deprecated-api */
  48458. var buffer = __webpack_require__(/*! buffer */ 81)
  48459. var Buffer = buffer.Buffer
  48460. // alternative to using Object.keys for old browsers
  48461. function copyProps (src, dst) {
  48462. for (var key in src) {
  48463. dst[key] = src[key]
  48464. }
  48465. }
  48466. if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  48467. module.exports = buffer
  48468. } else {
  48469. // Copy properties from require('buffer')
  48470. copyProps(buffer, exports)
  48471. exports.Buffer = SafeBuffer
  48472. }
  48473. function SafeBuffer (arg, encodingOrOffset, length) {
  48474. return Buffer(arg, encodingOrOffset, length)
  48475. }
  48476. SafeBuffer.prototype = Object.create(Buffer.prototype)
  48477. // Copy static methods from Buffer
  48478. copyProps(Buffer, SafeBuffer)
  48479. SafeBuffer.from = function (arg, encodingOrOffset, length) {
  48480. if (typeof arg === 'number') {
  48481. throw new TypeError('Argument must not be a number')
  48482. }
  48483. return Buffer(arg, encodingOrOffset, length)
  48484. }
  48485. SafeBuffer.alloc = function (size, fill, encoding) {
  48486. if (typeof size !== 'number') {
  48487. throw new TypeError('Argument must be a number')
  48488. }
  48489. var buf = Buffer(size)
  48490. if (fill !== undefined) {
  48491. if (typeof encoding === 'string') {
  48492. buf.fill(fill, encoding)
  48493. } else {
  48494. buf.fill(fill)
  48495. }
  48496. } else {
  48497. buf.fill(0)
  48498. }
  48499. return buf
  48500. }
  48501. SafeBuffer.allocUnsafe = function (size) {
  48502. if (typeof size !== 'number') {
  48503. throw new TypeError('Argument must be a number')
  48504. }
  48505. return Buffer(size)
  48506. }
  48507. SafeBuffer.allocUnsafeSlow = function (size) {
  48508. if (typeof size !== 'number') {
  48509. throw new TypeError('Argument must be a number')
  48510. }
  48511. return buffer.SlowBuffer(size)
  48512. }
  48513. /***/ }),
  48514. /***/ 81:
  48515. /*!**************************************!*\
  48516. !*** ./node_modules/buffer/index.js ***!
  48517. \**************************************/
  48518. /*! no static exports found */
  48519. /***/ (function(module, exports, __webpack_require__) {
  48520. "use strict";
  48521. /* WEBPACK VAR INJECTION */(function(global) {/*!
  48522. * The buffer module from node.js, for the browser.
  48523. *
  48524. * @author Feross Aboukhadijeh <http://feross.org>
  48525. * @license MIT
  48526. */
  48527. /* eslint-disable no-proto */
  48528. var base64 = __webpack_require__(/*! base64-js */ 82)
  48529. var ieee754 = __webpack_require__(/*! ieee754 */ 83)
  48530. var isArray = __webpack_require__(/*! isarray */ 84)
  48531. exports.Buffer = Buffer
  48532. exports.SlowBuffer = SlowBuffer
  48533. exports.INSPECT_MAX_BYTES = 50
  48534. /**
  48535. * If `Buffer.TYPED_ARRAY_SUPPORT`:
  48536. * === true Use Uint8Array implementation (fastest)
  48537. * === false Use Object implementation (most compatible, even IE6)
  48538. *
  48539. * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
  48540. * Opera 11.6+, iOS 4.2+.
  48541. *
  48542. * Due to various browser bugs, sometimes the Object implementation will be used even
  48543. * when the browser supports typed arrays.
  48544. *
  48545. * Note:
  48546. *
  48547. * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
  48548. * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
  48549. *
  48550. * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
  48551. *
  48552. * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
  48553. * incorrect length in some situations.
  48554. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
  48555. * get the Object implementation, which is slower but behaves correctly.
  48556. */
  48557. Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
  48558. ? global.TYPED_ARRAY_SUPPORT
  48559. : typedArraySupport()
  48560. /*
  48561. * Export kMaxLength after typed array support is determined.
  48562. */
  48563. exports.kMaxLength = kMaxLength()
  48564. function typedArraySupport () {
  48565. try {
  48566. var arr = new Uint8Array(1)
  48567. arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
  48568. return arr.foo() === 42 && // typed array instances can be augmented
  48569. typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
  48570. arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
  48571. } catch (e) {
  48572. return false
  48573. }
  48574. }
  48575. function kMaxLength () {
  48576. return Buffer.TYPED_ARRAY_SUPPORT
  48577. ? 0x7fffffff
  48578. : 0x3fffffff
  48579. }
  48580. function createBuffer (that, length) {
  48581. if (kMaxLength() < length) {
  48582. throw new RangeError('Invalid typed array length')
  48583. }
  48584. if (Buffer.TYPED_ARRAY_SUPPORT) {
  48585. // Return an augmented `Uint8Array` instance, for best performance
  48586. that = new Uint8Array(length)
  48587. that.__proto__ = Buffer.prototype
  48588. } else {
  48589. // Fallback: Return an object instance of the Buffer class
  48590. if (that === null) {
  48591. that = new Buffer(length)
  48592. }
  48593. that.length = length
  48594. }
  48595. return that
  48596. }
  48597. /**
  48598. * The Buffer constructor returns instances of `Uint8Array` that have their
  48599. * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
  48600. * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
  48601. * and the `Uint8Array` methods. Square bracket notation works as expected -- it
  48602. * returns a single octet.
  48603. *
  48604. * The `Uint8Array` prototype remains unmodified.
  48605. */
  48606. function Buffer (arg, encodingOrOffset, length) {
  48607. if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
  48608. return new Buffer(arg, encodingOrOffset, length)
  48609. }
  48610. // Common case.
  48611. if (typeof arg === 'number') {
  48612. if (typeof encodingOrOffset === 'string') {
  48613. throw new Error(
  48614. 'If encoding is specified then the first argument must be a string'
  48615. )
  48616. }
  48617. return allocUnsafe(this, arg)
  48618. }
  48619. return from(this, arg, encodingOrOffset, length)
  48620. }
  48621. Buffer.poolSize = 8192 // not used by this implementation
  48622. // TODO: Legacy, not needed anymore. Remove in next major version.
  48623. Buffer._augment = function (arr) {
  48624. arr.__proto__ = Buffer.prototype
  48625. return arr
  48626. }
  48627. function from (that, value, encodingOrOffset, length) {
  48628. if (typeof value === 'number') {
  48629. throw new TypeError('"value" argument must not be a number')
  48630. }
  48631. if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
  48632. return fromArrayBuffer(that, value, encodingOrOffset, length)
  48633. }
  48634. if (typeof value === 'string') {
  48635. return fromString(that, value, encodingOrOffset)
  48636. }
  48637. return fromObject(that, value)
  48638. }
  48639. /**
  48640. * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
  48641. * if value is a number.
  48642. * Buffer.from(str[, encoding])
  48643. * Buffer.from(array)
  48644. * Buffer.from(buffer)
  48645. * Buffer.from(arrayBuffer[, byteOffset[, length]])
  48646. **/
  48647. Buffer.from = function (value, encodingOrOffset, length) {
  48648. return from(null, value, encodingOrOffset, length)
  48649. }
  48650. if (Buffer.TYPED_ARRAY_SUPPORT) {
  48651. Buffer.prototype.__proto__ = Uint8Array.prototype
  48652. Buffer.__proto__ = Uint8Array
  48653. if (typeof Symbol !== 'undefined' && Symbol.species &&
  48654. Buffer[Symbol.species] === Buffer) {
  48655. // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
  48656. Object.defineProperty(Buffer, Symbol.species, {
  48657. value: null,
  48658. configurable: true
  48659. })
  48660. }
  48661. }
  48662. function assertSize (size) {
  48663. if (typeof size !== 'number') {
  48664. throw new TypeError('"size" argument must be a number')
  48665. } else if (size < 0) {
  48666. throw new RangeError('"size" argument must not be negative')
  48667. }
  48668. }
  48669. function alloc (that, size, fill, encoding) {
  48670. assertSize(size)
  48671. if (size <= 0) {
  48672. return createBuffer(that, size)
  48673. }
  48674. if (fill !== undefined) {
  48675. // Only pay attention to encoding if it's a string. This
  48676. // prevents accidentally sending in a number that would
  48677. // be interpretted as a start offset.
  48678. return typeof encoding === 'string'
  48679. ? createBuffer(that, size).fill(fill, encoding)
  48680. : createBuffer(that, size).fill(fill)
  48681. }
  48682. return createBuffer(that, size)
  48683. }
  48684. /**
  48685. * Creates a new filled Buffer instance.
  48686. * alloc(size[, fill[, encoding]])
  48687. **/
  48688. Buffer.alloc = function (size, fill, encoding) {
  48689. return alloc(null, size, fill, encoding)
  48690. }
  48691. function allocUnsafe (that, size) {
  48692. assertSize(size)
  48693. that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
  48694. if (!Buffer.TYPED_ARRAY_SUPPORT) {
  48695. for (var i = 0; i < size; ++i) {
  48696. that[i] = 0
  48697. }
  48698. }
  48699. return that
  48700. }
  48701. /**
  48702. * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
  48703. * */
  48704. Buffer.allocUnsafe = function (size) {
  48705. return allocUnsafe(null, size)
  48706. }
  48707. /**
  48708. * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
  48709. */
  48710. Buffer.allocUnsafeSlow = function (size) {
  48711. return allocUnsafe(null, size)
  48712. }
  48713. function fromString (that, string, encoding) {
  48714. if (typeof encoding !== 'string' || encoding === '') {
  48715. encoding = 'utf8'
  48716. }
  48717. if (!Buffer.isEncoding(encoding)) {
  48718. throw new TypeError('"encoding" must be a valid string encoding')
  48719. }
  48720. var length = byteLength(string, encoding) | 0
  48721. that = createBuffer(that, length)
  48722. var actual = that.write(string, encoding)
  48723. if (actual !== length) {
  48724. // Writing a hex string, for example, that contains invalid characters will
  48725. // cause everything after the first invalid character to be ignored. (e.g.
  48726. // 'abxxcd' will be treated as 'ab')
  48727. that = that.slice(0, actual)
  48728. }
  48729. return that
  48730. }
  48731. function fromArrayLike (that, array) {
  48732. var length = array.length < 0 ? 0 : checked(array.length) | 0
  48733. that = createBuffer(that, length)
  48734. for (var i = 0; i < length; i += 1) {
  48735. that[i] = array[i] & 255
  48736. }
  48737. return that
  48738. }
  48739. function fromArrayBuffer (that, array, byteOffset, length) {
  48740. array.byteLength // this throws if `array` is not a valid ArrayBuffer
  48741. if (byteOffset < 0 || array.byteLength < byteOffset) {
  48742. throw new RangeError('\'offset\' is out of bounds')
  48743. }
  48744. if (array.byteLength < byteOffset + (length || 0)) {
  48745. throw new RangeError('\'length\' is out of bounds')
  48746. }
  48747. if (byteOffset === undefined && length === undefined) {
  48748. array = new Uint8Array(array)
  48749. } else if (length === undefined) {
  48750. array = new Uint8Array(array, byteOffset)
  48751. } else {
  48752. array = new Uint8Array(array, byteOffset, length)
  48753. }
  48754. if (Buffer.TYPED_ARRAY_SUPPORT) {
  48755. // Return an augmented `Uint8Array` instance, for best performance
  48756. that = array
  48757. that.__proto__ = Buffer.prototype
  48758. } else {
  48759. // Fallback: Return an object instance of the Buffer class
  48760. that = fromArrayLike(that, array)
  48761. }
  48762. return that
  48763. }
  48764. function fromObject (that, obj) {
  48765. if (Buffer.isBuffer(obj)) {
  48766. var len = checked(obj.length) | 0
  48767. that = createBuffer(that, len)
  48768. if (that.length === 0) {
  48769. return that
  48770. }
  48771. obj.copy(that, 0, 0, len)
  48772. return that
  48773. }
  48774. if (obj) {
  48775. if ((typeof ArrayBuffer !== 'undefined' &&
  48776. obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
  48777. if (typeof obj.length !== 'number' || isnan(obj.length)) {
  48778. return createBuffer(that, 0)
  48779. }
  48780. return fromArrayLike(that, obj)
  48781. }
  48782. if (obj.type === 'Buffer' && isArray(obj.data)) {
  48783. return fromArrayLike(that, obj.data)
  48784. }
  48785. }
  48786. throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
  48787. }
  48788. function checked (length) {
  48789. // Note: cannot use `length < kMaxLength()` here because that fails when
  48790. // length is NaN (which is otherwise coerced to zero.)
  48791. if (length >= kMaxLength()) {
  48792. throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
  48793. 'size: 0x' + kMaxLength().toString(16) + ' bytes')
  48794. }
  48795. return length | 0
  48796. }
  48797. function SlowBuffer (length) {
  48798. if (+length != length) { // eslint-disable-line eqeqeq
  48799. length = 0
  48800. }
  48801. return Buffer.alloc(+length)
  48802. }
  48803. Buffer.isBuffer = function isBuffer (b) {
  48804. return !!(b != null && b._isBuffer)
  48805. }
  48806. Buffer.compare = function compare (a, b) {
  48807. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  48808. throw new TypeError('Arguments must be Buffers')
  48809. }
  48810. if (a === b) return 0
  48811. var x = a.length
  48812. var y = b.length
  48813. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  48814. if (a[i] !== b[i]) {
  48815. x = a[i]
  48816. y = b[i]
  48817. break
  48818. }
  48819. }
  48820. if (x < y) return -1
  48821. if (y < x) return 1
  48822. return 0
  48823. }
  48824. Buffer.isEncoding = function isEncoding (encoding) {
  48825. switch (String(encoding).toLowerCase()) {
  48826. case 'hex':
  48827. case 'utf8':
  48828. case 'utf-8':
  48829. case 'ascii':
  48830. case 'latin1':
  48831. case 'binary':
  48832. case 'base64':
  48833. case 'ucs2':
  48834. case 'ucs-2':
  48835. case 'utf16le':
  48836. case 'utf-16le':
  48837. return true
  48838. default:
  48839. return false
  48840. }
  48841. }
  48842. Buffer.concat = function concat (list, length) {
  48843. if (!isArray(list)) {
  48844. throw new TypeError('"list" argument must be an Array of Buffers')
  48845. }
  48846. if (list.length === 0) {
  48847. return Buffer.alloc(0)
  48848. }
  48849. var i
  48850. if (length === undefined) {
  48851. length = 0
  48852. for (i = 0; i < list.length; ++i) {
  48853. length += list[i].length
  48854. }
  48855. }
  48856. var buffer = Buffer.allocUnsafe(length)
  48857. var pos = 0
  48858. for (i = 0; i < list.length; ++i) {
  48859. var buf = list[i]
  48860. if (!Buffer.isBuffer(buf)) {
  48861. throw new TypeError('"list" argument must be an Array of Buffers')
  48862. }
  48863. buf.copy(buffer, pos)
  48864. pos += buf.length
  48865. }
  48866. return buffer
  48867. }
  48868. function byteLength (string, encoding) {
  48869. if (Buffer.isBuffer(string)) {
  48870. return string.length
  48871. }
  48872. if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
  48873. (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
  48874. return string.byteLength
  48875. }
  48876. if (typeof string !== 'string') {
  48877. string = '' + string
  48878. }
  48879. var len = string.length
  48880. if (len === 0) return 0
  48881. // Use a for loop to avoid recursion
  48882. var loweredCase = false
  48883. for (;;) {
  48884. switch (encoding) {
  48885. case 'ascii':
  48886. case 'latin1':
  48887. case 'binary':
  48888. return len
  48889. case 'utf8':
  48890. case 'utf-8':
  48891. case undefined:
  48892. return utf8ToBytes(string).length
  48893. case 'ucs2':
  48894. case 'ucs-2':
  48895. case 'utf16le':
  48896. case 'utf-16le':
  48897. return len * 2
  48898. case 'hex':
  48899. return len >>> 1
  48900. case 'base64':
  48901. return base64ToBytes(string).length
  48902. default:
  48903. if (loweredCase) return utf8ToBytes(string).length // assume utf8
  48904. encoding = ('' + encoding).toLowerCase()
  48905. loweredCase = true
  48906. }
  48907. }
  48908. }
  48909. Buffer.byteLength = byteLength
  48910. function slowToString (encoding, start, end) {
  48911. var loweredCase = false
  48912. // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  48913. // property of a typed array.
  48914. // This behaves neither like String nor Uint8Array in that we set start/end
  48915. // to their upper/lower bounds if the value passed is out of range.
  48916. // undefined is handled specially as per ECMA-262 6th Edition,
  48917. // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  48918. if (start === undefined || start < 0) {
  48919. start = 0
  48920. }
  48921. // Return early if start > this.length. Done here to prevent potential uint32
  48922. // coercion fail below.
  48923. if (start > this.length) {
  48924. return ''
  48925. }
  48926. if (end === undefined || end > this.length) {
  48927. end = this.length
  48928. }
  48929. if (end <= 0) {
  48930. return ''
  48931. }
  48932. // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
  48933. end >>>= 0
  48934. start >>>= 0
  48935. if (end <= start) {
  48936. return ''
  48937. }
  48938. if (!encoding) encoding = 'utf8'
  48939. while (true) {
  48940. switch (encoding) {
  48941. case 'hex':
  48942. return hexSlice(this, start, end)
  48943. case 'utf8':
  48944. case 'utf-8':
  48945. return utf8Slice(this, start, end)
  48946. case 'ascii':
  48947. return asciiSlice(this, start, end)
  48948. case 'latin1':
  48949. case 'binary':
  48950. return latin1Slice(this, start, end)
  48951. case 'base64':
  48952. return base64Slice(this, start, end)
  48953. case 'ucs2':
  48954. case 'ucs-2':
  48955. case 'utf16le':
  48956. case 'utf-16le':
  48957. return utf16leSlice(this, start, end)
  48958. default:
  48959. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  48960. encoding = (encoding + '').toLowerCase()
  48961. loweredCase = true
  48962. }
  48963. }
  48964. }
  48965. // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
  48966. // Buffer instances.
  48967. Buffer.prototype._isBuffer = true
  48968. function swap (b, n, m) {
  48969. var i = b[n]
  48970. b[n] = b[m]
  48971. b[m] = i
  48972. }
  48973. Buffer.prototype.swap16 = function swap16 () {
  48974. var len = this.length
  48975. if (len % 2 !== 0) {
  48976. throw new RangeError('Buffer size must be a multiple of 16-bits')
  48977. }
  48978. for (var i = 0; i < len; i += 2) {
  48979. swap(this, i, i + 1)
  48980. }
  48981. return this
  48982. }
  48983. Buffer.prototype.swap32 = function swap32 () {
  48984. var len = this.length
  48985. if (len % 4 !== 0) {
  48986. throw new RangeError('Buffer size must be a multiple of 32-bits')
  48987. }
  48988. for (var i = 0; i < len; i += 4) {
  48989. swap(this, i, i + 3)
  48990. swap(this, i + 1, i + 2)
  48991. }
  48992. return this
  48993. }
  48994. Buffer.prototype.swap64 = function swap64 () {
  48995. var len = this.length
  48996. if (len % 8 !== 0) {
  48997. throw new RangeError('Buffer size must be a multiple of 64-bits')
  48998. }
  48999. for (var i = 0; i < len; i += 8) {
  49000. swap(this, i, i + 7)
  49001. swap(this, i + 1, i + 6)
  49002. swap(this, i + 2, i + 5)
  49003. swap(this, i + 3, i + 4)
  49004. }
  49005. return this
  49006. }
  49007. Buffer.prototype.toString = function toString () {
  49008. var length = this.length | 0
  49009. if (length === 0) return ''
  49010. if (arguments.length === 0) return utf8Slice(this, 0, length)
  49011. return slowToString.apply(this, arguments)
  49012. }
  49013. Buffer.prototype.equals = function equals (b) {
  49014. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
  49015. if (this === b) return true
  49016. return Buffer.compare(this, b) === 0
  49017. }
  49018. Buffer.prototype.inspect = function inspect () {
  49019. var str = ''
  49020. var max = exports.INSPECT_MAX_BYTES
  49021. if (this.length > 0) {
  49022. str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
  49023. if (this.length > max) str += ' ... '
  49024. }
  49025. return '<Buffer ' + str + '>'
  49026. }
  49027. Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
  49028. if (!Buffer.isBuffer(target)) {
  49029. throw new TypeError('Argument must be a Buffer')
  49030. }
  49031. if (start === undefined) {
  49032. start = 0
  49033. }
  49034. if (end === undefined) {
  49035. end = target ? target.length : 0
  49036. }
  49037. if (thisStart === undefined) {
  49038. thisStart = 0
  49039. }
  49040. if (thisEnd === undefined) {
  49041. thisEnd = this.length
  49042. }
  49043. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  49044. throw new RangeError('out of range index')
  49045. }
  49046. if (thisStart >= thisEnd && start >= end) {
  49047. return 0
  49048. }
  49049. if (thisStart >= thisEnd) {
  49050. return -1
  49051. }
  49052. if (start >= end) {
  49053. return 1
  49054. }
  49055. start >>>= 0
  49056. end >>>= 0
  49057. thisStart >>>= 0
  49058. thisEnd >>>= 0
  49059. if (this === target) return 0
  49060. var x = thisEnd - thisStart
  49061. var y = end - start
  49062. var len = Math.min(x, y)
  49063. var thisCopy = this.slice(thisStart, thisEnd)
  49064. var targetCopy = target.slice(start, end)
  49065. for (var i = 0; i < len; ++i) {
  49066. if (thisCopy[i] !== targetCopy[i]) {
  49067. x = thisCopy[i]
  49068. y = targetCopy[i]
  49069. break
  49070. }
  49071. }
  49072. if (x < y) return -1
  49073. if (y < x) return 1
  49074. return 0
  49075. }
  49076. // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
  49077. // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
  49078. //
  49079. // Arguments:
  49080. // - buffer - a Buffer to search
  49081. // - val - a string, Buffer, or number
  49082. // - byteOffset - an index into `buffer`; will be clamped to an int32
  49083. // - encoding - an optional encoding, relevant is val is a string
  49084. // - dir - true for indexOf, false for lastIndexOf
  49085. function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
  49086. // Empty buffer means no match
  49087. if (buffer.length === 0) return -1
  49088. // Normalize byteOffset
  49089. if (typeof byteOffset === 'string') {
  49090. encoding = byteOffset
  49091. byteOffset = 0
  49092. } else if (byteOffset > 0x7fffffff) {
  49093. byteOffset = 0x7fffffff
  49094. } else if (byteOffset < -0x80000000) {
  49095. byteOffset = -0x80000000
  49096. }
  49097. byteOffset = +byteOffset // Coerce to Number.
  49098. if (isNaN(byteOffset)) {
  49099. // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
  49100. byteOffset = dir ? 0 : (buffer.length - 1)
  49101. }
  49102. // Normalize byteOffset: negative offsets start from the end of the buffer
  49103. if (byteOffset < 0) byteOffset = buffer.length + byteOffset
  49104. if (byteOffset >= buffer.length) {
  49105. if (dir) return -1
  49106. else byteOffset = buffer.length - 1
  49107. } else if (byteOffset < 0) {
  49108. if (dir) byteOffset = 0
  49109. else return -1
  49110. }
  49111. // Normalize val
  49112. if (typeof val === 'string') {
  49113. val = Buffer.from(val, encoding)
  49114. }
  49115. // Finally, search either indexOf (if dir is true) or lastIndexOf
  49116. if (Buffer.isBuffer(val)) {
  49117. // Special case: looking for empty string/buffer always fails
  49118. if (val.length === 0) {
  49119. return -1
  49120. }
  49121. return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
  49122. } else if (typeof val === 'number') {
  49123. val = val & 0xFF // Search for a byte value [0-255]
  49124. if (Buffer.TYPED_ARRAY_SUPPORT &&
  49125. typeof Uint8Array.prototype.indexOf === 'function') {
  49126. if (dir) {
  49127. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
  49128. } else {
  49129. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
  49130. }
  49131. }
  49132. return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
  49133. }
  49134. throw new TypeError('val must be string, number or Buffer')
  49135. }
  49136. function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
  49137. var indexSize = 1
  49138. var arrLength = arr.length
  49139. var valLength = val.length
  49140. if (encoding !== undefined) {
  49141. encoding = String(encoding).toLowerCase()
  49142. if (encoding === 'ucs2' || encoding === 'ucs-2' ||
  49143. encoding === 'utf16le' || encoding === 'utf-16le') {
  49144. if (arr.length < 2 || val.length < 2) {
  49145. return -1
  49146. }
  49147. indexSize = 2
  49148. arrLength /= 2
  49149. valLength /= 2
  49150. byteOffset /= 2
  49151. }
  49152. }
  49153. function read (buf, i) {
  49154. if (indexSize === 1) {
  49155. return buf[i]
  49156. } else {
  49157. return buf.readUInt16BE(i * indexSize)
  49158. }
  49159. }
  49160. var i
  49161. if (dir) {
  49162. var foundIndex = -1
  49163. for (i = byteOffset; i < arrLength; i++) {
  49164. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  49165. if (foundIndex === -1) foundIndex = i
  49166. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
  49167. } else {
  49168. if (foundIndex !== -1) i -= i - foundIndex
  49169. foundIndex = -1
  49170. }
  49171. }
  49172. } else {
  49173. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
  49174. for (i = byteOffset; i >= 0; i--) {
  49175. var found = true
  49176. for (var j = 0; j < valLength; j++) {
  49177. if (read(arr, i + j) !== read(val, j)) {
  49178. found = false
  49179. break
  49180. }
  49181. }
  49182. if (found) return i
  49183. }
  49184. }
  49185. return -1
  49186. }
  49187. Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
  49188. return this.indexOf(val, byteOffset, encoding) !== -1
  49189. }
  49190. Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
  49191. return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
  49192. }
  49193. Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
  49194. return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
  49195. }
  49196. function hexWrite (buf, string, offset, length) {
  49197. offset = Number(offset) || 0
  49198. var remaining = buf.length - offset
  49199. if (!length) {
  49200. length = remaining
  49201. } else {
  49202. length = Number(length)
  49203. if (length > remaining) {
  49204. length = remaining
  49205. }
  49206. }
  49207. // must be an even number of digits
  49208. var strLen = string.length
  49209. if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
  49210. if (length > strLen / 2) {
  49211. length = strLen / 2
  49212. }
  49213. for (var i = 0; i < length; ++i) {
  49214. var parsed = parseInt(string.substr(i * 2, 2), 16)
  49215. if (isNaN(parsed)) return i
  49216. buf[offset + i] = parsed
  49217. }
  49218. return i
  49219. }
  49220. function utf8Write (buf, string, offset, length) {
  49221. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
  49222. }
  49223. function asciiWrite (buf, string, offset, length) {
  49224. return blitBuffer(asciiToBytes(string), buf, offset, length)
  49225. }
  49226. function latin1Write (buf, string, offset, length) {
  49227. return asciiWrite(buf, string, offset, length)
  49228. }
  49229. function base64Write (buf, string, offset, length) {
  49230. return blitBuffer(base64ToBytes(string), buf, offset, length)
  49231. }
  49232. function ucs2Write (buf, string, offset, length) {
  49233. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
  49234. }
  49235. Buffer.prototype.write = function write (string, offset, length, encoding) {
  49236. // Buffer#write(string)
  49237. if (offset === undefined) {
  49238. encoding = 'utf8'
  49239. length = this.length
  49240. offset = 0
  49241. // Buffer#write(string, encoding)
  49242. } else if (length === undefined && typeof offset === 'string') {
  49243. encoding = offset
  49244. length = this.length
  49245. offset = 0
  49246. // Buffer#write(string, offset[, length][, encoding])
  49247. } else if (isFinite(offset)) {
  49248. offset = offset | 0
  49249. if (isFinite(length)) {
  49250. length = length | 0
  49251. if (encoding === undefined) encoding = 'utf8'
  49252. } else {
  49253. encoding = length
  49254. length = undefined
  49255. }
  49256. // legacy write(string, encoding, offset, length) - remove in v0.13
  49257. } else {
  49258. throw new Error(
  49259. 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
  49260. )
  49261. }
  49262. var remaining = this.length - offset
  49263. if (length === undefined || length > remaining) length = remaining
  49264. if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
  49265. throw new RangeError('Attempt to write outside buffer bounds')
  49266. }
  49267. if (!encoding) encoding = 'utf8'
  49268. var loweredCase = false
  49269. for (;;) {
  49270. switch (encoding) {
  49271. case 'hex':
  49272. return hexWrite(this, string, offset, length)
  49273. case 'utf8':
  49274. case 'utf-8':
  49275. return utf8Write(this, string, offset, length)
  49276. case 'ascii':
  49277. return asciiWrite(this, string, offset, length)
  49278. case 'latin1':
  49279. case 'binary':
  49280. return latin1Write(this, string, offset, length)
  49281. case 'base64':
  49282. // Warning: maxLength not taken into account in base64Write
  49283. return base64Write(this, string, offset, length)
  49284. case 'ucs2':
  49285. case 'ucs-2':
  49286. case 'utf16le':
  49287. case 'utf-16le':
  49288. return ucs2Write(this, string, offset, length)
  49289. default:
  49290. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  49291. encoding = ('' + encoding).toLowerCase()
  49292. loweredCase = true
  49293. }
  49294. }
  49295. }
  49296. Buffer.prototype.toJSON = function toJSON () {
  49297. return {
  49298. type: 'Buffer',
  49299. data: Array.prototype.slice.call(this._arr || this, 0)
  49300. }
  49301. }
  49302. function base64Slice (buf, start, end) {
  49303. if (start === 0 && end === buf.length) {
  49304. return base64.fromByteArray(buf)
  49305. } else {
  49306. return base64.fromByteArray(buf.slice(start, end))
  49307. }
  49308. }
  49309. function utf8Slice (buf, start, end) {
  49310. end = Math.min(buf.length, end)
  49311. var res = []
  49312. var i = start
  49313. while (i < end) {
  49314. var firstByte = buf[i]
  49315. var codePoint = null
  49316. var bytesPerSequence = (firstByte > 0xEF) ? 4
  49317. : (firstByte > 0xDF) ? 3
  49318. : (firstByte > 0xBF) ? 2
  49319. : 1
  49320. if (i + bytesPerSequence <= end) {
  49321. var secondByte, thirdByte, fourthByte, tempCodePoint
  49322. switch (bytesPerSequence) {
  49323. case 1:
  49324. if (firstByte < 0x80) {
  49325. codePoint = firstByte
  49326. }
  49327. break
  49328. case 2:
  49329. secondByte = buf[i + 1]
  49330. if ((secondByte & 0xC0) === 0x80) {
  49331. tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
  49332. if (tempCodePoint > 0x7F) {
  49333. codePoint = tempCodePoint
  49334. }
  49335. }
  49336. break
  49337. case 3:
  49338. secondByte = buf[i + 1]
  49339. thirdByte = buf[i + 2]
  49340. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  49341. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
  49342. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  49343. codePoint = tempCodePoint
  49344. }
  49345. }
  49346. break
  49347. case 4:
  49348. secondByte = buf[i + 1]
  49349. thirdByte = buf[i + 2]
  49350. fourthByte = buf[i + 3]
  49351. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  49352. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
  49353. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  49354. codePoint = tempCodePoint
  49355. }
  49356. }
  49357. }
  49358. }
  49359. if (codePoint === null) {
  49360. // we did not generate a valid codePoint so insert a
  49361. // replacement char (U+FFFD) and advance only 1 byte
  49362. codePoint = 0xFFFD
  49363. bytesPerSequence = 1
  49364. } else if (codePoint > 0xFFFF) {
  49365. // encode to utf16 (surrogate pair dance)
  49366. codePoint -= 0x10000
  49367. res.push(codePoint >>> 10 & 0x3FF | 0xD800)
  49368. codePoint = 0xDC00 | codePoint & 0x3FF
  49369. }
  49370. res.push(codePoint)
  49371. i += bytesPerSequence
  49372. }
  49373. return decodeCodePointsArray(res)
  49374. }
  49375. // Based on http://stackoverflow.com/a/22747272/680742, the browser with
  49376. // the lowest limit is Chrome, with 0x10000 args.
  49377. // We go 1 magnitude less, for safety
  49378. var MAX_ARGUMENTS_LENGTH = 0x1000
  49379. function decodeCodePointsArray (codePoints) {
  49380. var len = codePoints.length
  49381. if (len <= MAX_ARGUMENTS_LENGTH) {
  49382. return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
  49383. }
  49384. // Decode in chunks to avoid "call stack size exceeded".
  49385. var res = ''
  49386. var i = 0
  49387. while (i < len) {
  49388. res += String.fromCharCode.apply(
  49389. String,
  49390. codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
  49391. )
  49392. }
  49393. return res
  49394. }
  49395. function asciiSlice (buf, start, end) {
  49396. var ret = ''
  49397. end = Math.min(buf.length, end)
  49398. for (var i = start; i < end; ++i) {
  49399. ret += String.fromCharCode(buf[i] & 0x7F)
  49400. }
  49401. return ret
  49402. }
  49403. function latin1Slice (buf, start, end) {
  49404. var ret = ''
  49405. end = Math.min(buf.length, end)
  49406. for (var i = start; i < end; ++i) {
  49407. ret += String.fromCharCode(buf[i])
  49408. }
  49409. return ret
  49410. }
  49411. function hexSlice (buf, start, end) {
  49412. var len = buf.length
  49413. if (!start || start < 0) start = 0
  49414. if (!end || end < 0 || end > len) end = len
  49415. var out = ''
  49416. for (var i = start; i < end; ++i) {
  49417. out += toHex(buf[i])
  49418. }
  49419. return out
  49420. }
  49421. function utf16leSlice (buf, start, end) {
  49422. var bytes = buf.slice(start, end)
  49423. var res = ''
  49424. for (var i = 0; i < bytes.length; i += 2) {
  49425. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
  49426. }
  49427. return res
  49428. }
  49429. Buffer.prototype.slice = function slice (start, end) {
  49430. var len = this.length
  49431. start = ~~start
  49432. end = end === undefined ? len : ~~end
  49433. if (start < 0) {
  49434. start += len
  49435. if (start < 0) start = 0
  49436. } else if (start > len) {
  49437. start = len
  49438. }
  49439. if (end < 0) {
  49440. end += len
  49441. if (end < 0) end = 0
  49442. } else if (end > len) {
  49443. end = len
  49444. }
  49445. if (end < start) end = start
  49446. var newBuf
  49447. if (Buffer.TYPED_ARRAY_SUPPORT) {
  49448. newBuf = this.subarray(start, end)
  49449. newBuf.__proto__ = Buffer.prototype
  49450. } else {
  49451. var sliceLen = end - start
  49452. newBuf = new Buffer(sliceLen, undefined)
  49453. for (var i = 0; i < sliceLen; ++i) {
  49454. newBuf[i] = this[i + start]
  49455. }
  49456. }
  49457. return newBuf
  49458. }
  49459. /*
  49460. * Need to make sure that buffer isn't trying to write out of bounds.
  49461. */
  49462. function checkOffset (offset, ext, length) {
  49463. if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
  49464. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
  49465. }
  49466. Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
  49467. offset = offset | 0
  49468. byteLength = byteLength | 0
  49469. if (!noAssert) checkOffset(offset, byteLength, this.length)
  49470. var val = this[offset]
  49471. var mul = 1
  49472. var i = 0
  49473. while (++i < byteLength && (mul *= 0x100)) {
  49474. val += this[offset + i] * mul
  49475. }
  49476. return val
  49477. }
  49478. Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
  49479. offset = offset | 0
  49480. byteLength = byteLength | 0
  49481. if (!noAssert) {
  49482. checkOffset(offset, byteLength, this.length)
  49483. }
  49484. var val = this[offset + --byteLength]
  49485. var mul = 1
  49486. while (byteLength > 0 && (mul *= 0x100)) {
  49487. val += this[offset + --byteLength] * mul
  49488. }
  49489. return val
  49490. }
  49491. Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
  49492. if (!noAssert) checkOffset(offset, 1, this.length)
  49493. return this[offset]
  49494. }
  49495. Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
  49496. if (!noAssert) checkOffset(offset, 2, this.length)
  49497. return this[offset] | (this[offset + 1] << 8)
  49498. }
  49499. Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
  49500. if (!noAssert) checkOffset(offset, 2, this.length)
  49501. return (this[offset] << 8) | this[offset + 1]
  49502. }
  49503. Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
  49504. if (!noAssert) checkOffset(offset, 4, this.length)
  49505. return ((this[offset]) |
  49506. (this[offset + 1] << 8) |
  49507. (this[offset + 2] << 16)) +
  49508. (this[offset + 3] * 0x1000000)
  49509. }
  49510. Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
  49511. if (!noAssert) checkOffset(offset, 4, this.length)
  49512. return (this[offset] * 0x1000000) +
  49513. ((this[offset + 1] << 16) |
  49514. (this[offset + 2] << 8) |
  49515. this[offset + 3])
  49516. }
  49517. Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
  49518. offset = offset | 0
  49519. byteLength = byteLength | 0
  49520. if (!noAssert) checkOffset(offset, byteLength, this.length)
  49521. var val = this[offset]
  49522. var mul = 1
  49523. var i = 0
  49524. while (++i < byteLength && (mul *= 0x100)) {
  49525. val += this[offset + i] * mul
  49526. }
  49527. mul *= 0x80
  49528. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  49529. return val
  49530. }
  49531. Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
  49532. offset = offset | 0
  49533. byteLength = byteLength | 0
  49534. if (!noAssert) checkOffset(offset, byteLength, this.length)
  49535. var i = byteLength
  49536. var mul = 1
  49537. var val = this[offset + --i]
  49538. while (i > 0 && (mul *= 0x100)) {
  49539. val += this[offset + --i] * mul
  49540. }
  49541. mul *= 0x80
  49542. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  49543. return val
  49544. }
  49545. Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
  49546. if (!noAssert) checkOffset(offset, 1, this.length)
  49547. if (!(this[offset] & 0x80)) return (this[offset])
  49548. return ((0xff - this[offset] + 1) * -1)
  49549. }
  49550. Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
  49551. if (!noAssert) checkOffset(offset, 2, this.length)
  49552. var val = this[offset] | (this[offset + 1] << 8)
  49553. return (val & 0x8000) ? val | 0xFFFF0000 : val
  49554. }
  49555. Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
  49556. if (!noAssert) checkOffset(offset, 2, this.length)
  49557. var val = this[offset + 1] | (this[offset] << 8)
  49558. return (val & 0x8000) ? val | 0xFFFF0000 : val
  49559. }
  49560. Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
  49561. if (!noAssert) checkOffset(offset, 4, this.length)
  49562. return (this[offset]) |
  49563. (this[offset + 1] << 8) |
  49564. (this[offset + 2] << 16) |
  49565. (this[offset + 3] << 24)
  49566. }
  49567. Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
  49568. if (!noAssert) checkOffset(offset, 4, this.length)
  49569. return (this[offset] << 24) |
  49570. (this[offset + 1] << 16) |
  49571. (this[offset + 2] << 8) |
  49572. (this[offset + 3])
  49573. }
  49574. Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
  49575. if (!noAssert) checkOffset(offset, 4, this.length)
  49576. return ieee754.read(this, offset, true, 23, 4)
  49577. }
  49578. Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
  49579. if (!noAssert) checkOffset(offset, 4, this.length)
  49580. return ieee754.read(this, offset, false, 23, 4)
  49581. }
  49582. Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
  49583. if (!noAssert) checkOffset(offset, 8, this.length)
  49584. return ieee754.read(this, offset, true, 52, 8)
  49585. }
  49586. Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
  49587. if (!noAssert) checkOffset(offset, 8, this.length)
  49588. return ieee754.read(this, offset, false, 52, 8)
  49589. }
  49590. function checkInt (buf, value, offset, ext, max, min) {
  49591. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
  49592. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
  49593. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  49594. }
  49595. Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
  49596. value = +value
  49597. offset = offset | 0
  49598. byteLength = byteLength | 0
  49599. if (!noAssert) {
  49600. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  49601. checkInt(this, value, offset, byteLength, maxBytes, 0)
  49602. }
  49603. var mul = 1
  49604. var i = 0
  49605. this[offset] = value & 0xFF
  49606. while (++i < byteLength && (mul *= 0x100)) {
  49607. this[offset + i] = (value / mul) & 0xFF
  49608. }
  49609. return offset + byteLength
  49610. }
  49611. Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
  49612. value = +value
  49613. offset = offset | 0
  49614. byteLength = byteLength | 0
  49615. if (!noAssert) {
  49616. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  49617. checkInt(this, value, offset, byteLength, maxBytes, 0)
  49618. }
  49619. var i = byteLength - 1
  49620. var mul = 1
  49621. this[offset + i] = value & 0xFF
  49622. while (--i >= 0 && (mul *= 0x100)) {
  49623. this[offset + i] = (value / mul) & 0xFF
  49624. }
  49625. return offset + byteLength
  49626. }
  49627. Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
  49628. value = +value
  49629. offset = offset | 0
  49630. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
  49631. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  49632. this[offset] = (value & 0xff)
  49633. return offset + 1
  49634. }
  49635. function objectWriteUInt16 (buf, value, offset, littleEndian) {
  49636. if (value < 0) value = 0xffff + value + 1
  49637. for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
  49638. buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
  49639. (littleEndian ? i : 1 - i) * 8
  49640. }
  49641. }
  49642. Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
  49643. value = +value
  49644. offset = offset | 0
  49645. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  49646. if (Buffer.TYPED_ARRAY_SUPPORT) {
  49647. this[offset] = (value & 0xff)
  49648. this[offset + 1] = (value >>> 8)
  49649. } else {
  49650. objectWriteUInt16(this, value, offset, true)
  49651. }
  49652. return offset + 2
  49653. }
  49654. Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
  49655. value = +value
  49656. offset = offset | 0
  49657. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  49658. if (Buffer.TYPED_ARRAY_SUPPORT) {
  49659. this[offset] = (value >>> 8)
  49660. this[offset + 1] = (value & 0xff)
  49661. } else {
  49662. objectWriteUInt16(this, value, offset, false)
  49663. }
  49664. return offset + 2
  49665. }
  49666. function objectWriteUInt32 (buf, value, offset, littleEndian) {
  49667. if (value < 0) value = 0xffffffff + value + 1
  49668. for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
  49669. buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
  49670. }
  49671. }
  49672. Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
  49673. value = +value
  49674. offset = offset | 0
  49675. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  49676. if (Buffer.TYPED_ARRAY_SUPPORT) {
  49677. this[offset + 3] = (value >>> 24)
  49678. this[offset + 2] = (value >>> 16)
  49679. this[offset + 1] = (value >>> 8)
  49680. this[offset] = (value & 0xff)
  49681. } else {
  49682. objectWriteUInt32(this, value, offset, true)
  49683. }
  49684. return offset + 4
  49685. }
  49686. Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
  49687. value = +value
  49688. offset = offset | 0
  49689. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  49690. if (Buffer.TYPED_ARRAY_SUPPORT) {
  49691. this[offset] = (value >>> 24)
  49692. this[offset + 1] = (value >>> 16)
  49693. this[offset + 2] = (value >>> 8)
  49694. this[offset + 3] = (value & 0xff)
  49695. } else {
  49696. objectWriteUInt32(this, value, offset, false)
  49697. }
  49698. return offset + 4
  49699. }
  49700. Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
  49701. value = +value
  49702. offset = offset | 0
  49703. if (!noAssert) {
  49704. var limit = Math.pow(2, 8 * byteLength - 1)
  49705. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  49706. }
  49707. var i = 0
  49708. var mul = 1
  49709. var sub = 0
  49710. this[offset] = value & 0xFF
  49711. while (++i < byteLength && (mul *= 0x100)) {
  49712. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  49713. sub = 1
  49714. }
  49715. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  49716. }
  49717. return offset + byteLength
  49718. }
  49719. Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
  49720. value = +value
  49721. offset = offset | 0
  49722. if (!noAssert) {
  49723. var limit = Math.pow(2, 8 * byteLength - 1)
  49724. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  49725. }
  49726. var i = byteLength - 1
  49727. var mul = 1
  49728. var sub = 0
  49729. this[offset + i] = value & 0xFF
  49730. while (--i >= 0 && (mul *= 0x100)) {
  49731. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  49732. sub = 1
  49733. }
  49734. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  49735. }
  49736. return offset + byteLength
  49737. }
  49738. Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
  49739. value = +value
  49740. offset = offset | 0
  49741. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
  49742. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  49743. if (value < 0) value = 0xff + value + 1
  49744. this[offset] = (value & 0xff)
  49745. return offset + 1
  49746. }
  49747. Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
  49748. value = +value
  49749. offset = offset | 0
  49750. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  49751. if (Buffer.TYPED_ARRAY_SUPPORT) {
  49752. this[offset] = (value & 0xff)
  49753. this[offset + 1] = (value >>> 8)
  49754. } else {
  49755. objectWriteUInt16(this, value, offset, true)
  49756. }
  49757. return offset + 2
  49758. }
  49759. Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
  49760. value = +value
  49761. offset = offset | 0
  49762. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  49763. if (Buffer.TYPED_ARRAY_SUPPORT) {
  49764. this[offset] = (value >>> 8)
  49765. this[offset + 1] = (value & 0xff)
  49766. } else {
  49767. objectWriteUInt16(this, value, offset, false)
  49768. }
  49769. return offset + 2
  49770. }
  49771. Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
  49772. value = +value
  49773. offset = offset | 0
  49774. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  49775. if (Buffer.TYPED_ARRAY_SUPPORT) {
  49776. this[offset] = (value & 0xff)
  49777. this[offset + 1] = (value >>> 8)
  49778. this[offset + 2] = (value >>> 16)
  49779. this[offset + 3] = (value >>> 24)
  49780. } else {
  49781. objectWriteUInt32(this, value, offset, true)
  49782. }
  49783. return offset + 4
  49784. }
  49785. Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
  49786. value = +value
  49787. offset = offset | 0
  49788. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  49789. if (value < 0) value = 0xffffffff + value + 1
  49790. if (Buffer.TYPED_ARRAY_SUPPORT) {
  49791. this[offset] = (value >>> 24)
  49792. this[offset + 1] = (value >>> 16)
  49793. this[offset + 2] = (value >>> 8)
  49794. this[offset + 3] = (value & 0xff)
  49795. } else {
  49796. objectWriteUInt32(this, value, offset, false)
  49797. }
  49798. return offset + 4
  49799. }
  49800. function checkIEEE754 (buf, value, offset, ext, max, min) {
  49801. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  49802. if (offset < 0) throw new RangeError('Index out of range')
  49803. }
  49804. function writeFloat (buf, value, offset, littleEndian, noAssert) {
  49805. if (!noAssert) {
  49806. checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
  49807. }
  49808. ieee754.write(buf, value, offset, littleEndian, 23, 4)
  49809. return offset + 4
  49810. }
  49811. Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
  49812. return writeFloat(this, value, offset, true, noAssert)
  49813. }
  49814. Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
  49815. return writeFloat(this, value, offset, false, noAssert)
  49816. }
  49817. function writeDouble (buf, value, offset, littleEndian, noAssert) {
  49818. if (!noAssert) {
  49819. checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
  49820. }
  49821. ieee754.write(buf, value, offset, littleEndian, 52, 8)
  49822. return offset + 8
  49823. }
  49824. Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
  49825. return writeDouble(this, value, offset, true, noAssert)
  49826. }
  49827. Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
  49828. return writeDouble(this, value, offset, false, noAssert)
  49829. }
  49830. // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  49831. Buffer.prototype.copy = function copy (target, targetStart, start, end) {
  49832. if (!start) start = 0
  49833. if (!end && end !== 0) end = this.length
  49834. if (targetStart >= target.length) targetStart = target.length
  49835. if (!targetStart) targetStart = 0
  49836. if (end > 0 && end < start) end = start
  49837. // Copy 0 bytes; we're done
  49838. if (end === start) return 0
  49839. if (target.length === 0 || this.length === 0) return 0
  49840. // Fatal error conditions
  49841. if (targetStart < 0) {
  49842. throw new RangeError('targetStart out of bounds')
  49843. }
  49844. if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
  49845. if (end < 0) throw new RangeError('sourceEnd out of bounds')
  49846. // Are we oob?
  49847. if (end > this.length) end = this.length
  49848. if (target.length - targetStart < end - start) {
  49849. end = target.length - targetStart + start
  49850. }
  49851. var len = end - start
  49852. var i
  49853. if (this === target && start < targetStart && targetStart < end) {
  49854. // descending copy from end
  49855. for (i = len - 1; i >= 0; --i) {
  49856. target[i + targetStart] = this[i + start]
  49857. }
  49858. } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
  49859. // ascending copy from start
  49860. for (i = 0; i < len; ++i) {
  49861. target[i + targetStart] = this[i + start]
  49862. }
  49863. } else {
  49864. Uint8Array.prototype.set.call(
  49865. target,
  49866. this.subarray(start, start + len),
  49867. targetStart
  49868. )
  49869. }
  49870. return len
  49871. }
  49872. // Usage:
  49873. // buffer.fill(number[, offset[, end]])
  49874. // buffer.fill(buffer[, offset[, end]])
  49875. // buffer.fill(string[, offset[, end]][, encoding])
  49876. Buffer.prototype.fill = function fill (val, start, end, encoding) {
  49877. // Handle string cases:
  49878. if (typeof val === 'string') {
  49879. if (typeof start === 'string') {
  49880. encoding = start
  49881. start = 0
  49882. end = this.length
  49883. } else if (typeof end === 'string') {
  49884. encoding = end
  49885. end = this.length
  49886. }
  49887. if (val.length === 1) {
  49888. var code = val.charCodeAt(0)
  49889. if (code < 256) {
  49890. val = code
  49891. }
  49892. }
  49893. if (encoding !== undefined && typeof encoding !== 'string') {
  49894. throw new TypeError('encoding must be a string')
  49895. }
  49896. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  49897. throw new TypeError('Unknown encoding: ' + encoding)
  49898. }
  49899. } else if (typeof val === 'number') {
  49900. val = val & 255
  49901. }
  49902. // Invalid ranges are not set to a default, so can range check early.
  49903. if (start < 0 || this.length < start || this.length < end) {
  49904. throw new RangeError('Out of range index')
  49905. }
  49906. if (end <= start) {
  49907. return this
  49908. }
  49909. start = start >>> 0
  49910. end = end === undefined ? this.length : end >>> 0
  49911. if (!val) val = 0
  49912. var i
  49913. if (typeof val === 'number') {
  49914. for (i = start; i < end; ++i) {
  49915. this[i] = val
  49916. }
  49917. } else {
  49918. var bytes = Buffer.isBuffer(val)
  49919. ? val
  49920. : utf8ToBytes(new Buffer(val, encoding).toString())
  49921. var len = bytes.length
  49922. for (i = 0; i < end - start; ++i) {
  49923. this[i + start] = bytes[i % len]
  49924. }
  49925. }
  49926. return this
  49927. }
  49928. // HELPER FUNCTIONS
  49929. // ================
  49930. var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
  49931. function base64clean (str) {
  49932. // Node strips out invalid characters like \n and \t from the string, base64-js does not
  49933. str = stringtrim(str).replace(INVALID_BASE64_RE, '')
  49934. // Node converts strings with length < 2 to ''
  49935. if (str.length < 2) return ''
  49936. // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  49937. while (str.length % 4 !== 0) {
  49938. str = str + '='
  49939. }
  49940. return str
  49941. }
  49942. function stringtrim (str) {
  49943. if (str.trim) return str.trim()
  49944. return str.replace(/^\s+|\s+$/g, '')
  49945. }
  49946. function toHex (n) {
  49947. if (n < 16) return '0' + n.toString(16)
  49948. return n.toString(16)
  49949. }
  49950. function utf8ToBytes (string, units) {
  49951. units = units || Infinity
  49952. var codePoint
  49953. var length = string.length
  49954. var leadSurrogate = null
  49955. var bytes = []
  49956. for (var i = 0; i < length; ++i) {
  49957. codePoint = string.charCodeAt(i)
  49958. // is surrogate component
  49959. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  49960. // last char was a lead
  49961. if (!leadSurrogate) {
  49962. // no lead yet
  49963. if (codePoint > 0xDBFF) {
  49964. // unexpected trail
  49965. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  49966. continue
  49967. } else if (i + 1 === length) {
  49968. // unpaired lead
  49969. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  49970. continue
  49971. }
  49972. // valid lead
  49973. leadSurrogate = codePoint
  49974. continue
  49975. }
  49976. // 2 leads in a row
  49977. if (codePoint < 0xDC00) {
  49978. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  49979. leadSurrogate = codePoint
  49980. continue
  49981. }
  49982. // valid surrogate pair
  49983. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
  49984. } else if (leadSurrogate) {
  49985. // valid bmp char, but last char was a lead
  49986. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  49987. }
  49988. leadSurrogate = null
  49989. // encode utf8
  49990. if (codePoint < 0x80) {
  49991. if ((units -= 1) < 0) break
  49992. bytes.push(codePoint)
  49993. } else if (codePoint < 0x800) {
  49994. if ((units -= 2) < 0) break
  49995. bytes.push(
  49996. codePoint >> 0x6 | 0xC0,
  49997. codePoint & 0x3F | 0x80
  49998. )
  49999. } else if (codePoint < 0x10000) {
  50000. if ((units -= 3) < 0) break
  50001. bytes.push(
  50002. codePoint >> 0xC | 0xE0,
  50003. codePoint >> 0x6 & 0x3F | 0x80,
  50004. codePoint & 0x3F | 0x80
  50005. )
  50006. } else if (codePoint < 0x110000) {
  50007. if ((units -= 4) < 0) break
  50008. bytes.push(
  50009. codePoint >> 0x12 | 0xF0,
  50010. codePoint >> 0xC & 0x3F | 0x80,
  50011. codePoint >> 0x6 & 0x3F | 0x80,
  50012. codePoint & 0x3F | 0x80
  50013. )
  50014. } else {
  50015. throw new Error('Invalid code point')
  50016. }
  50017. }
  50018. return bytes
  50019. }
  50020. function asciiToBytes (str) {
  50021. var byteArray = []
  50022. for (var i = 0; i < str.length; ++i) {
  50023. // Node's code seems to be doing this and not & 0x7F..
  50024. byteArray.push(str.charCodeAt(i) & 0xFF)
  50025. }
  50026. return byteArray
  50027. }
  50028. function utf16leToBytes (str, units) {
  50029. var c, hi, lo
  50030. var byteArray = []
  50031. for (var i = 0; i < str.length; ++i) {
  50032. if ((units -= 2) < 0) break
  50033. c = str.charCodeAt(i)
  50034. hi = c >> 8
  50035. lo = c % 256
  50036. byteArray.push(lo)
  50037. byteArray.push(hi)
  50038. }
  50039. return byteArray
  50040. }
  50041. function base64ToBytes (str) {
  50042. return base64.toByteArray(base64clean(str))
  50043. }
  50044. function blitBuffer (src, dst, offset, length) {
  50045. for (var i = 0; i < length; ++i) {
  50046. if ((i + offset >= dst.length) || (i >= src.length)) break
  50047. dst[i + offset] = src[i]
  50048. }
  50049. return i
  50050. }
  50051. function isnan (val) {
  50052. return val !== val // eslint-disable-line no-self-compare
  50053. }
  50054. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 3)))
  50055. /***/ }),
  50056. /***/ 82:
  50057. /*!*****************************************!*\
  50058. !*** ./node_modules/base64-js/index.js ***!
  50059. \*****************************************/
  50060. /*! no static exports found */
  50061. /***/ (function(module, exports, __webpack_require__) {
  50062. "use strict";
  50063. exports.byteLength = byteLength
  50064. exports.toByteArray = toByteArray
  50065. exports.fromByteArray = fromByteArray
  50066. var lookup = []
  50067. var revLookup = []
  50068. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
  50069. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  50070. for (var i = 0, len = code.length; i < len; ++i) {
  50071. lookup[i] = code[i]
  50072. revLookup[code.charCodeAt(i)] = i
  50073. }
  50074. // Support decoding URL-safe base64 strings, as Node.js does.
  50075. // See: https://en.wikipedia.org/wiki/Base64#URL_applications
  50076. revLookup['-'.charCodeAt(0)] = 62
  50077. revLookup['_'.charCodeAt(0)] = 63
  50078. function getLens (b64) {
  50079. var len = b64.length
  50080. if (len % 4 > 0) {
  50081. throw new Error('Invalid string. Length must be a multiple of 4')
  50082. }
  50083. // Trim off extra bytes after placeholder bytes are found
  50084. // See: https://github.com/beatgammit/base64-js/issues/42
  50085. var validLen = b64.indexOf('=')
  50086. if (validLen === -1) validLen = len
  50087. var placeHoldersLen = validLen === len
  50088. ? 0
  50089. : 4 - (validLen % 4)
  50090. return [validLen, placeHoldersLen]
  50091. }
  50092. // base64 is 4/3 + up to two characters of the original data
  50093. function byteLength (b64) {
  50094. var lens = getLens(b64)
  50095. var validLen = lens[0]
  50096. var placeHoldersLen = lens[1]
  50097. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  50098. }
  50099. function _byteLength (b64, validLen, placeHoldersLen) {
  50100. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  50101. }
  50102. function toByteArray (b64) {
  50103. var tmp
  50104. var lens = getLens(b64)
  50105. var validLen = lens[0]
  50106. var placeHoldersLen = lens[1]
  50107. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
  50108. var curByte = 0
  50109. // if there are placeholders, only get up to the last complete 4 chars
  50110. var len = placeHoldersLen > 0
  50111. ? validLen - 4
  50112. : validLen
  50113. var i
  50114. for (i = 0; i < len; i += 4) {
  50115. tmp =
  50116. (revLookup[b64.charCodeAt(i)] << 18) |
  50117. (revLookup[b64.charCodeAt(i + 1)] << 12) |
  50118. (revLookup[b64.charCodeAt(i + 2)] << 6) |
  50119. revLookup[b64.charCodeAt(i + 3)]
  50120. arr[curByte++] = (tmp >> 16) & 0xFF
  50121. arr[curByte++] = (tmp >> 8) & 0xFF
  50122. arr[curByte++] = tmp & 0xFF
  50123. }
  50124. if (placeHoldersLen === 2) {
  50125. tmp =
  50126. (revLookup[b64.charCodeAt(i)] << 2) |
  50127. (revLookup[b64.charCodeAt(i + 1)] >> 4)
  50128. arr[curByte++] = tmp & 0xFF
  50129. }
  50130. if (placeHoldersLen === 1) {
  50131. tmp =
  50132. (revLookup[b64.charCodeAt(i)] << 10) |
  50133. (revLookup[b64.charCodeAt(i + 1)] << 4) |
  50134. (revLookup[b64.charCodeAt(i + 2)] >> 2)
  50135. arr[curByte++] = (tmp >> 8) & 0xFF
  50136. arr[curByte++] = tmp & 0xFF
  50137. }
  50138. return arr
  50139. }
  50140. function tripletToBase64 (num) {
  50141. return lookup[num >> 18 & 0x3F] +
  50142. lookup[num >> 12 & 0x3F] +
  50143. lookup[num >> 6 & 0x3F] +
  50144. lookup[num & 0x3F]
  50145. }
  50146. function encodeChunk (uint8, start, end) {
  50147. var tmp
  50148. var output = []
  50149. for (var i = start; i < end; i += 3) {
  50150. tmp =
  50151. ((uint8[i] << 16) & 0xFF0000) +
  50152. ((uint8[i + 1] << 8) & 0xFF00) +
  50153. (uint8[i + 2] & 0xFF)
  50154. output.push(tripletToBase64(tmp))
  50155. }
  50156. return output.join('')
  50157. }
  50158. function fromByteArray (uint8) {
  50159. var tmp
  50160. var len = uint8.length
  50161. var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
  50162. var parts = []
  50163. var maxChunkLength = 16383 // must be multiple of 3
  50164. // go through the array every three bytes, we'll deal with trailing stuff later
  50165. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  50166. parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
  50167. }
  50168. // pad the end with zeros, but make sure to not forget the extra bytes
  50169. if (extraBytes === 1) {
  50170. tmp = uint8[len - 1]
  50171. parts.push(
  50172. lookup[tmp >> 2] +
  50173. lookup[(tmp << 4) & 0x3F] +
  50174. '=='
  50175. )
  50176. } else if (extraBytes === 2) {
  50177. tmp = (uint8[len - 2] << 8) + uint8[len - 1]
  50178. parts.push(
  50179. lookup[tmp >> 10] +
  50180. lookup[(tmp >> 4) & 0x3F] +
  50181. lookup[(tmp << 2) & 0x3F] +
  50182. '='
  50183. )
  50184. }
  50185. return parts.join('')
  50186. }
  50187. /***/ }),
  50188. /***/ 83:
  50189. /*!***************************************!*\
  50190. !*** ./node_modules/ieee754/index.js ***!
  50191. \***************************************/
  50192. /*! no static exports found */
  50193. /***/ (function(module, exports) {
  50194. /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
  50195. exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  50196. var e, m
  50197. var eLen = (nBytes * 8) - mLen - 1
  50198. var eMax = (1 << eLen) - 1
  50199. var eBias = eMax >> 1
  50200. var nBits = -7
  50201. var i = isLE ? (nBytes - 1) : 0
  50202. var d = isLE ? -1 : 1
  50203. var s = buffer[offset + i]
  50204. i += d
  50205. e = s & ((1 << (-nBits)) - 1)
  50206. s >>= (-nBits)
  50207. nBits += eLen
  50208. for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  50209. m = e & ((1 << (-nBits)) - 1)
  50210. e >>= (-nBits)
  50211. nBits += mLen
  50212. for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  50213. if (e === 0) {
  50214. e = 1 - eBias
  50215. } else if (e === eMax) {
  50216. return m ? NaN : ((s ? -1 : 1) * Infinity)
  50217. } else {
  50218. m = m + Math.pow(2, mLen)
  50219. e = e - eBias
  50220. }
  50221. return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
  50222. }
  50223. exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  50224. var e, m, c
  50225. var eLen = (nBytes * 8) - mLen - 1
  50226. var eMax = (1 << eLen) - 1
  50227. var eBias = eMax >> 1
  50228. var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
  50229. var i = isLE ? 0 : (nBytes - 1)
  50230. var d = isLE ? 1 : -1
  50231. var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
  50232. value = Math.abs(value)
  50233. if (isNaN(value) || value === Infinity) {
  50234. m = isNaN(value) ? 1 : 0
  50235. e = eMax
  50236. } else {
  50237. e = Math.floor(Math.log(value) / Math.LN2)
  50238. if (value * (c = Math.pow(2, -e)) < 1) {
  50239. e--
  50240. c *= 2
  50241. }
  50242. if (e + eBias >= 1) {
  50243. value += rt / c
  50244. } else {
  50245. value += rt * Math.pow(2, 1 - eBias)
  50246. }
  50247. if (value * c >= 2) {
  50248. e++
  50249. c /= 2
  50250. }
  50251. if (e + eBias >= eMax) {
  50252. m = 0
  50253. e = eMax
  50254. } else if (e + eBias >= 1) {
  50255. m = ((value * c) - 1) * Math.pow(2, mLen)
  50256. e = e + eBias
  50257. } else {
  50258. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
  50259. e = 0
  50260. }
  50261. }
  50262. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  50263. e = (e << mLen) | m
  50264. eLen += mLen
  50265. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  50266. buffer[offset + i - d] |= s * 128
  50267. }
  50268. /***/ }),
  50269. /***/ 84:
  50270. /*!***************************************!*\
  50271. !*** ./node_modules/isarray/index.js ***!
  50272. \***************************************/
  50273. /*! no static exports found */
  50274. /***/ (function(module, exports) {
  50275. var toString = {}.toString;
  50276. module.exports = Array.isArray || function (arr) {
  50277. return toString.call(arr) == '[object Array]';
  50278. };
  50279. /***/ }),
  50280. /***/ 85:
  50281. /*!*********************************************!*\
  50282. !*** ./node_modules/create-hash/browser.js ***!
  50283. \*********************************************/
  50284. /*! no static exports found */
  50285. /***/ (function(module, exports, __webpack_require__) {
  50286. "use strict";
  50287. var inherits = __webpack_require__(/*! inherits */ 86)
  50288. var MD5 = __webpack_require__(/*! md5.js */ 87)
  50289. var RIPEMD160 = __webpack_require__(/*! ripemd160 */ 105)
  50290. var sha = __webpack_require__(/*! sha.js */ 106)
  50291. var Base = __webpack_require__(/*! cipher-base */ 114)
  50292. function Hash (hash) {
  50293. Base.call(this, 'digest')
  50294. this._hash = hash
  50295. }
  50296. inherits(Hash, Base)
  50297. Hash.prototype._update = function (data) {
  50298. this._hash.update(data)
  50299. }
  50300. Hash.prototype._final = function () {
  50301. return this._hash.digest()
  50302. }
  50303. module.exports = function createHash (alg) {
  50304. alg = alg.toLowerCase()
  50305. if (alg === 'md5') return new MD5()
  50306. if (alg === 'rmd160' || alg === 'ripemd160') return new RIPEMD160()
  50307. return new Hash(sha(alg))
  50308. }
  50309. /***/ }),
  50310. /***/ 86:
  50311. /*!***************************************************!*\
  50312. !*** ./node_modules/inherits/inherits_browser.js ***!
  50313. \***************************************************/
  50314. /*! no static exports found */
  50315. /***/ (function(module, exports) {
  50316. if (typeof Object.create === 'function') {
  50317. // implementation from standard node.js 'util' module
  50318. module.exports = function inherits(ctor, superCtor) {
  50319. if (superCtor) {
  50320. ctor.super_ = superCtor
  50321. ctor.prototype = Object.create(superCtor.prototype, {
  50322. constructor: {
  50323. value: ctor,
  50324. enumerable: false,
  50325. writable: true,
  50326. configurable: true
  50327. }
  50328. })
  50329. }
  50330. };
  50331. } else {
  50332. // old school shim for old browsers
  50333. module.exports = function inherits(ctor, superCtor) {
  50334. if (superCtor) {
  50335. ctor.super_ = superCtor
  50336. var TempCtor = function () {}
  50337. TempCtor.prototype = superCtor.prototype
  50338. ctor.prototype = new TempCtor()
  50339. ctor.prototype.constructor = ctor
  50340. }
  50341. }
  50342. }
  50343. /***/ }),
  50344. /***/ 87:
  50345. /*!**************************************!*\
  50346. !*** ./node_modules/md5.js/index.js ***!
  50347. \**************************************/
  50348. /*! no static exports found */
  50349. /***/ (function(module, exports, __webpack_require__) {
  50350. "use strict";
  50351. var inherits = __webpack_require__(/*! inherits */ 86)
  50352. var HashBase = __webpack_require__(/*! hash-base */ 88)
  50353. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  50354. var ARRAY16 = new Array(16)
  50355. function MD5 () {
  50356. HashBase.call(this, 64)
  50357. // state
  50358. this._a = 0x67452301
  50359. this._b = 0xefcdab89
  50360. this._c = 0x98badcfe
  50361. this._d = 0x10325476
  50362. }
  50363. inherits(MD5, HashBase)
  50364. MD5.prototype._update = function () {
  50365. var M = ARRAY16
  50366. for (var i = 0; i < 16; ++i) M[i] = this._block.readInt32LE(i * 4)
  50367. var a = this._a
  50368. var b = this._b
  50369. var c = this._c
  50370. var d = this._d
  50371. a = fnF(a, b, c, d, M[0], 0xd76aa478, 7)
  50372. d = fnF(d, a, b, c, M[1], 0xe8c7b756, 12)
  50373. c = fnF(c, d, a, b, M[2], 0x242070db, 17)
  50374. b = fnF(b, c, d, a, M[3], 0xc1bdceee, 22)
  50375. a = fnF(a, b, c, d, M[4], 0xf57c0faf, 7)
  50376. d = fnF(d, a, b, c, M[5], 0x4787c62a, 12)
  50377. c = fnF(c, d, a, b, M[6], 0xa8304613, 17)
  50378. b = fnF(b, c, d, a, M[7], 0xfd469501, 22)
  50379. a = fnF(a, b, c, d, M[8], 0x698098d8, 7)
  50380. d = fnF(d, a, b, c, M[9], 0x8b44f7af, 12)
  50381. c = fnF(c, d, a, b, M[10], 0xffff5bb1, 17)
  50382. b = fnF(b, c, d, a, M[11], 0x895cd7be, 22)
  50383. a = fnF(a, b, c, d, M[12], 0x6b901122, 7)
  50384. d = fnF(d, a, b, c, M[13], 0xfd987193, 12)
  50385. c = fnF(c, d, a, b, M[14], 0xa679438e, 17)
  50386. b = fnF(b, c, d, a, M[15], 0x49b40821, 22)
  50387. a = fnG(a, b, c, d, M[1], 0xf61e2562, 5)
  50388. d = fnG(d, a, b, c, M[6], 0xc040b340, 9)
  50389. c = fnG(c, d, a, b, M[11], 0x265e5a51, 14)
  50390. b = fnG(b, c, d, a, M[0], 0xe9b6c7aa, 20)
  50391. a = fnG(a, b, c, d, M[5], 0xd62f105d, 5)
  50392. d = fnG(d, a, b, c, M[10], 0x02441453, 9)
  50393. c = fnG(c, d, a, b, M[15], 0xd8a1e681, 14)
  50394. b = fnG(b, c, d, a, M[4], 0xe7d3fbc8, 20)
  50395. a = fnG(a, b, c, d, M[9], 0x21e1cde6, 5)
  50396. d = fnG(d, a, b, c, M[14], 0xc33707d6, 9)
  50397. c = fnG(c, d, a, b, M[3], 0xf4d50d87, 14)
  50398. b = fnG(b, c, d, a, M[8], 0x455a14ed, 20)
  50399. a = fnG(a, b, c, d, M[13], 0xa9e3e905, 5)
  50400. d = fnG(d, a, b, c, M[2], 0xfcefa3f8, 9)
  50401. c = fnG(c, d, a, b, M[7], 0x676f02d9, 14)
  50402. b = fnG(b, c, d, a, M[12], 0x8d2a4c8a, 20)
  50403. a = fnH(a, b, c, d, M[5], 0xfffa3942, 4)
  50404. d = fnH(d, a, b, c, M[8], 0x8771f681, 11)
  50405. c = fnH(c, d, a, b, M[11], 0x6d9d6122, 16)
  50406. b = fnH(b, c, d, a, M[14], 0xfde5380c, 23)
  50407. a = fnH(a, b, c, d, M[1], 0xa4beea44, 4)
  50408. d = fnH(d, a, b, c, M[4], 0x4bdecfa9, 11)
  50409. c = fnH(c, d, a, b, M[7], 0xf6bb4b60, 16)
  50410. b = fnH(b, c, d, a, M[10], 0xbebfbc70, 23)
  50411. a = fnH(a, b, c, d, M[13], 0x289b7ec6, 4)
  50412. d = fnH(d, a, b, c, M[0], 0xeaa127fa, 11)
  50413. c = fnH(c, d, a, b, M[3], 0xd4ef3085, 16)
  50414. b = fnH(b, c, d, a, M[6], 0x04881d05, 23)
  50415. a = fnH(a, b, c, d, M[9], 0xd9d4d039, 4)
  50416. d = fnH(d, a, b, c, M[12], 0xe6db99e5, 11)
  50417. c = fnH(c, d, a, b, M[15], 0x1fa27cf8, 16)
  50418. b = fnH(b, c, d, a, M[2], 0xc4ac5665, 23)
  50419. a = fnI(a, b, c, d, M[0], 0xf4292244, 6)
  50420. d = fnI(d, a, b, c, M[7], 0x432aff97, 10)
  50421. c = fnI(c, d, a, b, M[14], 0xab9423a7, 15)
  50422. b = fnI(b, c, d, a, M[5], 0xfc93a039, 21)
  50423. a = fnI(a, b, c, d, M[12], 0x655b59c3, 6)
  50424. d = fnI(d, a, b, c, M[3], 0x8f0ccc92, 10)
  50425. c = fnI(c, d, a, b, M[10], 0xffeff47d, 15)
  50426. b = fnI(b, c, d, a, M[1], 0x85845dd1, 21)
  50427. a = fnI(a, b, c, d, M[8], 0x6fa87e4f, 6)
  50428. d = fnI(d, a, b, c, M[15], 0xfe2ce6e0, 10)
  50429. c = fnI(c, d, a, b, M[6], 0xa3014314, 15)
  50430. b = fnI(b, c, d, a, M[13], 0x4e0811a1, 21)
  50431. a = fnI(a, b, c, d, M[4], 0xf7537e82, 6)
  50432. d = fnI(d, a, b, c, M[11], 0xbd3af235, 10)
  50433. c = fnI(c, d, a, b, M[2], 0x2ad7d2bb, 15)
  50434. b = fnI(b, c, d, a, M[9], 0xeb86d391, 21)
  50435. this._a = (this._a + a) | 0
  50436. this._b = (this._b + b) | 0
  50437. this._c = (this._c + c) | 0
  50438. this._d = (this._d + d) | 0
  50439. }
  50440. MD5.prototype._digest = function () {
  50441. // create padding and handle blocks
  50442. this._block[this._blockOffset++] = 0x80
  50443. if (this._blockOffset > 56) {
  50444. this._block.fill(0, this._blockOffset, 64)
  50445. this._update()
  50446. this._blockOffset = 0
  50447. }
  50448. this._block.fill(0, this._blockOffset, 56)
  50449. this._block.writeUInt32LE(this._length[0], 56)
  50450. this._block.writeUInt32LE(this._length[1], 60)
  50451. this._update()
  50452. // produce result
  50453. var buffer = Buffer.allocUnsafe(16)
  50454. buffer.writeInt32LE(this._a, 0)
  50455. buffer.writeInt32LE(this._b, 4)
  50456. buffer.writeInt32LE(this._c, 8)
  50457. buffer.writeInt32LE(this._d, 12)
  50458. return buffer
  50459. }
  50460. function rotl (x, n) {
  50461. return (x << n) | (x >>> (32 - n))
  50462. }
  50463. function fnF (a, b, c, d, m, k, s) {
  50464. return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + b) | 0
  50465. }
  50466. function fnG (a, b, c, d, m, k, s) {
  50467. return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + b) | 0
  50468. }
  50469. function fnH (a, b, c, d, m, k, s) {
  50470. return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + b) | 0
  50471. }
  50472. function fnI (a, b, c, d, m, k, s) {
  50473. return (rotl((a + ((c ^ (b | (~d)))) + m + k) | 0, s) + b) | 0
  50474. }
  50475. module.exports = MD5
  50476. /***/ }),
  50477. /***/ 88:
  50478. /*!*****************************************!*\
  50479. !*** ./node_modules/hash-base/index.js ***!
  50480. \*****************************************/
  50481. /*! no static exports found */
  50482. /***/ (function(module, exports, __webpack_require__) {
  50483. "use strict";
  50484. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer
  50485. var Transform = __webpack_require__(/*! readable-stream */ 89).Transform
  50486. var inherits = __webpack_require__(/*! inherits */ 86)
  50487. function throwIfNotStringOrBuffer (val, prefix) {
  50488. if (!Buffer.isBuffer(val) && typeof val !== 'string') {
  50489. throw new TypeError(prefix + ' must be a string or a buffer')
  50490. }
  50491. }
  50492. function HashBase (blockSize) {
  50493. Transform.call(this)
  50494. this._block = Buffer.allocUnsafe(blockSize)
  50495. this._blockSize = blockSize
  50496. this._blockOffset = 0
  50497. this._length = [0, 0, 0, 0]
  50498. this._finalized = false
  50499. }
  50500. inherits(HashBase, Transform)
  50501. HashBase.prototype._transform = function (chunk, encoding, callback) {
  50502. var error = null
  50503. try {
  50504. this.update(chunk, encoding)
  50505. } catch (err) {
  50506. error = err
  50507. }
  50508. callback(error)
  50509. }
  50510. HashBase.prototype._flush = function (callback) {
  50511. var error = null
  50512. try {
  50513. this.push(this.digest())
  50514. } catch (err) {
  50515. error = err
  50516. }
  50517. callback(error)
  50518. }
  50519. HashBase.prototype.update = function (data, encoding) {
  50520. throwIfNotStringOrBuffer(data, 'Data')
  50521. if (this._finalized) throw new Error('Digest already called')
  50522. if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)
  50523. // consume data
  50524. var block = this._block
  50525. var offset = 0
  50526. while (this._blockOffset + data.length - offset >= this._blockSize) {
  50527. for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]
  50528. this._update()
  50529. this._blockOffset = 0
  50530. }
  50531. while (offset < data.length) block[this._blockOffset++] = data[offset++]
  50532. // update length
  50533. for (var j = 0, carry = data.length * 8; carry > 0; ++j) {
  50534. this._length[j] += carry
  50535. carry = (this._length[j] / 0x0100000000) | 0
  50536. if (carry > 0) this._length[j] -= 0x0100000000 * carry
  50537. }
  50538. return this
  50539. }
  50540. HashBase.prototype._update = function () {
  50541. throw new Error('_update is not implemented')
  50542. }
  50543. HashBase.prototype.digest = function (encoding) {
  50544. if (this._finalized) throw new Error('Digest already called')
  50545. this._finalized = true
  50546. var digest = this._digest()
  50547. if (encoding !== undefined) digest = digest.toString(encoding)
  50548. // reset state
  50549. this._block.fill(0)
  50550. this._blockOffset = 0
  50551. for (var i = 0; i < 4; ++i) this._length[i] = 0
  50552. return digest
  50553. }
  50554. HashBase.prototype._digest = function () {
  50555. throw new Error('_digest is not implemented')
  50556. }
  50557. module.exports = HashBase
  50558. /***/ }),
  50559. /***/ 89:
  50560. /*!**********************************************************!*\
  50561. !*** ./node_modules/readable-stream/readable-browser.js ***!
  50562. \**********************************************************/
  50563. /*! no static exports found */
  50564. /***/ (function(module, exports, __webpack_require__) {
  50565. exports = module.exports = __webpack_require__(/*! ./lib/_stream_readable.js */ 90);
  50566. exports.Stream = exports;
  50567. exports.Readable = exports;
  50568. exports.Writable = __webpack_require__(/*! ./lib/_stream_writable.js */ 100);
  50569. exports.Duplex = __webpack_require__(/*! ./lib/_stream_duplex.js */ 99);
  50570. exports.Transform = __webpack_require__(/*! ./lib/_stream_transform.js */ 103);
  50571. exports.PassThrough = __webpack_require__(/*! ./lib/_stream_passthrough.js */ 104);
  50572. /***/ }),
  50573. /***/ 9:
  50574. /*!*****************************************************************!*\
  50575. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  50576. \*****************************************************************/
  50577. /*! no static exports found */
  50578. /***/ (function(module, exports) {
  50579. function _arrayLikeToArray(arr, len) {
  50580. if (len == null || len > arr.length) len = arr.length;
  50581. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  50582. arr2[i] = arr[i];
  50583. }
  50584. return arr2;
  50585. }
  50586. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  50587. /***/ }),
  50588. /***/ 90:
  50589. /*!**************************************************************!*\
  50590. !*** ./node_modules/readable-stream/lib/_stream_readable.js ***!
  50591. \**************************************************************/
  50592. /*! no static exports found */
  50593. /***/ (function(module, exports, __webpack_require__) {
  50594. "use strict";
  50595. /* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
  50596. //
  50597. // Permission is hereby granted, free of charge, to any person obtaining a
  50598. // copy of this software and associated documentation files (the
  50599. // "Software"), to deal in the Software without restriction, including
  50600. // without limitation the rights to use, copy, modify, merge, publish,
  50601. // distribute, sublicense, and/or sell copies of the Software, and to permit
  50602. // persons to whom the Software is furnished to do so, subject to the
  50603. // following conditions:
  50604. //
  50605. // The above copyright notice and this permission notice shall be included
  50606. // in all copies or substantial portions of the Software.
  50607. //
  50608. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  50609. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  50610. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  50611. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  50612. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  50613. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  50614. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  50615. /*<replacement>*/
  50616. var pna = __webpack_require__(/*! process-nextick-args */ 91);
  50617. /*</replacement>*/
  50618. module.exports = Readable;
  50619. /*<replacement>*/
  50620. var isArray = __webpack_require__(/*! isarray */ 84);
  50621. /*</replacement>*/
  50622. /*<replacement>*/
  50623. var Duplex;
  50624. /*</replacement>*/
  50625. Readable.ReadableState = ReadableState;
  50626. /*<replacement>*/
  50627. var EE = __webpack_require__(/*! events */ 92).EventEmitter;
  50628. var EElistenerCount = function (emitter, type) {
  50629. return emitter.listeners(type).length;
  50630. };
  50631. /*</replacement>*/
  50632. /*<replacement>*/
  50633. var Stream = __webpack_require__(/*! ./internal/streams/stream */ 93);
  50634. /*</replacement>*/
  50635. /*<replacement>*/
  50636. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer;
  50637. var OurUint8Array = global.Uint8Array || function () {};
  50638. function _uint8ArrayToBuffer(chunk) {
  50639. return Buffer.from(chunk);
  50640. }
  50641. function _isUint8Array(obj) {
  50642. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  50643. }
  50644. /*</replacement>*/
  50645. /*<replacement>*/
  50646. var util = Object.create(__webpack_require__(/*! core-util-is */ 94));
  50647. util.inherits = __webpack_require__(/*! inherits */ 86);
  50648. /*</replacement>*/
  50649. /*<replacement>*/
  50650. var debugUtil = __webpack_require__(/*! util */ 95);
  50651. var debug = void 0;
  50652. if (debugUtil && debugUtil.debuglog) {
  50653. debug = debugUtil.debuglog('stream');
  50654. } else {
  50655. debug = function () {};
  50656. }
  50657. /*</replacement>*/
  50658. var BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ 96);
  50659. var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ 98);
  50660. var StringDecoder;
  50661. util.inherits(Readable, Stream);
  50662. var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
  50663. function prependListener(emitter, event, fn) {
  50664. // Sadly this is not cacheable as some libraries bundle their own
  50665. // event emitter implementation with them.
  50666. if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
  50667. // This is a hack to make sure that our error handler is attached before any
  50668. // userland ones. NEVER DO THIS. This is here only because this code needs
  50669. // to continue to work with older versions of Node.js that do not include
  50670. // the prependListener() method. The goal is to eventually remove this hack.
  50671. if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
  50672. }
  50673. function ReadableState(options, stream) {
  50674. Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ 99);
  50675. options = options || {};
  50676. // Duplex streams are both readable and writable, but share
  50677. // the same options object.
  50678. // However, some cases require setting options to different
  50679. // values for the readable and the writable sides of the duplex stream.
  50680. // These options can be provided separately as readableXXX and writableXXX.
  50681. var isDuplex = stream instanceof Duplex;
  50682. // object stream flag. Used to make read(n) ignore n and to
  50683. // make all the buffer merging and length checks go away
  50684. this.objectMode = !!options.objectMode;
  50685. if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
  50686. // the point at which it stops calling _read() to fill the buffer
  50687. // Note: 0 is a valid value, means "don't call _read preemptively ever"
  50688. var hwm = options.highWaterMark;
  50689. var readableHwm = options.readableHighWaterMark;
  50690. var defaultHwm = this.objectMode ? 16 : 16 * 1024;
  50691. if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
  50692. // cast to ints.
  50693. this.highWaterMark = Math.floor(this.highWaterMark);
  50694. // A linked list is used to store data chunks instead of an array because the
  50695. // linked list can remove elements from the beginning faster than
  50696. // array.shift()
  50697. this.buffer = new BufferList();
  50698. this.length = 0;
  50699. this.pipes = null;
  50700. this.pipesCount = 0;
  50701. this.flowing = null;
  50702. this.ended = false;
  50703. this.endEmitted = false;
  50704. this.reading = false;
  50705. // a flag to be able to tell if the event 'readable'/'data' is emitted
  50706. // immediately, or on a later tick. We set this to true at first, because
  50707. // any actions that shouldn't happen until "later" should generally also
  50708. // not happen before the first read call.
  50709. this.sync = true;
  50710. // whenever we return null, then we set a flag to say
  50711. // that we're awaiting a 'readable' event emission.
  50712. this.needReadable = false;
  50713. this.emittedReadable = false;
  50714. this.readableListening = false;
  50715. this.resumeScheduled = false;
  50716. // has it been destroyed
  50717. this.destroyed = false;
  50718. // Crypto is kind of old and crusty. Historically, its default string
  50719. // encoding is 'binary' so we have to make this configurable.
  50720. // Everything else in the universe uses 'utf8', though.
  50721. this.defaultEncoding = options.defaultEncoding || 'utf8';
  50722. // the number of writers that are awaiting a drain event in .pipe()s
  50723. this.awaitDrain = 0;
  50724. // if true, a maybeReadMore has been scheduled
  50725. this.readingMore = false;
  50726. this.decoder = null;
  50727. this.encoding = null;
  50728. if (options.encoding) {
  50729. if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ 102).StringDecoder;
  50730. this.decoder = new StringDecoder(options.encoding);
  50731. this.encoding = options.encoding;
  50732. }
  50733. }
  50734. function Readable(options) {
  50735. Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ 99);
  50736. if (!(this instanceof Readable)) return new Readable(options);
  50737. this._readableState = new ReadableState(options, this);
  50738. // legacy
  50739. this.readable = true;
  50740. if (options) {
  50741. if (typeof options.read === 'function') this._read = options.read;
  50742. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  50743. }
  50744. Stream.call(this);
  50745. }
  50746. Object.defineProperty(Readable.prototype, 'destroyed', {
  50747. get: function () {
  50748. if (this._readableState === undefined) {
  50749. return false;
  50750. }
  50751. return this._readableState.destroyed;
  50752. },
  50753. set: function (value) {
  50754. // we ignore the value if the stream
  50755. // has not been initialized yet
  50756. if (!this._readableState) {
  50757. return;
  50758. }
  50759. // backward compatibility, the user is explicitly
  50760. // managing destroyed
  50761. this._readableState.destroyed = value;
  50762. }
  50763. });
  50764. Readable.prototype.destroy = destroyImpl.destroy;
  50765. Readable.prototype._undestroy = destroyImpl.undestroy;
  50766. Readable.prototype._destroy = function (err, cb) {
  50767. this.push(null);
  50768. cb(err);
  50769. };
  50770. // Manually shove something into the read() buffer.
  50771. // This returns true if the highWaterMark has not been hit yet,
  50772. // similar to how Writable.write() returns true if you should
  50773. // write() some more.
  50774. Readable.prototype.push = function (chunk, encoding) {
  50775. var state = this._readableState;
  50776. var skipChunkCheck;
  50777. if (!state.objectMode) {
  50778. if (typeof chunk === 'string') {
  50779. encoding = encoding || state.defaultEncoding;
  50780. if (encoding !== state.encoding) {
  50781. chunk = Buffer.from(chunk, encoding);
  50782. encoding = '';
  50783. }
  50784. skipChunkCheck = true;
  50785. }
  50786. } else {
  50787. skipChunkCheck = true;
  50788. }
  50789. return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
  50790. };
  50791. // Unshift should *always* be something directly out of read()
  50792. Readable.prototype.unshift = function (chunk) {
  50793. return readableAddChunk(this, chunk, null, true, false);
  50794. };
  50795. function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
  50796. var state = stream._readableState;
  50797. if (chunk === null) {
  50798. state.reading = false;
  50799. onEofChunk(stream, state);
  50800. } else {
  50801. var er;
  50802. if (!skipChunkCheck) er = chunkInvalid(state, chunk);
  50803. if (er) {
  50804. stream.emit('error', er);
  50805. } else if (state.objectMode || chunk && chunk.length > 0) {
  50806. if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
  50807. chunk = _uint8ArrayToBuffer(chunk);
  50808. }
  50809. if (addToFront) {
  50810. if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
  50811. } else if (state.ended) {
  50812. stream.emit('error', new Error('stream.push() after EOF'));
  50813. } else {
  50814. state.reading = false;
  50815. if (state.decoder && !encoding) {
  50816. chunk = state.decoder.write(chunk);
  50817. if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
  50818. } else {
  50819. addChunk(stream, state, chunk, false);
  50820. }
  50821. }
  50822. } else if (!addToFront) {
  50823. state.reading = false;
  50824. }
  50825. }
  50826. return needMoreData(state);
  50827. }
  50828. function addChunk(stream, state, chunk, addToFront) {
  50829. if (state.flowing && state.length === 0 && !state.sync) {
  50830. stream.emit('data', chunk);
  50831. stream.read(0);
  50832. } else {
  50833. // update the buffer info.
  50834. state.length += state.objectMode ? 1 : chunk.length;
  50835. if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
  50836. if (state.needReadable) emitReadable(stream);
  50837. }
  50838. maybeReadMore(stream, state);
  50839. }
  50840. function chunkInvalid(state, chunk) {
  50841. var er;
  50842. if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  50843. er = new TypeError('Invalid non-string/buffer chunk');
  50844. }
  50845. return er;
  50846. }
  50847. // if it's past the high water mark, we can push in some more.
  50848. // Also, if we have no data yet, we can stand some
  50849. // more bytes. This is to work around cases where hwm=0,
  50850. // such as the repl. Also, if the push() triggered a
  50851. // readable event, and the user called read(largeNumber) such that
  50852. // needReadable was set, then we ought to push more, so that another
  50853. // 'readable' event will be triggered.
  50854. function needMoreData(state) {
  50855. return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
  50856. }
  50857. Readable.prototype.isPaused = function () {
  50858. return this._readableState.flowing === false;
  50859. };
  50860. // backwards compatibility.
  50861. Readable.prototype.setEncoding = function (enc) {
  50862. if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ 102).StringDecoder;
  50863. this._readableState.decoder = new StringDecoder(enc);
  50864. this._readableState.encoding = enc;
  50865. return this;
  50866. };
  50867. // Don't raise the hwm > 8MB
  50868. var MAX_HWM = 0x800000;
  50869. function computeNewHighWaterMark(n) {
  50870. if (n >= MAX_HWM) {
  50871. n = MAX_HWM;
  50872. } else {
  50873. // Get the next highest power of 2 to prevent increasing hwm excessively in
  50874. // tiny amounts
  50875. n--;
  50876. n |= n >>> 1;
  50877. n |= n >>> 2;
  50878. n |= n >>> 4;
  50879. n |= n >>> 8;
  50880. n |= n >>> 16;
  50881. n++;
  50882. }
  50883. return n;
  50884. }
  50885. // This function is designed to be inlinable, so please take care when making
  50886. // changes to the function body.
  50887. function howMuchToRead(n, state) {
  50888. if (n <= 0 || state.length === 0 && state.ended) return 0;
  50889. if (state.objectMode) return 1;
  50890. if (n !== n) {
  50891. // Only flow one buffer at a time
  50892. if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
  50893. }
  50894. // If we're asking for more than the current hwm, then raise the hwm.
  50895. if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
  50896. if (n <= state.length) return n;
  50897. // Don't have enough
  50898. if (!state.ended) {
  50899. state.needReadable = true;
  50900. return 0;
  50901. }
  50902. return state.length;
  50903. }
  50904. // you can override either this method, or the async _read(n) below.
  50905. Readable.prototype.read = function (n) {
  50906. debug('read', n);
  50907. n = parseInt(n, 10);
  50908. var state = this._readableState;
  50909. var nOrig = n;
  50910. if (n !== 0) state.emittedReadable = false;
  50911. // if we're doing read(0) to trigger a readable event, but we
  50912. // already have a bunch of data in the buffer, then just trigger
  50913. // the 'readable' event and move on.
  50914. if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
  50915. debug('read: emitReadable', state.length, state.ended);
  50916. if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
  50917. return null;
  50918. }
  50919. n = howMuchToRead(n, state);
  50920. // if we've ended, and we're now clear, then finish it up.
  50921. if (n === 0 && state.ended) {
  50922. if (state.length === 0) endReadable(this);
  50923. return null;
  50924. }
  50925. // All the actual chunk generation logic needs to be
  50926. // *below* the call to _read. The reason is that in certain
  50927. // synthetic stream cases, such as passthrough streams, _read
  50928. // may be a completely synchronous operation which may change
  50929. // the state of the read buffer, providing enough data when
  50930. // before there was *not* enough.
  50931. //
  50932. // So, the steps are:
  50933. // 1. Figure out what the state of things will be after we do
  50934. // a read from the buffer.
  50935. //
  50936. // 2. If that resulting state will trigger a _read, then call _read.
  50937. // Note that this may be asynchronous, or synchronous. Yes, it is
  50938. // deeply ugly to write APIs this way, but that still doesn't mean
  50939. // that the Readable class should behave improperly, as streams are
  50940. // designed to be sync/async agnostic.
  50941. // Take note if the _read call is sync or async (ie, if the read call
  50942. // has returned yet), so that we know whether or not it's safe to emit
  50943. // 'readable' etc.
  50944. //
  50945. // 3. Actually pull the requested chunks out of the buffer and return.
  50946. // if we need a readable event, then we need to do some reading.
  50947. var doRead = state.needReadable;
  50948. debug('need readable', doRead);
  50949. // if we currently have less than the highWaterMark, then also read some
  50950. if (state.length === 0 || state.length - n < state.highWaterMark) {
  50951. doRead = true;
  50952. debug('length less than watermark', doRead);
  50953. }
  50954. // however, if we've ended, then there's no point, and if we're already
  50955. // reading, then it's unnecessary.
  50956. if (state.ended || state.reading) {
  50957. doRead = false;
  50958. debug('reading or ended', doRead);
  50959. } else if (doRead) {
  50960. debug('do read');
  50961. state.reading = true;
  50962. state.sync = true;
  50963. // if the length is currently zero, then we *need* a readable event.
  50964. if (state.length === 0) state.needReadable = true;
  50965. // call internal read method
  50966. this._read(state.highWaterMark);
  50967. state.sync = false;
  50968. // If _read pushed data synchronously, then `reading` will be false,
  50969. // and we need to re-evaluate how much data we can return to the user.
  50970. if (!state.reading) n = howMuchToRead(nOrig, state);
  50971. }
  50972. var ret;
  50973. if (n > 0) ret = fromList(n, state);else ret = null;
  50974. if (ret === null) {
  50975. state.needReadable = true;
  50976. n = 0;
  50977. } else {
  50978. state.length -= n;
  50979. }
  50980. if (state.length === 0) {
  50981. // If we have nothing in the buffer, then we want to know
  50982. // as soon as we *do* get something into the buffer.
  50983. if (!state.ended) state.needReadable = true;
  50984. // If we tried to read() past the EOF, then emit end on the next tick.
  50985. if (nOrig !== n && state.ended) endReadable(this);
  50986. }
  50987. if (ret !== null) this.emit('data', ret);
  50988. return ret;
  50989. };
  50990. function onEofChunk(stream, state) {
  50991. if (state.ended) return;
  50992. if (state.decoder) {
  50993. var chunk = state.decoder.end();
  50994. if (chunk && chunk.length) {
  50995. state.buffer.push(chunk);
  50996. state.length += state.objectMode ? 1 : chunk.length;
  50997. }
  50998. }
  50999. state.ended = true;
  51000. // emit 'readable' now to make sure it gets picked up.
  51001. emitReadable(stream);
  51002. }
  51003. // Don't emit readable right away in sync mode, because this can trigger
  51004. // another read() call => stack overflow. This way, it might trigger
  51005. // a nextTick recursion warning, but that's not so bad.
  51006. function emitReadable(stream) {
  51007. var state = stream._readableState;
  51008. state.needReadable = false;
  51009. if (!state.emittedReadable) {
  51010. debug('emitReadable', state.flowing);
  51011. state.emittedReadable = true;
  51012. if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
  51013. }
  51014. }
  51015. function emitReadable_(stream) {
  51016. debug('emit readable');
  51017. stream.emit('readable');
  51018. flow(stream);
  51019. }
  51020. // at this point, the user has presumably seen the 'readable' event,
  51021. // and called read() to consume some data. that may have triggered
  51022. // in turn another _read(n) call, in which case reading = true if
  51023. // it's in progress.
  51024. // However, if we're not ended, or reading, and the length < hwm,
  51025. // then go ahead and try to read some more preemptively.
  51026. function maybeReadMore(stream, state) {
  51027. if (!state.readingMore) {
  51028. state.readingMore = true;
  51029. pna.nextTick(maybeReadMore_, stream, state);
  51030. }
  51031. }
  51032. function maybeReadMore_(stream, state) {
  51033. var len = state.length;
  51034. while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
  51035. debug('maybeReadMore read 0');
  51036. stream.read(0);
  51037. if (len === state.length)
  51038. // didn't get any data, stop spinning.
  51039. break;else len = state.length;
  51040. }
  51041. state.readingMore = false;
  51042. }
  51043. // abstract method. to be overridden in specific implementation classes.
  51044. // call cb(er, data) where data is <= n in length.
  51045. // for virtual (non-string, non-buffer) streams, "length" is somewhat
  51046. // arbitrary, and perhaps not very meaningful.
  51047. Readable.prototype._read = function (n) {
  51048. this.emit('error', new Error('_read() is not implemented'));
  51049. };
  51050. Readable.prototype.pipe = function (dest, pipeOpts) {
  51051. var src = this;
  51052. var state = this._readableState;
  51053. switch (state.pipesCount) {
  51054. case 0:
  51055. state.pipes = dest;
  51056. break;
  51057. case 1:
  51058. state.pipes = [state.pipes, dest];
  51059. break;
  51060. default:
  51061. state.pipes.push(dest);
  51062. break;
  51063. }
  51064. state.pipesCount += 1;
  51065. debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
  51066. var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
  51067. var endFn = doEnd ? onend : unpipe;
  51068. if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
  51069. dest.on('unpipe', onunpipe);
  51070. function onunpipe(readable, unpipeInfo) {
  51071. debug('onunpipe');
  51072. if (readable === src) {
  51073. if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
  51074. unpipeInfo.hasUnpiped = true;
  51075. cleanup();
  51076. }
  51077. }
  51078. }
  51079. function onend() {
  51080. debug('onend');
  51081. dest.end();
  51082. }
  51083. // when the dest drains, it reduces the awaitDrain counter
  51084. // on the source. This would be more elegant with a .once()
  51085. // handler in flow(), but adding and removing repeatedly is
  51086. // too slow.
  51087. var ondrain = pipeOnDrain(src);
  51088. dest.on('drain', ondrain);
  51089. var cleanedUp = false;
  51090. function cleanup() {
  51091. debug('cleanup');
  51092. // cleanup event handlers once the pipe is broken
  51093. dest.removeListener('close', onclose);
  51094. dest.removeListener('finish', onfinish);
  51095. dest.removeListener('drain', ondrain);
  51096. dest.removeListener('error', onerror);
  51097. dest.removeListener('unpipe', onunpipe);
  51098. src.removeListener('end', onend);
  51099. src.removeListener('end', unpipe);
  51100. src.removeListener('data', ondata);
  51101. cleanedUp = true;
  51102. // if the reader is waiting for a drain event from this
  51103. // specific writer, then it would cause it to never start
  51104. // flowing again.
  51105. // So, if this is awaiting a drain, then we just call it now.
  51106. // If we don't know, then assume that we are waiting for one.
  51107. if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
  51108. }
  51109. // If the user pushes more data while we're writing to dest then we'll end up
  51110. // in ondata again. However, we only want to increase awaitDrain once because
  51111. // dest will only emit one 'drain' event for the multiple writes.
  51112. // => Introduce a guard on increasing awaitDrain.
  51113. var increasedAwaitDrain = false;
  51114. src.on('data', ondata);
  51115. function ondata(chunk) {
  51116. debug('ondata');
  51117. increasedAwaitDrain = false;
  51118. var ret = dest.write(chunk);
  51119. if (false === ret && !increasedAwaitDrain) {
  51120. // If the user unpiped during `dest.write()`, it is possible
  51121. // to get stuck in a permanently paused state if that write
  51122. // also returned false.
  51123. // => Check whether `dest` is still a piping destination.
  51124. if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
  51125. debug('false write response, pause', src._readableState.awaitDrain);
  51126. src._readableState.awaitDrain++;
  51127. increasedAwaitDrain = true;
  51128. }
  51129. src.pause();
  51130. }
  51131. }
  51132. // if the dest has an error, then stop piping into it.
  51133. // however, don't suppress the throwing behavior for this.
  51134. function onerror(er) {
  51135. debug('onerror', er);
  51136. unpipe();
  51137. dest.removeListener('error', onerror);
  51138. if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
  51139. }
  51140. // Make sure our error handler is attached before userland ones.
  51141. prependListener(dest, 'error', onerror);
  51142. // Both close and finish should trigger unpipe, but only once.
  51143. function onclose() {
  51144. dest.removeListener('finish', onfinish);
  51145. unpipe();
  51146. }
  51147. dest.once('close', onclose);
  51148. function onfinish() {
  51149. debug('onfinish');
  51150. dest.removeListener('close', onclose);
  51151. unpipe();
  51152. }
  51153. dest.once('finish', onfinish);
  51154. function unpipe() {
  51155. debug('unpipe');
  51156. src.unpipe(dest);
  51157. }
  51158. // tell the dest that it's being piped to
  51159. dest.emit('pipe', src);
  51160. // start the flow if it hasn't been started already.
  51161. if (!state.flowing) {
  51162. debug('pipe resume');
  51163. src.resume();
  51164. }
  51165. return dest;
  51166. };
  51167. function pipeOnDrain(src) {
  51168. return function () {
  51169. var state = src._readableState;
  51170. debug('pipeOnDrain', state.awaitDrain);
  51171. if (state.awaitDrain) state.awaitDrain--;
  51172. if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
  51173. state.flowing = true;
  51174. flow(src);
  51175. }
  51176. };
  51177. }
  51178. Readable.prototype.unpipe = function (dest) {
  51179. var state = this._readableState;
  51180. var unpipeInfo = { hasUnpiped: false };
  51181. // if we're not piping anywhere, then do nothing.
  51182. if (state.pipesCount === 0) return this;
  51183. // just one destination. most common case.
  51184. if (state.pipesCount === 1) {
  51185. // passed in one, but it's not the right one.
  51186. if (dest && dest !== state.pipes) return this;
  51187. if (!dest) dest = state.pipes;
  51188. // got a match.
  51189. state.pipes = null;
  51190. state.pipesCount = 0;
  51191. state.flowing = false;
  51192. if (dest) dest.emit('unpipe', this, unpipeInfo);
  51193. return this;
  51194. }
  51195. // slow case. multiple pipe destinations.
  51196. if (!dest) {
  51197. // remove all.
  51198. var dests = state.pipes;
  51199. var len = state.pipesCount;
  51200. state.pipes = null;
  51201. state.pipesCount = 0;
  51202. state.flowing = false;
  51203. for (var i = 0; i < len; i++) {
  51204. dests[i].emit('unpipe', this, unpipeInfo);
  51205. }return this;
  51206. }
  51207. // try to find the right one.
  51208. var index = indexOf(state.pipes, dest);
  51209. if (index === -1) return this;
  51210. state.pipes.splice(index, 1);
  51211. state.pipesCount -= 1;
  51212. if (state.pipesCount === 1) state.pipes = state.pipes[0];
  51213. dest.emit('unpipe', this, unpipeInfo);
  51214. return this;
  51215. };
  51216. // set up data events if they are asked for
  51217. // Ensure readable listeners eventually get something
  51218. Readable.prototype.on = function (ev, fn) {
  51219. var res = Stream.prototype.on.call(this, ev, fn);
  51220. if (ev === 'data') {
  51221. // Start flowing on next tick if stream isn't explicitly paused
  51222. if (this._readableState.flowing !== false) this.resume();
  51223. } else if (ev === 'readable') {
  51224. var state = this._readableState;
  51225. if (!state.endEmitted && !state.readableListening) {
  51226. state.readableListening = state.needReadable = true;
  51227. state.emittedReadable = false;
  51228. if (!state.reading) {
  51229. pna.nextTick(nReadingNextTick, this);
  51230. } else if (state.length) {
  51231. emitReadable(this);
  51232. }
  51233. }
  51234. }
  51235. return res;
  51236. };
  51237. Readable.prototype.addListener = Readable.prototype.on;
  51238. function nReadingNextTick(self) {
  51239. debug('readable nexttick read 0');
  51240. self.read(0);
  51241. }
  51242. // pause() and resume() are remnants of the legacy readable stream API
  51243. // If the user uses them, then switch into old mode.
  51244. Readable.prototype.resume = function () {
  51245. var state = this._readableState;
  51246. if (!state.flowing) {
  51247. debug('resume');
  51248. state.flowing = true;
  51249. resume(this, state);
  51250. }
  51251. return this;
  51252. };
  51253. function resume(stream, state) {
  51254. if (!state.resumeScheduled) {
  51255. state.resumeScheduled = true;
  51256. pna.nextTick(resume_, stream, state);
  51257. }
  51258. }
  51259. function resume_(stream, state) {
  51260. if (!state.reading) {
  51261. debug('resume read 0');
  51262. stream.read(0);
  51263. }
  51264. state.resumeScheduled = false;
  51265. state.awaitDrain = 0;
  51266. stream.emit('resume');
  51267. flow(stream);
  51268. if (state.flowing && !state.reading) stream.read(0);
  51269. }
  51270. Readable.prototype.pause = function () {
  51271. debug('call pause flowing=%j', this._readableState.flowing);
  51272. if (false !== this._readableState.flowing) {
  51273. debug('pause');
  51274. this._readableState.flowing = false;
  51275. this.emit('pause');
  51276. }
  51277. return this;
  51278. };
  51279. function flow(stream) {
  51280. var state = stream._readableState;
  51281. debug('flow', state.flowing);
  51282. while (state.flowing && stream.read() !== null) {}
  51283. }
  51284. // wrap an old-style stream as the async data source.
  51285. // This is *not* part of the readable stream interface.
  51286. // It is an ugly unfortunate mess of history.
  51287. Readable.prototype.wrap = function (stream) {
  51288. var _this = this;
  51289. var state = this._readableState;
  51290. var paused = false;
  51291. stream.on('end', function () {
  51292. debug('wrapped end');
  51293. if (state.decoder && !state.ended) {
  51294. var chunk = state.decoder.end();
  51295. if (chunk && chunk.length) _this.push(chunk);
  51296. }
  51297. _this.push(null);
  51298. });
  51299. stream.on('data', function (chunk) {
  51300. debug('wrapped data');
  51301. if (state.decoder) chunk = state.decoder.write(chunk);
  51302. // don't skip over falsy values in objectMode
  51303. if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
  51304. var ret = _this.push(chunk);
  51305. if (!ret) {
  51306. paused = true;
  51307. stream.pause();
  51308. }
  51309. });
  51310. // proxy all the other methods.
  51311. // important when wrapping filters and duplexes.
  51312. for (var i in stream) {
  51313. if (this[i] === undefined && typeof stream[i] === 'function') {
  51314. this[i] = function (method) {
  51315. return function () {
  51316. return stream[method].apply(stream, arguments);
  51317. };
  51318. }(i);
  51319. }
  51320. }
  51321. // proxy certain important events.
  51322. for (var n = 0; n < kProxyEvents.length; n++) {
  51323. stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
  51324. }
  51325. // when we try to consume some more bytes, simply unpause the
  51326. // underlying stream.
  51327. this._read = function (n) {
  51328. debug('wrapped _read', n);
  51329. if (paused) {
  51330. paused = false;
  51331. stream.resume();
  51332. }
  51333. };
  51334. return this;
  51335. };
  51336. Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
  51337. // making it explicit this property is not enumerable
  51338. // because otherwise some prototype manipulation in
  51339. // userland will fail
  51340. enumerable: false,
  51341. get: function () {
  51342. return this._readableState.highWaterMark;
  51343. }
  51344. });
  51345. // exposed for testing purposes only.
  51346. Readable._fromList = fromList;
  51347. // Pluck off n bytes from an array of buffers.
  51348. // Length is the combined lengths of all the buffers in the list.
  51349. // This function is designed to be inlinable, so please take care when making
  51350. // changes to the function body.
  51351. function fromList(n, state) {
  51352. // nothing buffered
  51353. if (state.length === 0) return null;
  51354. var ret;
  51355. if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
  51356. // read it all, truncate the list
  51357. if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
  51358. state.buffer.clear();
  51359. } else {
  51360. // read part of list
  51361. ret = fromListPartial(n, state.buffer, state.decoder);
  51362. }
  51363. return ret;
  51364. }
  51365. // Extracts only enough buffered data to satisfy the amount requested.
  51366. // This function is designed to be inlinable, so please take care when making
  51367. // changes to the function body.
  51368. function fromListPartial(n, list, hasStrings) {
  51369. var ret;
  51370. if (n < list.head.data.length) {
  51371. // slice is the same for buffers and strings
  51372. ret = list.head.data.slice(0, n);
  51373. list.head.data = list.head.data.slice(n);
  51374. } else if (n === list.head.data.length) {
  51375. // first chunk is a perfect match
  51376. ret = list.shift();
  51377. } else {
  51378. // result spans more than one buffer
  51379. ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
  51380. }
  51381. return ret;
  51382. }
  51383. // Copies a specified amount of characters from the list of buffered data
  51384. // chunks.
  51385. // This function is designed to be inlinable, so please take care when making
  51386. // changes to the function body.
  51387. function copyFromBufferString(n, list) {
  51388. var p = list.head;
  51389. var c = 1;
  51390. var ret = p.data;
  51391. n -= ret.length;
  51392. while (p = p.next) {
  51393. var str = p.data;
  51394. var nb = n > str.length ? str.length : n;
  51395. if (nb === str.length) ret += str;else ret += str.slice(0, n);
  51396. n -= nb;
  51397. if (n === 0) {
  51398. if (nb === str.length) {
  51399. ++c;
  51400. if (p.next) list.head = p.next;else list.head = list.tail = null;
  51401. } else {
  51402. list.head = p;
  51403. p.data = str.slice(nb);
  51404. }
  51405. break;
  51406. }
  51407. ++c;
  51408. }
  51409. list.length -= c;
  51410. return ret;
  51411. }
  51412. // Copies a specified amount of bytes from the list of buffered data chunks.
  51413. // This function is designed to be inlinable, so please take care when making
  51414. // changes to the function body.
  51415. function copyFromBuffer(n, list) {
  51416. var ret = Buffer.allocUnsafe(n);
  51417. var p = list.head;
  51418. var c = 1;
  51419. p.data.copy(ret);
  51420. n -= p.data.length;
  51421. while (p = p.next) {
  51422. var buf = p.data;
  51423. var nb = n > buf.length ? buf.length : n;
  51424. buf.copy(ret, ret.length - n, 0, nb);
  51425. n -= nb;
  51426. if (n === 0) {
  51427. if (nb === buf.length) {
  51428. ++c;
  51429. if (p.next) list.head = p.next;else list.head = list.tail = null;
  51430. } else {
  51431. list.head = p;
  51432. p.data = buf.slice(nb);
  51433. }
  51434. break;
  51435. }
  51436. ++c;
  51437. }
  51438. list.length -= c;
  51439. return ret;
  51440. }
  51441. function endReadable(stream) {
  51442. var state = stream._readableState;
  51443. // If we get here before consuming all the bytes, then that is a
  51444. // bug in node. Should never happen.
  51445. if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
  51446. if (!state.endEmitted) {
  51447. state.ended = true;
  51448. pna.nextTick(endReadableNT, state, stream);
  51449. }
  51450. }
  51451. function endReadableNT(state, stream) {
  51452. // Check that we didn't get one last unshift.
  51453. if (!state.endEmitted && state.length === 0) {
  51454. state.endEmitted = true;
  51455. stream.readable = false;
  51456. stream.emit('end');
  51457. }
  51458. }
  51459. function indexOf(xs, x) {
  51460. for (var i = 0, l = xs.length; i < l; i++) {
  51461. if (xs[i] === x) return i;
  51462. }
  51463. return -1;
  51464. }
  51465. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 3), __webpack_require__(/*! ./../../node-libs-browser/mock/process.js */ 78)))
  51466. /***/ }),
  51467. /***/ 91:
  51468. /*!****************************************************!*\
  51469. !*** ./node_modules/process-nextick-args/index.js ***!
  51470. \****************************************************/
  51471. /*! no static exports found */
  51472. /***/ (function(module, exports, __webpack_require__) {
  51473. "use strict";
  51474. /* WEBPACK VAR INJECTION */(function(process) {
  51475. if (typeof process === 'undefined' ||
  51476. !process.version ||
  51477. process.version.indexOf('v0.') === 0 ||
  51478. process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
  51479. module.exports = { nextTick: nextTick };
  51480. } else {
  51481. module.exports = process
  51482. }
  51483. function nextTick(fn, arg1, arg2, arg3) {
  51484. if (typeof fn !== 'function') {
  51485. throw new TypeError('"callback" argument must be a function');
  51486. }
  51487. var len = arguments.length;
  51488. var args, i;
  51489. switch (len) {
  51490. case 0:
  51491. case 1:
  51492. return process.nextTick(fn);
  51493. case 2:
  51494. return process.nextTick(function afterTickOne() {
  51495. fn.call(null, arg1);
  51496. });
  51497. case 3:
  51498. return process.nextTick(function afterTickTwo() {
  51499. fn.call(null, arg1, arg2);
  51500. });
  51501. case 4:
  51502. return process.nextTick(function afterTickThree() {
  51503. fn.call(null, arg1, arg2, arg3);
  51504. });
  51505. default:
  51506. args = new Array(len - 1);
  51507. i = 0;
  51508. while (i < args.length) {
  51509. args[i++] = arguments[i];
  51510. }
  51511. return process.nextTick(function afterTick() {
  51512. fn.apply(null, args);
  51513. });
  51514. }
  51515. }
  51516. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 78)))
  51517. /***/ }),
  51518. /***/ 92:
  51519. /*!***************************************!*\
  51520. !*** ./node_modules/events/events.js ***!
  51521. \***************************************/
  51522. /*! no static exports found */
  51523. /***/ (function(module, exports, __webpack_require__) {
  51524. "use strict";
  51525. // Copyright Joyent, Inc. and other Node contributors.
  51526. //
  51527. // Permission is hereby granted, free of charge, to any person obtaining a
  51528. // copy of this software and associated documentation files (the
  51529. // "Software"), to deal in the Software without restriction, including
  51530. // without limitation the rights to use, copy, modify, merge, publish,
  51531. // distribute, sublicense, and/or sell copies of the Software, and to permit
  51532. // persons to whom the Software is furnished to do so, subject to the
  51533. // following conditions:
  51534. //
  51535. // The above copyright notice and this permission notice shall be included
  51536. // in all copies or substantial portions of the Software.
  51537. //
  51538. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  51539. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  51540. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  51541. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  51542. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  51543. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  51544. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  51545. var R = typeof Reflect === 'object' ? Reflect : null
  51546. var ReflectApply = R && typeof R.apply === 'function'
  51547. ? R.apply
  51548. : function ReflectApply(target, receiver, args) {
  51549. return Function.prototype.apply.call(target, receiver, args);
  51550. }
  51551. var ReflectOwnKeys
  51552. if (R && typeof R.ownKeys === 'function') {
  51553. ReflectOwnKeys = R.ownKeys
  51554. } else if (Object.getOwnPropertySymbols) {
  51555. ReflectOwnKeys = function ReflectOwnKeys(target) {
  51556. return Object.getOwnPropertyNames(target)
  51557. .concat(Object.getOwnPropertySymbols(target));
  51558. };
  51559. } else {
  51560. ReflectOwnKeys = function ReflectOwnKeys(target) {
  51561. return Object.getOwnPropertyNames(target);
  51562. };
  51563. }
  51564. function ProcessEmitWarning(warning) {
  51565. if (console && console.warn) console.warn(warning);
  51566. }
  51567. var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
  51568. return value !== value;
  51569. }
  51570. function EventEmitter() {
  51571. EventEmitter.init.call(this);
  51572. }
  51573. module.exports = EventEmitter;
  51574. module.exports.once = once;
  51575. // Backwards-compat with node 0.10.x
  51576. EventEmitter.EventEmitter = EventEmitter;
  51577. EventEmitter.prototype._events = undefined;
  51578. EventEmitter.prototype._eventsCount = 0;
  51579. EventEmitter.prototype._maxListeners = undefined;
  51580. // By default EventEmitters will print a warning if more than 10 listeners are
  51581. // added to it. This is a useful default which helps finding memory leaks.
  51582. var defaultMaxListeners = 10;
  51583. function checkListener(listener) {
  51584. if (typeof listener !== 'function') {
  51585. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  51586. }
  51587. }
  51588. Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
  51589. enumerable: true,
  51590. get: function() {
  51591. return defaultMaxListeners;
  51592. },
  51593. set: function(arg) {
  51594. if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
  51595. throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
  51596. }
  51597. defaultMaxListeners = arg;
  51598. }
  51599. });
  51600. EventEmitter.init = function() {
  51601. if (this._events === undefined ||
  51602. this._events === Object.getPrototypeOf(this)._events) {
  51603. this._events = Object.create(null);
  51604. this._eventsCount = 0;
  51605. }
  51606. this._maxListeners = this._maxListeners || undefined;
  51607. };
  51608. // Obviously not all Emitters should be limited to 10. This function allows
  51609. // that to be increased. Set to zero for unlimited.
  51610. EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
  51611. if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
  51612. throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
  51613. }
  51614. this._maxListeners = n;
  51615. return this;
  51616. };
  51617. function _getMaxListeners(that) {
  51618. if (that._maxListeners === undefined)
  51619. return EventEmitter.defaultMaxListeners;
  51620. return that._maxListeners;
  51621. }
  51622. EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
  51623. return _getMaxListeners(this);
  51624. };
  51625. EventEmitter.prototype.emit = function emit(type) {
  51626. var args = [];
  51627. for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
  51628. var doError = (type === 'error');
  51629. var events = this._events;
  51630. if (events !== undefined)
  51631. doError = (doError && events.error === undefined);
  51632. else if (!doError)
  51633. return false;
  51634. // If there is no 'error' event listener then throw.
  51635. if (doError) {
  51636. var er;
  51637. if (args.length > 0)
  51638. er = args[0];
  51639. if (er instanceof Error) {
  51640. // Note: The comments on the `throw` lines are intentional, they show
  51641. // up in Node's output if this results in an unhandled exception.
  51642. throw er; // Unhandled 'error' event
  51643. }
  51644. // At least give some kind of context to the user
  51645. var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
  51646. err.context = er;
  51647. throw err; // Unhandled 'error' event
  51648. }
  51649. var handler = events[type];
  51650. if (handler === undefined)
  51651. return false;
  51652. if (typeof handler === 'function') {
  51653. ReflectApply(handler, this, args);
  51654. } else {
  51655. var len = handler.length;
  51656. var listeners = arrayClone(handler, len);
  51657. for (var i = 0; i < len; ++i)
  51658. ReflectApply(listeners[i], this, args);
  51659. }
  51660. return true;
  51661. };
  51662. function _addListener(target, type, listener, prepend) {
  51663. var m;
  51664. var events;
  51665. var existing;
  51666. checkListener(listener);
  51667. events = target._events;
  51668. if (events === undefined) {
  51669. events = target._events = Object.create(null);
  51670. target._eventsCount = 0;
  51671. } else {
  51672. // To avoid recursion in the case that type === "newListener"! Before
  51673. // adding it to the listeners, first emit "newListener".
  51674. if (events.newListener !== undefined) {
  51675. target.emit('newListener', type,
  51676. listener.listener ? listener.listener : listener);
  51677. // Re-assign `events` because a newListener handler could have caused the
  51678. // this._events to be assigned to a new object
  51679. events = target._events;
  51680. }
  51681. existing = events[type];
  51682. }
  51683. if (existing === undefined) {
  51684. // Optimize the case of one listener. Don't need the extra array object.
  51685. existing = events[type] = listener;
  51686. ++target._eventsCount;
  51687. } else {
  51688. if (typeof existing === 'function') {
  51689. // Adding the second element, need to change to array.
  51690. existing = events[type] =
  51691. prepend ? [listener, existing] : [existing, listener];
  51692. // If we've already got an array, just append.
  51693. } else if (prepend) {
  51694. existing.unshift(listener);
  51695. } else {
  51696. existing.push(listener);
  51697. }
  51698. // Check for listener leak
  51699. m = _getMaxListeners(target);
  51700. if (m > 0 && existing.length > m && !existing.warned) {
  51701. existing.warned = true;
  51702. // No error code for this since it is a Warning
  51703. // eslint-disable-next-line no-restricted-syntax
  51704. var w = new Error('Possible EventEmitter memory leak detected. ' +
  51705. existing.length + ' ' + String(type) + ' listeners ' +
  51706. 'added. Use emitter.setMaxListeners() to ' +
  51707. 'increase limit');
  51708. w.name = 'MaxListenersExceededWarning';
  51709. w.emitter = target;
  51710. w.type = type;
  51711. w.count = existing.length;
  51712. ProcessEmitWarning(w);
  51713. }
  51714. }
  51715. return target;
  51716. }
  51717. EventEmitter.prototype.addListener = function addListener(type, listener) {
  51718. return _addListener(this, type, listener, false);
  51719. };
  51720. EventEmitter.prototype.on = EventEmitter.prototype.addListener;
  51721. EventEmitter.prototype.prependListener =
  51722. function prependListener(type, listener) {
  51723. return _addListener(this, type, listener, true);
  51724. };
  51725. function onceWrapper() {
  51726. if (!this.fired) {
  51727. this.target.removeListener(this.type, this.wrapFn);
  51728. this.fired = true;
  51729. if (arguments.length === 0)
  51730. return this.listener.call(this.target);
  51731. return this.listener.apply(this.target, arguments);
  51732. }
  51733. }
  51734. function _onceWrap(target, type, listener) {
  51735. var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
  51736. var wrapped = onceWrapper.bind(state);
  51737. wrapped.listener = listener;
  51738. state.wrapFn = wrapped;
  51739. return wrapped;
  51740. }
  51741. EventEmitter.prototype.once = function once(type, listener) {
  51742. checkListener(listener);
  51743. this.on(type, _onceWrap(this, type, listener));
  51744. return this;
  51745. };
  51746. EventEmitter.prototype.prependOnceListener =
  51747. function prependOnceListener(type, listener) {
  51748. checkListener(listener);
  51749. this.prependListener(type, _onceWrap(this, type, listener));
  51750. return this;
  51751. };
  51752. // Emits a 'removeListener' event if and only if the listener was removed.
  51753. EventEmitter.prototype.removeListener =
  51754. function removeListener(type, listener) {
  51755. var list, events, position, i, originalListener;
  51756. checkListener(listener);
  51757. events = this._events;
  51758. if (events === undefined)
  51759. return this;
  51760. list = events[type];
  51761. if (list === undefined)
  51762. return this;
  51763. if (list === listener || list.listener === listener) {
  51764. if (--this._eventsCount === 0)
  51765. this._events = Object.create(null);
  51766. else {
  51767. delete events[type];
  51768. if (events.removeListener)
  51769. this.emit('removeListener', type, list.listener || listener);
  51770. }
  51771. } else if (typeof list !== 'function') {
  51772. position = -1;
  51773. for (i = list.length - 1; i >= 0; i--) {
  51774. if (list[i] === listener || list[i].listener === listener) {
  51775. originalListener = list[i].listener;
  51776. position = i;
  51777. break;
  51778. }
  51779. }
  51780. if (position < 0)
  51781. return this;
  51782. if (position === 0)
  51783. list.shift();
  51784. else {
  51785. spliceOne(list, position);
  51786. }
  51787. if (list.length === 1)
  51788. events[type] = list[0];
  51789. if (events.removeListener !== undefined)
  51790. this.emit('removeListener', type, originalListener || listener);
  51791. }
  51792. return this;
  51793. };
  51794. EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
  51795. EventEmitter.prototype.removeAllListeners =
  51796. function removeAllListeners(type) {
  51797. var listeners, events, i;
  51798. events = this._events;
  51799. if (events === undefined)
  51800. return this;
  51801. // not listening for removeListener, no need to emit
  51802. if (events.removeListener === undefined) {
  51803. if (arguments.length === 0) {
  51804. this._events = Object.create(null);
  51805. this._eventsCount = 0;
  51806. } else if (events[type] !== undefined) {
  51807. if (--this._eventsCount === 0)
  51808. this._events = Object.create(null);
  51809. else
  51810. delete events[type];
  51811. }
  51812. return this;
  51813. }
  51814. // emit removeListener for all listeners on all events
  51815. if (arguments.length === 0) {
  51816. var keys = Object.keys(events);
  51817. var key;
  51818. for (i = 0; i < keys.length; ++i) {
  51819. key = keys[i];
  51820. if (key === 'removeListener') continue;
  51821. this.removeAllListeners(key);
  51822. }
  51823. this.removeAllListeners('removeListener');
  51824. this._events = Object.create(null);
  51825. this._eventsCount = 0;
  51826. return this;
  51827. }
  51828. listeners = events[type];
  51829. if (typeof listeners === 'function') {
  51830. this.removeListener(type, listeners);
  51831. } else if (listeners !== undefined) {
  51832. // LIFO order
  51833. for (i = listeners.length - 1; i >= 0; i--) {
  51834. this.removeListener(type, listeners[i]);
  51835. }
  51836. }
  51837. return this;
  51838. };
  51839. function _listeners(target, type, unwrap) {
  51840. var events = target._events;
  51841. if (events === undefined)
  51842. return [];
  51843. var evlistener = events[type];
  51844. if (evlistener === undefined)
  51845. return [];
  51846. if (typeof evlistener === 'function')
  51847. return unwrap ? [evlistener.listener || evlistener] : [evlistener];
  51848. return unwrap ?
  51849. unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
  51850. }
  51851. EventEmitter.prototype.listeners = function listeners(type) {
  51852. return _listeners(this, type, true);
  51853. };
  51854. EventEmitter.prototype.rawListeners = function rawListeners(type) {
  51855. return _listeners(this, type, false);
  51856. };
  51857. EventEmitter.listenerCount = function(emitter, type) {
  51858. if (typeof emitter.listenerCount === 'function') {
  51859. return emitter.listenerCount(type);
  51860. } else {
  51861. return listenerCount.call(emitter, type);
  51862. }
  51863. };
  51864. EventEmitter.prototype.listenerCount = listenerCount;
  51865. function listenerCount(type) {
  51866. var events = this._events;
  51867. if (events !== undefined) {
  51868. var evlistener = events[type];
  51869. if (typeof evlistener === 'function') {
  51870. return 1;
  51871. } else if (evlistener !== undefined) {
  51872. return evlistener.length;
  51873. }
  51874. }
  51875. return 0;
  51876. }
  51877. EventEmitter.prototype.eventNames = function eventNames() {
  51878. return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
  51879. };
  51880. function arrayClone(arr, n) {
  51881. var copy = new Array(n);
  51882. for (var i = 0; i < n; ++i)
  51883. copy[i] = arr[i];
  51884. return copy;
  51885. }
  51886. function spliceOne(list, index) {
  51887. for (; index + 1 < list.length; index++)
  51888. list[index] = list[index + 1];
  51889. list.pop();
  51890. }
  51891. function unwrapListeners(arr) {
  51892. var ret = new Array(arr.length);
  51893. for (var i = 0; i < ret.length; ++i) {
  51894. ret[i] = arr[i].listener || arr[i];
  51895. }
  51896. return ret;
  51897. }
  51898. function once(emitter, name) {
  51899. return new Promise(function (resolve, reject) {
  51900. function errorListener(err) {
  51901. emitter.removeListener(name, resolver);
  51902. reject(err);
  51903. }
  51904. function resolver() {
  51905. if (typeof emitter.removeListener === 'function') {
  51906. emitter.removeListener('error', errorListener);
  51907. }
  51908. resolve([].slice.call(arguments));
  51909. };
  51910. eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
  51911. if (name !== 'error') {
  51912. addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
  51913. }
  51914. });
  51915. }
  51916. function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
  51917. if (typeof emitter.on === 'function') {
  51918. eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
  51919. }
  51920. }
  51921. function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
  51922. if (typeof emitter.on === 'function') {
  51923. if (flags.once) {
  51924. emitter.once(name, listener);
  51925. } else {
  51926. emitter.on(name, listener);
  51927. }
  51928. } else if (typeof emitter.addEventListener === 'function') {
  51929. // EventTarget does not have `error` event semantics like Node
  51930. // EventEmitters, we do not listen for `error` events here.
  51931. emitter.addEventListener(name, function wrapListener(arg) {
  51932. // IE does not have builtin `{ once: true }` support so we
  51933. // have to do it manually.
  51934. if (flags.once) {
  51935. emitter.removeEventListener(name, wrapListener);
  51936. }
  51937. listener(arg);
  51938. });
  51939. } else {
  51940. throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
  51941. }
  51942. }
  51943. /***/ }),
  51944. /***/ 93:
  51945. /*!*****************************************************************************!*\
  51946. !*** ./node_modules/readable-stream/lib/internal/streams/stream-browser.js ***!
  51947. \*****************************************************************************/
  51948. /*! no static exports found */
  51949. /***/ (function(module, exports, __webpack_require__) {
  51950. module.exports = __webpack_require__(/*! events */ 92).EventEmitter;
  51951. /***/ }),
  51952. /***/ 94:
  51953. /*!***********************************************!*\
  51954. !*** ./node_modules/core-util-is/lib/util.js ***!
  51955. \***********************************************/
  51956. /*! no static exports found */
  51957. /***/ (function(module, exports, __webpack_require__) {
  51958. // Copyright Joyent, Inc. and other Node contributors.
  51959. //
  51960. // Permission is hereby granted, free of charge, to any person obtaining a
  51961. // copy of this software and associated documentation files (the
  51962. // "Software"), to deal in the Software without restriction, including
  51963. // without limitation the rights to use, copy, modify, merge, publish,
  51964. // distribute, sublicense, and/or sell copies of the Software, and to permit
  51965. // persons to whom the Software is furnished to do so, subject to the
  51966. // following conditions:
  51967. //
  51968. // The above copyright notice and this permission notice shall be included
  51969. // in all copies or substantial portions of the Software.
  51970. //
  51971. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  51972. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  51973. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  51974. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  51975. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  51976. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  51977. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  51978. // NOTE: These type checking functions intentionally don't use `instanceof`
  51979. // because it is fragile and can be easily faked with `Object.create()`.
  51980. function isArray(arg) {
  51981. if (Array.isArray) {
  51982. return Array.isArray(arg);
  51983. }
  51984. return objectToString(arg) === '[object Array]';
  51985. }
  51986. exports.isArray = isArray;
  51987. function isBoolean(arg) {
  51988. return typeof arg === 'boolean';
  51989. }
  51990. exports.isBoolean = isBoolean;
  51991. function isNull(arg) {
  51992. return arg === null;
  51993. }
  51994. exports.isNull = isNull;
  51995. function isNullOrUndefined(arg) {
  51996. return arg == null;
  51997. }
  51998. exports.isNullOrUndefined = isNullOrUndefined;
  51999. function isNumber(arg) {
  52000. return typeof arg === 'number';
  52001. }
  52002. exports.isNumber = isNumber;
  52003. function isString(arg) {
  52004. return typeof arg === 'string';
  52005. }
  52006. exports.isString = isString;
  52007. function isSymbol(arg) {
  52008. return typeof arg === 'symbol';
  52009. }
  52010. exports.isSymbol = isSymbol;
  52011. function isUndefined(arg) {
  52012. return arg === void 0;
  52013. }
  52014. exports.isUndefined = isUndefined;
  52015. function isRegExp(re) {
  52016. return objectToString(re) === '[object RegExp]';
  52017. }
  52018. exports.isRegExp = isRegExp;
  52019. function isObject(arg) {
  52020. return typeof arg === 'object' && arg !== null;
  52021. }
  52022. exports.isObject = isObject;
  52023. function isDate(d) {
  52024. return objectToString(d) === '[object Date]';
  52025. }
  52026. exports.isDate = isDate;
  52027. function isError(e) {
  52028. return (objectToString(e) === '[object Error]' || e instanceof Error);
  52029. }
  52030. exports.isError = isError;
  52031. function isFunction(arg) {
  52032. return typeof arg === 'function';
  52033. }
  52034. exports.isFunction = isFunction;
  52035. function isPrimitive(arg) {
  52036. return arg === null ||
  52037. typeof arg === 'boolean' ||
  52038. typeof arg === 'number' ||
  52039. typeof arg === 'string' ||
  52040. typeof arg === 'symbol' || // ES6 symbol
  52041. typeof arg === 'undefined';
  52042. }
  52043. exports.isPrimitive = isPrimitive;
  52044. exports.isBuffer = __webpack_require__(/*! buffer */ 81).Buffer.isBuffer;
  52045. function objectToString(o) {
  52046. return Object.prototype.toString.call(o);
  52047. }
  52048. /***/ }),
  52049. /***/ 95:
  52050. /*!**********************!*\
  52051. !*** util (ignored) ***!
  52052. \**********************/
  52053. /*! no static exports found */
  52054. /***/ (function(module, exports) {
  52055. /* (ignored) */
  52056. /***/ }),
  52057. /***/ 96:
  52058. /*!*************************************************************************!*\
  52059. !*** ./node_modules/readable-stream/lib/internal/streams/BufferList.js ***!
  52060. \*************************************************************************/
  52061. /*! no static exports found */
  52062. /***/ (function(module, exports, __webpack_require__) {
  52063. "use strict";
  52064. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  52065. var Buffer = __webpack_require__(/*! safe-buffer */ 80).Buffer;
  52066. var util = __webpack_require__(/*! util */ 97);
  52067. function copyBuffer(src, target, offset) {
  52068. src.copy(target, offset);
  52069. }
  52070. module.exports = function () {
  52071. function BufferList() {
  52072. _classCallCheck(this, BufferList);
  52073. this.head = null;
  52074. this.tail = null;
  52075. this.length = 0;
  52076. }
  52077. BufferList.prototype.push = function push(v) {
  52078. var entry = { data: v, next: null };
  52079. if (this.length > 0) this.tail.next = entry;else this.head = entry;
  52080. this.tail = entry;
  52081. ++this.length;
  52082. };
  52083. BufferList.prototype.unshift = function unshift(v) {
  52084. var entry = { data: v, next: this.head };
  52085. if (this.length === 0) this.tail = entry;
  52086. this.head = entry;
  52087. ++this.length;
  52088. };
  52089. BufferList.prototype.shift = function shift() {
  52090. if (this.length === 0) return;
  52091. var ret = this.head.data;
  52092. if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
  52093. --this.length;
  52094. return ret;
  52095. };
  52096. BufferList.prototype.clear = function clear() {
  52097. this.head = this.tail = null;
  52098. this.length = 0;
  52099. };
  52100. BufferList.prototype.join = function join(s) {
  52101. if (this.length === 0) return '';
  52102. var p = this.head;
  52103. var ret = '' + p.data;
  52104. while (p = p.next) {
  52105. ret += s + p.data;
  52106. }return ret;
  52107. };
  52108. BufferList.prototype.concat = function concat(n) {
  52109. if (this.length === 0) return Buffer.alloc(0);
  52110. if (this.length === 1) return this.head.data;
  52111. var ret = Buffer.allocUnsafe(n >>> 0);
  52112. var p = this.head;
  52113. var i = 0;
  52114. while (p) {
  52115. copyBuffer(p.data, ret, i);
  52116. i += p.data.length;
  52117. p = p.next;
  52118. }
  52119. return ret;
  52120. };
  52121. return BufferList;
  52122. }();
  52123. if (util && util.inspect && util.inspect.custom) {
  52124. module.exports.prototype[util.inspect.custom] = function () {
  52125. var obj = util.inspect({ length: this.length });
  52126. return this.constructor.name + ' ' + obj;
  52127. };
  52128. }
  52129. /***/ }),
  52130. /***/ 97:
  52131. /*!**********************!*\
  52132. !*** util (ignored) ***!
  52133. \**********************/
  52134. /*! no static exports found */
  52135. /***/ (function(module, exports) {
  52136. /* (ignored) */
  52137. /***/ }),
  52138. /***/ 98:
  52139. /*!**********************************************************************!*\
  52140. !*** ./node_modules/readable-stream/lib/internal/streams/destroy.js ***!
  52141. \**********************************************************************/
  52142. /*! no static exports found */
  52143. /***/ (function(module, exports, __webpack_require__) {
  52144. "use strict";
  52145. /*<replacement>*/
  52146. var pna = __webpack_require__(/*! process-nextick-args */ 91);
  52147. /*</replacement>*/
  52148. // undocumented cb() API, needed for core, not for public API
  52149. function destroy(err, cb) {
  52150. var _this = this;
  52151. var readableDestroyed = this._readableState && this._readableState.destroyed;
  52152. var writableDestroyed = this._writableState && this._writableState.destroyed;
  52153. if (readableDestroyed || writableDestroyed) {
  52154. if (cb) {
  52155. cb(err);
  52156. } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
  52157. pna.nextTick(emitErrorNT, this, err);
  52158. }
  52159. return this;
  52160. }
  52161. // we set destroyed to true before firing error callbacks in order
  52162. // to make it re-entrance safe in case destroy() is called within callbacks
  52163. if (this._readableState) {
  52164. this._readableState.destroyed = true;
  52165. }
  52166. // if this is a duplex stream mark the writable part as destroyed as well
  52167. if (this._writableState) {
  52168. this._writableState.destroyed = true;
  52169. }
  52170. this._destroy(err || null, function (err) {
  52171. if (!cb && err) {
  52172. pna.nextTick(emitErrorNT, _this, err);
  52173. if (_this._writableState) {
  52174. _this._writableState.errorEmitted = true;
  52175. }
  52176. } else if (cb) {
  52177. cb(err);
  52178. }
  52179. });
  52180. return this;
  52181. }
  52182. function undestroy() {
  52183. if (this._readableState) {
  52184. this._readableState.destroyed = false;
  52185. this._readableState.reading = false;
  52186. this._readableState.ended = false;
  52187. this._readableState.endEmitted = false;
  52188. }
  52189. if (this._writableState) {
  52190. this._writableState.destroyed = false;
  52191. this._writableState.ended = false;
  52192. this._writableState.ending = false;
  52193. this._writableState.finished = false;
  52194. this._writableState.errorEmitted = false;
  52195. }
  52196. }
  52197. function emitErrorNT(self, err) {
  52198. self.emit('error', err);
  52199. }
  52200. module.exports = {
  52201. destroy: destroy,
  52202. undestroy: undestroy
  52203. };
  52204. /***/ }),
  52205. /***/ 99:
  52206. /*!************************************************************!*\
  52207. !*** ./node_modules/readable-stream/lib/_stream_duplex.js ***!
  52208. \************************************************************/
  52209. /*! no static exports found */
  52210. /***/ (function(module, exports, __webpack_require__) {
  52211. "use strict";
  52212. // Copyright Joyent, Inc. and other Node contributors.
  52213. //
  52214. // Permission is hereby granted, free of charge, to any person obtaining a
  52215. // copy of this software and associated documentation files (the
  52216. // "Software"), to deal in the Software without restriction, including
  52217. // without limitation the rights to use, copy, modify, merge, publish,
  52218. // distribute, sublicense, and/or sell copies of the Software, and to permit
  52219. // persons to whom the Software is furnished to do so, subject to the
  52220. // following conditions:
  52221. //
  52222. // The above copyright notice and this permission notice shall be included
  52223. // in all copies or substantial portions of the Software.
  52224. //
  52225. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  52226. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  52227. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  52228. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  52229. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  52230. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  52231. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  52232. // a duplex stream is just a stream that is both readable and writable.
  52233. // Since JS doesn't have multiple prototypal inheritance, this class
  52234. // prototypally inherits from Readable, and then parasitically from
  52235. // Writable.
  52236. /*<replacement>*/
  52237. var pna = __webpack_require__(/*! process-nextick-args */ 91);
  52238. /*</replacement>*/
  52239. /*<replacement>*/
  52240. var objectKeys = Object.keys || function (obj) {
  52241. var keys = [];
  52242. for (var key in obj) {
  52243. keys.push(key);
  52244. }return keys;
  52245. };
  52246. /*</replacement>*/
  52247. module.exports = Duplex;
  52248. /*<replacement>*/
  52249. var util = Object.create(__webpack_require__(/*! core-util-is */ 94));
  52250. util.inherits = __webpack_require__(/*! inherits */ 86);
  52251. /*</replacement>*/
  52252. var Readable = __webpack_require__(/*! ./_stream_readable */ 90);
  52253. var Writable = __webpack_require__(/*! ./_stream_writable */ 100);
  52254. util.inherits(Duplex, Readable);
  52255. {
  52256. // avoid scope creep, the keys array can then be collected
  52257. var keys = objectKeys(Writable.prototype);
  52258. for (var v = 0; v < keys.length; v++) {
  52259. var method = keys[v];
  52260. if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
  52261. }
  52262. }
  52263. function Duplex(options) {
  52264. if (!(this instanceof Duplex)) return new Duplex(options);
  52265. Readable.call(this, options);
  52266. Writable.call(this, options);
  52267. if (options && options.readable === false) this.readable = false;
  52268. if (options && options.writable === false) this.writable = false;
  52269. this.allowHalfOpen = true;
  52270. if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
  52271. this.once('end', onend);
  52272. }
  52273. Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
  52274. // making it explicit this property is not enumerable
  52275. // because otherwise some prototype manipulation in
  52276. // userland will fail
  52277. enumerable: false,
  52278. get: function () {
  52279. return this._writableState.highWaterMark;
  52280. }
  52281. });
  52282. // the no-half-open enforcer
  52283. function onend() {
  52284. // if we allow half-open state, or if the writable side ended,
  52285. // then we're ok.
  52286. if (this.allowHalfOpen || this._writableState.ended) return;
  52287. // no more data can be written.
  52288. // But allow more writes to happen in this tick.
  52289. pna.nextTick(onEndNT, this);
  52290. }
  52291. function onEndNT(self) {
  52292. self.end();
  52293. }
  52294. Object.defineProperty(Duplex.prototype, 'destroyed', {
  52295. get: function () {
  52296. if (this._readableState === undefined || this._writableState === undefined) {
  52297. return false;
  52298. }
  52299. return this._readableState.destroyed && this._writableState.destroyed;
  52300. },
  52301. set: function (value) {
  52302. // we ignore the value if the stream
  52303. // has not been initialized yet
  52304. if (this._readableState === undefined || this._writableState === undefined) {
  52305. return;
  52306. }
  52307. // backward compatibility, the user is explicitly
  52308. // managing destroyed
  52309. this._readableState.destroyed = value;
  52310. this._writableState.destroyed = value;
  52311. }
  52312. });
  52313. Duplex.prototype._destroy = function (err, cb) {
  52314. this.push(null);
  52315. this.end();
  52316. pna.nextTick(cb, err);
  52317. };
  52318. /***/ })
  52319. }]);
  52320. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map