vendor.js 1.1 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.createPlugin = createPlugin;exports.createSubpackageApp = createSubpackageApp;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}
  10. var _toString = Object.prototype.toString;
  11. var hasOwnProperty = Object.prototype.hasOwnProperty;
  12. function isFn(fn) {
  13. return typeof fn === 'function';
  14. }
  15. function isStr(str) {
  16. return typeof str === 'string';
  17. }
  18. function isPlainObject(obj) {
  19. return _toString.call(obj) === '[object Object]';
  20. }
  21. function hasOwn(obj, key) {
  22. return hasOwnProperty.call(obj, key);
  23. }
  24. function noop() {}
  25. /**
  26. * Create a cached version of a pure function.
  27. */
  28. function cached(fn) {
  29. var cache = Object.create(null);
  30. return function cachedFn(str) {
  31. var hit = cache[str];
  32. return hit || (cache[str] = fn(str));
  33. };
  34. }
  35. /**
  36. * Camelize a hyphen-delimited string.
  37. */
  38. var camelizeRE = /-(\w)/g;
  39. var camelize = cached(function (str) {
  40. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  41. });
  42. var HOOKS = [
  43. 'invoke',
  44. 'success',
  45. 'fail',
  46. 'complete',
  47. 'returnValue'];
  48. var globalInterceptors = {};
  49. var scopedInterceptors = {};
  50. function mergeHook(parentVal, childVal) {
  51. var res = childVal ?
  52. parentVal ?
  53. parentVal.concat(childVal) :
  54. Array.isArray(childVal) ?
  55. childVal : [childVal] :
  56. parentVal;
  57. return res ?
  58. dedupeHooks(res) :
  59. res;
  60. }
  61. function dedupeHooks(hooks) {
  62. var res = [];
  63. for (var i = 0; i < hooks.length; i++) {
  64. if (res.indexOf(hooks[i]) === -1) {
  65. res.push(hooks[i]);
  66. }
  67. }
  68. return res;
  69. }
  70. function removeHook(hooks, hook) {
  71. var index = hooks.indexOf(hook);
  72. if (index !== -1) {
  73. hooks.splice(index, 1);
  74. }
  75. }
  76. function mergeInterceptorHook(interceptor, option) {
  77. Object.keys(option).forEach(function (hook) {
  78. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  79. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  80. }
  81. });
  82. }
  83. function removeInterceptorHook(interceptor, option) {
  84. if (!interceptor || !option) {
  85. return;
  86. }
  87. Object.keys(option).forEach(function (hook) {
  88. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  89. removeHook(interceptor[hook], option[hook]);
  90. }
  91. });
  92. }
  93. function addInterceptor(method, option) {
  94. if (typeof method === 'string' && isPlainObject(option)) {
  95. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  96. } else if (isPlainObject(method)) {
  97. mergeInterceptorHook(globalInterceptors, method);
  98. }
  99. }
  100. function removeInterceptor(method, option) {
  101. if (typeof method === 'string') {
  102. if (isPlainObject(option)) {
  103. removeInterceptorHook(scopedInterceptors[method], option);
  104. } else {
  105. delete scopedInterceptors[method];
  106. }
  107. } else if (isPlainObject(method)) {
  108. removeInterceptorHook(globalInterceptors, method);
  109. }
  110. }
  111. function wrapperHook(hook) {
  112. return function (data) {
  113. return hook(data) || data;
  114. };
  115. }
  116. function isPromise(obj) {
  117. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  118. }
  119. function queue(hooks, data) {
  120. var promise = false;
  121. for (var i = 0; i < hooks.length; i++) {
  122. var hook = hooks[i];
  123. if (promise) {
  124. promise = Promise.resolve(wrapperHook(hook));
  125. } else {
  126. var res = hook(data);
  127. if (isPromise(res)) {
  128. promise = Promise.resolve(res);
  129. }
  130. if (res === false) {
  131. return {
  132. then: function then() {} };
  133. }
  134. }
  135. }
  136. return promise || {
  137. then: function then(callback) {
  138. return callback(data);
  139. } };
  140. }
  141. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  142. ['success', 'fail', 'complete'].forEach(function (name) {
  143. if (Array.isArray(interceptor[name])) {
  144. var oldCallback = options[name];
  145. options[name] = function callbackInterceptor(res) {
  146. queue(interceptor[name], res).then(function (res) {
  147. /* eslint-disable no-mixed-operators */
  148. return isFn(oldCallback) && oldCallback(res) || res;
  149. });
  150. };
  151. }
  152. });
  153. return options;
  154. }
  155. function wrapperReturnValue(method, returnValue) {
  156. var returnValueHooks = [];
  157. if (Array.isArray(globalInterceptors.returnValue)) {
  158. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  159. }
  160. var interceptor = scopedInterceptors[method];
  161. if (interceptor && Array.isArray(interceptor.returnValue)) {
  162. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  163. }
  164. returnValueHooks.forEach(function (hook) {
  165. returnValue = hook(returnValue) || returnValue;
  166. });
  167. return returnValue;
  168. }
  169. function getApiInterceptorHooks(method) {
  170. var interceptor = Object.create(null);
  171. Object.keys(globalInterceptors).forEach(function (hook) {
  172. if (hook !== 'returnValue') {
  173. interceptor[hook] = globalInterceptors[hook].slice();
  174. }
  175. });
  176. var scopedInterceptor = scopedInterceptors[method];
  177. if (scopedInterceptor) {
  178. Object.keys(scopedInterceptor).forEach(function (hook) {
  179. if (hook !== 'returnValue') {
  180. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  181. }
  182. });
  183. }
  184. return interceptor;
  185. }
  186. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  187. var interceptor = getApiInterceptorHooks(method);
  188. if (interceptor && Object.keys(interceptor).length) {
  189. if (Array.isArray(interceptor.invoke)) {
  190. var res = queue(interceptor.invoke, options);
  191. return res.then(function (options) {
  192. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  193. });
  194. } else {
  195. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  196. }
  197. }
  198. return api.apply(void 0, [options].concat(params));
  199. }
  200. var promiseInterceptor = {
  201. returnValue: function returnValue(res) {
  202. if (!isPromise(res)) {
  203. return res;
  204. }
  205. return res.then(function (res) {
  206. return res[1];
  207. }).catch(function (res) {
  208. return res[0];
  209. });
  210. } };
  211. var SYNC_API_RE =
  212. /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/;
  213. var CONTEXT_API_RE = /^create|Manager$/;
  214. // Context例外情况
  215. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  216. // 同步例外情况
  217. var ASYNC_API = ['createBLEConnection'];
  218. var CALLBACK_API_RE = /^on|^off/;
  219. function isContextApi(name) {
  220. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  221. }
  222. function isSyncApi(name) {
  223. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  224. }
  225. function isCallbackApi(name) {
  226. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  227. }
  228. function handlePromise(promise) {
  229. return promise.then(function (data) {
  230. return [null, data];
  231. }).
  232. catch(function (err) {return [err];});
  233. }
  234. function shouldPromise(name) {
  235. if (
  236. isContextApi(name) ||
  237. isSyncApi(name) ||
  238. isCallbackApi(name))
  239. {
  240. return false;
  241. }
  242. return true;
  243. }
  244. /* eslint-disable no-extend-native */
  245. if (!Promise.prototype.finally) {
  246. Promise.prototype.finally = function (callback) {
  247. var promise = this.constructor;
  248. return this.then(
  249. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  250. function (reason) {return promise.resolve(callback()).then(function () {
  251. throw reason;
  252. });});
  253. };
  254. }
  255. function promisify(name, api) {
  256. if (!shouldPromise(name)) {
  257. return api;
  258. }
  259. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  260. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  261. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  262. }
  263. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  264. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  265. success: resolve,
  266. fail: reject })].concat(
  267. params));
  268. })));
  269. };
  270. }
  271. var EPS = 1e-4;
  272. var BASE_DEVICE_WIDTH = 750;
  273. var isIOS = false;
  274. var deviceWidth = 0;
  275. var deviceDPR = 0;
  276. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  277. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  278. deviceWidth = windowWidth;
  279. deviceDPR = pixelRatio;
  280. isIOS = platform === 'ios';
  281. }
  282. function upx2px(number, newDeviceWidth) {
  283. if (deviceWidth === 0) {
  284. checkDeviceWidth();
  285. }
  286. number = Number(number);
  287. if (number === 0) {
  288. return 0;
  289. }
  290. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  291. if (result < 0) {
  292. result = -result;
  293. }
  294. result = Math.floor(result + EPS);
  295. if (result === 0) {
  296. if (deviceDPR === 1 || !isIOS) {
  297. result = 1;
  298. } else {
  299. result = 0.5;
  300. }
  301. }
  302. return number < 0 ? -result : result;
  303. }
  304. var interceptors = {
  305. promiseInterceptor: promiseInterceptor };
  306. var baseApi = /*#__PURE__*/Object.freeze({
  307. __proto__: null,
  308. upx2px: upx2px,
  309. addInterceptor: addInterceptor,
  310. removeInterceptor: removeInterceptor,
  311. interceptors: interceptors });
  312. function findExistsPageIndex(url) {
  313. var pages = getCurrentPages();
  314. var len = pages.length;
  315. while (len--) {
  316. var page = pages[len];
  317. if (page.$page && page.$page.fullPath === url) {
  318. return len;
  319. }
  320. }
  321. return -1;
  322. }
  323. var redirectTo = {
  324. name: function name(fromArgs) {
  325. if (fromArgs.exists === 'back' && fromArgs.delta) {
  326. return 'navigateBack';
  327. }
  328. return 'redirectTo';
  329. },
  330. args: function args(fromArgs) {
  331. if (fromArgs.exists === 'back' && fromArgs.url) {
  332. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  333. if (existsPageIndex !== -1) {
  334. var delta = getCurrentPages().length - 1 - existsPageIndex;
  335. if (delta > 0) {
  336. fromArgs.delta = delta;
  337. }
  338. }
  339. }
  340. } };
  341. var previewImage = {
  342. args: function args(fromArgs) {
  343. var currentIndex = parseInt(fromArgs.current);
  344. if (isNaN(currentIndex)) {
  345. return;
  346. }
  347. var urls = fromArgs.urls;
  348. if (!Array.isArray(urls)) {
  349. return;
  350. }
  351. var len = urls.length;
  352. if (!len) {
  353. return;
  354. }
  355. if (currentIndex < 0) {
  356. currentIndex = 0;
  357. } else if (currentIndex >= len) {
  358. currentIndex = len - 1;
  359. }
  360. if (currentIndex > 0) {
  361. fromArgs.current = urls[currentIndex];
  362. fromArgs.urls = urls.filter(
  363. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  364. } else {
  365. fromArgs.current = urls[0];
  366. }
  367. return {
  368. indicator: false,
  369. loop: false };
  370. } };
  371. var UUID_KEY = '__DC_STAT_UUID';
  372. var deviceId;
  373. function addUuid(result) {
  374. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  375. if (!deviceId) {
  376. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  377. wx.setStorage({
  378. key: UUID_KEY,
  379. data: deviceId });
  380. }
  381. result.deviceId = deviceId;
  382. }
  383. function addSafeAreaInsets(result) {
  384. if (result.safeArea) {
  385. var safeArea = result.safeArea;
  386. result.safeAreaInsets = {
  387. top: safeArea.top,
  388. left: safeArea.left,
  389. right: result.windowWidth - safeArea.right,
  390. bottom: result.windowHeight - safeArea.bottom };
  391. }
  392. }
  393. var getSystemInfo = {
  394. returnValue: function returnValue(result) {
  395. addUuid(result);
  396. addSafeAreaInsets(result);
  397. } };
  398. // import navigateTo from 'uni-helpers/navigate-to'
  399. var protocols = {
  400. redirectTo: redirectTo,
  401. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  402. previewImage: previewImage,
  403. getSystemInfo: getSystemInfo,
  404. getSystemInfoSync: getSystemInfo };
  405. var todos = [
  406. 'vibrate',
  407. 'preloadPage',
  408. 'unPreloadPage',
  409. 'loadSubPackage'];
  410. var canIUses = [];
  411. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  412. function processCallback(methodName, method, returnValue) {
  413. return function (res) {
  414. return method(processReturnValue(methodName, res, returnValue));
  415. };
  416. }
  417. function processArgs(methodName, fromArgs) {var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  418. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  419. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  420. if (isFn(argsOption)) {
  421. argsOption = argsOption(fromArgs, toArgs) || {};
  422. }
  423. for (var key in fromArgs) {
  424. if (hasOwn(argsOption, key)) {
  425. var keyOption = argsOption[key];
  426. if (isFn(keyOption)) {
  427. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  428. }
  429. if (!keyOption) {// 不支持的参数
  430. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  431. } else if (isStr(keyOption)) {// 重写参数 key
  432. toArgs[keyOption] = fromArgs[key];
  433. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  434. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  435. }
  436. } else if (CALLBACKS.indexOf(key) !== -1) {
  437. if (isFn(fromArgs[key])) {
  438. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  439. }
  440. } else {
  441. if (!keepFromArgs) {
  442. toArgs[key] = fromArgs[key];
  443. }
  444. }
  445. }
  446. return toArgs;
  447. } else if (isFn(fromArgs)) {
  448. fromArgs = processCallback(methodName, fromArgs, returnValue);
  449. }
  450. return fromArgs;
  451. }
  452. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  453. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  454. res = protocols.returnValue(methodName, res);
  455. }
  456. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  457. }
  458. function wrapper(methodName, method) {
  459. if (hasOwn(protocols, methodName)) {
  460. var protocol = protocols[methodName];
  461. if (!protocol) {// 暂不支持的 api
  462. return function () {
  463. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  464. };
  465. }
  466. return function (arg1, arg2) {// 目前 api 最多两个参数
  467. var options = protocol;
  468. if (isFn(protocol)) {
  469. options = protocol(arg1);
  470. }
  471. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  472. var args = [arg1];
  473. if (typeof arg2 !== 'undefined') {
  474. args.push(arg2);
  475. }
  476. if (isFn(options.name)) {
  477. methodName = options.name(arg1);
  478. } else if (isStr(options.name)) {
  479. methodName = options.name;
  480. }
  481. var returnValue = wx[methodName].apply(wx, args);
  482. if (isSyncApi(methodName)) {// 同步 api
  483. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  484. }
  485. return returnValue;
  486. };
  487. }
  488. return method;
  489. }
  490. var todoApis = Object.create(null);
  491. var TODOS = [
  492. 'onTabBarMidButtonTap',
  493. 'subscribePush',
  494. 'unsubscribePush',
  495. 'onPush',
  496. 'offPush',
  497. 'share'];
  498. function createTodoApi(name) {
  499. return function todoApi(_ref)
  500. {var fail = _ref.fail,complete = _ref.complete;
  501. var res = {
  502. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported") };
  503. isFn(fail) && fail(res);
  504. isFn(complete) && complete(res);
  505. };
  506. }
  507. TODOS.forEach(function (name) {
  508. todoApis[name] = createTodoApi(name);
  509. });
  510. var providers = {
  511. oauth: ['weixin'],
  512. share: ['weixin'],
  513. payment: ['wxpay'],
  514. push: ['weixin'] };
  515. function getProvider(_ref2)
  516. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  517. var res = false;
  518. if (providers[service]) {
  519. res = {
  520. errMsg: 'getProvider:ok',
  521. service: service,
  522. provider: providers[service] };
  523. isFn(success) && success(res);
  524. } else {
  525. res = {
  526. errMsg: 'getProvider:fail service not found' };
  527. isFn(fail) && fail(res);
  528. }
  529. isFn(complete) && complete(res);
  530. }
  531. var extraApi = /*#__PURE__*/Object.freeze({
  532. __proto__: null,
  533. getProvider: getProvider });
  534. var getEmitter = function () {
  535. var Emitter;
  536. return function getUniEmitter() {
  537. if (!Emitter) {
  538. Emitter = new _vue.default();
  539. }
  540. return Emitter;
  541. };
  542. }();
  543. function apply(ctx, method, args) {
  544. return ctx[method].apply(ctx, args);
  545. }
  546. function $on() {
  547. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  548. }
  549. function $off() {
  550. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  551. }
  552. function $once() {
  553. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  554. }
  555. function $emit() {
  556. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  557. }
  558. var eventApi = /*#__PURE__*/Object.freeze({
  559. __proto__: null,
  560. $on: $on,
  561. $off: $off,
  562. $once: $once,
  563. $emit: $emit });
  564. var api = /*#__PURE__*/Object.freeze({
  565. __proto__: null });
  566. var MPPage = Page;
  567. var MPComponent = Component;
  568. var customizeRE = /:/g;
  569. var customize = cached(function (str) {
  570. return camelize(str.replace(customizeRE, '-'));
  571. });
  572. function initTriggerEvent(mpInstance) {
  573. {
  574. if (!wx.canIUse || !wx.canIUse('nextTick')) {
  575. return;
  576. }
  577. }
  578. var oldTriggerEvent = mpInstance.triggerEvent;
  579. mpInstance.triggerEvent = function (event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  580. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  581. };
  582. }
  583. function initHook(name, options) {
  584. var oldHook = options[name];
  585. if (!oldHook) {
  586. options[name] = function () {
  587. initTriggerEvent(this);
  588. };
  589. } else {
  590. options[name] = function () {
  591. initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
  592. return oldHook.apply(this, args);
  593. };
  594. }
  595. }
  596. if (!MPPage.__$wrappered) {
  597. MPPage.__$wrappered = true;
  598. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  599. initHook('onLoad', options);
  600. return MPPage(options);
  601. };
  602. Page.after = MPPage.after;
  603. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  604. initHook('created', options);
  605. return MPComponent(options);
  606. };
  607. }
  608. var PAGE_EVENT_HOOKS = [
  609. 'onPullDownRefresh',
  610. 'onReachBottom',
  611. 'onAddToFavorites',
  612. 'onShareTimeline',
  613. 'onShareAppMessage',
  614. 'onPageScroll',
  615. 'onResize',
  616. 'onTabItemTap'];
  617. function initMocks(vm, mocks) {
  618. var mpInstance = vm.$mp[vm.mpType];
  619. mocks.forEach(function (mock) {
  620. if (hasOwn(mpInstance, mock)) {
  621. vm[mock] = mpInstance[mock];
  622. }
  623. });
  624. }
  625. function hasHook(hook, vueOptions) {
  626. if (!vueOptions) {
  627. return true;
  628. }
  629. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  630. return true;
  631. }
  632. vueOptions = vueOptions.default || vueOptions;
  633. if (isFn(vueOptions)) {
  634. if (isFn(vueOptions.extendOptions[hook])) {
  635. return true;
  636. }
  637. if (vueOptions.super &&
  638. vueOptions.super.options &&
  639. Array.isArray(vueOptions.super.options[hook])) {
  640. return true;
  641. }
  642. return false;
  643. }
  644. if (isFn(vueOptions[hook])) {
  645. return true;
  646. }
  647. var mixins = vueOptions.mixins;
  648. if (Array.isArray(mixins)) {
  649. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  650. }
  651. }
  652. function initHooks(mpOptions, hooks, vueOptions) {
  653. hooks.forEach(function (hook) {
  654. if (hasHook(hook, vueOptions)) {
  655. mpOptions[hook] = function (args) {
  656. return this.$vm && this.$vm.__call_hook(hook, args);
  657. };
  658. }
  659. });
  660. }
  661. function initVueComponent(Vue, vueOptions) {
  662. vueOptions = vueOptions.default || vueOptions;
  663. var VueComponent;
  664. if (isFn(vueOptions)) {
  665. VueComponent = vueOptions;
  666. } else {
  667. VueComponent = Vue.extend(vueOptions);
  668. }
  669. vueOptions = VueComponent.options;
  670. return [VueComponent, vueOptions];
  671. }
  672. function initSlots(vm, vueSlots) {
  673. if (Array.isArray(vueSlots) && vueSlots.length) {
  674. var $slots = Object.create(null);
  675. vueSlots.forEach(function (slotName) {
  676. $slots[slotName] = true;
  677. });
  678. vm.$scopedSlots = vm.$slots = $slots;
  679. }
  680. }
  681. function initVueIds(vueIds, mpInstance) {
  682. vueIds = (vueIds || '').split(',');
  683. var len = vueIds.length;
  684. if (len === 1) {
  685. mpInstance._$vueId = vueIds[0];
  686. } else if (len === 2) {
  687. mpInstance._$vueId = vueIds[0];
  688. mpInstance._$vuePid = vueIds[1];
  689. }
  690. }
  691. function initData(vueOptions, context) {
  692. var data = vueOptions.data || {};
  693. var methods = vueOptions.methods || {};
  694. if (typeof data === 'function') {
  695. try {
  696. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  697. } catch (e) {
  698. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"麻醉平台","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  699. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  700. }
  701. }
  702. } else {
  703. try {
  704. // 对 data 格式化
  705. data = JSON.parse(JSON.stringify(data));
  706. } catch (e) {}
  707. }
  708. if (!isPlainObject(data)) {
  709. data = {};
  710. }
  711. Object.keys(methods).forEach(function (methodName) {
  712. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  713. data[methodName] = methods[methodName];
  714. }
  715. });
  716. return data;
  717. }
  718. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  719. function createObserver(name) {
  720. return function observer(newVal, oldVal) {
  721. if (this.$vm) {
  722. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  723. }
  724. };
  725. }
  726. function initBehaviors(vueOptions, initBehavior) {
  727. var vueBehaviors = vueOptions.behaviors;
  728. var vueExtends = vueOptions.extends;
  729. var vueMixins = vueOptions.mixins;
  730. var vueProps = vueOptions.props;
  731. if (!vueProps) {
  732. vueOptions.props = vueProps = [];
  733. }
  734. var behaviors = [];
  735. if (Array.isArray(vueBehaviors)) {
  736. vueBehaviors.forEach(function (behavior) {
  737. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  738. if (behavior === 'uni://form-field') {
  739. if (Array.isArray(vueProps)) {
  740. vueProps.push('name');
  741. vueProps.push('value');
  742. } else {
  743. vueProps.name = {
  744. type: String,
  745. default: '' };
  746. vueProps.value = {
  747. type: [String, Number, Boolean, Array, Object, Date],
  748. default: '' };
  749. }
  750. }
  751. });
  752. }
  753. if (isPlainObject(vueExtends) && vueExtends.props) {
  754. behaviors.push(
  755. initBehavior({
  756. properties: initProperties(vueExtends.props, true) }));
  757. }
  758. if (Array.isArray(vueMixins)) {
  759. vueMixins.forEach(function (vueMixin) {
  760. if (isPlainObject(vueMixin) && vueMixin.props) {
  761. behaviors.push(
  762. initBehavior({
  763. properties: initProperties(vueMixin.props, true) }));
  764. }
  765. });
  766. }
  767. return behaviors;
  768. }
  769. function parsePropType(key, type, defaultValue, file) {
  770. // [String]=>String
  771. if (Array.isArray(type) && type.length === 1) {
  772. return type[0];
  773. }
  774. return type;
  775. }
  776. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  777. var properties = {};
  778. if (!isBehavior) {
  779. properties.vueId = {
  780. type: String,
  781. value: '' };
  782. // 用于字节跳动小程序模拟抽象节点
  783. properties.generic = {
  784. type: Object,
  785. value: null };
  786. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  787. type: null,
  788. value: [],
  789. observer: function observer(newVal, oldVal) {
  790. var $slots = Object.create(null);
  791. newVal.forEach(function (slotName) {
  792. $slots[slotName] = true;
  793. });
  794. this.setData({
  795. $slots: $slots });
  796. } };
  797. }
  798. if (Array.isArray(props)) {// ['title']
  799. props.forEach(function (key) {
  800. properties[key] = {
  801. type: null,
  802. observer: createObserver(key) };
  803. });
  804. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  805. Object.keys(props).forEach(function (key) {
  806. var opts = props[key];
  807. if (isPlainObject(opts)) {// title:{type:String,default:''}
  808. var value = opts.default;
  809. if (isFn(value)) {
  810. value = value();
  811. }
  812. opts.type = parsePropType(key, opts.type);
  813. properties[key] = {
  814. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  815. value: value,
  816. observer: createObserver(key) };
  817. } else {// content:String
  818. var type = parsePropType(key, opts);
  819. properties[key] = {
  820. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  821. observer: createObserver(key) };
  822. }
  823. });
  824. }
  825. return properties;
  826. }
  827. function wrapper$1(event) {
  828. // TODO 又得兼容 mpvue 的 mp 对象
  829. try {
  830. event.mp = JSON.parse(JSON.stringify(event));
  831. } catch (e) {}
  832. event.stopPropagation = noop;
  833. event.preventDefault = noop;
  834. event.target = event.target || {};
  835. if (!hasOwn(event, 'detail')) {
  836. event.detail = {};
  837. }
  838. if (hasOwn(event, 'markerId')) {
  839. event.detail = typeof event.detail === 'object' ? event.detail : {};
  840. event.detail.markerId = event.markerId;
  841. }
  842. if (isPlainObject(event.detail)) {
  843. event.target = Object.assign({}, event.target, event.detail);
  844. }
  845. return event;
  846. }
  847. function getExtraValue(vm, dataPathsArray) {
  848. var context = vm;
  849. dataPathsArray.forEach(function (dataPathArray) {
  850. var dataPath = dataPathArray[0];
  851. var value = dataPathArray[2];
  852. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  853. var propPath = dataPathArray[1];
  854. var valuePath = dataPathArray[3];
  855. var vFor;
  856. if (Number.isInteger(dataPath)) {
  857. vFor = dataPath;
  858. } else if (!dataPath) {
  859. vFor = context;
  860. } else if (typeof dataPath === 'string' && dataPath) {
  861. if (dataPath.indexOf('#s#') === 0) {
  862. vFor = dataPath.substr(3);
  863. } else {
  864. vFor = vm.__get_value(dataPath, context);
  865. }
  866. }
  867. if (Number.isInteger(vFor)) {
  868. context = value;
  869. } else if (!propPath) {
  870. context = vFor[value];
  871. } else {
  872. if (Array.isArray(vFor)) {
  873. context = vFor.find(function (vForItem) {
  874. return vm.__get_value(propPath, vForItem) === value;
  875. });
  876. } else if (isPlainObject(vFor)) {
  877. context = Object.keys(vFor).find(function (vForKey) {
  878. return vm.__get_value(propPath, vFor[vForKey]) === value;
  879. });
  880. } else {
  881. console.error('v-for 暂不支持循环数据:', vFor);
  882. }
  883. }
  884. if (valuePath) {
  885. context = vm.__get_value(valuePath, context);
  886. }
  887. }
  888. });
  889. return context;
  890. }
  891. function processEventExtra(vm, extra, event) {
  892. var extraObj = {};
  893. if (Array.isArray(extra) && extra.length) {
  894. /**
  895. *[
  896. * ['data.items', 'data.id', item.data.id],
  897. * ['metas', 'id', meta.id]
  898. *],
  899. *[
  900. * ['data.items', 'data.id', item.data.id],
  901. * ['metas', 'id', meta.id]
  902. *],
  903. *'test'
  904. */
  905. extra.forEach(function (dataPath, index) {
  906. if (typeof dataPath === 'string') {
  907. if (!dataPath) {// model,prop.sync
  908. extraObj['$' + index] = vm;
  909. } else {
  910. if (dataPath === '$event') {// $event
  911. extraObj['$' + index] = event;
  912. } else if (dataPath === 'arguments') {
  913. if (event.detail && event.detail.__args__) {
  914. extraObj['$' + index] = event.detail.__args__;
  915. } else {
  916. extraObj['$' + index] = [event];
  917. }
  918. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  919. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  920. } else {
  921. extraObj['$' + index] = vm.__get_value(dataPath);
  922. }
  923. }
  924. } else {
  925. extraObj['$' + index] = getExtraValue(vm, dataPath);
  926. }
  927. });
  928. }
  929. return extraObj;
  930. }
  931. function getObjByArray(arr) {
  932. var obj = {};
  933. for (var i = 1; i < arr.length; i++) {
  934. var element = arr[i];
  935. obj[element[0]] = element[1];
  936. }
  937. return obj;
  938. }
  939. function processEventArgs(vm, event) {var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];var isCustom = arguments.length > 4 ? arguments[4] : undefined;var methodName = arguments.length > 5 ? arguments[5] : undefined;
  940. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  941. if (isCustom) {// 自定义事件
  942. isCustomMPEvent = event.currentTarget &&
  943. event.currentTarget.dataset &&
  944. event.currentTarget.dataset.comType === 'wx';
  945. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  946. if (isCustomMPEvent) {
  947. return [event];
  948. }
  949. return event.detail.__args__ || event.detail;
  950. }
  951. }
  952. var extraObj = processEventExtra(vm, extra, event);
  953. var ret = [];
  954. args.forEach(function (arg) {
  955. if (arg === '$event') {
  956. if (methodName === '__set_model' && !isCustom) {// input v-model value
  957. ret.push(event.target.value);
  958. } else {
  959. if (isCustom && !isCustomMPEvent) {
  960. ret.push(event.detail.__args__[0]);
  961. } else {// wxcomponent 组件或内置组件
  962. ret.push(event);
  963. }
  964. }
  965. } else {
  966. if (Array.isArray(arg) && arg[0] === 'o') {
  967. ret.push(getObjByArray(arg));
  968. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  969. ret.push(extraObj[arg]);
  970. } else {
  971. ret.push(arg);
  972. }
  973. }
  974. });
  975. return ret;
  976. }
  977. var ONCE = '~';
  978. var CUSTOM = '^';
  979. function isMatchEventType(eventType, optType) {
  980. return eventType === optType ||
  981. optType === 'regionchange' && (
  982. eventType === 'begin' ||
  983. eventType === 'end');
  984. }
  985. function getContextVm(vm) {
  986. var $parent = vm.$parent;
  987. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  988. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  989. $parent = $parent.$parent;
  990. }
  991. return $parent && $parent.$parent;
  992. }
  993. function handleEvent(event) {var _this = this;
  994. event = wrapper$1(event);
  995. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  996. var dataset = (event.currentTarget || event.target).dataset;
  997. if (!dataset) {
  998. return console.warn('事件信息不存在');
  999. }
  1000. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1001. if (!eventOpts) {
  1002. return console.warn('事件信息不存在');
  1003. }
  1004. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1005. var eventType = event.type;
  1006. var ret = [];
  1007. eventOpts.forEach(function (eventOpt) {
  1008. var type = eventOpt[0];
  1009. var eventsArray = eventOpt[1];
  1010. var isCustom = type.charAt(0) === CUSTOM;
  1011. type = isCustom ? type.slice(1) : type;
  1012. var isOnce = type.charAt(0) === ONCE;
  1013. type = isOnce ? type.slice(1) : type;
  1014. if (eventsArray && isMatchEventType(eventType, type)) {
  1015. eventsArray.forEach(function (eventArray) {
  1016. var methodName = eventArray[0];
  1017. if (methodName) {
  1018. var handlerCtx = _this.$vm;
  1019. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1020. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1021. }
  1022. if (methodName === '$emit') {
  1023. handlerCtx.$emit.apply(handlerCtx,
  1024. processEventArgs(
  1025. _this.$vm,
  1026. event,
  1027. eventArray[1],
  1028. eventArray[2],
  1029. isCustom,
  1030. methodName));
  1031. return;
  1032. }
  1033. var handler = handlerCtx[methodName];
  1034. if (!isFn(handler)) {
  1035. throw new Error(" _vm.".concat(methodName, " is not a function"));
  1036. }
  1037. if (isOnce) {
  1038. if (handler.once) {
  1039. return;
  1040. }
  1041. handler.once = true;
  1042. }
  1043. var params = processEventArgs(
  1044. _this.$vm,
  1045. event,
  1046. eventArray[1],
  1047. eventArray[2],
  1048. isCustom,
  1049. methodName);
  1050. params = Array.isArray(params) ? params : [];
  1051. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1052. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1053. // eslint-disable-next-line no-sparse-arrays
  1054. params = params.concat([,,,,,,,,,, event]);
  1055. }
  1056. ret.push(handler.apply(handlerCtx, params));
  1057. }
  1058. });
  1059. }
  1060. });
  1061. if (
  1062. eventType === 'input' &&
  1063. ret.length === 1 &&
  1064. typeof ret[0] !== 'undefined')
  1065. {
  1066. return ret[0];
  1067. }
  1068. }
  1069. var eventChannels = {};
  1070. var eventChannelStack = [];
  1071. function getEventChannel(id) {
  1072. if (id) {
  1073. var eventChannel = eventChannels[id];
  1074. delete eventChannels[id];
  1075. return eventChannel;
  1076. }
  1077. return eventChannelStack.shift();
  1078. }
  1079. var hooks = [
  1080. 'onShow',
  1081. 'onHide',
  1082. 'onError',
  1083. 'onPageNotFound',
  1084. 'onThemeChange',
  1085. 'onUnhandledRejection'];
  1086. function initEventChannel() {
  1087. _vue.default.prototype.getOpenerEventChannel = function () {
  1088. // 微信小程序使用自身getOpenerEventChannel
  1089. {
  1090. return this.$scope.getOpenerEventChannel();
  1091. }
  1092. };
  1093. var callHook = _vue.default.prototype.__call_hook;
  1094. _vue.default.prototype.__call_hook = function (hook, args) {
  1095. if (hook === 'onLoad' && args && args.__id__) {
  1096. this.__eventChannel__ = getEventChannel(args.__id__);
  1097. delete args.__id__;
  1098. }
  1099. return callHook.call(this, hook, args);
  1100. };
  1101. }
  1102. function initScopedSlotsParams() {
  1103. var center = {};
  1104. var parents = {};
  1105. _vue.default.prototype.$hasScopedSlotsParams = function (vueId) {
  1106. var has = center[vueId];
  1107. if (!has) {
  1108. parents[vueId] = this;
  1109. this.$on('hook:destory', function () {
  1110. delete parents[vueId];
  1111. });
  1112. }
  1113. return has;
  1114. };
  1115. _vue.default.prototype.$getScopedSlotsParams = function (vueId, name, key) {
  1116. var data = center[vueId];
  1117. if (data) {
  1118. var object = data[name] || {};
  1119. return key ? object[key] : object;
  1120. } else {
  1121. parents[vueId] = this;
  1122. this.$on('hook:destory', function () {
  1123. delete parents[vueId];
  1124. });
  1125. }
  1126. };
  1127. _vue.default.prototype.$setScopedSlotsParams = function (name, value) {
  1128. var vueId = this.$options.propsData.vueId;
  1129. var object = center[vueId] = center[vueId] || {};
  1130. object[name] = value;
  1131. if (parents[vueId]) {
  1132. parents[vueId].$forceUpdate();
  1133. }
  1134. };
  1135. _vue.default.mixin({
  1136. destroyed: function destroyed() {
  1137. var propsData = this.$options.propsData;
  1138. var vueId = propsData && propsData.vueId;
  1139. if (vueId) {
  1140. delete center[vueId];
  1141. delete parents[vueId];
  1142. }
  1143. } });
  1144. }
  1145. function parseBaseApp(vm, _ref3)
  1146. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1147. initEventChannel();
  1148. {
  1149. initScopedSlotsParams();
  1150. }
  1151. if (vm.$options.store) {
  1152. _vue.default.prototype.$store = vm.$options.store;
  1153. }
  1154. _vue.default.prototype.mpHost = "mp-weixin";
  1155. _vue.default.mixin({
  1156. beforeCreate: function beforeCreate() {
  1157. if (!this.$options.mpType) {
  1158. return;
  1159. }
  1160. this.mpType = this.$options.mpType;
  1161. this.$mp = _defineProperty({
  1162. data: {} },
  1163. this.mpType, this.$options.mpInstance);
  1164. this.$scope = this.$options.mpInstance;
  1165. delete this.$options.mpType;
  1166. delete this.$options.mpInstance;
  1167. if (this.mpType === 'page' && typeof getApp === 'function') {// hack vue-i18n
  1168. var app = getApp();
  1169. if (app.$vm && app.$vm.$i18n) {
  1170. this._i18n = app.$vm.$i18n;
  1171. }
  1172. }
  1173. if (this.mpType !== 'app') {
  1174. initRefs(this);
  1175. initMocks(this, mocks);
  1176. }
  1177. } });
  1178. var appOptions = {
  1179. onLaunch: function onLaunch(args) {
  1180. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1181. return;
  1182. }
  1183. {
  1184. if (wx.canIUse && !wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1185. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1186. }
  1187. }
  1188. this.$vm = vm;
  1189. this.$vm.$mp = {
  1190. app: this };
  1191. this.$vm.$scope = this;
  1192. // vm 上也挂载 globalData
  1193. this.$vm.globalData = this.globalData;
  1194. this.$vm._isMounted = true;
  1195. this.$vm.__call_hook('mounted', args);
  1196. this.$vm.__call_hook('onLaunch', args);
  1197. } };
  1198. // 兼容旧版本 globalData
  1199. appOptions.globalData = vm.$options.globalData || {};
  1200. // 将 methods 中的方法挂在 getApp() 中
  1201. var methods = vm.$options.methods;
  1202. if (methods) {
  1203. Object.keys(methods).forEach(function (name) {
  1204. appOptions[name] = methods[name];
  1205. });
  1206. }
  1207. initHooks(appOptions, hooks);
  1208. return appOptions;
  1209. }
  1210. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1211. function findVmByVueId(vm, vuePid) {
  1212. var $children = vm.$children;
  1213. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1214. for (var i = $children.length - 1; i >= 0; i--) {
  1215. var childVm = $children[i];
  1216. if (childVm.$scope._$vueId === vuePid) {
  1217. return childVm;
  1218. }
  1219. }
  1220. // 反向递归查找
  1221. var parentVm;
  1222. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1223. parentVm = findVmByVueId($children[_i], vuePid);
  1224. if (parentVm) {
  1225. return parentVm;
  1226. }
  1227. }
  1228. }
  1229. function initBehavior(options) {
  1230. return Behavior(options);
  1231. }
  1232. function isPage() {
  1233. return !!this.route;
  1234. }
  1235. function initRelation(detail) {
  1236. this.triggerEvent('__l', detail);
  1237. }
  1238. function selectAllComponents(mpInstance, selector, $refs) {
  1239. var components = mpInstance.selectAllComponents(selector);
  1240. components.forEach(function (component) {
  1241. var ref = component.dataset.ref;
  1242. $refs[ref] = component.$vm || component;
  1243. {
  1244. if (component.dataset.vueGeneric === 'scoped') {
  1245. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1246. selectAllComponents(scopedComponent, selector, $refs);
  1247. });
  1248. }
  1249. }
  1250. });
  1251. }
  1252. function initRefs(vm) {
  1253. var mpInstance = vm.$scope;
  1254. Object.defineProperty(vm, '$refs', {
  1255. get: function get() {
  1256. var $refs = {};
  1257. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1258. // TODO 暂不考虑 for 中的 scoped
  1259. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1260. forComponents.forEach(function (component) {
  1261. var ref = component.dataset.ref;
  1262. if (!$refs[ref]) {
  1263. $refs[ref] = [];
  1264. }
  1265. $refs[ref].push(component.$vm || component);
  1266. });
  1267. return $refs;
  1268. } });
  1269. }
  1270. function handleLink(event) {var _ref4 =
  1271. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1272. var parentVm;
  1273. if (vuePid) {
  1274. parentVm = findVmByVueId(this.$vm, vuePid);
  1275. }
  1276. if (!parentVm) {
  1277. parentVm = this.$vm;
  1278. }
  1279. vueOptions.parent = parentVm;
  1280. }
  1281. function parseApp(vm) {
  1282. return parseBaseApp(vm, {
  1283. mocks: mocks,
  1284. initRefs: initRefs });
  1285. }
  1286. function createApp(vm) {
  1287. App(parseApp(vm));
  1288. return vm;
  1289. }
  1290. var encodeReserveRE = /[!'()*]/g;
  1291. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1292. var commaRE = /%2C/g;
  1293. // fixed encodeURIComponent which is more conformant to RFC3986:
  1294. // - escapes [!'()*]
  1295. // - preserve commas
  1296. var encode = function encode(str) {return encodeURIComponent(str).
  1297. replace(encodeReserveRE, encodeReserveReplacer).
  1298. replace(commaRE, ',');};
  1299. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1300. var res = obj ? Object.keys(obj).map(function (key) {
  1301. var val = obj[key];
  1302. if (val === undefined) {
  1303. return '';
  1304. }
  1305. if (val === null) {
  1306. return encodeStr(key);
  1307. }
  1308. if (Array.isArray(val)) {
  1309. var result = [];
  1310. val.forEach(function (val2) {
  1311. if (val2 === undefined) {
  1312. return;
  1313. }
  1314. if (val2 === null) {
  1315. result.push(encodeStr(key));
  1316. } else {
  1317. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1318. }
  1319. });
  1320. return result.join('&');
  1321. }
  1322. return encodeStr(key) + '=' + encodeStr(val);
  1323. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1324. return res ? "?".concat(res) : '';
  1325. }
  1326. function parseBaseComponent(vueComponentOptions)
  1327. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1328. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1329. var options = _objectSpread({
  1330. multipleSlots: true,
  1331. addGlobalClass: true },
  1332. vueOptions.options || {});
  1333. {
  1334. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1335. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1336. Object.assign(options, vueOptions['mp-weixin'].options);
  1337. }
  1338. }
  1339. var componentOptions = {
  1340. options: options,
  1341. data: initData(vueOptions, _vue.default.prototype),
  1342. behaviors: initBehaviors(vueOptions, initBehavior),
  1343. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1344. lifetimes: {
  1345. attached: function attached() {
  1346. var properties = this.properties;
  1347. var options = {
  1348. mpType: isPage.call(this) ? 'page' : 'component',
  1349. mpInstance: this,
  1350. propsData: properties };
  1351. initVueIds(properties.vueId, this);
  1352. // 处理父子关系
  1353. initRelation.call(this, {
  1354. vuePid: this._$vuePid,
  1355. vueOptions: options });
  1356. // 初始化 vue 实例
  1357. this.$vm = new VueComponent(options);
  1358. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1359. initSlots(this.$vm, properties.vueSlots);
  1360. // 触发首次 setData
  1361. this.$vm.$mount();
  1362. },
  1363. ready: function ready() {
  1364. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1365. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1366. if (this.$vm) {
  1367. this.$vm._isMounted = true;
  1368. this.$vm.__call_hook('mounted');
  1369. this.$vm.__call_hook('onReady');
  1370. }
  1371. },
  1372. detached: function detached() {
  1373. this.$vm && this.$vm.$destroy();
  1374. } },
  1375. pageLifetimes: {
  1376. show: function show(args) {
  1377. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1378. },
  1379. hide: function hide() {
  1380. this.$vm && this.$vm.__call_hook('onPageHide');
  1381. },
  1382. resize: function resize(size) {
  1383. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1384. } },
  1385. methods: {
  1386. __l: handleLink,
  1387. __e: handleEvent } };
  1388. // externalClasses
  1389. if (vueOptions.externalClasses) {
  1390. componentOptions.externalClasses = vueOptions.externalClasses;
  1391. }
  1392. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1393. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1394. componentOptions.methods[callMethod] = function (args) {
  1395. return this.$vm[callMethod](args);
  1396. };
  1397. });
  1398. }
  1399. if (isPage) {
  1400. return componentOptions;
  1401. }
  1402. return [componentOptions, VueComponent];
  1403. }
  1404. function parseComponent(vueComponentOptions) {
  1405. return parseBaseComponent(vueComponentOptions, {
  1406. isPage: isPage,
  1407. initRelation: initRelation });
  1408. }
  1409. var hooks$1 = [
  1410. 'onShow',
  1411. 'onHide',
  1412. 'onUnload'];
  1413. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1414. function parseBasePage(vuePageOptions, _ref6)
  1415. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1416. var pageOptions = parseComponent(vuePageOptions);
  1417. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1418. pageOptions.methods.onLoad = function (query) {
  1419. this.options = query;
  1420. var copyQuery = Object.assign({}, query);
  1421. delete copyQuery.__id__;
  1422. this.$page = {
  1423. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1424. this.$vm.$mp.query = query; // 兼容 mpvue
  1425. this.$vm.__call_hook('onLoad', query);
  1426. };
  1427. return pageOptions;
  1428. }
  1429. function parsePage(vuePageOptions) {
  1430. return parseBasePage(vuePageOptions, {
  1431. isPage: isPage,
  1432. initRelation: initRelation });
  1433. }
  1434. function createPage(vuePageOptions) {
  1435. {
  1436. return Component(parsePage(vuePageOptions));
  1437. }
  1438. }
  1439. function createComponent(vueOptions) {
  1440. {
  1441. return Component(parseComponent(vueOptions));
  1442. }
  1443. }
  1444. function createSubpackageApp(vm) {
  1445. var appOptions = parseApp(vm);
  1446. var app = getApp({
  1447. allowDefault: true });
  1448. var globalData = app.globalData;
  1449. if (globalData) {
  1450. Object.keys(appOptions.globalData).forEach(function (name) {
  1451. if (!hasOwn(globalData, name)) {
  1452. globalData[name] = appOptions.globalData[name];
  1453. }
  1454. });
  1455. }
  1456. Object.keys(appOptions).forEach(function (name) {
  1457. if (!hasOwn(app, name)) {
  1458. app[name] = appOptions[name];
  1459. }
  1460. });
  1461. if (isFn(appOptions.onShow) && wx.onAppShow) {
  1462. wx.onAppShow(function () {for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  1463. appOptions.onShow.apply(app, args);
  1464. });
  1465. }
  1466. if (isFn(appOptions.onHide) && wx.onAppHide) {
  1467. wx.onAppHide(function () {for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {args[_key6] = arguments[_key6];}
  1468. appOptions.onHide.apply(app, args);
  1469. });
  1470. }
  1471. if (isFn(appOptions.onLaunch)) {
  1472. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  1473. appOptions.onLaunch.call(app, args);
  1474. }
  1475. return vm;
  1476. }
  1477. function createPlugin(vm) {
  1478. var appOptions = parseApp(vm);
  1479. if (isFn(appOptions.onShow) && wx.onAppShow) {
  1480. wx.onAppShow(function () {for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {args[_key7] = arguments[_key7];}
  1481. appOptions.onShow.apply(vm, args);
  1482. });
  1483. }
  1484. if (isFn(appOptions.onHide) && wx.onAppHide) {
  1485. wx.onAppHide(function () {for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {args[_key8] = arguments[_key8];}
  1486. appOptions.onHide.apply(vm, args);
  1487. });
  1488. }
  1489. if (isFn(appOptions.onLaunch)) {
  1490. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  1491. appOptions.onLaunch.call(vm, args);
  1492. }
  1493. return vm;
  1494. }
  1495. todos.forEach(function (todoApi) {
  1496. protocols[todoApi] = false;
  1497. });
  1498. canIUses.forEach(function (canIUseApi) {
  1499. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1500. canIUseApi;
  1501. if (!wx.canIUse(apiName)) {
  1502. protocols[canIUseApi] = false;
  1503. }
  1504. });
  1505. var uni = {};
  1506. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1507. uni = new Proxy({}, {
  1508. get: function get(target, name) {
  1509. if (hasOwn(target, name)) {
  1510. return target[name];
  1511. }
  1512. if (baseApi[name]) {
  1513. return baseApi[name];
  1514. }
  1515. if (api[name]) {
  1516. return promisify(name, api[name]);
  1517. }
  1518. {
  1519. if (extraApi[name]) {
  1520. return promisify(name, extraApi[name]);
  1521. }
  1522. if (todoApis[name]) {
  1523. return promisify(name, todoApis[name]);
  1524. }
  1525. }
  1526. if (eventApi[name]) {
  1527. return eventApi[name];
  1528. }
  1529. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1530. return;
  1531. }
  1532. return promisify(name, wrapper(name, wx[name]));
  1533. },
  1534. set: function set(target, name, value) {
  1535. target[name] = value;
  1536. return true;
  1537. } });
  1538. } else {
  1539. Object.keys(baseApi).forEach(function (name) {
  1540. uni[name] = baseApi[name];
  1541. });
  1542. {
  1543. Object.keys(todoApis).forEach(function (name) {
  1544. uni[name] = promisify(name, todoApis[name]);
  1545. });
  1546. Object.keys(extraApi).forEach(function (name) {
  1547. uni[name] = promisify(name, todoApis[name]);
  1548. });
  1549. }
  1550. Object.keys(eventApi).forEach(function (name) {
  1551. uni[name] = eventApi[name];
  1552. });
  1553. Object.keys(api).forEach(function (name) {
  1554. uni[name] = promisify(name, api[name]);
  1555. });
  1556. Object.keys(wx).forEach(function (name) {
  1557. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1558. uni[name] = promisify(name, wrapper(name, wx[name]));
  1559. }
  1560. });
  1561. }
  1562. wx.createApp = createApp;
  1563. wx.createPage = createPage;
  1564. wx.createComponent = createComponent;
  1565. wx.createSubpackageApp = createSubpackageApp;
  1566. wx.createPlugin = createPlugin;
  1567. var uni$1 = uni;var _default =
  1568. uni$1;exports.default = _default;
  1569. /***/ }),
  1570. /***/ 112:
  1571. /*!****************************************************************!*\
  1572. !*** /Users/wanglili/Documents/liuniu/Mazui/utils/rocessor.js ***!
  1573. \****************************************************************/
  1574. /*! no static exports found */
  1575. /***/ (function(module, exports, __webpack_require__) {
  1576. "use strict";
  1577. Object.defineProperty(exports, "__esModule", { value: true });exports.isCardNo = isCardNo;exports.getMoneyStyle = getMoneyStyle;exports.timeComputed = timeComputed;exports.openMap = openMap;exports.getTime = getTime; //身份证验证
  1578. function isCardNo(card) {
  1579. // 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
  1580. var reg =
  1581. /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/;
  1582. if (reg.test(card) === false) {
  1583. console.log(card);
  1584. return false;
  1585. }
  1586. return true;
  1587. }
  1588. // 金额显示变化
  1589. function getMoneyStyle() {var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  1590. if (typeof value == 'string') {
  1591. value = (+value).toFixed(2);
  1592. }
  1593. if (typeof value == 'number') {
  1594. value = value.toFixed(2);
  1595. }
  1596. // 将字符串转为数组
  1597. var n = value.split("");
  1598. // 反转数组并复制循环处理
  1599. var arr = n.reverse().map(function (e, ind, ar) {
  1600. // 判断当前下标是否为3的整数倍数且不为最后一个下标
  1601. if (ind % 3 == 0 && ind / 3 > 1 && ind != ar.length) {
  1602. return e + ',';
  1603. } else {
  1604. return e;
  1605. }
  1606. });
  1607. // 反转数组回复原来排序并合并回字符串
  1608. arr = arr.reverse().join('');
  1609. return arr;
  1610. }
  1611. // 倒计时计算
  1612. // 计算倒计时时间
  1613. function timeComputed(time) {
  1614. // 获取当前时间
  1615. var actTime = new Date().getTime();
  1616. // 获取到期时间
  1617. var stopTime = time - actTime;
  1618. // 判断是否小于0
  1619. if (stopTime < 0) {
  1620. stopTime = stopTime * -1;
  1621. }
  1622. var day = Math.floor(stopTime / 1000 / 60 / 60 / 24); //获取剩余天数
  1623. var hours = Math.floor(stopTime / 1000 / 60 / 60 % 24); //获取剩余小时数
  1624. var minutes = Math.floor(stopTime / 1000 / 60 % 60); //获取分钟
  1625. var seconds = Math.floor(stopTime / 1000 % 60); //获取秒数
  1626. return {
  1627. hours: hours, //倒计时小时数
  1628. minutes: minutes, //倒计时分钟数
  1629. seconds: seconds, //倒计时秒数
  1630. day: day //倒计时天数
  1631. };
  1632. }
  1633. // 调用打开地图方法
  1634. function openMap(e) {
  1635. var that = this;
  1636. return new Promise(function (resolve, reject) {
  1637. wx.getSetting({
  1638. success: function success(res) {
  1639. //这里判断是否有地位权限
  1640. if (!res.authSetting['scope.userLocation']) {
  1641. wx.showModal({
  1642. title: '提示',
  1643. content: '请求获取位置权限',
  1644. success: function success(res) {
  1645. if (res.confirm == false) {
  1646. // 授权失败
  1647. reject();
  1648. return false;
  1649. }
  1650. wx.openSetting({
  1651. success: function success(res) {
  1652. //如果再次拒绝则返回页面并提示
  1653. if (!res.authSetting['scope.userLocation']) {
  1654. wx.showToast({
  1655. title: '此功能需获取位置信息,请重新设置',
  1656. duration: 3000,
  1657. icon: 'none' });
  1658. } else {
  1659. //允许授权,调用地图
  1660. resolve();
  1661. }
  1662. } });
  1663. } });
  1664. } else {
  1665. //如果有定位权限,调用地图
  1666. resolve();
  1667. }
  1668. } });
  1669. });
  1670. }
  1671. //时间戳转换成时间
  1672. function getTime(time) {
  1673. var num = 13 - (time + '').length;
  1674. var l = 1; //倍数
  1675. for (var i = 0; i < num; i++) {
  1676. l += '0';
  1677. }
  1678. // 重新解析为数字
  1679. l = parseInt(l);
  1680. var date = new Date(parseInt(time) * l);
  1681. var year = date.getFullYear();
  1682. var mon = date.getMonth() + 1;
  1683. var day = date.getDate();
  1684. var hours = date.getHours();
  1685. var minu = date.getMinutes();
  1686. var sec = date.getSeconds();
  1687. return year + '-' + mon + '-' + day + ' ' + hours + ':' + minu + ':' + sec;
  1688. }
  1689. /***/ }),
  1690. /***/ 113:
  1691. /*!*************************************************************!*\
  1692. !*** /Users/wanglili/Documents/liuniu/Mazui/api/patient.js ***!
  1693. \*************************************************************/
  1694. /*! no static exports found */
  1695. /***/ (function(module, exports, __webpack_require__) {
  1696. "use strict";
  1697. Object.defineProperty(exports, "__esModule", { value: true });exports.orderList = orderList;exports.cancel = cancel;exports.go_pay = go_pay;exports.setTime = setTime;exports.patientFinish = patientFinish;exports.doctorFinish = doctorFinish;exports.comment = comment;exports.refund = refund;exports.cancelRefund = cancelRefund;exports.reward = reward;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 23));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  1698. //获取订单列表
  1699. function orderList(data) {
  1700. return (0, _request.default)({
  1701. url: '/api/object.order/orderList',
  1702. method: 'get',
  1703. data: data });
  1704. }
  1705. //订单评论
  1706. function cancel(data) {
  1707. return (0, _request.default)({
  1708. url: '/api/object.order/cancel',
  1709. method: 'post',
  1710. data: data });
  1711. }
  1712. //二次支付
  1713. function go_pay(data) {
  1714. return (0, _request.default)({
  1715. url: '/api/object.order/go_pay',
  1716. method: 'post',
  1717. data: data });
  1718. }
  1719. //选择预约时间
  1720. function setTime(data) {
  1721. return (0, _request.default)({
  1722. url: '/api/object.order/setTime',
  1723. method: 'post',
  1724. data: data });
  1725. }
  1726. //病人确认完成
  1727. function patientFinish(data) {
  1728. return (0, _request.default)({
  1729. url: '/api/object.order/patientFinish',
  1730. method: 'post',
  1731. data: data });
  1732. }
  1733. //医生确认完成
  1734. function doctorFinish(data) {
  1735. return (0, _request.default)({
  1736. url: '/api/object.order/doctorFinish',
  1737. method: 'post',
  1738. data: data });
  1739. }
  1740. //订单评论
  1741. function comment(data) {
  1742. return (0, _request.default)({
  1743. url: '/api/object.order/comment',
  1744. method: 'post',
  1745. data: data });
  1746. }
  1747. //申请退款
  1748. function refund(data) {
  1749. return (0, _request.default)({
  1750. url: '/api/object.order/refund',
  1751. method: 'post',
  1752. data: data });
  1753. }
  1754. //取消退款
  1755. function cancelRefund(data) {
  1756. return (0, _request.default)({
  1757. url: '/api/object.order/cancelRefund',
  1758. method: 'post',
  1759. data: data });
  1760. }
  1761. //打赏
  1762. function reward(data) {
  1763. return (0, _request.default)({
  1764. url: '/api/object.order/reward',
  1765. method: 'post',
  1766. data: data });
  1767. }
  1768. /***/ }),
  1769. /***/ 12:
  1770. /*!**********************************************************************************************************!*\
  1771. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  1772. \**********************************************************************************************************/
  1773. /*! exports provided: default */
  1774. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1775. "use strict";
  1776. __webpack_require__.r(__webpack_exports__);
  1777. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  1778. /* globals __VUE_SSR_CONTEXT__ */
  1779. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  1780. // This module is a runtime utility for cleaner component module output and will
  1781. // be included in the final webpack user bundle.
  1782. function normalizeComponent (
  1783. scriptExports,
  1784. render,
  1785. staticRenderFns,
  1786. functionalTemplate,
  1787. injectStyles,
  1788. scopeId,
  1789. moduleIdentifier, /* server only */
  1790. shadowMode, /* vue-cli only */
  1791. components, // fixed by xxxxxx auto components
  1792. renderjs // fixed by xxxxxx renderjs
  1793. ) {
  1794. // Vue.extend constructor export interop
  1795. var options = typeof scriptExports === 'function'
  1796. ? scriptExports.options
  1797. : scriptExports
  1798. // fixed by xxxxxx auto components
  1799. if (components) {
  1800. if (!options.components) {
  1801. options.components = {}
  1802. }
  1803. var hasOwn = Object.prototype.hasOwnProperty
  1804. for (var name in components) {
  1805. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  1806. options.components[name] = components[name]
  1807. }
  1808. }
  1809. }
  1810. // fixed by xxxxxx renderjs
  1811. if (renderjs) {
  1812. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  1813. this[renderjs.__module] = this
  1814. });
  1815. (options.mixins || (options.mixins = [])).push(renderjs)
  1816. }
  1817. // render functions
  1818. if (render) {
  1819. options.render = render
  1820. options.staticRenderFns = staticRenderFns
  1821. options._compiled = true
  1822. }
  1823. // functional template
  1824. if (functionalTemplate) {
  1825. options.functional = true
  1826. }
  1827. // scopedId
  1828. if (scopeId) {
  1829. options._scopeId = 'data-v-' + scopeId
  1830. }
  1831. var hook
  1832. if (moduleIdentifier) { // server build
  1833. hook = function (context) {
  1834. // 2.3 injection
  1835. context =
  1836. context || // cached call
  1837. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1838. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  1839. // 2.2 with runInNewContext: true
  1840. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1841. context = __VUE_SSR_CONTEXT__
  1842. }
  1843. // inject component styles
  1844. if (injectStyles) {
  1845. injectStyles.call(this, context)
  1846. }
  1847. // register component module identifier for async chunk inferrence
  1848. if (context && context._registeredComponents) {
  1849. context._registeredComponents.add(moduleIdentifier)
  1850. }
  1851. }
  1852. // used by ssr in case component is cached and beforeCreate
  1853. // never gets called
  1854. options._ssrRegister = hook
  1855. } else if (injectStyles) {
  1856. hook = shadowMode
  1857. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  1858. : injectStyles
  1859. }
  1860. if (hook) {
  1861. if (options.functional) {
  1862. // for template-only hot-reload because in that case the render fn doesn't
  1863. // go through the normalizer
  1864. options._injectStyles = hook
  1865. // register for functioal component in vue file
  1866. var originalRender = options.render
  1867. options.render = function renderWithStyleInjection (h, context) {
  1868. hook.call(context)
  1869. return originalRender(h, context)
  1870. }
  1871. } else {
  1872. // inject component registration as beforeCreate hook
  1873. var existing = options.beforeCreate
  1874. options.beforeCreate = existing
  1875. ? [].concat(existing, hook)
  1876. : [hook]
  1877. }
  1878. }
  1879. return {
  1880. exports: scriptExports,
  1881. options: options
  1882. }
  1883. }
  1884. /***/ }),
  1885. /***/ 13:
  1886. /*!***********************************************************!*\
  1887. !*** /Users/wanglili/Documents/liuniu/Mazui/utils/log.js ***!
  1888. \***********************************************************/
  1889. /*! no static exports found */
  1890. /***/ (function(module, exports, __webpack_require__) {
  1891. "use strict";
  1892. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.addLog = addLog;exports.delLog = delLog;exports.getLog = getLog;exports.initLog = initLog;exports.showLog = showLog;
  1893. var logLength = 100; //缓存存储上限
  1894. var name = 'log'; //缓存名字
  1895. function addLog(data) {var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  1896. var log = uni.getStorageSync(name) || [];
  1897. log.unshift({
  1898. title: data,
  1899. content: content });
  1900. uni.setStorageSync(name, log);
  1901. initLog(log);
  1902. }
  1903. function delLog() {
  1904. return uni.setStorageSync(name, '');
  1905. }
  1906. function getLog() {
  1907. return uni.getStorageSync(name);
  1908. }
  1909. function initLog(log) {
  1910. if (log.length > logLength) {
  1911. var newarr = log.slice(log.length - logLength);
  1912. uni.setStorageSync(name, newarr);
  1913. }
  1914. }
  1915. function showLog(log) {
  1916. var str = '';
  1917. uni.getStorageSync(name).forEach(function (e) {
  1918. str += e.title + ':' + JSON.stringify(e.content);
  1919. });
  1920. uni.showModal({
  1921. title: "日志",
  1922. content: str });
  1923. }
  1924. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  1925. /***/ }),
  1926. /***/ 14:
  1927. /*!***********************************************************************!*\
  1928. !*** /Users/wanglili/Documents/liuniu/Mazui/static/font/iconfont.css ***!
  1929. \***********************************************************************/
  1930. /*! no static exports found */
  1931. /***/ (function(module, exports, __webpack_require__) {
  1932. // extracted by mini-css-extract-plugin
  1933. if(false) { var cssReload; }
  1934. /***/ }),
  1935. /***/ 146:
  1936. /*!*********************************************************!*\
  1937. !*** /Users/wanglili/Documents/liuniu/Mazui/api/set.js ***!
  1938. \*********************************************************/
  1939. /*! no static exports found */
  1940. /***/ (function(module, exports, __webpack_require__) {
  1941. "use strict";
  1942. Object.defineProperty(exports, "__esModule", { value: true });exports.userEdit = userEdit;exports.logout = logout;exports.registerReset = registerReset;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 23));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  1943. // 修改用户信息
  1944. function userEdit(data) {
  1945. return (0, _request.default)({
  1946. url: '/api/user/edit',
  1947. method: 'post',
  1948. data: data });
  1949. }
  1950. //退出登录
  1951. function logout(data) {
  1952. return (0, _request.default)({
  1953. url: '/api/logout',
  1954. method: 'get',
  1955. data: data });
  1956. }
  1957. //修改密码
  1958. function registerReset(data) {
  1959. return (0, _request.default)({
  1960. url: '/api/register/reset',
  1961. method: 'post',
  1962. data: data });
  1963. }
  1964. /***/ }),
  1965. /***/ 2:
  1966. /*!******************************************************************************************!*\
  1967. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  1968. \******************************************************************************************/
  1969. /*! exports provided: default */
  1970. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1971. "use strict";
  1972. __webpack_require__.r(__webpack_exports__);
  1973. /* WEBPACK VAR INJECTION */(function(global) {/*!
  1974. * Vue.js v2.6.11
  1975. * (c) 2014-2021 Evan You
  1976. * Released under the MIT License.
  1977. */
  1978. /* */
  1979. var emptyObject = Object.freeze({});
  1980. // These helpers produce better VM code in JS engines due to their
  1981. // explicitness and function inlining.
  1982. function isUndef (v) {
  1983. return v === undefined || v === null
  1984. }
  1985. function isDef (v) {
  1986. return v !== undefined && v !== null
  1987. }
  1988. function isTrue (v) {
  1989. return v === true
  1990. }
  1991. function isFalse (v) {
  1992. return v === false
  1993. }
  1994. /**
  1995. * Check if value is primitive.
  1996. */
  1997. function isPrimitive (value) {
  1998. return (
  1999. typeof value === 'string' ||
  2000. typeof value === 'number' ||
  2001. // $flow-disable-line
  2002. typeof value === 'symbol' ||
  2003. typeof value === 'boolean'
  2004. )
  2005. }
  2006. /**
  2007. * Quick object check - this is primarily used to tell
  2008. * Objects from primitive values when we know the value
  2009. * is a JSON-compliant type.
  2010. */
  2011. function isObject (obj) {
  2012. return obj !== null && typeof obj === 'object'
  2013. }
  2014. /**
  2015. * Get the raw type string of a value, e.g., [object Object].
  2016. */
  2017. var _toString = Object.prototype.toString;
  2018. function toRawType (value) {
  2019. return _toString.call(value).slice(8, -1)
  2020. }
  2021. /**
  2022. * Strict object type check. Only returns true
  2023. * for plain JavaScript objects.
  2024. */
  2025. function isPlainObject (obj) {
  2026. return _toString.call(obj) === '[object Object]'
  2027. }
  2028. function isRegExp (v) {
  2029. return _toString.call(v) === '[object RegExp]'
  2030. }
  2031. /**
  2032. * Check if val is a valid array index.
  2033. */
  2034. function isValidArrayIndex (val) {
  2035. var n = parseFloat(String(val));
  2036. return n >= 0 && Math.floor(n) === n && isFinite(val)
  2037. }
  2038. function isPromise (val) {
  2039. return (
  2040. isDef(val) &&
  2041. typeof val.then === 'function' &&
  2042. typeof val.catch === 'function'
  2043. )
  2044. }
  2045. /**
  2046. * Convert a value to a string that is actually rendered.
  2047. */
  2048. function toString (val) {
  2049. return val == null
  2050. ? ''
  2051. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  2052. ? JSON.stringify(val, null, 2)
  2053. : String(val)
  2054. }
  2055. /**
  2056. * Convert an input value to a number for persistence.
  2057. * If the conversion fails, return original string.
  2058. */
  2059. function toNumber (val) {
  2060. var n = parseFloat(val);
  2061. return isNaN(n) ? val : n
  2062. }
  2063. /**
  2064. * Make a map and return a function for checking if a key
  2065. * is in that map.
  2066. */
  2067. function makeMap (
  2068. str,
  2069. expectsLowerCase
  2070. ) {
  2071. var map = Object.create(null);
  2072. var list = str.split(',');
  2073. for (var i = 0; i < list.length; i++) {
  2074. map[list[i]] = true;
  2075. }
  2076. return expectsLowerCase
  2077. ? function (val) { return map[val.toLowerCase()]; }
  2078. : function (val) { return map[val]; }
  2079. }
  2080. /**
  2081. * Check if a tag is a built-in tag.
  2082. */
  2083. var isBuiltInTag = makeMap('slot,component', true);
  2084. /**
  2085. * Check if an attribute is a reserved attribute.
  2086. */
  2087. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  2088. /**
  2089. * Remove an item from an array.
  2090. */
  2091. function remove (arr, item) {
  2092. if (arr.length) {
  2093. var index = arr.indexOf(item);
  2094. if (index > -1) {
  2095. return arr.splice(index, 1)
  2096. }
  2097. }
  2098. }
  2099. /**
  2100. * Check whether an object has the property.
  2101. */
  2102. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2103. function hasOwn (obj, key) {
  2104. return hasOwnProperty.call(obj, key)
  2105. }
  2106. /**
  2107. * Create a cached version of a pure function.
  2108. */
  2109. function cached (fn) {
  2110. var cache = Object.create(null);
  2111. return (function cachedFn (str) {
  2112. var hit = cache[str];
  2113. return hit || (cache[str] = fn(str))
  2114. })
  2115. }
  2116. /**
  2117. * Camelize a hyphen-delimited string.
  2118. */
  2119. var camelizeRE = /-(\w)/g;
  2120. var camelize = cached(function (str) {
  2121. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  2122. });
  2123. /**
  2124. * Capitalize a string.
  2125. */
  2126. var capitalize = cached(function (str) {
  2127. return str.charAt(0).toUpperCase() + str.slice(1)
  2128. });
  2129. /**
  2130. * Hyphenate a camelCase string.
  2131. */
  2132. var hyphenateRE = /\B([A-Z])/g;
  2133. var hyphenate = cached(function (str) {
  2134. return str.replace(hyphenateRE, '-$1').toLowerCase()
  2135. });
  2136. /**
  2137. * Simple bind polyfill for environments that do not support it,
  2138. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  2139. * since native bind is now performant enough in most browsers.
  2140. * But removing it would mean breaking code that was able to run in
  2141. * PhantomJS 1.x, so this must be kept for backward compatibility.
  2142. */
  2143. /* istanbul ignore next */
  2144. function polyfillBind (fn, ctx) {
  2145. function boundFn (a) {
  2146. var l = arguments.length;
  2147. return l
  2148. ? l > 1
  2149. ? fn.apply(ctx, arguments)
  2150. : fn.call(ctx, a)
  2151. : fn.call(ctx)
  2152. }
  2153. boundFn._length = fn.length;
  2154. return boundFn
  2155. }
  2156. function nativeBind (fn, ctx) {
  2157. return fn.bind(ctx)
  2158. }
  2159. var bind = Function.prototype.bind
  2160. ? nativeBind
  2161. : polyfillBind;
  2162. /**
  2163. * Convert an Array-like object to a real Array.
  2164. */
  2165. function toArray (list, start) {
  2166. start = start || 0;
  2167. var i = list.length - start;
  2168. var ret = new Array(i);
  2169. while (i--) {
  2170. ret[i] = list[i + start];
  2171. }
  2172. return ret
  2173. }
  2174. /**
  2175. * Mix properties into target object.
  2176. */
  2177. function extend (to, _from) {
  2178. for (var key in _from) {
  2179. to[key] = _from[key];
  2180. }
  2181. return to
  2182. }
  2183. /**
  2184. * Merge an Array of Objects into a single Object.
  2185. */
  2186. function toObject (arr) {
  2187. var res = {};
  2188. for (var i = 0; i < arr.length; i++) {
  2189. if (arr[i]) {
  2190. extend(res, arr[i]);
  2191. }
  2192. }
  2193. return res
  2194. }
  2195. /* eslint-disable no-unused-vars */
  2196. /**
  2197. * Perform no operation.
  2198. * Stubbing args to make Flow happy without leaving useless transpiled code
  2199. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  2200. */
  2201. function noop (a, b, c) {}
  2202. /**
  2203. * Always return false.
  2204. */
  2205. var no = function (a, b, c) { return false; };
  2206. /* eslint-enable no-unused-vars */
  2207. /**
  2208. * Return the same value.
  2209. */
  2210. var identity = function (_) { return _; };
  2211. /**
  2212. * Check if two values are loosely equal - that is,
  2213. * if they are plain objects, do they have the same shape?
  2214. */
  2215. function looseEqual (a, b) {
  2216. if (a === b) { return true }
  2217. var isObjectA = isObject(a);
  2218. var isObjectB = isObject(b);
  2219. if (isObjectA && isObjectB) {
  2220. try {
  2221. var isArrayA = Array.isArray(a);
  2222. var isArrayB = Array.isArray(b);
  2223. if (isArrayA && isArrayB) {
  2224. return a.length === b.length && a.every(function (e, i) {
  2225. return looseEqual(e, b[i])
  2226. })
  2227. } else if (a instanceof Date && b instanceof Date) {
  2228. return a.getTime() === b.getTime()
  2229. } else if (!isArrayA && !isArrayB) {
  2230. var keysA = Object.keys(a);
  2231. var keysB = Object.keys(b);
  2232. return keysA.length === keysB.length && keysA.every(function (key) {
  2233. return looseEqual(a[key], b[key])
  2234. })
  2235. } else {
  2236. /* istanbul ignore next */
  2237. return false
  2238. }
  2239. } catch (e) {
  2240. /* istanbul ignore next */
  2241. return false
  2242. }
  2243. } else if (!isObjectA && !isObjectB) {
  2244. return String(a) === String(b)
  2245. } else {
  2246. return false
  2247. }
  2248. }
  2249. /**
  2250. * Return the first index at which a loosely equal value can be
  2251. * found in the array (if value is a plain object, the array must
  2252. * contain an object of the same shape), or -1 if it is not present.
  2253. */
  2254. function looseIndexOf (arr, val) {
  2255. for (var i = 0; i < arr.length; i++) {
  2256. if (looseEqual(arr[i], val)) { return i }
  2257. }
  2258. return -1
  2259. }
  2260. /**
  2261. * Ensure a function is called only once.
  2262. */
  2263. function once (fn) {
  2264. var called = false;
  2265. return function () {
  2266. if (!called) {
  2267. called = true;
  2268. fn.apply(this, arguments);
  2269. }
  2270. }
  2271. }
  2272. var ASSET_TYPES = [
  2273. 'component',
  2274. 'directive',
  2275. 'filter'
  2276. ];
  2277. var LIFECYCLE_HOOKS = [
  2278. 'beforeCreate',
  2279. 'created',
  2280. 'beforeMount',
  2281. 'mounted',
  2282. 'beforeUpdate',
  2283. 'updated',
  2284. 'beforeDestroy',
  2285. 'destroyed',
  2286. 'activated',
  2287. 'deactivated',
  2288. 'errorCaptured',
  2289. 'serverPrefetch'
  2290. ];
  2291. /* */
  2292. var config = ({
  2293. /**
  2294. * Option merge strategies (used in core/util/options)
  2295. */
  2296. // $flow-disable-line
  2297. optionMergeStrategies: Object.create(null),
  2298. /**
  2299. * Whether to suppress warnings.
  2300. */
  2301. silent: false,
  2302. /**
  2303. * Show production mode tip message on boot?
  2304. */
  2305. productionTip: "development" !== 'production',
  2306. /**
  2307. * Whether to enable devtools
  2308. */
  2309. devtools: "development" !== 'production',
  2310. /**
  2311. * Whether to record perf
  2312. */
  2313. performance: false,
  2314. /**
  2315. * Error handler for watcher errors
  2316. */
  2317. errorHandler: null,
  2318. /**
  2319. * Warn handler for watcher warns
  2320. */
  2321. warnHandler: null,
  2322. /**
  2323. * Ignore certain custom elements
  2324. */
  2325. ignoredElements: [],
  2326. /**
  2327. * Custom user key aliases for v-on
  2328. */
  2329. // $flow-disable-line
  2330. keyCodes: Object.create(null),
  2331. /**
  2332. * Check if a tag is reserved so that it cannot be registered as a
  2333. * component. This is platform-dependent and may be overwritten.
  2334. */
  2335. isReservedTag: no,
  2336. /**
  2337. * Check if an attribute is reserved so that it cannot be used as a component
  2338. * prop. This is platform-dependent and may be overwritten.
  2339. */
  2340. isReservedAttr: no,
  2341. /**
  2342. * Check if a tag is an unknown element.
  2343. * Platform-dependent.
  2344. */
  2345. isUnknownElement: no,
  2346. /**
  2347. * Get the namespace of an element
  2348. */
  2349. getTagNamespace: noop,
  2350. /**
  2351. * Parse the real tag name for the specific platform.
  2352. */
  2353. parsePlatformTagName: identity,
  2354. /**
  2355. * Check if an attribute must be bound using property, e.g. value
  2356. * Platform-dependent.
  2357. */
  2358. mustUseProp: no,
  2359. /**
  2360. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  2361. * This will significantly reduce performance if set to false.
  2362. */
  2363. async: true,
  2364. /**
  2365. * Exposed for legacy reasons
  2366. */
  2367. _lifecycleHooks: LIFECYCLE_HOOKS
  2368. });
  2369. /* */
  2370. /**
  2371. * unicode letters used for parsing html tags, component names and property paths.
  2372. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  2373. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  2374. */
  2375. 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/;
  2376. /**
  2377. * Check if a string starts with $ or _
  2378. */
  2379. function isReserved (str) {
  2380. var c = (str + '').charCodeAt(0);
  2381. return c === 0x24 || c === 0x5F
  2382. }
  2383. /**
  2384. * Define a property.
  2385. */
  2386. function def (obj, key, val, enumerable) {
  2387. Object.defineProperty(obj, key, {
  2388. value: val,
  2389. enumerable: !!enumerable,
  2390. writable: true,
  2391. configurable: true
  2392. });
  2393. }
  2394. /**
  2395. * Parse simple path.
  2396. */
  2397. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  2398. function parsePath (path) {
  2399. if (bailRE.test(path)) {
  2400. return
  2401. }
  2402. var segments = path.split('.');
  2403. return function (obj) {
  2404. for (var i = 0; i < segments.length; i++) {
  2405. if (!obj) { return }
  2406. obj = obj[segments[i]];
  2407. }
  2408. return obj
  2409. }
  2410. }
  2411. /* */
  2412. // can we use __proto__?
  2413. var hasProto = '__proto__' in {};
  2414. // Browser environment sniffing
  2415. var inBrowser = typeof window !== 'undefined';
  2416. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  2417. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  2418. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  2419. var isIE = UA && /msie|trident/.test(UA);
  2420. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  2421. var isEdge = UA && UA.indexOf('edge/') > 0;
  2422. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  2423. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  2424. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  2425. var isPhantomJS = UA && /phantomjs/.test(UA);
  2426. var isFF = UA && UA.match(/firefox\/(\d+)/);
  2427. // Firefox has a "watch" function on Object.prototype...
  2428. var nativeWatch = ({}).watch;
  2429. if (inBrowser) {
  2430. try {
  2431. var opts = {};
  2432. Object.defineProperty(opts, 'passive', ({
  2433. get: function get () {
  2434. }
  2435. })); // https://github.com/facebook/flow/issues/285
  2436. window.addEventListener('test-passive', null, opts);
  2437. } catch (e) {}
  2438. }
  2439. // this needs to be lazy-evaled because vue may be required before
  2440. // vue-server-renderer can set VUE_ENV
  2441. var _isServer;
  2442. var isServerRendering = function () {
  2443. if (_isServer === undefined) {
  2444. /* istanbul ignore if */
  2445. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  2446. // detect presence of vue-server-renderer and avoid
  2447. // Webpack shimming the process
  2448. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  2449. } else {
  2450. _isServer = false;
  2451. }
  2452. }
  2453. return _isServer
  2454. };
  2455. // detect devtools
  2456. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  2457. /* istanbul ignore next */
  2458. function isNative (Ctor) {
  2459. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  2460. }
  2461. var hasSymbol =
  2462. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  2463. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  2464. var _Set;
  2465. /* istanbul ignore if */ // $flow-disable-line
  2466. if (typeof Set !== 'undefined' && isNative(Set)) {
  2467. // use native Set when available.
  2468. _Set = Set;
  2469. } else {
  2470. // a non-standard Set polyfill that only works with primitive keys.
  2471. _Set = /*@__PURE__*/(function () {
  2472. function Set () {
  2473. this.set = Object.create(null);
  2474. }
  2475. Set.prototype.has = function has (key) {
  2476. return this.set[key] === true
  2477. };
  2478. Set.prototype.add = function add (key) {
  2479. this.set[key] = true;
  2480. };
  2481. Set.prototype.clear = function clear () {
  2482. this.set = Object.create(null);
  2483. };
  2484. return Set;
  2485. }());
  2486. }
  2487. /* */
  2488. var warn = noop;
  2489. var tip = noop;
  2490. var generateComponentTrace = (noop); // work around flow check
  2491. var formatComponentName = (noop);
  2492. if (true) {
  2493. var hasConsole = typeof console !== 'undefined';
  2494. var classifyRE = /(?:^|[-_])(\w)/g;
  2495. var classify = function (str) { return str
  2496. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  2497. .replace(/[-_]/g, ''); };
  2498. warn = function (msg, vm) {
  2499. var trace = vm ? generateComponentTrace(vm) : '';
  2500. if (config.warnHandler) {
  2501. config.warnHandler.call(null, msg, vm, trace);
  2502. } else if (hasConsole && (!config.silent)) {
  2503. console.error(("[Vue warn]: " + msg + trace));
  2504. }
  2505. };
  2506. tip = function (msg, vm) {
  2507. if (hasConsole && (!config.silent)) {
  2508. console.warn("[Vue tip]: " + msg + (
  2509. vm ? generateComponentTrace(vm) : ''
  2510. ));
  2511. }
  2512. };
  2513. formatComponentName = function (vm, includeFile) {
  2514. if (vm.$root === vm) {
  2515. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  2516. return ('') + vm.$options.__file
  2517. }
  2518. return '<Root>'
  2519. }
  2520. var options = typeof vm === 'function' && vm.cid != null
  2521. ? vm.options
  2522. : vm._isVue
  2523. ? vm.$options || vm.constructor.options
  2524. : vm;
  2525. var name = options.name || options._componentTag;
  2526. var file = options.__file;
  2527. if (!name && file) {
  2528. var match = file.match(/([^/\\]+)\.vue$/);
  2529. name = match && match[1];
  2530. }
  2531. return (
  2532. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  2533. (file && includeFile !== false ? (" at " + file) : '')
  2534. )
  2535. };
  2536. var repeat = function (str, n) {
  2537. var res = '';
  2538. while (n) {
  2539. if (n % 2 === 1) { res += str; }
  2540. if (n > 1) { str += str; }
  2541. n >>= 1;
  2542. }
  2543. return res
  2544. };
  2545. generateComponentTrace = function (vm) {
  2546. if (vm._isVue && vm.$parent) {
  2547. var tree = [];
  2548. var currentRecursiveSequence = 0;
  2549. while (vm && vm.$options.name !== 'PageBody') {
  2550. if (tree.length > 0) {
  2551. var last = tree[tree.length - 1];
  2552. if (last.constructor === vm.constructor) {
  2553. currentRecursiveSequence++;
  2554. vm = vm.$parent;
  2555. continue
  2556. } else if (currentRecursiveSequence > 0) {
  2557. tree[tree.length - 1] = [last, currentRecursiveSequence];
  2558. currentRecursiveSequence = 0;
  2559. }
  2560. }
  2561. !vm.$options.isReserved && tree.push(vm);
  2562. vm = vm.$parent;
  2563. }
  2564. return '\n\nfound in\n\n' + tree
  2565. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  2566. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  2567. : formatComponentName(vm))); })
  2568. .join('\n')
  2569. } else {
  2570. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  2571. }
  2572. };
  2573. }
  2574. /* */
  2575. var uid = 0;
  2576. /**
  2577. * A dep is an observable that can have multiple
  2578. * directives subscribing to it.
  2579. */
  2580. var Dep = function Dep () {
  2581. this.id = uid++;
  2582. this.subs = [];
  2583. };
  2584. Dep.prototype.addSub = function addSub (sub) {
  2585. this.subs.push(sub);
  2586. };
  2587. Dep.prototype.removeSub = function removeSub (sub) {
  2588. remove(this.subs, sub);
  2589. };
  2590. Dep.prototype.depend = function depend () {
  2591. if (Dep.SharedObject.target) {
  2592. Dep.SharedObject.target.addDep(this);
  2593. }
  2594. };
  2595. Dep.prototype.notify = function notify () {
  2596. // stabilize the subscriber list first
  2597. var subs = this.subs.slice();
  2598. if ( true && !config.async) {
  2599. // subs aren't sorted in scheduler if not running async
  2600. // we need to sort them now to make sure they fire in correct
  2601. // order
  2602. subs.sort(function (a, b) { return a.id - b.id; });
  2603. }
  2604. for (var i = 0, l = subs.length; i < l; i++) {
  2605. subs[i].update();
  2606. }
  2607. };
  2608. // The current target watcher being evaluated.
  2609. // This is globally unique because only one watcher
  2610. // can be evaluated at a time.
  2611. // fixed by xxxxxx (nvue shared vuex)
  2612. /* eslint-disable no-undef */
  2613. Dep.SharedObject = {};
  2614. Dep.SharedObject.target = null;
  2615. Dep.SharedObject.targetStack = [];
  2616. function pushTarget (target) {
  2617. Dep.SharedObject.targetStack.push(target);
  2618. Dep.SharedObject.target = target;
  2619. Dep.target = target;
  2620. }
  2621. function popTarget () {
  2622. Dep.SharedObject.targetStack.pop();
  2623. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  2624. Dep.target = Dep.SharedObject.target;
  2625. }
  2626. /* */
  2627. var VNode = function VNode (
  2628. tag,
  2629. data,
  2630. children,
  2631. text,
  2632. elm,
  2633. context,
  2634. componentOptions,
  2635. asyncFactory
  2636. ) {
  2637. this.tag = tag;
  2638. this.data = data;
  2639. this.children = children;
  2640. this.text = text;
  2641. this.elm = elm;
  2642. this.ns = undefined;
  2643. this.context = context;
  2644. this.fnContext = undefined;
  2645. this.fnOptions = undefined;
  2646. this.fnScopeId = undefined;
  2647. this.key = data && data.key;
  2648. this.componentOptions = componentOptions;
  2649. this.componentInstance = undefined;
  2650. this.parent = undefined;
  2651. this.raw = false;
  2652. this.isStatic = false;
  2653. this.isRootInsert = true;
  2654. this.isComment = false;
  2655. this.isCloned = false;
  2656. this.isOnce = false;
  2657. this.asyncFactory = asyncFactory;
  2658. this.asyncMeta = undefined;
  2659. this.isAsyncPlaceholder = false;
  2660. };
  2661. var prototypeAccessors = { child: { configurable: true } };
  2662. // DEPRECATED: alias for componentInstance for backwards compat.
  2663. /* istanbul ignore next */
  2664. prototypeAccessors.child.get = function () {
  2665. return this.componentInstance
  2666. };
  2667. Object.defineProperties( VNode.prototype, prototypeAccessors );
  2668. var createEmptyVNode = function (text) {
  2669. if ( text === void 0 ) text = '';
  2670. var node = new VNode();
  2671. node.text = text;
  2672. node.isComment = true;
  2673. return node
  2674. };
  2675. function createTextVNode (val) {
  2676. return new VNode(undefined, undefined, undefined, String(val))
  2677. }
  2678. // optimized shallow clone
  2679. // used for static nodes and slot nodes because they may be reused across
  2680. // multiple renders, cloning them avoids errors when DOM manipulations rely
  2681. // on their elm reference.
  2682. function cloneVNode (vnode) {
  2683. var cloned = new VNode(
  2684. vnode.tag,
  2685. vnode.data,
  2686. // #7975
  2687. // clone children array to avoid mutating original in case of cloning
  2688. // a child.
  2689. vnode.children && vnode.children.slice(),
  2690. vnode.text,
  2691. vnode.elm,
  2692. vnode.context,
  2693. vnode.componentOptions,
  2694. vnode.asyncFactory
  2695. );
  2696. cloned.ns = vnode.ns;
  2697. cloned.isStatic = vnode.isStatic;
  2698. cloned.key = vnode.key;
  2699. cloned.isComment = vnode.isComment;
  2700. cloned.fnContext = vnode.fnContext;
  2701. cloned.fnOptions = vnode.fnOptions;
  2702. cloned.fnScopeId = vnode.fnScopeId;
  2703. cloned.asyncMeta = vnode.asyncMeta;
  2704. cloned.isCloned = true;
  2705. return cloned
  2706. }
  2707. /*
  2708. * not type checking this file because flow doesn't play well with
  2709. * dynamically accessing methods on Array prototype
  2710. */
  2711. var arrayProto = Array.prototype;
  2712. var arrayMethods = Object.create(arrayProto);
  2713. var methodsToPatch = [
  2714. 'push',
  2715. 'pop',
  2716. 'shift',
  2717. 'unshift',
  2718. 'splice',
  2719. 'sort',
  2720. 'reverse'
  2721. ];
  2722. /**
  2723. * Intercept mutating methods and emit events
  2724. */
  2725. methodsToPatch.forEach(function (method) {
  2726. // cache original method
  2727. var original = arrayProto[method];
  2728. def(arrayMethods, method, function mutator () {
  2729. var args = [], len = arguments.length;
  2730. while ( len-- ) args[ len ] = arguments[ len ];
  2731. var result = original.apply(this, args);
  2732. var ob = this.__ob__;
  2733. var inserted;
  2734. switch (method) {
  2735. case 'push':
  2736. case 'unshift':
  2737. inserted = args;
  2738. break
  2739. case 'splice':
  2740. inserted = args.slice(2);
  2741. break
  2742. }
  2743. if (inserted) { ob.observeArray(inserted); }
  2744. // notify change
  2745. ob.dep.notify();
  2746. return result
  2747. });
  2748. });
  2749. /* */
  2750. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  2751. /**
  2752. * In some cases we may want to disable observation inside a component's
  2753. * update computation.
  2754. */
  2755. var shouldObserve = true;
  2756. function toggleObserving (value) {
  2757. shouldObserve = value;
  2758. }
  2759. /**
  2760. * Observer class that is attached to each observed
  2761. * object. Once attached, the observer converts the target
  2762. * object's property keys into getter/setters that
  2763. * collect dependencies and dispatch updates.
  2764. */
  2765. var Observer = function Observer (value) {
  2766. this.value = value;
  2767. this.dep = new Dep();
  2768. this.vmCount = 0;
  2769. def(value, '__ob__', this);
  2770. if (Array.isArray(value)) {
  2771. if (hasProto) {
  2772. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  2773. if(value.push !== value.__proto__.push){
  2774. copyAugment(value, arrayMethods, arrayKeys);
  2775. } else {
  2776. protoAugment(value, arrayMethods);
  2777. }
  2778. }
  2779. } else {
  2780. copyAugment(value, arrayMethods, arrayKeys);
  2781. }
  2782. this.observeArray(value);
  2783. } else {
  2784. this.walk(value);
  2785. }
  2786. };
  2787. /**
  2788. * Walk through all properties and convert them into
  2789. * getter/setters. This method should only be called when
  2790. * value type is Object.
  2791. */
  2792. Observer.prototype.walk = function walk (obj) {
  2793. var keys = Object.keys(obj);
  2794. for (var i = 0; i < keys.length; i++) {
  2795. defineReactive$$1(obj, keys[i]);
  2796. }
  2797. };
  2798. /**
  2799. * Observe a list of Array items.
  2800. */
  2801. Observer.prototype.observeArray = function observeArray (items) {
  2802. for (var i = 0, l = items.length; i < l; i++) {
  2803. observe(items[i]);
  2804. }
  2805. };
  2806. // helpers
  2807. /**
  2808. * Augment a target Object or Array by intercepting
  2809. * the prototype chain using __proto__
  2810. */
  2811. function protoAugment (target, src) {
  2812. /* eslint-disable no-proto */
  2813. target.__proto__ = src;
  2814. /* eslint-enable no-proto */
  2815. }
  2816. /**
  2817. * Augment a target Object or Array by defining
  2818. * hidden properties.
  2819. */
  2820. /* istanbul ignore next */
  2821. function copyAugment (target, src, keys) {
  2822. for (var i = 0, l = keys.length; i < l; i++) {
  2823. var key = keys[i];
  2824. def(target, key, src[key]);
  2825. }
  2826. }
  2827. /**
  2828. * Attempt to create an observer instance for a value,
  2829. * returns the new observer if successfully observed,
  2830. * or the existing observer if the value already has one.
  2831. */
  2832. function observe (value, asRootData) {
  2833. if (!isObject(value) || value instanceof VNode) {
  2834. return
  2835. }
  2836. var ob;
  2837. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  2838. ob = value.__ob__;
  2839. } else if (
  2840. shouldObserve &&
  2841. !isServerRendering() &&
  2842. (Array.isArray(value) || isPlainObject(value)) &&
  2843. Object.isExtensible(value) &&
  2844. !value._isVue
  2845. ) {
  2846. ob = new Observer(value);
  2847. }
  2848. if (asRootData && ob) {
  2849. ob.vmCount++;
  2850. }
  2851. return ob
  2852. }
  2853. /**
  2854. * Define a reactive property on an Object.
  2855. */
  2856. function defineReactive$$1 (
  2857. obj,
  2858. key,
  2859. val,
  2860. customSetter,
  2861. shallow
  2862. ) {
  2863. var dep = new Dep();
  2864. var property = Object.getOwnPropertyDescriptor(obj, key);
  2865. if (property && property.configurable === false) {
  2866. return
  2867. }
  2868. // cater for pre-defined getter/setters
  2869. var getter = property && property.get;
  2870. var setter = property && property.set;
  2871. if ((!getter || setter) && arguments.length === 2) {
  2872. val = obj[key];
  2873. }
  2874. var childOb = !shallow && observe(val);
  2875. Object.defineProperty(obj, key, {
  2876. enumerable: true,
  2877. configurable: true,
  2878. get: function reactiveGetter () {
  2879. var value = getter ? getter.call(obj) : val;
  2880. if (Dep.SharedObject.target) { // fixed by xxxxxx
  2881. dep.depend();
  2882. if (childOb) {
  2883. childOb.dep.depend();
  2884. if (Array.isArray(value)) {
  2885. dependArray(value);
  2886. }
  2887. }
  2888. }
  2889. return value
  2890. },
  2891. set: function reactiveSetter (newVal) {
  2892. var value = getter ? getter.call(obj) : val;
  2893. /* eslint-disable no-self-compare */
  2894. if (newVal === value || (newVal !== newVal && value !== value)) {
  2895. return
  2896. }
  2897. /* eslint-enable no-self-compare */
  2898. if ( true && customSetter) {
  2899. customSetter();
  2900. }
  2901. // #7981: for accessor properties without setter
  2902. if (getter && !setter) { return }
  2903. if (setter) {
  2904. setter.call(obj, newVal);
  2905. } else {
  2906. val = newVal;
  2907. }
  2908. childOb = !shallow && observe(newVal);
  2909. dep.notify();
  2910. }
  2911. });
  2912. }
  2913. /**
  2914. * Set a property on an object. Adds the new property and
  2915. * triggers change notification if the property doesn't
  2916. * already exist.
  2917. */
  2918. function set (target, key, val) {
  2919. if ( true &&
  2920. (isUndef(target) || isPrimitive(target))
  2921. ) {
  2922. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  2923. }
  2924. if (Array.isArray(target) && isValidArrayIndex(key)) {
  2925. target.length = Math.max(target.length, key);
  2926. target.splice(key, 1, val);
  2927. return val
  2928. }
  2929. if (key in target && !(key in Object.prototype)) {
  2930. target[key] = val;
  2931. return val
  2932. }
  2933. var ob = (target).__ob__;
  2934. if (target._isVue || (ob && ob.vmCount)) {
  2935. true && warn(
  2936. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  2937. 'at runtime - declare it upfront in the data option.'
  2938. );
  2939. return val
  2940. }
  2941. if (!ob) {
  2942. target[key] = val;
  2943. return val
  2944. }
  2945. defineReactive$$1(ob.value, key, val);
  2946. ob.dep.notify();
  2947. return val
  2948. }
  2949. /**
  2950. * Delete a property and trigger change if necessary.
  2951. */
  2952. function del (target, key) {
  2953. if ( true &&
  2954. (isUndef(target) || isPrimitive(target))
  2955. ) {
  2956. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  2957. }
  2958. if (Array.isArray(target) && isValidArrayIndex(key)) {
  2959. target.splice(key, 1);
  2960. return
  2961. }
  2962. var ob = (target).__ob__;
  2963. if (target._isVue || (ob && ob.vmCount)) {
  2964. true && warn(
  2965. 'Avoid deleting properties on a Vue instance or its root $data ' +
  2966. '- just set it to null.'
  2967. );
  2968. return
  2969. }
  2970. if (!hasOwn(target, key)) {
  2971. return
  2972. }
  2973. delete target[key];
  2974. if (!ob) {
  2975. return
  2976. }
  2977. ob.dep.notify();
  2978. }
  2979. /**
  2980. * Collect dependencies on array elements when the array is touched, since
  2981. * we cannot intercept array element access like property getters.
  2982. */
  2983. function dependArray (value) {
  2984. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  2985. e = value[i];
  2986. e && e.__ob__ && e.__ob__.dep.depend();
  2987. if (Array.isArray(e)) {
  2988. dependArray(e);
  2989. }
  2990. }
  2991. }
  2992. /* */
  2993. /**
  2994. * Option overwriting strategies are functions that handle
  2995. * how to merge a parent option value and a child option
  2996. * value into the final value.
  2997. */
  2998. var strats = config.optionMergeStrategies;
  2999. /**
  3000. * Options with restrictions
  3001. */
  3002. if (true) {
  3003. strats.el = strats.propsData = function (parent, child, vm, key) {
  3004. if (!vm) {
  3005. warn(
  3006. "option \"" + key + "\" can only be used during instance " +
  3007. 'creation with the `new` keyword.'
  3008. );
  3009. }
  3010. return defaultStrat(parent, child)
  3011. };
  3012. }
  3013. /**
  3014. * Helper that recursively merges two data objects together.
  3015. */
  3016. function mergeData (to, from) {
  3017. if (!from) { return to }
  3018. var key, toVal, fromVal;
  3019. var keys = hasSymbol
  3020. ? Reflect.ownKeys(from)
  3021. : Object.keys(from);
  3022. for (var i = 0; i < keys.length; i++) {
  3023. key = keys[i];
  3024. // in case the object is already observed...
  3025. if (key === '__ob__') { continue }
  3026. toVal = to[key];
  3027. fromVal = from[key];
  3028. if (!hasOwn(to, key)) {
  3029. set(to, key, fromVal);
  3030. } else if (
  3031. toVal !== fromVal &&
  3032. isPlainObject(toVal) &&
  3033. isPlainObject(fromVal)
  3034. ) {
  3035. mergeData(toVal, fromVal);
  3036. }
  3037. }
  3038. return to
  3039. }
  3040. /**
  3041. * Data
  3042. */
  3043. function mergeDataOrFn (
  3044. parentVal,
  3045. childVal,
  3046. vm
  3047. ) {
  3048. if (!vm) {
  3049. // in a Vue.extend merge, both should be functions
  3050. if (!childVal) {
  3051. return parentVal
  3052. }
  3053. if (!parentVal) {
  3054. return childVal
  3055. }
  3056. // when parentVal & childVal are both present,
  3057. // we need to return a function that returns the
  3058. // merged result of both functions... no need to
  3059. // check if parentVal is a function here because
  3060. // it has to be a function to pass previous merges.
  3061. return function mergedDataFn () {
  3062. return mergeData(
  3063. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  3064. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  3065. )
  3066. }
  3067. } else {
  3068. return function mergedInstanceDataFn () {
  3069. // instance merge
  3070. var instanceData = typeof childVal === 'function'
  3071. ? childVal.call(vm, vm)
  3072. : childVal;
  3073. var defaultData = typeof parentVal === 'function'
  3074. ? parentVal.call(vm, vm)
  3075. : parentVal;
  3076. if (instanceData) {
  3077. return mergeData(instanceData, defaultData)
  3078. } else {
  3079. return defaultData
  3080. }
  3081. }
  3082. }
  3083. }
  3084. strats.data = function (
  3085. parentVal,
  3086. childVal,
  3087. vm
  3088. ) {
  3089. if (!vm) {
  3090. if (childVal && typeof childVal !== 'function') {
  3091. true && warn(
  3092. 'The "data" option should be a function ' +
  3093. 'that returns a per-instance value in component ' +
  3094. 'definitions.',
  3095. vm
  3096. );
  3097. return parentVal
  3098. }
  3099. return mergeDataOrFn(parentVal, childVal)
  3100. }
  3101. return mergeDataOrFn(parentVal, childVal, vm)
  3102. };
  3103. /**
  3104. * Hooks and props are merged as arrays.
  3105. */
  3106. function mergeHook (
  3107. parentVal,
  3108. childVal
  3109. ) {
  3110. var res = childVal
  3111. ? parentVal
  3112. ? parentVal.concat(childVal)
  3113. : Array.isArray(childVal)
  3114. ? childVal
  3115. : [childVal]
  3116. : parentVal;
  3117. return res
  3118. ? dedupeHooks(res)
  3119. : res
  3120. }
  3121. function dedupeHooks (hooks) {
  3122. var res = [];
  3123. for (var i = 0; i < hooks.length; i++) {
  3124. if (res.indexOf(hooks[i]) === -1) {
  3125. res.push(hooks[i]);
  3126. }
  3127. }
  3128. return res
  3129. }
  3130. LIFECYCLE_HOOKS.forEach(function (hook) {
  3131. strats[hook] = mergeHook;
  3132. });
  3133. /**
  3134. * Assets
  3135. *
  3136. * When a vm is present (instance creation), we need to do
  3137. * a three-way merge between constructor options, instance
  3138. * options and parent options.
  3139. */
  3140. function mergeAssets (
  3141. parentVal,
  3142. childVal,
  3143. vm,
  3144. key
  3145. ) {
  3146. var res = Object.create(parentVal || null);
  3147. if (childVal) {
  3148. true && assertObjectType(key, childVal, vm);
  3149. return extend(res, childVal)
  3150. } else {
  3151. return res
  3152. }
  3153. }
  3154. ASSET_TYPES.forEach(function (type) {
  3155. strats[type + 's'] = mergeAssets;
  3156. });
  3157. /**
  3158. * Watchers.
  3159. *
  3160. * Watchers hashes should not overwrite one
  3161. * another, so we merge them as arrays.
  3162. */
  3163. strats.watch = function (
  3164. parentVal,
  3165. childVal,
  3166. vm,
  3167. key
  3168. ) {
  3169. // work around Firefox's Object.prototype.watch...
  3170. if (parentVal === nativeWatch) { parentVal = undefined; }
  3171. if (childVal === nativeWatch) { childVal = undefined; }
  3172. /* istanbul ignore if */
  3173. if (!childVal) { return Object.create(parentVal || null) }
  3174. if (true) {
  3175. assertObjectType(key, childVal, vm);
  3176. }
  3177. if (!parentVal) { return childVal }
  3178. var ret = {};
  3179. extend(ret, parentVal);
  3180. for (var key$1 in childVal) {
  3181. var parent = ret[key$1];
  3182. var child = childVal[key$1];
  3183. if (parent && !Array.isArray(parent)) {
  3184. parent = [parent];
  3185. }
  3186. ret[key$1] = parent
  3187. ? parent.concat(child)
  3188. : Array.isArray(child) ? child : [child];
  3189. }
  3190. return ret
  3191. };
  3192. /**
  3193. * Other object hashes.
  3194. */
  3195. strats.props =
  3196. strats.methods =
  3197. strats.inject =
  3198. strats.computed = function (
  3199. parentVal,
  3200. childVal,
  3201. vm,
  3202. key
  3203. ) {
  3204. if (childVal && "development" !== 'production') {
  3205. assertObjectType(key, childVal, vm);
  3206. }
  3207. if (!parentVal) { return childVal }
  3208. var ret = Object.create(null);
  3209. extend(ret, parentVal);
  3210. if (childVal) { extend(ret, childVal); }
  3211. return ret
  3212. };
  3213. strats.provide = mergeDataOrFn;
  3214. /**
  3215. * Default strategy.
  3216. */
  3217. var defaultStrat = function (parentVal, childVal) {
  3218. return childVal === undefined
  3219. ? parentVal
  3220. : childVal
  3221. };
  3222. /**
  3223. * Validate component names
  3224. */
  3225. function checkComponents (options) {
  3226. for (var key in options.components) {
  3227. validateComponentName(key);
  3228. }
  3229. }
  3230. function validateComponentName (name) {
  3231. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  3232. warn(
  3233. 'Invalid component name: "' + name + '". Component names ' +
  3234. 'should conform to valid custom element name in html5 specification.'
  3235. );
  3236. }
  3237. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  3238. warn(
  3239. 'Do not use built-in or reserved HTML elements as component ' +
  3240. 'id: ' + name
  3241. );
  3242. }
  3243. }
  3244. /**
  3245. * Ensure all props option syntax are normalized into the
  3246. * Object-based format.
  3247. */
  3248. function normalizeProps (options, vm) {
  3249. var props = options.props;
  3250. if (!props) { return }
  3251. var res = {};
  3252. var i, val, name;
  3253. if (Array.isArray(props)) {
  3254. i = props.length;
  3255. while (i--) {
  3256. val = props[i];
  3257. if (typeof val === 'string') {
  3258. name = camelize(val);
  3259. res[name] = { type: null };
  3260. } else if (true) {
  3261. warn('props must be strings when using array syntax.');
  3262. }
  3263. }
  3264. } else if (isPlainObject(props)) {
  3265. for (var key in props) {
  3266. val = props[key];
  3267. name = camelize(key);
  3268. res[name] = isPlainObject(val)
  3269. ? val
  3270. : { type: val };
  3271. }
  3272. } else if (true) {
  3273. warn(
  3274. "Invalid value for option \"props\": expected an Array or an Object, " +
  3275. "but got " + (toRawType(props)) + ".",
  3276. vm
  3277. );
  3278. }
  3279. options.props = res;
  3280. }
  3281. /**
  3282. * Normalize all injections into Object-based format
  3283. */
  3284. function normalizeInject (options, vm) {
  3285. var inject = options.inject;
  3286. if (!inject) { return }
  3287. var normalized = options.inject = {};
  3288. if (Array.isArray(inject)) {
  3289. for (var i = 0; i < inject.length; i++) {
  3290. normalized[inject[i]] = { from: inject[i] };
  3291. }
  3292. } else if (isPlainObject(inject)) {
  3293. for (var key in inject) {
  3294. var val = inject[key];
  3295. normalized[key] = isPlainObject(val)
  3296. ? extend({ from: key }, val)
  3297. : { from: val };
  3298. }
  3299. } else if (true) {
  3300. warn(
  3301. "Invalid value for option \"inject\": expected an Array or an Object, " +
  3302. "but got " + (toRawType(inject)) + ".",
  3303. vm
  3304. );
  3305. }
  3306. }
  3307. /**
  3308. * Normalize raw function directives into object format.
  3309. */
  3310. function normalizeDirectives (options) {
  3311. var dirs = options.directives;
  3312. if (dirs) {
  3313. for (var key in dirs) {
  3314. var def$$1 = dirs[key];
  3315. if (typeof def$$1 === 'function') {
  3316. dirs[key] = { bind: def$$1, update: def$$1 };
  3317. }
  3318. }
  3319. }
  3320. }
  3321. function assertObjectType (name, value, vm) {
  3322. if (!isPlainObject(value)) {
  3323. warn(
  3324. "Invalid value for option \"" + name + "\": expected an Object, " +
  3325. "but got " + (toRawType(value)) + ".",
  3326. vm
  3327. );
  3328. }
  3329. }
  3330. /**
  3331. * Merge two option objects into a new one.
  3332. * Core utility used in both instantiation and inheritance.
  3333. */
  3334. function mergeOptions (
  3335. parent,
  3336. child,
  3337. vm
  3338. ) {
  3339. if (true) {
  3340. checkComponents(child);
  3341. }
  3342. if (typeof child === 'function') {
  3343. child = child.options;
  3344. }
  3345. normalizeProps(child, vm);
  3346. normalizeInject(child, vm);
  3347. normalizeDirectives(child);
  3348. // Apply extends and mixins on the child options,
  3349. // but only if it is a raw options object that isn't
  3350. // the result of another mergeOptions call.
  3351. // Only merged options has the _base property.
  3352. if (!child._base) {
  3353. if (child.extends) {
  3354. parent = mergeOptions(parent, child.extends, vm);
  3355. }
  3356. if (child.mixins) {
  3357. for (var i = 0, l = child.mixins.length; i < l; i++) {
  3358. parent = mergeOptions(parent, child.mixins[i], vm);
  3359. }
  3360. }
  3361. }
  3362. var options = {};
  3363. var key;
  3364. for (key in parent) {
  3365. mergeField(key);
  3366. }
  3367. for (key in child) {
  3368. if (!hasOwn(parent, key)) {
  3369. mergeField(key);
  3370. }
  3371. }
  3372. function mergeField (key) {
  3373. var strat = strats[key] || defaultStrat;
  3374. options[key] = strat(parent[key], child[key], vm, key);
  3375. }
  3376. return options
  3377. }
  3378. /**
  3379. * Resolve an asset.
  3380. * This function is used because child instances need access
  3381. * to assets defined in its ancestor chain.
  3382. */
  3383. function resolveAsset (
  3384. options,
  3385. type,
  3386. id,
  3387. warnMissing
  3388. ) {
  3389. /* istanbul ignore if */
  3390. if (typeof id !== 'string') {
  3391. return
  3392. }
  3393. var assets = options[type];
  3394. // check local registration variations first
  3395. if (hasOwn(assets, id)) { return assets[id] }
  3396. var camelizedId = camelize(id);
  3397. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  3398. var PascalCaseId = capitalize(camelizedId);
  3399. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  3400. // fallback to prototype chain
  3401. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  3402. if ( true && warnMissing && !res) {
  3403. warn(
  3404. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  3405. options
  3406. );
  3407. }
  3408. return res
  3409. }
  3410. /* */
  3411. function validateProp (
  3412. key,
  3413. propOptions,
  3414. propsData,
  3415. vm
  3416. ) {
  3417. var prop = propOptions[key];
  3418. var absent = !hasOwn(propsData, key);
  3419. var value = propsData[key];
  3420. // boolean casting
  3421. var booleanIndex = getTypeIndex(Boolean, prop.type);
  3422. if (booleanIndex > -1) {
  3423. if (absent && !hasOwn(prop, 'default')) {
  3424. value = false;
  3425. } else if (value === '' || value === hyphenate(key)) {
  3426. // only cast empty string / same name to boolean if
  3427. // boolean has higher priority
  3428. var stringIndex = getTypeIndex(String, prop.type);
  3429. if (stringIndex < 0 || booleanIndex < stringIndex) {
  3430. value = true;
  3431. }
  3432. }
  3433. }
  3434. // check default value
  3435. if (value === undefined) {
  3436. value = getPropDefaultValue(vm, prop, key);
  3437. // since the default value is a fresh copy,
  3438. // make sure to observe it.
  3439. var prevShouldObserve = shouldObserve;
  3440. toggleObserving(true);
  3441. observe(value);
  3442. toggleObserving(prevShouldObserve);
  3443. }
  3444. if (
  3445. true
  3446. ) {
  3447. assertProp(prop, key, value, vm, absent);
  3448. }
  3449. return value
  3450. }
  3451. /**
  3452. * Get the default value of a prop.
  3453. */
  3454. function getPropDefaultValue (vm, prop, key) {
  3455. // no default, return undefined
  3456. if (!hasOwn(prop, 'default')) {
  3457. return undefined
  3458. }
  3459. var def = prop.default;
  3460. // warn against non-factory defaults for Object & Array
  3461. if ( true && isObject(def)) {
  3462. warn(
  3463. 'Invalid default value for prop "' + key + '": ' +
  3464. 'Props with type Object/Array must use a factory function ' +
  3465. 'to return the default value.',
  3466. vm
  3467. );
  3468. }
  3469. // the raw prop value was also undefined from previous render,
  3470. // return previous default value to avoid unnecessary watcher trigger
  3471. if (vm && vm.$options.propsData &&
  3472. vm.$options.propsData[key] === undefined &&
  3473. vm._props[key] !== undefined
  3474. ) {
  3475. return vm._props[key]
  3476. }
  3477. // call factory function for non-Function types
  3478. // a value is Function if its prototype is function even across different execution context
  3479. return typeof def === 'function' && getType(prop.type) !== 'Function'
  3480. ? def.call(vm)
  3481. : def
  3482. }
  3483. /**
  3484. * Assert whether a prop is valid.
  3485. */
  3486. function assertProp (
  3487. prop,
  3488. name,
  3489. value,
  3490. vm,
  3491. absent
  3492. ) {
  3493. if (prop.required && absent) {
  3494. warn(
  3495. 'Missing required prop: "' + name + '"',
  3496. vm
  3497. );
  3498. return
  3499. }
  3500. if (value == null && !prop.required) {
  3501. return
  3502. }
  3503. var type = prop.type;
  3504. var valid = !type || type === true;
  3505. var expectedTypes = [];
  3506. if (type) {
  3507. if (!Array.isArray(type)) {
  3508. type = [type];
  3509. }
  3510. for (var i = 0; i < type.length && !valid; i++) {
  3511. var assertedType = assertType(value, type[i]);
  3512. expectedTypes.push(assertedType.expectedType || '');
  3513. valid = assertedType.valid;
  3514. }
  3515. }
  3516. if (!valid) {
  3517. warn(
  3518. getInvalidTypeMessage(name, value, expectedTypes),
  3519. vm
  3520. );
  3521. return
  3522. }
  3523. var validator = prop.validator;
  3524. if (validator) {
  3525. if (!validator(value)) {
  3526. warn(
  3527. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  3528. vm
  3529. );
  3530. }
  3531. }
  3532. }
  3533. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  3534. function assertType (value, type) {
  3535. var valid;
  3536. var expectedType = getType(type);
  3537. if (simpleCheckRE.test(expectedType)) {
  3538. var t = typeof value;
  3539. valid = t === expectedType.toLowerCase();
  3540. // for primitive wrapper objects
  3541. if (!valid && t === 'object') {
  3542. valid = value instanceof type;
  3543. }
  3544. } else if (expectedType === 'Object') {
  3545. valid = isPlainObject(value);
  3546. } else if (expectedType === 'Array') {
  3547. valid = Array.isArray(value);
  3548. } else {
  3549. valid = value instanceof type;
  3550. }
  3551. return {
  3552. valid: valid,
  3553. expectedType: expectedType
  3554. }
  3555. }
  3556. /**
  3557. * Use function string name to check built-in types,
  3558. * because a simple equality check will fail when running
  3559. * across different vms / iframes.
  3560. */
  3561. function getType (fn) {
  3562. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  3563. return match ? match[1] : ''
  3564. }
  3565. function isSameType (a, b) {
  3566. return getType(a) === getType(b)
  3567. }
  3568. function getTypeIndex (type, expectedTypes) {
  3569. if (!Array.isArray(expectedTypes)) {
  3570. return isSameType(expectedTypes, type) ? 0 : -1
  3571. }
  3572. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  3573. if (isSameType(expectedTypes[i], type)) {
  3574. return i
  3575. }
  3576. }
  3577. return -1
  3578. }
  3579. function getInvalidTypeMessage (name, value, expectedTypes) {
  3580. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  3581. " Expected " + (expectedTypes.map(capitalize).join(', '));
  3582. var expectedType = expectedTypes[0];
  3583. var receivedType = toRawType(value);
  3584. var expectedValue = styleValue(value, expectedType);
  3585. var receivedValue = styleValue(value, receivedType);
  3586. // check if we need to specify expected value
  3587. if (expectedTypes.length === 1 &&
  3588. isExplicable(expectedType) &&
  3589. !isBoolean(expectedType, receivedType)) {
  3590. message += " with value " + expectedValue;
  3591. }
  3592. message += ", got " + receivedType + " ";
  3593. // check if we need to specify received value
  3594. if (isExplicable(receivedType)) {
  3595. message += "with value " + receivedValue + ".";
  3596. }
  3597. return message
  3598. }
  3599. function styleValue (value, type) {
  3600. if (type === 'String') {
  3601. return ("\"" + value + "\"")
  3602. } else if (type === 'Number') {
  3603. return ("" + (Number(value)))
  3604. } else {
  3605. return ("" + value)
  3606. }
  3607. }
  3608. function isExplicable (value) {
  3609. var explicitTypes = ['string', 'number', 'boolean'];
  3610. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  3611. }
  3612. function isBoolean () {
  3613. var args = [], len = arguments.length;
  3614. while ( len-- ) args[ len ] = arguments[ len ];
  3615. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  3616. }
  3617. /* */
  3618. function handleError (err, vm, info) {
  3619. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  3620. // See: https://github.com/vuejs/vuex/issues/1505
  3621. pushTarget();
  3622. try {
  3623. if (vm) {
  3624. var cur = vm;
  3625. while ((cur = cur.$parent)) {
  3626. var hooks = cur.$options.errorCaptured;
  3627. if (hooks) {
  3628. for (var i = 0; i < hooks.length; i++) {
  3629. try {
  3630. var capture = hooks[i].call(cur, err, vm, info) === false;
  3631. if (capture) { return }
  3632. } catch (e) {
  3633. globalHandleError(e, cur, 'errorCaptured hook');
  3634. }
  3635. }
  3636. }
  3637. }
  3638. }
  3639. globalHandleError(err, vm, info);
  3640. } finally {
  3641. popTarget();
  3642. }
  3643. }
  3644. function invokeWithErrorHandling (
  3645. handler,
  3646. context,
  3647. args,
  3648. vm,
  3649. info
  3650. ) {
  3651. var res;
  3652. try {
  3653. res = args ? handler.apply(context, args) : handler.call(context);
  3654. if (res && !res._isVue && isPromise(res) && !res._handled) {
  3655. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  3656. // issue #9511
  3657. // avoid catch triggering multiple times when nested calls
  3658. res._handled = true;
  3659. }
  3660. } catch (e) {
  3661. handleError(e, vm, info);
  3662. }
  3663. return res
  3664. }
  3665. function globalHandleError (err, vm, info) {
  3666. if (config.errorHandler) {
  3667. try {
  3668. return config.errorHandler.call(null, err, vm, info)
  3669. } catch (e) {
  3670. // if the user intentionally throws the original error in the handler,
  3671. // do not log it twice
  3672. if (e !== err) {
  3673. logError(e, null, 'config.errorHandler');
  3674. }
  3675. }
  3676. }
  3677. logError(err, vm, info);
  3678. }
  3679. function logError (err, vm, info) {
  3680. if (true) {
  3681. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  3682. }
  3683. /* istanbul ignore else */
  3684. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  3685. console.error(err);
  3686. } else {
  3687. throw err
  3688. }
  3689. }
  3690. /* */
  3691. var callbacks = [];
  3692. var pending = false;
  3693. function flushCallbacks () {
  3694. pending = false;
  3695. var copies = callbacks.slice(0);
  3696. callbacks.length = 0;
  3697. for (var i = 0; i < copies.length; i++) {
  3698. copies[i]();
  3699. }
  3700. }
  3701. // Here we have async deferring wrappers using microtasks.
  3702. // In 2.5 we used (macro) tasks (in combination with microtasks).
  3703. // However, it has subtle problems when state is changed right before repaint
  3704. // (e.g. #6813, out-in transitions).
  3705. // Also, using (macro) tasks in event handler would cause some weird behaviors
  3706. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  3707. // So we now use microtasks everywhere, again.
  3708. // A major drawback of this tradeoff is that there are some scenarios
  3709. // where microtasks have too high a priority and fire in between supposedly
  3710. // sequential events (e.g. #4521, #6690, which have workarounds)
  3711. // or even between bubbling of the same event (#6566).
  3712. var timerFunc;
  3713. // The nextTick behavior leverages the microtask queue, which can be accessed
  3714. // via either native Promise.then or MutationObserver.
  3715. // MutationObserver has wider support, however it is seriously bugged in
  3716. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  3717. // completely stops working after triggering a few times... so, if native
  3718. // Promise is available, we will use it:
  3719. /* istanbul ignore next, $flow-disable-line */
  3720. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  3721. var p = Promise.resolve();
  3722. timerFunc = function () {
  3723. p.then(flushCallbacks);
  3724. // In problematic UIWebViews, Promise.then doesn't completely break, but
  3725. // it can get stuck in a weird state where callbacks are pushed into the
  3726. // microtask queue but the queue isn't being flushed, until the browser
  3727. // needs to do some other work, e.g. handle a timer. Therefore we can
  3728. // "force" the microtask queue to be flushed by adding an empty timer.
  3729. if (isIOS) { setTimeout(noop); }
  3730. };
  3731. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  3732. isNative(MutationObserver) ||
  3733. // PhantomJS and iOS 7.x
  3734. MutationObserver.toString() === '[object MutationObserverConstructor]'
  3735. )) {
  3736. // Use MutationObserver where native Promise is not available,
  3737. // e.g. PhantomJS, iOS7, Android 4.4
  3738. // (#6466 MutationObserver is unreliable in IE11)
  3739. var counter = 1;
  3740. var observer = new MutationObserver(flushCallbacks);
  3741. var textNode = document.createTextNode(String(counter));
  3742. observer.observe(textNode, {
  3743. characterData: true
  3744. });
  3745. timerFunc = function () {
  3746. counter = (counter + 1) % 2;
  3747. textNode.data = String(counter);
  3748. };
  3749. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  3750. // Fallback to setImmediate.
  3751. // Technically it leverages the (macro) task queue,
  3752. // but it is still a better choice than setTimeout.
  3753. timerFunc = function () {
  3754. setImmediate(flushCallbacks);
  3755. };
  3756. } else {
  3757. // Fallback to setTimeout.
  3758. timerFunc = function () {
  3759. setTimeout(flushCallbacks, 0);
  3760. };
  3761. }
  3762. function nextTick (cb, ctx) {
  3763. var _resolve;
  3764. callbacks.push(function () {
  3765. if (cb) {
  3766. try {
  3767. cb.call(ctx);
  3768. } catch (e) {
  3769. handleError(e, ctx, 'nextTick');
  3770. }
  3771. } else if (_resolve) {
  3772. _resolve(ctx);
  3773. }
  3774. });
  3775. if (!pending) {
  3776. pending = true;
  3777. timerFunc();
  3778. }
  3779. // $flow-disable-line
  3780. if (!cb && typeof Promise !== 'undefined') {
  3781. return new Promise(function (resolve) {
  3782. _resolve = resolve;
  3783. })
  3784. }
  3785. }
  3786. /* */
  3787. /* not type checking this file because flow doesn't play well with Proxy */
  3788. var initProxy;
  3789. if (true) {
  3790. var allowedGlobals = makeMap(
  3791. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  3792. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  3793. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  3794. 'require' // for Webpack/Browserify
  3795. );
  3796. var warnNonPresent = function (target, key) {
  3797. warn(
  3798. "Property or method \"" + key + "\" is not defined on the instance but " +
  3799. 'referenced during render. Make sure that this property is reactive, ' +
  3800. 'either in the data option, or for class-based components, by ' +
  3801. 'initializing the property. ' +
  3802. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  3803. target
  3804. );
  3805. };
  3806. var warnReservedPrefix = function (target, key) {
  3807. warn(
  3808. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  3809. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  3810. 'prevent conflicts with Vue internals. ' +
  3811. 'See: https://vuejs.org/v2/api/#data',
  3812. target
  3813. );
  3814. };
  3815. var hasProxy =
  3816. typeof Proxy !== 'undefined' && isNative(Proxy);
  3817. if (hasProxy) {
  3818. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  3819. config.keyCodes = new Proxy(config.keyCodes, {
  3820. set: function set (target, key, value) {
  3821. if (isBuiltInModifier(key)) {
  3822. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  3823. return false
  3824. } else {
  3825. target[key] = value;
  3826. return true
  3827. }
  3828. }
  3829. });
  3830. }
  3831. var hasHandler = {
  3832. has: function has (target, key) {
  3833. var has = key in target;
  3834. var isAllowed = allowedGlobals(key) ||
  3835. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  3836. if (!has && !isAllowed) {
  3837. if (key in target.$data) { warnReservedPrefix(target, key); }
  3838. else { warnNonPresent(target, key); }
  3839. }
  3840. return has || !isAllowed
  3841. }
  3842. };
  3843. var getHandler = {
  3844. get: function get (target, key) {
  3845. if (typeof key === 'string' && !(key in target)) {
  3846. if (key in target.$data) { warnReservedPrefix(target, key); }
  3847. else { warnNonPresent(target, key); }
  3848. }
  3849. return target[key]
  3850. }
  3851. };
  3852. initProxy = function initProxy (vm) {
  3853. if (hasProxy) {
  3854. // determine which proxy handler to use
  3855. var options = vm.$options;
  3856. var handlers = options.render && options.render._withStripped
  3857. ? getHandler
  3858. : hasHandler;
  3859. vm._renderProxy = new Proxy(vm, handlers);
  3860. } else {
  3861. vm._renderProxy = vm;
  3862. }
  3863. };
  3864. }
  3865. /* */
  3866. var seenObjects = new _Set();
  3867. /**
  3868. * Recursively traverse an object to evoke all converted
  3869. * getters, so that every nested property inside the object
  3870. * is collected as a "deep" dependency.
  3871. */
  3872. function traverse (val) {
  3873. _traverse(val, seenObjects);
  3874. seenObjects.clear();
  3875. }
  3876. function _traverse (val, seen) {
  3877. var i, keys;
  3878. var isA = Array.isArray(val);
  3879. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  3880. return
  3881. }
  3882. if (val.__ob__) {
  3883. var depId = val.__ob__.dep.id;
  3884. if (seen.has(depId)) {
  3885. return
  3886. }
  3887. seen.add(depId);
  3888. }
  3889. if (isA) {
  3890. i = val.length;
  3891. while (i--) { _traverse(val[i], seen); }
  3892. } else {
  3893. keys = Object.keys(val);
  3894. i = keys.length;
  3895. while (i--) { _traverse(val[keys[i]], seen); }
  3896. }
  3897. }
  3898. var mark;
  3899. var measure;
  3900. if (true) {
  3901. var perf = inBrowser && window.performance;
  3902. /* istanbul ignore if */
  3903. if (
  3904. perf &&
  3905. perf.mark &&
  3906. perf.measure &&
  3907. perf.clearMarks &&
  3908. perf.clearMeasures
  3909. ) {
  3910. mark = function (tag) { return perf.mark(tag); };
  3911. measure = function (name, startTag, endTag) {
  3912. perf.measure(name, startTag, endTag);
  3913. perf.clearMarks(startTag);
  3914. perf.clearMarks(endTag);
  3915. // perf.clearMeasures(name)
  3916. };
  3917. }
  3918. }
  3919. /* */
  3920. var normalizeEvent = cached(function (name) {
  3921. var passive = name.charAt(0) === '&';
  3922. name = passive ? name.slice(1) : name;
  3923. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  3924. name = once$$1 ? name.slice(1) : name;
  3925. var capture = name.charAt(0) === '!';
  3926. name = capture ? name.slice(1) : name;
  3927. return {
  3928. name: name,
  3929. once: once$$1,
  3930. capture: capture,
  3931. passive: passive
  3932. }
  3933. });
  3934. function createFnInvoker (fns, vm) {
  3935. function invoker () {
  3936. var arguments$1 = arguments;
  3937. var fns = invoker.fns;
  3938. if (Array.isArray(fns)) {
  3939. var cloned = fns.slice();
  3940. for (var i = 0; i < cloned.length; i++) {
  3941. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  3942. }
  3943. } else {
  3944. // return handler return value for single handlers
  3945. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  3946. }
  3947. }
  3948. invoker.fns = fns;
  3949. return invoker
  3950. }
  3951. function updateListeners (
  3952. on,
  3953. oldOn,
  3954. add,
  3955. remove$$1,
  3956. createOnceHandler,
  3957. vm
  3958. ) {
  3959. var name, def$$1, cur, old, event;
  3960. for (name in on) {
  3961. def$$1 = cur = on[name];
  3962. old = oldOn[name];
  3963. event = normalizeEvent(name);
  3964. if (isUndef(cur)) {
  3965. true && warn(
  3966. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  3967. vm
  3968. );
  3969. } else if (isUndef(old)) {
  3970. if (isUndef(cur.fns)) {
  3971. cur = on[name] = createFnInvoker(cur, vm);
  3972. }
  3973. if (isTrue(event.once)) {
  3974. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  3975. }
  3976. add(event.name, cur, event.capture, event.passive, event.params);
  3977. } else if (cur !== old) {
  3978. old.fns = cur;
  3979. on[name] = old;
  3980. }
  3981. }
  3982. for (name in oldOn) {
  3983. if (isUndef(on[name])) {
  3984. event = normalizeEvent(name);
  3985. remove$$1(event.name, oldOn[name], event.capture);
  3986. }
  3987. }
  3988. }
  3989. /* */
  3990. /* */
  3991. // fixed by xxxxxx (mp properties)
  3992. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  3993. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  3994. if (isUndef(propOptions)) {
  3995. return res
  3996. }
  3997. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  3998. var attrs = data.attrs;
  3999. var props = data.props;
  4000. if (isDef(attrs) || isDef(props)) {
  4001. for (var key in propOptions) {
  4002. var altKey = hyphenate(key);
  4003. var result = checkProp(res, props, key, altKey, true) ||
  4004. checkProp(res, attrs, key, altKey, false);
  4005. // externalClass
  4006. if (
  4007. result &&
  4008. res[key] &&
  4009. externalClasses.indexOf(altKey) !== -1 &&
  4010. context[camelize(res[key])]
  4011. ) {
  4012. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  4013. res[key] = context[camelize(res[key])];
  4014. }
  4015. }
  4016. }
  4017. return res
  4018. }
  4019. function extractPropsFromVNodeData (
  4020. data,
  4021. Ctor,
  4022. tag,
  4023. context// fixed by xxxxxx
  4024. ) {
  4025. // we are only extracting raw values here.
  4026. // validation and default values are handled in the child
  4027. // component itself.
  4028. var propOptions = Ctor.options.props;
  4029. if (isUndef(propOptions)) {
  4030. // fixed by xxxxxx
  4031. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  4032. }
  4033. var res = {};
  4034. var attrs = data.attrs;
  4035. var props = data.props;
  4036. if (isDef(attrs) || isDef(props)) {
  4037. for (var key in propOptions) {
  4038. var altKey = hyphenate(key);
  4039. if (true) {
  4040. var keyInLowerCase = key.toLowerCase();
  4041. if (
  4042. key !== keyInLowerCase &&
  4043. attrs && hasOwn(attrs, keyInLowerCase)
  4044. ) {
  4045. tip(
  4046. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  4047. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  4048. " \"" + key + "\". " +
  4049. "Note that HTML attributes are case-insensitive and camelCased " +
  4050. "props need to use their kebab-case equivalents when using in-DOM " +
  4051. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  4052. );
  4053. }
  4054. }
  4055. checkProp(res, props, key, altKey, true) ||
  4056. checkProp(res, attrs, key, altKey, false);
  4057. }
  4058. }
  4059. // fixed by xxxxxx
  4060. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  4061. }
  4062. function checkProp (
  4063. res,
  4064. hash,
  4065. key,
  4066. altKey,
  4067. preserve
  4068. ) {
  4069. if (isDef(hash)) {
  4070. if (hasOwn(hash, key)) {
  4071. res[key] = hash[key];
  4072. if (!preserve) {
  4073. delete hash[key];
  4074. }
  4075. return true
  4076. } else if (hasOwn(hash, altKey)) {
  4077. res[key] = hash[altKey];
  4078. if (!preserve) {
  4079. delete hash[altKey];
  4080. }
  4081. return true
  4082. }
  4083. }
  4084. return false
  4085. }
  4086. /* */
  4087. // The template compiler attempts to minimize the need for normalization by
  4088. // statically analyzing the template at compile time.
  4089. //
  4090. // For plain HTML markup, normalization can be completely skipped because the
  4091. // generated render function is guaranteed to return Array<VNode>. There are
  4092. // two cases where extra normalization is needed:
  4093. // 1. When the children contains components - because a functional component
  4094. // may return an Array instead of a single root. In this case, just a simple
  4095. // normalization is needed - if any child is an Array, we flatten the whole
  4096. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  4097. // because functional components already normalize their own children.
  4098. function simpleNormalizeChildren (children) {
  4099. for (var i = 0; i < children.length; i++) {
  4100. if (Array.isArray(children[i])) {
  4101. return Array.prototype.concat.apply([], children)
  4102. }
  4103. }
  4104. return children
  4105. }
  4106. // 2. When the children contains constructs that always generated nested Arrays,
  4107. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  4108. // with hand-written render functions / JSX. In such cases a full normalization
  4109. // is needed to cater to all possible types of children values.
  4110. function normalizeChildren (children) {
  4111. return isPrimitive(children)
  4112. ? [createTextVNode(children)]
  4113. : Array.isArray(children)
  4114. ? normalizeArrayChildren(children)
  4115. : undefined
  4116. }
  4117. function isTextNode (node) {
  4118. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  4119. }
  4120. function normalizeArrayChildren (children, nestedIndex) {
  4121. var res = [];
  4122. var i, c, lastIndex, last;
  4123. for (i = 0; i < children.length; i++) {
  4124. c = children[i];
  4125. if (isUndef(c) || typeof c === 'boolean') { continue }
  4126. lastIndex = res.length - 1;
  4127. last = res[lastIndex];
  4128. // nested
  4129. if (Array.isArray(c)) {
  4130. if (c.length > 0) {
  4131. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  4132. // merge adjacent text nodes
  4133. if (isTextNode(c[0]) && isTextNode(last)) {
  4134. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  4135. c.shift();
  4136. }
  4137. res.push.apply(res, c);
  4138. }
  4139. } else if (isPrimitive(c)) {
  4140. if (isTextNode(last)) {
  4141. // merge adjacent text nodes
  4142. // this is necessary for SSR hydration because text nodes are
  4143. // essentially merged when rendered to HTML strings
  4144. res[lastIndex] = createTextVNode(last.text + c);
  4145. } else if (c !== '') {
  4146. // convert primitive to vnode
  4147. res.push(createTextVNode(c));
  4148. }
  4149. } else {
  4150. if (isTextNode(c) && isTextNode(last)) {
  4151. // merge adjacent text nodes
  4152. res[lastIndex] = createTextVNode(last.text + c.text);
  4153. } else {
  4154. // default key for nested array children (likely generated by v-for)
  4155. if (isTrue(children._isVList) &&
  4156. isDef(c.tag) &&
  4157. isUndef(c.key) &&
  4158. isDef(nestedIndex)) {
  4159. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  4160. }
  4161. res.push(c);
  4162. }
  4163. }
  4164. }
  4165. return res
  4166. }
  4167. /* */
  4168. function initProvide (vm) {
  4169. var provide = vm.$options.provide;
  4170. if (provide) {
  4171. vm._provided = typeof provide === 'function'
  4172. ? provide.call(vm)
  4173. : provide;
  4174. }
  4175. }
  4176. function initInjections (vm) {
  4177. var result = resolveInject(vm.$options.inject, vm);
  4178. if (result) {
  4179. toggleObserving(false);
  4180. Object.keys(result).forEach(function (key) {
  4181. /* istanbul ignore else */
  4182. if (true) {
  4183. defineReactive$$1(vm, key, result[key], function () {
  4184. warn(
  4185. "Avoid mutating an injected value directly since the changes will be " +
  4186. "overwritten whenever the provided component re-renders. " +
  4187. "injection being mutated: \"" + key + "\"",
  4188. vm
  4189. );
  4190. });
  4191. } else {}
  4192. });
  4193. toggleObserving(true);
  4194. }
  4195. }
  4196. function resolveInject (inject, vm) {
  4197. if (inject) {
  4198. // inject is :any because flow is not smart enough to figure out cached
  4199. var result = Object.create(null);
  4200. var keys = hasSymbol
  4201. ? Reflect.ownKeys(inject)
  4202. : Object.keys(inject);
  4203. for (var i = 0; i < keys.length; i++) {
  4204. var key = keys[i];
  4205. // #6574 in case the inject object is observed...
  4206. if (key === '__ob__') { continue }
  4207. var provideKey = inject[key].from;
  4208. var source = vm;
  4209. while (source) {
  4210. if (source._provided && hasOwn(source._provided, provideKey)) {
  4211. result[key] = source._provided[provideKey];
  4212. break
  4213. }
  4214. source = source.$parent;
  4215. }
  4216. if (!source) {
  4217. if ('default' in inject[key]) {
  4218. var provideDefault = inject[key].default;
  4219. result[key] = typeof provideDefault === 'function'
  4220. ? provideDefault.call(vm)
  4221. : provideDefault;
  4222. } else if (true) {
  4223. warn(("Injection \"" + key + "\" not found"), vm);
  4224. }
  4225. }
  4226. }
  4227. return result
  4228. }
  4229. }
  4230. /* */
  4231. /**
  4232. * Runtime helper for resolving raw children VNodes into a slot object.
  4233. */
  4234. function resolveSlots (
  4235. children,
  4236. context
  4237. ) {
  4238. if (!children || !children.length) {
  4239. return {}
  4240. }
  4241. var slots = {};
  4242. for (var i = 0, l = children.length; i < l; i++) {
  4243. var child = children[i];
  4244. var data = child.data;
  4245. // remove slot attribute if the node is resolved as a Vue slot node
  4246. if (data && data.attrs && data.attrs.slot) {
  4247. delete data.attrs.slot;
  4248. }
  4249. // named slots should only be respected if the vnode was rendered in the
  4250. // same context.
  4251. if ((child.context === context || child.fnContext === context) &&
  4252. data && data.slot != null
  4253. ) {
  4254. var name = data.slot;
  4255. var slot = (slots[name] || (slots[name] = []));
  4256. if (child.tag === 'template') {
  4257. slot.push.apply(slot, child.children || []);
  4258. } else {
  4259. slot.push(child);
  4260. }
  4261. } else {
  4262. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  4263. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  4264. (slots['page'] || (slots['page'] = [])).push(child);
  4265. }else{
  4266. (slots.default || (slots.default = [])).push(child);
  4267. }
  4268. }
  4269. }
  4270. // ignore slots that contains only whitespace
  4271. for (var name$1 in slots) {
  4272. if (slots[name$1].every(isWhitespace)) {
  4273. delete slots[name$1];
  4274. }
  4275. }
  4276. return slots
  4277. }
  4278. function isWhitespace (node) {
  4279. return (node.isComment && !node.asyncFactory) || node.text === ' '
  4280. }
  4281. /* */
  4282. function normalizeScopedSlots (
  4283. slots,
  4284. normalSlots,
  4285. prevSlots
  4286. ) {
  4287. var res;
  4288. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  4289. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  4290. var key = slots && slots.$key;
  4291. if (!slots) {
  4292. res = {};
  4293. } else if (slots._normalized) {
  4294. // fast path 1: child component re-render only, parent did not change
  4295. return slots._normalized
  4296. } else if (
  4297. isStable &&
  4298. prevSlots &&
  4299. prevSlots !== emptyObject &&
  4300. key === prevSlots.$key &&
  4301. !hasNormalSlots &&
  4302. !prevSlots.$hasNormal
  4303. ) {
  4304. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  4305. // only need to normalize once
  4306. return prevSlots
  4307. } else {
  4308. res = {};
  4309. for (var key$1 in slots) {
  4310. if (slots[key$1] && key$1[0] !== '$') {
  4311. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  4312. }
  4313. }
  4314. }
  4315. // expose normal slots on scopedSlots
  4316. for (var key$2 in normalSlots) {
  4317. if (!(key$2 in res)) {
  4318. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  4319. }
  4320. }
  4321. // avoriaz seems to mock a non-extensible $scopedSlots object
  4322. // and when that is passed down this would cause an error
  4323. if (slots && Object.isExtensible(slots)) {
  4324. (slots)._normalized = res;
  4325. }
  4326. def(res, '$stable', isStable);
  4327. def(res, '$key', key);
  4328. def(res, '$hasNormal', hasNormalSlots);
  4329. return res
  4330. }
  4331. function normalizeScopedSlot(normalSlots, key, fn) {
  4332. var normalized = function () {
  4333. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  4334. res = res && typeof res === 'object' && !Array.isArray(res)
  4335. ? [res] // single vnode
  4336. : normalizeChildren(res);
  4337. return res && (
  4338. res.length === 0 ||
  4339. (res.length === 1 && res[0].isComment) // #9658
  4340. ) ? undefined
  4341. : res
  4342. };
  4343. // this is a slot using the new v-slot syntax without scope. although it is
  4344. // compiled as a scoped slot, render fn users would expect it to be present
  4345. // on this.$slots because the usage is semantically a normal slot.
  4346. if (fn.proxy) {
  4347. Object.defineProperty(normalSlots, key, {
  4348. get: normalized,
  4349. enumerable: true,
  4350. configurable: true
  4351. });
  4352. }
  4353. return normalized
  4354. }
  4355. function proxyNormalSlot(slots, key) {
  4356. return function () { return slots[key]; }
  4357. }
  4358. /* */
  4359. /**
  4360. * Runtime helper for rendering v-for lists.
  4361. */
  4362. function renderList (
  4363. val,
  4364. render
  4365. ) {
  4366. var ret, i, l, keys, key;
  4367. if (Array.isArray(val) || typeof val === 'string') {
  4368. ret = new Array(val.length);
  4369. for (i = 0, l = val.length; i < l; i++) {
  4370. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  4371. }
  4372. } else if (typeof val === 'number') {
  4373. ret = new Array(val);
  4374. for (i = 0; i < val; i++) {
  4375. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  4376. }
  4377. } else if (isObject(val)) {
  4378. if (hasSymbol && val[Symbol.iterator]) {
  4379. ret = [];
  4380. var iterator = val[Symbol.iterator]();
  4381. var result = iterator.next();
  4382. while (!result.done) {
  4383. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  4384. result = iterator.next();
  4385. }
  4386. } else {
  4387. keys = Object.keys(val);
  4388. ret = new Array(keys.length);
  4389. for (i = 0, l = keys.length; i < l; i++) {
  4390. key = keys[i];
  4391. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  4392. }
  4393. }
  4394. }
  4395. if (!isDef(ret)) {
  4396. ret = [];
  4397. }
  4398. (ret)._isVList = true;
  4399. return ret
  4400. }
  4401. /* */
  4402. /**
  4403. * Runtime helper for rendering <slot>
  4404. */
  4405. function renderSlot (
  4406. name,
  4407. fallback,
  4408. props,
  4409. bindObject
  4410. ) {
  4411. var scopedSlotFn = this.$scopedSlots[name];
  4412. var nodes;
  4413. if (scopedSlotFn) { // scoped slot
  4414. props = props || {};
  4415. if (bindObject) {
  4416. if ( true && !isObject(bindObject)) {
  4417. warn(
  4418. 'slot v-bind without argument expects an Object',
  4419. this
  4420. );
  4421. }
  4422. props = extend(extend({}, bindObject), props);
  4423. }
  4424. // fixed by xxxxxx app-plus scopedSlot
  4425. nodes = scopedSlotFn(props, this, props._i) || fallback;
  4426. } else {
  4427. nodes = this.$slots[name] || fallback;
  4428. }
  4429. var target = props && props.slot;
  4430. if (target) {
  4431. return this.$createElement('template', { slot: target }, nodes)
  4432. } else {
  4433. return nodes
  4434. }
  4435. }
  4436. /* */
  4437. /**
  4438. * Runtime helper for resolving filters
  4439. */
  4440. function resolveFilter (id) {
  4441. return resolveAsset(this.$options, 'filters', id, true) || identity
  4442. }
  4443. /* */
  4444. function isKeyNotMatch (expect, actual) {
  4445. if (Array.isArray(expect)) {
  4446. return expect.indexOf(actual) === -1
  4447. } else {
  4448. return expect !== actual
  4449. }
  4450. }
  4451. /**
  4452. * Runtime helper for checking keyCodes from config.
  4453. * exposed as Vue.prototype._k
  4454. * passing in eventKeyName as last argument separately for backwards compat
  4455. */
  4456. function checkKeyCodes (
  4457. eventKeyCode,
  4458. key,
  4459. builtInKeyCode,
  4460. eventKeyName,
  4461. builtInKeyName
  4462. ) {
  4463. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  4464. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  4465. return isKeyNotMatch(builtInKeyName, eventKeyName)
  4466. } else if (mappedKeyCode) {
  4467. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  4468. } else if (eventKeyName) {
  4469. return hyphenate(eventKeyName) !== key
  4470. }
  4471. }
  4472. /* */
  4473. /**
  4474. * Runtime helper for merging v-bind="object" into a VNode's data.
  4475. */
  4476. function bindObjectProps (
  4477. data,
  4478. tag,
  4479. value,
  4480. asProp,
  4481. isSync
  4482. ) {
  4483. if (value) {
  4484. if (!isObject(value)) {
  4485. true && warn(
  4486. 'v-bind without argument expects an Object or Array value',
  4487. this
  4488. );
  4489. } else {
  4490. if (Array.isArray(value)) {
  4491. value = toObject(value);
  4492. }
  4493. var hash;
  4494. var loop = function ( key ) {
  4495. if (
  4496. key === 'class' ||
  4497. key === 'style' ||
  4498. isReservedAttribute(key)
  4499. ) {
  4500. hash = data;
  4501. } else {
  4502. var type = data.attrs && data.attrs.type;
  4503. hash = asProp || config.mustUseProp(tag, type, key)
  4504. ? data.domProps || (data.domProps = {})
  4505. : data.attrs || (data.attrs = {});
  4506. }
  4507. var camelizedKey = camelize(key);
  4508. var hyphenatedKey = hyphenate(key);
  4509. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  4510. hash[key] = value[key];
  4511. if (isSync) {
  4512. var on = data.on || (data.on = {});
  4513. on[("update:" + key)] = function ($event) {
  4514. value[key] = $event;
  4515. };
  4516. }
  4517. }
  4518. };
  4519. for (var key in value) loop( key );
  4520. }
  4521. }
  4522. return data
  4523. }
  4524. /* */
  4525. /**
  4526. * Runtime helper for rendering static trees.
  4527. */
  4528. function renderStatic (
  4529. index,
  4530. isInFor
  4531. ) {
  4532. var cached = this._staticTrees || (this._staticTrees = []);
  4533. var tree = cached[index];
  4534. // if has already-rendered static tree and not inside v-for,
  4535. // we can reuse the same tree.
  4536. if (tree && !isInFor) {
  4537. return tree
  4538. }
  4539. // otherwise, render a fresh tree.
  4540. tree = cached[index] = this.$options.staticRenderFns[index].call(
  4541. this._renderProxy,
  4542. null,
  4543. this // for render fns generated for functional component templates
  4544. );
  4545. markStatic(tree, ("__static__" + index), false);
  4546. return tree
  4547. }
  4548. /**
  4549. * Runtime helper for v-once.
  4550. * Effectively it means marking the node as static with a unique key.
  4551. */
  4552. function markOnce (
  4553. tree,
  4554. index,
  4555. key
  4556. ) {
  4557. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  4558. return tree
  4559. }
  4560. function markStatic (
  4561. tree,
  4562. key,
  4563. isOnce
  4564. ) {
  4565. if (Array.isArray(tree)) {
  4566. for (var i = 0; i < tree.length; i++) {
  4567. if (tree[i] && typeof tree[i] !== 'string') {
  4568. markStaticNode(tree[i], (key + "_" + i), isOnce);
  4569. }
  4570. }
  4571. } else {
  4572. markStaticNode(tree, key, isOnce);
  4573. }
  4574. }
  4575. function markStaticNode (node, key, isOnce) {
  4576. node.isStatic = true;
  4577. node.key = key;
  4578. node.isOnce = isOnce;
  4579. }
  4580. /* */
  4581. function bindObjectListeners (data, value) {
  4582. if (value) {
  4583. if (!isPlainObject(value)) {
  4584. true && warn(
  4585. 'v-on without argument expects an Object value',
  4586. this
  4587. );
  4588. } else {
  4589. var on = data.on = data.on ? extend({}, data.on) : {};
  4590. for (var key in value) {
  4591. var existing = on[key];
  4592. var ours = value[key];
  4593. on[key] = existing ? [].concat(existing, ours) : ours;
  4594. }
  4595. }
  4596. }
  4597. return data
  4598. }
  4599. /* */
  4600. function resolveScopedSlots (
  4601. fns, // see flow/vnode
  4602. res,
  4603. // the following are added in 2.6
  4604. hasDynamicKeys,
  4605. contentHashKey
  4606. ) {
  4607. res = res || { $stable: !hasDynamicKeys };
  4608. for (var i = 0; i < fns.length; i++) {
  4609. var slot = fns[i];
  4610. if (Array.isArray(slot)) {
  4611. resolveScopedSlots(slot, res, hasDynamicKeys);
  4612. } else if (slot) {
  4613. // marker for reverse proxying v-slot without scope on this.$slots
  4614. if (slot.proxy) {
  4615. slot.fn.proxy = true;
  4616. }
  4617. res[slot.key] = slot.fn;
  4618. }
  4619. }
  4620. if (contentHashKey) {
  4621. (res).$key = contentHashKey;
  4622. }
  4623. return res
  4624. }
  4625. /* */
  4626. function bindDynamicKeys (baseObj, values) {
  4627. for (var i = 0; i < values.length; i += 2) {
  4628. var key = values[i];
  4629. if (typeof key === 'string' && key) {
  4630. baseObj[values[i]] = values[i + 1];
  4631. } else if ( true && key !== '' && key !== null) {
  4632. // null is a special value for explicitly removing a binding
  4633. warn(
  4634. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  4635. this
  4636. );
  4637. }
  4638. }
  4639. return baseObj
  4640. }
  4641. // helper to dynamically append modifier runtime markers to event names.
  4642. // ensure only append when value is already string, otherwise it will be cast
  4643. // to string and cause the type check to miss.
  4644. function prependModifier (value, symbol) {
  4645. return typeof value === 'string' ? symbol + value : value
  4646. }
  4647. /* */
  4648. function installRenderHelpers (target) {
  4649. target._o = markOnce;
  4650. target._n = toNumber;
  4651. target._s = toString;
  4652. target._l = renderList;
  4653. target._t = renderSlot;
  4654. target._q = looseEqual;
  4655. target._i = looseIndexOf;
  4656. target._m = renderStatic;
  4657. target._f = resolveFilter;
  4658. target._k = checkKeyCodes;
  4659. target._b = bindObjectProps;
  4660. target._v = createTextVNode;
  4661. target._e = createEmptyVNode;
  4662. target._u = resolveScopedSlots;
  4663. target._g = bindObjectListeners;
  4664. target._d = bindDynamicKeys;
  4665. target._p = prependModifier;
  4666. }
  4667. /* */
  4668. function FunctionalRenderContext (
  4669. data,
  4670. props,
  4671. children,
  4672. parent,
  4673. Ctor
  4674. ) {
  4675. var this$1 = this;
  4676. var options = Ctor.options;
  4677. // ensure the createElement function in functional components
  4678. // gets a unique context - this is necessary for correct named slot check
  4679. var contextVm;
  4680. if (hasOwn(parent, '_uid')) {
  4681. contextVm = Object.create(parent);
  4682. // $flow-disable-line
  4683. contextVm._original = parent;
  4684. } else {
  4685. // the context vm passed in is a functional context as well.
  4686. // in this case we want to make sure we are able to get a hold to the
  4687. // real context instance.
  4688. contextVm = parent;
  4689. // $flow-disable-line
  4690. parent = parent._original;
  4691. }
  4692. var isCompiled = isTrue(options._compiled);
  4693. var needNormalization = !isCompiled;
  4694. this.data = data;
  4695. this.props = props;
  4696. this.children = children;
  4697. this.parent = parent;
  4698. this.listeners = data.on || emptyObject;
  4699. this.injections = resolveInject(options.inject, parent);
  4700. this.slots = function () {
  4701. if (!this$1.$slots) {
  4702. normalizeScopedSlots(
  4703. data.scopedSlots,
  4704. this$1.$slots = resolveSlots(children, parent)
  4705. );
  4706. }
  4707. return this$1.$slots
  4708. };
  4709. Object.defineProperty(this, 'scopedSlots', ({
  4710. enumerable: true,
  4711. get: function get () {
  4712. return normalizeScopedSlots(data.scopedSlots, this.slots())
  4713. }
  4714. }));
  4715. // support for compiled functional template
  4716. if (isCompiled) {
  4717. // exposing $options for renderStatic()
  4718. this.$options = options;
  4719. // pre-resolve slots for renderSlot()
  4720. this.$slots = this.slots();
  4721. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  4722. }
  4723. if (options._scopeId) {
  4724. this._c = function (a, b, c, d) {
  4725. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  4726. if (vnode && !Array.isArray(vnode)) {
  4727. vnode.fnScopeId = options._scopeId;
  4728. vnode.fnContext = parent;
  4729. }
  4730. return vnode
  4731. };
  4732. } else {
  4733. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  4734. }
  4735. }
  4736. installRenderHelpers(FunctionalRenderContext.prototype);
  4737. function createFunctionalComponent (
  4738. Ctor,
  4739. propsData,
  4740. data,
  4741. contextVm,
  4742. children
  4743. ) {
  4744. var options = Ctor.options;
  4745. var props = {};
  4746. var propOptions = options.props;
  4747. if (isDef(propOptions)) {
  4748. for (var key in propOptions) {
  4749. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  4750. }
  4751. } else {
  4752. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  4753. if (isDef(data.props)) { mergeProps(props, data.props); }
  4754. }
  4755. var renderContext = new FunctionalRenderContext(
  4756. data,
  4757. props,
  4758. children,
  4759. contextVm,
  4760. Ctor
  4761. );
  4762. var vnode = options.render.call(null, renderContext._c, renderContext);
  4763. if (vnode instanceof VNode) {
  4764. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  4765. } else if (Array.isArray(vnode)) {
  4766. var vnodes = normalizeChildren(vnode) || [];
  4767. var res = new Array(vnodes.length);
  4768. for (var i = 0; i < vnodes.length; i++) {
  4769. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  4770. }
  4771. return res
  4772. }
  4773. }
  4774. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  4775. // #7817 clone node before setting fnContext, otherwise if the node is reused
  4776. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  4777. // that should not be matched to match.
  4778. var clone = cloneVNode(vnode);
  4779. clone.fnContext = contextVm;
  4780. clone.fnOptions = options;
  4781. if (true) {
  4782. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  4783. }
  4784. if (data.slot) {
  4785. (clone.data || (clone.data = {})).slot = data.slot;
  4786. }
  4787. return clone
  4788. }
  4789. function mergeProps (to, from) {
  4790. for (var key in from) {
  4791. to[camelize(key)] = from[key];
  4792. }
  4793. }
  4794. /* */
  4795. /* */
  4796. /* */
  4797. /* */
  4798. // inline hooks to be invoked on component VNodes during patch
  4799. var componentVNodeHooks = {
  4800. init: function init (vnode, hydrating) {
  4801. if (
  4802. vnode.componentInstance &&
  4803. !vnode.componentInstance._isDestroyed &&
  4804. vnode.data.keepAlive
  4805. ) {
  4806. // kept-alive components, treat as a patch
  4807. var mountedNode = vnode; // work around flow
  4808. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  4809. } else {
  4810. var child = vnode.componentInstance = createComponentInstanceForVnode(
  4811. vnode,
  4812. activeInstance
  4813. );
  4814. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  4815. }
  4816. },
  4817. prepatch: function prepatch (oldVnode, vnode) {
  4818. var options = vnode.componentOptions;
  4819. var child = vnode.componentInstance = oldVnode.componentInstance;
  4820. updateChildComponent(
  4821. child,
  4822. options.propsData, // updated props
  4823. options.listeners, // updated listeners
  4824. vnode, // new parent vnode
  4825. options.children // new children
  4826. );
  4827. },
  4828. insert: function insert (vnode) {
  4829. var context = vnode.context;
  4830. var componentInstance = vnode.componentInstance;
  4831. if (!componentInstance._isMounted) {
  4832. callHook(componentInstance, 'onServiceCreated');
  4833. callHook(componentInstance, 'onServiceAttached');
  4834. componentInstance._isMounted = true;
  4835. callHook(componentInstance, 'mounted');
  4836. }
  4837. if (vnode.data.keepAlive) {
  4838. if (context._isMounted) {
  4839. // vue-router#1212
  4840. // During updates, a kept-alive component's child components may
  4841. // change, so directly walking the tree here may call activated hooks
  4842. // on incorrect children. Instead we push them into a queue which will
  4843. // be processed after the whole patch process ended.
  4844. queueActivatedComponent(componentInstance);
  4845. } else {
  4846. activateChildComponent(componentInstance, true /* direct */);
  4847. }
  4848. }
  4849. },
  4850. destroy: function destroy (vnode) {
  4851. var componentInstance = vnode.componentInstance;
  4852. if (!componentInstance._isDestroyed) {
  4853. if (!vnode.data.keepAlive) {
  4854. componentInstance.$destroy();
  4855. } else {
  4856. deactivateChildComponent(componentInstance, true /* direct */);
  4857. }
  4858. }
  4859. }
  4860. };
  4861. var hooksToMerge = Object.keys(componentVNodeHooks);
  4862. function createComponent (
  4863. Ctor,
  4864. data,
  4865. context,
  4866. children,
  4867. tag
  4868. ) {
  4869. if (isUndef(Ctor)) {
  4870. return
  4871. }
  4872. var baseCtor = context.$options._base;
  4873. // plain options object: turn it into a constructor
  4874. if (isObject(Ctor)) {
  4875. Ctor = baseCtor.extend(Ctor);
  4876. }
  4877. // if at this stage it's not a constructor or an async component factory,
  4878. // reject.
  4879. if (typeof Ctor !== 'function') {
  4880. if (true) {
  4881. warn(("Invalid Component definition: " + (String(Ctor))), context);
  4882. }
  4883. return
  4884. }
  4885. // async component
  4886. var asyncFactory;
  4887. if (isUndef(Ctor.cid)) {
  4888. asyncFactory = Ctor;
  4889. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  4890. if (Ctor === undefined) {
  4891. // return a placeholder node for async component, which is rendered
  4892. // as a comment node but preserves all the raw information for the node.
  4893. // the information will be used for async server-rendering and hydration.
  4894. return createAsyncPlaceholder(
  4895. asyncFactory,
  4896. data,
  4897. context,
  4898. children,
  4899. tag
  4900. )
  4901. }
  4902. }
  4903. data = data || {};
  4904. // resolve constructor options in case global mixins are applied after
  4905. // component constructor creation
  4906. resolveConstructorOptions(Ctor);
  4907. // transform component v-model data into props & events
  4908. if (isDef(data.model)) {
  4909. transformModel(Ctor.options, data);
  4910. }
  4911. // extract props
  4912. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  4913. // functional component
  4914. if (isTrue(Ctor.options.functional)) {
  4915. return createFunctionalComponent(Ctor, propsData, data, context, children)
  4916. }
  4917. // extract listeners, since these needs to be treated as
  4918. // child component listeners instead of DOM listeners
  4919. var listeners = data.on;
  4920. // replace with listeners with .native modifier
  4921. // so it gets processed during parent component patch.
  4922. data.on = data.nativeOn;
  4923. if (isTrue(Ctor.options.abstract)) {
  4924. // abstract components do not keep anything
  4925. // other than props & listeners & slot
  4926. // work around flow
  4927. var slot = data.slot;
  4928. data = {};
  4929. if (slot) {
  4930. data.slot = slot;
  4931. }
  4932. }
  4933. // install component management hooks onto the placeholder node
  4934. installComponentHooks(data);
  4935. // return a placeholder vnode
  4936. var name = Ctor.options.name || tag;
  4937. var vnode = new VNode(
  4938. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  4939. data, undefined, undefined, undefined, context,
  4940. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  4941. asyncFactory
  4942. );
  4943. return vnode
  4944. }
  4945. function createComponentInstanceForVnode (
  4946. vnode, // we know it's MountedComponentVNode but flow doesn't
  4947. parent // activeInstance in lifecycle state
  4948. ) {
  4949. var options = {
  4950. _isComponent: true,
  4951. _parentVnode: vnode,
  4952. parent: parent
  4953. };
  4954. // check inline-template render functions
  4955. var inlineTemplate = vnode.data.inlineTemplate;
  4956. if (isDef(inlineTemplate)) {
  4957. options.render = inlineTemplate.render;
  4958. options.staticRenderFns = inlineTemplate.staticRenderFns;
  4959. }
  4960. return new vnode.componentOptions.Ctor(options)
  4961. }
  4962. function installComponentHooks (data) {
  4963. var hooks = data.hook || (data.hook = {});
  4964. for (var i = 0; i < hooksToMerge.length; i++) {
  4965. var key = hooksToMerge[i];
  4966. var existing = hooks[key];
  4967. var toMerge = componentVNodeHooks[key];
  4968. if (existing !== toMerge && !(existing && existing._merged)) {
  4969. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  4970. }
  4971. }
  4972. }
  4973. function mergeHook$1 (f1, f2) {
  4974. var merged = function (a, b) {
  4975. // flow complains about extra args which is why we use any
  4976. f1(a, b);
  4977. f2(a, b);
  4978. };
  4979. merged._merged = true;
  4980. return merged
  4981. }
  4982. // transform component v-model info (value and callback) into
  4983. // prop and event handler respectively.
  4984. function transformModel (options, data) {
  4985. var prop = (options.model && options.model.prop) || 'value';
  4986. var event = (options.model && options.model.event) || 'input'
  4987. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  4988. var on = data.on || (data.on = {});
  4989. var existing = on[event];
  4990. var callback = data.model.callback;
  4991. if (isDef(existing)) {
  4992. if (
  4993. Array.isArray(existing)
  4994. ? existing.indexOf(callback) === -1
  4995. : existing !== callback
  4996. ) {
  4997. on[event] = [callback].concat(existing);
  4998. }
  4999. } else {
  5000. on[event] = callback;
  5001. }
  5002. }
  5003. /* */
  5004. var SIMPLE_NORMALIZE = 1;
  5005. var ALWAYS_NORMALIZE = 2;
  5006. // wrapper function for providing a more flexible interface
  5007. // without getting yelled at by flow
  5008. function createElement (
  5009. context,
  5010. tag,
  5011. data,
  5012. children,
  5013. normalizationType,
  5014. alwaysNormalize
  5015. ) {
  5016. if (Array.isArray(data) || isPrimitive(data)) {
  5017. normalizationType = children;
  5018. children = data;
  5019. data = undefined;
  5020. }
  5021. if (isTrue(alwaysNormalize)) {
  5022. normalizationType = ALWAYS_NORMALIZE;
  5023. }
  5024. return _createElement(context, tag, data, children, normalizationType)
  5025. }
  5026. function _createElement (
  5027. context,
  5028. tag,
  5029. data,
  5030. children,
  5031. normalizationType
  5032. ) {
  5033. if (isDef(data) && isDef((data).__ob__)) {
  5034. true && warn(
  5035. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  5036. 'Always create fresh vnode data objects in each render!',
  5037. context
  5038. );
  5039. return createEmptyVNode()
  5040. }
  5041. // object syntax in v-bind
  5042. if (isDef(data) && isDef(data.is)) {
  5043. tag = data.is;
  5044. }
  5045. if (!tag) {
  5046. // in case of component :is set to falsy value
  5047. return createEmptyVNode()
  5048. }
  5049. // warn against non-primitive key
  5050. if ( true &&
  5051. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  5052. ) {
  5053. {
  5054. warn(
  5055. 'Avoid using non-primitive value as key, ' +
  5056. 'use string/number value instead.',
  5057. context
  5058. );
  5059. }
  5060. }
  5061. // support single function children as default scoped slot
  5062. if (Array.isArray(children) &&
  5063. typeof children[0] === 'function'
  5064. ) {
  5065. data = data || {};
  5066. data.scopedSlots = { default: children[0] };
  5067. children.length = 0;
  5068. }
  5069. if (normalizationType === ALWAYS_NORMALIZE) {
  5070. children = normalizeChildren(children);
  5071. } else if (normalizationType === SIMPLE_NORMALIZE) {
  5072. children = simpleNormalizeChildren(children);
  5073. }
  5074. var vnode, ns;
  5075. if (typeof tag === 'string') {
  5076. var Ctor;
  5077. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  5078. if (config.isReservedTag(tag)) {
  5079. // platform built-in elements
  5080. if ( true && isDef(data) && isDef(data.nativeOn)) {
  5081. warn(
  5082. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  5083. context
  5084. );
  5085. }
  5086. vnode = new VNode(
  5087. config.parsePlatformTagName(tag), data, children,
  5088. undefined, undefined, context
  5089. );
  5090. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  5091. // component
  5092. vnode = createComponent(Ctor, data, context, children, tag);
  5093. } else {
  5094. // unknown or unlisted namespaced elements
  5095. // check at runtime because it may get assigned a namespace when its
  5096. // parent normalizes children
  5097. vnode = new VNode(
  5098. tag, data, children,
  5099. undefined, undefined, context
  5100. );
  5101. }
  5102. } else {
  5103. // direct component options / constructor
  5104. vnode = createComponent(tag, data, context, children);
  5105. }
  5106. if (Array.isArray(vnode)) {
  5107. return vnode
  5108. } else if (isDef(vnode)) {
  5109. if (isDef(ns)) { applyNS(vnode, ns); }
  5110. if (isDef(data)) { registerDeepBindings(data); }
  5111. return vnode
  5112. } else {
  5113. return createEmptyVNode()
  5114. }
  5115. }
  5116. function applyNS (vnode, ns, force) {
  5117. vnode.ns = ns;
  5118. if (vnode.tag === 'foreignObject') {
  5119. // use default namespace inside foreignObject
  5120. ns = undefined;
  5121. force = true;
  5122. }
  5123. if (isDef(vnode.children)) {
  5124. for (var i = 0, l = vnode.children.length; i < l; i++) {
  5125. var child = vnode.children[i];
  5126. if (isDef(child.tag) && (
  5127. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  5128. applyNS(child, ns, force);
  5129. }
  5130. }
  5131. }
  5132. }
  5133. // ref #5318
  5134. // necessary to ensure parent re-render when deep bindings like :style and
  5135. // :class are used on slot nodes
  5136. function registerDeepBindings (data) {
  5137. if (isObject(data.style)) {
  5138. traverse(data.style);
  5139. }
  5140. if (isObject(data.class)) {
  5141. traverse(data.class);
  5142. }
  5143. }
  5144. /* */
  5145. function initRender (vm) {
  5146. vm._vnode = null; // the root of the child tree
  5147. vm._staticTrees = null; // v-once cached trees
  5148. var options = vm.$options;
  5149. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  5150. var renderContext = parentVnode && parentVnode.context;
  5151. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  5152. vm.$scopedSlots = emptyObject;
  5153. // bind the createElement fn to this instance
  5154. // so that we get proper render context inside it.
  5155. // args order: tag, data, children, normalizationType, alwaysNormalize
  5156. // internal version is used by render functions compiled from templates
  5157. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  5158. // normalization is always applied for the public version, used in
  5159. // user-written render functions.
  5160. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  5161. // $attrs & $listeners are exposed for easier HOC creation.
  5162. // they need to be reactive so that HOCs using them are always updated
  5163. var parentData = parentVnode && parentVnode.data;
  5164. /* istanbul ignore else */
  5165. if (true) {
  5166. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  5167. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  5168. }, true);
  5169. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  5170. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  5171. }, true);
  5172. } else {}
  5173. }
  5174. var currentRenderingInstance = null;
  5175. function renderMixin (Vue) {
  5176. // install runtime convenience helpers
  5177. installRenderHelpers(Vue.prototype);
  5178. Vue.prototype.$nextTick = function (fn) {
  5179. return nextTick(fn, this)
  5180. };
  5181. Vue.prototype._render = function () {
  5182. var vm = this;
  5183. var ref = vm.$options;
  5184. var render = ref.render;
  5185. var _parentVnode = ref._parentVnode;
  5186. if (_parentVnode) {
  5187. vm.$scopedSlots = normalizeScopedSlots(
  5188. _parentVnode.data.scopedSlots,
  5189. vm.$slots,
  5190. vm.$scopedSlots
  5191. );
  5192. }
  5193. // set parent vnode. this allows render functions to have access
  5194. // to the data on the placeholder node.
  5195. vm.$vnode = _parentVnode;
  5196. // render self
  5197. var vnode;
  5198. try {
  5199. // There's no need to maintain a stack because all render fns are called
  5200. // separately from one another. Nested component's render fns are called
  5201. // when parent component is patched.
  5202. currentRenderingInstance = vm;
  5203. vnode = render.call(vm._renderProxy, vm.$createElement);
  5204. } catch (e) {
  5205. handleError(e, vm, "render");
  5206. // return error render result,
  5207. // or previous vnode to prevent render error causing blank component
  5208. /* istanbul ignore else */
  5209. if ( true && vm.$options.renderError) {
  5210. try {
  5211. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  5212. } catch (e) {
  5213. handleError(e, vm, "renderError");
  5214. vnode = vm._vnode;
  5215. }
  5216. } else {
  5217. vnode = vm._vnode;
  5218. }
  5219. } finally {
  5220. currentRenderingInstance = null;
  5221. }
  5222. // if the returned array contains only a single node, allow it
  5223. if (Array.isArray(vnode) && vnode.length === 1) {
  5224. vnode = vnode[0];
  5225. }
  5226. // return empty vnode in case the render function errored out
  5227. if (!(vnode instanceof VNode)) {
  5228. if ( true && Array.isArray(vnode)) {
  5229. warn(
  5230. 'Multiple root nodes returned from render function. Render function ' +
  5231. 'should return a single root node.',
  5232. vm
  5233. );
  5234. }
  5235. vnode = createEmptyVNode();
  5236. }
  5237. // set parent
  5238. vnode.parent = _parentVnode;
  5239. return vnode
  5240. };
  5241. }
  5242. /* */
  5243. function ensureCtor (comp, base) {
  5244. if (
  5245. comp.__esModule ||
  5246. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  5247. ) {
  5248. comp = comp.default;
  5249. }
  5250. return isObject(comp)
  5251. ? base.extend(comp)
  5252. : comp
  5253. }
  5254. function createAsyncPlaceholder (
  5255. factory,
  5256. data,
  5257. context,
  5258. children,
  5259. tag
  5260. ) {
  5261. var node = createEmptyVNode();
  5262. node.asyncFactory = factory;
  5263. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  5264. return node
  5265. }
  5266. function resolveAsyncComponent (
  5267. factory,
  5268. baseCtor
  5269. ) {
  5270. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  5271. return factory.errorComp
  5272. }
  5273. if (isDef(factory.resolved)) {
  5274. return factory.resolved
  5275. }
  5276. var owner = currentRenderingInstance;
  5277. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  5278. // already pending
  5279. factory.owners.push(owner);
  5280. }
  5281. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  5282. return factory.loadingComp
  5283. }
  5284. if (owner && !isDef(factory.owners)) {
  5285. var owners = factory.owners = [owner];
  5286. var sync = true;
  5287. var timerLoading = null;
  5288. var timerTimeout = null
  5289. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  5290. var forceRender = function (renderCompleted) {
  5291. for (var i = 0, l = owners.length; i < l; i++) {
  5292. (owners[i]).$forceUpdate();
  5293. }
  5294. if (renderCompleted) {
  5295. owners.length = 0;
  5296. if (timerLoading !== null) {
  5297. clearTimeout(timerLoading);
  5298. timerLoading = null;
  5299. }
  5300. if (timerTimeout !== null) {
  5301. clearTimeout(timerTimeout);
  5302. timerTimeout = null;
  5303. }
  5304. }
  5305. };
  5306. var resolve = once(function (res) {
  5307. // cache resolved
  5308. factory.resolved = ensureCtor(res, baseCtor);
  5309. // invoke callbacks only if this is not a synchronous resolve
  5310. // (async resolves are shimmed as synchronous during SSR)
  5311. if (!sync) {
  5312. forceRender(true);
  5313. } else {
  5314. owners.length = 0;
  5315. }
  5316. });
  5317. var reject = once(function (reason) {
  5318. true && warn(
  5319. "Failed to resolve async component: " + (String(factory)) +
  5320. (reason ? ("\nReason: " + reason) : '')
  5321. );
  5322. if (isDef(factory.errorComp)) {
  5323. factory.error = true;
  5324. forceRender(true);
  5325. }
  5326. });
  5327. var res = factory(resolve, reject);
  5328. if (isObject(res)) {
  5329. if (isPromise(res)) {
  5330. // () => Promise
  5331. if (isUndef(factory.resolved)) {
  5332. res.then(resolve, reject);
  5333. }
  5334. } else if (isPromise(res.component)) {
  5335. res.component.then(resolve, reject);
  5336. if (isDef(res.error)) {
  5337. factory.errorComp = ensureCtor(res.error, baseCtor);
  5338. }
  5339. if (isDef(res.loading)) {
  5340. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  5341. if (res.delay === 0) {
  5342. factory.loading = true;
  5343. } else {
  5344. timerLoading = setTimeout(function () {
  5345. timerLoading = null;
  5346. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  5347. factory.loading = true;
  5348. forceRender(false);
  5349. }
  5350. }, res.delay || 200);
  5351. }
  5352. }
  5353. if (isDef(res.timeout)) {
  5354. timerTimeout = setTimeout(function () {
  5355. timerTimeout = null;
  5356. if (isUndef(factory.resolved)) {
  5357. reject(
  5358. true
  5359. ? ("timeout (" + (res.timeout) + "ms)")
  5360. : undefined
  5361. );
  5362. }
  5363. }, res.timeout);
  5364. }
  5365. }
  5366. }
  5367. sync = false;
  5368. // return in case resolved synchronously
  5369. return factory.loading
  5370. ? factory.loadingComp
  5371. : factory.resolved
  5372. }
  5373. }
  5374. /* */
  5375. function isAsyncPlaceholder (node) {
  5376. return node.isComment && node.asyncFactory
  5377. }
  5378. /* */
  5379. function getFirstComponentChild (children) {
  5380. if (Array.isArray(children)) {
  5381. for (var i = 0; i < children.length; i++) {
  5382. var c = children[i];
  5383. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  5384. return c
  5385. }
  5386. }
  5387. }
  5388. }
  5389. /* */
  5390. /* */
  5391. function initEvents (vm) {
  5392. vm._events = Object.create(null);
  5393. vm._hasHookEvent = false;
  5394. // init parent attached events
  5395. var listeners = vm.$options._parentListeners;
  5396. if (listeners) {
  5397. updateComponentListeners(vm, listeners);
  5398. }
  5399. }
  5400. var target;
  5401. function add (event, fn) {
  5402. target.$on(event, fn);
  5403. }
  5404. function remove$1 (event, fn) {
  5405. target.$off(event, fn);
  5406. }
  5407. function createOnceHandler (event, fn) {
  5408. var _target = target;
  5409. return function onceHandler () {
  5410. var res = fn.apply(null, arguments);
  5411. if (res !== null) {
  5412. _target.$off(event, onceHandler);
  5413. }
  5414. }
  5415. }
  5416. function updateComponentListeners (
  5417. vm,
  5418. listeners,
  5419. oldListeners
  5420. ) {
  5421. target = vm;
  5422. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  5423. target = undefined;
  5424. }
  5425. function eventsMixin (Vue) {
  5426. var hookRE = /^hook:/;
  5427. Vue.prototype.$on = function (event, fn) {
  5428. var vm = this;
  5429. if (Array.isArray(event)) {
  5430. for (var i = 0, l = event.length; i < l; i++) {
  5431. vm.$on(event[i], fn);
  5432. }
  5433. } else {
  5434. (vm._events[event] || (vm._events[event] = [])).push(fn);
  5435. // optimize hook:event cost by using a boolean flag marked at registration
  5436. // instead of a hash lookup
  5437. if (hookRE.test(event)) {
  5438. vm._hasHookEvent = true;
  5439. }
  5440. }
  5441. return vm
  5442. };
  5443. Vue.prototype.$once = function (event, fn) {
  5444. var vm = this;
  5445. function on () {
  5446. vm.$off(event, on);
  5447. fn.apply(vm, arguments);
  5448. }
  5449. on.fn = fn;
  5450. vm.$on(event, on);
  5451. return vm
  5452. };
  5453. Vue.prototype.$off = function (event, fn) {
  5454. var vm = this;
  5455. // all
  5456. if (!arguments.length) {
  5457. vm._events = Object.create(null);
  5458. return vm
  5459. }
  5460. // array of events
  5461. if (Array.isArray(event)) {
  5462. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  5463. vm.$off(event[i$1], fn);
  5464. }
  5465. return vm
  5466. }
  5467. // specific event
  5468. var cbs = vm._events[event];
  5469. if (!cbs) {
  5470. return vm
  5471. }
  5472. if (!fn) {
  5473. vm._events[event] = null;
  5474. return vm
  5475. }
  5476. // specific handler
  5477. var cb;
  5478. var i = cbs.length;
  5479. while (i--) {
  5480. cb = cbs[i];
  5481. if (cb === fn || cb.fn === fn) {
  5482. cbs.splice(i, 1);
  5483. break
  5484. }
  5485. }
  5486. return vm
  5487. };
  5488. Vue.prototype.$emit = function (event) {
  5489. var vm = this;
  5490. if (true) {
  5491. var lowerCaseEvent = event.toLowerCase();
  5492. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  5493. tip(
  5494. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  5495. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  5496. "Note that HTML attributes are case-insensitive and you cannot use " +
  5497. "v-on to listen to camelCase events when using in-DOM templates. " +
  5498. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  5499. );
  5500. }
  5501. }
  5502. var cbs = vm._events[event];
  5503. if (cbs) {
  5504. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  5505. var args = toArray(arguments, 1);
  5506. var info = "event handler for \"" + event + "\"";
  5507. for (var i = 0, l = cbs.length; i < l; i++) {
  5508. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  5509. }
  5510. }
  5511. return vm
  5512. };
  5513. }
  5514. /* */
  5515. var activeInstance = null;
  5516. var isUpdatingChildComponent = false;
  5517. function setActiveInstance(vm) {
  5518. var prevActiveInstance = activeInstance;
  5519. activeInstance = vm;
  5520. return function () {
  5521. activeInstance = prevActiveInstance;
  5522. }
  5523. }
  5524. function initLifecycle (vm) {
  5525. var options = vm.$options;
  5526. // locate first non-abstract parent
  5527. var parent = options.parent;
  5528. if (parent && !options.abstract) {
  5529. while (parent.$options.abstract && parent.$parent) {
  5530. parent = parent.$parent;
  5531. }
  5532. parent.$children.push(vm);
  5533. }
  5534. vm.$parent = parent;
  5535. vm.$root = parent ? parent.$root : vm;
  5536. vm.$children = [];
  5537. vm.$refs = {};
  5538. vm._watcher = null;
  5539. vm._inactive = null;
  5540. vm._directInactive = false;
  5541. vm._isMounted = false;
  5542. vm._isDestroyed = false;
  5543. vm._isBeingDestroyed = false;
  5544. }
  5545. function lifecycleMixin (Vue) {
  5546. Vue.prototype._update = function (vnode, hydrating) {
  5547. var vm = this;
  5548. var prevEl = vm.$el;
  5549. var prevVnode = vm._vnode;
  5550. var restoreActiveInstance = setActiveInstance(vm);
  5551. vm._vnode = vnode;
  5552. // Vue.prototype.__patch__ is injected in entry points
  5553. // based on the rendering backend used.
  5554. if (!prevVnode) {
  5555. // initial render
  5556. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  5557. } else {
  5558. // updates
  5559. vm.$el = vm.__patch__(prevVnode, vnode);
  5560. }
  5561. restoreActiveInstance();
  5562. // update __vue__ reference
  5563. if (prevEl) {
  5564. prevEl.__vue__ = null;
  5565. }
  5566. if (vm.$el) {
  5567. vm.$el.__vue__ = vm;
  5568. }
  5569. // if parent is an HOC, update its $el as well
  5570. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  5571. vm.$parent.$el = vm.$el;
  5572. }
  5573. // updated hook is called by the scheduler to ensure that children are
  5574. // updated in a parent's updated hook.
  5575. };
  5576. Vue.prototype.$forceUpdate = function () {
  5577. var vm = this;
  5578. if (vm._watcher) {
  5579. vm._watcher.update();
  5580. }
  5581. };
  5582. Vue.prototype.$destroy = function () {
  5583. var vm = this;
  5584. if (vm._isBeingDestroyed) {
  5585. return
  5586. }
  5587. callHook(vm, 'beforeDestroy');
  5588. vm._isBeingDestroyed = true;
  5589. // remove self from parent
  5590. var parent = vm.$parent;
  5591. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  5592. remove(parent.$children, vm);
  5593. }
  5594. // teardown watchers
  5595. if (vm._watcher) {
  5596. vm._watcher.teardown();
  5597. }
  5598. var i = vm._watchers.length;
  5599. while (i--) {
  5600. vm._watchers[i].teardown();
  5601. }
  5602. // remove reference from data ob
  5603. // frozen object may not have observer.
  5604. if (vm._data.__ob__) {
  5605. vm._data.__ob__.vmCount--;
  5606. }
  5607. // call the last hook...
  5608. vm._isDestroyed = true;
  5609. // invoke destroy hooks on current rendered tree
  5610. vm.__patch__(vm._vnode, null);
  5611. // fire destroyed hook
  5612. callHook(vm, 'destroyed');
  5613. // turn off all instance listeners.
  5614. vm.$off();
  5615. // remove __vue__ reference
  5616. if (vm.$el) {
  5617. vm.$el.__vue__ = null;
  5618. }
  5619. // release circular reference (#6759)
  5620. if (vm.$vnode) {
  5621. vm.$vnode.parent = null;
  5622. }
  5623. };
  5624. }
  5625. function updateChildComponent (
  5626. vm,
  5627. propsData,
  5628. listeners,
  5629. parentVnode,
  5630. renderChildren
  5631. ) {
  5632. if (true) {
  5633. isUpdatingChildComponent = true;
  5634. }
  5635. // determine whether component has slot children
  5636. // we need to do this before overwriting $options._renderChildren.
  5637. // check if there are dynamic scopedSlots (hand-written or compiled but with
  5638. // dynamic slot names). Static scoped slots compiled from template has the
  5639. // "$stable" marker.
  5640. var newScopedSlots = parentVnode.data.scopedSlots;
  5641. var oldScopedSlots = vm.$scopedSlots;
  5642. var hasDynamicScopedSlot = !!(
  5643. (newScopedSlots && !newScopedSlots.$stable) ||
  5644. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  5645. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  5646. );
  5647. // Any static slot children from the parent may have changed during parent's
  5648. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  5649. // update is necessary to ensure correctness.
  5650. var needsForceUpdate = !!(
  5651. renderChildren || // has new static slots
  5652. vm.$options._renderChildren || // has old static slots
  5653. hasDynamicScopedSlot
  5654. );
  5655. vm.$options._parentVnode = parentVnode;
  5656. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  5657. if (vm._vnode) { // update child tree's parent
  5658. vm._vnode.parent = parentVnode;
  5659. }
  5660. vm.$options._renderChildren = renderChildren;
  5661. // update $attrs and $listeners hash
  5662. // these are also reactive so they may trigger child update if the child
  5663. // used them during render
  5664. vm.$attrs = parentVnode.data.attrs || emptyObject;
  5665. vm.$listeners = listeners || emptyObject;
  5666. // update props
  5667. if (propsData && vm.$options.props) {
  5668. toggleObserving(false);
  5669. var props = vm._props;
  5670. var propKeys = vm.$options._propKeys || [];
  5671. for (var i = 0; i < propKeys.length; i++) {
  5672. var key = propKeys[i];
  5673. var propOptions = vm.$options.props; // wtf flow?
  5674. props[key] = validateProp(key, propOptions, propsData, vm);
  5675. }
  5676. toggleObserving(true);
  5677. // keep a copy of raw propsData
  5678. vm.$options.propsData = propsData;
  5679. }
  5680. // fixed by xxxxxx update properties(mp runtime)
  5681. vm._$updateProperties && vm._$updateProperties(vm);
  5682. // update listeners
  5683. listeners = listeners || emptyObject;
  5684. var oldListeners = vm.$options._parentListeners;
  5685. vm.$options._parentListeners = listeners;
  5686. updateComponentListeners(vm, listeners, oldListeners);
  5687. // resolve slots + force update if has children
  5688. if (needsForceUpdate) {
  5689. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  5690. vm.$forceUpdate();
  5691. }
  5692. if (true) {
  5693. isUpdatingChildComponent = false;
  5694. }
  5695. }
  5696. function isInInactiveTree (vm) {
  5697. while (vm && (vm = vm.$parent)) {
  5698. if (vm._inactive) { return true }
  5699. }
  5700. return false
  5701. }
  5702. function activateChildComponent (vm, direct) {
  5703. if (direct) {
  5704. vm._directInactive = false;
  5705. if (isInInactiveTree(vm)) {
  5706. return
  5707. }
  5708. } else if (vm._directInactive) {
  5709. return
  5710. }
  5711. if (vm._inactive || vm._inactive === null) {
  5712. vm._inactive = false;
  5713. for (var i = 0; i < vm.$children.length; i++) {
  5714. activateChildComponent(vm.$children[i]);
  5715. }
  5716. callHook(vm, 'activated');
  5717. }
  5718. }
  5719. function deactivateChildComponent (vm, direct) {
  5720. if (direct) {
  5721. vm._directInactive = true;
  5722. if (isInInactiveTree(vm)) {
  5723. return
  5724. }
  5725. }
  5726. if (!vm._inactive) {
  5727. vm._inactive = true;
  5728. for (var i = 0; i < vm.$children.length; i++) {
  5729. deactivateChildComponent(vm.$children[i]);
  5730. }
  5731. callHook(vm, 'deactivated');
  5732. }
  5733. }
  5734. function callHook (vm, hook) {
  5735. // #7573 disable dep collection when invoking lifecycle hooks
  5736. pushTarget();
  5737. var handlers = vm.$options[hook];
  5738. var info = hook + " hook";
  5739. if (handlers) {
  5740. for (var i = 0, j = handlers.length; i < j; i++) {
  5741. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  5742. }
  5743. }
  5744. if (vm._hasHookEvent) {
  5745. vm.$emit('hook:' + hook);
  5746. }
  5747. popTarget();
  5748. }
  5749. /* */
  5750. var MAX_UPDATE_COUNT = 100;
  5751. var queue = [];
  5752. var activatedChildren = [];
  5753. var has = {};
  5754. var circular = {};
  5755. var waiting = false;
  5756. var flushing = false;
  5757. var index = 0;
  5758. /**
  5759. * Reset the scheduler's state.
  5760. */
  5761. function resetSchedulerState () {
  5762. index = queue.length = activatedChildren.length = 0;
  5763. has = {};
  5764. if (true) {
  5765. circular = {};
  5766. }
  5767. waiting = flushing = false;
  5768. }
  5769. // Async edge case #6566 requires saving the timestamp when event listeners are
  5770. // attached. However, calling performance.now() has a perf overhead especially
  5771. // if the page has thousands of event listeners. Instead, we take a timestamp
  5772. // every time the scheduler flushes and use that for all event listeners
  5773. // attached during that flush.
  5774. var currentFlushTimestamp = 0;
  5775. // Async edge case fix requires storing an event listener's attach timestamp.
  5776. var getNow = Date.now;
  5777. // Determine what event timestamp the browser is using. Annoyingly, the
  5778. // timestamp can either be hi-res (relative to page load) or low-res
  5779. // (relative to UNIX epoch), so in order to compare time we have to use the
  5780. // same timestamp type when saving the flush timestamp.
  5781. // All IE versions use low-res event timestamps, and have problematic clock
  5782. // implementations (#9632)
  5783. if (inBrowser && !isIE) {
  5784. var performance = window.performance;
  5785. if (
  5786. performance &&
  5787. typeof performance.now === 'function' &&
  5788. getNow() > document.createEvent('Event').timeStamp
  5789. ) {
  5790. // if the event timestamp, although evaluated AFTER the Date.now(), is
  5791. // smaller than it, it means the event is using a hi-res timestamp,
  5792. // and we need to use the hi-res version for event listener timestamps as
  5793. // well.
  5794. getNow = function () { return performance.now(); };
  5795. }
  5796. }
  5797. /**
  5798. * Flush both queues and run the watchers.
  5799. */
  5800. function flushSchedulerQueue () {
  5801. currentFlushTimestamp = getNow();
  5802. flushing = true;
  5803. var watcher, id;
  5804. // Sort queue before flush.
  5805. // This ensures that:
  5806. // 1. Components are updated from parent to child. (because parent is always
  5807. // created before the child)
  5808. // 2. A component's user watchers are run before its render watcher (because
  5809. // user watchers are created before the render watcher)
  5810. // 3. If a component is destroyed during a parent component's watcher run,
  5811. // its watchers can be skipped.
  5812. queue.sort(function (a, b) { return a.id - b.id; });
  5813. // do not cache length because more watchers might be pushed
  5814. // as we run existing watchers
  5815. for (index = 0; index < queue.length; index++) {
  5816. watcher = queue[index];
  5817. if (watcher.before) {
  5818. watcher.before();
  5819. }
  5820. id = watcher.id;
  5821. has[id] = null;
  5822. watcher.run();
  5823. // in dev build, check and stop circular updates.
  5824. if ( true && has[id] != null) {
  5825. circular[id] = (circular[id] || 0) + 1;
  5826. if (circular[id] > MAX_UPDATE_COUNT) {
  5827. warn(
  5828. 'You may have an infinite update loop ' + (
  5829. watcher.user
  5830. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  5831. : "in a component render function."
  5832. ),
  5833. watcher.vm
  5834. );
  5835. break
  5836. }
  5837. }
  5838. }
  5839. // keep copies of post queues before resetting state
  5840. var activatedQueue = activatedChildren.slice();
  5841. var updatedQueue = queue.slice();
  5842. resetSchedulerState();
  5843. // call component updated and activated hooks
  5844. callActivatedHooks(activatedQueue);
  5845. callUpdatedHooks(updatedQueue);
  5846. // devtool hook
  5847. /* istanbul ignore if */
  5848. if (devtools && config.devtools) {
  5849. devtools.emit('flush');
  5850. }
  5851. }
  5852. function callUpdatedHooks (queue) {
  5853. var i = queue.length;
  5854. while (i--) {
  5855. var watcher = queue[i];
  5856. var vm = watcher.vm;
  5857. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  5858. callHook(vm, 'updated');
  5859. }
  5860. }
  5861. }
  5862. /**
  5863. * Queue a kept-alive component that was activated during patch.
  5864. * The queue will be processed after the entire tree has been patched.
  5865. */
  5866. function queueActivatedComponent (vm) {
  5867. // setting _inactive to false here so that a render function can
  5868. // rely on checking whether it's in an inactive tree (e.g. router-view)
  5869. vm._inactive = false;
  5870. activatedChildren.push(vm);
  5871. }
  5872. function callActivatedHooks (queue) {
  5873. for (var i = 0; i < queue.length; i++) {
  5874. queue[i]._inactive = true;
  5875. activateChildComponent(queue[i], true /* true */);
  5876. }
  5877. }
  5878. /**
  5879. * Push a watcher into the watcher queue.
  5880. * Jobs with duplicate IDs will be skipped unless it's
  5881. * pushed when the queue is being flushed.
  5882. */
  5883. function queueWatcher (watcher) {
  5884. var id = watcher.id;
  5885. if (has[id] == null) {
  5886. has[id] = true;
  5887. if (!flushing) {
  5888. queue.push(watcher);
  5889. } else {
  5890. // if already flushing, splice the watcher based on its id
  5891. // if already past its id, it will be run next immediately.
  5892. var i = queue.length - 1;
  5893. while (i > index && queue[i].id > watcher.id) {
  5894. i--;
  5895. }
  5896. queue.splice(i + 1, 0, watcher);
  5897. }
  5898. // queue the flush
  5899. if (!waiting) {
  5900. waiting = true;
  5901. if ( true && !config.async) {
  5902. flushSchedulerQueue();
  5903. return
  5904. }
  5905. nextTick(flushSchedulerQueue);
  5906. }
  5907. }
  5908. }
  5909. /* */
  5910. var uid$2 = 0;
  5911. /**
  5912. * A watcher parses an expression, collects dependencies,
  5913. * and fires callback when the expression value changes.
  5914. * This is used for both the $watch() api and directives.
  5915. */
  5916. var Watcher = function Watcher (
  5917. vm,
  5918. expOrFn,
  5919. cb,
  5920. options,
  5921. isRenderWatcher
  5922. ) {
  5923. this.vm = vm;
  5924. if (isRenderWatcher) {
  5925. vm._watcher = this;
  5926. }
  5927. vm._watchers.push(this);
  5928. // options
  5929. if (options) {
  5930. this.deep = !!options.deep;
  5931. this.user = !!options.user;
  5932. this.lazy = !!options.lazy;
  5933. this.sync = !!options.sync;
  5934. this.before = options.before;
  5935. } else {
  5936. this.deep = this.user = this.lazy = this.sync = false;
  5937. }
  5938. this.cb = cb;
  5939. this.id = ++uid$2; // uid for batching
  5940. this.active = true;
  5941. this.dirty = this.lazy; // for lazy watchers
  5942. this.deps = [];
  5943. this.newDeps = [];
  5944. this.depIds = new _Set();
  5945. this.newDepIds = new _Set();
  5946. this.expression = true
  5947. ? expOrFn.toString()
  5948. : undefined;
  5949. // parse expression for getter
  5950. if (typeof expOrFn === 'function') {
  5951. this.getter = expOrFn;
  5952. } else {
  5953. this.getter = parsePath(expOrFn);
  5954. if (!this.getter) {
  5955. this.getter = noop;
  5956. true && warn(
  5957. "Failed watching path: \"" + expOrFn + "\" " +
  5958. 'Watcher only accepts simple dot-delimited paths. ' +
  5959. 'For full control, use a function instead.',
  5960. vm
  5961. );
  5962. }
  5963. }
  5964. this.value = this.lazy
  5965. ? undefined
  5966. : this.get();
  5967. };
  5968. /**
  5969. * Evaluate the getter, and re-collect dependencies.
  5970. */
  5971. Watcher.prototype.get = function get () {
  5972. pushTarget(this);
  5973. var value;
  5974. var vm = this.vm;
  5975. try {
  5976. value = this.getter.call(vm, vm);
  5977. } catch (e) {
  5978. if (this.user) {
  5979. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  5980. } else {
  5981. throw e
  5982. }
  5983. } finally {
  5984. // "touch" every property so they are all tracked as
  5985. // dependencies for deep watching
  5986. if (this.deep) {
  5987. traverse(value);
  5988. }
  5989. popTarget();
  5990. this.cleanupDeps();
  5991. }
  5992. return value
  5993. };
  5994. /**
  5995. * Add a dependency to this directive.
  5996. */
  5997. Watcher.prototype.addDep = function addDep (dep) {
  5998. var id = dep.id;
  5999. if (!this.newDepIds.has(id)) {
  6000. this.newDepIds.add(id);
  6001. this.newDeps.push(dep);
  6002. if (!this.depIds.has(id)) {
  6003. dep.addSub(this);
  6004. }
  6005. }
  6006. };
  6007. /**
  6008. * Clean up for dependency collection.
  6009. */
  6010. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  6011. var i = this.deps.length;
  6012. while (i--) {
  6013. var dep = this.deps[i];
  6014. if (!this.newDepIds.has(dep.id)) {
  6015. dep.removeSub(this);
  6016. }
  6017. }
  6018. var tmp = this.depIds;
  6019. this.depIds = this.newDepIds;
  6020. this.newDepIds = tmp;
  6021. this.newDepIds.clear();
  6022. tmp = this.deps;
  6023. this.deps = this.newDeps;
  6024. this.newDeps = tmp;
  6025. this.newDeps.length = 0;
  6026. };
  6027. /**
  6028. * Subscriber interface.
  6029. * Will be called when a dependency changes.
  6030. */
  6031. Watcher.prototype.update = function update () {
  6032. /* istanbul ignore else */
  6033. if (this.lazy) {
  6034. this.dirty = true;
  6035. } else if (this.sync) {
  6036. this.run();
  6037. } else {
  6038. queueWatcher(this);
  6039. }
  6040. };
  6041. /**
  6042. * Scheduler job interface.
  6043. * Will be called by the scheduler.
  6044. */
  6045. Watcher.prototype.run = function run () {
  6046. if (this.active) {
  6047. var value = this.get();
  6048. if (
  6049. value !== this.value ||
  6050. // Deep watchers and watchers on Object/Arrays should fire even
  6051. // when the value is the same, because the value may
  6052. // have mutated.
  6053. isObject(value) ||
  6054. this.deep
  6055. ) {
  6056. // set new value
  6057. var oldValue = this.value;
  6058. this.value = value;
  6059. if (this.user) {
  6060. try {
  6061. this.cb.call(this.vm, value, oldValue);
  6062. } catch (e) {
  6063. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  6064. }
  6065. } else {
  6066. this.cb.call(this.vm, value, oldValue);
  6067. }
  6068. }
  6069. }
  6070. };
  6071. /**
  6072. * Evaluate the value of the watcher.
  6073. * This only gets called for lazy watchers.
  6074. */
  6075. Watcher.prototype.evaluate = function evaluate () {
  6076. this.value = this.get();
  6077. this.dirty = false;
  6078. };
  6079. /**
  6080. * Depend on all deps collected by this watcher.
  6081. */
  6082. Watcher.prototype.depend = function depend () {
  6083. var i = this.deps.length;
  6084. while (i--) {
  6085. this.deps[i].depend();
  6086. }
  6087. };
  6088. /**
  6089. * Remove self from all dependencies' subscriber list.
  6090. */
  6091. Watcher.prototype.teardown = function teardown () {
  6092. if (this.active) {
  6093. // remove self from vm's watcher list
  6094. // this is a somewhat expensive operation so we skip it
  6095. // if the vm is being destroyed.
  6096. if (!this.vm._isBeingDestroyed) {
  6097. remove(this.vm._watchers, this);
  6098. }
  6099. var i = this.deps.length;
  6100. while (i--) {
  6101. this.deps[i].removeSub(this);
  6102. }
  6103. this.active = false;
  6104. }
  6105. };
  6106. /* */
  6107. var sharedPropertyDefinition = {
  6108. enumerable: true,
  6109. configurable: true,
  6110. get: noop,
  6111. set: noop
  6112. };
  6113. function proxy (target, sourceKey, key) {
  6114. sharedPropertyDefinition.get = function proxyGetter () {
  6115. return this[sourceKey][key]
  6116. };
  6117. sharedPropertyDefinition.set = function proxySetter (val) {
  6118. this[sourceKey][key] = val;
  6119. };
  6120. Object.defineProperty(target, key, sharedPropertyDefinition);
  6121. }
  6122. function initState (vm) {
  6123. vm._watchers = [];
  6124. var opts = vm.$options;
  6125. if (opts.props) { initProps(vm, opts.props); }
  6126. if (opts.methods) { initMethods(vm, opts.methods); }
  6127. if (opts.data) {
  6128. initData(vm);
  6129. } else {
  6130. observe(vm._data = {}, true /* asRootData */);
  6131. }
  6132. if (opts.computed) { initComputed(vm, opts.computed); }
  6133. if (opts.watch && opts.watch !== nativeWatch) {
  6134. initWatch(vm, opts.watch);
  6135. }
  6136. }
  6137. function initProps (vm, propsOptions) {
  6138. var propsData = vm.$options.propsData || {};
  6139. var props = vm._props = {};
  6140. // cache prop keys so that future props updates can iterate using Array
  6141. // instead of dynamic object key enumeration.
  6142. var keys = vm.$options._propKeys = [];
  6143. var isRoot = !vm.$parent;
  6144. // root instance props should be converted
  6145. if (!isRoot) {
  6146. toggleObserving(false);
  6147. }
  6148. var loop = function ( key ) {
  6149. keys.push(key);
  6150. var value = validateProp(key, propsOptions, propsData, vm);
  6151. /* istanbul ignore else */
  6152. if (true) {
  6153. var hyphenatedKey = hyphenate(key);
  6154. if (isReservedAttribute(hyphenatedKey) ||
  6155. config.isReservedAttr(hyphenatedKey)) {
  6156. warn(
  6157. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  6158. vm
  6159. );
  6160. }
  6161. defineReactive$$1(props, key, value, function () {
  6162. if (!isRoot && !isUpdatingChildComponent) {
  6163. {
  6164. if(vm.mpHost === 'mp-baidu'){//百度 observer 在 setData callback 之后触发,直接忽略该 warn
  6165. return
  6166. }
  6167. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  6168. if(
  6169. key === 'value' &&
  6170. Array.isArray(vm.$options.behaviors) &&
  6171. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  6172. ){
  6173. return
  6174. }
  6175. if(vm._getFormData){
  6176. return
  6177. }
  6178. var $parent = vm.$parent;
  6179. while($parent){
  6180. if($parent.__next_tick_pending){
  6181. return
  6182. }
  6183. $parent = $parent.$parent;
  6184. }
  6185. }
  6186. warn(
  6187. "Avoid mutating a prop directly since the value will be " +
  6188. "overwritten whenever the parent component re-renders. " +
  6189. "Instead, use a data or computed property based on the prop's " +
  6190. "value. Prop being mutated: \"" + key + "\"",
  6191. vm
  6192. );
  6193. }
  6194. });
  6195. } else {}
  6196. // static props are already proxied on the component's prototype
  6197. // during Vue.extend(). We only need to proxy props defined at
  6198. // instantiation here.
  6199. if (!(key in vm)) {
  6200. proxy(vm, "_props", key);
  6201. }
  6202. };
  6203. for (var key in propsOptions) loop( key );
  6204. toggleObserving(true);
  6205. }
  6206. function initData (vm) {
  6207. var data = vm.$options.data;
  6208. data = vm._data = typeof data === 'function'
  6209. ? getData(data, vm)
  6210. : data || {};
  6211. if (!isPlainObject(data)) {
  6212. data = {};
  6213. true && warn(
  6214. 'data functions should return an object:\n' +
  6215. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  6216. vm
  6217. );
  6218. }
  6219. // proxy data on instance
  6220. var keys = Object.keys(data);
  6221. var props = vm.$options.props;
  6222. var methods = vm.$options.methods;
  6223. var i = keys.length;
  6224. while (i--) {
  6225. var key = keys[i];
  6226. if (true) {
  6227. if (methods && hasOwn(methods, key)) {
  6228. warn(
  6229. ("Method \"" + key + "\" has already been defined as a data property."),
  6230. vm
  6231. );
  6232. }
  6233. }
  6234. if (props && hasOwn(props, key)) {
  6235. true && warn(
  6236. "The data property \"" + key + "\" is already declared as a prop. " +
  6237. "Use prop default value instead.",
  6238. vm
  6239. );
  6240. } else if (!isReserved(key)) {
  6241. proxy(vm, "_data", key);
  6242. }
  6243. }
  6244. // observe data
  6245. observe(data, true /* asRootData */);
  6246. }
  6247. function getData (data, vm) {
  6248. // #7573 disable dep collection when invoking data getters
  6249. pushTarget();
  6250. try {
  6251. return data.call(vm, vm)
  6252. } catch (e) {
  6253. handleError(e, vm, "data()");
  6254. return {}
  6255. } finally {
  6256. popTarget();
  6257. }
  6258. }
  6259. var computedWatcherOptions = { lazy: true };
  6260. function initComputed (vm, computed) {
  6261. // $flow-disable-line
  6262. var watchers = vm._computedWatchers = Object.create(null);
  6263. // computed properties are just getters during SSR
  6264. var isSSR = isServerRendering();
  6265. for (var key in computed) {
  6266. var userDef = computed[key];
  6267. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  6268. if ( true && getter == null) {
  6269. warn(
  6270. ("Getter is missing for computed property \"" + key + "\"."),
  6271. vm
  6272. );
  6273. }
  6274. if (!isSSR) {
  6275. // create internal watcher for the computed property.
  6276. watchers[key] = new Watcher(
  6277. vm,
  6278. getter || noop,
  6279. noop,
  6280. computedWatcherOptions
  6281. );
  6282. }
  6283. // component-defined computed properties are already defined on the
  6284. // component prototype. We only need to define computed properties defined
  6285. // at instantiation here.
  6286. if (!(key in vm)) {
  6287. defineComputed(vm, key, userDef);
  6288. } else if (true) {
  6289. if (key in vm.$data) {
  6290. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  6291. } else if (vm.$options.props && key in vm.$options.props) {
  6292. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  6293. }
  6294. }
  6295. }
  6296. }
  6297. function defineComputed (
  6298. target,
  6299. key,
  6300. userDef
  6301. ) {
  6302. var shouldCache = !isServerRendering();
  6303. if (typeof userDef === 'function') {
  6304. sharedPropertyDefinition.get = shouldCache
  6305. ? createComputedGetter(key)
  6306. : createGetterInvoker(userDef);
  6307. sharedPropertyDefinition.set = noop;
  6308. } else {
  6309. sharedPropertyDefinition.get = userDef.get
  6310. ? shouldCache && userDef.cache !== false
  6311. ? createComputedGetter(key)
  6312. : createGetterInvoker(userDef.get)
  6313. : noop;
  6314. sharedPropertyDefinition.set = userDef.set || noop;
  6315. }
  6316. if ( true &&
  6317. sharedPropertyDefinition.set === noop) {
  6318. sharedPropertyDefinition.set = function () {
  6319. warn(
  6320. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  6321. this
  6322. );
  6323. };
  6324. }
  6325. Object.defineProperty(target, key, sharedPropertyDefinition);
  6326. }
  6327. function createComputedGetter (key) {
  6328. return function computedGetter () {
  6329. var watcher = this._computedWatchers && this._computedWatchers[key];
  6330. if (watcher) {
  6331. if (watcher.dirty) {
  6332. watcher.evaluate();
  6333. }
  6334. if (Dep.SharedObject.target) {// fixed by xxxxxx
  6335. watcher.depend();
  6336. }
  6337. return watcher.value
  6338. }
  6339. }
  6340. }
  6341. function createGetterInvoker(fn) {
  6342. return function computedGetter () {
  6343. return fn.call(this, this)
  6344. }
  6345. }
  6346. function initMethods (vm, methods) {
  6347. var props = vm.$options.props;
  6348. for (var key in methods) {
  6349. if (true) {
  6350. if (typeof methods[key] !== 'function') {
  6351. warn(
  6352. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  6353. "Did you reference the function correctly?",
  6354. vm
  6355. );
  6356. }
  6357. if (props && hasOwn(props, key)) {
  6358. warn(
  6359. ("Method \"" + key + "\" has already been defined as a prop."),
  6360. vm
  6361. );
  6362. }
  6363. if ((key in vm) && isReserved(key)) {
  6364. warn(
  6365. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  6366. "Avoid defining component methods that start with _ or $."
  6367. );
  6368. }
  6369. }
  6370. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  6371. }
  6372. }
  6373. function initWatch (vm, watch) {
  6374. for (var key in watch) {
  6375. var handler = watch[key];
  6376. if (Array.isArray(handler)) {
  6377. for (var i = 0; i < handler.length; i++) {
  6378. createWatcher(vm, key, handler[i]);
  6379. }
  6380. } else {
  6381. createWatcher(vm, key, handler);
  6382. }
  6383. }
  6384. }
  6385. function createWatcher (
  6386. vm,
  6387. expOrFn,
  6388. handler,
  6389. options
  6390. ) {
  6391. if (isPlainObject(handler)) {
  6392. options = handler;
  6393. handler = handler.handler;
  6394. }
  6395. if (typeof handler === 'string') {
  6396. handler = vm[handler];
  6397. }
  6398. return vm.$watch(expOrFn, handler, options)
  6399. }
  6400. function stateMixin (Vue) {
  6401. // flow somehow has problems with directly declared definition object
  6402. // when using Object.defineProperty, so we have to procedurally build up
  6403. // the object here.
  6404. var dataDef = {};
  6405. dataDef.get = function () { return this._data };
  6406. var propsDef = {};
  6407. propsDef.get = function () { return this._props };
  6408. if (true) {
  6409. dataDef.set = function () {
  6410. warn(
  6411. 'Avoid replacing instance root $data. ' +
  6412. 'Use nested data properties instead.',
  6413. this
  6414. );
  6415. };
  6416. propsDef.set = function () {
  6417. warn("$props is readonly.", this);
  6418. };
  6419. }
  6420. Object.defineProperty(Vue.prototype, '$data', dataDef);
  6421. Object.defineProperty(Vue.prototype, '$props', propsDef);
  6422. Vue.prototype.$set = set;
  6423. Vue.prototype.$delete = del;
  6424. Vue.prototype.$watch = function (
  6425. expOrFn,
  6426. cb,
  6427. options
  6428. ) {
  6429. var vm = this;
  6430. if (isPlainObject(cb)) {
  6431. return createWatcher(vm, expOrFn, cb, options)
  6432. }
  6433. options = options || {};
  6434. options.user = true;
  6435. var watcher = new Watcher(vm, expOrFn, cb, options);
  6436. if (options.immediate) {
  6437. try {
  6438. cb.call(vm, watcher.value);
  6439. } catch (error) {
  6440. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  6441. }
  6442. }
  6443. return function unwatchFn () {
  6444. watcher.teardown();
  6445. }
  6446. };
  6447. }
  6448. /* */
  6449. var uid$3 = 0;
  6450. function initMixin (Vue) {
  6451. Vue.prototype._init = function (options) {
  6452. var vm = this;
  6453. // a uid
  6454. vm._uid = uid$3++;
  6455. var startTag, endTag;
  6456. /* istanbul ignore if */
  6457. if ( true && config.performance && mark) {
  6458. startTag = "vue-perf-start:" + (vm._uid);
  6459. endTag = "vue-perf-end:" + (vm._uid);
  6460. mark(startTag);
  6461. }
  6462. // a flag to avoid this being observed
  6463. vm._isVue = true;
  6464. // merge options
  6465. if (options && options._isComponent) {
  6466. // optimize internal component instantiation
  6467. // since dynamic options merging is pretty slow, and none of the
  6468. // internal component options needs special treatment.
  6469. initInternalComponent(vm, options);
  6470. } else {
  6471. vm.$options = mergeOptions(
  6472. resolveConstructorOptions(vm.constructor),
  6473. options || {},
  6474. vm
  6475. );
  6476. }
  6477. /* istanbul ignore else */
  6478. if (true) {
  6479. initProxy(vm);
  6480. } else {}
  6481. // expose real self
  6482. vm._self = vm;
  6483. initLifecycle(vm);
  6484. initEvents(vm);
  6485. initRender(vm);
  6486. callHook(vm, 'beforeCreate');
  6487. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  6488. initState(vm);
  6489. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  6490. !vm._$fallback && callHook(vm, 'created');
  6491. /* istanbul ignore if */
  6492. if ( true && config.performance && mark) {
  6493. vm._name = formatComponentName(vm, false);
  6494. mark(endTag);
  6495. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  6496. }
  6497. if (vm.$options.el) {
  6498. vm.$mount(vm.$options.el);
  6499. }
  6500. };
  6501. }
  6502. function initInternalComponent (vm, options) {
  6503. var opts = vm.$options = Object.create(vm.constructor.options);
  6504. // doing this because it's faster than dynamic enumeration.
  6505. var parentVnode = options._parentVnode;
  6506. opts.parent = options.parent;
  6507. opts._parentVnode = parentVnode;
  6508. var vnodeComponentOptions = parentVnode.componentOptions;
  6509. opts.propsData = vnodeComponentOptions.propsData;
  6510. opts._parentListeners = vnodeComponentOptions.listeners;
  6511. opts._renderChildren = vnodeComponentOptions.children;
  6512. opts._componentTag = vnodeComponentOptions.tag;
  6513. if (options.render) {
  6514. opts.render = options.render;
  6515. opts.staticRenderFns = options.staticRenderFns;
  6516. }
  6517. }
  6518. function resolveConstructorOptions (Ctor) {
  6519. var options = Ctor.options;
  6520. if (Ctor.super) {
  6521. var superOptions = resolveConstructorOptions(Ctor.super);
  6522. var cachedSuperOptions = Ctor.superOptions;
  6523. if (superOptions !== cachedSuperOptions) {
  6524. // super option changed,
  6525. // need to resolve new options.
  6526. Ctor.superOptions = superOptions;
  6527. // check if there are any late-modified/attached options (#4976)
  6528. var modifiedOptions = resolveModifiedOptions(Ctor);
  6529. // update base extend options
  6530. if (modifiedOptions) {
  6531. extend(Ctor.extendOptions, modifiedOptions);
  6532. }
  6533. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  6534. if (options.name) {
  6535. options.components[options.name] = Ctor;
  6536. }
  6537. }
  6538. }
  6539. return options
  6540. }
  6541. function resolveModifiedOptions (Ctor) {
  6542. var modified;
  6543. var latest = Ctor.options;
  6544. var sealed = Ctor.sealedOptions;
  6545. for (var key in latest) {
  6546. if (latest[key] !== sealed[key]) {
  6547. if (!modified) { modified = {}; }
  6548. modified[key] = latest[key];
  6549. }
  6550. }
  6551. return modified
  6552. }
  6553. function Vue (options) {
  6554. if ( true &&
  6555. !(this instanceof Vue)
  6556. ) {
  6557. warn('Vue is a constructor and should be called with the `new` keyword');
  6558. }
  6559. this._init(options);
  6560. }
  6561. initMixin(Vue);
  6562. stateMixin(Vue);
  6563. eventsMixin(Vue);
  6564. lifecycleMixin(Vue);
  6565. renderMixin(Vue);
  6566. /* */
  6567. function initUse (Vue) {
  6568. Vue.use = function (plugin) {
  6569. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  6570. if (installedPlugins.indexOf(plugin) > -1) {
  6571. return this
  6572. }
  6573. // additional parameters
  6574. var args = toArray(arguments, 1);
  6575. args.unshift(this);
  6576. if (typeof plugin.install === 'function') {
  6577. plugin.install.apply(plugin, args);
  6578. } else if (typeof plugin === 'function') {
  6579. plugin.apply(null, args);
  6580. }
  6581. installedPlugins.push(plugin);
  6582. return this
  6583. };
  6584. }
  6585. /* */
  6586. function initMixin$1 (Vue) {
  6587. Vue.mixin = function (mixin) {
  6588. this.options = mergeOptions(this.options, mixin);
  6589. return this
  6590. };
  6591. }
  6592. /* */
  6593. function initExtend (Vue) {
  6594. /**
  6595. * Each instance constructor, including Vue, has a unique
  6596. * cid. This enables us to create wrapped "child
  6597. * constructors" for prototypal inheritance and cache them.
  6598. */
  6599. Vue.cid = 0;
  6600. var cid = 1;
  6601. /**
  6602. * Class inheritance
  6603. */
  6604. Vue.extend = function (extendOptions) {
  6605. extendOptions = extendOptions || {};
  6606. var Super = this;
  6607. var SuperId = Super.cid;
  6608. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  6609. if (cachedCtors[SuperId]) {
  6610. return cachedCtors[SuperId]
  6611. }
  6612. var name = extendOptions.name || Super.options.name;
  6613. if ( true && name) {
  6614. validateComponentName(name);
  6615. }
  6616. var Sub = function VueComponent (options) {
  6617. this._init(options);
  6618. };
  6619. Sub.prototype = Object.create(Super.prototype);
  6620. Sub.prototype.constructor = Sub;
  6621. Sub.cid = cid++;
  6622. Sub.options = mergeOptions(
  6623. Super.options,
  6624. extendOptions
  6625. );
  6626. Sub['super'] = Super;
  6627. // For props and computed properties, we define the proxy getters on
  6628. // the Vue instances at extension time, on the extended prototype. This
  6629. // avoids Object.defineProperty calls for each instance created.
  6630. if (Sub.options.props) {
  6631. initProps$1(Sub);
  6632. }
  6633. if (Sub.options.computed) {
  6634. initComputed$1(Sub);
  6635. }
  6636. // allow further extension/mixin/plugin usage
  6637. Sub.extend = Super.extend;
  6638. Sub.mixin = Super.mixin;
  6639. Sub.use = Super.use;
  6640. // create asset registers, so extended classes
  6641. // can have their private assets too.
  6642. ASSET_TYPES.forEach(function (type) {
  6643. Sub[type] = Super[type];
  6644. });
  6645. // enable recursive self-lookup
  6646. if (name) {
  6647. Sub.options.components[name] = Sub;
  6648. }
  6649. // keep a reference to the super options at extension time.
  6650. // later at instantiation we can check if Super's options have
  6651. // been updated.
  6652. Sub.superOptions = Super.options;
  6653. Sub.extendOptions = extendOptions;
  6654. Sub.sealedOptions = extend({}, Sub.options);
  6655. // cache constructor
  6656. cachedCtors[SuperId] = Sub;
  6657. return Sub
  6658. };
  6659. }
  6660. function initProps$1 (Comp) {
  6661. var props = Comp.options.props;
  6662. for (var key in props) {
  6663. proxy(Comp.prototype, "_props", key);
  6664. }
  6665. }
  6666. function initComputed$1 (Comp) {
  6667. var computed = Comp.options.computed;
  6668. for (var key in computed) {
  6669. defineComputed(Comp.prototype, key, computed[key]);
  6670. }
  6671. }
  6672. /* */
  6673. function initAssetRegisters (Vue) {
  6674. /**
  6675. * Create asset registration methods.
  6676. */
  6677. ASSET_TYPES.forEach(function (type) {
  6678. Vue[type] = function (
  6679. id,
  6680. definition
  6681. ) {
  6682. if (!definition) {
  6683. return this.options[type + 's'][id]
  6684. } else {
  6685. /* istanbul ignore if */
  6686. if ( true && type === 'component') {
  6687. validateComponentName(id);
  6688. }
  6689. if (type === 'component' && isPlainObject(definition)) {
  6690. definition.name = definition.name || id;
  6691. definition = this.options._base.extend(definition);
  6692. }
  6693. if (type === 'directive' && typeof definition === 'function') {
  6694. definition = { bind: definition, update: definition };
  6695. }
  6696. this.options[type + 's'][id] = definition;
  6697. return definition
  6698. }
  6699. };
  6700. });
  6701. }
  6702. /* */
  6703. function getComponentName (opts) {
  6704. return opts && (opts.Ctor.options.name || opts.tag)
  6705. }
  6706. function matches (pattern, name) {
  6707. if (Array.isArray(pattern)) {
  6708. return pattern.indexOf(name) > -1
  6709. } else if (typeof pattern === 'string') {
  6710. return pattern.split(',').indexOf(name) > -1
  6711. } else if (isRegExp(pattern)) {
  6712. return pattern.test(name)
  6713. }
  6714. /* istanbul ignore next */
  6715. return false
  6716. }
  6717. function pruneCache (keepAliveInstance, filter) {
  6718. var cache = keepAliveInstance.cache;
  6719. var keys = keepAliveInstance.keys;
  6720. var _vnode = keepAliveInstance._vnode;
  6721. for (var key in cache) {
  6722. var cachedNode = cache[key];
  6723. if (cachedNode) {
  6724. var name = getComponentName(cachedNode.componentOptions);
  6725. if (name && !filter(name)) {
  6726. pruneCacheEntry(cache, key, keys, _vnode);
  6727. }
  6728. }
  6729. }
  6730. }
  6731. function pruneCacheEntry (
  6732. cache,
  6733. key,
  6734. keys,
  6735. current
  6736. ) {
  6737. var cached$$1 = cache[key];
  6738. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  6739. cached$$1.componentInstance.$destroy();
  6740. }
  6741. cache[key] = null;
  6742. remove(keys, key);
  6743. }
  6744. var patternTypes = [String, RegExp, Array];
  6745. var KeepAlive = {
  6746. name: 'keep-alive',
  6747. abstract: true,
  6748. props: {
  6749. include: patternTypes,
  6750. exclude: patternTypes,
  6751. max: [String, Number]
  6752. },
  6753. created: function created () {
  6754. this.cache = Object.create(null);
  6755. this.keys = [];
  6756. },
  6757. destroyed: function destroyed () {
  6758. for (var key in this.cache) {
  6759. pruneCacheEntry(this.cache, key, this.keys);
  6760. }
  6761. },
  6762. mounted: function mounted () {
  6763. var this$1 = this;
  6764. this.$watch('include', function (val) {
  6765. pruneCache(this$1, function (name) { return matches(val, name); });
  6766. });
  6767. this.$watch('exclude', function (val) {
  6768. pruneCache(this$1, function (name) { return !matches(val, name); });
  6769. });
  6770. },
  6771. render: function render () {
  6772. var slot = this.$slots.default;
  6773. var vnode = getFirstComponentChild(slot);
  6774. var componentOptions = vnode && vnode.componentOptions;
  6775. if (componentOptions) {
  6776. // check pattern
  6777. var name = getComponentName(componentOptions);
  6778. var ref = this;
  6779. var include = ref.include;
  6780. var exclude = ref.exclude;
  6781. if (
  6782. // not included
  6783. (include && (!name || !matches(include, name))) ||
  6784. // excluded
  6785. (exclude && name && matches(exclude, name))
  6786. ) {
  6787. return vnode
  6788. }
  6789. var ref$1 = this;
  6790. var cache = ref$1.cache;
  6791. var keys = ref$1.keys;
  6792. var key = vnode.key == null
  6793. // same constructor may get registered as different local components
  6794. // so cid alone is not enough (#3269)
  6795. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  6796. : vnode.key;
  6797. if (cache[key]) {
  6798. vnode.componentInstance = cache[key].componentInstance;
  6799. // make current key freshest
  6800. remove(keys, key);
  6801. keys.push(key);
  6802. } else {
  6803. cache[key] = vnode;
  6804. keys.push(key);
  6805. // prune oldest entry
  6806. if (this.max && keys.length > parseInt(this.max)) {
  6807. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  6808. }
  6809. }
  6810. vnode.data.keepAlive = true;
  6811. }
  6812. return vnode || (slot && slot[0])
  6813. }
  6814. };
  6815. var builtInComponents = {
  6816. KeepAlive: KeepAlive
  6817. };
  6818. /* */
  6819. function initGlobalAPI (Vue) {
  6820. // config
  6821. var configDef = {};
  6822. configDef.get = function () { return config; };
  6823. if (true) {
  6824. configDef.set = function () {
  6825. warn(
  6826. 'Do not replace the Vue.config object, set individual fields instead.'
  6827. );
  6828. };
  6829. }
  6830. Object.defineProperty(Vue, 'config', configDef);
  6831. // exposed util methods.
  6832. // NOTE: these are not considered part of the public API - avoid relying on
  6833. // them unless you are aware of the risk.
  6834. Vue.util = {
  6835. warn: warn,
  6836. extend: extend,
  6837. mergeOptions: mergeOptions,
  6838. defineReactive: defineReactive$$1
  6839. };
  6840. Vue.set = set;
  6841. Vue.delete = del;
  6842. Vue.nextTick = nextTick;
  6843. // 2.6 explicit observable API
  6844. Vue.observable = function (obj) {
  6845. observe(obj);
  6846. return obj
  6847. };
  6848. Vue.options = Object.create(null);
  6849. ASSET_TYPES.forEach(function (type) {
  6850. Vue.options[type + 's'] = Object.create(null);
  6851. });
  6852. // this is used to identify the "base" constructor to extend all plain-object
  6853. // components with in Weex's multi-instance scenarios.
  6854. Vue.options._base = Vue;
  6855. extend(Vue.options.components, builtInComponents);
  6856. initUse(Vue);
  6857. initMixin$1(Vue);
  6858. initExtend(Vue);
  6859. initAssetRegisters(Vue);
  6860. }
  6861. initGlobalAPI(Vue);
  6862. Object.defineProperty(Vue.prototype, '$isServer', {
  6863. get: isServerRendering
  6864. });
  6865. Object.defineProperty(Vue.prototype, '$ssrContext', {
  6866. get: function get () {
  6867. /* istanbul ignore next */
  6868. return this.$vnode && this.$vnode.ssrContext
  6869. }
  6870. });
  6871. // expose FunctionalRenderContext for ssr runtime helper installation
  6872. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  6873. value: FunctionalRenderContext
  6874. });
  6875. Vue.version = '2.6.11';
  6876. /**
  6877. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  6878. */
  6879. var ARRAYTYPE = '[object Array]';
  6880. var OBJECTTYPE = '[object Object]';
  6881. // const FUNCTIONTYPE = '[object Function]'
  6882. function diff(current, pre) {
  6883. var result = {};
  6884. syncKeys(current, pre);
  6885. _diff(current, pre, '', result);
  6886. return result
  6887. }
  6888. function syncKeys(current, pre) {
  6889. if (current === pre) { return }
  6890. var rootCurrentType = type(current);
  6891. var rootPreType = type(pre);
  6892. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  6893. if(Object.keys(current).length >= Object.keys(pre).length){
  6894. for (var key in pre) {
  6895. var currentValue = current[key];
  6896. if (currentValue === undefined) {
  6897. current[key] = null;
  6898. } else {
  6899. syncKeys(currentValue, pre[key]);
  6900. }
  6901. }
  6902. }
  6903. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  6904. if (current.length >= pre.length) {
  6905. pre.forEach(function (item, index) {
  6906. syncKeys(current[index], item);
  6907. });
  6908. }
  6909. }
  6910. }
  6911. function _diff(current, pre, path, result) {
  6912. if (current === pre) { return }
  6913. var rootCurrentType = type(current);
  6914. var rootPreType = type(pre);
  6915. if (rootCurrentType == OBJECTTYPE) {
  6916. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  6917. setResult(result, path, current);
  6918. } else {
  6919. var loop = function ( key ) {
  6920. var currentValue = current[key];
  6921. var preValue = pre[key];
  6922. var currentType = type(currentValue);
  6923. var preType = type(preValue);
  6924. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  6925. if (currentValue != pre[key]) {
  6926. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6927. }
  6928. } else if (currentType == ARRAYTYPE) {
  6929. if (preType != ARRAYTYPE) {
  6930. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6931. } else {
  6932. if (currentValue.length < preValue.length) {
  6933. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6934. } else {
  6935. currentValue.forEach(function (item, index) {
  6936. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  6937. });
  6938. }
  6939. }
  6940. } else if (currentType == OBJECTTYPE) {
  6941. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  6942. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6943. } else {
  6944. for (var subKey in currentValue) {
  6945. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  6946. }
  6947. }
  6948. }
  6949. };
  6950. for (var key in current) loop( key );
  6951. }
  6952. } else if (rootCurrentType == ARRAYTYPE) {
  6953. if (rootPreType != ARRAYTYPE) {
  6954. setResult(result, path, current);
  6955. } else {
  6956. if (current.length < pre.length) {
  6957. setResult(result, path, current);
  6958. } else {
  6959. current.forEach(function (item, index) {
  6960. _diff(item, pre[index], path + '[' + index + ']', result);
  6961. });
  6962. }
  6963. }
  6964. } else {
  6965. setResult(result, path, current);
  6966. }
  6967. }
  6968. function setResult(result, k, v) {
  6969. // if (type(v) != FUNCTIONTYPE) {
  6970. result[k] = v;
  6971. // }
  6972. }
  6973. function type(obj) {
  6974. return Object.prototype.toString.call(obj)
  6975. }
  6976. /* */
  6977. function flushCallbacks$1(vm) {
  6978. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  6979. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"麻醉平台","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  6980. var mpInstance = vm.$scope;
  6981. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  6982. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  6983. }
  6984. var copies = vm.__next_tick_callbacks.slice(0);
  6985. vm.__next_tick_callbacks.length = 0;
  6986. for (var i = 0; i < copies.length; i++) {
  6987. copies[i]();
  6988. }
  6989. }
  6990. }
  6991. function hasRenderWatcher(vm) {
  6992. return queue.find(function (watcher) { return vm._watcher === watcher; })
  6993. }
  6994. function nextTick$1(vm, cb) {
  6995. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  6996. //2.nextTick 之前存在 render watcher
  6997. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  6998. if(Object({"NODE_ENV":"development","VUE_APP_NAME":"麻醉平台","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  6999. var mpInstance = vm.$scope;
  7000. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  7001. ']:nextVueTick');
  7002. }
  7003. return nextTick(cb, vm)
  7004. }else{
  7005. if(Object({"NODE_ENV":"development","VUE_APP_NAME":"麻醉平台","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  7006. var mpInstance$1 = vm.$scope;
  7007. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  7008. ']:nextMPTick');
  7009. }
  7010. }
  7011. var _resolve;
  7012. if (!vm.__next_tick_callbacks) {
  7013. vm.__next_tick_callbacks = [];
  7014. }
  7015. vm.__next_tick_callbacks.push(function () {
  7016. if (cb) {
  7017. try {
  7018. cb.call(vm);
  7019. } catch (e) {
  7020. handleError(e, vm, 'nextTick');
  7021. }
  7022. } else if (_resolve) {
  7023. _resolve(vm);
  7024. }
  7025. });
  7026. // $flow-disable-line
  7027. if (!cb && typeof Promise !== 'undefined') {
  7028. return new Promise(function (resolve) {
  7029. _resolve = resolve;
  7030. })
  7031. }
  7032. }
  7033. /* */
  7034. function cloneWithData(vm) {
  7035. // 确保当前 vm 所有数据被同步
  7036. var ret = Object.create(null);
  7037. var dataKeys = [].concat(
  7038. Object.keys(vm._data || {}),
  7039. Object.keys(vm._computedWatchers || {}));
  7040. dataKeys.reduce(function(ret, key) {
  7041. ret[key] = vm[key];
  7042. return ret
  7043. }, ret);
  7044. // vue-composition-api
  7045. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  7046. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  7047. if (rawBindings) {
  7048. Object.keys(rawBindings).forEach(function (key) {
  7049. ret[key] = vm[key];
  7050. });
  7051. }
  7052. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  7053. Object.assign(ret, vm.$mp.data || {});
  7054. if (
  7055. Array.isArray(vm.$options.behaviors) &&
  7056. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7057. ) { //form-field
  7058. ret['name'] = vm.name;
  7059. ret['value'] = vm.value;
  7060. }
  7061. return JSON.parse(JSON.stringify(ret))
  7062. }
  7063. var patch = function(oldVnode, vnode) {
  7064. var this$1 = this;
  7065. if (vnode === null) { //destroy
  7066. return
  7067. }
  7068. if (this.mpType === 'page' || this.mpType === 'component') {
  7069. var mpInstance = this.$scope;
  7070. var data = Object.create(null);
  7071. try {
  7072. data = cloneWithData(this);
  7073. } catch (err) {
  7074. console.error(err);
  7075. }
  7076. data.__webviewId__ = mpInstance.data.__webviewId__;
  7077. var mpData = Object.create(null);
  7078. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  7079. mpData[key] = mpInstance.data[key];
  7080. });
  7081. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  7082. if (Object.keys(diffData).length) {
  7083. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"麻醉平台","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  7084. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  7085. ']差量更新',
  7086. JSON.stringify(diffData));
  7087. }
  7088. this.__next_tick_pending = true;
  7089. mpInstance.setData(diffData, function () {
  7090. this$1.__next_tick_pending = false;
  7091. flushCallbacks$1(this$1);
  7092. });
  7093. } else {
  7094. flushCallbacks$1(this);
  7095. }
  7096. }
  7097. };
  7098. /* */
  7099. function createEmptyRender() {
  7100. }
  7101. function mountComponent$1(
  7102. vm,
  7103. el,
  7104. hydrating
  7105. ) {
  7106. if (!vm.mpType) {//main.js 中的 new Vue
  7107. return vm
  7108. }
  7109. if (vm.mpType === 'app') {
  7110. vm.$options.render = createEmptyRender;
  7111. }
  7112. if (!vm.$options.render) {
  7113. vm.$options.render = createEmptyRender;
  7114. if (true) {
  7115. /* istanbul ignore if */
  7116. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  7117. vm.$options.el || el) {
  7118. warn(
  7119. 'You are using the runtime-only build of Vue where the template ' +
  7120. 'compiler is not available. Either pre-compile the templates into ' +
  7121. 'render functions, or use the compiler-included build.',
  7122. vm
  7123. );
  7124. } else {
  7125. warn(
  7126. 'Failed to mount component: template or render function not defined.',
  7127. vm
  7128. );
  7129. }
  7130. }
  7131. }
  7132. !vm._$fallback && callHook(vm, 'beforeMount');
  7133. var updateComponent = function () {
  7134. vm._update(vm._render(), hydrating);
  7135. };
  7136. // we set this to vm._watcher inside the watcher's constructor
  7137. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  7138. // component's mounted hook), which relies on vm._watcher being already defined
  7139. new Watcher(vm, updateComponent, noop, {
  7140. before: function before() {
  7141. if (vm._isMounted && !vm._isDestroyed) {
  7142. callHook(vm, 'beforeUpdate');
  7143. }
  7144. }
  7145. }, true /* isRenderWatcher */);
  7146. hydrating = false;
  7147. return vm
  7148. }
  7149. /* */
  7150. function renderClass (
  7151. staticClass,
  7152. dynamicClass
  7153. ) {
  7154. if (isDef(staticClass) || isDef(dynamicClass)) {
  7155. return concat(staticClass, stringifyClass(dynamicClass))
  7156. }
  7157. /* istanbul ignore next */
  7158. return ''
  7159. }
  7160. function concat (a, b) {
  7161. return a ? b ? (a + ' ' + b) : a : (b || '')
  7162. }
  7163. function stringifyClass (value) {
  7164. if (Array.isArray(value)) {
  7165. return stringifyArray(value)
  7166. }
  7167. if (isObject(value)) {
  7168. return stringifyObject(value)
  7169. }
  7170. if (typeof value === 'string') {
  7171. return value
  7172. }
  7173. /* istanbul ignore next */
  7174. return ''
  7175. }
  7176. function stringifyArray (value) {
  7177. var res = '';
  7178. var stringified;
  7179. for (var i = 0, l = value.length; i < l; i++) {
  7180. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  7181. if (res) { res += ' '; }
  7182. res += stringified;
  7183. }
  7184. }
  7185. return res
  7186. }
  7187. function stringifyObject (value) {
  7188. var res = '';
  7189. for (var key in value) {
  7190. if (value[key]) {
  7191. if (res) { res += ' '; }
  7192. res += key;
  7193. }
  7194. }
  7195. return res
  7196. }
  7197. /* */
  7198. var parseStyleText = cached(function (cssText) {
  7199. var res = {};
  7200. var listDelimiter = /;(?![^(]*\))/g;
  7201. var propertyDelimiter = /:(.+)/;
  7202. cssText.split(listDelimiter).forEach(function (item) {
  7203. if (item) {
  7204. var tmp = item.split(propertyDelimiter);
  7205. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  7206. }
  7207. });
  7208. return res
  7209. });
  7210. // normalize possible array / string values into Object
  7211. function normalizeStyleBinding (bindingStyle) {
  7212. if (Array.isArray(bindingStyle)) {
  7213. return toObject(bindingStyle)
  7214. }
  7215. if (typeof bindingStyle === 'string') {
  7216. return parseStyleText(bindingStyle)
  7217. }
  7218. return bindingStyle
  7219. }
  7220. /* */
  7221. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  7222. function getTarget(obj, path) {
  7223. var parts = path.split('.');
  7224. var key = parts[0];
  7225. if (key.indexOf('__$n') === 0) { //number index
  7226. key = parseInt(key.replace('__$n', ''));
  7227. }
  7228. if (parts.length === 1) {
  7229. return obj[key]
  7230. }
  7231. return getTarget(obj[key], parts.slice(1).join('.'))
  7232. }
  7233. function internalMixin(Vue) {
  7234. Vue.config.errorHandler = function(err, vm, info) {
  7235. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  7236. console.error(err);
  7237. /* eslint-disable no-undef */
  7238. var app = typeof getApp === 'function' && getApp();
  7239. if (app && app.onError) {
  7240. app.onError(err);
  7241. }
  7242. };
  7243. var oldEmit = Vue.prototype.$emit;
  7244. Vue.prototype.$emit = function(event) {
  7245. if (this.$scope && event) {
  7246. this.$scope['triggerEvent'](event, {
  7247. __args__: toArray(arguments, 1)
  7248. });
  7249. }
  7250. return oldEmit.apply(this, arguments)
  7251. };
  7252. Vue.prototype.$nextTick = function(fn) {
  7253. return nextTick$1(this, fn)
  7254. };
  7255. MP_METHODS.forEach(function (method) {
  7256. Vue.prototype[method] = function(args) {
  7257. if (this.$scope && this.$scope[method]) {
  7258. return this.$scope[method](args)
  7259. }
  7260. // mp-alipay
  7261. if (typeof my === 'undefined') {
  7262. return
  7263. }
  7264. if (method === 'createSelectorQuery') {
  7265. /* eslint-disable no-undef */
  7266. return my.createSelectorQuery(args)
  7267. } else if (method === 'createIntersectionObserver') {
  7268. /* eslint-disable no-undef */
  7269. return my.createIntersectionObserver(args)
  7270. }
  7271. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  7272. };
  7273. });
  7274. Vue.prototype.__init_provide = initProvide;
  7275. Vue.prototype.__init_injections = initInjections;
  7276. Vue.prototype.__call_hook = function(hook, args) {
  7277. var vm = this;
  7278. // #7573 disable dep collection when invoking lifecycle hooks
  7279. pushTarget();
  7280. var handlers = vm.$options[hook];
  7281. var info = hook + " hook";
  7282. var ret;
  7283. if (handlers) {
  7284. for (var i = 0, j = handlers.length; i < j; i++) {
  7285. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  7286. }
  7287. }
  7288. if (vm._hasHookEvent) {
  7289. vm.$emit('hook:' + hook, args);
  7290. }
  7291. popTarget();
  7292. return ret
  7293. };
  7294. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  7295. if (Array.isArray(modifiers)) {
  7296. if (modifiers.indexOf('trim') !== -1) {
  7297. value = value.trim();
  7298. }
  7299. if (modifiers.indexOf('number') !== -1) {
  7300. value = this._n(value);
  7301. }
  7302. }
  7303. if (!target) {
  7304. target = this;
  7305. }
  7306. target[key] = value;
  7307. };
  7308. Vue.prototype.__set_sync = function(target, key, value) {
  7309. if (!target) {
  7310. target = this;
  7311. }
  7312. target[key] = value;
  7313. };
  7314. Vue.prototype.__get_orig = function(item) {
  7315. if (isPlainObject(item)) {
  7316. return item['$orig'] || item
  7317. }
  7318. return item
  7319. };
  7320. Vue.prototype.__get_value = function(dataPath, target) {
  7321. return getTarget(target || this, dataPath)
  7322. };
  7323. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  7324. return renderClass(staticClass, dynamicClass)
  7325. };
  7326. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  7327. if (!dynamicStyle && !staticStyle) {
  7328. return ''
  7329. }
  7330. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  7331. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  7332. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  7333. };
  7334. Vue.prototype.__map = function(val, iteratee) {
  7335. //TODO 暂不考虑 string
  7336. var ret, i, l, keys, key;
  7337. if (Array.isArray(val)) {
  7338. ret = new Array(val.length);
  7339. for (i = 0, l = val.length; i < l; i++) {
  7340. ret[i] = iteratee(val[i], i);
  7341. }
  7342. return ret
  7343. } else if (isObject(val)) {
  7344. keys = Object.keys(val);
  7345. ret = Object.create(null);
  7346. for (i = 0, l = keys.length; i < l; i++) {
  7347. key = keys[i];
  7348. ret[key] = iteratee(val[key], key, i);
  7349. }
  7350. return ret
  7351. } else if (typeof val === 'number') {
  7352. ret = new Array(val);
  7353. for (i = 0, l = val; i < l; i++) {
  7354. // 第一个参数暂时仍和小程序一致
  7355. ret[i] = iteratee(i, i);
  7356. }
  7357. return ret
  7358. }
  7359. return []
  7360. };
  7361. }
  7362. /* */
  7363. var LIFECYCLE_HOOKS$1 = [
  7364. //App
  7365. 'onLaunch',
  7366. 'onShow',
  7367. 'onHide',
  7368. 'onUniNViewMessage',
  7369. 'onPageNotFound',
  7370. 'onThemeChange',
  7371. 'onError',
  7372. 'onUnhandledRejection',
  7373. //Page
  7374. 'onInit',
  7375. 'onLoad',
  7376. // 'onShow',
  7377. 'onReady',
  7378. // 'onHide',
  7379. 'onUnload',
  7380. 'onPullDownRefresh',
  7381. 'onReachBottom',
  7382. 'onTabItemTap',
  7383. 'onAddToFavorites',
  7384. 'onShareTimeline',
  7385. 'onShareAppMessage',
  7386. 'onResize',
  7387. 'onPageScroll',
  7388. 'onNavigationBarButtonTap',
  7389. 'onBackPress',
  7390. 'onNavigationBarSearchInputChanged',
  7391. 'onNavigationBarSearchInputConfirmed',
  7392. 'onNavigationBarSearchInputClicked',
  7393. //Component
  7394. // 'onReady', // 兼容旧版本,应该移除该事件
  7395. 'onPageShow',
  7396. 'onPageHide',
  7397. 'onPageResize'
  7398. ];
  7399. function lifecycleMixin$1(Vue) {
  7400. //fixed vue-class-component
  7401. var oldExtend = Vue.extend;
  7402. Vue.extend = function(extendOptions) {
  7403. extendOptions = extendOptions || {};
  7404. var methods = extendOptions.methods;
  7405. if (methods) {
  7406. Object.keys(methods).forEach(function (methodName) {
  7407. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  7408. extendOptions[methodName] = methods[methodName];
  7409. delete methods[methodName];
  7410. }
  7411. });
  7412. }
  7413. return oldExtend.call(this, extendOptions)
  7414. };
  7415. var strategies = Vue.config.optionMergeStrategies;
  7416. var mergeHook = strategies.created;
  7417. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  7418. strategies[hook] = mergeHook;
  7419. });
  7420. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  7421. }
  7422. /* */
  7423. // install platform patch function
  7424. Vue.prototype.__patch__ = patch;
  7425. // public mount method
  7426. Vue.prototype.$mount = function(
  7427. el ,
  7428. hydrating
  7429. ) {
  7430. return mountComponent$1(this, el, hydrating)
  7431. };
  7432. lifecycleMixin$1(Vue);
  7433. internalMixin(Vue);
  7434. /* */
  7435. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  7436. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  7437. /***/ }),
  7438. /***/ 21:
  7439. /*!********************************************************************!*\
  7440. !*** /Users/wanglili/Documents/liuniu/Mazui/utils/wxMinProgram.js ***!
  7441. \********************************************************************/
  7442. /*! no static exports found */
  7443. /***/ (function(module, exports, __webpack_require__) {
  7444. "use strict";
  7445. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.loginWinxinMp = loginWinxinMp;var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 5));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  7446. //微信登录
  7447. /**
  7448. * @param {string} 当前页面地址信息
  7449. */
  7450. function loginWinxinMp() {
  7451. var pages = getCurrentPages();
  7452. // 获取跳转前页面
  7453. var page = pages[pages.length - 2];
  7454. var queryUrl = '';
  7455. for (var key in page.options) {
  7456. queryUrl += key + '=' + page.options[key] + "&";
  7457. }
  7458. // 获取当页面路由地址
  7459. var path = '/' + page.route + '?' + queryUrl;
  7460. // 保存跳转前页面
  7461. uni.setStorageSync('present', path);
  7462. return new Promise(function (resolve, reject) {
  7463. wx.login({
  7464. success: function success(e) {
  7465. console.log(e);
  7466. resolve(e);
  7467. },
  7468. fill: function fill(e) {
  7469. reject(e);
  7470. } });
  7471. });
  7472. };
  7473. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  7474. /***/ }),
  7475. /***/ 22:
  7476. /*!********************************************************!*\
  7477. !*** /Users/wanglili/Documents/liuniu/Mazui/api/wx.js ***!
  7478. \********************************************************/
  7479. /*! no static exports found */
  7480. /***/ (function(module, exports, __webpack_require__) {
  7481. "use strict";
  7482. Object.defineProperty(exports, "__esModule", { value: true });exports.wechatMpAuth = wechatMpAuth;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 23));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  7483. // 微信code地址
  7484. function wechatMpAuth(data) {
  7485. return (0, _request.default)({
  7486. url: '/api/wechat/mp_auth',
  7487. method: 'post',
  7488. data: data });
  7489. }
  7490. /***/ }),
  7491. /***/ 23:
  7492. /*!***************************************************************!*\
  7493. !*** /Users/wanglili/Documents/liuniu/Mazui/utils/request.js ***!
  7494. \***************************************************************/
  7495. /*! no static exports found */
  7496. /***/ (function(module, exports, __webpack_require__) {
  7497. "use strict";
  7498. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.getTime = getTime;exports.default = exports.upFilse = void 0;var _newRequest = _interopRequireDefault(__webpack_require__(/*! ./newRequest.js */ 24));
  7499. var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 5));
  7500. var _loginUtils = __webpack_require__(/*! @/utils/loginUtils.js */ 28);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  7501. // 请求完成后拦截
  7502. _newRequest.default.interceptors.response(
  7503. function (response) {
  7504. try {
  7505. var res = response.data;
  7506. // 解析字符串为数字
  7507. if (res.code !== 200) {
  7508. if (res.code == 400 && res.msg == '请登录') {
  7509. // 存储当前地址
  7510. (0, _loginUtils.saveUrl)();
  7511. // 调用退出登录方法清空用户信息
  7512. _store.default.commit('logout');
  7513. // 判断是否开启强制登录
  7514. uni.showModal({
  7515. title: "您未登录!是否马上登录?",
  7516. success: function success(e) {
  7517. if (e.confirm) {
  7518. // 保存当前页面地址
  7519. // 跳转页面
  7520. (0, _loginUtils.interceptor)();
  7521. }
  7522. } });
  7523. } else {
  7524. if (res.msg != '系统出现异常') {
  7525. // 判断是否为地址配送问题
  7526. if (res.msg != '请选择配送地址') {
  7527. uni.showToast({
  7528. title: res.msg,
  7529. duration: 1500,
  7530. mask: false,
  7531. icon: 'none' });
  7532. }
  7533. }
  7534. }
  7535. return Promise.reject(new Error(res.msg || 'Error'));
  7536. } else {
  7537. return res;
  7538. }
  7539. } catch (e) {
  7540. console.log(e);
  7541. }
  7542. },
  7543. function (error) {
  7544. uni.showToast({
  7545. title: "加载错误请重试",
  7546. duration: 1500,
  7547. mask: false,
  7548. icon: 'none' });
  7549. return Promise.reject(error);
  7550. });
  7551. //时间戳转换成时间
  7552. function getTime(time) {
  7553. var date = new Date(parseInt(time) * 1000);
  7554. var year = date.getFullYear();
  7555. var mon = date.getMonth() + 1;
  7556. var day = date.getDate();
  7557. var hours = date.getHours();
  7558. var minu = date.getMinutes();
  7559. var sec = date.getSeconds();
  7560. return year + '-' + mon + '-' + day + ' ' + hours + ':' + minu + ':' + sec;
  7561. }
  7562. // 请求前拦截器
  7563. _newRequest.default.interceptors.request(
  7564. function (config) {
  7565. var token = uni.getStorageSync('token');
  7566. var address = uni.getStorageSync('addressData') || '';
  7567. if (!config.header) {
  7568. config.header = {
  7569. "Authori-zation": 'Bearer ' + token };
  7570. } else {
  7571. // 添加key请求头
  7572. config.header["Authori-zation"] = 'Bearer ' + token;
  7573. }
  7574. return config;
  7575. },
  7576. function (error) {
  7577. // 错误处理
  7578. console.log(error);
  7579. return Promise.reject(error);
  7580. });
  7581. var upFilse = _newRequest.default.upFilse;exports.upFilse = upFilse;var _default =
  7582. _newRequest.default.open;exports.default = _default;
  7583. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  7584. /***/ }),
  7585. /***/ 24:
  7586. /*!******************************************************************!*\
  7587. !*** /Users/wanglili/Documents/liuniu/Mazui/utils/newRequest.js ***!
  7588. \******************************************************************/
  7589. /*! no static exports found */
  7590. /***/ (function(module, exports, __webpack_require__) {
  7591. "use strict";
  7592. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 25));var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 5));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}
  7593. var service = {
  7594. baseURL: _store.default.state.baseURL, // 请求头
  7595. header: {
  7596. 'Content-Type': "application/x-www-form-urlencoded" },
  7597. // 请求拦截器
  7598. interceptors: {
  7599. // 安装请求前拦截
  7600. request: function request(success, iserror) {
  7601. service.request.success = success;
  7602. service.request.error = iserror;
  7603. },
  7604. // 安装请求完成后拦截
  7605. response: function response(success, iserror) {
  7606. service.response.success = success;
  7607. service.response.error = iserror;
  7608. } },
  7609. // 请求前拦截
  7610. request: {
  7611. // 回调成功执行方法
  7612. success: function success(e) {
  7613. return e;
  7614. },
  7615. // 回调失败
  7616. error: function error(e) {
  7617. return e;
  7618. } },
  7619. // 请求完成后拦截
  7620. response: {
  7621. // 回调成功执行方法
  7622. success: function success(e) {
  7623. return e;
  7624. },
  7625. // 回调失败
  7626. error: function error(e) {
  7627. return e;
  7628. } },
  7629. // 开始请求
  7630. open: function () {var _open = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:_context.next = 2;return (
  7631. new Promise(function (resolve, reject) {
  7632. var requestData = ''; //保存处理完成后请求数据
  7633. //console.log(data);
  7634. // 请求前数据处理
  7635. requestData = service.request.success(data);
  7636. var url = '';
  7637. // 判断请求是否为http开头
  7638. if (requestData.url.indexOf('http') >= 0) {
  7639. url = requestData.url;
  7640. } else {
  7641. url = service.baseURL + requestData.url;
  7642. }
  7643. // 数据复制用于请求
  7644. uni.request({
  7645. url: url,
  7646. method: requestData.method || 'GET',
  7647. data: requestData.data,
  7648. header: data.header || service.header,
  7649. success: function success(res) {
  7650. if (res.statusCode == 200) {
  7651. try {
  7652. resolve(service.response.success(res));
  7653. } catch (e) {
  7654. service.response.error(e);
  7655. }
  7656. }
  7657. },
  7658. // 请求失败数据处理
  7659. fail: function fail(err) {
  7660. service.response.error(err);
  7661. } });
  7662. }));case 2:return _context.abrupt("return", _context.sent);case 3:case "end":return _context.stop();}}}, _callee);}));function open(_x) {return _open.apply(this, arguments);}return open;}(),
  7663. // 上传文件
  7664. upFilse: function () {var _upFilse = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {return _regenerator.default.wrap(function _callee4$(_context4) {while (1) {switch (_context4.prev = _context4.next) {case 0:_context4.next = 2;return (
  7665. new Promise(function (resolve, reject) {
  7666. var requestData = ''; //保存处理完成后请求数据
  7667. try {
  7668. // 请求前数据处理
  7669. requestData = service.request.success(data);
  7670. } catch (e) {
  7671. // 请求报错拦截
  7672. service.request.error(e);
  7673. }
  7674. var config = {
  7675. // 上传图片的API
  7676. upload_img_url: service.baseURL + requestData.url };
  7677. var Uploader = {
  7678. // 选择图片
  7679. choose: function choose(num) {
  7680. return new Promise(function (resolve, reject) {
  7681. uni.chooseImage({
  7682. count: num,
  7683. sourceType: ['album'],
  7684. sizeType: ['compressed'],
  7685. success: function success(res) {
  7686. // console.log(res);
  7687. // 缓存文件路径
  7688. resolve(res.tempFilePaths);
  7689. },
  7690. fail: function fail(err) {
  7691. console.log(err);
  7692. reject(err);
  7693. } });
  7694. });
  7695. },
  7696. // 上传图片
  7697. upload_one: function upload_one(path) {
  7698. return new Promise(function (resolve, reject) {
  7699. uni.showLoading({
  7700. title: '上传中' });
  7701. uni.uploadFile({
  7702. url: config.upload_img_url, //仅为示例,非真实的接口地址
  7703. filePath: path,
  7704. name: 'file',
  7705. header: {
  7706. "token": uni.getStorageSync('token') },
  7707. success: function success(uploadFileRes) {
  7708. if ("string" === typeof uploadFileRes.data) {
  7709. resolve(JSON.parse(uploadFileRes.data).data);
  7710. } else {
  7711. resolve(uploadFileRes.data.data);
  7712. }
  7713. },
  7714. complete: function complete() {
  7715. uni.hideLoading();
  7716. } });
  7717. });
  7718. },
  7719. // 上传多个图片
  7720. upload: function upload(path_arr) {var _this = this;
  7721. var num = path_arr.length;
  7722. return new Promise( /*#__PURE__*/function () {var _ref = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee2(resolve, reject) {var img_urls, i, img_url;return _regenerator.default.wrap(function _callee2$(_context2) {while (1) {switch (_context2.prev = _context2.next) {case 0:
  7723. img_urls = [];
  7724. i = 0;case 2:if (!(i < num)) {_context2.next = 10;break;}_context2.next = 5;return (
  7725. _this.upload_one(path_arr[i]));case 5:img_url = _context2.sent;
  7726. img_urls.push(img_url);case 7:i++;_context2.next = 2;break;case 10:
  7727. ;
  7728. resolve(img_urls);case 12:case "end":return _context2.stop();}}}, _callee2);}));return function (_x3, _x4) {return _ref.apply(this, arguments);};}());
  7729. },
  7730. // 触发上传图片事件
  7731. choose_and_upload: function choose_and_upload(num) {var _this2 = this;
  7732. return new Promise( /*#__PURE__*/function () {var _ref2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3(resolve, reject) {var path_arr;return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:_context3.next = 2;return (
  7733. _this2.choose(num));case 2:path_arr = _context3.sent;_context3.next = 5;return (
  7734. _this2.upload(path_arr).then(function (e) {
  7735. resolve(e);
  7736. }).catch(function (e) {
  7737. reject(e);
  7738. }));case 5:case "end":return _context3.stop();}}}, _callee3);}));return function (_x5, _x6) {return _ref2.apply(this, arguments);};}());
  7739. } };
  7740. Uploader.choose_and_upload(1).then(function (e) {
  7741. resolve(e);
  7742. }).catch(function (e) {
  7743. console.log(e);
  7744. });
  7745. }));case 2:return _context4.abrupt("return", _context4.sent);case 3:case "end":return _context4.stop();}}}, _callee4);}));function upFilse(_x2) {return _upFilse.apply(this, arguments);}return upFilse;}() };var _default =
  7746. service;exports.default = _default;
  7747. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  7748. /***/ }),
  7749. /***/ 25:
  7750. /*!**********************************************************!*\
  7751. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  7752. \**********************************************************/
  7753. /*! no static exports found */
  7754. /***/ (function(module, exports, __webpack_require__) {
  7755. module.exports = __webpack_require__(/*! regenerator-runtime */ 26);
  7756. /***/ }),
  7757. /***/ 26:
  7758. /*!************************************************************!*\
  7759. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  7760. \************************************************************/
  7761. /*! no static exports found */
  7762. /***/ (function(module, exports, __webpack_require__) {
  7763. /**
  7764. * Copyright (c) 2014-present, Facebook, Inc.
  7765. *
  7766. * This source code is licensed under the MIT license found in the
  7767. * LICENSE file in the root directory of this source tree.
  7768. */
  7769. // This method of obtaining a reference to the global object needs to be
  7770. // kept identical to the way it is obtained in runtime.js
  7771. var g = (function() {
  7772. return this || (typeof self === "object" && self);
  7773. })() || Function("return this")();
  7774. // Use `getOwnPropertyNames` because not all browsers support calling
  7775. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  7776. var hadRuntime = g.regeneratorRuntime &&
  7777. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  7778. // Save the old regeneratorRuntime in case it needs to be restored later.
  7779. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  7780. // Force reevalutation of runtime.js.
  7781. g.regeneratorRuntime = undefined;
  7782. module.exports = __webpack_require__(/*! ./runtime */ 27);
  7783. if (hadRuntime) {
  7784. // Restore the original runtime.
  7785. g.regeneratorRuntime = oldRuntime;
  7786. } else {
  7787. // Remove the global property added by runtime.js.
  7788. try {
  7789. delete g.regeneratorRuntime;
  7790. } catch(e) {
  7791. g.regeneratorRuntime = undefined;
  7792. }
  7793. }
  7794. /***/ }),
  7795. /***/ 27:
  7796. /*!*****************************************************!*\
  7797. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  7798. \*****************************************************/
  7799. /*! no static exports found */
  7800. /***/ (function(module, exports) {
  7801. /**
  7802. * Copyright (c) 2014-present, Facebook, Inc.
  7803. *
  7804. * This source code is licensed under the MIT license found in the
  7805. * LICENSE file in the root directory of this source tree.
  7806. */
  7807. !(function(global) {
  7808. "use strict";
  7809. var Op = Object.prototype;
  7810. var hasOwn = Op.hasOwnProperty;
  7811. var undefined; // More compressible than void 0.
  7812. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  7813. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  7814. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  7815. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  7816. var inModule = typeof module === "object";
  7817. var runtime = global.regeneratorRuntime;
  7818. if (runtime) {
  7819. if (inModule) {
  7820. // If regeneratorRuntime is defined globally and we're in a module,
  7821. // make the exports object identical to regeneratorRuntime.
  7822. module.exports = runtime;
  7823. }
  7824. // Don't bother evaluating the rest of this file if the runtime was
  7825. // already defined globally.
  7826. return;
  7827. }
  7828. // Define the runtime globally (as expected by generated code) as either
  7829. // module.exports (if we're in a module) or a new, empty object.
  7830. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  7831. function wrap(innerFn, outerFn, self, tryLocsList) {
  7832. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  7833. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  7834. var generator = Object.create(protoGenerator.prototype);
  7835. var context = new Context(tryLocsList || []);
  7836. // The ._invoke method unifies the implementations of the .next,
  7837. // .throw, and .return methods.
  7838. generator._invoke = makeInvokeMethod(innerFn, self, context);
  7839. return generator;
  7840. }
  7841. runtime.wrap = wrap;
  7842. // Try/catch helper to minimize deoptimizations. Returns a completion
  7843. // record like context.tryEntries[i].completion. This interface could
  7844. // have been (and was previously) designed to take a closure to be
  7845. // invoked without arguments, but in all the cases we care about we
  7846. // already have an existing method we want to call, so there's no need
  7847. // to create a new function object. We can even get away with assuming
  7848. // the method takes exactly one argument, since that happens to be true
  7849. // in every case, so we don't have to touch the arguments object. The
  7850. // only additional allocation required is the completion record, which
  7851. // has a stable shape and so hopefully should be cheap to allocate.
  7852. function tryCatch(fn, obj, arg) {
  7853. try {
  7854. return { type: "normal", arg: fn.call(obj, arg) };
  7855. } catch (err) {
  7856. return { type: "throw", arg: err };
  7857. }
  7858. }
  7859. var GenStateSuspendedStart = "suspendedStart";
  7860. var GenStateSuspendedYield = "suspendedYield";
  7861. var GenStateExecuting = "executing";
  7862. var GenStateCompleted = "completed";
  7863. // Returning this object from the innerFn has the same effect as
  7864. // breaking out of the dispatch switch statement.
  7865. var ContinueSentinel = {};
  7866. // Dummy constructor functions that we use as the .constructor and
  7867. // .constructor.prototype properties for functions that return Generator
  7868. // objects. For full spec compliance, you may wish to configure your
  7869. // minifier not to mangle the names of these two functions.
  7870. function Generator() {}
  7871. function GeneratorFunction() {}
  7872. function GeneratorFunctionPrototype() {}
  7873. // This is a polyfill for %IteratorPrototype% for environments that
  7874. // don't natively support it.
  7875. var IteratorPrototype = {};
  7876. IteratorPrototype[iteratorSymbol] = function () {
  7877. return this;
  7878. };
  7879. var getProto = Object.getPrototypeOf;
  7880. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  7881. if (NativeIteratorPrototype &&
  7882. NativeIteratorPrototype !== Op &&
  7883. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  7884. // This environment has a native %IteratorPrototype%; use it instead
  7885. // of the polyfill.
  7886. IteratorPrototype = NativeIteratorPrototype;
  7887. }
  7888. var Gp = GeneratorFunctionPrototype.prototype =
  7889. Generator.prototype = Object.create(IteratorPrototype);
  7890. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  7891. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  7892. GeneratorFunctionPrototype[toStringTagSymbol] =
  7893. GeneratorFunction.displayName = "GeneratorFunction";
  7894. // Helper for defining the .next, .throw, and .return methods of the
  7895. // Iterator interface in terms of a single ._invoke method.
  7896. function defineIteratorMethods(prototype) {
  7897. ["next", "throw", "return"].forEach(function(method) {
  7898. prototype[method] = function(arg) {
  7899. return this._invoke(method, arg);
  7900. };
  7901. });
  7902. }
  7903. runtime.isGeneratorFunction = function(genFun) {
  7904. var ctor = typeof genFun === "function" && genFun.constructor;
  7905. return ctor
  7906. ? ctor === GeneratorFunction ||
  7907. // For the native GeneratorFunction constructor, the best we can
  7908. // do is to check its .name property.
  7909. (ctor.displayName || ctor.name) === "GeneratorFunction"
  7910. : false;
  7911. };
  7912. runtime.mark = function(genFun) {
  7913. if (Object.setPrototypeOf) {
  7914. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  7915. } else {
  7916. genFun.__proto__ = GeneratorFunctionPrototype;
  7917. if (!(toStringTagSymbol in genFun)) {
  7918. genFun[toStringTagSymbol] = "GeneratorFunction";
  7919. }
  7920. }
  7921. genFun.prototype = Object.create(Gp);
  7922. return genFun;
  7923. };
  7924. // Within the body of any async function, `await x` is transformed to
  7925. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  7926. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  7927. // meant to be awaited.
  7928. runtime.awrap = function(arg) {
  7929. return { __await: arg };
  7930. };
  7931. function AsyncIterator(generator) {
  7932. function invoke(method, arg, resolve, reject) {
  7933. var record = tryCatch(generator[method], generator, arg);
  7934. if (record.type === "throw") {
  7935. reject(record.arg);
  7936. } else {
  7937. var result = record.arg;
  7938. var value = result.value;
  7939. if (value &&
  7940. typeof value === "object" &&
  7941. hasOwn.call(value, "__await")) {
  7942. return Promise.resolve(value.__await).then(function(value) {
  7943. invoke("next", value, resolve, reject);
  7944. }, function(err) {
  7945. invoke("throw", err, resolve, reject);
  7946. });
  7947. }
  7948. return Promise.resolve(value).then(function(unwrapped) {
  7949. // When a yielded Promise is resolved, its final value becomes
  7950. // the .value of the Promise<{value,done}> result for the
  7951. // current iteration.
  7952. result.value = unwrapped;
  7953. resolve(result);
  7954. }, function(error) {
  7955. // If a rejected Promise was yielded, throw the rejection back
  7956. // into the async generator function so it can be handled there.
  7957. return invoke("throw", error, resolve, reject);
  7958. });
  7959. }
  7960. }
  7961. var previousPromise;
  7962. function enqueue(method, arg) {
  7963. function callInvokeWithMethodAndArg() {
  7964. return new Promise(function(resolve, reject) {
  7965. invoke(method, arg, resolve, reject);
  7966. });
  7967. }
  7968. return previousPromise =
  7969. // If enqueue has been called before, then we want to wait until
  7970. // all previous Promises have been resolved before calling invoke,
  7971. // so that results are always delivered in the correct order. If
  7972. // enqueue has not been called before, then it is important to
  7973. // call invoke immediately, without waiting on a callback to fire,
  7974. // so that the async generator function has the opportunity to do
  7975. // any necessary setup in a predictable way. This predictability
  7976. // is why the Promise constructor synchronously invokes its
  7977. // executor callback, and why async functions synchronously
  7978. // execute code before the first await. Since we implement simple
  7979. // async functions in terms of async generators, it is especially
  7980. // important to get this right, even though it requires care.
  7981. previousPromise ? previousPromise.then(
  7982. callInvokeWithMethodAndArg,
  7983. // Avoid propagating failures to Promises returned by later
  7984. // invocations of the iterator.
  7985. callInvokeWithMethodAndArg
  7986. ) : callInvokeWithMethodAndArg();
  7987. }
  7988. // Define the unified helper method that is used to implement .next,
  7989. // .throw, and .return (see defineIteratorMethods).
  7990. this._invoke = enqueue;
  7991. }
  7992. defineIteratorMethods(AsyncIterator.prototype);
  7993. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  7994. return this;
  7995. };
  7996. runtime.AsyncIterator = AsyncIterator;
  7997. // Note that simple async functions are implemented on top of
  7998. // AsyncIterator objects; they just return a Promise for the value of
  7999. // the final result produced by the iterator.
  8000. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  8001. var iter = new AsyncIterator(
  8002. wrap(innerFn, outerFn, self, tryLocsList)
  8003. );
  8004. return runtime.isGeneratorFunction(outerFn)
  8005. ? iter // If outerFn is a generator, return the full iterator.
  8006. : iter.next().then(function(result) {
  8007. return result.done ? result.value : iter.next();
  8008. });
  8009. };
  8010. function makeInvokeMethod(innerFn, self, context) {
  8011. var state = GenStateSuspendedStart;
  8012. return function invoke(method, arg) {
  8013. if (state === GenStateExecuting) {
  8014. throw new Error("Generator is already running");
  8015. }
  8016. if (state === GenStateCompleted) {
  8017. if (method === "throw") {
  8018. throw arg;
  8019. }
  8020. // Be forgiving, per 25.3.3.3.3 of the spec:
  8021. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  8022. return doneResult();
  8023. }
  8024. context.method = method;
  8025. context.arg = arg;
  8026. while (true) {
  8027. var delegate = context.delegate;
  8028. if (delegate) {
  8029. var delegateResult = maybeInvokeDelegate(delegate, context);
  8030. if (delegateResult) {
  8031. if (delegateResult === ContinueSentinel) continue;
  8032. return delegateResult;
  8033. }
  8034. }
  8035. if (context.method === "next") {
  8036. // Setting context._sent for legacy support of Babel's
  8037. // function.sent implementation.
  8038. context.sent = context._sent = context.arg;
  8039. } else if (context.method === "throw") {
  8040. if (state === GenStateSuspendedStart) {
  8041. state = GenStateCompleted;
  8042. throw context.arg;
  8043. }
  8044. context.dispatchException(context.arg);
  8045. } else if (context.method === "return") {
  8046. context.abrupt("return", context.arg);
  8047. }
  8048. state = GenStateExecuting;
  8049. var record = tryCatch(innerFn, self, context);
  8050. if (record.type === "normal") {
  8051. // If an exception is thrown from innerFn, we leave state ===
  8052. // GenStateExecuting and loop back for another invocation.
  8053. state = context.done
  8054. ? GenStateCompleted
  8055. : GenStateSuspendedYield;
  8056. if (record.arg === ContinueSentinel) {
  8057. continue;
  8058. }
  8059. return {
  8060. value: record.arg,
  8061. done: context.done
  8062. };
  8063. } else if (record.type === "throw") {
  8064. state = GenStateCompleted;
  8065. // Dispatch the exception by looping back around to the
  8066. // context.dispatchException(context.arg) call above.
  8067. context.method = "throw";
  8068. context.arg = record.arg;
  8069. }
  8070. }
  8071. };
  8072. }
  8073. // Call delegate.iterator[context.method](context.arg) and handle the
  8074. // result, either by returning a { value, done } result from the
  8075. // delegate iterator, or by modifying context.method and context.arg,
  8076. // setting context.delegate to null, and returning the ContinueSentinel.
  8077. function maybeInvokeDelegate(delegate, context) {
  8078. var method = delegate.iterator[context.method];
  8079. if (method === undefined) {
  8080. // A .throw or .return when the delegate iterator has no .throw
  8081. // method always terminates the yield* loop.
  8082. context.delegate = null;
  8083. if (context.method === "throw") {
  8084. if (delegate.iterator.return) {
  8085. // If the delegate iterator has a return method, give it a
  8086. // chance to clean up.
  8087. context.method = "return";
  8088. context.arg = undefined;
  8089. maybeInvokeDelegate(delegate, context);
  8090. if (context.method === "throw") {
  8091. // If maybeInvokeDelegate(context) changed context.method from
  8092. // "return" to "throw", let that override the TypeError below.
  8093. return ContinueSentinel;
  8094. }
  8095. }
  8096. context.method = "throw";
  8097. context.arg = new TypeError(
  8098. "The iterator does not provide a 'throw' method");
  8099. }
  8100. return ContinueSentinel;
  8101. }
  8102. var record = tryCatch(method, delegate.iterator, context.arg);
  8103. if (record.type === "throw") {
  8104. context.method = "throw";
  8105. context.arg = record.arg;
  8106. context.delegate = null;
  8107. return ContinueSentinel;
  8108. }
  8109. var info = record.arg;
  8110. if (! info) {
  8111. context.method = "throw";
  8112. context.arg = new TypeError("iterator result is not an object");
  8113. context.delegate = null;
  8114. return ContinueSentinel;
  8115. }
  8116. if (info.done) {
  8117. // Assign the result of the finished delegate to the temporary
  8118. // variable specified by delegate.resultName (see delegateYield).
  8119. context[delegate.resultName] = info.value;
  8120. // Resume execution at the desired location (see delegateYield).
  8121. context.next = delegate.nextLoc;
  8122. // If context.method was "throw" but the delegate handled the
  8123. // exception, let the outer generator proceed normally. If
  8124. // context.method was "next", forget context.arg since it has been
  8125. // "consumed" by the delegate iterator. If context.method was
  8126. // "return", allow the original .return call to continue in the
  8127. // outer generator.
  8128. if (context.method !== "return") {
  8129. context.method = "next";
  8130. context.arg = undefined;
  8131. }
  8132. } else {
  8133. // Re-yield the result returned by the delegate method.
  8134. return info;
  8135. }
  8136. // The delegate iterator is finished, so forget it and continue with
  8137. // the outer generator.
  8138. context.delegate = null;
  8139. return ContinueSentinel;
  8140. }
  8141. // Define Generator.prototype.{next,throw,return} in terms of the
  8142. // unified ._invoke helper method.
  8143. defineIteratorMethods(Gp);
  8144. Gp[toStringTagSymbol] = "Generator";
  8145. // A Generator should always return itself as the iterator object when the
  8146. // @@iterator function is called on it. Some browsers' implementations of the
  8147. // iterator prototype chain incorrectly implement this, causing the Generator
  8148. // object to not be returned from this call. This ensures that doesn't happen.
  8149. // See https://github.com/facebook/regenerator/issues/274 for more details.
  8150. Gp[iteratorSymbol] = function() {
  8151. return this;
  8152. };
  8153. Gp.toString = function() {
  8154. return "[object Generator]";
  8155. };
  8156. function pushTryEntry(locs) {
  8157. var entry = { tryLoc: locs[0] };
  8158. if (1 in locs) {
  8159. entry.catchLoc = locs[1];
  8160. }
  8161. if (2 in locs) {
  8162. entry.finallyLoc = locs[2];
  8163. entry.afterLoc = locs[3];
  8164. }
  8165. this.tryEntries.push(entry);
  8166. }
  8167. function resetTryEntry(entry) {
  8168. var record = entry.completion || {};
  8169. record.type = "normal";
  8170. delete record.arg;
  8171. entry.completion = record;
  8172. }
  8173. function Context(tryLocsList) {
  8174. // The root entry object (effectively a try statement without a catch
  8175. // or a finally block) gives us a place to store values thrown from
  8176. // locations where there is no enclosing try statement.
  8177. this.tryEntries = [{ tryLoc: "root" }];
  8178. tryLocsList.forEach(pushTryEntry, this);
  8179. this.reset(true);
  8180. }
  8181. runtime.keys = function(object) {
  8182. var keys = [];
  8183. for (var key in object) {
  8184. keys.push(key);
  8185. }
  8186. keys.reverse();
  8187. // Rather than returning an object with a next method, we keep
  8188. // things simple and return the next function itself.
  8189. return function next() {
  8190. while (keys.length) {
  8191. var key = keys.pop();
  8192. if (key in object) {
  8193. next.value = key;
  8194. next.done = false;
  8195. return next;
  8196. }
  8197. }
  8198. // To avoid creating an additional object, we just hang the .value
  8199. // and .done properties off the next function object itself. This
  8200. // also ensures that the minifier will not anonymize the function.
  8201. next.done = true;
  8202. return next;
  8203. };
  8204. };
  8205. function values(iterable) {
  8206. if (iterable) {
  8207. var iteratorMethod = iterable[iteratorSymbol];
  8208. if (iteratorMethod) {
  8209. return iteratorMethod.call(iterable);
  8210. }
  8211. if (typeof iterable.next === "function") {
  8212. return iterable;
  8213. }
  8214. if (!isNaN(iterable.length)) {
  8215. var i = -1, next = function next() {
  8216. while (++i < iterable.length) {
  8217. if (hasOwn.call(iterable, i)) {
  8218. next.value = iterable[i];
  8219. next.done = false;
  8220. return next;
  8221. }
  8222. }
  8223. next.value = undefined;
  8224. next.done = true;
  8225. return next;
  8226. };
  8227. return next.next = next;
  8228. }
  8229. }
  8230. // Return an iterator with no values.
  8231. return { next: doneResult };
  8232. }
  8233. runtime.values = values;
  8234. function doneResult() {
  8235. return { value: undefined, done: true };
  8236. }
  8237. Context.prototype = {
  8238. constructor: Context,
  8239. reset: function(skipTempReset) {
  8240. this.prev = 0;
  8241. this.next = 0;
  8242. // Resetting context._sent for legacy support of Babel's
  8243. // function.sent implementation.
  8244. this.sent = this._sent = undefined;
  8245. this.done = false;
  8246. this.delegate = null;
  8247. this.method = "next";
  8248. this.arg = undefined;
  8249. this.tryEntries.forEach(resetTryEntry);
  8250. if (!skipTempReset) {
  8251. for (var name in this) {
  8252. // Not sure about the optimal order of these conditions:
  8253. if (name.charAt(0) === "t" &&
  8254. hasOwn.call(this, name) &&
  8255. !isNaN(+name.slice(1))) {
  8256. this[name] = undefined;
  8257. }
  8258. }
  8259. }
  8260. },
  8261. stop: function() {
  8262. this.done = true;
  8263. var rootEntry = this.tryEntries[0];
  8264. var rootRecord = rootEntry.completion;
  8265. if (rootRecord.type === "throw") {
  8266. throw rootRecord.arg;
  8267. }
  8268. return this.rval;
  8269. },
  8270. dispatchException: function(exception) {
  8271. if (this.done) {
  8272. throw exception;
  8273. }
  8274. var context = this;
  8275. function handle(loc, caught) {
  8276. record.type = "throw";
  8277. record.arg = exception;
  8278. context.next = loc;
  8279. if (caught) {
  8280. // If the dispatched exception was caught by a catch block,
  8281. // then let that catch block handle the exception normally.
  8282. context.method = "next";
  8283. context.arg = undefined;
  8284. }
  8285. return !! caught;
  8286. }
  8287. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  8288. var entry = this.tryEntries[i];
  8289. var record = entry.completion;
  8290. if (entry.tryLoc === "root") {
  8291. // Exception thrown outside of any try block that could handle
  8292. // it, so set the completion value of the entire function to
  8293. // throw the exception.
  8294. return handle("end");
  8295. }
  8296. if (entry.tryLoc <= this.prev) {
  8297. var hasCatch = hasOwn.call(entry, "catchLoc");
  8298. var hasFinally = hasOwn.call(entry, "finallyLoc");
  8299. if (hasCatch && hasFinally) {
  8300. if (this.prev < entry.catchLoc) {
  8301. return handle(entry.catchLoc, true);
  8302. } else if (this.prev < entry.finallyLoc) {
  8303. return handle(entry.finallyLoc);
  8304. }
  8305. } else if (hasCatch) {
  8306. if (this.prev < entry.catchLoc) {
  8307. return handle(entry.catchLoc, true);
  8308. }
  8309. } else if (hasFinally) {
  8310. if (this.prev < entry.finallyLoc) {
  8311. return handle(entry.finallyLoc);
  8312. }
  8313. } else {
  8314. throw new Error("try statement without catch or finally");
  8315. }
  8316. }
  8317. }
  8318. },
  8319. abrupt: function(type, arg) {
  8320. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  8321. var entry = this.tryEntries[i];
  8322. if (entry.tryLoc <= this.prev &&
  8323. hasOwn.call(entry, "finallyLoc") &&
  8324. this.prev < entry.finallyLoc) {
  8325. var finallyEntry = entry;
  8326. break;
  8327. }
  8328. }
  8329. if (finallyEntry &&
  8330. (type === "break" ||
  8331. type === "continue") &&
  8332. finallyEntry.tryLoc <= arg &&
  8333. arg <= finallyEntry.finallyLoc) {
  8334. // Ignore the finally entry if control is not jumping to a
  8335. // location outside the try/catch block.
  8336. finallyEntry = null;
  8337. }
  8338. var record = finallyEntry ? finallyEntry.completion : {};
  8339. record.type = type;
  8340. record.arg = arg;
  8341. if (finallyEntry) {
  8342. this.method = "next";
  8343. this.next = finallyEntry.finallyLoc;
  8344. return ContinueSentinel;
  8345. }
  8346. return this.complete(record);
  8347. },
  8348. complete: function(record, afterLoc) {
  8349. if (record.type === "throw") {
  8350. throw record.arg;
  8351. }
  8352. if (record.type === "break" ||
  8353. record.type === "continue") {
  8354. this.next = record.arg;
  8355. } else if (record.type === "return") {
  8356. this.rval = this.arg = record.arg;
  8357. this.method = "return";
  8358. this.next = "end";
  8359. } else if (record.type === "normal" && afterLoc) {
  8360. this.next = afterLoc;
  8361. }
  8362. return ContinueSentinel;
  8363. },
  8364. finish: function(finallyLoc) {
  8365. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  8366. var entry = this.tryEntries[i];
  8367. if (entry.finallyLoc === finallyLoc) {
  8368. this.complete(entry.completion, entry.afterLoc);
  8369. resetTryEntry(entry);
  8370. return ContinueSentinel;
  8371. }
  8372. }
  8373. },
  8374. "catch": function(tryLoc) {
  8375. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  8376. var entry = this.tryEntries[i];
  8377. if (entry.tryLoc === tryLoc) {
  8378. var record = entry.completion;
  8379. if (record.type === "throw") {
  8380. var thrown = record.arg;
  8381. resetTryEntry(entry);
  8382. }
  8383. return thrown;
  8384. }
  8385. }
  8386. // The context.catch method must only be called with a location
  8387. // argument that corresponds to a known catch block.
  8388. throw new Error("illegal catch attempt");
  8389. },
  8390. delegateYield: function(iterable, resultName, nextLoc) {
  8391. this.delegate = {
  8392. iterator: values(iterable),
  8393. resultName: resultName,
  8394. nextLoc: nextLoc
  8395. };
  8396. if (this.method === "next") {
  8397. // Deliberately forget the last sent value so that we don't
  8398. // accidentally pass it on to the delegate.
  8399. this.arg = undefined;
  8400. }
  8401. return ContinueSentinel;
  8402. }
  8403. };
  8404. })(
  8405. // In sloppy mode, unbound `this` refers to the global object, fallback to
  8406. // Function constructor if we're in global strict mode. That is sadly a form
  8407. // of indirect eval which violates Content Security Policy.
  8408. (function() {
  8409. return this || (typeof self === "object" && self);
  8410. })() || Function("return this")()
  8411. );
  8412. /***/ }),
  8413. /***/ 28:
  8414. /*!******************************************************************!*\
  8415. !*** /Users/wanglili/Documents/liuniu/Mazui/utils/loginUtils.js ***!
  8416. \******************************************************************/
  8417. /*! no static exports found */
  8418. /***/ (function(module, exports, __webpack_require__) {
  8419. "use strict";
  8420. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.getActionPage = getActionPage;exports.interceptor = interceptor;exports.saveUrl = saveUrl;function getActionPage() {
  8421. var pages = getCurrentPages();
  8422. return pages[pages.length - 1];
  8423. }
  8424. //登录拦截
  8425. function interceptor() {
  8426. var pages = getActionPage();
  8427. // 获取当前页面
  8428. var pageUrl = '/' + pages.route;
  8429. var url = '/pages/public/login';
  8430. url = '/pages/public/wxLogin';
  8431. if (pageUrl != url) {
  8432. uni.navigateTo({
  8433. url: url });
  8434. }
  8435. }
  8436. // 保存页面
  8437. function saveUrl() {
  8438. // 获取当前页面
  8439. var page = getActionPage();
  8440. // 获取跳转前路由地址
  8441. var path = '/' + page.route;
  8442. // 判断是否在商品页
  8443. if (path == '/pages/product/product') {
  8444. path = path + '?id=' + page.goodsid;
  8445. // 判断是否不是普通商品
  8446. if (page.goodsType > 0) {
  8447. path += '&type=' + page.goodsType;
  8448. }
  8449. // 判断是否为秒杀商品
  8450. if (page.goodsType == 1) {
  8451. path += "&stoptime=" + page.seckillObj.stopTime;
  8452. }
  8453. }
  8454. // 保存当前过去页面
  8455. uni.setStorageSync('present', path);
  8456. // 返回是否存储成功
  8457. return true;
  8458. }
  8459. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  8460. /***/ }),
  8461. /***/ 29:
  8462. /*!***********************************************************!*\
  8463. !*** /Users/wanglili/Documents/liuniu/Mazui/api/login.js ***!
  8464. \***********************************************************/
  8465. /*! no static exports found */
  8466. /***/ (function(module, exports, __webpack_require__) {
  8467. "use strict";
  8468. Object.defineProperty(exports, "__esModule", { value: true });exports.login = login;exports.register = register;exports.verify = verify;exports.loginMobile = loginMobile;exports.bangding = bangding;exports.getDoctor = getDoctor;exports.getUserInfo = getUserInfo;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 23));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  8469. // 登录
  8470. function login(data) {
  8471. return (0, _request.default)({
  8472. url: '/api/auth/login',
  8473. method: 'post',
  8474. data: data });
  8475. }
  8476. // 注册
  8477. function register(data) {
  8478. return (0, _request.default)({
  8479. url: '/api/auth/register',
  8480. method: 'post',
  8481. data: data });
  8482. }
  8483. // 验证码
  8484. function verify(data) {
  8485. // type=register为注册
  8486. // type=login为登录
  8487. return (0, _request.default)({
  8488. url: '/api/register/verify',
  8489. method: 'post',
  8490. data: data });
  8491. }
  8492. // 短信登录
  8493. function loginMobile(data) {
  8494. return (0, _request.default)({
  8495. url: '/api/login/mobile',
  8496. method: 'post',
  8497. data: data });
  8498. }
  8499. //绑定手机号
  8500. function bangding(data) {
  8501. return (0, _request.default)({
  8502. url: '/api/binding',
  8503. method: 'POST',
  8504. data: data });
  8505. }
  8506. // 获取医生信息
  8507. function getDoctor(data) {
  8508. return (0, _request.default)({
  8509. url: '/api/user.user/getDoctor',
  8510. method: 'get',
  8511. data: data });
  8512. }
  8513. // 获取用户信息
  8514. function getUserInfo(data) {
  8515. return (0, _request.default)({
  8516. url: '/api/user.user/userInfo',
  8517. method: 'get',
  8518. data: data });
  8519. }
  8520. /***/ }),
  8521. /***/ 3:
  8522. /*!***********************************!*\
  8523. !*** (webpack)/buildin/global.js ***!
  8524. \***********************************/
  8525. /*! no static exports found */
  8526. /***/ (function(module, exports) {
  8527. var g;
  8528. // This works in non-strict mode
  8529. g = (function() {
  8530. return this;
  8531. })();
  8532. try {
  8533. // This works if eval is allowed (see CSP)
  8534. g = g || new Function("return this")();
  8535. } catch (e) {
  8536. // This works if the window reference is available
  8537. if (typeof window === "object") g = window;
  8538. }
  8539. // g can still be undefined, but nothing to do about it...
  8540. // We return undefined, instead of nothing here, so it's
  8541. // easier to handle this case. if(!global) { ...}
  8542. module.exports = g;
  8543. /***/ }),
  8544. /***/ 311:
  8545. /*!************************************************************!*\
  8546. !*** /Users/wanglili/Documents/liuniu/Mazui/api/wallet.js ***!
  8547. \************************************************************/
  8548. /*! no static exports found */
  8549. /***/ (function(module, exports, __webpack_require__) {
  8550. "use strict";
  8551. Object.defineProperty(exports, "__esModule", { value: true });exports.withdraw_info = withdraw_info;exports.order_income = order_income;exports.save_withdraw = save_withdraw;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 23));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  8552. //获取佣金信息
  8553. function withdraw_info(data) {
  8554. return (0, _request.default)({
  8555. url: '/api/user.spread/withdraw_info',
  8556. method: 'get',
  8557. data: data });
  8558. }
  8559. //获取佣金明细
  8560. function order_income(data) {
  8561. return (0, _request.default)({
  8562. url: '/api/user.spread/order_income',
  8563. method: 'get',
  8564. data: data });
  8565. }
  8566. //获取钱包收支列表
  8567. // export function order_income(data) {
  8568. // return request({
  8569. // url: '/api/user.spread/order_income',
  8570. // method: 'get',
  8571. // data
  8572. // });
  8573. // }
  8574. // 体现
  8575. function save_withdraw(data) {
  8576. return (0, _request.default)({
  8577. url: '/api/user.spread/save_withdraw',
  8578. method: 'post',
  8579. data: data });
  8580. }
  8581. /***/ }),
  8582. /***/ 328:
  8583. /*!********************************************************************!*\
  8584. !*** /Users/wanglili/Documents/liuniu/Mazui/utils/wxAuthorized.js ***!
  8585. \********************************************************************/
  8586. /*! no static exports found */
  8587. /***/ (function(module, exports, __webpack_require__) {
  8588. "use strict";
  8589. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.loginWinxin = loginWinxin;exports.weixindata = weixindata;exports.shareLoad = shareLoad;exports.setRouter = setRouter;exports.default = void 0;var _wx = __webpack_require__(/*! @/api/wx */ 22);
  8590. var log = _interopRequireWildcard(__webpack_require__(/*! ./log */ 13));
  8591. var _platform = __webpack_require__(/*! ./platform.js */ 329);
  8592. var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 5));
  8593. var _index = _interopRequireDefault(__webpack_require__(/*! @/libs/jweixin-module/index.js */ 330));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _getRequireWildcardCache() {if (typeof WeakMap !== "function") return null;var cache = new WeakMap();_getRequireWildcardCache = function _getRequireWildcardCache() {return cache;};return cache;}function _interopRequireWildcard(obj) {if (obj && obj.__esModule) {return obj;}if (obj === null || typeof obj !== "object" && typeof obj !== "function") {return { default: obj };}var cache = _getRequireWildcardCache();if (cache && cache.has(obj)) {return cache.get(obj);}var newObj = {};var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;for (var key in obj) {if (Object.prototype.hasOwnProperty.call(obj, key)) {var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;if (desc && (desc.get || desc.set)) {Object.defineProperty(newObj, key, desc);} else {newObj[key] = obj[key];}}}newObj.default = obj;if (cache) {cache.set(obj, newObj);}return newObj;}function _readOnlyError(name) {throw new Error("\"" + name + "\" is read-only");}
  8594. // 保存分享数据
  8595. var shareData = '';
  8596. // 保存注册返回appId数据
  8597. var appId = '';
  8598. //保存路由对象
  8599. var router = '';
  8600. //微信登录
  8601. /**
  8602. * @param {string} 当前页面地址信息
  8603. */
  8604. function loginWinxin() {
  8605. console.log('1');
  8606. var pages, page, path;
  8607. try {
  8608. pages = getCurrentPages();
  8609. // 获取跳转前页面
  8610. page = pages[pages.length - 1];
  8611. // 获取跳转前路由地址
  8612. path = page.route;
  8613. } catch (e) {
  8614. console.log(e);
  8615. //TODO handle the exception
  8616. }
  8617. // 判断是否在登录页
  8618. if (path != 'pages/redirect/redirect') {
  8619. log.addLog('开始注册微信');
  8620. weixindata().then(function () {
  8621. console.log('2');
  8622. // 调用
  8623. try {
  8624. weixinSq();
  8625. } catch (e) {
  8626. console.log(e);
  8627. //TODO handle the exception
  8628. }
  8629. });
  8630. }
  8631. };
  8632. // 微信授权登录
  8633. function weixinSq() {
  8634. // 微信授权后跳转页面
  8635. try {
  8636. var ul = encodeURIComponent(_store.default.state.baseURL + _store.default.state.urlFile + '/#/pages/redirect/redirect');
  8637. // 打开微信授权页面
  8638. var url =
  8639. 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' +
  8640. appId +
  8641. '&redirect_uri=' +
  8642. ul +
  8643. '&response_type=code&scope=snsapi_userinfo&state=' +
  8644. new Date().getTime() +
  8645. '#wechat_redirect';
  8646. window.location.href = url;
  8647. } catch (e) {
  8648. console.log(e);
  8649. //TODO handle the exception
  8650. }
  8651. };
  8652. // 微信注册
  8653. function weixindata(config) {
  8654. var url;
  8655. try {
  8656. if (router.mode === "history") {
  8657. // 在ios中时候注册为微信刚进入时候的页面
  8658. if (window.entryUrl === '') {
  8659. window.entryUrl = location.href.split('#')[0];
  8660. }
  8661. url = (0, _platform.isAndroid)() ? location.href.split('#')[0] : window.entryUrl;
  8662. }
  8663. if (router.mode === "hash") {
  8664. url = location.href.split('#')[0];
  8665. }
  8666. log.addLog('注册开始', url);
  8667. console.log('开始注册', url);
  8668. } catch (e) {
  8669. console.log('错误', e);
  8670. }
  8671. return new Promise(function (ok, error) {
  8672. try {
  8673. //注册微信信息
  8674. (0, _wx.wechatConfig)({
  8675. url: url }).
  8676. then(function (_ref)
  8677. {var data = _ref.data;
  8678. if (data.jsApiList.indexOf('updateAppMessageShareData') < 0) {
  8679. data.jsApiList.push('updateAppMessageShareData');
  8680. }
  8681. if (data.jsApiList.indexOf('updateTimelineShareData') < 0) {
  8682. data.jsApiList.push('updateTimelineShareData');
  8683. }
  8684. try {
  8685. // 保存appId
  8686. appId = data.appId;
  8687. // 微信信息配置
  8688. _index.default.config({
  8689. debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  8690. appId: data.appId, // 必填,企业号的唯一标识,此处填写企业号corpid
  8691. timestamp: data.timestamp, // 必填,生成签名的时间戳
  8692. nonceStr: data.nonceStr, // 必填,生成签名的随机串
  8693. signature: data.signature, // 必填,签名,见附录1
  8694. jsApiList: data.jsApiList // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
  8695. });
  8696. _index.default.ready(function (e) {
  8697. log.addLog("注册完毕", data);
  8698. console.log('注册完毕');
  8699. ok(data);
  8700. });
  8701. } catch (e) {
  8702. console.log(e);
  8703. }
  8704. }).
  8705. catch(function (e) {
  8706. error(e);
  8707. console.log(e);
  8708. });
  8709. } catch (e) {
  8710. console.log(e);
  8711. //TODO handle the exception
  8712. }
  8713. });
  8714. }
  8715. // 判断分享调用方法
  8716. function shareLoad(config) {
  8717. console.log('开始调用分享');
  8718. try {
  8719. weixindata().then(function (e) {
  8720. // 判断有无自定义数据
  8721. if (config) {
  8722. shareFun(config);
  8723. } else {
  8724. // 判断是否已经缓存了默认数据
  8725. if (shareData) {
  8726. shareFun();
  8727. } else {
  8728. // 请求获取默认数据
  8729. (0, _wx.share)({}).then(function (_ref2)
  8730. {var data = _ref2.data;
  8731. console.log('请求获取默认数据', data);
  8732. shareData = data.data;
  8733. shareFun();
  8734. });
  8735. }
  8736. }
  8737. });
  8738. } catch (e) {
  8739. console.log('报错', e);
  8740. //TODO handle the exception
  8741. }
  8742. }
  8743. // 配置分享数据
  8744. function shareFun(config) {
  8745. try {
  8746. console.log('分享内容', config);
  8747. var mess;
  8748. if (config) {
  8749. mess = {
  8750. link: config.link, // 分享链接
  8751. imgUrl: config.imgUrl,
  8752. desc: config.desc,
  8753. title: config.title,
  8754. success: config.success || function (e) {
  8755. console.log(e);
  8756. },
  8757. fail: config.fail || function (e) {
  8758. console.log(e);
  8759. } };
  8760. } else {
  8761. var userInfo = uni.getStorageSync('userInfo');
  8762. console.log(userInfo);
  8763. var url = window.location.href + '?spread=' + userInfo.uid;
  8764. url = (_readOnlyError("url"), url.replace(/[\?,&]{0,1}from=singlemessage/g, ''));
  8765. mess = {
  8766. title: shareData.title,
  8767. link: url, // 分享链接
  8768. imgUrl: shareData.img, // 分享图标
  8769. desc: shareData.synopsis,
  8770. success: function success() {
  8771. // uni.showModal({
  8772. // title: '分享',
  8773. // content: '分享成功',
  8774. // showCancel: false,
  8775. // success: res => {
  8776. // console.log('分享成功回调接口');
  8777. // },
  8778. // fail: () => {},
  8779. // complete: () => {}
  8780. // });
  8781. } };
  8782. }
  8783. // 获取仓库数据
  8784. // 分享好友
  8785. _index.default.updateAppMessageShareData(mess);
  8786. // 分享朋友圈
  8787. _index.default.updateTimelineShareData(mess);
  8788. } catch (e) {
  8789. console.log(e);
  8790. //TODO handle the exception
  8791. }
  8792. }
  8793. // 保存路由对象
  8794. function setRouter(route) {
  8795. router = route;
  8796. }var _default =
  8797. {
  8798. weixinObj: _index.default,
  8799. shareData: shareData,
  8800. appId: appId,
  8801. setRouter: setRouter,
  8802. shareLoad: shareLoad };exports.default = _default;
  8803. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  8804. /***/ }),
  8805. /***/ 329:
  8806. /*!****************************************************************!*\
  8807. !*** /Users/wanglili/Documents/liuniu/Mazui/utils/platform.js ***!
  8808. \****************************************************************/
  8809. /*! no static exports found */
  8810. /***/ (function(module, exports, __webpack_require__) {
  8811. "use strict";
  8812. Object.defineProperty(exports, "__esModule", { value: true });exports.isAndroid = isAndroid;exports.isIOS = isIOS;exports.isPad = isPad;exports.isWinPad = isWinPad;exports.default = void 0;function isAndroid() {
  8813. var ua = navigator.userAgent,
  8814. _isAndroid = ua.indexOf('Android') > -1 || ua.indexOf('Linux') > -1;
  8815. return _isAndroid;
  8816. }
  8817. function isIOS() {
  8818. return !!navigator.userAgent.match(/(i[^;]+\;(U;)? CPU.+Mac OS X)/);
  8819. }
  8820. function isPad() {
  8821. return navigator.userAgent.toLowerCase().match(/iPad/i) == "ipad";
  8822. }
  8823. function isWinPad() {
  8824. return navigator.userAgent.indexOf("Windows NT") >= 0;
  8825. }var _default =
  8826. {
  8827. isAndroid: isAndroid,
  8828. isIOS: isIOS,
  8829. isPad: isPad,
  8830. isWinPad: isWinPad };exports.default = _default;
  8831. /***/ }),
  8832. /***/ 330:
  8833. /*!***************************************************************************!*\
  8834. !*** /Users/wanglili/Documents/liuniu/Mazui/libs/jweixin-module/index.js ***!
  8835. \***************************************************************************/
  8836. /*! no static exports found */
  8837. /***/ (function(module, exports, __webpack_require__) {
  8838. function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}!function (e, n) {
  8839. true ? module.exports = n(e) : undefined;
  8840. }(window, function (o, e) {
  8841. function c(n, e, i) {
  8842. o.WeixinJSBridge ? WeixinJSBridge.invoke(n, r(e), function (e) {
  8843. a(n, e, i);
  8844. }) : d(n, i);
  8845. }
  8846. function i(n, i, t) {
  8847. o.WeixinJSBridge ? WeixinJSBridge.on(n, function (e) {
  8848. t && t.trigger && t.trigger(e), a(n, e, i);
  8849. }) : d(n, t || i);
  8850. }
  8851. function r(e) {
  8852. return (e = e || {}).appId = M.appId, e.verifyAppId = M.appId, e.verifySignType = "sha1", e.
  8853. verifyTimestamp = M.timestamp + "", e.verifyNonceStr = M.nonceStr, e.verifySignature = M.signature, e;
  8854. }
  8855. function n(e) {
  8856. return {
  8857. timeStamp: e.timestamp + "",
  8858. nonceStr: e.nonceStr,
  8859. package: e.package,
  8860. paySign: e.paySign,
  8861. signType: e.signType || "SHA1" };
  8862. }
  8863. function a(e, n, i) {
  8864. "openEnterpriseChat" == e && (n.errCode = n.err_code), delete n.err_code, delete n.err_desc, delete n.
  8865. err_detail;
  8866. var t = n.errMsg;
  8867. t || (t = n.err_msg, delete n.err_msg, t = function (e, n) {
  8868. var i = e,
  8869. t = f[i];
  8870. t && (i = t);
  8871. var o = "ok";
  8872. if (n) {
  8873. var r = n.indexOf(":");
  8874. "confirm" == (o = n.substring(r + 1)) && (o = "ok"), "failed" == o && (o = "fail"), -1 != o.
  8875. indexOf("failed_") && (o = o.substring(7)), -1 != o.indexOf("fail_") && (o = o.
  8876. substring(5)), "access denied" != (o = (o = o.replace(/_/g, " ")).toLowerCase()) &&
  8877. "no permission to execute" != o || (o = "permission denied"), "config" == i &&
  8878. "function not exist" == o && (o = "ok"), "" == o && (o = "fail");
  8879. }
  8880. return n = i + ":" + o;
  8881. }(e, t), n.errMsg = t), (i = i || {})._complete && (i._complete(n), delete i._complete), t = n.errMsg ||
  8882. "", M.debug && !i.isInnerInvoke && alert(JSON.stringify(n));
  8883. var o = t.indexOf(":");
  8884. switch (t.substring(o + 1)) {
  8885. case "ok":
  8886. i.success && i.success(n);
  8887. break;
  8888. case "cancel":
  8889. i.cancel && i.cancel(n);
  8890. break;
  8891. default:
  8892. i.fail && i.fail(n);}
  8893. i.complete && i.complete(n);
  8894. }
  8895. function s(e) {
  8896. if (e) {
  8897. for (var n = 0, i = e.length; n < i; ++n) {
  8898. var t = e[n],
  8899. o = p[t];
  8900. o && (e[n] = o);
  8901. }
  8902. return e;
  8903. }
  8904. }
  8905. function d(e, n) {
  8906. if (!(!M.debug || n && n.isInnerInvoke)) {
  8907. var i = f[e];
  8908. i && (e = i), n && n._complete && delete n._complete, console.log('"' + e + '",', n || "");
  8909. }
  8910. }
  8911. function l() {
  8912. return new Date().getTime();
  8913. }
  8914. function u(e) {
  8915. I && (o.WeixinJSBridge ? e() : t.addEventListener && t.addEventListener("WeixinJSBridgeReady", e, !1));
  8916. }
  8917. if (!o.jWeixin) {var _C;
  8918. var p = {
  8919. config: "preVerifyJSAPI",
  8920. onMenuShareTimeline: "menu:share:timeline",
  8921. onMenuShareAppMessage: "menu:share:appmessage",
  8922. onMenuShareQQ: "menu:share:qq",
  8923. onMenuShareWeibo: "menu:share:weiboApp",
  8924. onMenuShareQZone: "menu:share:QZone",
  8925. previewImage: "imagePreview",
  8926. getLocation: "geoLocation",
  8927. openProductSpecificView: "openProductViewWithPid",
  8928. addCard: "batchAddCard",
  8929. openCard: "batchViewCard",
  8930. chooseWXPay: "getBrandWCPayRequest",
  8931. openEnterpriseRedPacket: "getRecevieBizHongBaoRequest",
  8932. startSearchBeacons: "startMonitoringBeacons",
  8933. stopSearchBeacons: "stopMonitoringBeacons",
  8934. onSearchBeacons: "onBeaconsInRange",
  8935. consumeAndShareCard: "consumedShareCard",
  8936. openAddress: "editAddress" },
  8937. f = function () {
  8938. var e = {};
  8939. for (var n in p) {e[p[n]] = n;}
  8940. return e;
  8941. }(),
  8942. t = o.document,
  8943. m = t.title,
  8944. g = navigator.userAgent.toLowerCase(),
  8945. h = navigator.platform.toLowerCase(),
  8946. v = !(!h.match("mac") && !h.match("win")),
  8947. S = -1 != g.indexOf("wxdebugger"),
  8948. I = -1 != g.indexOf("micromessenger"),
  8949. y = -1 != g.indexOf("android"),
  8950. _ = -1 != g.indexOf("iphone") || -1 != g.indexOf("ipad"),
  8951. w = (O = g.match(/micromessenger\/(\d+\.\d+\.\d+)/) || g.match(/micromessenger\/(\d+\.\d+)/)) ? O[1] :
  8952. "",
  8953. k = {
  8954. initStartTime: l(),
  8955. initEndTime: 0,
  8956. preVerifyStartTime: 0,
  8957. preVerifyEndTime: 0 },
  8958. T = {
  8959. version: 1,
  8960. appId: "",
  8961. initTime: 0,
  8962. preVerifyTime: 0,
  8963. networkType: "",
  8964. isPreVerifyOk: 1,
  8965. systemType: _ ? 1 : y ? 2 : -1,
  8966. clientVersion: w,
  8967. url: encodeURIComponent(location.href) },
  8968. M = {},
  8969. P = {
  8970. _completes: [] },
  8971. x = {
  8972. state: 0,
  8973. data: {} };
  8974. u(function () {
  8975. k.initEndTime = l();
  8976. });
  8977. var A = !1,
  8978. V = [],
  8979. C = (_C = {
  8980. config: function config(e) {
  8981. d("config", M = e);
  8982. var t = !1 !== M.check;
  8983. u(function () {
  8984. if (t) c(p.config, {
  8985. verifyJsApiList: s(M.jsApiList) },
  8986. function () {
  8987. P._complete = function (e) {
  8988. k.preVerifyEndTime = l(), x.state = 1, x.data = e;
  8989. }, P.success = function (e) {
  8990. T.isPreVerifyOk = 0;
  8991. }, P.fail = function (e) {
  8992. P._fail ? P._fail(e) : x.state = -1;
  8993. };
  8994. var t = P._completes;
  8995. return t.push(function () {
  8996. !function (e) {
  8997. if (!(v || S || M.debug || w < "6.0.2" || T.
  8998. systemType < 0)) {
  8999. var i = new Image();
  9000. T.appId = M.appId, T.initTime = k.initEndTime -
  9001. k.initStartTime, T.preVerifyTime = k.
  9002. preVerifyEndTime - k.preVerifyStartTime, C.
  9003. getNetworkType({
  9004. isInnerInvoke: !0,
  9005. success: function success(e) {
  9006. T.networkType = e.
  9007. networkType;
  9008. var n =
  9009. "https://open.weixin.qq.com/sdk/report?v=" +
  9010. T.version + "&o=" + T.
  9011. isPreVerifyOk + "&s=" +
  9012. T.systemType + "&c=" + T.
  9013. clientVersion + "&a=" +
  9014. T.appId + "&n=" + T.
  9015. networkType + "&i=" + T.
  9016. initTime + "&p=" + T.
  9017. preVerifyTime + "&u=" +
  9018. T.url;
  9019. i.src = n;
  9020. } });
  9021. }
  9022. }();
  9023. }), P.complete = function (e) {
  9024. for (var n = 0, i = t.length; n < i; ++n) {t[n]();}
  9025. P._completes = [];
  9026. }, P;
  9027. }()), k.preVerifyStartTime = l();else
  9028. {
  9029. x.state = 1;
  9030. for (var e = P._completes, n = 0, i = e.length; n < i; ++n) {e[n]();}
  9031. P._completes = [];
  9032. }
  9033. }), C.invoke || (C.invoke = function (e, n, i) {
  9034. o.WeixinJSBridge && WeixinJSBridge.invoke(e, r(n), i);
  9035. }, C.on = function (e, n) {
  9036. o.WeixinJSBridge && WeixinJSBridge.on(e, n);
  9037. });
  9038. },
  9039. ready: function ready(e) {
  9040. 0 != x.state ? e() : (P._completes.push(e), !I && M.debug && e());
  9041. },
  9042. error: function error(e) {
  9043. w < "6.0.2" || (-1 == x.state ? e(x.data) : P._fail = e);
  9044. },
  9045. checkJsApi: function checkJsApi(e) {
  9046. c("checkJsApi", {
  9047. jsApiList: s(e.jsApiList) }, (
  9048. e._complete = function (e) {
  9049. if (y) {
  9050. var n = e.checkResult;
  9051. n && (e.checkResult = JSON.parse(n));
  9052. }
  9053. e = function (e) {
  9054. var n = e.checkResult;
  9055. for (var i in n) {
  9056. var t = f[i];
  9057. t && (n[t] = n[i], delete n[i]);
  9058. }
  9059. return e;
  9060. }(e);
  9061. }, e));
  9062. },
  9063. onMenuShareTimeline: function onMenuShareTimeline(e) {
  9064. i(p.onMenuShareTimeline, {
  9065. complete: function complete() {
  9066. c("shareTimeline", {
  9067. title: e.title || m,
  9068. desc: e.title || m,
  9069. img_url: e.imgUrl || "",
  9070. link: e.link || location.href,
  9071. type: e.type || "link",
  9072. data_url: e.dataUrl || "" },
  9073. e);
  9074. } },
  9075. e);
  9076. },
  9077. onMenuShareAppMessage: function onMenuShareAppMessage(n) {
  9078. i(p.onMenuShareAppMessage, {
  9079. complete: function complete(e) {
  9080. "favorite" === e.scene ? c("sendAppMessage", {
  9081. title: n.title || m,
  9082. desc: n.desc || "",
  9083. link: n.link || location.href,
  9084. img_url: n.imgUrl || "",
  9085. type: n.type || "link",
  9086. data_url: n.dataUrl || "" }) :
  9087. c("sendAppMessage", {
  9088. title: n.title || m,
  9089. desc: n.desc || "",
  9090. link: n.link || location.href,
  9091. img_url: n.imgUrl || "",
  9092. type: n.type || "link",
  9093. data_url: n.dataUrl || "" },
  9094. n);
  9095. } },
  9096. n);
  9097. },
  9098. onMenuShareQQ: function onMenuShareQQ(e) {
  9099. i(p.onMenuShareQQ, {
  9100. complete: function complete() {
  9101. c("shareQQ", {
  9102. title: e.title || m,
  9103. desc: e.desc || "",
  9104. img_url: e.imgUrl || "",
  9105. link: e.link || location.href },
  9106. e);
  9107. } },
  9108. e);
  9109. },
  9110. onMenuShareWeibo: function onMenuShareWeibo(e) {
  9111. i(p.onMenuShareWeibo, {
  9112. complete: function complete() {
  9113. c("shareWeiboApp", {
  9114. title: e.title || m,
  9115. desc: e.desc || "",
  9116. img_url: e.imgUrl || "",
  9117. link: e.link || location.href },
  9118. e);
  9119. } },
  9120. e);
  9121. },
  9122. onMenuShareQZone: function onMenuShareQZone(e) {
  9123. i(p.onMenuShareQZone, {
  9124. complete: function complete() {
  9125. c("shareQZone", {
  9126. title: e.title || m,
  9127. desc: e.desc || "",
  9128. img_url: e.imgUrl || "",
  9129. link: e.link || location.href },
  9130. e);
  9131. } },
  9132. e);
  9133. },
  9134. updateTimelineShareData: function updateTimelineShareData(e) {
  9135. c("updateTimelineShareData", {
  9136. title: e.title,
  9137. link: e.link,
  9138. imgUrl: e.imgUrl },
  9139. e);
  9140. },
  9141. updateAppMessageShareData: function updateAppMessageShareData(e) {
  9142. c("updateAppMessageShareData", {
  9143. title: e.title,
  9144. desc: e.desc,
  9145. link: e.link,
  9146. imgUrl: e.imgUrl },
  9147. e);
  9148. },
  9149. startRecord: function startRecord(e) {
  9150. c("startRecord", {}, e);
  9151. },
  9152. stopRecord: function stopRecord(e) {
  9153. c("stopRecord", {}, e);
  9154. },
  9155. onVoiceRecordEnd: function onVoiceRecordEnd(e) {
  9156. i("onVoiceRecordEnd", e);
  9157. },
  9158. playVoice: function playVoice(e) {
  9159. c("playVoice", {
  9160. localId: e.localId },
  9161. e);
  9162. },
  9163. pauseVoice: function pauseVoice(e) {
  9164. c("pauseVoice", {
  9165. localId: e.localId },
  9166. e);
  9167. },
  9168. stopVoice: function stopVoice(e) {
  9169. c("stopVoice", {
  9170. localId: e.localId },
  9171. e);
  9172. },
  9173. onVoicePlayEnd: function onVoicePlayEnd(e) {
  9174. i("onVoicePlayEnd", e);
  9175. },
  9176. uploadVoice: function uploadVoice(e) {
  9177. c("uploadVoice", {
  9178. localId: e.localId,
  9179. isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 },
  9180. e);
  9181. },
  9182. downloadVoice: function downloadVoice(e) {
  9183. c("downloadVoice", {
  9184. serverId: e.serverId,
  9185. isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 },
  9186. e);
  9187. },
  9188. translateVoice: function translateVoice(e) {
  9189. c("translateVoice", {
  9190. localId: e.localId,
  9191. isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 },
  9192. e);
  9193. },
  9194. chooseImage: function chooseImage(e) {
  9195. c("chooseImage", {
  9196. scene: "1|2",
  9197. count: e.count || 9,
  9198. sizeType: e.sizeType || ["original", "compressed"],
  9199. sourceType: e.sourceType || ["album", "camera"] }, (
  9200. e._complete = function (e) {
  9201. if (y) {
  9202. var n = e.localIds;
  9203. try {
  9204. n && (e.localIds = JSON.parse(n));
  9205. } catch (e) {}
  9206. }
  9207. }, e));
  9208. },
  9209. getLocation: function getLocation(e) {},
  9210. previewImage: function previewImage(e) {
  9211. c(p.previewImage, {
  9212. current: e.current,
  9213. urls: e.urls },
  9214. e);
  9215. },
  9216. uploadImage: function uploadImage(e) {
  9217. c("uploadImage", {
  9218. localId: e.localId,
  9219. isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 },
  9220. e);
  9221. },
  9222. downloadImage: function downloadImage(e) {
  9223. c("downloadImage", {
  9224. serverId: e.serverId,
  9225. isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 },
  9226. e);
  9227. },
  9228. getLocalImgData: function getLocalImgData(e) {
  9229. !1 === A ? (A = !0, c("getLocalImgData", {
  9230. localId: e.localId }, (
  9231. e._complete = function (e) {
  9232. if (A = !1, 0 < V.length) {
  9233. var n = V.shift();
  9234. wx.getLocalImgData(n);
  9235. }
  9236. }, e))) : V.push(e);
  9237. },
  9238. getNetworkType: function getNetworkType(e) {
  9239. c("getNetworkType", {}, (e._complete = function (e) {
  9240. e = function (e) {
  9241. var n = e.errMsg;
  9242. e.errMsg = "getNetworkType:ok";
  9243. var i = e.subtype;
  9244. if (delete e.subtype, i) e.networkType = i;else
  9245. {
  9246. var t = n.indexOf(":"),
  9247. o = n.substring(t + 1);
  9248. switch (o) {
  9249. case "wifi":
  9250. case "edge":
  9251. case "wwan":
  9252. e.networkType = o;
  9253. break;
  9254. default:
  9255. e.errMsg = "getNetworkType:fail";}
  9256. }
  9257. return e;
  9258. }(e);
  9259. }, e));
  9260. },
  9261. openLocation: function openLocation(e) {
  9262. c("openLocation", {
  9263. latitude: e.latitude,
  9264. longitude: e.longitude,
  9265. name: e.name || "",
  9266. address: e.address || "",
  9267. scale: e.scale || 28,
  9268. infoUrl: e.infoUrl || "" },
  9269. e);
  9270. } }, _defineProperty(_C, "getLocation",
  9271. function getLocation(e) {
  9272. c(p.getLocation, {
  9273. type: (e = e || {}).type || "wgs84" }, (
  9274. e._complete = function (e) {
  9275. delete e.type;
  9276. }, e));
  9277. }), _defineProperty(_C, "hideOptionMenu",
  9278. function hideOptionMenu(e) {
  9279. c("hideOptionMenu", {}, e);
  9280. }), _defineProperty(_C, "showOptionMenu",
  9281. function showOptionMenu(e) {
  9282. c("showOptionMenu", {}, e);
  9283. }), _defineProperty(_C, "closeWindow",
  9284. function closeWindow(e) {
  9285. c("closeWindow", {}, e = e || {});
  9286. }), _defineProperty(_C, "hideMenuItems",
  9287. function hideMenuItems(e) {
  9288. c("hideMenuItems", {
  9289. menuList: e.menuList },
  9290. e);
  9291. }), _defineProperty(_C, "showMenuItems",
  9292. function showMenuItems(e) {
  9293. c("showMenuItems", {
  9294. menuList: e.menuList },
  9295. e);
  9296. }), _defineProperty(_C, "hideAllNonBaseMenuItem",
  9297. function hideAllNonBaseMenuItem(e) {
  9298. c("hideAllNonBaseMenuItem", {}, e);
  9299. }), _defineProperty(_C, "showAllNonBaseMenuItem",
  9300. function showAllNonBaseMenuItem(e) {
  9301. c("showAllNonBaseMenuItem", {}, e);
  9302. }), _defineProperty(_C, "scanQRCode",
  9303. function scanQRCode(e) {
  9304. c("scanQRCode", {
  9305. needResult: (e = e || {}).needResult || 0,
  9306. scanType: e.scanType || ["qrCode", "barCode"] }, (
  9307. e._complete = function (e) {
  9308. if (_) {
  9309. var n = e.resultStr;
  9310. if (n) {
  9311. var i = JSON.parse(n);
  9312. e.resultStr = i && i.scan_code && i.scan_code.scan_result;
  9313. }
  9314. }
  9315. }, e));
  9316. }), _defineProperty(_C, "openAddress",
  9317. function openAddress(e) {
  9318. c(p.openAddress, {}, (e._complete = function (e) {
  9319. var n;
  9320. (n = e).postalCode = n.addressPostalCode, delete n.addressPostalCode, n.
  9321. provinceName = n.proviceFirstStageName, delete n.proviceFirstStageName,
  9322. n.cityName = n.addressCitySecondStageName, delete n.
  9323. addressCitySecondStageName, n.countryName = n.
  9324. addressCountiesThirdStageName, delete n.addressCountiesThirdStageName,
  9325. n.detailInfo = n.addressDetailInfo, delete n.addressDetailInfo, e = n;
  9326. }, e));
  9327. }), _defineProperty(_C, "openProductSpecificView",
  9328. function openProductSpecificView(e) {
  9329. c(p.openProductSpecificView, {
  9330. pid: e.productId,
  9331. view_type: e.viewType || 0,
  9332. ext_info: e.extInfo },
  9333. e);
  9334. }), _defineProperty(_C, "addCard",
  9335. function addCard(e) {
  9336. for (var n = e.cardList, i = [], t = 0, o = n.length; t < o; ++t) {
  9337. var r = n[t],
  9338. a = {
  9339. card_id: r.cardId,
  9340. card_ext: r.cardExt };
  9341. i.push(a);
  9342. }
  9343. c(p.addCard, {
  9344. card_list: i }, (
  9345. e._complete = function (e) {
  9346. var n = e.card_list;
  9347. if (n) {
  9348. for (var i = 0, t = (n = JSON.parse(n)).length; i < t; ++i) {
  9349. var o = n[i];
  9350. o.cardId = o.card_id, o.cardExt = o.card_ext, o.isSuccess = !!o.
  9351. is_succ, delete o.card_id, delete o.card_ext, delete o.is_succ;
  9352. }
  9353. e.cardList = n, delete e.card_list;
  9354. }
  9355. }, e));
  9356. }), _defineProperty(_C, "chooseCard",
  9357. function chooseCard(e) {
  9358. c("chooseCard", {
  9359. app_id: M.appId,
  9360. location_id: e.shopId || "",
  9361. sign_type: e.signType || "SHA1",
  9362. card_id: e.cardId || "",
  9363. card_type: e.cardType || "",
  9364. card_sign: e.cardSign,
  9365. time_stamp: e.timestamp + "",
  9366. nonce_str: e.nonceStr }, (
  9367. e._complete = function (e) {
  9368. e.cardList = e.choose_card_info, delete e.choose_card_info;
  9369. }, e));
  9370. }), _defineProperty(_C, "openCard",
  9371. function openCard(e) {
  9372. for (var n = e.cardList, i = [], t = 0, o = n.length; t < o; ++t) {
  9373. var r = n[t],
  9374. a = {
  9375. card_id: r.cardId,
  9376. code: r.code };
  9377. i.push(a);
  9378. }
  9379. c(p.openCard, {
  9380. card_list: i },
  9381. e);
  9382. }), _defineProperty(_C, "consumeAndShareCard",
  9383. function consumeAndShareCard(e) {
  9384. c(p.consumeAndShareCard, {
  9385. consumedCardId: e.cardId,
  9386. consumedCode: e.code },
  9387. e);
  9388. }), _defineProperty(_C, "chooseWXPay",
  9389. function chooseWXPay(e) {
  9390. c(p.chooseWXPay, n(e), e);
  9391. }), _defineProperty(_C, "openEnterpriseRedPacket",
  9392. function openEnterpriseRedPacket(e) {
  9393. c(p.openEnterpriseRedPacket, n(e), e);
  9394. }), _defineProperty(_C, "startSearchBeacons",
  9395. function startSearchBeacons(e) {
  9396. c(p.startSearchBeacons, {
  9397. ticket: e.ticket },
  9398. e);
  9399. }), _defineProperty(_C, "stopSearchBeacons",
  9400. function stopSearchBeacons(e) {
  9401. c(p.stopSearchBeacons, {}, e);
  9402. }), _defineProperty(_C, "onSearchBeacons",
  9403. function onSearchBeacons(e) {
  9404. i(p.onSearchBeacons, e);
  9405. }), _defineProperty(_C, "openEnterpriseChat",
  9406. function openEnterpriseChat(e) {
  9407. c("openEnterpriseChat", {
  9408. useridlist: e.userIds,
  9409. chatname: e.groupName },
  9410. e);
  9411. }), _defineProperty(_C, "launchMiniProgram",
  9412. function launchMiniProgram(e) {
  9413. c("launchMiniProgram", {
  9414. targetAppId: e.targetAppId,
  9415. path: function (e) {
  9416. if ("string" == typeof e && 0 < e.length) {
  9417. var n = e.split("?")[0],
  9418. i = e.split("?")[1];
  9419. return n += ".html", void 0 !== i ? n + "?" + i : n;
  9420. }
  9421. }(e.path),
  9422. envVersion: e.envVersion },
  9423. e);
  9424. }), _defineProperty(_C, "miniProgram",
  9425. {
  9426. navigateBack: function navigateBack(e) {
  9427. e = e || {}, u(function () {
  9428. c("invokeMiniProgramAPI", {
  9429. name: "navigateBack",
  9430. arg: {
  9431. delta: e.delta || 1 } },
  9432. e);
  9433. });
  9434. },
  9435. navigateTo: function navigateTo(e) {
  9436. u(function () {
  9437. c("invokeMiniProgramAPI", {
  9438. name: "navigateTo",
  9439. arg: {
  9440. url: e.url } },
  9441. e);
  9442. });
  9443. },
  9444. redirectTo: function redirectTo(e) {
  9445. u(function () {
  9446. c("invokeMiniProgramAPI", {
  9447. name: "redirectTo",
  9448. arg: {
  9449. url: e.url } },
  9450. e);
  9451. });
  9452. },
  9453. switchTab: function switchTab(e) {
  9454. u(function () {
  9455. c("invokeMiniProgramAPI", {
  9456. name: "switchTab",
  9457. arg: {
  9458. url: e.url } },
  9459. e);
  9460. });
  9461. },
  9462. reLaunch: function reLaunch(e) {
  9463. u(function () {
  9464. c("invokeMiniProgramAPI", {
  9465. name: "reLaunch",
  9466. arg: {
  9467. url: e.url } },
  9468. e);
  9469. });
  9470. },
  9471. postMessage: function postMessage(e) {
  9472. u(function () {
  9473. c("invokeMiniProgramAPI", {
  9474. name: "postMessage",
  9475. arg: e.data || {} },
  9476. e);
  9477. });
  9478. },
  9479. getEnv: function getEnv(e) {
  9480. u(function () {
  9481. e({
  9482. miniprogram: "miniprogram" === o.__wxjs_environment });
  9483. });
  9484. } }), _C),
  9485. L = 1,
  9486. B = {};
  9487. return t.addEventListener("error", function (e) {
  9488. if (!y) {
  9489. var n = e.target,
  9490. i = n.tagName,
  9491. t = n.src;
  9492. if (("IMG" == i || "VIDEO" == i || "AUDIO" == i || "SOURCE" == i) && -1 != t.indexOf(
  9493. "wxlocalresource://")) {
  9494. e.preventDefault(), e.stopPropagation();
  9495. var o = n["wx-id"];
  9496. if (o || (o = L++, n["wx-id"] = o), B[o]) return;
  9497. B[o] = !0, wx.ready(function () {
  9498. wx.getLocalImgData({
  9499. localId: t,
  9500. success: function success(e) {
  9501. n.src = e.localData;
  9502. } });
  9503. });
  9504. }
  9505. }
  9506. }, !0), t.addEventListener("load", function (e) {
  9507. if (!y) {
  9508. var n = e.target,
  9509. i = n.tagName;
  9510. if (n.src, "IMG" == i || "VIDEO" == i || "AUDIO" == i || "SOURCE" == i) {
  9511. var t = n["wx-id"];
  9512. t && (B[t] = !1);
  9513. }
  9514. }
  9515. }, !0), e && (o.wx = o.jWeixin = C), C;
  9516. }
  9517. var O;
  9518. });
  9519. /***/ }),
  9520. /***/ 339:
  9521. /*!**********************************************************!*\
  9522. !*** /Users/wanglili/Documents/liuniu/Mazui/api/chat.js ***!
  9523. \**********************************************************/
  9524. /*! no static exports found */
  9525. /***/ (function(module, exports, __webpack_require__) {
  9526. "use strict";
  9527. Object.defineProperty(exports, "__esModule", { value: true });exports.chatList = chatList;exports.setRead = setRead;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 23));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  9528. //聊天记录
  9529. function chatList(data) {
  9530. return (0, _request.default)({
  9531. url: '/api/object.order/chatList',
  9532. method: 'post',
  9533. data: data });
  9534. }
  9535. //已读消息
  9536. function setRead(data) {
  9537. return (0, _request.default)({
  9538. url: '/api/object.order/setRead',
  9539. method: 'post',
  9540. data: data });
  9541. }
  9542. /***/ }),
  9543. /***/ 345:
  9544. /*!****************************************************************************!*\
  9545. !*** /Users/wanglili/Documents/liuniu/Mazui/components/lb-picker/utils.js ***!
  9546. \****************************************************************************/
  9547. /*! no static exports found */
  9548. /***/ (function(module, exports, __webpack_require__) {
  9549. "use strict";
  9550. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.isObject = isObject;exports.getIndicatorHeight = getIndicatorHeight;function isObject(val) {
  9551. return Object.prototype.toString.call(val) === '[object Object]';
  9552. }
  9553. function getIndicatorHeight() {
  9554. return Math.round(uni.getSystemInfoSync().screenWidth / (750 / 100));
  9555. }
  9556. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  9557. /***/ }),
  9558. /***/ 372:
  9559. /*!***************************************************************!*\
  9560. !*** /Users/wanglili/Documents/liuniu/Mazui/api/recommend.js ***!
  9561. \***************************************************************/
  9562. /*! no static exports found */
  9563. /***/ (function(module, exports, __webpack_require__) {
  9564. "use strict";
  9565. Object.defineProperty(exports, "__esModule", { value: true });exports.spread_people = spread_people;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 23));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  9566. function spread_people(data) {
  9567. return (0, _request.default)({
  9568. url: '/api/user.spread/spread_people',
  9569. method: 'get',
  9570. data: data });
  9571. }
  9572. /***/ }),
  9573. /***/ 4:
  9574. /*!*********************************************************!*\
  9575. !*** /Users/wanglili/Documents/liuniu/Mazui/pages.json ***!
  9576. \*********************************************************/
  9577. /*! no static exports found */
  9578. /***/ (function(module, exports) {
  9579. /***/ }),
  9580. /***/ 405:
  9581. /*!**********************************************************!*\
  9582. !*** /Users/wanglili/Documents/liuniu/Mazui/api/live.js ***!
  9583. \**********************************************************/
  9584. /*! no static exports found */
  9585. /***/ (function(module, exports, __webpack_require__) {
  9586. "use strict";
  9587. Object.defineProperty(exports, "__esModule", { value: true });exports.liveList = liveList;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 23));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  9588. //直播间
  9589. function liveList(data) {
  9590. return (0, _request.default)({
  9591. url: '/api/special.live/index',
  9592. method: 'get',
  9593. data: data });
  9594. }
  9595. /***/ }),
  9596. /***/ 414:
  9597. /*!*******************************************************************!*\
  9598. !*** /Users/wanglili/Documents/liuniu/Mazui/static/img/img38.jpg ***!
  9599. \*******************************************************************/
  9600. /*! no static exports found */
  9601. /***/ (function(module, exports) {
  9602. module.exports = "/static/img/img38.jpg";
  9603. /***/ }),
  9604. /***/ 417:
  9605. /*!*******************************************************************************************!*\
  9606. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/html2canvas/dist/html2canvas.js ***!
  9607. \*******************************************************************************************/
  9608. /*! no static exports found */
  9609. /***/ (function(module, exports, __webpack_require__) {
  9610. /*!
  9611. * html2canvas 1.0.0-rc.5 <https://html2canvas.hertzen.com>
  9612. * Copyright (c) 2019 Niklas von Hertzen <https://hertzen.com>
  9613. * Released under MIT License
  9614. */
  9615. (function (global, factory) {
  9616. true ? module.exports = factory() :
  9617. undefined;
  9618. })(this, function () {'use strict';
  9619. /*! *****************************************************************************
  9620. Copyright (c) Microsoft Corporation. All rights reserved.
  9621. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  9622. this file except in compliance with the License. You may obtain a copy of the
  9623. License at http://www.apache.org/licenses/LICENSE-2.0
  9624. THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  9625. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  9626. WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  9627. MERCHANTABLITY OR NON-INFRINGEMENT.
  9628. See the Apache Version 2.0 License for specific language governing permissions
  9629. and limitations under the License.
  9630. ***************************************************************************** */
  9631. /* global Reflect, Promise */
  9632. var _extendStatics = function extendStatics(d, b) {
  9633. _extendStatics = Object.setPrototypeOf ||
  9634. { __proto__: [] } instanceof Array && function (d, b) {d.__proto__ = b;} ||
  9635. function (d, b) {for (var p in b) {if (b.hasOwnProperty(p)) d[p] = b[p];}};
  9636. return _extendStatics(d, b);
  9637. };
  9638. function __extends(d, b) {
  9639. _extendStatics(d, b);
  9640. function __() {this.constructor = d;}
  9641. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  9642. }
  9643. var _assign = function __assign() {
  9644. _assign = Object.assign || function __assign(t) {
  9645. for (var s, i = 1, n = arguments.length; i < n; i++) {
  9646. s = arguments[i];
  9647. for (var p in s) {if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];}
  9648. }
  9649. return t;
  9650. };
  9651. return _assign.apply(this, arguments);
  9652. };
  9653. function __awaiter(thisArg, _arguments, P, generator) {
  9654. return new (P || (P = Promise))(function (resolve, reject) {
  9655. function fulfilled(value) {try {step(generator.next(value));} catch (e) {reject(e);}}
  9656. function rejected(value) {try {step(generator["throw"](value));} catch (e) {reject(e);}}
  9657. function step(result) {result.done ? resolve(result.value) : new P(function (resolve) {resolve(result.value);}).then(fulfilled, rejected);}
  9658. step((generator = generator.apply(thisArg, _arguments || [])).next());
  9659. });
  9660. }
  9661. function __generator(thisArg, body) {
  9662. var _ = { label: 0, sent: function sent() {if (t[0] & 1) throw t[1];return t[1];}, trys: [], ops: [] },f,y,t,g;
  9663. return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {return this;}), g;
  9664. function verb(n) {return function (v) {return step([n, v]);};}
  9665. function step(op) {
  9666. if (f) throw new TypeError("Generator is already executing.");
  9667. while (_) {try {
  9668. if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
  9669. if (y = 0, t) op = [op[0] & 2, t.value];
  9670. switch (op[0]) {
  9671. case 0:case 1:t = op;break;
  9672. case 4:_.label++;return { value: op[1], done: false };
  9673. case 5:_.label++;y = op[1];op = [0];continue;
  9674. case 7:op = _.ops.pop();_.trys.pop();continue;
  9675. default:
  9676. if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {_ = 0;continue;}
  9677. if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {_.label = op[1];break;}
  9678. if (op[0] === 6 && _.label < t[1]) {_.label = t[1];t = op;break;}
  9679. if (t && _.label < t[2]) {_.label = t[2];_.ops.push(op);break;}
  9680. if (t[2]) _.ops.pop();
  9681. _.trys.pop();continue;}
  9682. op = body.call(thisArg, _);
  9683. } catch (e) {op = [6, e];y = 0;} finally {f = t = 0;}}
  9684. if (op[0] & 5) throw op[1];return { value: op[0] ? op[1] : void 0, done: true };
  9685. }
  9686. }
  9687. var Bounds = /** @class */function () {
  9688. function Bounds(x, y, w, h) {
  9689. this.left = x;
  9690. this.top = y;
  9691. this.width = w;
  9692. this.height = h;
  9693. }
  9694. Bounds.prototype.add = function (x, y, w, h) {
  9695. return new Bounds(this.left + x, this.top + y, this.width + w, this.height + h);
  9696. };
  9697. Bounds.fromClientRect = function (clientRect) {
  9698. return new Bounds(clientRect.left, clientRect.top, clientRect.width, clientRect.height);
  9699. };
  9700. return Bounds;
  9701. }();
  9702. var parseBounds = function parseBounds(node) {
  9703. return Bounds.fromClientRect(node.getBoundingClientRect());
  9704. };
  9705. var parseDocumentSize = function parseDocumentSize(document) {
  9706. var body = document.body;
  9707. var documentElement = document.documentElement;
  9708. if (!body || !documentElement) {
  9709. throw new Error("Unable to get document size");
  9710. }
  9711. var width = Math.max(Math.max(body.scrollWidth, documentElement.scrollWidth), Math.max(body.offsetWidth, documentElement.offsetWidth), Math.max(body.clientWidth, documentElement.clientWidth));
  9712. var height = Math.max(Math.max(body.scrollHeight, documentElement.scrollHeight), Math.max(body.offsetHeight, documentElement.offsetHeight), Math.max(body.clientHeight, documentElement.clientHeight));
  9713. return new Bounds(0, 0, width, height);
  9714. };
  9715. /*
  9716. * css-line-break 1.1.1 <https://github.com/niklasvh/css-line-break#readme>
  9717. * Copyright (c) 2019 Niklas von Hertzen <https://hertzen.com>
  9718. * Released under MIT License
  9719. */
  9720. var toCodePoints = function toCodePoints(str) {
  9721. var codePoints = [];
  9722. var i = 0;
  9723. var length = str.length;
  9724. while (i < length) {
  9725. var value = str.charCodeAt(i++);
  9726. if (value >= 0xd800 && value <= 0xdbff && i < length) {
  9727. var extra = str.charCodeAt(i++);
  9728. if ((extra & 0xfc00) === 0xdc00) {
  9729. codePoints.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);
  9730. } else
  9731. {
  9732. codePoints.push(value);
  9733. i--;
  9734. }
  9735. } else
  9736. {
  9737. codePoints.push(value);
  9738. }
  9739. }
  9740. return codePoints;
  9741. };
  9742. var fromCodePoint = function fromCodePoint() {
  9743. var codePoints = [];
  9744. for (var _i = 0; _i < arguments.length; _i++) {
  9745. codePoints[_i] = arguments[_i];
  9746. }
  9747. if (String.fromCodePoint) {
  9748. return String.fromCodePoint.apply(String, codePoints);
  9749. }
  9750. var length = codePoints.length;
  9751. if (!length) {
  9752. return '';
  9753. }
  9754. var codeUnits = [];
  9755. var index = -1;
  9756. var result = '';
  9757. while (++index < length) {
  9758. var codePoint = codePoints[index];
  9759. if (codePoint <= 0xffff) {
  9760. codeUnits.push(codePoint);
  9761. } else
  9762. {
  9763. codePoint -= 0x10000;
  9764. codeUnits.push((codePoint >> 10) + 0xd800, codePoint % 0x400 + 0xdc00);
  9765. }
  9766. if (index + 1 === length || codeUnits.length > 0x4000) {
  9767. result += String.fromCharCode.apply(String, codeUnits);
  9768. codeUnits.length = 0;
  9769. }
  9770. }
  9771. return result;
  9772. };
  9773. var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
  9774. // Use a lookup table to find the index.
  9775. var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
  9776. for (var i = 0; i < chars.length; i++) {
  9777. lookup[chars.charCodeAt(i)] = i;
  9778. }
  9779. var decode = function decode(base64) {
  9780. var bufferLength = base64.length * 0.75,len = base64.length,i,p = 0,encoded1,encoded2,encoded3,encoded4;
  9781. if (base64[base64.length - 1] === '=') {
  9782. bufferLength--;
  9783. if (base64[base64.length - 2] === '=') {
  9784. bufferLength--;
  9785. }
  9786. }
  9787. var buffer = typeof ArrayBuffer !== 'undefined' &&
  9788. typeof Uint8Array !== 'undefined' &&
  9789. typeof Uint8Array.prototype.slice !== 'undefined' ?
  9790. new ArrayBuffer(bufferLength) :
  9791. new Array(bufferLength);
  9792. var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);
  9793. for (i = 0; i < len; i += 4) {
  9794. encoded1 = lookup[base64.charCodeAt(i)];
  9795. encoded2 = lookup[base64.charCodeAt(i + 1)];
  9796. encoded3 = lookup[base64.charCodeAt(i + 2)];
  9797. encoded4 = lookup[base64.charCodeAt(i + 3)];
  9798. bytes[p++] = encoded1 << 2 | encoded2 >> 4;
  9799. bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;
  9800. bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;
  9801. }
  9802. return buffer;
  9803. };
  9804. var polyUint16Array = function polyUint16Array(buffer) {
  9805. var length = buffer.length;
  9806. var bytes = [];
  9807. for (var i = 0; i < length; i += 2) {
  9808. bytes.push(buffer[i + 1] << 8 | buffer[i]);
  9809. }
  9810. return bytes;
  9811. };
  9812. var polyUint32Array = function polyUint32Array(buffer) {
  9813. var length = buffer.length;
  9814. var bytes = [];
  9815. for (var i = 0; i < length; i += 4) {
  9816. bytes.push(buffer[i + 3] << 24 | buffer[i + 2] << 16 | buffer[i + 1] << 8 | buffer[i]);
  9817. }
  9818. return bytes;
  9819. };
  9820. /** Shift size for getting the index-2 table offset. */
  9821. var UTRIE2_SHIFT_2 = 5;
  9822. /** Shift size for getting the index-1 table offset. */
  9823. var UTRIE2_SHIFT_1 = 6 + 5;
  9824. /**
  9825. * Shift size for shifting left the index array values.
  9826. * Increases possible data size with 16-bit index values at the cost
  9827. * of compactability.
  9828. * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.
  9829. */
  9830. var UTRIE2_INDEX_SHIFT = 2;
  9831. /**
  9832. * Difference between the two shift sizes,
  9833. * for getting an index-1 offset from an index-2 offset. 6=11-5
  9834. */
  9835. var UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;
  9836. /**
  9837. * The part of the index-2 table for U+D800..U+DBFF stores values for
  9838. * lead surrogate code _units_ not code _points_.
  9839. * Values for lead surrogate code _points_ are indexed with this portion of the table.
  9840. * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)
  9841. */
  9842. var UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2;
  9843. /** Number of entries in a data block. 32=0x20 */
  9844. var UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2;
  9845. /** Mask for getting the lower bits for the in-data-block offset. */
  9846. var UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1;
  9847. var UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2;
  9848. /** Count the lengths of both BMP pieces. 2080=0x820 */
  9849. var UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH;
  9850. /**
  9851. * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.
  9852. * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.
  9853. */
  9854. var UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;
  9855. var UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */
  9856. /**
  9857. * The index-1 table, only used for supplementary code points, at offset 2112=0x840.
  9858. * Variable length, for code points up to highStart, where the last single-value range starts.
  9859. * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.
  9860. * (For 0x100000 supplementary code points U+10000..U+10ffff.)
  9861. *
  9862. * The part of the index-2 table for supplementary code points starts
  9863. * after this index-1 table.
  9864. *
  9865. * Both the index-1 table and the following part of the index-2 table
  9866. * are omitted completely if there is only BMP data.
  9867. */
  9868. var UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH;
  9869. /**
  9870. * Number of index-1 entries for the BMP. 32=0x20
  9871. * This part of the index-1 table is omitted from the serialized form.
  9872. */
  9873. var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1;
  9874. /** Number of entries in an index-2 block. 64=0x40 */
  9875. var UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2;
  9876. /** Mask for getting the lower bits for the in-index-2-block offset. */
  9877. var UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;
  9878. var slice16 = function slice16(view, start, end) {
  9879. if (view.slice) {
  9880. return view.slice(start, end);
  9881. }
  9882. return new Uint16Array(Array.prototype.slice.call(view, start, end));
  9883. };
  9884. var slice32 = function slice32(view, start, end) {
  9885. if (view.slice) {
  9886. return view.slice(start, end);
  9887. }
  9888. return new Uint32Array(Array.prototype.slice.call(view, start, end));
  9889. };
  9890. var createTrieFromBase64 = function createTrieFromBase64(base64) {
  9891. var buffer = decode(base64);
  9892. var view32 = Array.isArray(buffer) ? polyUint32Array(buffer) : new Uint32Array(buffer);
  9893. var view16 = Array.isArray(buffer) ? polyUint16Array(buffer) : new Uint16Array(buffer);
  9894. var headerLength = 24;
  9895. var index = slice16(view16, headerLength / 2, view32[4] / 2);
  9896. var data = view32[5] === 2 ?
  9897. slice16(view16, (headerLength + view32[4]) / 2) :
  9898. slice32(view32, Math.ceil((headerLength + view32[4]) / 4));
  9899. return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);
  9900. };
  9901. var Trie = /** @class */function () {
  9902. function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) {
  9903. this.initialValue = initialValue;
  9904. this.errorValue = errorValue;
  9905. this.highStart = highStart;
  9906. this.highValueIndex = highValueIndex;
  9907. this.index = index;
  9908. this.data = data;
  9909. }
  9910. /**
  9911. * Get the value for a code point as stored in the Trie.
  9912. *
  9913. * @param codePoint the code point
  9914. * @return the value
  9915. */
  9916. Trie.prototype.get = function (codePoint) {
  9917. var ix;
  9918. if (codePoint >= 0) {
  9919. if (codePoint < 0x0d800 || codePoint > 0x0dbff && codePoint <= 0x0ffff) {
  9920. // Ordinary BMP code point, excluding leading surrogates.
  9921. // BMP uses a single level lookup. BMP index starts at offset 0 in the Trie2 index.
  9922. // 16 bit data is stored in the index array itself.
  9923. ix = this.index[codePoint >> UTRIE2_SHIFT_2];
  9924. ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
  9925. return this.data[ix];
  9926. }
  9927. if (codePoint <= 0xffff) {
  9928. // Lead Surrogate Code Point. A Separate index section is stored for
  9929. // lead surrogate code units and code points.
  9930. // The main index has the code unit data.
  9931. // For this function, we need the code point data.
  9932. // Note: this expression could be refactored for slightly improved efficiency, but
  9933. // surrogate code points will be so rare in practice that it's not worth it.
  9934. ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + (codePoint - 0xd800 >> UTRIE2_SHIFT_2)];
  9935. ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
  9936. return this.data[ix];
  9937. }
  9938. if (codePoint < this.highStart) {
  9939. // Supplemental code point, use two-level lookup.
  9940. ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);
  9941. ix = this.index[ix];
  9942. ix += codePoint >> UTRIE2_SHIFT_2 & UTRIE2_INDEX_2_MASK;
  9943. ix = this.index[ix];
  9944. ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
  9945. return this.data[ix];
  9946. }
  9947. if (codePoint <= 0x10ffff) {
  9948. return this.data[this.highValueIndex];
  9949. }
  9950. }
  9951. // Fall through. The code point is outside of the legal range of 0..0x10ffff.
  9952. return this.errorValue;
  9953. };
  9954. return Trie;
  9955. }();
  9956. var base64 = 'KwAAAAAAAAAACA4AIDoAAPAfAAACAAAAAAAIABAAGABAAEgAUABYAF4AZgBeAGYAYABoAHAAeABeAGYAfACEAIAAiACQAJgAoACoAK0AtQC9AMUAXgBmAF4AZgBeAGYAzQDVAF4AZgDRANkA3gDmAOwA9AD8AAQBDAEUARoBIgGAAIgAJwEvATcBPwFFAU0BTAFUAVwBZAFsAXMBewGDATAAiwGTAZsBogGkAawBtAG8AcIBygHSAdoB4AHoAfAB+AH+AQYCDgIWAv4BHgImAi4CNgI+AkUCTQJTAlsCYwJrAnECeQKBAk0CiQKRApkCoQKoArACuALAAsQCzAIwANQC3ALkAjAA7AL0AvwCAQMJAxADGAMwACADJgMuAzYDPgOAAEYDSgNSA1IDUgNaA1oDYANiA2IDgACAAGoDgAByA3YDfgOAAIQDgACKA5IDmgOAAIAAogOqA4AAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAK8DtwOAAIAAvwPHA88D1wPfAyAD5wPsA/QD/AOAAIAABAQMBBIEgAAWBB4EJgQuBDMEIAM7BEEEXgBJBCADUQRZBGEEaQQwADAAcQQ+AXkEgQSJBJEEgACYBIAAoASoBK8EtwQwAL8ExQSAAIAAgACAAIAAgACgAM0EXgBeAF4AXgBeAF4AXgBeANUEXgDZBOEEXgDpBPEE+QQBBQkFEQUZBSEFKQUxBTUFPQVFBUwFVAVcBV4AYwVeAGsFcwV7BYMFiwWSBV4AmgWgBacFXgBeAF4AXgBeAKsFXgCyBbEFugW7BcIFwgXIBcIFwgXQBdQF3AXkBesF8wX7BQMGCwYTBhsGIwYrBjMGOwZeAD8GRwZNBl4AVAZbBl4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAGMGXgBqBnEGXgBeAF4AXgBeAF4AXgBeAF4AXgB5BoAG4wSGBo4GkwaAAIADHgR5AF4AXgBeAJsGgABGA4AAowarBrMGswagALsGwwbLBjAA0wbaBtoG3QbaBtoG2gbaBtoG2gblBusG8wb7BgMHCwcTBxsHCwcjBysHMAc1BzUHOgdCB9oGSgdSB1oHYAfaBloHaAfaBlIH2gbaBtoG2gbaBtoG2gbaBjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHbQdeAF4ANQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQd1B30HNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B4MH2gaKB68EgACAAIAAgACAAIAAgACAAI8HlwdeAJ8HpweAAIAArwe3B14AXgC/B8UHygcwANAH2AfgB4AA6AfwBz4B+AcACFwBCAgPCBcIogEYAR8IJwiAAC8INwg/CCADRwhPCFcIXwhnCEoDGgSAAIAAgABvCHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIhAiLCI4IMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAANQc1BzUHNQc1BzUHNQc1BzUHNQc1B54INQc1B6II2gaqCLIIugiAAIAAvgjGCIAAgACAAIAAgACAAIAAgACAAIAAywiHAYAA0wiAANkI3QjlCO0I9Aj8CIAAgACAAAIJCgkSCRoJIgknCTYHLwk3CZYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiAAIAAAAFAAXgBeAGAAcABeAHwAQACQAKAArQC9AJ4AXgBeAE0A3gBRAN4A7AD8AMwBGgEAAKcBNwEFAUwBXAF4QkhCmEKnArcCgAHHAsABz4LAAcABwAHAAd+C6ABoAG+C/4LAAcABwAHAAc+DF4MAAcAB54M3gweDV4Nng3eDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEeDqABVg6WDqABoQ6gAaABoAHXDvcONw/3DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DncPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB7cPPwlGCU4JMACAAIAAgABWCV4JYQmAAGkJcAl4CXwJgAkwADAAMAAwAIgJgACLCZMJgACZCZ8JowmrCYAAswkwAF4AXgB8AIAAuwkABMMJyQmAAM4JgADVCTAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAqwYWBNkIMAAwADAAMADdCeAJ6AnuCR4E9gkwAP4JBQoNCjAAMACAABUK0wiAAB0KJAosCjQKgAAwADwKQwqAAEsKvQmdCVMKWwowADAAgACAALcEMACAAGMKgABrCjAAMAAwADAAMAAwADAAMAAwADAAMAAeBDAAMAAwADAAMAAwADAAMAAwADAAMAAwAIkEPQFzCnoKiQSCCooKkAqJBJgKoAqkCokEGAGsCrQKvArBCjAAMADJCtEKFQHZCuEK/gHpCvEKMAAwADAAMACAAIwE+QowAIAAPwEBCzAAMAAwADAAMACAAAkLEQswAIAAPwEZCyELgAAOCCkLMAAxCzkLMAAwADAAMAAwADAAXgBeAEELMAAwADAAMAAwADAAMAAwAEkLTQtVC4AAXAtkC4AAiQkwADAAMAAwADAAMAAwADAAbAtxC3kLgAuFC4sLMAAwAJMLlwufCzAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAApwswADAAMACAAIAAgACvC4AAgACAAIAAgACAALcLMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAvwuAAMcLgACAAIAAgACAAIAAyguAAIAAgACAAIAA0QswADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAANkLgACAAIAA4AswADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACJCR4E6AswADAAhwHwC4AA+AsADAgMEAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMACAAIAAGAwdDCUMMAAwAC0MNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQw1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHPQwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADUHNQc1BzUHNQc1BzUHNQc2BzAAMAA5DDUHNQc1BzUHNQc1BzUHNQc1BzUHNQdFDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAATQxSDFoMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAF4AXgBeAF4AXgBeAF4AYgxeAGoMXgBxDHkMfwxeAIUMXgBeAI0MMAAwADAAMAAwAF4AXgCVDJ0MMAAwADAAMABeAF4ApQxeAKsMswy7DF4Awgy9DMoMXgBeAF4AXgBeAF4AXgBeAF4AXgDRDNkMeQBqCeAM3Ax8AOYM7Az0DPgMXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgCgAAANoAAHDQ4NFg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAeDSYNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAC4NMABeAF4ANg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAD4NRg1ODVYNXg1mDTAAbQ0wADAAMAAwADAAMAAwADAA2gbaBtoG2gbaBtoG2gbaBnUNeg3CBYANwgWFDdoGjA3aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gaUDZwNpA2oDdoG2gawDbcNvw3HDdoG2gbPDdYN3A3fDeYN2gbsDfMN2gbaBvoN/g3aBgYODg7aBl4AXgBeABYOXgBeACUG2gYeDl4AJA5eACwO2w3aBtoGMQ45DtoG2gbaBtoGQQ7aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B1EO2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQdZDjUHNQc1BzUHNQc1B2EONQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHaA41BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B3AO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B2EO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBkkOeA6gAKAAoAAwADAAMAAwAKAAoACgAKAAoACgAKAAgA4wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAD//wQABAAEAAQABAAEAAQABAAEAA0AAwABAAEAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAKABMAFwAeABsAGgAeABcAFgASAB4AGwAYAA8AGAAcAEsASwBLAEsASwBLAEsASwBLAEsAGAAYAB4AHgAeABMAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAFgAbABIAHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYADQARAB4ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkAFgAaABsAGwAbAB4AHQAdAB4ATwAXAB4ADQAeAB4AGgAbAE8ATwAOAFAAHQAdAB0ATwBPABcATwBPAE8AFgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwArAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAAQABAANAA0ASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAUAArACsAKwArACsAKwArACsABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAGgAaAFAAUABQAFAAUABMAB4AGwBQAB4AKwArACsABAAEAAQAKwBQAFAAUABQAFAAUAArACsAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUAArAFAAUAArACsABAArAAQABAAEAAQABAArACsAKwArAAQABAArACsABAAEAAQAKwArACsABAArACsAKwArACsAKwArAFAAUABQAFAAKwBQACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwAEAAQAUABQAFAABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQAKwArAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeABsAKwArACsAKwArACsAKwBQAAQABAAEAAQABAAEACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAKwArACsAKwArACsAKwArAAQABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwAEAFAAKwBQAFAAUABQAFAAUAArACsAKwBQAFAAUAArAFAAUABQAFAAKwArACsAUABQACsAUAArAFAAUAArACsAKwBQAFAAKwArACsAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQAKwArACsABAAEAAQAKwAEAAQABAAEACsAKwBQACsAKwArACsAKwArAAQAKwArACsAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAB4AHgAeAB4AHgAeABsAHgArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArAFAAUABQACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAB4AUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArACsAKwArACsAKwArAFAAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwArAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAKwBcAFwAKwBcACsAKwBcACsAKwArACsAKwArAFwAXABcAFwAKwBcAFwAXABcAFwAXABcACsAXABcAFwAKwBcACsAXAArACsAXABcACsAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgArACoAKgBcACsAKwBcAFwAXABcAFwAKwBcACsAKgAqACoAKgAqACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAFwAXABcAFwAUAAOAA4ADgAOAB4ADgAOAAkADgAOAA0ACQATABMAEwATABMACQAeABMAHgAeAB4ABAAEAB4AHgAeAB4AHgAeAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUAANAAQAHgAEAB4ABAAWABEAFgARAAQABABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAAQABAAEAAQABAANAAQABABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsADQANAB4AHgAeAB4AHgAeAAQAHgAeAB4AHgAeAB4AKwAeAB4ADgAOAA0ADgAeAB4AHgAeAB4ACQAJACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgAeAB4AHgBcAFwAXABcAFwAXAAqACoAKgAqAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAKgAqACoAKgAqACoAKgBcAFwAXAAqACoAKgAqAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAXAAqAEsASwBLAEsASwBLAEsASwBLAEsAKgAqACoAKgAqACoAUABQAFAAUABQAFAAKwBQACsAKwArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQACsAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwAEAAQABAAeAA0AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAEQArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAADQANAA0AUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAA0ADQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoADQANABUAXAANAB4ADQAbAFwAKgArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAB4AHgATABMADQANAA4AHgATABMAHgAEAAQABAAJACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAUABQAFAAUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwAeACsAKwArABMAEwBLAEsASwBLAEsASwBLAEsASwBLAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwBcAFwAXABcAFwAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcACsAKwArACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwAeAB4AXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsABABLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKgAqACoAKgAqACoAKgBcACoAKgAqACoAKgAqACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAUABQAFAAUABQAFAAUAArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4ADQANAA0ADQAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAHgAeAB4AHgBQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwANAA0ADQANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwBQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsABAAEAAQAHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAABABQAFAAUABQAAQABAAEAFAAUAAEAAQABAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAKwBQACsAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAKwArAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAKwAeAB4AHgAeAB4AHgAeAA4AHgArAA0ADQANAA0ADQANAA0ACQANAA0ADQAIAAQACwAEAAQADQAJAA0ADQAMAB0AHQAeABcAFwAWABcAFwAXABYAFwAdAB0AHgAeABQAFAAUAA0AAQABAAQABAAEAAQABAAJABoAGgAaABoAGgAaABoAGgAeABcAFwAdABUAFQAeAB4AHgAeAB4AHgAYABYAEQAVABUAFQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgANAB4ADQANAA0ADQAeAA0ADQANAAcAHgAeAB4AHgArAAQABAAEAAQABAAEAAQABAAEAAQAUABQACsAKwBPAFAAUABQAFAAUAAeAB4AHgAWABEATwBQAE8ATwBPAE8AUABQAFAAUABQAB4AHgAeABYAEQArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGgAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgBQABoAHgAdAB4AUAAeABoAHgAeAB4AHgAeAB4AHgAeAB4ATwAeAFAAGwAeAB4AUABQAFAAUABQAB4AHgAeAB0AHQAeAFAAHgBQAB4AUAAeAFAATwBQAFAAHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AUABQAFAAUABPAE8AUABQAFAAUABQAE8AUABQAE8AUABPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAE8ATwBPAE8ATwBPAE8ATwBPAE8AUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAATwAeAB4AKwArACsAKwAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB0AHQAeAB4AHgAdAB0AHgAeAB0AHgAeAB4AHQAeAB0AGwAbAB4AHQAeAB4AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB0AHgAdAB4AHQAdAB0AHQAdAB0AHgAdAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAdAB0AHQAdAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAlACUAHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB0AHQAeAB4AHgAeAB0AHQAdAB4AHgAdAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB0AHQAeAB4AHQAeAB4AHgAeAB0AHQAeAB4AHgAeACUAJQAdAB0AJQAeACUAJQAlACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHQAdAB0AHgAdACUAHQAdAB4AHQAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHQAdAB0AHQAlAB4AJQAlACUAHQAlACUAHQAdAB0AJQAlAB0AHQAlAB0AHQAlACUAJQAeAB0AHgAeAB4AHgAdAB0AJQAdAB0AHQAdAB0AHQAlACUAJQAlACUAHQAlACUAIAAlAB0AHQAlACUAJQAlACUAJQAlACUAHgAeAB4AJQAlACAAIAAgACAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeABcAFwAXABcAFwAXAB4AEwATACUAHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACUAJQBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwArACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAE8ATwBPAE8ATwBPAE8ATwAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeACsAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUAArACsAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQBQAFAAUABQACsAKwArACsAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAABAAEAAQAKwAEAAQAKwArACsAKwArAAQABAAEAAQAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsABAAEAAQAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsADQANAA0ADQANAA0ADQANAB4AKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAUABQAFAAUABQAA0ADQANAA0ADQANABQAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwANAA0ADQANAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAeAAQABAAEAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLACsADQArAB4AKwArAAQABAAEAAQAUABQAB4AUAArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwAEAAQABAAEAAQABAAEAAQABAAOAA0ADQATABMAHgAeAB4ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0AUABQAFAAUAAEAAQAKwArAAQADQANAB4AUAArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXABcAA0ADQANACoASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUAArACsAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANACsADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEcARwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwAeAAQABAANAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAEAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUAArACsAUAArACsAUABQACsAKwBQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAeAB4ADQANAA0ADQAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAArAAQABAArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAEAAQABAAEAAQABAAEACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAFgAWAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAKwBQACsAKwArACsAKwArAFAAKwArACsAKwBQACsAUAArAFAAKwBQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQACsAUAArAFAAKwBQACsAUABQACsAUAArACsAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAUABQAFAAUAArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUAArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAlACUAJQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeACUAJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeACUAJQAlACUAJQAeACUAJQAlACUAJQAgACAAIAAlACUAIAAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIQAhACEAIQAhACUAJQAgACAAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAIAAlACUAJQAlACAAJQAgACAAIAAgACAAIAAgACAAIAAlACUAJQAgACUAJQAlACUAIAAgACAAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeACUAHgAlAB4AJQAlACUAJQAlACAAJQAlACUAJQAeACUAHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAIAAgACAAIAAgAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFwAXABcAFQAVABUAHgAeAB4AHgAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAlACAAIAAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsA';
  9957. /* @flow */
  9958. var LETTER_NUMBER_MODIFIER = 50;
  9959. // Non-tailorable Line Breaking Classes
  9960. var BK = 1; // Cause a line break (after)
  9961. var CR = 2; // Cause a line break (after), except between CR and LF
  9962. var LF = 3; // Cause a line break (after)
  9963. var CM = 4; // Prohibit a line break between the character and the preceding character
  9964. var NL = 5; // Cause a line break (after)
  9965. var WJ = 7; // Prohibit line breaks before and after
  9966. var ZW = 8; // Provide a break opportunity
  9967. var GL = 9; // Prohibit line breaks before and after
  9968. var SP = 10; // Enable indirect line breaks
  9969. var ZWJ = 11; // Prohibit line breaks within joiner sequences
  9970. // Break Opportunities
  9971. var B2 = 12; // Provide a line break opportunity before and after the character
  9972. var BA = 13; // Generally provide a line break opportunity after the character
  9973. var BB = 14; // Generally provide a line break opportunity before the character
  9974. var HY = 15; // Provide a line break opportunity after the character, except in numeric context
  9975. var CB = 16; // Provide a line break opportunity contingent on additional information
  9976. // Characters Prohibiting Certain Breaks
  9977. var CL = 17; // Prohibit line breaks before
  9978. var CP = 18; // Prohibit line breaks before
  9979. var EX = 19; // Prohibit line breaks before
  9980. var IN = 20; // Allow only indirect line breaks between pairs
  9981. var NS = 21; // Allow only indirect line breaks before
  9982. var OP = 22; // Prohibit line breaks after
  9983. var QU = 23; // Act like they are both opening and closing
  9984. // Numeric Context
  9985. var IS = 24; // Prevent breaks after any and before numeric
  9986. var NU = 25; // Form numeric expressions for line breaking purposes
  9987. var PO = 26; // Do not break following a numeric expression
  9988. var PR = 27; // Do not break in front of a numeric expression
  9989. var SY = 28; // Prevent a break before; and allow a break after
  9990. // Other Characters
  9991. var AI = 29; // Act like AL when the resolvedEAW is N; otherwise; act as ID
  9992. var AL = 30; // Are alphabetic characters or symbols that are used with alphabetic characters
  9993. var CJ = 31; // Treat as NS or ID for strict or normal breaking.
  9994. var EB = 32; // Do not break from following Emoji Modifier
  9995. var EM = 33; // Do not break from preceding Emoji Base
  9996. var H2 = 34; // Form Korean syllable blocks
  9997. var H3 = 35; // Form Korean syllable blocks
  9998. var HL = 36; // Do not break around a following hyphen; otherwise act as Alphabetic
  9999. var ID = 37; // Break before or after; except in some numeric context
  10000. var JL = 38; // Form Korean syllable blocks
  10001. var JV = 39; // Form Korean syllable blocks
  10002. var JT = 40; // Form Korean syllable blocks
  10003. var RI = 41; // Keep pairs together. For pairs; break before and after other classes
  10004. var SA = 42; // Provide a line break opportunity contingent on additional, language-specific context analysis
  10005. var XX = 43; // Have as yet unknown line breaking behavior or unassigned code positions
  10006. var BREAK_MANDATORY = '!';
  10007. var BREAK_NOT_ALLOWED = '×';
  10008. var BREAK_ALLOWED = '÷';
  10009. var UnicodeTrie = createTrieFromBase64(base64);
  10010. var ALPHABETICS = [AL, HL];
  10011. var HARD_LINE_BREAKS = [BK, CR, LF, NL];
  10012. var SPACE = [SP, ZW];
  10013. var PREFIX_POSTFIX = [PR, PO];
  10014. var LINE_BREAKS = HARD_LINE_BREAKS.concat(SPACE);
  10015. var KOREAN_SYLLABLE_BLOCK = [JL, JV, JT, H2, H3];
  10016. var HYPHEN = [HY, BA];
  10017. var codePointsToCharacterClasses = function codePointsToCharacterClasses(codePoints, lineBreak) {
  10018. if (lineBreak === void 0) {lineBreak = 'strict';}
  10019. var types = [];
  10020. var indicies = [];
  10021. var categories = [];
  10022. codePoints.forEach(function (codePoint, index) {
  10023. var classType = UnicodeTrie.get(codePoint);
  10024. if (classType > LETTER_NUMBER_MODIFIER) {
  10025. categories.push(true);
  10026. classType -= LETTER_NUMBER_MODIFIER;
  10027. } else
  10028. {
  10029. categories.push(false);
  10030. }
  10031. if (['normal', 'auto', 'loose'].indexOf(lineBreak) !== -1) {
  10032. // U+2010, – U+2013, 〜 U+301C, ゠ U+30A0
  10033. if ([0x2010, 0x2013, 0x301c, 0x30a0].indexOf(codePoint) !== -1) {
  10034. indicies.push(index);
  10035. return types.push(CB);
  10036. }
  10037. }
  10038. if (classType === CM || classType === ZWJ) {
  10039. // LB10 Treat any remaining combining mark or ZWJ as AL.
  10040. if (index === 0) {
  10041. indicies.push(index);
  10042. return types.push(AL);
  10043. }
  10044. // LB9 Do not break a combining character sequence; treat it as if it has the line breaking class of
  10045. // the base character in all of the following rules. Treat ZWJ as if it were CM.
  10046. var prev = types[index - 1];
  10047. if (LINE_BREAKS.indexOf(prev) === -1) {
  10048. indicies.push(indicies[index - 1]);
  10049. return types.push(prev);
  10050. }
  10051. indicies.push(index);
  10052. return types.push(AL);
  10053. }
  10054. indicies.push(index);
  10055. if (classType === CJ) {
  10056. return types.push(lineBreak === 'strict' ? NS : ID);
  10057. }
  10058. if (classType === SA) {
  10059. return types.push(AL);
  10060. }
  10061. if (classType === AI) {
  10062. return types.push(AL);
  10063. }
  10064. // For supplementary characters, a useful default is to treat characters in the range 10000..1FFFD as AL
  10065. // and characters in the ranges 20000..2FFFD and 30000..3FFFD as ID, until the implementation can be revised
  10066. // to take into account the actual line breaking properties for these characters.
  10067. if (classType === XX) {
  10068. if (codePoint >= 0x20000 && codePoint <= 0x2fffd || codePoint >= 0x30000 && codePoint <= 0x3fffd) {
  10069. return types.push(ID);
  10070. } else
  10071. {
  10072. return types.push(AL);
  10073. }
  10074. }
  10075. types.push(classType);
  10076. });
  10077. return [indicies, types, categories];
  10078. };
  10079. var isAdjacentWithSpaceIgnored = function isAdjacentWithSpaceIgnored(a, b, currentIndex, classTypes) {
  10080. var current = classTypes[currentIndex];
  10081. if (Array.isArray(a) ? a.indexOf(current) !== -1 : a === current) {
  10082. var i = currentIndex;
  10083. while (i <= classTypes.length) {
  10084. i++;
  10085. var next = classTypes[i];
  10086. if (next === b) {
  10087. return true;
  10088. }
  10089. if (next !== SP) {
  10090. break;
  10091. }
  10092. }
  10093. }
  10094. if (current === SP) {
  10095. var i = currentIndex;
  10096. while (i > 0) {
  10097. i--;
  10098. var prev = classTypes[i];
  10099. if (Array.isArray(a) ? a.indexOf(prev) !== -1 : a === prev) {
  10100. var n = currentIndex;
  10101. while (n <= classTypes.length) {
  10102. n++;
  10103. var next = classTypes[n];
  10104. if (next === b) {
  10105. return true;
  10106. }
  10107. if (next !== SP) {
  10108. break;
  10109. }
  10110. }
  10111. }
  10112. if (prev !== SP) {
  10113. break;
  10114. }
  10115. }
  10116. }
  10117. return false;
  10118. };
  10119. var previousNonSpaceClassType = function previousNonSpaceClassType(currentIndex, classTypes) {
  10120. var i = currentIndex;
  10121. while (i >= 0) {
  10122. var type = classTypes[i];
  10123. if (type === SP) {
  10124. i--;
  10125. } else
  10126. {
  10127. return type;
  10128. }
  10129. }
  10130. return 0;
  10131. };
  10132. var _lineBreakAtIndex = function _lineBreakAtIndex(codePoints, classTypes, indicies, index, forbiddenBreaks) {
  10133. if (indicies[index] === 0) {
  10134. return BREAK_NOT_ALLOWED;
  10135. }
  10136. var currentIndex = index - 1;
  10137. if (Array.isArray(forbiddenBreaks) && forbiddenBreaks[currentIndex] === true) {
  10138. return BREAK_NOT_ALLOWED;
  10139. }
  10140. var beforeIndex = currentIndex - 1;
  10141. var afterIndex = currentIndex + 1;
  10142. var current = classTypes[currentIndex];
  10143. // LB4 Always break after hard line breaks.
  10144. // LB5 Treat CR followed by LF, as well as CR, LF, and NL as hard line breaks.
  10145. var before = beforeIndex >= 0 ? classTypes[beforeIndex] : 0;
  10146. var next = classTypes[afterIndex];
  10147. if (current === CR && next === LF) {
  10148. return BREAK_NOT_ALLOWED;
  10149. }
  10150. if (HARD_LINE_BREAKS.indexOf(current) !== -1) {
  10151. return BREAK_MANDATORY;
  10152. }
  10153. // LB6 Do not break before hard line breaks.
  10154. if (HARD_LINE_BREAKS.indexOf(next) !== -1) {
  10155. return BREAK_NOT_ALLOWED;
  10156. }
  10157. // LB7 Do not break before spaces or zero width space.
  10158. if (SPACE.indexOf(next) !== -1) {
  10159. return BREAK_NOT_ALLOWED;
  10160. }
  10161. // LB8 Break before any character following a zero-width space, even if one or more spaces intervene.
  10162. if (previousNonSpaceClassType(currentIndex, classTypes) === ZW) {
  10163. return BREAK_ALLOWED;
  10164. }
  10165. // LB8a Do not break between a zero width joiner and an ideograph, emoji base or emoji modifier.
  10166. if (UnicodeTrie.get(codePoints[currentIndex]) === ZWJ && (next === ID || next === EB || next === EM)) {
  10167. return BREAK_NOT_ALLOWED;
  10168. }
  10169. // LB11 Do not break before or after Word joiner and related characters.
  10170. if (current === WJ || next === WJ) {
  10171. return BREAK_NOT_ALLOWED;
  10172. }
  10173. // LB12 Do not break after NBSP and related characters.
  10174. if (current === GL) {
  10175. return BREAK_NOT_ALLOWED;
  10176. }
  10177. // LB12a Do not break before NBSP and related characters, except after spaces and hyphens.
  10178. if ([SP, BA, HY].indexOf(current) === -1 && next === GL) {
  10179. return BREAK_NOT_ALLOWED;
  10180. }
  10181. // LB13 Do not break before ‘]’ or ‘!’ or ‘;’ or ‘/’, even after spaces.
  10182. if ([CL, CP, EX, IS, SY].indexOf(next) !== -1) {
  10183. return BREAK_NOT_ALLOWED;
  10184. }
  10185. // LB14 Do not break after ‘[’, even after spaces.
  10186. if (previousNonSpaceClassType(currentIndex, classTypes) === OP) {
  10187. return BREAK_NOT_ALLOWED;
  10188. }
  10189. // LB15 Do not break within ‘”[’, even with intervening spaces.
  10190. if (isAdjacentWithSpaceIgnored(QU, OP, currentIndex, classTypes)) {
  10191. return BREAK_NOT_ALLOWED;
  10192. }
  10193. // LB16 Do not break between closing punctuation and a nonstarter (lb=NS), even with intervening spaces.
  10194. if (isAdjacentWithSpaceIgnored([CL, CP], NS, currentIndex, classTypes)) {
  10195. return BREAK_NOT_ALLOWED;
  10196. }
  10197. // LB17 Do not break within ‘——’, even with intervening spaces.
  10198. if (isAdjacentWithSpaceIgnored(B2, B2, currentIndex, classTypes)) {
  10199. return BREAK_NOT_ALLOWED;
  10200. }
  10201. // LB18 Break after spaces.
  10202. if (current === SP) {
  10203. return BREAK_ALLOWED;
  10204. }
  10205. // LB19 Do not break before or after quotation marks, such as ‘ ” ’.
  10206. if (current === QU || next === QU) {
  10207. return BREAK_NOT_ALLOWED;
  10208. }
  10209. // LB20 Break before and after unresolved CB.
  10210. if (next === CB || current === CB) {
  10211. return BREAK_ALLOWED;
  10212. }
  10213. // LB21 Do not break before hyphen-minus, other hyphens, fixed-width spaces, small kana, and other non-starters, or after acute accents.
  10214. if ([BA, HY, NS].indexOf(next) !== -1 || current === BB) {
  10215. return BREAK_NOT_ALLOWED;
  10216. }
  10217. // LB21a Don't break after Hebrew + Hyphen.
  10218. if (before === HL && HYPHEN.indexOf(current) !== -1) {
  10219. return BREAK_NOT_ALLOWED;
  10220. }
  10221. // LB21b Don’t break between Solidus and Hebrew letters.
  10222. if (current === SY && next === HL) {
  10223. return BREAK_NOT_ALLOWED;
  10224. }
  10225. // LB22 Do not break between two ellipses, or between letters, numbers or exclamations and ellipsis.
  10226. if (next === IN && ALPHABETICS.concat(IN, EX, NU, ID, EB, EM).indexOf(current) !== -1) {
  10227. return BREAK_NOT_ALLOWED;
  10228. }
  10229. // LB23 Do not break between digits and letters.
  10230. if (ALPHABETICS.indexOf(next) !== -1 && current === NU || ALPHABETICS.indexOf(current) !== -1 && next === NU) {
  10231. return BREAK_NOT_ALLOWED;
  10232. }
  10233. // LB23a Do not break between numeric prefixes and ideographs, or between ideographs and numeric postfixes.
  10234. if (current === PR && [ID, EB, EM].indexOf(next) !== -1 ||
  10235. [ID, EB, EM].indexOf(current) !== -1 && next === PO) {
  10236. return BREAK_NOT_ALLOWED;
  10237. }
  10238. // LB24 Do not break between numeric prefix/postfix and letters, or between letters and prefix/postfix.
  10239. if (ALPHABETICS.indexOf(current) !== -1 && PREFIX_POSTFIX.indexOf(next) !== -1 ||
  10240. PREFIX_POSTFIX.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) {
  10241. return BREAK_NOT_ALLOWED;
  10242. }
  10243. // LB25 Do not break between the following pairs of classes relevant to numbers:
  10244. if (
  10245. // (PR | PO) × ( OP | HY )? NU
  10246. [PR, PO].indexOf(current) !== -1 && (
  10247. next === NU || [OP, HY].indexOf(next) !== -1 && classTypes[afterIndex + 1] === NU) ||
  10248. // ( OP | HY ) × NU
  10249. [OP, HY].indexOf(current) !== -1 && next === NU ||
  10250. // NU × (NU | SY | IS)
  10251. current === NU && [NU, SY, IS].indexOf(next) !== -1) {
  10252. return BREAK_NOT_ALLOWED;
  10253. }
  10254. // NU (NU | SY | IS)* × (NU | SY | IS | CL | CP)
  10255. if ([NU, SY, IS, CL, CP].indexOf(next) !== -1) {
  10256. var prevIndex = currentIndex;
  10257. while (prevIndex >= 0) {
  10258. var type = classTypes[prevIndex];
  10259. if (type === NU) {
  10260. return BREAK_NOT_ALLOWED;
  10261. } else
  10262. if ([SY, IS].indexOf(type) !== -1) {
  10263. prevIndex--;
  10264. } else
  10265. {
  10266. break;
  10267. }
  10268. }
  10269. }
  10270. // NU (NU | SY | IS)* (CL | CP)? × (PO | PR))
  10271. if ([PR, PO].indexOf(next) !== -1) {
  10272. var prevIndex = [CL, CP].indexOf(current) !== -1 ? beforeIndex : currentIndex;
  10273. while (prevIndex >= 0) {
  10274. var type = classTypes[prevIndex];
  10275. if (type === NU) {
  10276. return BREAK_NOT_ALLOWED;
  10277. } else
  10278. if ([SY, IS].indexOf(type) !== -1) {
  10279. prevIndex--;
  10280. } else
  10281. {
  10282. break;
  10283. }
  10284. }
  10285. }
  10286. // LB26 Do not break a Korean syllable.
  10287. if (JL === current && [JL, JV, H2, H3].indexOf(next) !== -1 ||
  10288. [JV, H2].indexOf(current) !== -1 && [JV, JT].indexOf(next) !== -1 ||
  10289. [JT, H3].indexOf(current) !== -1 && next === JT) {
  10290. return BREAK_NOT_ALLOWED;
  10291. }
  10292. // LB27 Treat a Korean Syllable Block the same as ID.
  10293. if (KOREAN_SYLLABLE_BLOCK.indexOf(current) !== -1 && [IN, PO].indexOf(next) !== -1 ||
  10294. KOREAN_SYLLABLE_BLOCK.indexOf(next) !== -1 && current === PR) {
  10295. return BREAK_NOT_ALLOWED;
  10296. }
  10297. // LB28 Do not break between alphabetics (“at”).
  10298. if (ALPHABETICS.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) {
  10299. return BREAK_NOT_ALLOWED;
  10300. }
  10301. // LB29 Do not break between numeric punctuation and alphabetics (“e.g.”).
  10302. if (current === IS && ALPHABETICS.indexOf(next) !== -1) {
  10303. return BREAK_NOT_ALLOWED;
  10304. }
  10305. // LB30 Do not break between letters, numbers, or ordinary symbols and opening or closing parentheses.
  10306. if (ALPHABETICS.concat(NU).indexOf(current) !== -1 && next === OP ||
  10307. ALPHABETICS.concat(NU).indexOf(next) !== -1 && current === CP) {
  10308. return BREAK_NOT_ALLOWED;
  10309. }
  10310. // LB30a Break between two regional indicator symbols if and only if there are an even number of regional
  10311. // indicators preceding the position of the break.
  10312. if (current === RI && next === RI) {
  10313. var i = indicies[currentIndex];
  10314. var count = 1;
  10315. while (i > 0) {
  10316. i--;
  10317. if (classTypes[i] === RI) {
  10318. count++;
  10319. } else
  10320. {
  10321. break;
  10322. }
  10323. }
  10324. if (count % 2 !== 0) {
  10325. return BREAK_NOT_ALLOWED;
  10326. }
  10327. }
  10328. // LB30b Do not break between an emoji base and an emoji modifier.
  10329. if (current === EB && next === EM) {
  10330. return BREAK_NOT_ALLOWED;
  10331. }
  10332. return BREAK_ALLOWED;
  10333. };
  10334. var cssFormattedClasses = function cssFormattedClasses(codePoints, options) {
  10335. if (!options) {
  10336. options = { lineBreak: 'normal', wordBreak: 'normal' };
  10337. }
  10338. var _a = codePointsToCharacterClasses(codePoints, options.lineBreak),indicies = _a[0],classTypes = _a[1],isLetterNumber = _a[2];
  10339. if (options.wordBreak === 'break-all' || options.wordBreak === 'break-word') {
  10340. classTypes = classTypes.map(function (type) {return [NU, AL, SA].indexOf(type) !== -1 ? ID : type;});
  10341. }
  10342. var forbiddenBreakpoints = options.wordBreak === 'keep-all' ?
  10343. isLetterNumber.map(function (letterNumber, i) {
  10344. return letterNumber && codePoints[i] >= 0x4e00 && codePoints[i] <= 0x9fff;
  10345. }) :
  10346. undefined;
  10347. return [indicies, classTypes, forbiddenBreakpoints];
  10348. };
  10349. var Break = /** @class */function () {
  10350. function Break(codePoints, lineBreak, start, end) {
  10351. this.codePoints = codePoints;
  10352. this.required = lineBreak === BREAK_MANDATORY;
  10353. this.start = start;
  10354. this.end = end;
  10355. }
  10356. Break.prototype.slice = function () {
  10357. return fromCodePoint.apply(void 0, this.codePoints.slice(this.start, this.end));
  10358. };
  10359. return Break;
  10360. }();
  10361. var LineBreaker = function LineBreaker(str, options) {
  10362. var codePoints = toCodePoints(str);
  10363. var _a = cssFormattedClasses(codePoints, options),indicies = _a[0],classTypes = _a[1],forbiddenBreakpoints = _a[2];
  10364. var length = codePoints.length;
  10365. var lastEnd = 0;
  10366. var nextIndex = 0;
  10367. return {
  10368. next: function next() {
  10369. if (nextIndex >= length) {
  10370. return { done: true, value: null };
  10371. }
  10372. var lineBreak = BREAK_NOT_ALLOWED;
  10373. while (nextIndex < length &&
  10374. (lineBreak = _lineBreakAtIndex(codePoints, classTypes, indicies, ++nextIndex, forbiddenBreakpoints)) ===
  10375. BREAK_NOT_ALLOWED) {}
  10376. if (lineBreak !== BREAK_NOT_ALLOWED || nextIndex === length) {
  10377. var value = new Break(codePoints, lineBreak, lastEnd, nextIndex);
  10378. lastEnd = nextIndex;
  10379. return { value: value, done: false };
  10380. }
  10381. return { done: true, value: null };
  10382. } };
  10383. };
  10384. // https://www.w3.org/TR/css-syntax-3
  10385. var TokenType;
  10386. (function (TokenType) {
  10387. TokenType[TokenType["STRING_TOKEN"] = 0] = "STRING_TOKEN";
  10388. TokenType[TokenType["BAD_STRING_TOKEN"] = 1] = "BAD_STRING_TOKEN";
  10389. TokenType[TokenType["LEFT_PARENTHESIS_TOKEN"] = 2] = "LEFT_PARENTHESIS_TOKEN";
  10390. TokenType[TokenType["RIGHT_PARENTHESIS_TOKEN"] = 3] = "RIGHT_PARENTHESIS_TOKEN";
  10391. TokenType[TokenType["COMMA_TOKEN"] = 4] = "COMMA_TOKEN";
  10392. TokenType[TokenType["HASH_TOKEN"] = 5] = "HASH_TOKEN";
  10393. TokenType[TokenType["DELIM_TOKEN"] = 6] = "DELIM_TOKEN";
  10394. TokenType[TokenType["AT_KEYWORD_TOKEN"] = 7] = "AT_KEYWORD_TOKEN";
  10395. TokenType[TokenType["PREFIX_MATCH_TOKEN"] = 8] = "PREFIX_MATCH_TOKEN";
  10396. TokenType[TokenType["DASH_MATCH_TOKEN"] = 9] = "DASH_MATCH_TOKEN";
  10397. TokenType[TokenType["INCLUDE_MATCH_TOKEN"] = 10] = "INCLUDE_MATCH_TOKEN";
  10398. TokenType[TokenType["LEFT_CURLY_BRACKET_TOKEN"] = 11] = "LEFT_CURLY_BRACKET_TOKEN";
  10399. TokenType[TokenType["RIGHT_CURLY_BRACKET_TOKEN"] = 12] = "RIGHT_CURLY_BRACKET_TOKEN";
  10400. TokenType[TokenType["SUFFIX_MATCH_TOKEN"] = 13] = "SUFFIX_MATCH_TOKEN";
  10401. TokenType[TokenType["SUBSTRING_MATCH_TOKEN"] = 14] = "SUBSTRING_MATCH_TOKEN";
  10402. TokenType[TokenType["DIMENSION_TOKEN"] = 15] = "DIMENSION_TOKEN";
  10403. TokenType[TokenType["PERCENTAGE_TOKEN"] = 16] = "PERCENTAGE_TOKEN";
  10404. TokenType[TokenType["NUMBER_TOKEN"] = 17] = "NUMBER_TOKEN";
  10405. TokenType[TokenType["FUNCTION"] = 18] = "FUNCTION";
  10406. TokenType[TokenType["FUNCTION_TOKEN"] = 19] = "FUNCTION_TOKEN";
  10407. TokenType[TokenType["IDENT_TOKEN"] = 20] = "IDENT_TOKEN";
  10408. TokenType[TokenType["COLUMN_TOKEN"] = 21] = "COLUMN_TOKEN";
  10409. TokenType[TokenType["URL_TOKEN"] = 22] = "URL_TOKEN";
  10410. TokenType[TokenType["BAD_URL_TOKEN"] = 23] = "BAD_URL_TOKEN";
  10411. TokenType[TokenType["CDC_TOKEN"] = 24] = "CDC_TOKEN";
  10412. TokenType[TokenType["CDO_TOKEN"] = 25] = "CDO_TOKEN";
  10413. TokenType[TokenType["COLON_TOKEN"] = 26] = "COLON_TOKEN";
  10414. TokenType[TokenType["SEMICOLON_TOKEN"] = 27] = "SEMICOLON_TOKEN";
  10415. TokenType[TokenType["LEFT_SQUARE_BRACKET_TOKEN"] = 28] = "LEFT_SQUARE_BRACKET_TOKEN";
  10416. TokenType[TokenType["RIGHT_SQUARE_BRACKET_TOKEN"] = 29] = "RIGHT_SQUARE_BRACKET_TOKEN";
  10417. TokenType[TokenType["UNICODE_RANGE_TOKEN"] = 30] = "UNICODE_RANGE_TOKEN";
  10418. TokenType[TokenType["WHITESPACE_TOKEN"] = 31] = "WHITESPACE_TOKEN";
  10419. TokenType[TokenType["EOF_TOKEN"] = 32] = "EOF_TOKEN";
  10420. })(TokenType || (TokenType = {}));
  10421. var FLAG_UNRESTRICTED = 1 << 0;
  10422. var FLAG_ID = 1 << 1;
  10423. var FLAG_INTEGER = 1 << 2;
  10424. var FLAG_NUMBER = 1 << 3;
  10425. var LINE_FEED = 0x000a;
  10426. var SOLIDUS = 0x002f;
  10427. var REVERSE_SOLIDUS = 0x005c;
  10428. var CHARACTER_TABULATION = 0x0009;
  10429. var SPACE$1 = 0x0020;
  10430. var QUOTATION_MARK = 0x0022;
  10431. var EQUALS_SIGN = 0x003d;
  10432. var NUMBER_SIGN = 0x0023;
  10433. var DOLLAR_SIGN = 0x0024;
  10434. var PERCENTAGE_SIGN = 0x0025;
  10435. var APOSTROPHE = 0x0027;
  10436. var LEFT_PARENTHESIS = 0x0028;
  10437. var RIGHT_PARENTHESIS = 0x0029;
  10438. var LOW_LINE = 0x005f;
  10439. var HYPHEN_MINUS = 0x002d;
  10440. var EXCLAMATION_MARK = 0x0021;
  10441. var LESS_THAN_SIGN = 0x003c;
  10442. var GREATER_THAN_SIGN = 0x003e;
  10443. var COMMERCIAL_AT = 0x0040;
  10444. var LEFT_SQUARE_BRACKET = 0x005b;
  10445. var RIGHT_SQUARE_BRACKET = 0x005d;
  10446. var CIRCUMFLEX_ACCENT = 0x003d;
  10447. var LEFT_CURLY_BRACKET = 0x007b;
  10448. var QUESTION_MARK = 0x003f;
  10449. var RIGHT_CURLY_BRACKET = 0x007d;
  10450. var VERTICAL_LINE = 0x007c;
  10451. var TILDE = 0x007e;
  10452. var CONTROL = 0x0080;
  10453. var REPLACEMENT_CHARACTER = 0xfffd;
  10454. var ASTERISK = 0x002a;
  10455. var PLUS_SIGN = 0x002b;
  10456. var COMMA = 0x002c;
  10457. var COLON = 0x003a;
  10458. var SEMICOLON = 0x003b;
  10459. var FULL_STOP = 0x002e;
  10460. var NULL = 0x0000;
  10461. var BACKSPACE = 0x0008;
  10462. var LINE_TABULATION = 0x000b;
  10463. var SHIFT_OUT = 0x000e;
  10464. var INFORMATION_SEPARATOR_ONE = 0x001f;
  10465. var DELETE = 0x007f;
  10466. var EOF = -1;
  10467. var ZERO = 0x0030;
  10468. var a = 0x0061;
  10469. var e = 0x0065;
  10470. var f = 0x0066;
  10471. var u = 0x0075;
  10472. var z = 0x007a;
  10473. var A = 0x0041;
  10474. var E = 0x0045;
  10475. var F = 0x0046;
  10476. var U = 0x0055;
  10477. var Z = 0x005a;
  10478. var isDigit = function isDigit(codePoint) {return codePoint >= ZERO && codePoint <= 0x0039;};
  10479. var isSurrogateCodePoint = function isSurrogateCodePoint(codePoint) {return codePoint >= 0xd800 && codePoint <= 0xdfff;};
  10480. var isHex = function isHex(codePoint) {
  10481. return isDigit(codePoint) || codePoint >= A && codePoint <= F || codePoint >= a && codePoint <= f;
  10482. };
  10483. var isLowerCaseLetter = function isLowerCaseLetter(codePoint) {return codePoint >= a && codePoint <= z;};
  10484. var isUpperCaseLetter = function isUpperCaseLetter(codePoint) {return codePoint >= A && codePoint <= Z;};
  10485. var isLetter = function isLetter(codePoint) {return isLowerCaseLetter(codePoint) || isUpperCaseLetter(codePoint);};
  10486. var isNonASCIICodePoint = function isNonASCIICodePoint(codePoint) {return codePoint >= CONTROL;};
  10487. var isWhiteSpace = function isWhiteSpace(codePoint) {
  10488. return codePoint === LINE_FEED || codePoint === CHARACTER_TABULATION || codePoint === SPACE$1;
  10489. };
  10490. var isNameStartCodePoint = function isNameStartCodePoint(codePoint) {
  10491. return isLetter(codePoint) || isNonASCIICodePoint(codePoint) || codePoint === LOW_LINE;
  10492. };
  10493. var isNameCodePoint = function isNameCodePoint(codePoint) {
  10494. return isNameStartCodePoint(codePoint) || isDigit(codePoint) || codePoint === HYPHEN_MINUS;
  10495. };
  10496. var isNonPrintableCodePoint = function isNonPrintableCodePoint(codePoint) {
  10497. return codePoint >= NULL && codePoint <= BACKSPACE ||
  10498. codePoint === LINE_TABULATION ||
  10499. codePoint >= SHIFT_OUT && codePoint <= INFORMATION_SEPARATOR_ONE ||
  10500. codePoint === DELETE;
  10501. };
  10502. var isValidEscape = function isValidEscape(c1, c2) {
  10503. if (c1 !== REVERSE_SOLIDUS) {
  10504. return false;
  10505. }
  10506. return c2 !== LINE_FEED;
  10507. };
  10508. var isIdentifierStart = function isIdentifierStart(c1, c2, c3) {
  10509. if (c1 === HYPHEN_MINUS) {
  10510. return isNameStartCodePoint(c2) || isValidEscape(c2, c3);
  10511. } else
  10512. if (isNameStartCodePoint(c1)) {
  10513. return true;
  10514. } else
  10515. if (c1 === REVERSE_SOLIDUS && isValidEscape(c1, c2)) {
  10516. return true;
  10517. }
  10518. return false;
  10519. };
  10520. var isNumberStart = function isNumberStart(c1, c2, c3) {
  10521. if (c1 === PLUS_SIGN || c1 === HYPHEN_MINUS) {
  10522. if (isDigit(c2)) {
  10523. return true;
  10524. }
  10525. return c2 === FULL_STOP && isDigit(c3);
  10526. }
  10527. if (c1 === FULL_STOP) {
  10528. return isDigit(c2);
  10529. }
  10530. return isDigit(c1);
  10531. };
  10532. var stringToNumber = function stringToNumber(codePoints) {
  10533. var c = 0;
  10534. var sign = 1;
  10535. if (codePoints[c] === PLUS_SIGN || codePoints[c] === HYPHEN_MINUS) {
  10536. if (codePoints[c] === HYPHEN_MINUS) {
  10537. sign = -1;
  10538. }
  10539. c++;
  10540. }
  10541. var integers = [];
  10542. while (isDigit(codePoints[c])) {
  10543. integers.push(codePoints[c++]);
  10544. }
  10545. var _int = integers.length ? parseInt(fromCodePoint.apply(void 0, integers), 10) : 0;
  10546. if (codePoints[c] === FULL_STOP) {
  10547. c++;
  10548. }
  10549. var fraction = [];
  10550. while (isDigit(codePoints[c])) {
  10551. fraction.push(codePoints[c++]);
  10552. }
  10553. var fracd = fraction.length;
  10554. var frac = fracd ? parseInt(fromCodePoint.apply(void 0, fraction), 10) : 0;
  10555. if (codePoints[c] === E || codePoints[c] === e) {
  10556. c++;
  10557. }
  10558. var expsign = 1;
  10559. if (codePoints[c] === PLUS_SIGN || codePoints[c] === HYPHEN_MINUS) {
  10560. if (codePoints[c] === HYPHEN_MINUS) {
  10561. expsign = -1;
  10562. }
  10563. c++;
  10564. }
  10565. var exponent = [];
  10566. while (isDigit(codePoints[c])) {
  10567. exponent.push(codePoints[c++]);
  10568. }
  10569. var exp = exponent.length ? parseInt(fromCodePoint.apply(void 0, exponent), 10) : 0;
  10570. return sign * (_int + frac * Math.pow(10, -fracd)) * Math.pow(10, expsign * exp);
  10571. };
  10572. var LEFT_PARENTHESIS_TOKEN = {
  10573. type: TokenType.LEFT_PARENTHESIS_TOKEN };
  10574. var RIGHT_PARENTHESIS_TOKEN = {
  10575. type: TokenType.RIGHT_PARENTHESIS_TOKEN };
  10576. var COMMA_TOKEN = { type: TokenType.COMMA_TOKEN };
  10577. var SUFFIX_MATCH_TOKEN = { type: TokenType.SUFFIX_MATCH_TOKEN };
  10578. var PREFIX_MATCH_TOKEN = { type: TokenType.PREFIX_MATCH_TOKEN };
  10579. var COLUMN_TOKEN = { type: TokenType.COLUMN_TOKEN };
  10580. var DASH_MATCH_TOKEN = { type: TokenType.DASH_MATCH_TOKEN };
  10581. var INCLUDE_MATCH_TOKEN = { type: TokenType.INCLUDE_MATCH_TOKEN };
  10582. var LEFT_CURLY_BRACKET_TOKEN = {
  10583. type: TokenType.LEFT_CURLY_BRACKET_TOKEN };
  10584. var RIGHT_CURLY_BRACKET_TOKEN = {
  10585. type: TokenType.RIGHT_CURLY_BRACKET_TOKEN };
  10586. var SUBSTRING_MATCH_TOKEN = { type: TokenType.SUBSTRING_MATCH_TOKEN };
  10587. var BAD_URL_TOKEN = { type: TokenType.BAD_URL_TOKEN };
  10588. var BAD_STRING_TOKEN = { type: TokenType.BAD_STRING_TOKEN };
  10589. var CDO_TOKEN = { type: TokenType.CDO_TOKEN };
  10590. var CDC_TOKEN = { type: TokenType.CDC_TOKEN };
  10591. var COLON_TOKEN = { type: TokenType.COLON_TOKEN };
  10592. var SEMICOLON_TOKEN = { type: TokenType.SEMICOLON_TOKEN };
  10593. var LEFT_SQUARE_BRACKET_TOKEN = {
  10594. type: TokenType.LEFT_SQUARE_BRACKET_TOKEN };
  10595. var RIGHT_SQUARE_BRACKET_TOKEN = {
  10596. type: TokenType.RIGHT_SQUARE_BRACKET_TOKEN };
  10597. var WHITESPACE_TOKEN = { type: TokenType.WHITESPACE_TOKEN };
  10598. var EOF_TOKEN = { type: TokenType.EOF_TOKEN };
  10599. var Tokenizer = /** @class */function () {
  10600. function Tokenizer() {
  10601. this._value = [];
  10602. }
  10603. Tokenizer.prototype.write = function (chunk) {
  10604. this._value = this._value.concat(toCodePoints(chunk));
  10605. };
  10606. Tokenizer.prototype.read = function () {
  10607. var tokens = [];
  10608. var token = this.consumeToken();
  10609. while (token !== EOF_TOKEN) {
  10610. tokens.push(token);
  10611. token = this.consumeToken();
  10612. }
  10613. return tokens;
  10614. };
  10615. Tokenizer.prototype.consumeToken = function () {
  10616. var codePoint = this.consumeCodePoint();
  10617. switch (codePoint) {
  10618. case QUOTATION_MARK:
  10619. return this.consumeStringToken(QUOTATION_MARK);
  10620. case NUMBER_SIGN:
  10621. var c1 = this.peekCodePoint(0);
  10622. var c2 = this.peekCodePoint(1);
  10623. var c3 = this.peekCodePoint(2);
  10624. if (isNameCodePoint(c1) || isValidEscape(c2, c3)) {
  10625. var flags = isIdentifierStart(c1, c2, c3) ? FLAG_ID : FLAG_UNRESTRICTED;
  10626. var value = this.consumeName();
  10627. return { type: TokenType.HASH_TOKEN, value: value, flags: flags };
  10628. }
  10629. break;
  10630. case DOLLAR_SIGN:
  10631. if (this.peekCodePoint(0) === EQUALS_SIGN) {
  10632. this.consumeCodePoint();
  10633. return SUFFIX_MATCH_TOKEN;
  10634. }
  10635. break;
  10636. case APOSTROPHE:
  10637. return this.consumeStringToken(APOSTROPHE);
  10638. case LEFT_PARENTHESIS:
  10639. return LEFT_PARENTHESIS_TOKEN;
  10640. case RIGHT_PARENTHESIS:
  10641. return RIGHT_PARENTHESIS_TOKEN;
  10642. case ASTERISK:
  10643. if (this.peekCodePoint(0) === EQUALS_SIGN) {
  10644. this.consumeCodePoint();
  10645. return SUBSTRING_MATCH_TOKEN;
  10646. }
  10647. break;
  10648. case PLUS_SIGN:
  10649. if (isNumberStart(codePoint, this.peekCodePoint(0), this.peekCodePoint(1))) {
  10650. this.reconsumeCodePoint(codePoint);
  10651. return this.consumeNumericToken();
  10652. }
  10653. break;
  10654. case COMMA:
  10655. return COMMA_TOKEN;
  10656. case HYPHEN_MINUS:
  10657. var e1 = codePoint;
  10658. var e2 = this.peekCodePoint(0);
  10659. var e3 = this.peekCodePoint(1);
  10660. if (isNumberStart(e1, e2, e3)) {
  10661. this.reconsumeCodePoint(codePoint);
  10662. return this.consumeNumericToken();
  10663. }
  10664. if (isIdentifierStart(e1, e2, e3)) {
  10665. this.reconsumeCodePoint(codePoint);
  10666. return this.consumeIdentLikeToken();
  10667. }
  10668. if (e2 === HYPHEN_MINUS && e3 === GREATER_THAN_SIGN) {
  10669. this.consumeCodePoint();
  10670. this.consumeCodePoint();
  10671. return CDC_TOKEN;
  10672. }
  10673. break;
  10674. case FULL_STOP:
  10675. if (isNumberStart(codePoint, this.peekCodePoint(0), this.peekCodePoint(1))) {
  10676. this.reconsumeCodePoint(codePoint);
  10677. return this.consumeNumericToken();
  10678. }
  10679. break;
  10680. case SOLIDUS:
  10681. if (this.peekCodePoint(0) === ASTERISK) {
  10682. this.consumeCodePoint();
  10683. while (true) {
  10684. var c = this.consumeCodePoint();
  10685. if (c === ASTERISK) {
  10686. c = this.consumeCodePoint();
  10687. if (c === SOLIDUS) {
  10688. return this.consumeToken();
  10689. }
  10690. }
  10691. if (c === EOF) {
  10692. return this.consumeToken();
  10693. }
  10694. }
  10695. }
  10696. break;
  10697. case COLON:
  10698. return COLON_TOKEN;
  10699. case SEMICOLON:
  10700. return SEMICOLON_TOKEN;
  10701. case LESS_THAN_SIGN:
  10702. if (this.peekCodePoint(0) === EXCLAMATION_MARK &&
  10703. this.peekCodePoint(1) === HYPHEN_MINUS &&
  10704. this.peekCodePoint(2) === HYPHEN_MINUS) {
  10705. this.consumeCodePoint();
  10706. this.consumeCodePoint();
  10707. return CDO_TOKEN;
  10708. }
  10709. break;
  10710. case COMMERCIAL_AT:
  10711. var a1 = this.peekCodePoint(0);
  10712. var a2 = this.peekCodePoint(1);
  10713. var a3 = this.peekCodePoint(2);
  10714. if (isIdentifierStart(a1, a2, a3)) {
  10715. var value = this.consumeName();
  10716. return { type: TokenType.AT_KEYWORD_TOKEN, value: value };
  10717. }
  10718. break;
  10719. case LEFT_SQUARE_BRACKET:
  10720. return LEFT_SQUARE_BRACKET_TOKEN;
  10721. case REVERSE_SOLIDUS:
  10722. if (isValidEscape(codePoint, this.peekCodePoint(0))) {
  10723. this.reconsumeCodePoint(codePoint);
  10724. return this.consumeIdentLikeToken();
  10725. }
  10726. break;
  10727. case RIGHT_SQUARE_BRACKET:
  10728. return RIGHT_SQUARE_BRACKET_TOKEN;
  10729. case CIRCUMFLEX_ACCENT:
  10730. if (this.peekCodePoint(0) === EQUALS_SIGN) {
  10731. this.consumeCodePoint();
  10732. return PREFIX_MATCH_TOKEN;
  10733. }
  10734. break;
  10735. case LEFT_CURLY_BRACKET:
  10736. return LEFT_CURLY_BRACKET_TOKEN;
  10737. case RIGHT_CURLY_BRACKET:
  10738. return RIGHT_CURLY_BRACKET_TOKEN;
  10739. case u:
  10740. case U:
  10741. var u1 = this.peekCodePoint(0);
  10742. var u2 = this.peekCodePoint(1);
  10743. if (u1 === PLUS_SIGN && (isHex(u2) || u2 === QUESTION_MARK)) {
  10744. this.consumeCodePoint();
  10745. this.consumeUnicodeRangeToken();
  10746. }
  10747. this.reconsumeCodePoint(codePoint);
  10748. return this.consumeIdentLikeToken();
  10749. case VERTICAL_LINE:
  10750. if (this.peekCodePoint(0) === EQUALS_SIGN) {
  10751. this.consumeCodePoint();
  10752. return DASH_MATCH_TOKEN;
  10753. }
  10754. if (this.peekCodePoint(0) === VERTICAL_LINE) {
  10755. this.consumeCodePoint();
  10756. return COLUMN_TOKEN;
  10757. }
  10758. break;
  10759. case TILDE:
  10760. if (this.peekCodePoint(0) === EQUALS_SIGN) {
  10761. this.consumeCodePoint();
  10762. return INCLUDE_MATCH_TOKEN;
  10763. }
  10764. break;
  10765. case EOF:
  10766. return EOF_TOKEN;}
  10767. if (isWhiteSpace(codePoint)) {
  10768. this.consumeWhiteSpace();
  10769. return WHITESPACE_TOKEN;
  10770. }
  10771. if (isDigit(codePoint)) {
  10772. this.reconsumeCodePoint(codePoint);
  10773. return this.consumeNumericToken();
  10774. }
  10775. if (isNameStartCodePoint(codePoint)) {
  10776. this.reconsumeCodePoint(codePoint);
  10777. return this.consumeIdentLikeToken();
  10778. }
  10779. return { type: TokenType.DELIM_TOKEN, value: fromCodePoint(codePoint) };
  10780. };
  10781. Tokenizer.prototype.consumeCodePoint = function () {
  10782. var value = this._value.shift();
  10783. return typeof value === 'undefined' ? -1 : value;
  10784. };
  10785. Tokenizer.prototype.reconsumeCodePoint = function (codePoint) {
  10786. this._value.unshift(codePoint);
  10787. };
  10788. Tokenizer.prototype.peekCodePoint = function (delta) {
  10789. if (delta >= this._value.length) {
  10790. return -1;
  10791. }
  10792. return this._value[delta];
  10793. };
  10794. Tokenizer.prototype.consumeUnicodeRangeToken = function () {
  10795. var digits = [];
  10796. var codePoint = this.consumeCodePoint();
  10797. while (isHex(codePoint) && digits.length < 6) {
  10798. digits.push(codePoint);
  10799. codePoint = this.consumeCodePoint();
  10800. }
  10801. var questionMarks = false;
  10802. while (codePoint === QUESTION_MARK && digits.length < 6) {
  10803. digits.push(codePoint);
  10804. codePoint = this.consumeCodePoint();
  10805. questionMarks = true;
  10806. }
  10807. if (questionMarks) {
  10808. var start_1 = parseInt(fromCodePoint.apply(void 0, digits.map(function (digit) {return digit === QUESTION_MARK ? ZERO : digit;})), 16);
  10809. var end = parseInt(fromCodePoint.apply(void 0, digits.map(function (digit) {return digit === QUESTION_MARK ? F : digit;})), 16);
  10810. return { type: TokenType.UNICODE_RANGE_TOKEN, start: start_1, end: end };
  10811. }
  10812. var start = parseInt(fromCodePoint.apply(void 0, digits), 16);
  10813. if (this.peekCodePoint(0) === HYPHEN_MINUS && isHex(this.peekCodePoint(1))) {
  10814. this.consumeCodePoint();
  10815. codePoint = this.consumeCodePoint();
  10816. var endDigits = [];
  10817. while (isHex(codePoint) && endDigits.length < 6) {
  10818. endDigits.push(codePoint);
  10819. codePoint = this.consumeCodePoint();
  10820. }
  10821. var end = parseInt(fromCodePoint.apply(void 0, endDigits), 16);
  10822. return { type: TokenType.UNICODE_RANGE_TOKEN, start: start, end: end };
  10823. } else
  10824. {
  10825. return { type: TokenType.UNICODE_RANGE_TOKEN, start: start, end: start };
  10826. }
  10827. };
  10828. Tokenizer.prototype.consumeIdentLikeToken = function () {
  10829. var value = this.consumeName();
  10830. if (value.toLowerCase() === 'url' && this.peekCodePoint(0) === LEFT_PARENTHESIS) {
  10831. this.consumeCodePoint();
  10832. return this.consumeUrlToken();
  10833. } else
  10834. if (this.peekCodePoint(0) === LEFT_PARENTHESIS) {
  10835. this.consumeCodePoint();
  10836. return { type: TokenType.FUNCTION_TOKEN, value: value };
  10837. }
  10838. return { type: TokenType.IDENT_TOKEN, value: value };
  10839. };
  10840. Tokenizer.prototype.consumeUrlToken = function () {
  10841. var value = [];
  10842. this.consumeWhiteSpace();
  10843. if (this.peekCodePoint(0) === EOF) {
  10844. return { type: TokenType.URL_TOKEN, value: '' };
  10845. }
  10846. var next = this.peekCodePoint(0);
  10847. if (next === APOSTROPHE || next === QUOTATION_MARK) {
  10848. var stringToken = this.consumeStringToken(this.consumeCodePoint());
  10849. if (stringToken.type === TokenType.STRING_TOKEN) {
  10850. this.consumeWhiteSpace();
  10851. if (this.peekCodePoint(0) === EOF || this.peekCodePoint(0) === RIGHT_PARENTHESIS) {
  10852. this.consumeCodePoint();
  10853. return { type: TokenType.URL_TOKEN, value: stringToken.value };
  10854. }
  10855. }
  10856. this.consumeBadUrlRemnants();
  10857. return BAD_URL_TOKEN;
  10858. }
  10859. while (true) {
  10860. var codePoint = this.consumeCodePoint();
  10861. if (codePoint === EOF || codePoint === RIGHT_PARENTHESIS) {
  10862. return { type: TokenType.URL_TOKEN, value: fromCodePoint.apply(void 0, value) };
  10863. } else
  10864. if (isWhiteSpace(codePoint)) {
  10865. this.consumeWhiteSpace();
  10866. if (this.peekCodePoint(0) === EOF || this.peekCodePoint(0) === RIGHT_PARENTHESIS) {
  10867. this.consumeCodePoint();
  10868. return { type: TokenType.URL_TOKEN, value: fromCodePoint.apply(void 0, value) };
  10869. }
  10870. this.consumeBadUrlRemnants();
  10871. return BAD_URL_TOKEN;
  10872. } else
  10873. if (codePoint === QUOTATION_MARK ||
  10874. codePoint === APOSTROPHE ||
  10875. codePoint === LEFT_PARENTHESIS ||
  10876. isNonPrintableCodePoint(codePoint)) {
  10877. this.consumeBadUrlRemnants();
  10878. return BAD_URL_TOKEN;
  10879. } else
  10880. if (codePoint === REVERSE_SOLIDUS) {
  10881. if (isValidEscape(codePoint, this.peekCodePoint(0))) {
  10882. value.push(this.consumeEscapedCodePoint());
  10883. } else
  10884. {
  10885. this.consumeBadUrlRemnants();
  10886. return BAD_URL_TOKEN;
  10887. }
  10888. } else
  10889. {
  10890. value.push(codePoint);
  10891. }
  10892. }
  10893. };
  10894. Tokenizer.prototype.consumeWhiteSpace = function () {
  10895. while (isWhiteSpace(this.peekCodePoint(0))) {
  10896. this.consumeCodePoint();
  10897. }
  10898. };
  10899. Tokenizer.prototype.consumeBadUrlRemnants = function () {
  10900. while (true) {
  10901. var codePoint = this.consumeCodePoint();
  10902. if (codePoint === RIGHT_PARENTHESIS || codePoint === EOF) {
  10903. return;
  10904. }
  10905. if (isValidEscape(codePoint, this.peekCodePoint(0))) {
  10906. this.consumeEscapedCodePoint();
  10907. }
  10908. }
  10909. };
  10910. Tokenizer.prototype.consumeStringSlice = function (count) {
  10911. var SLICE_STACK_SIZE = 60000;
  10912. var value = '';
  10913. while (count > 0) {
  10914. var amount = Math.min(SLICE_STACK_SIZE, count);
  10915. value += fromCodePoint.apply(void 0, this._value.splice(0, amount));
  10916. count -= amount;
  10917. }
  10918. this._value.shift();
  10919. return value;
  10920. };
  10921. Tokenizer.prototype.consumeStringToken = function (endingCodePoint) {
  10922. var value = '';
  10923. var i = 0;
  10924. do {
  10925. var codePoint = this._value[i];
  10926. if (codePoint === EOF || codePoint === undefined || codePoint === endingCodePoint) {
  10927. value += this.consumeStringSlice(i);
  10928. return { type: TokenType.STRING_TOKEN, value: value };
  10929. }
  10930. if (codePoint === LINE_FEED) {
  10931. this._value.splice(0, i);
  10932. return BAD_STRING_TOKEN;
  10933. }
  10934. if (codePoint === REVERSE_SOLIDUS) {
  10935. var next = this._value[i + 1];
  10936. if (next !== EOF && next !== undefined) {
  10937. if (next === LINE_FEED) {
  10938. value += this.consumeStringSlice(i);
  10939. i = -1;
  10940. this._value.shift();
  10941. } else
  10942. if (isValidEscape(codePoint, next)) {
  10943. value += this.consumeStringSlice(i);
  10944. value += fromCodePoint(this.consumeEscapedCodePoint());
  10945. i = -1;
  10946. }
  10947. }
  10948. }
  10949. i++;
  10950. } while (true);
  10951. };
  10952. Tokenizer.prototype.consumeNumber = function () {
  10953. var repr = [];
  10954. var type = FLAG_INTEGER;
  10955. var c1 = this.peekCodePoint(0);
  10956. if (c1 === PLUS_SIGN || c1 === HYPHEN_MINUS) {
  10957. repr.push(this.consumeCodePoint());
  10958. }
  10959. while (isDigit(this.peekCodePoint(0))) {
  10960. repr.push(this.consumeCodePoint());
  10961. }
  10962. c1 = this.peekCodePoint(0);
  10963. var c2 = this.peekCodePoint(1);
  10964. if (c1 === FULL_STOP && isDigit(c2)) {
  10965. repr.push(this.consumeCodePoint(), this.consumeCodePoint());
  10966. type = FLAG_NUMBER;
  10967. while (isDigit(this.peekCodePoint(0))) {
  10968. repr.push(this.consumeCodePoint());
  10969. }
  10970. }
  10971. c1 = this.peekCodePoint(0);
  10972. c2 = this.peekCodePoint(1);
  10973. var c3 = this.peekCodePoint(2);
  10974. if ((c1 === E || c1 === e) && ((c2 === PLUS_SIGN || c2 === HYPHEN_MINUS) && isDigit(c3) || isDigit(c2))) {
  10975. repr.push(this.consumeCodePoint(), this.consumeCodePoint());
  10976. type = FLAG_NUMBER;
  10977. while (isDigit(this.peekCodePoint(0))) {
  10978. repr.push(this.consumeCodePoint());
  10979. }
  10980. }
  10981. return [stringToNumber(repr), type];
  10982. };
  10983. Tokenizer.prototype.consumeNumericToken = function () {
  10984. var _a = this.consumeNumber(),number = _a[0],flags = _a[1];
  10985. var c1 = this.peekCodePoint(0);
  10986. var c2 = this.peekCodePoint(1);
  10987. var c3 = this.peekCodePoint(2);
  10988. if (isIdentifierStart(c1, c2, c3)) {
  10989. var unit = this.consumeName();
  10990. return { type: TokenType.DIMENSION_TOKEN, number: number, flags: flags, unit: unit };
  10991. }
  10992. if (c1 === PERCENTAGE_SIGN) {
  10993. this.consumeCodePoint();
  10994. return { type: TokenType.PERCENTAGE_TOKEN, number: number, flags: flags };
  10995. }
  10996. return { type: TokenType.NUMBER_TOKEN, number: number, flags: flags };
  10997. };
  10998. Tokenizer.prototype.consumeEscapedCodePoint = function () {
  10999. var codePoint = this.consumeCodePoint();
  11000. if (isHex(codePoint)) {
  11001. var hex = fromCodePoint(codePoint);
  11002. while (isHex(this.peekCodePoint(0)) && hex.length < 6) {
  11003. hex += fromCodePoint(this.consumeCodePoint());
  11004. }
  11005. if (isWhiteSpace(this.peekCodePoint(0))) {
  11006. this.consumeCodePoint();
  11007. }
  11008. var hexCodePoint = parseInt(hex, 16);
  11009. if (hexCodePoint === 0 || isSurrogateCodePoint(hexCodePoint) || hexCodePoint > 0x10ffff) {
  11010. return REPLACEMENT_CHARACTER;
  11011. }
  11012. return hexCodePoint;
  11013. }
  11014. if (codePoint === EOF) {
  11015. return REPLACEMENT_CHARACTER;
  11016. }
  11017. return codePoint;
  11018. };
  11019. Tokenizer.prototype.consumeName = function () {
  11020. var result = '';
  11021. while (true) {
  11022. var codePoint = this.consumeCodePoint();
  11023. if (isNameCodePoint(codePoint)) {
  11024. result += fromCodePoint(codePoint);
  11025. } else
  11026. if (isValidEscape(codePoint, this.peekCodePoint(0))) {
  11027. result += fromCodePoint(this.consumeEscapedCodePoint());
  11028. } else
  11029. {
  11030. this.reconsumeCodePoint(codePoint);
  11031. return result;
  11032. }
  11033. }
  11034. };
  11035. return Tokenizer;
  11036. }();
  11037. var Parser = /** @class */function () {
  11038. function Parser(tokens) {
  11039. this._tokens = tokens;
  11040. }
  11041. Parser.create = function (value) {
  11042. var tokenizer = new Tokenizer();
  11043. tokenizer.write(value);
  11044. return new Parser(tokenizer.read());
  11045. };
  11046. Parser.parseValue = function (value) {
  11047. return Parser.create(value).parseComponentValue();
  11048. };
  11049. Parser.parseValues = function (value) {
  11050. return Parser.create(value).parseComponentValues();
  11051. };
  11052. Parser.prototype.parseComponentValue = function () {
  11053. var token = this.consumeToken();
  11054. while (token.type === TokenType.WHITESPACE_TOKEN) {
  11055. token = this.consumeToken();
  11056. }
  11057. if (token.type === TokenType.EOF_TOKEN) {
  11058. throw new SyntaxError("Error parsing CSS component value, unexpected EOF");
  11059. }
  11060. this.reconsumeToken(token);
  11061. var value = this.consumeComponentValue();
  11062. do {
  11063. token = this.consumeToken();
  11064. } while (token.type === TokenType.WHITESPACE_TOKEN);
  11065. if (token.type === TokenType.EOF_TOKEN) {
  11066. return value;
  11067. }
  11068. throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one");
  11069. };
  11070. Parser.prototype.parseComponentValues = function () {
  11071. var values = [];
  11072. while (true) {
  11073. var value = this.consumeComponentValue();
  11074. if (value.type === TokenType.EOF_TOKEN) {
  11075. return values;
  11076. }
  11077. values.push(value);
  11078. values.push();
  11079. }
  11080. };
  11081. Parser.prototype.consumeComponentValue = function () {
  11082. var token = this.consumeToken();
  11083. switch (token.type) {
  11084. case TokenType.LEFT_CURLY_BRACKET_TOKEN:
  11085. case TokenType.LEFT_SQUARE_BRACKET_TOKEN:
  11086. case TokenType.LEFT_PARENTHESIS_TOKEN:
  11087. return this.consumeSimpleBlock(token.type);
  11088. case TokenType.FUNCTION_TOKEN:
  11089. return this.consumeFunction(token);}
  11090. return token;
  11091. };
  11092. Parser.prototype.consumeSimpleBlock = function (type) {
  11093. var block = { type: type, values: [] };
  11094. var token = this.consumeToken();
  11095. while (true) {
  11096. if (token.type === TokenType.EOF_TOKEN || isEndingTokenFor(token, type)) {
  11097. return block;
  11098. }
  11099. this.reconsumeToken(token);
  11100. block.values.push(this.consumeComponentValue());
  11101. token = this.consumeToken();
  11102. }
  11103. };
  11104. Parser.prototype.consumeFunction = function (functionToken) {
  11105. var cssFunction = {
  11106. name: functionToken.value,
  11107. values: [],
  11108. type: TokenType.FUNCTION };
  11109. while (true) {
  11110. var token = this.consumeToken();
  11111. if (token.type === TokenType.EOF_TOKEN || token.type === TokenType.RIGHT_PARENTHESIS_TOKEN) {
  11112. return cssFunction;
  11113. }
  11114. this.reconsumeToken(token);
  11115. cssFunction.values.push(this.consumeComponentValue());
  11116. }
  11117. };
  11118. Parser.prototype.consumeToken = function () {
  11119. var token = this._tokens.shift();
  11120. return typeof token === 'undefined' ? EOF_TOKEN : token;
  11121. };
  11122. Parser.prototype.reconsumeToken = function (token) {
  11123. this._tokens.unshift(token);
  11124. };
  11125. return Parser;
  11126. }();
  11127. var isDimensionToken = function isDimensionToken(token) {return token.type === TokenType.DIMENSION_TOKEN;};
  11128. var isNumberToken = function isNumberToken(token) {return token.type === TokenType.NUMBER_TOKEN;};
  11129. var isIdentToken = function isIdentToken(token) {return token.type === TokenType.IDENT_TOKEN;};
  11130. var isStringToken = function isStringToken(token) {return token.type === TokenType.STRING_TOKEN;};
  11131. var isIdentWithValue = function isIdentWithValue(token, value) {
  11132. return isIdentToken(token) && token.value === value;
  11133. };
  11134. var nonWhiteSpace = function nonWhiteSpace(token) {return token.type !== TokenType.WHITESPACE_TOKEN;};
  11135. var nonFunctionArgSeparator = function nonFunctionArgSeparator(token) {
  11136. return token.type !== TokenType.WHITESPACE_TOKEN && token.type !== TokenType.COMMA_TOKEN;
  11137. };
  11138. var parseFunctionArgs = function parseFunctionArgs(tokens) {
  11139. var args = [];
  11140. var arg = [];
  11141. tokens.forEach(function (token) {
  11142. if (token.type === TokenType.COMMA_TOKEN) {
  11143. if (arg.length === 0) {
  11144. throw new Error("Error parsing function args, zero tokens for arg");
  11145. }
  11146. args.push(arg);
  11147. arg = [];
  11148. return;
  11149. }
  11150. if (token.type !== TokenType.WHITESPACE_TOKEN) {
  11151. arg.push(token);
  11152. }
  11153. });
  11154. if (arg.length) {
  11155. args.push(arg);
  11156. }
  11157. return args;
  11158. };
  11159. var isEndingTokenFor = function isEndingTokenFor(token, type) {
  11160. if (type === TokenType.LEFT_CURLY_BRACKET_TOKEN && token.type === TokenType.RIGHT_CURLY_BRACKET_TOKEN) {
  11161. return true;
  11162. }
  11163. if (type === TokenType.LEFT_SQUARE_BRACKET_TOKEN && token.type === TokenType.RIGHT_SQUARE_BRACKET_TOKEN) {
  11164. return true;
  11165. }
  11166. return type === TokenType.LEFT_PARENTHESIS_TOKEN && token.type === TokenType.RIGHT_PARENTHESIS_TOKEN;
  11167. };
  11168. var isLength = function isLength(token) {
  11169. return token.type === TokenType.NUMBER_TOKEN || token.type === TokenType.DIMENSION_TOKEN;
  11170. };
  11171. var isLengthPercentage = function isLengthPercentage(token) {
  11172. return token.type === TokenType.PERCENTAGE_TOKEN || isLength(token);
  11173. };
  11174. var parseLengthPercentageTuple = function parseLengthPercentageTuple(tokens) {
  11175. return tokens.length > 1 ? [tokens[0], tokens[1]] : [tokens[0]];
  11176. };
  11177. var ZERO_LENGTH = {
  11178. type: TokenType.NUMBER_TOKEN,
  11179. number: 0,
  11180. flags: FLAG_INTEGER };
  11181. var FIFTY_PERCENT = {
  11182. type: TokenType.PERCENTAGE_TOKEN,
  11183. number: 50,
  11184. flags: FLAG_INTEGER };
  11185. var HUNDRED_PERCENT = {
  11186. type: TokenType.PERCENTAGE_TOKEN,
  11187. number: 100,
  11188. flags: FLAG_INTEGER };
  11189. var getAbsoluteValueForTuple = function getAbsoluteValueForTuple(tuple, width, height) {
  11190. var x = tuple[0],y = tuple[1];
  11191. return [getAbsoluteValue(x, width), getAbsoluteValue(typeof y !== 'undefined' ? y : x, height)];
  11192. };
  11193. var getAbsoluteValue = function getAbsoluteValue(token, parent) {
  11194. if (token.type === TokenType.PERCENTAGE_TOKEN) {
  11195. return token.number / 100 * parent;
  11196. }
  11197. if (isDimensionToken(token)) {
  11198. switch (token.unit) {
  11199. case 'rem':
  11200. case 'em':
  11201. return 16 * token.number; // TODO use correct font-size
  11202. case 'px':
  11203. default:
  11204. return token.number;}
  11205. }
  11206. return token.number;
  11207. };
  11208. var DEG = 'deg';
  11209. var GRAD = 'grad';
  11210. var RAD = 'rad';
  11211. var TURN = 'turn';
  11212. var angle = {
  11213. name: 'angle',
  11214. parse: function parse(value) {
  11215. if (value.type === TokenType.DIMENSION_TOKEN) {
  11216. switch (value.unit) {
  11217. case DEG:
  11218. return Math.PI * value.number / 180;
  11219. case GRAD:
  11220. return Math.PI / 200 * value.number;
  11221. case RAD:
  11222. return value.number;
  11223. case TURN:
  11224. return Math.PI * 2 * value.number;}
  11225. }
  11226. throw new Error("Unsupported angle type");
  11227. } };
  11228. var isAngle = function isAngle(value) {
  11229. if (value.type === TokenType.DIMENSION_TOKEN) {
  11230. if (value.unit === DEG || value.unit === GRAD || value.unit === RAD || value.unit === TURN) {
  11231. return true;
  11232. }
  11233. }
  11234. return false;
  11235. };
  11236. var parseNamedSide = function parseNamedSide(tokens) {
  11237. var sideOrCorner = tokens.
  11238. filter(isIdentToken).
  11239. map(function (ident) {return ident.value;}).
  11240. join(' ');
  11241. switch (sideOrCorner) {
  11242. case 'to bottom right':
  11243. case 'to right bottom':
  11244. case 'left top':
  11245. case 'top left':
  11246. return [ZERO_LENGTH, ZERO_LENGTH];
  11247. case 'to top':
  11248. case 'bottom':
  11249. return deg(0);
  11250. case 'to bottom left':
  11251. case 'to left bottom':
  11252. case 'right top':
  11253. case 'top right':
  11254. return [ZERO_LENGTH, HUNDRED_PERCENT];
  11255. case 'to right':
  11256. case 'left':
  11257. return deg(90);
  11258. case 'to top left':
  11259. case 'to left top':
  11260. case 'right bottom':
  11261. case 'bottom right':
  11262. return [HUNDRED_PERCENT, HUNDRED_PERCENT];
  11263. case 'to bottom':
  11264. case 'top':
  11265. return deg(180);
  11266. case 'to top right':
  11267. case 'to right top':
  11268. case 'left bottom':
  11269. case 'bottom left':
  11270. return [HUNDRED_PERCENT, ZERO_LENGTH];
  11271. case 'to left':
  11272. case 'right':
  11273. return deg(270);}
  11274. return 0;
  11275. };
  11276. var deg = function deg(_deg) {return Math.PI * _deg / 180;};
  11277. var color = {
  11278. name: 'color',
  11279. parse: function parse(value) {
  11280. if (value.type === TokenType.FUNCTION) {
  11281. var colorFunction = SUPPORTED_COLOR_FUNCTIONS[value.name];
  11282. if (typeof colorFunction === 'undefined') {
  11283. throw new Error("Attempting to parse an unsupported color function \"" + value.name + "\"");
  11284. }
  11285. return colorFunction(value.values);
  11286. }
  11287. if (value.type === TokenType.HASH_TOKEN) {
  11288. if (value.value.length === 3) {
  11289. var r = value.value.substring(0, 1);
  11290. var g = value.value.substring(1, 2);
  11291. var b = value.value.substring(2, 3);
  11292. return pack(parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16), 1);
  11293. }
  11294. if (value.value.length === 4) {
  11295. var r = value.value.substring(0, 1);
  11296. var g = value.value.substring(1, 2);
  11297. var b = value.value.substring(2, 3);
  11298. var a = value.value.substring(3, 4);
  11299. return pack(parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16), parseInt(a + a, 16) / 255);
  11300. }
  11301. if (value.value.length === 6) {
  11302. var r = value.value.substring(0, 2);
  11303. var g = value.value.substring(2, 4);
  11304. var b = value.value.substring(4, 6);
  11305. return pack(parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), 1);
  11306. }
  11307. if (value.value.length === 8) {
  11308. var r = value.value.substring(0, 2);
  11309. var g = value.value.substring(2, 4);
  11310. var b = value.value.substring(4, 6);
  11311. var a = value.value.substring(6, 8);
  11312. return pack(parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), parseInt(a, 16) / 255);
  11313. }
  11314. }
  11315. if (value.type === TokenType.IDENT_TOKEN) {
  11316. var namedColor = COLORS[value.value.toUpperCase()];
  11317. if (typeof namedColor !== 'undefined') {
  11318. return namedColor;
  11319. }
  11320. }
  11321. return COLORS.TRANSPARENT;
  11322. } };
  11323. var isTransparent = function isTransparent(color) {return (0xff & color) === 0;};
  11324. var asString = function asString(color) {
  11325. var alpha = 0xff & color;
  11326. var blue = 0xff & color >> 8;
  11327. var green = 0xff & color >> 16;
  11328. var red = 0xff & color >> 24;
  11329. return alpha < 255 ? "rgba(" + red + "," + green + "," + blue + "," + alpha / 255 + ")" : "rgb(" + red + "," + green + "," + blue + ")";
  11330. };
  11331. var pack = function pack(r, g, b, a) {
  11332. return (r << 24 | g << 16 | b << 8 | Math.round(a * 255) << 0) >>> 0;
  11333. };
  11334. var getTokenColorValue = function getTokenColorValue(token, i) {
  11335. if (token.type === TokenType.NUMBER_TOKEN) {
  11336. return token.number;
  11337. }
  11338. if (token.type === TokenType.PERCENTAGE_TOKEN) {
  11339. var max = i === 3 ? 1 : 255;
  11340. return i === 3 ? token.number / 100 * max : Math.round(token.number / 100 * max);
  11341. }
  11342. return 0;
  11343. };
  11344. var rgb = function rgb(args) {
  11345. var tokens = args.filter(nonFunctionArgSeparator);
  11346. if (tokens.length === 3) {
  11347. var _a = tokens.map(getTokenColorValue),r = _a[0],g = _a[1],b = _a[2];
  11348. return pack(r, g, b, 1);
  11349. }
  11350. if (tokens.length === 4) {
  11351. var _b = tokens.map(getTokenColorValue),r = _b[0],g = _b[1],b = _b[2],a = _b[3];
  11352. return pack(r, g, b, a);
  11353. }
  11354. return 0;
  11355. };
  11356. function hue2rgb(t1, t2, hue) {
  11357. if (hue < 0) {
  11358. hue += 1;
  11359. }
  11360. if (hue >= 1) {
  11361. hue -= 1;
  11362. }
  11363. if (hue < 1 / 6) {
  11364. return (t2 - t1) * hue * 6 + t1;
  11365. } else
  11366. if (hue < 1 / 2) {
  11367. return t2;
  11368. } else
  11369. if (hue < 2 / 3) {
  11370. return (t2 - t1) * 6 * (2 / 3 - hue) + t1;
  11371. } else
  11372. {
  11373. return t1;
  11374. }
  11375. }
  11376. var hsl = function hsl(args) {
  11377. var tokens = args.filter(nonFunctionArgSeparator);
  11378. var hue = tokens[0],saturation = tokens[1],lightness = tokens[2],alpha = tokens[3];
  11379. var h = (hue.type === TokenType.NUMBER_TOKEN ? deg(hue.number) : angle.parse(hue)) / (Math.PI * 2);
  11380. var s = isLengthPercentage(saturation) ? saturation.number / 100 : 0;
  11381. var l = isLengthPercentage(lightness) ? lightness.number / 100 : 0;
  11382. var a = typeof alpha !== 'undefined' && isLengthPercentage(alpha) ? getAbsoluteValue(alpha, 1) : 1;
  11383. if (s === 0) {
  11384. return pack(l * 255, l * 255, l * 255, 1);
  11385. }
  11386. var t2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;
  11387. var t1 = l * 2 - t2;
  11388. var r = hue2rgb(t1, t2, h + 1 / 3);
  11389. var g = hue2rgb(t1, t2, h);
  11390. var b = hue2rgb(t1, t2, h - 1 / 3);
  11391. return pack(r * 255, g * 255, b * 255, a);
  11392. };
  11393. var SUPPORTED_COLOR_FUNCTIONS = {
  11394. hsl: hsl,
  11395. hsla: hsl,
  11396. rgb: rgb,
  11397. rgba: rgb };
  11398. var COLORS = {
  11399. ALICEBLUE: 0xf0f8ffff,
  11400. ANTIQUEWHITE: 0xfaebd7ff,
  11401. AQUA: 0x00ffffff,
  11402. AQUAMARINE: 0x7fffd4ff,
  11403. AZURE: 0xf0ffffff,
  11404. BEIGE: 0xf5f5dcff,
  11405. BISQUE: 0xffe4c4ff,
  11406. BLACK: 0x000000ff,
  11407. BLANCHEDALMOND: 0xffebcdff,
  11408. BLUE: 0x0000ffff,
  11409. BLUEVIOLET: 0x8a2be2ff,
  11410. BROWN: 0xa52a2aff,
  11411. BURLYWOOD: 0xdeb887ff,
  11412. CADETBLUE: 0x5f9ea0ff,
  11413. CHARTREUSE: 0x7fff00ff,
  11414. CHOCOLATE: 0xd2691eff,
  11415. CORAL: 0xff7f50ff,
  11416. CORNFLOWERBLUE: 0x6495edff,
  11417. CORNSILK: 0xfff8dcff,
  11418. CRIMSON: 0xdc143cff,
  11419. CYAN: 0x00ffffff,
  11420. DARKBLUE: 0x00008bff,
  11421. DARKCYAN: 0x008b8bff,
  11422. DARKGOLDENROD: 0xb886bbff,
  11423. DARKGRAY: 0xa9a9a9ff,
  11424. DARKGREEN: 0x006400ff,
  11425. DARKGREY: 0xa9a9a9ff,
  11426. DARKKHAKI: 0xbdb76bff,
  11427. DARKMAGENTA: 0x8b008bff,
  11428. DARKOLIVEGREEN: 0x556b2fff,
  11429. DARKORANGE: 0xff8c00ff,
  11430. DARKORCHID: 0x9932ccff,
  11431. DARKRED: 0x8b0000ff,
  11432. DARKSALMON: 0xe9967aff,
  11433. DARKSEAGREEN: 0x8fbc8fff,
  11434. DARKSLATEBLUE: 0x483d8bff,
  11435. DARKSLATEGRAY: 0x2f4f4fff,
  11436. DARKSLATEGREY: 0x2f4f4fff,
  11437. DARKTURQUOISE: 0x00ced1ff,
  11438. DARKVIOLET: 0x9400d3ff,
  11439. DEEPPINK: 0xff1493ff,
  11440. DEEPSKYBLUE: 0x00bfffff,
  11441. DIMGRAY: 0x696969ff,
  11442. DIMGREY: 0x696969ff,
  11443. DODGERBLUE: 0x1e90ffff,
  11444. FIREBRICK: 0xb22222ff,
  11445. FLORALWHITE: 0xfffaf0ff,
  11446. FORESTGREEN: 0x228b22ff,
  11447. FUCHSIA: 0xff00ffff,
  11448. GAINSBORO: 0xdcdcdcff,
  11449. GHOSTWHITE: 0xf8f8ffff,
  11450. GOLD: 0xffd700ff,
  11451. GOLDENROD: 0xdaa520ff,
  11452. GRAY: 0x808080ff,
  11453. GREEN: 0x008000ff,
  11454. GREENYELLOW: 0xadff2fff,
  11455. GREY: 0x808080ff,
  11456. HONEYDEW: 0xf0fff0ff,
  11457. HOTPINK: 0xff69b4ff,
  11458. INDIANRED: 0xcd5c5cff,
  11459. INDIGO: 0x4b0082ff,
  11460. IVORY: 0xfffff0ff,
  11461. KHAKI: 0xf0e68cff,
  11462. LAVENDER: 0xe6e6faff,
  11463. LAVENDERBLUSH: 0xfff0f5ff,
  11464. LAWNGREEN: 0x7cfc00ff,
  11465. LEMONCHIFFON: 0xfffacdff,
  11466. LIGHTBLUE: 0xadd8e6ff,
  11467. LIGHTCORAL: 0xf08080ff,
  11468. LIGHTCYAN: 0xe0ffffff,
  11469. LIGHTGOLDENRODYELLOW: 0xfafad2ff,
  11470. LIGHTGRAY: 0xd3d3d3ff,
  11471. LIGHTGREEN: 0x90ee90ff,
  11472. LIGHTGREY: 0xd3d3d3ff,
  11473. LIGHTPINK: 0xffb6c1ff,
  11474. LIGHTSALMON: 0xffa07aff,
  11475. LIGHTSEAGREEN: 0x20b2aaff,
  11476. LIGHTSKYBLUE: 0x87cefaff,
  11477. LIGHTSLATEGRAY: 0x778899ff,
  11478. LIGHTSLATEGREY: 0x778899ff,
  11479. LIGHTSTEELBLUE: 0xb0c4deff,
  11480. LIGHTYELLOW: 0xffffe0ff,
  11481. LIME: 0x00ff00ff,
  11482. LIMEGREEN: 0x32cd32ff,
  11483. LINEN: 0xfaf0e6ff,
  11484. MAGENTA: 0xff00ffff,
  11485. MAROON: 0x800000ff,
  11486. MEDIUMAQUAMARINE: 0x66cdaaff,
  11487. MEDIUMBLUE: 0x0000cdff,
  11488. MEDIUMORCHID: 0xba55d3ff,
  11489. MEDIUMPURPLE: 0x9370dbff,
  11490. MEDIUMSEAGREEN: 0x3cb371ff,
  11491. MEDIUMSLATEBLUE: 0x7b68eeff,
  11492. MEDIUMSPRINGGREEN: 0x00fa9aff,
  11493. MEDIUMTURQUOISE: 0x48d1ccff,
  11494. MEDIUMVIOLETRED: 0xc71585ff,
  11495. MIDNIGHTBLUE: 0x191970ff,
  11496. MINTCREAM: 0xf5fffaff,
  11497. MISTYROSE: 0xffe4e1ff,
  11498. MOCCASIN: 0xffe4b5ff,
  11499. NAVAJOWHITE: 0xffdeadff,
  11500. NAVY: 0x000080ff,
  11501. OLDLACE: 0xfdf5e6ff,
  11502. OLIVE: 0x808000ff,
  11503. OLIVEDRAB: 0x6b8e23ff,
  11504. ORANGE: 0xffa500ff,
  11505. ORANGERED: 0xff4500ff,
  11506. ORCHID: 0xda70d6ff,
  11507. PALEGOLDENROD: 0xeee8aaff,
  11508. PALEGREEN: 0x98fb98ff,
  11509. PALETURQUOISE: 0xafeeeeff,
  11510. PALEVIOLETRED: 0xdb7093ff,
  11511. PAPAYAWHIP: 0xffefd5ff,
  11512. PEACHPUFF: 0xffdab9ff,
  11513. PERU: 0xcd853fff,
  11514. PINK: 0xffc0cbff,
  11515. PLUM: 0xdda0ddff,
  11516. POWDERBLUE: 0xb0e0e6ff,
  11517. PURPLE: 0x800080ff,
  11518. REBECCAPURPLE: 0x663399ff,
  11519. RED: 0xff0000ff,
  11520. ROSYBROWN: 0xbc8f8fff,
  11521. ROYALBLUE: 0x4169e1ff,
  11522. SADDLEBROWN: 0x8b4513ff,
  11523. SALMON: 0xfa8072ff,
  11524. SANDYBROWN: 0xf4a460ff,
  11525. SEAGREEN: 0x2e8b57ff,
  11526. SEASHELL: 0xfff5eeff,
  11527. SIENNA: 0xa0522dff,
  11528. SILVER: 0xc0c0c0ff,
  11529. SKYBLUE: 0x87ceebff,
  11530. SLATEBLUE: 0x6a5acdff,
  11531. SLATEGRAY: 0x708090ff,
  11532. SLATEGREY: 0x708090ff,
  11533. SNOW: 0xfffafaff,
  11534. SPRINGGREEN: 0x00ff7fff,
  11535. STEELBLUE: 0x4682b4ff,
  11536. TAN: 0xd2b48cff,
  11537. TEAL: 0x008080ff,
  11538. THISTLE: 0xd8bfd8ff,
  11539. TOMATO: 0xff6347ff,
  11540. TRANSPARENT: 0x00000000,
  11541. TURQUOISE: 0x40e0d0ff,
  11542. VIOLET: 0xee82eeff,
  11543. WHEAT: 0xf5deb3ff,
  11544. WHITE: 0xffffffff,
  11545. WHITESMOKE: 0xf5f5f5ff,
  11546. YELLOW: 0xffff00ff,
  11547. YELLOWGREEN: 0x9acd32ff };
  11548. var PropertyDescriptorParsingType;
  11549. (function (PropertyDescriptorParsingType) {
  11550. PropertyDescriptorParsingType[PropertyDescriptorParsingType["VALUE"] = 0] = "VALUE";
  11551. PropertyDescriptorParsingType[PropertyDescriptorParsingType["LIST"] = 1] = "LIST";
  11552. PropertyDescriptorParsingType[PropertyDescriptorParsingType["IDENT_VALUE"] = 2] = "IDENT_VALUE";
  11553. PropertyDescriptorParsingType[PropertyDescriptorParsingType["TYPE_VALUE"] = 3] = "TYPE_VALUE";
  11554. PropertyDescriptorParsingType[PropertyDescriptorParsingType["TOKEN_VALUE"] = 4] = "TOKEN_VALUE";
  11555. })(PropertyDescriptorParsingType || (PropertyDescriptorParsingType = {}));
  11556. var BACKGROUND_CLIP;
  11557. (function (BACKGROUND_CLIP) {
  11558. BACKGROUND_CLIP[BACKGROUND_CLIP["BORDER_BOX"] = 0] = "BORDER_BOX";
  11559. BACKGROUND_CLIP[BACKGROUND_CLIP["PADDING_BOX"] = 1] = "PADDING_BOX";
  11560. BACKGROUND_CLIP[BACKGROUND_CLIP["CONTENT_BOX"] = 2] = "CONTENT_BOX";
  11561. })(BACKGROUND_CLIP || (BACKGROUND_CLIP = {}));
  11562. var backgroundClip = {
  11563. name: 'background-clip',
  11564. initialValue: 'border-box',
  11565. prefix: false,
  11566. type: PropertyDescriptorParsingType.LIST,
  11567. parse: function parse(tokens) {
  11568. return tokens.map(function (token) {
  11569. if (isIdentToken(token)) {
  11570. switch (token.value) {
  11571. case 'padding-box':
  11572. return BACKGROUND_CLIP.PADDING_BOX;
  11573. case 'content-box':
  11574. return BACKGROUND_CLIP.CONTENT_BOX;}
  11575. }
  11576. return BACKGROUND_CLIP.BORDER_BOX;
  11577. });
  11578. } };
  11579. var backgroundColor = {
  11580. name: "background-color",
  11581. initialValue: 'transparent',
  11582. prefix: false,
  11583. type: PropertyDescriptorParsingType.TYPE_VALUE,
  11584. format: 'color' };
  11585. var parseColorStop = function parseColorStop(args) {
  11586. var color$1 = color.parse(args[0]);
  11587. var stop = args[1];
  11588. return stop && isLengthPercentage(stop) ? { color: color$1, stop: stop } : { color: color$1, stop: null };
  11589. };
  11590. var processColorStops = function processColorStops(stops, lineLength) {
  11591. var first = stops[0];
  11592. var last = stops[stops.length - 1];
  11593. if (first.stop === null) {
  11594. first.stop = ZERO_LENGTH;
  11595. }
  11596. if (last.stop === null) {
  11597. last.stop = HUNDRED_PERCENT;
  11598. }
  11599. var processStops = [];
  11600. var previous = 0;
  11601. for (var i = 0; i < stops.length; i++) {
  11602. var stop_1 = stops[i].stop;
  11603. if (stop_1 !== null) {
  11604. var absoluteValue = getAbsoluteValue(stop_1, lineLength);
  11605. if (absoluteValue > previous) {
  11606. processStops.push(absoluteValue);
  11607. } else
  11608. {
  11609. processStops.push(previous);
  11610. }
  11611. previous = absoluteValue;
  11612. } else
  11613. {
  11614. processStops.push(null);
  11615. }
  11616. }
  11617. var gapBegin = null;
  11618. for (var i = 0; i < processStops.length; i++) {
  11619. var stop_2 = processStops[i];
  11620. if (stop_2 === null) {
  11621. if (gapBegin === null) {
  11622. gapBegin = i;
  11623. }
  11624. } else
  11625. if (gapBegin !== null) {
  11626. var gapLength = i - gapBegin;
  11627. var beforeGap = processStops[gapBegin - 1];
  11628. var gapValue = (stop_2 - beforeGap) / (gapLength + 1);
  11629. for (var g = 1; g <= gapLength; g++) {
  11630. processStops[gapBegin + g - 1] = gapValue * g;
  11631. }
  11632. gapBegin = null;
  11633. }
  11634. }
  11635. return stops.map(function (_a, i) {
  11636. var color = _a.color;
  11637. return { color: color, stop: Math.max(Math.min(1, processStops[i] / lineLength), 0) };
  11638. });
  11639. };
  11640. var getAngleFromCorner = function getAngleFromCorner(corner, width, height) {
  11641. var centerX = width / 2;
  11642. var centerY = height / 2;
  11643. var x = getAbsoluteValue(corner[0], width) - centerX;
  11644. var y = centerY - getAbsoluteValue(corner[1], height);
  11645. return (Math.atan2(y, x) + Math.PI * 2) % (Math.PI * 2);
  11646. };
  11647. var calculateGradientDirection = function calculateGradientDirection(angle, width, height) {
  11648. var radian = typeof angle === 'number' ? angle : getAngleFromCorner(angle, width, height);
  11649. var lineLength = Math.abs(width * Math.sin(radian)) + Math.abs(height * Math.cos(radian));
  11650. var halfWidth = width / 2;
  11651. var halfHeight = height / 2;
  11652. var halfLineLength = lineLength / 2;
  11653. var yDiff = Math.sin(radian - Math.PI / 2) * halfLineLength;
  11654. var xDiff = Math.cos(radian - Math.PI / 2) * halfLineLength;
  11655. return [lineLength, halfWidth - xDiff, halfWidth + xDiff, halfHeight - yDiff, halfHeight + yDiff];
  11656. };
  11657. var distance = function distance(a, b) {return Math.sqrt(a * a + b * b);};
  11658. var findCorner = function findCorner(width, height, x, y, closest) {
  11659. var corners = [[0, 0], [0, height], [width, 0], [width, height]];
  11660. return corners.reduce(function (stat, corner) {
  11661. var cx = corner[0],cy = corner[1];
  11662. var d = distance(x - cx, y - cy);
  11663. if (closest ? d < stat.optimumDistance : d > stat.optimumDistance) {
  11664. return {
  11665. optimumCorner: corner,
  11666. optimumDistance: d };
  11667. }
  11668. return stat;
  11669. }, {
  11670. optimumDistance: closest ? Infinity : -Infinity,
  11671. optimumCorner: null }).
  11672. optimumCorner;
  11673. };
  11674. var calculateRadius = function calculateRadius(gradient, x, y, width, height) {
  11675. var rx = 0;
  11676. var ry = 0;
  11677. switch (gradient.size) {
  11678. case CSSRadialExtent.CLOSEST_SIDE:
  11679. // The ending shape is sized so that that it exactly meets the side of the gradient box closest to the gradient’s center.
  11680. // If the shape is an ellipse, it exactly meets the closest side in each dimension.
  11681. if (gradient.shape === CSSRadialShape.CIRCLE) {
  11682. rx = ry = Math.min(Math.abs(x), Math.abs(x - width), Math.abs(y), Math.abs(y - height));
  11683. } else
  11684. if (gradient.shape === CSSRadialShape.ELLIPSE) {
  11685. rx = Math.min(Math.abs(x), Math.abs(x - width));
  11686. ry = Math.min(Math.abs(y), Math.abs(y - height));
  11687. }
  11688. break;
  11689. case CSSRadialExtent.CLOSEST_CORNER:
  11690. // The ending shape is sized so that that it passes through the corner of the gradient box closest to the gradient’s center.
  11691. // If the shape is an ellipse, the ending shape is given the same aspect-ratio it would have if closest-side were specified.
  11692. if (gradient.shape === CSSRadialShape.CIRCLE) {
  11693. rx = ry = Math.min(distance(x, y), distance(x, y - height), distance(x - width, y), distance(x - width, y - height));
  11694. } else
  11695. if (gradient.shape === CSSRadialShape.ELLIPSE) {
  11696. // Compute the ratio ry/rx (which is to be the same as for "closest-side")
  11697. var c = Math.min(Math.abs(y), Math.abs(y - height)) / Math.min(Math.abs(x), Math.abs(x - width));
  11698. var _a = findCorner(width, height, x, y, true),cx = _a[0],cy = _a[1];
  11699. rx = distance(cx - x, (cy - y) / c);
  11700. ry = c * rx;
  11701. }
  11702. break;
  11703. case CSSRadialExtent.FARTHEST_SIDE:
  11704. // Same as closest-side, except the ending shape is sized based on the farthest side(s)
  11705. if (gradient.shape === CSSRadialShape.CIRCLE) {
  11706. rx = ry = Math.max(Math.abs(x), Math.abs(x - width), Math.abs(y), Math.abs(y - height));
  11707. } else
  11708. if (gradient.shape === CSSRadialShape.ELLIPSE) {
  11709. rx = Math.max(Math.abs(x), Math.abs(x - width));
  11710. ry = Math.max(Math.abs(y), Math.abs(y - height));
  11711. }
  11712. break;
  11713. case CSSRadialExtent.FARTHEST_CORNER:
  11714. // Same as closest-corner, except the ending shape is sized based on the farthest corner.
  11715. // If the shape is an ellipse, the ending shape is given the same aspect ratio it would have if farthest-side were specified.
  11716. if (gradient.shape === CSSRadialShape.CIRCLE) {
  11717. rx = ry = Math.max(distance(x, y), distance(x, y - height), distance(x - width, y), distance(x - width, y - height));
  11718. } else
  11719. if (gradient.shape === CSSRadialShape.ELLIPSE) {
  11720. // Compute the ratio ry/rx (which is to be the same as for "farthest-side")
  11721. var c = Math.max(Math.abs(y), Math.abs(y - height)) / Math.max(Math.abs(x), Math.abs(x - width));
  11722. var _b = findCorner(width, height, x, y, false),cx = _b[0],cy = _b[1];
  11723. rx = distance(cx - x, (cy - y) / c);
  11724. ry = c * rx;
  11725. }
  11726. break;}
  11727. if (Array.isArray(gradient.size)) {
  11728. rx = getAbsoluteValue(gradient.size[0], width);
  11729. ry = gradient.size.length === 2 ? getAbsoluteValue(gradient.size[1], height) : rx;
  11730. }
  11731. return [rx, ry];
  11732. };
  11733. var linearGradient = function linearGradient(tokens) {
  11734. var angle$1 = deg(180);
  11735. var stops = [];
  11736. parseFunctionArgs(tokens).forEach(function (arg, i) {
  11737. if (i === 0) {
  11738. var firstToken = arg[0];
  11739. if (firstToken.type === TokenType.IDENT_TOKEN && firstToken.value === 'to') {
  11740. angle$1 = parseNamedSide(arg);
  11741. return;
  11742. } else
  11743. if (isAngle(firstToken)) {
  11744. angle$1 = angle.parse(firstToken);
  11745. return;
  11746. }
  11747. }
  11748. var colorStop = parseColorStop(arg);
  11749. stops.push(colorStop);
  11750. });
  11751. return { angle: angle$1, stops: stops, type: CSSImageType.LINEAR_GRADIENT };
  11752. };
  11753. var prefixLinearGradient = function prefixLinearGradient(tokens) {
  11754. var angle$1 = deg(180);
  11755. var stops = [];
  11756. parseFunctionArgs(tokens).forEach(function (arg, i) {
  11757. if (i === 0) {
  11758. var firstToken = arg[0];
  11759. if (firstToken.type === TokenType.IDENT_TOKEN &&
  11760. ['top', 'left', 'right', 'bottom'].indexOf(firstToken.value) !== -1) {
  11761. angle$1 = parseNamedSide(arg);
  11762. return;
  11763. } else
  11764. if (isAngle(firstToken)) {
  11765. angle$1 = (angle.parse(firstToken) + deg(270)) % deg(360);
  11766. return;
  11767. }
  11768. }
  11769. var colorStop = parseColorStop(arg);
  11770. stops.push(colorStop);
  11771. });
  11772. return {
  11773. angle: angle$1,
  11774. stops: stops,
  11775. type: CSSImageType.LINEAR_GRADIENT };
  11776. };
  11777. var testRangeBounds = function testRangeBounds(document) {
  11778. var TEST_HEIGHT = 123;
  11779. if (document.createRange) {
  11780. var range = document.createRange();
  11781. if (range.getBoundingClientRect) {
  11782. var testElement = document.createElement('boundtest');
  11783. testElement.style.height = TEST_HEIGHT + "px";
  11784. testElement.style.display = 'block';
  11785. document.body.appendChild(testElement);
  11786. range.selectNode(testElement);
  11787. var rangeBounds = range.getBoundingClientRect();
  11788. var rangeHeight = Math.round(rangeBounds.height);
  11789. document.body.removeChild(testElement);
  11790. if (rangeHeight === TEST_HEIGHT) {
  11791. return true;
  11792. }
  11793. }
  11794. }
  11795. return false;
  11796. };
  11797. var testCORS = function testCORS() {return typeof new Image().crossOrigin !== 'undefined';};
  11798. var testResponseType = function testResponseType() {return typeof new XMLHttpRequest().responseType === 'string';};
  11799. var testSVG = function testSVG(document) {
  11800. var img = new Image();
  11801. var canvas = document.createElement('canvas');
  11802. var ctx = canvas.getContext('2d');
  11803. if (!ctx) {
  11804. return false;
  11805. }
  11806. img.src = "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";
  11807. try {
  11808. ctx.drawImage(img, 0, 0);
  11809. canvas.toDataURL();
  11810. }
  11811. catch (e) {
  11812. return false;
  11813. }
  11814. return true;
  11815. };
  11816. var isGreenPixel = function isGreenPixel(data) {
  11817. return data[0] === 0 && data[1] === 255 && data[2] === 0 && data[3] === 255;
  11818. };
  11819. var testForeignObject = function testForeignObject(document) {
  11820. var canvas = document.createElement('canvas');
  11821. var size = 100;
  11822. canvas.width = size;
  11823. canvas.height = size;
  11824. var ctx = canvas.getContext('2d');
  11825. if (!ctx) {
  11826. return Promise.reject(false);
  11827. }
  11828. ctx.fillStyle = 'rgb(0, 255, 0)';
  11829. ctx.fillRect(0, 0, size, size);
  11830. var img = new Image();
  11831. var greenImageSrc = canvas.toDataURL();
  11832. img.src = greenImageSrc;
  11833. var svg = createForeignObjectSVG(size, size, 0, 0, img);
  11834. ctx.fillStyle = 'red';
  11835. ctx.fillRect(0, 0, size, size);
  11836. return loadSerializedSVG(svg).
  11837. then(function (img) {
  11838. ctx.drawImage(img, 0, 0);
  11839. var data = ctx.getImageData(0, 0, size, size).data;
  11840. ctx.fillStyle = 'red';
  11841. ctx.fillRect(0, 0, size, size);
  11842. var node = document.createElement('div');
  11843. node.style.backgroundImage = "url(" + greenImageSrc + ")";
  11844. node.style.height = size + "px";
  11845. // Firefox 55 does not render inline <img /> tags
  11846. return isGreenPixel(data) ?
  11847. loadSerializedSVG(createForeignObjectSVG(size, size, 0, 0, node)) :
  11848. Promise.reject(false);
  11849. }).
  11850. then(function (img) {
  11851. ctx.drawImage(img, 0, 0);
  11852. // Edge does not render background-images
  11853. return isGreenPixel(ctx.getImageData(0, 0, size, size).data);
  11854. }).
  11855. catch(function () {return false;});
  11856. };
  11857. var createForeignObjectSVG = function createForeignObjectSVG(width, height, x, y, node) {
  11858. var xmlns = 'http://www.w3.org/2000/svg';
  11859. var svg = document.createElementNS(xmlns, 'svg');
  11860. var foreignObject = document.createElementNS(xmlns, 'foreignObject');
  11861. svg.setAttributeNS(null, 'width', width.toString());
  11862. svg.setAttributeNS(null, 'height', height.toString());
  11863. foreignObject.setAttributeNS(null, 'width', '100%');
  11864. foreignObject.setAttributeNS(null, 'height', '100%');
  11865. foreignObject.setAttributeNS(null, 'x', x.toString());
  11866. foreignObject.setAttributeNS(null, 'y', y.toString());
  11867. foreignObject.setAttributeNS(null, 'externalResourcesRequired', 'true');
  11868. svg.appendChild(foreignObject);
  11869. foreignObject.appendChild(node);
  11870. return svg;
  11871. };
  11872. var loadSerializedSVG = function loadSerializedSVG(svg) {
  11873. return new Promise(function (resolve, reject) {
  11874. var img = new Image();
  11875. img.onload = function () {return resolve(img);};
  11876. img.onerror = reject;
  11877. img.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(svg));
  11878. });
  11879. };
  11880. var FEATURES = {
  11881. get SUPPORT_RANGE_BOUNDS() {
  11882. var value = testRangeBounds(document);
  11883. Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });
  11884. return value;
  11885. },
  11886. get SUPPORT_SVG_DRAWING() {
  11887. var value = testSVG(document);
  11888. Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });
  11889. return value;
  11890. },
  11891. get SUPPORT_FOREIGNOBJECT_DRAWING() {
  11892. var value = typeof Array.from === 'function' && typeof window.fetch === 'function' ?
  11893. testForeignObject(document) :
  11894. Promise.resolve(false);
  11895. Object.defineProperty(FEATURES, 'SUPPORT_FOREIGNOBJECT_DRAWING', { value: value });
  11896. return value;
  11897. },
  11898. get SUPPORT_CORS_IMAGES() {
  11899. var value = testCORS();
  11900. Object.defineProperty(FEATURES, 'SUPPORT_CORS_IMAGES', { value: value });
  11901. return value;
  11902. },
  11903. get SUPPORT_RESPONSE_TYPE() {
  11904. var value = testResponseType();
  11905. Object.defineProperty(FEATURES, 'SUPPORT_RESPONSE_TYPE', { value: value });
  11906. return value;
  11907. },
  11908. get SUPPORT_CORS_XHR() {
  11909. var value = ('withCredentials' in new XMLHttpRequest());
  11910. Object.defineProperty(FEATURES, 'SUPPORT_CORS_XHR', { value: value });
  11911. return value;
  11912. } };
  11913. var Logger = /** @class */function () {
  11914. function Logger(_a) {
  11915. var id = _a.id,enabled = _a.enabled;
  11916. this.id = id;
  11917. this.enabled = enabled;
  11918. this.start = Date.now();
  11919. }
  11920. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  11921. Logger.prototype.debug = function () {
  11922. var args = [];
  11923. for (var _i = 0; _i < arguments.length; _i++) {
  11924. args[_i] = arguments[_i];
  11925. }
  11926. if (this.enabled) {
  11927. // eslint-disable-next-line no-console
  11928. if (typeof window !== 'undefined' && window.console && typeof console.debug === 'function') {
  11929. // eslint-disable-next-line no-console
  11930. console.debug.apply(console, [this.id, this.getTime() + "ms"].concat(args));
  11931. } else
  11932. {
  11933. this.info.apply(this, args);
  11934. }
  11935. }
  11936. };
  11937. Logger.prototype.getTime = function () {
  11938. return Date.now() - this.start;
  11939. };
  11940. Logger.create = function (options) {
  11941. Logger.instances[options.id] = new Logger(options);
  11942. };
  11943. Logger.destroy = function (id) {
  11944. delete Logger.instances[id];
  11945. };
  11946. Logger.getInstance = function (id) {
  11947. var instance = Logger.instances[id];
  11948. if (typeof instance === 'undefined') {
  11949. throw new Error("No logger instance found with id " + id);
  11950. }
  11951. return instance;
  11952. };
  11953. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  11954. Logger.prototype.info = function () {
  11955. var args = [];
  11956. for (var _i = 0; _i < arguments.length; _i++) {
  11957. args[_i] = arguments[_i];
  11958. }
  11959. if (this.enabled) {
  11960. // eslint-disable-next-line no-console
  11961. if (typeof window !== 'undefined' && window.console && typeof console.info === 'function') {
  11962. // eslint-disable-next-line no-console
  11963. console.info.apply(console, [this.id, this.getTime() + "ms"].concat(args));
  11964. }
  11965. }
  11966. };
  11967. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  11968. Logger.prototype.error = function () {
  11969. var args = [];
  11970. for (var _i = 0; _i < arguments.length; _i++) {
  11971. args[_i] = arguments[_i];
  11972. }
  11973. if (this.enabled) {
  11974. // eslint-disable-next-line no-console
  11975. if (typeof window !== 'undefined' && window.console && typeof console.error === 'function') {
  11976. // eslint-disable-next-line no-console
  11977. console.error.apply(console, [this.id, this.getTime() + "ms"].concat(args));
  11978. } else
  11979. {
  11980. this.info.apply(this, args);
  11981. }
  11982. }
  11983. };
  11984. Logger.instances = {};
  11985. return Logger;
  11986. }();
  11987. var CacheStorage = /** @class */function () {
  11988. function CacheStorage() {
  11989. }
  11990. CacheStorage.create = function (name, options) {
  11991. return CacheStorage._caches[name] = new Cache(name, options);
  11992. };
  11993. CacheStorage.destroy = function (name) {
  11994. delete CacheStorage._caches[name];
  11995. };
  11996. CacheStorage.open = function (name) {
  11997. var cache = CacheStorage._caches[name];
  11998. if (typeof cache !== 'undefined') {
  11999. return cache;
  12000. }
  12001. throw new Error("Cache with key \"" + name + "\" not found");
  12002. };
  12003. CacheStorage.getOrigin = function (url) {
  12004. var link = CacheStorage._link;
  12005. if (!link) {
  12006. return 'about:blank';
  12007. }
  12008. link.href = url;
  12009. link.href = link.href; // IE9, LOL! - http://jsfiddle.net/niklasvh/2e48b/
  12010. return link.protocol + link.hostname + link.port;
  12011. };
  12012. CacheStorage.isSameOrigin = function (src) {
  12013. return CacheStorage.getOrigin(src) === CacheStorage._origin;
  12014. };
  12015. CacheStorage.setContext = function (window) {
  12016. CacheStorage._link = window.document.createElement('a');
  12017. CacheStorage._origin = CacheStorage.getOrigin(window.location.href);
  12018. };
  12019. CacheStorage.getInstance = function () {
  12020. var current = CacheStorage._current;
  12021. if (current === null) {
  12022. throw new Error("No cache instance attached");
  12023. }
  12024. return current;
  12025. };
  12026. CacheStorage.attachInstance = function (cache) {
  12027. CacheStorage._current = cache;
  12028. };
  12029. CacheStorage.detachInstance = function () {
  12030. CacheStorage._current = null;
  12031. };
  12032. CacheStorage._caches = {};
  12033. CacheStorage._origin = 'about:blank';
  12034. CacheStorage._current = null;
  12035. return CacheStorage;
  12036. }();
  12037. var Cache = /** @class */function () {
  12038. function Cache(id, options) {
  12039. this.id = id;
  12040. this._options = options;
  12041. this._cache = {};
  12042. }
  12043. Cache.prototype.addImage = function (src) {
  12044. var result = Promise.resolve();
  12045. if (this.has(src)) {
  12046. return result;
  12047. }
  12048. if (isBlobImage(src) || isRenderable(src)) {
  12049. this._cache[src] = this.loadImage(src);
  12050. return result;
  12051. }
  12052. return result;
  12053. };
  12054. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  12055. Cache.prototype.match = function (src) {
  12056. return this._cache[src];
  12057. };
  12058. Cache.prototype.loadImage = function (key) {
  12059. return __awaiter(this, void 0, void 0, function () {
  12060. var isSameOrigin, useCORS, useProxy, src;
  12061. var _this = this;
  12062. return __generator(this, function (_a) {
  12063. switch (_a.label) {
  12064. case 0:
  12065. isSameOrigin = CacheStorage.isSameOrigin(key);
  12066. useCORS = !isInlineImage(key) && this._options.useCORS === true && FEATURES.SUPPORT_CORS_IMAGES && !isSameOrigin;
  12067. useProxy = !isInlineImage(key) &&
  12068. !isSameOrigin &&
  12069. typeof this._options.proxy === 'string' &&
  12070. FEATURES.SUPPORT_CORS_XHR &&
  12071. !useCORS;
  12072. if (!isSameOrigin && this._options.allowTaint === false && !isInlineImage(key) && !useProxy && !useCORS) {
  12073. return [2 /*return*/];
  12074. }
  12075. src = key;
  12076. if (!useProxy) return [3 /*break*/, 2];
  12077. return [4 /*yield*/, this.proxy(src)];
  12078. case 1:
  12079. src = _a.sent();
  12080. _a.label = 2;
  12081. case 2:
  12082. Logger.getInstance(this.id).debug("Added image " + key.substring(0, 256));
  12083. return [4 /*yield*/, new Promise(function (resolve, reject) {
  12084. var img = new Image();
  12085. img.onload = function () {return resolve(img);};
  12086. img.onerror = reject;
  12087. //ios safari 10.3 taints canvas with data urls unless crossOrigin is set to anonymous
  12088. if (isInlineBase64Image(src) || useCORS) {
  12089. img.crossOrigin = 'anonymous';
  12090. }
  12091. img.src = src;
  12092. if (img.complete === true) {
  12093. // Inline XML images may fail to parse, throwing an Error later on
  12094. setTimeout(function () {return resolve(img);}, 500);
  12095. }
  12096. if (_this._options.imageTimeout > 0) {
  12097. setTimeout(function () {return reject("Timed out (" + _this._options.imageTimeout + "ms) loading image");}, _this._options.imageTimeout);
  12098. }
  12099. })];
  12100. case 3:return [2 /*return*/, _a.sent()];}
  12101. });
  12102. });
  12103. };
  12104. Cache.prototype.has = function (key) {
  12105. return typeof this._cache[key] !== 'undefined';
  12106. };
  12107. Cache.prototype.keys = function () {
  12108. return Promise.resolve(Object.keys(this._cache));
  12109. };
  12110. Cache.prototype.proxy = function (src) {
  12111. var _this = this;
  12112. var proxy = this._options.proxy;
  12113. if (!proxy) {
  12114. throw new Error('No proxy defined');
  12115. }
  12116. var key = src.substring(0, 256);
  12117. return new Promise(function (resolve, reject) {
  12118. var responseType = FEATURES.SUPPORT_RESPONSE_TYPE ? 'blob' : 'text';
  12119. var xhr = new XMLHttpRequest();
  12120. xhr.onload = function () {
  12121. if (xhr.status === 200) {
  12122. if (responseType === 'text') {
  12123. resolve(xhr.response);
  12124. } else
  12125. {
  12126. var reader_1 = new FileReader();
  12127. reader_1.addEventListener('load', function () {return resolve(reader_1.result);}, false);
  12128. reader_1.addEventListener('error', function (e) {return reject(e);}, false);
  12129. reader_1.readAsDataURL(xhr.response);
  12130. }
  12131. } else
  12132. {
  12133. reject("Failed to proxy resource " + key + " with status code " + xhr.status);
  12134. }
  12135. };
  12136. xhr.onerror = reject;
  12137. xhr.open('GET', proxy + "?url=" + encodeURIComponent(src) + "&responseType=" + responseType);
  12138. if (responseType !== 'text' && xhr instanceof XMLHttpRequest) {
  12139. xhr.responseType = responseType;
  12140. }
  12141. if (_this._options.imageTimeout) {
  12142. var timeout_1 = _this._options.imageTimeout;
  12143. xhr.timeout = timeout_1;
  12144. xhr.ontimeout = function () {return reject("Timed out (" + timeout_1 + "ms) proxying " + key);};
  12145. }
  12146. xhr.send();
  12147. });
  12148. };
  12149. return Cache;
  12150. }();
  12151. var INLINE_SVG = /^data:image\/svg\+xml/i;
  12152. var INLINE_BASE64 = /^data:image\/.*;base64,/i;
  12153. var INLINE_IMG = /^data:image\/.*/i;
  12154. var isRenderable = function isRenderable(src) {return FEATURES.SUPPORT_SVG_DRAWING || !isSVG(src);};
  12155. var isInlineImage = function isInlineImage(src) {return INLINE_IMG.test(src);};
  12156. var isInlineBase64Image = function isInlineBase64Image(src) {return INLINE_BASE64.test(src);};
  12157. var isBlobImage = function isBlobImage(src) {return src.substr(0, 4) === 'blob';};
  12158. var isSVG = function isSVG(src) {return src.substr(-3).toLowerCase() === 'svg' || INLINE_SVG.test(src);};
  12159. var webkitGradient = function webkitGradient(tokens) {
  12160. var angle = deg(180);
  12161. var stops = [];
  12162. var type = CSSImageType.LINEAR_GRADIENT;
  12163. var shape = CSSRadialShape.CIRCLE;
  12164. var size = CSSRadialExtent.FARTHEST_CORNER;
  12165. var position = [];
  12166. parseFunctionArgs(tokens).forEach(function (arg, i) {
  12167. var firstToken = arg[0];
  12168. if (i === 0) {
  12169. if (isIdentToken(firstToken) && firstToken.value === 'linear') {
  12170. type = CSSImageType.LINEAR_GRADIENT;
  12171. return;
  12172. } else
  12173. if (isIdentToken(firstToken) && firstToken.value === 'radial') {
  12174. type = CSSImageType.RADIAL_GRADIENT;
  12175. return;
  12176. }
  12177. }
  12178. if (firstToken.type === TokenType.FUNCTION) {
  12179. if (firstToken.name === 'from') {
  12180. var color$1 = color.parse(firstToken.values[0]);
  12181. stops.push({ stop: ZERO_LENGTH, color: color$1 });
  12182. } else
  12183. if (firstToken.name === 'to') {
  12184. var color$1 = color.parse(firstToken.values[0]);
  12185. stops.push({ stop: HUNDRED_PERCENT, color: color$1 });
  12186. } else
  12187. if (firstToken.name === 'color-stop') {
  12188. var values = firstToken.values.filter(nonFunctionArgSeparator);
  12189. if (values.length === 2) {
  12190. var color$1 = color.parse(values[1]);
  12191. var stop_1 = values[0];
  12192. if (isNumberToken(stop_1)) {
  12193. stops.push({
  12194. stop: { type: TokenType.PERCENTAGE_TOKEN, number: stop_1.number * 100, flags: stop_1.flags },
  12195. color: color$1 });
  12196. }
  12197. }
  12198. }
  12199. }
  12200. });
  12201. return type === CSSImageType.LINEAR_GRADIENT ?
  12202. {
  12203. angle: (angle + deg(180)) % deg(360),
  12204. stops: stops,
  12205. type: type } :
  12206. { size: size, shape: shape, stops: stops, position: position, type: type };
  12207. };
  12208. var CLOSEST_SIDE = 'closest-side';
  12209. var FARTHEST_SIDE = 'farthest-side';
  12210. var CLOSEST_CORNER = 'closest-corner';
  12211. var FARTHEST_CORNER = 'farthest-corner';
  12212. var CIRCLE = 'circle';
  12213. var ELLIPSE = 'ellipse';
  12214. var COVER = 'cover';
  12215. var CONTAIN = 'contain';
  12216. var radialGradient = function radialGradient(tokens) {
  12217. var shape = CSSRadialShape.CIRCLE;
  12218. var size = CSSRadialExtent.FARTHEST_CORNER;
  12219. var stops = [];
  12220. var position = [];
  12221. parseFunctionArgs(tokens).forEach(function (arg, i) {
  12222. var isColorStop = true;
  12223. if (i === 0) {
  12224. var isAtPosition_1 = false;
  12225. isColorStop = arg.reduce(function (acc, token) {
  12226. if (isAtPosition_1) {
  12227. if (isIdentToken(token)) {
  12228. switch (token.value) {
  12229. case 'center':
  12230. position.push(FIFTY_PERCENT);
  12231. return acc;
  12232. case 'top':
  12233. case 'left':
  12234. position.push(ZERO_LENGTH);
  12235. return acc;
  12236. case 'right':
  12237. case 'bottom':
  12238. position.push(HUNDRED_PERCENT);
  12239. return acc;}
  12240. } else
  12241. if (isLengthPercentage(token) || isLength(token)) {
  12242. position.push(token);
  12243. }
  12244. } else
  12245. if (isIdentToken(token)) {
  12246. switch (token.value) {
  12247. case CIRCLE:
  12248. shape = CSSRadialShape.CIRCLE;
  12249. return false;
  12250. case ELLIPSE:
  12251. shape = CSSRadialShape.ELLIPSE;
  12252. return false;
  12253. case 'at':
  12254. isAtPosition_1 = true;
  12255. return false;
  12256. case CLOSEST_SIDE:
  12257. size = CSSRadialExtent.CLOSEST_SIDE;
  12258. return false;
  12259. case COVER:
  12260. case FARTHEST_SIDE:
  12261. size = CSSRadialExtent.FARTHEST_SIDE;
  12262. return false;
  12263. case CONTAIN:
  12264. case CLOSEST_CORNER:
  12265. size = CSSRadialExtent.CLOSEST_CORNER;
  12266. return false;
  12267. case FARTHEST_CORNER:
  12268. size = CSSRadialExtent.FARTHEST_CORNER;
  12269. return false;}
  12270. } else
  12271. if (isLength(token) || isLengthPercentage(token)) {
  12272. if (!Array.isArray(size)) {
  12273. size = [];
  12274. }
  12275. size.push(token);
  12276. return false;
  12277. }
  12278. return acc;
  12279. }, isColorStop);
  12280. }
  12281. if (isColorStop) {
  12282. var colorStop = parseColorStop(arg);
  12283. stops.push(colorStop);
  12284. }
  12285. });
  12286. return { size: size, shape: shape, stops: stops, position: position, type: CSSImageType.RADIAL_GRADIENT };
  12287. };
  12288. var prefixRadialGradient = function prefixRadialGradient(tokens) {
  12289. var shape = CSSRadialShape.CIRCLE;
  12290. var size = CSSRadialExtent.FARTHEST_CORNER;
  12291. var stops = [];
  12292. var position = [];
  12293. parseFunctionArgs(tokens).forEach(function (arg, i) {
  12294. var isColorStop = true;
  12295. if (i === 0) {
  12296. isColorStop = arg.reduce(function (acc, token) {
  12297. if (isIdentToken(token)) {
  12298. switch (token.value) {
  12299. case 'center':
  12300. position.push(FIFTY_PERCENT);
  12301. return false;
  12302. case 'top':
  12303. case 'left':
  12304. position.push(ZERO_LENGTH);
  12305. return false;
  12306. case 'right':
  12307. case 'bottom':
  12308. position.push(HUNDRED_PERCENT);
  12309. return false;}
  12310. } else
  12311. if (isLengthPercentage(token) || isLength(token)) {
  12312. position.push(token);
  12313. return false;
  12314. }
  12315. return acc;
  12316. }, isColorStop);
  12317. } else
  12318. if (i === 1) {
  12319. isColorStop = arg.reduce(function (acc, token) {
  12320. if (isIdentToken(token)) {
  12321. switch (token.value) {
  12322. case CIRCLE:
  12323. shape = CSSRadialShape.CIRCLE;
  12324. return false;
  12325. case ELLIPSE:
  12326. shape = CSSRadialShape.ELLIPSE;
  12327. return false;
  12328. case CONTAIN:
  12329. case CLOSEST_SIDE:
  12330. size = CSSRadialExtent.CLOSEST_SIDE;
  12331. return false;
  12332. case FARTHEST_SIDE:
  12333. size = CSSRadialExtent.FARTHEST_SIDE;
  12334. return false;
  12335. case CLOSEST_CORNER:
  12336. size = CSSRadialExtent.CLOSEST_CORNER;
  12337. return false;
  12338. case COVER:
  12339. case FARTHEST_CORNER:
  12340. size = CSSRadialExtent.FARTHEST_CORNER;
  12341. return false;}
  12342. } else
  12343. if (isLength(token) || isLengthPercentage(token)) {
  12344. if (!Array.isArray(size)) {
  12345. size = [];
  12346. }
  12347. size.push(token);
  12348. return false;
  12349. }
  12350. return acc;
  12351. }, isColorStop);
  12352. }
  12353. if (isColorStop) {
  12354. var colorStop = parseColorStop(arg);
  12355. stops.push(colorStop);
  12356. }
  12357. });
  12358. return { size: size, shape: shape, stops: stops, position: position, type: CSSImageType.RADIAL_GRADIENT };
  12359. };
  12360. var CSSImageType;
  12361. (function (CSSImageType) {
  12362. CSSImageType[CSSImageType["URL"] = 0] = "URL";
  12363. CSSImageType[CSSImageType["LINEAR_GRADIENT"] = 1] = "LINEAR_GRADIENT";
  12364. CSSImageType[CSSImageType["RADIAL_GRADIENT"] = 2] = "RADIAL_GRADIENT";
  12365. })(CSSImageType || (CSSImageType = {}));
  12366. var isLinearGradient = function isLinearGradient(background) {
  12367. return background.type === CSSImageType.LINEAR_GRADIENT;
  12368. };
  12369. var isRadialGradient = function isRadialGradient(background) {
  12370. return background.type === CSSImageType.RADIAL_GRADIENT;
  12371. };
  12372. var CSSRadialShape;
  12373. (function (CSSRadialShape) {
  12374. CSSRadialShape[CSSRadialShape["CIRCLE"] = 0] = "CIRCLE";
  12375. CSSRadialShape[CSSRadialShape["ELLIPSE"] = 1] = "ELLIPSE";
  12376. })(CSSRadialShape || (CSSRadialShape = {}));
  12377. var CSSRadialExtent;
  12378. (function (CSSRadialExtent) {
  12379. CSSRadialExtent[CSSRadialExtent["CLOSEST_SIDE"] = 0] = "CLOSEST_SIDE";
  12380. CSSRadialExtent[CSSRadialExtent["FARTHEST_SIDE"] = 1] = "FARTHEST_SIDE";
  12381. CSSRadialExtent[CSSRadialExtent["CLOSEST_CORNER"] = 2] = "CLOSEST_CORNER";
  12382. CSSRadialExtent[CSSRadialExtent["FARTHEST_CORNER"] = 3] = "FARTHEST_CORNER";
  12383. })(CSSRadialExtent || (CSSRadialExtent = {}));
  12384. var image = {
  12385. name: 'image',
  12386. parse: function parse(value) {
  12387. if (value.type === TokenType.URL_TOKEN) {
  12388. var image_1 = { url: value.value, type: CSSImageType.URL };
  12389. CacheStorage.getInstance().addImage(value.value);
  12390. return image_1;
  12391. }
  12392. if (value.type === TokenType.FUNCTION) {
  12393. var imageFunction = SUPPORTED_IMAGE_FUNCTIONS[value.name];
  12394. if (typeof imageFunction === 'undefined') {
  12395. throw new Error("Attempting to parse an unsupported image function \"" + value.name + "\"");
  12396. }
  12397. return imageFunction(value.values);
  12398. }
  12399. throw new Error("Unsupported image type");
  12400. } };
  12401. function isSupportedImage(value) {
  12402. return value.type !== TokenType.FUNCTION || SUPPORTED_IMAGE_FUNCTIONS[value.name];
  12403. }
  12404. var SUPPORTED_IMAGE_FUNCTIONS = {
  12405. 'linear-gradient': linearGradient,
  12406. '-moz-linear-gradient': prefixLinearGradient,
  12407. '-ms-linear-gradient': prefixLinearGradient,
  12408. '-o-linear-gradient': prefixLinearGradient,
  12409. '-webkit-linear-gradient': prefixLinearGradient,
  12410. 'radial-gradient': radialGradient,
  12411. '-moz-radial-gradient': prefixRadialGradient,
  12412. '-ms-radial-gradient': prefixRadialGradient,
  12413. '-o-radial-gradient': prefixRadialGradient,
  12414. '-webkit-radial-gradient': prefixRadialGradient,
  12415. '-webkit-gradient': webkitGradient };
  12416. var backgroundImage = {
  12417. name: 'background-image',
  12418. initialValue: 'none',
  12419. type: PropertyDescriptorParsingType.LIST,
  12420. prefix: false,
  12421. parse: function parse(tokens) {
  12422. if (tokens.length === 0) {
  12423. return [];
  12424. }
  12425. var first = tokens[0];
  12426. if (first.type === TokenType.IDENT_TOKEN && first.value === 'none') {
  12427. return [];
  12428. }
  12429. return tokens.filter(function (value) {return nonFunctionArgSeparator(value) && isSupportedImage(value);}).map(image.parse);
  12430. } };
  12431. var backgroundOrigin = {
  12432. name: 'background-origin',
  12433. initialValue: 'border-box',
  12434. prefix: false,
  12435. type: PropertyDescriptorParsingType.LIST,
  12436. parse: function parse(tokens) {
  12437. return tokens.map(function (token) {
  12438. if (isIdentToken(token)) {
  12439. switch (token.value) {
  12440. case 'padding-box':
  12441. return 1 /* PADDING_BOX */;
  12442. case 'content-box':
  12443. return 2 /* CONTENT_BOX */;}
  12444. }
  12445. return 0 /* BORDER_BOX */;
  12446. });
  12447. } };
  12448. var backgroundPosition = {
  12449. name: 'background-position',
  12450. initialValue: '0% 0%',
  12451. type: PropertyDescriptorParsingType.LIST,
  12452. prefix: false,
  12453. parse: function parse(tokens) {
  12454. return parseFunctionArgs(tokens).
  12455. map(function (values) {return values.filter(isLengthPercentage);}).
  12456. map(parseLengthPercentageTuple);
  12457. } };
  12458. var BACKGROUND_REPEAT;
  12459. (function (BACKGROUND_REPEAT) {
  12460. BACKGROUND_REPEAT[BACKGROUND_REPEAT["REPEAT"] = 0] = "REPEAT";
  12461. BACKGROUND_REPEAT[BACKGROUND_REPEAT["NO_REPEAT"] = 1] = "NO_REPEAT";
  12462. BACKGROUND_REPEAT[BACKGROUND_REPEAT["REPEAT_X"] = 2] = "REPEAT_X";
  12463. BACKGROUND_REPEAT[BACKGROUND_REPEAT["REPEAT_Y"] = 3] = "REPEAT_Y";
  12464. })(BACKGROUND_REPEAT || (BACKGROUND_REPEAT = {}));
  12465. var backgroundRepeat = {
  12466. name: 'background-repeat',
  12467. initialValue: 'repeat',
  12468. prefix: false,
  12469. type: PropertyDescriptorParsingType.LIST,
  12470. parse: function parse(tokens) {
  12471. return parseFunctionArgs(tokens).
  12472. map(function (values) {
  12473. return values.
  12474. filter(isIdentToken).
  12475. map(function (token) {return token.value;}).
  12476. join(' ');
  12477. }).
  12478. map(parseBackgroundRepeat);
  12479. } };
  12480. var parseBackgroundRepeat = function parseBackgroundRepeat(value) {
  12481. switch (value) {
  12482. case 'no-repeat':
  12483. return BACKGROUND_REPEAT.NO_REPEAT;
  12484. case 'repeat-x':
  12485. case 'repeat no-repeat':
  12486. return BACKGROUND_REPEAT.REPEAT_X;
  12487. case 'repeat-y':
  12488. case 'no-repeat repeat':
  12489. return BACKGROUND_REPEAT.REPEAT_Y;
  12490. case 'repeat':
  12491. default:
  12492. return BACKGROUND_REPEAT.REPEAT;}
  12493. };
  12494. var BACKGROUND_SIZE;
  12495. (function (BACKGROUND_SIZE) {
  12496. BACKGROUND_SIZE["AUTO"] = "auto";
  12497. BACKGROUND_SIZE["CONTAIN"] = "contain";
  12498. BACKGROUND_SIZE["COVER"] = "cover";
  12499. })(BACKGROUND_SIZE || (BACKGROUND_SIZE = {}));
  12500. var backgroundSize = {
  12501. name: 'background-size',
  12502. initialValue: '0',
  12503. prefix: false,
  12504. type: PropertyDescriptorParsingType.LIST,
  12505. parse: function parse(tokens) {
  12506. return parseFunctionArgs(tokens).map(function (values) {return values.filter(isBackgroundSizeInfoToken);});
  12507. } };
  12508. var isBackgroundSizeInfoToken = function isBackgroundSizeInfoToken(value) {
  12509. return isIdentToken(value) || isLengthPercentage(value);
  12510. };
  12511. var borderColorForSide = function borderColorForSide(side) {return {
  12512. name: "border-" + side + "-color",
  12513. initialValue: 'transparent',
  12514. prefix: false,
  12515. type: PropertyDescriptorParsingType.TYPE_VALUE,
  12516. format: 'color' };
  12517. };
  12518. var borderTopColor = borderColorForSide('top');
  12519. var borderRightColor = borderColorForSide('right');
  12520. var borderBottomColor = borderColorForSide('bottom');
  12521. var borderLeftColor = borderColorForSide('left');
  12522. var borderRadiusForSide = function borderRadiusForSide(side) {return {
  12523. name: "border-radius-" + side,
  12524. initialValue: '0 0',
  12525. prefix: false,
  12526. type: PropertyDescriptorParsingType.LIST,
  12527. parse: function parse(tokens) {return parseLengthPercentageTuple(tokens.filter(isLengthPercentage));} };
  12528. };
  12529. var borderTopLeftRadius = borderRadiusForSide('top-left');
  12530. var borderTopRightRadius = borderRadiusForSide('top-right');
  12531. var borderBottomRightRadius = borderRadiusForSide('bottom-right');
  12532. var borderBottomLeftRadius = borderRadiusForSide('bottom-left');
  12533. var BORDER_STYLE;
  12534. (function (BORDER_STYLE) {
  12535. BORDER_STYLE[BORDER_STYLE["NONE"] = 0] = "NONE";
  12536. BORDER_STYLE[BORDER_STYLE["SOLID"] = 1] = "SOLID";
  12537. })(BORDER_STYLE || (BORDER_STYLE = {}));
  12538. var borderStyleForSide = function borderStyleForSide(side) {return {
  12539. name: "border-" + side + "-style",
  12540. initialValue: 'solid',
  12541. prefix: false,
  12542. type: PropertyDescriptorParsingType.IDENT_VALUE,
  12543. parse: function parse(style) {
  12544. switch (style) {
  12545. case 'none':
  12546. return BORDER_STYLE.NONE;}
  12547. return BORDER_STYLE.SOLID;
  12548. } };
  12549. };
  12550. var borderTopStyle = borderStyleForSide('top');
  12551. var borderRightStyle = borderStyleForSide('right');
  12552. var borderBottomStyle = borderStyleForSide('bottom');
  12553. var borderLeftStyle = borderStyleForSide('left');
  12554. var borderWidthForSide = function borderWidthForSide(side) {return {
  12555. name: "border-" + side + "-width",
  12556. initialValue: '0',
  12557. type: PropertyDescriptorParsingType.VALUE,
  12558. prefix: false,
  12559. parse: function parse(token) {
  12560. if (isDimensionToken(token)) {
  12561. return token.number;
  12562. }
  12563. return 0;
  12564. } };
  12565. };
  12566. var borderTopWidth = borderWidthForSide('top');
  12567. var borderRightWidth = borderWidthForSide('right');
  12568. var borderBottomWidth = borderWidthForSide('bottom');
  12569. var borderLeftWidth = borderWidthForSide('left');
  12570. var color$1 = {
  12571. name: "color",
  12572. initialValue: 'transparent',
  12573. prefix: false,
  12574. type: PropertyDescriptorParsingType.TYPE_VALUE,
  12575. format: 'color' };
  12576. var display = {
  12577. name: 'display',
  12578. initialValue: 'inline-block',
  12579. prefix: false,
  12580. type: PropertyDescriptorParsingType.LIST,
  12581. parse: function parse(tokens) {
  12582. return tokens.filter(isIdentToken).reduce(function (bit, token) {
  12583. return bit | parseDisplayValue(token.value);
  12584. }, 0 /* NONE */);
  12585. } };
  12586. var parseDisplayValue = function parseDisplayValue(display) {
  12587. switch (display) {
  12588. case 'block':
  12589. return 2 /* BLOCK */;
  12590. case 'inline':
  12591. return 4 /* INLINE */;
  12592. case 'run-in':
  12593. return 8 /* RUN_IN */;
  12594. case 'flow':
  12595. return 16 /* FLOW */;
  12596. case 'flow-root':
  12597. return 32 /* FLOW_ROOT */;
  12598. case 'table':
  12599. return 64 /* TABLE */;
  12600. case 'flex':
  12601. case '-webkit-flex':
  12602. return 128 /* FLEX */;
  12603. case 'grid':
  12604. case '-ms-grid':
  12605. return 256 /* GRID */;
  12606. case 'ruby':
  12607. return 512 /* RUBY */;
  12608. case 'subgrid':
  12609. return 1024 /* SUBGRID */;
  12610. case 'list-item':
  12611. return 2048 /* LIST_ITEM */;
  12612. case 'table-row-group':
  12613. return 4096 /* TABLE_ROW_GROUP */;
  12614. case 'table-header-group':
  12615. return 8192 /* TABLE_HEADER_GROUP */;
  12616. case 'table-footer-group':
  12617. return 16384 /* TABLE_FOOTER_GROUP */;
  12618. case 'table-row':
  12619. return 32768 /* TABLE_ROW */;
  12620. case 'table-cell':
  12621. return 65536 /* TABLE_CELL */;
  12622. case 'table-column-group':
  12623. return 131072 /* TABLE_COLUMN_GROUP */;
  12624. case 'table-column':
  12625. return 262144 /* TABLE_COLUMN */;
  12626. case 'table-caption':
  12627. return 524288 /* TABLE_CAPTION */;
  12628. case 'ruby-base':
  12629. return 1048576 /* RUBY_BASE */;
  12630. case 'ruby-text':
  12631. return 2097152 /* RUBY_TEXT */;
  12632. case 'ruby-base-container':
  12633. return 4194304 /* RUBY_BASE_CONTAINER */;
  12634. case 'ruby-text-container':
  12635. return 8388608 /* RUBY_TEXT_CONTAINER */;
  12636. case 'contents':
  12637. return 16777216 /* CONTENTS */;
  12638. case 'inline-block':
  12639. return 33554432 /* INLINE_BLOCK */;
  12640. case 'inline-list-item':
  12641. return 67108864 /* INLINE_LIST_ITEM */;
  12642. case 'inline-table':
  12643. return 134217728 /* INLINE_TABLE */;
  12644. case 'inline-flex':
  12645. return 268435456 /* INLINE_FLEX */;
  12646. case 'inline-grid':
  12647. return 536870912 /* INLINE_GRID */;}
  12648. return 0 /* NONE */;
  12649. };
  12650. var FLOAT;
  12651. (function (FLOAT) {
  12652. FLOAT[FLOAT["NONE"] = 0] = "NONE";
  12653. FLOAT[FLOAT["LEFT"] = 1] = "LEFT";
  12654. FLOAT[FLOAT["RIGHT"] = 2] = "RIGHT";
  12655. FLOAT[FLOAT["INLINE_START"] = 3] = "INLINE_START";
  12656. FLOAT[FLOAT["INLINE_END"] = 4] = "INLINE_END";
  12657. })(FLOAT || (FLOAT = {}));
  12658. var _float = {
  12659. name: 'float',
  12660. initialValue: 'none',
  12661. prefix: false,
  12662. type: PropertyDescriptorParsingType.IDENT_VALUE,
  12663. parse: function parse(_float2) {
  12664. switch (_float2) {
  12665. case 'left':
  12666. return FLOAT.LEFT;
  12667. case 'right':
  12668. return FLOAT.RIGHT;
  12669. case 'inline-start':
  12670. return FLOAT.INLINE_START;
  12671. case 'inline-end':
  12672. return FLOAT.INLINE_END;}
  12673. return FLOAT.NONE;
  12674. } };
  12675. var letterSpacing = {
  12676. name: 'letter-spacing',
  12677. initialValue: '0',
  12678. prefix: false,
  12679. type: PropertyDescriptorParsingType.VALUE,
  12680. parse: function parse(token) {
  12681. if (token.type === TokenType.IDENT_TOKEN && token.value === 'normal') {
  12682. return 0;
  12683. }
  12684. if (token.type === TokenType.NUMBER_TOKEN) {
  12685. return token.number;
  12686. }
  12687. if (token.type === TokenType.DIMENSION_TOKEN) {
  12688. return token.number;
  12689. }
  12690. return 0;
  12691. } };
  12692. var LINE_BREAK;
  12693. (function (LINE_BREAK) {
  12694. LINE_BREAK["NORMAL"] = "normal";
  12695. LINE_BREAK["STRICT"] = "strict";
  12696. })(LINE_BREAK || (LINE_BREAK = {}));
  12697. var lineBreak = {
  12698. name: 'line-break',
  12699. initialValue: 'normal',
  12700. prefix: false,
  12701. type: PropertyDescriptorParsingType.IDENT_VALUE,
  12702. parse: function parse(lineBreak) {
  12703. switch (lineBreak) {
  12704. case 'strict':
  12705. return LINE_BREAK.STRICT;
  12706. case 'normal':
  12707. default:
  12708. return LINE_BREAK.NORMAL;}
  12709. } };
  12710. var lineHeight = {
  12711. name: 'line-height',
  12712. initialValue: 'normal',
  12713. prefix: false,
  12714. type: PropertyDescriptorParsingType.TOKEN_VALUE };
  12715. var computeLineHeight = function computeLineHeight(token, fontSize) {
  12716. if (isIdentToken(token) && token.value === 'normal') {
  12717. return 1.2 * fontSize;
  12718. } else
  12719. if (token.type === TokenType.NUMBER_TOKEN) {
  12720. return fontSize * token.number;
  12721. } else
  12722. if (isLengthPercentage(token)) {
  12723. return getAbsoluteValue(token, fontSize);
  12724. }
  12725. return fontSize;
  12726. };
  12727. var listStyleImage = {
  12728. name: 'list-style-image',
  12729. initialValue: 'none',
  12730. type: PropertyDescriptorParsingType.VALUE,
  12731. prefix: false,
  12732. parse: function parse(token) {
  12733. if (token.type === TokenType.IDENT_TOKEN && token.value === 'none') {
  12734. return null;
  12735. }
  12736. return image.parse(token);
  12737. } };
  12738. var LIST_STYLE_POSITION;
  12739. (function (LIST_STYLE_POSITION) {
  12740. LIST_STYLE_POSITION[LIST_STYLE_POSITION["INSIDE"] = 0] = "INSIDE";
  12741. LIST_STYLE_POSITION[LIST_STYLE_POSITION["OUTSIDE"] = 1] = "OUTSIDE";
  12742. })(LIST_STYLE_POSITION || (LIST_STYLE_POSITION = {}));
  12743. var listStylePosition = {
  12744. name: 'list-style-position',
  12745. initialValue: 'outside',
  12746. prefix: false,
  12747. type: PropertyDescriptorParsingType.IDENT_VALUE,
  12748. parse: function parse(position) {
  12749. switch (position) {
  12750. case 'inside':
  12751. return LIST_STYLE_POSITION.INSIDE;
  12752. case 'outside':
  12753. default:
  12754. return LIST_STYLE_POSITION.OUTSIDE;}
  12755. } };
  12756. var LIST_STYLE_TYPE;
  12757. (function (LIST_STYLE_TYPE) {
  12758. LIST_STYLE_TYPE[LIST_STYLE_TYPE["NONE"] = -1] = "NONE";
  12759. LIST_STYLE_TYPE[LIST_STYLE_TYPE["DISC"] = 0] = "DISC";
  12760. LIST_STYLE_TYPE[LIST_STYLE_TYPE["CIRCLE"] = 1] = "CIRCLE";
  12761. LIST_STYLE_TYPE[LIST_STYLE_TYPE["SQUARE"] = 2] = "SQUARE";
  12762. LIST_STYLE_TYPE[LIST_STYLE_TYPE["DECIMAL"] = 3] = "DECIMAL";
  12763. LIST_STYLE_TYPE[LIST_STYLE_TYPE["CJK_DECIMAL"] = 4] = "CJK_DECIMAL";
  12764. LIST_STYLE_TYPE[LIST_STYLE_TYPE["DECIMAL_LEADING_ZERO"] = 5] = "DECIMAL_LEADING_ZERO";
  12765. LIST_STYLE_TYPE[LIST_STYLE_TYPE["LOWER_ROMAN"] = 6] = "LOWER_ROMAN";
  12766. LIST_STYLE_TYPE[LIST_STYLE_TYPE["UPPER_ROMAN"] = 7] = "UPPER_ROMAN";
  12767. LIST_STYLE_TYPE[LIST_STYLE_TYPE["LOWER_GREEK"] = 8] = "LOWER_GREEK";
  12768. LIST_STYLE_TYPE[LIST_STYLE_TYPE["LOWER_ALPHA"] = 9] = "LOWER_ALPHA";
  12769. LIST_STYLE_TYPE[LIST_STYLE_TYPE["UPPER_ALPHA"] = 10] = "UPPER_ALPHA";
  12770. LIST_STYLE_TYPE[LIST_STYLE_TYPE["ARABIC_INDIC"] = 11] = "ARABIC_INDIC";
  12771. LIST_STYLE_TYPE[LIST_STYLE_TYPE["ARMENIAN"] = 12] = "ARMENIAN";
  12772. LIST_STYLE_TYPE[LIST_STYLE_TYPE["BENGALI"] = 13] = "BENGALI";
  12773. LIST_STYLE_TYPE[LIST_STYLE_TYPE["CAMBODIAN"] = 14] = "CAMBODIAN";
  12774. LIST_STYLE_TYPE[LIST_STYLE_TYPE["CJK_EARTHLY_BRANCH"] = 15] = "CJK_EARTHLY_BRANCH";
  12775. LIST_STYLE_TYPE[LIST_STYLE_TYPE["CJK_HEAVENLY_STEM"] = 16] = "CJK_HEAVENLY_STEM";
  12776. LIST_STYLE_TYPE[LIST_STYLE_TYPE["CJK_IDEOGRAPHIC"] = 17] = "CJK_IDEOGRAPHIC";
  12777. LIST_STYLE_TYPE[LIST_STYLE_TYPE["DEVANAGARI"] = 18] = "DEVANAGARI";
  12778. LIST_STYLE_TYPE[LIST_STYLE_TYPE["ETHIOPIC_NUMERIC"] = 19] = "ETHIOPIC_NUMERIC";
  12779. LIST_STYLE_TYPE[LIST_STYLE_TYPE["GEORGIAN"] = 20] = "GEORGIAN";
  12780. LIST_STYLE_TYPE[LIST_STYLE_TYPE["GUJARATI"] = 21] = "GUJARATI";
  12781. LIST_STYLE_TYPE[LIST_STYLE_TYPE["GURMUKHI"] = 22] = "GURMUKHI";
  12782. LIST_STYLE_TYPE[LIST_STYLE_TYPE["HEBREW"] = 22] = "HEBREW";
  12783. LIST_STYLE_TYPE[LIST_STYLE_TYPE["HIRAGANA"] = 23] = "HIRAGANA";
  12784. LIST_STYLE_TYPE[LIST_STYLE_TYPE["HIRAGANA_IROHA"] = 24] = "HIRAGANA_IROHA";
  12785. LIST_STYLE_TYPE[LIST_STYLE_TYPE["JAPANESE_FORMAL"] = 25] = "JAPANESE_FORMAL";
  12786. LIST_STYLE_TYPE[LIST_STYLE_TYPE["JAPANESE_INFORMAL"] = 26] = "JAPANESE_INFORMAL";
  12787. LIST_STYLE_TYPE[LIST_STYLE_TYPE["KANNADA"] = 27] = "KANNADA";
  12788. LIST_STYLE_TYPE[LIST_STYLE_TYPE["KATAKANA"] = 28] = "KATAKANA";
  12789. LIST_STYLE_TYPE[LIST_STYLE_TYPE["KATAKANA_IROHA"] = 29] = "KATAKANA_IROHA";
  12790. LIST_STYLE_TYPE[LIST_STYLE_TYPE["KHMER"] = 30] = "KHMER";
  12791. LIST_STYLE_TYPE[LIST_STYLE_TYPE["KOREAN_HANGUL_FORMAL"] = 31] = "KOREAN_HANGUL_FORMAL";
  12792. LIST_STYLE_TYPE[LIST_STYLE_TYPE["KOREAN_HANJA_FORMAL"] = 32] = "KOREAN_HANJA_FORMAL";
  12793. LIST_STYLE_TYPE[LIST_STYLE_TYPE["KOREAN_HANJA_INFORMAL"] = 33] = "KOREAN_HANJA_INFORMAL";
  12794. LIST_STYLE_TYPE[LIST_STYLE_TYPE["LAO"] = 34] = "LAO";
  12795. LIST_STYLE_TYPE[LIST_STYLE_TYPE["LOWER_ARMENIAN"] = 35] = "LOWER_ARMENIAN";
  12796. LIST_STYLE_TYPE[LIST_STYLE_TYPE["MALAYALAM"] = 36] = "MALAYALAM";
  12797. LIST_STYLE_TYPE[LIST_STYLE_TYPE["MONGOLIAN"] = 37] = "MONGOLIAN";
  12798. LIST_STYLE_TYPE[LIST_STYLE_TYPE["MYANMAR"] = 38] = "MYANMAR";
  12799. LIST_STYLE_TYPE[LIST_STYLE_TYPE["ORIYA"] = 39] = "ORIYA";
  12800. LIST_STYLE_TYPE[LIST_STYLE_TYPE["PERSIAN"] = 40] = "PERSIAN";
  12801. LIST_STYLE_TYPE[LIST_STYLE_TYPE["SIMP_CHINESE_FORMAL"] = 41] = "SIMP_CHINESE_FORMAL";
  12802. LIST_STYLE_TYPE[LIST_STYLE_TYPE["SIMP_CHINESE_INFORMAL"] = 42] = "SIMP_CHINESE_INFORMAL";
  12803. LIST_STYLE_TYPE[LIST_STYLE_TYPE["TAMIL"] = 43] = "TAMIL";
  12804. LIST_STYLE_TYPE[LIST_STYLE_TYPE["TELUGU"] = 44] = "TELUGU";
  12805. LIST_STYLE_TYPE[LIST_STYLE_TYPE["THAI"] = 45] = "THAI";
  12806. LIST_STYLE_TYPE[LIST_STYLE_TYPE["TIBETAN"] = 46] = "TIBETAN";
  12807. LIST_STYLE_TYPE[LIST_STYLE_TYPE["TRAD_CHINESE_FORMAL"] = 47] = "TRAD_CHINESE_FORMAL";
  12808. LIST_STYLE_TYPE[LIST_STYLE_TYPE["TRAD_CHINESE_INFORMAL"] = 48] = "TRAD_CHINESE_INFORMAL";
  12809. LIST_STYLE_TYPE[LIST_STYLE_TYPE["UPPER_ARMENIAN"] = 49] = "UPPER_ARMENIAN";
  12810. LIST_STYLE_TYPE[LIST_STYLE_TYPE["DISCLOSURE_OPEN"] = 50] = "DISCLOSURE_OPEN";
  12811. LIST_STYLE_TYPE[LIST_STYLE_TYPE["DISCLOSURE_CLOSED"] = 51] = "DISCLOSURE_CLOSED";
  12812. })(LIST_STYLE_TYPE || (LIST_STYLE_TYPE = {}));
  12813. var listStyleType = {
  12814. name: 'list-style-type',
  12815. initialValue: 'none',
  12816. prefix: false,
  12817. type: PropertyDescriptorParsingType.IDENT_VALUE,
  12818. parse: function parse(type) {
  12819. switch (type) {
  12820. case 'disc':
  12821. return LIST_STYLE_TYPE.DISC;
  12822. case 'circle':
  12823. return LIST_STYLE_TYPE.CIRCLE;
  12824. case 'square':
  12825. return LIST_STYLE_TYPE.SQUARE;
  12826. case 'decimal':
  12827. return LIST_STYLE_TYPE.DECIMAL;
  12828. case 'cjk-decimal':
  12829. return LIST_STYLE_TYPE.CJK_DECIMAL;
  12830. case 'decimal-leading-zero':
  12831. return LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO;
  12832. case 'lower-roman':
  12833. return LIST_STYLE_TYPE.LOWER_ROMAN;
  12834. case 'upper-roman':
  12835. return LIST_STYLE_TYPE.UPPER_ROMAN;
  12836. case 'lower-greek':
  12837. return LIST_STYLE_TYPE.LOWER_GREEK;
  12838. case 'lower-alpha':
  12839. return LIST_STYLE_TYPE.LOWER_ALPHA;
  12840. case 'upper-alpha':
  12841. return LIST_STYLE_TYPE.UPPER_ALPHA;
  12842. case 'arabic-indic':
  12843. return LIST_STYLE_TYPE.ARABIC_INDIC;
  12844. case 'armenian':
  12845. return LIST_STYLE_TYPE.ARMENIAN;
  12846. case 'bengali':
  12847. return LIST_STYLE_TYPE.BENGALI;
  12848. case 'cambodian':
  12849. return LIST_STYLE_TYPE.CAMBODIAN;
  12850. case 'cjk-earthly-branch':
  12851. return LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH;
  12852. case 'cjk-heavenly-stem':
  12853. return LIST_STYLE_TYPE.CJK_HEAVENLY_STEM;
  12854. case 'cjk-ideographic':
  12855. return LIST_STYLE_TYPE.CJK_IDEOGRAPHIC;
  12856. case 'devanagari':
  12857. return LIST_STYLE_TYPE.DEVANAGARI;
  12858. case 'ethiopic-numeric':
  12859. return LIST_STYLE_TYPE.ETHIOPIC_NUMERIC;
  12860. case 'georgian':
  12861. return LIST_STYLE_TYPE.GEORGIAN;
  12862. case 'gujarati':
  12863. return LIST_STYLE_TYPE.GUJARATI;
  12864. case 'gurmukhi':
  12865. return LIST_STYLE_TYPE.GURMUKHI;
  12866. case 'hebrew':
  12867. return LIST_STYLE_TYPE.HEBREW;
  12868. case 'hiragana':
  12869. return LIST_STYLE_TYPE.HIRAGANA;
  12870. case 'hiragana-iroha':
  12871. return LIST_STYLE_TYPE.HIRAGANA_IROHA;
  12872. case 'japanese-formal':
  12873. return LIST_STYLE_TYPE.JAPANESE_FORMAL;
  12874. case 'japanese-informal':
  12875. return LIST_STYLE_TYPE.JAPANESE_INFORMAL;
  12876. case 'kannada':
  12877. return LIST_STYLE_TYPE.KANNADA;
  12878. case 'katakana':
  12879. return LIST_STYLE_TYPE.KATAKANA;
  12880. case 'katakana-iroha':
  12881. return LIST_STYLE_TYPE.KATAKANA_IROHA;
  12882. case 'khmer':
  12883. return LIST_STYLE_TYPE.KHMER;
  12884. case 'korean-hangul-formal':
  12885. return LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL;
  12886. case 'korean-hanja-formal':
  12887. return LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL;
  12888. case 'korean-hanja-informal':
  12889. return LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL;
  12890. case 'lao':
  12891. return LIST_STYLE_TYPE.LAO;
  12892. case 'lower-armenian':
  12893. return LIST_STYLE_TYPE.LOWER_ARMENIAN;
  12894. case 'malayalam':
  12895. return LIST_STYLE_TYPE.MALAYALAM;
  12896. case 'mongolian':
  12897. return LIST_STYLE_TYPE.MONGOLIAN;
  12898. case 'myanmar':
  12899. return LIST_STYLE_TYPE.MYANMAR;
  12900. case 'oriya':
  12901. return LIST_STYLE_TYPE.ORIYA;
  12902. case 'persian':
  12903. return LIST_STYLE_TYPE.PERSIAN;
  12904. case 'simp-chinese-formal':
  12905. return LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL;
  12906. case 'simp-chinese-informal':
  12907. return LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL;
  12908. case 'tamil':
  12909. return LIST_STYLE_TYPE.TAMIL;
  12910. case 'telugu':
  12911. return LIST_STYLE_TYPE.TELUGU;
  12912. case 'thai':
  12913. return LIST_STYLE_TYPE.THAI;
  12914. case 'tibetan':
  12915. return LIST_STYLE_TYPE.TIBETAN;
  12916. case 'trad-chinese-formal':
  12917. return LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL;
  12918. case 'trad-chinese-informal':
  12919. return LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL;
  12920. case 'upper-armenian':
  12921. return LIST_STYLE_TYPE.UPPER_ARMENIAN;
  12922. case 'disclosure-open':
  12923. return LIST_STYLE_TYPE.DISCLOSURE_OPEN;
  12924. case 'disclosure-closed':
  12925. return LIST_STYLE_TYPE.DISCLOSURE_CLOSED;
  12926. case 'none':
  12927. default:
  12928. return LIST_STYLE_TYPE.NONE;}
  12929. } };
  12930. var marginForSide = function marginForSide(side) {return {
  12931. name: "margin-" + side,
  12932. initialValue: '0',
  12933. prefix: false,
  12934. type: PropertyDescriptorParsingType.TOKEN_VALUE };
  12935. };
  12936. var marginTop = marginForSide('top');
  12937. var marginRight = marginForSide('right');
  12938. var marginBottom = marginForSide('bottom');
  12939. var marginLeft = marginForSide('left');
  12940. var OVERFLOW;
  12941. (function (OVERFLOW) {
  12942. OVERFLOW[OVERFLOW["VISIBLE"] = 0] = "VISIBLE";
  12943. OVERFLOW[OVERFLOW["HIDDEN"] = 1] = "HIDDEN";
  12944. OVERFLOW[OVERFLOW["SCROLL"] = 2] = "SCROLL";
  12945. OVERFLOW[OVERFLOW["AUTO"] = 3] = "AUTO";
  12946. })(OVERFLOW || (OVERFLOW = {}));
  12947. var overflow = {
  12948. name: 'overflow',
  12949. initialValue: 'visible',
  12950. prefix: false,
  12951. type: PropertyDescriptorParsingType.LIST,
  12952. parse: function parse(tokens) {
  12953. return tokens.filter(isIdentToken).map(function (overflow) {
  12954. switch (overflow.value) {
  12955. case 'hidden':
  12956. return OVERFLOW.HIDDEN;
  12957. case 'scroll':
  12958. return OVERFLOW.SCROLL;
  12959. case 'auto':
  12960. return OVERFLOW.AUTO;
  12961. case 'visible':
  12962. default:
  12963. return OVERFLOW.VISIBLE;}
  12964. });
  12965. } };
  12966. var OVERFLOW_WRAP;
  12967. (function (OVERFLOW_WRAP) {
  12968. OVERFLOW_WRAP["NORMAL"] = "normal";
  12969. OVERFLOW_WRAP["BREAK_WORD"] = "break-word";
  12970. })(OVERFLOW_WRAP || (OVERFLOW_WRAP = {}));
  12971. var overflowWrap = {
  12972. name: 'overflow-wrap',
  12973. initialValue: 'normal',
  12974. prefix: false,
  12975. type: PropertyDescriptorParsingType.IDENT_VALUE,
  12976. parse: function parse(overflow) {
  12977. switch (overflow) {
  12978. case 'break-word':
  12979. return OVERFLOW_WRAP.BREAK_WORD;
  12980. case 'normal':
  12981. default:
  12982. return OVERFLOW_WRAP.NORMAL;}
  12983. } };
  12984. var paddingForSide = function paddingForSide(side) {return {
  12985. name: "padding-" + side,
  12986. initialValue: '0',
  12987. prefix: false,
  12988. type: PropertyDescriptorParsingType.TYPE_VALUE,
  12989. format: 'length-percentage' };
  12990. };
  12991. var paddingTop = paddingForSide('top');
  12992. var paddingRight = paddingForSide('right');
  12993. var paddingBottom = paddingForSide('bottom');
  12994. var paddingLeft = paddingForSide('left');
  12995. var TEXT_ALIGN;
  12996. (function (TEXT_ALIGN) {
  12997. TEXT_ALIGN[TEXT_ALIGN["LEFT"] = 0] = "LEFT";
  12998. TEXT_ALIGN[TEXT_ALIGN["CENTER"] = 1] = "CENTER";
  12999. TEXT_ALIGN[TEXT_ALIGN["RIGHT"] = 2] = "RIGHT";
  13000. })(TEXT_ALIGN || (TEXT_ALIGN = {}));
  13001. var textAlign = {
  13002. name: 'text-align',
  13003. initialValue: 'left',
  13004. prefix: false,
  13005. type: PropertyDescriptorParsingType.IDENT_VALUE,
  13006. parse: function parse(textAlign) {
  13007. switch (textAlign) {
  13008. case 'right':
  13009. return TEXT_ALIGN.RIGHT;
  13010. case 'center':
  13011. case 'justify':
  13012. return TEXT_ALIGN.CENTER;
  13013. case 'left':
  13014. default:
  13015. return TEXT_ALIGN.LEFT;}
  13016. } };
  13017. var POSITION;
  13018. (function (POSITION) {
  13019. POSITION[POSITION["STATIC"] = 0] = "STATIC";
  13020. POSITION[POSITION["RELATIVE"] = 1] = "RELATIVE";
  13021. POSITION[POSITION["ABSOLUTE"] = 2] = "ABSOLUTE";
  13022. POSITION[POSITION["FIXED"] = 3] = "FIXED";
  13023. POSITION[POSITION["STICKY"] = 4] = "STICKY";
  13024. })(POSITION || (POSITION = {}));
  13025. var position = {
  13026. name: 'position',
  13027. initialValue: 'static',
  13028. prefix: false,
  13029. type: PropertyDescriptorParsingType.IDENT_VALUE,
  13030. parse: function parse(position) {
  13031. switch (position) {
  13032. case 'relative':
  13033. return POSITION.RELATIVE;
  13034. case 'absolute':
  13035. return POSITION.ABSOLUTE;
  13036. case 'fixed':
  13037. return POSITION.FIXED;
  13038. case 'sticky':
  13039. return POSITION.STICKY;}
  13040. return POSITION.STATIC;
  13041. } };
  13042. var textShadow = {
  13043. name: 'text-shadow',
  13044. initialValue: 'none',
  13045. type: PropertyDescriptorParsingType.LIST,
  13046. prefix: false,
  13047. parse: function parse(tokens) {
  13048. if (tokens.length === 1 && isIdentWithValue(tokens[0], 'none')) {
  13049. return [];
  13050. }
  13051. return parseFunctionArgs(tokens).map(function (values) {
  13052. var shadow = {
  13053. color: COLORS.TRANSPARENT,
  13054. offsetX: ZERO_LENGTH,
  13055. offsetY: ZERO_LENGTH,
  13056. blur: ZERO_LENGTH };
  13057. var c = 0;
  13058. for (var i = 0; i < values.length; i++) {
  13059. var token = values[i];
  13060. if (isLength(token)) {
  13061. if (c === 0) {
  13062. shadow.offsetX = token;
  13063. } else
  13064. if (c === 1) {
  13065. shadow.offsetY = token;
  13066. } else
  13067. {
  13068. shadow.blur = token;
  13069. }
  13070. c++;
  13071. } else
  13072. {
  13073. shadow.color = color.parse(token);
  13074. }
  13075. }
  13076. return shadow;
  13077. });
  13078. } };
  13079. var TEXT_TRANSFORM;
  13080. (function (TEXT_TRANSFORM) {
  13081. TEXT_TRANSFORM[TEXT_TRANSFORM["NONE"] = 0] = "NONE";
  13082. TEXT_TRANSFORM[TEXT_TRANSFORM["LOWERCASE"] = 1] = "LOWERCASE";
  13083. TEXT_TRANSFORM[TEXT_TRANSFORM["UPPERCASE"] = 2] = "UPPERCASE";
  13084. TEXT_TRANSFORM[TEXT_TRANSFORM["CAPITALIZE"] = 3] = "CAPITALIZE";
  13085. })(TEXT_TRANSFORM || (TEXT_TRANSFORM = {}));
  13086. var textTransform = {
  13087. name: 'text-transform',
  13088. initialValue: 'none',
  13089. prefix: false,
  13090. type: PropertyDescriptorParsingType.IDENT_VALUE,
  13091. parse: function parse(textTransform) {
  13092. switch (textTransform) {
  13093. case 'uppercase':
  13094. return TEXT_TRANSFORM.UPPERCASE;
  13095. case 'lowercase':
  13096. return TEXT_TRANSFORM.LOWERCASE;
  13097. case 'capitalize':
  13098. return TEXT_TRANSFORM.CAPITALIZE;}
  13099. return TEXT_TRANSFORM.NONE;
  13100. } };
  13101. var transform = {
  13102. name: 'transform',
  13103. initialValue: 'none',
  13104. prefix: true,
  13105. type: PropertyDescriptorParsingType.VALUE,
  13106. parse: function parse(token) {
  13107. if (token.type === TokenType.IDENT_TOKEN && token.value === 'none') {
  13108. return null;
  13109. }
  13110. if (token.type === TokenType.FUNCTION) {
  13111. var transformFunction = SUPPORTED_TRANSFORM_FUNCTIONS[token.name];
  13112. if (typeof transformFunction === 'undefined') {
  13113. throw new Error("Attempting to parse an unsupported transform function \"" + token.name + "\"");
  13114. }
  13115. return transformFunction(token.values);
  13116. }
  13117. return null;
  13118. } };
  13119. var matrix = function matrix(args) {
  13120. var values = args.filter(function (arg) {return arg.type === TokenType.NUMBER_TOKEN;}).map(function (arg) {return arg.number;});
  13121. return values.length === 6 ? values : null;
  13122. };
  13123. // doesn't support 3D transforms at the moment
  13124. var matrix3d = function matrix3d(args) {
  13125. var values = args.filter(function (arg) {return arg.type === TokenType.NUMBER_TOKEN;}).map(function (arg) {return arg.number;});
  13126. var a1 = values[0],b1 = values[1],_a = values[2],_b = values[3],a2 = values[4],b2 = values[5],_c = values[6],_d = values[7],_e = values[8],_f = values[9],_g = values[10],_h = values[11],a4 = values[12],b4 = values[13],_j = values[14],_k = values[15];
  13127. return values.length === 16 ? [a1, b1, a2, b2, a4, b4] : null;
  13128. };
  13129. var SUPPORTED_TRANSFORM_FUNCTIONS = {
  13130. matrix: matrix,
  13131. matrix3d: matrix3d };
  13132. var DEFAULT_VALUE = {
  13133. type: TokenType.PERCENTAGE_TOKEN,
  13134. number: 50,
  13135. flags: FLAG_INTEGER };
  13136. var DEFAULT = [DEFAULT_VALUE, DEFAULT_VALUE];
  13137. var transformOrigin = {
  13138. name: 'transform-origin',
  13139. initialValue: '50% 50%',
  13140. prefix: true,
  13141. type: PropertyDescriptorParsingType.LIST,
  13142. parse: function parse(tokens) {
  13143. var origins = tokens.filter(isLengthPercentage);
  13144. if (origins.length !== 2) {
  13145. return DEFAULT;
  13146. }
  13147. return [origins[0], origins[1]];
  13148. } };
  13149. var VISIBILITY;
  13150. (function (VISIBILITY) {
  13151. VISIBILITY[VISIBILITY["VISIBLE"] = 0] = "VISIBLE";
  13152. VISIBILITY[VISIBILITY["HIDDEN"] = 1] = "HIDDEN";
  13153. VISIBILITY[VISIBILITY["COLLAPSE"] = 2] = "COLLAPSE";
  13154. })(VISIBILITY || (VISIBILITY = {}));
  13155. var visibility = {
  13156. name: 'visible',
  13157. initialValue: 'none',
  13158. prefix: false,
  13159. type: PropertyDescriptorParsingType.IDENT_VALUE,
  13160. parse: function parse(visibility) {
  13161. switch (visibility) {
  13162. case 'hidden':
  13163. return VISIBILITY.HIDDEN;
  13164. case 'collapse':
  13165. return VISIBILITY.COLLAPSE;
  13166. case 'visible':
  13167. default:
  13168. return VISIBILITY.VISIBLE;}
  13169. } };
  13170. var WORD_BREAK;
  13171. (function (WORD_BREAK) {
  13172. WORD_BREAK["NORMAL"] = "normal";
  13173. WORD_BREAK["BREAK_ALL"] = "break-all";
  13174. WORD_BREAK["KEEP_ALL"] = "keep-all";
  13175. })(WORD_BREAK || (WORD_BREAK = {}));
  13176. var wordBreak = {
  13177. name: 'word-break',
  13178. initialValue: 'normal',
  13179. prefix: false,
  13180. type: PropertyDescriptorParsingType.IDENT_VALUE,
  13181. parse: function parse(wordBreak) {
  13182. switch (wordBreak) {
  13183. case 'break-all':
  13184. return WORD_BREAK.BREAK_ALL;
  13185. case 'keep-all':
  13186. return WORD_BREAK.KEEP_ALL;
  13187. case 'normal':
  13188. default:
  13189. return WORD_BREAK.NORMAL;}
  13190. } };
  13191. var zIndex = {
  13192. name: 'z-index',
  13193. initialValue: 'auto',
  13194. prefix: false,
  13195. type: PropertyDescriptorParsingType.VALUE,
  13196. parse: function parse(token) {
  13197. if (token.type === TokenType.IDENT_TOKEN) {
  13198. return { auto: true, order: 0 };
  13199. }
  13200. if (isNumberToken(token)) {
  13201. return { auto: false, order: token.number };
  13202. }
  13203. throw new Error("Invalid z-index number parsed");
  13204. } };
  13205. var opacity = {
  13206. name: 'opacity',
  13207. initialValue: '1',
  13208. type: PropertyDescriptorParsingType.VALUE,
  13209. prefix: false,
  13210. parse: function parse(token) {
  13211. if (isNumberToken(token)) {
  13212. return token.number;
  13213. }
  13214. return 1;
  13215. } };
  13216. var textDecorationColor = {
  13217. name: "text-decoration-color",
  13218. initialValue: 'transparent',
  13219. prefix: false,
  13220. type: PropertyDescriptorParsingType.TYPE_VALUE,
  13221. format: 'color' };
  13222. var textDecorationLine = {
  13223. name: 'text-decoration-line',
  13224. initialValue: 'none',
  13225. prefix: false,
  13226. type: PropertyDescriptorParsingType.LIST,
  13227. parse: function parse(tokens) {
  13228. return tokens.
  13229. filter(isIdentToken).
  13230. map(function (token) {
  13231. switch (token.value) {
  13232. case 'underline':
  13233. return 1 /* UNDERLINE */;
  13234. case 'overline':
  13235. return 2 /* OVERLINE */;
  13236. case 'line-through':
  13237. return 3 /* LINE_THROUGH */;
  13238. case 'none':
  13239. return 4 /* BLINK */;}
  13240. return 0 /* NONE */;
  13241. }).
  13242. filter(function (line) {return line !== 0 /* NONE */;});
  13243. } };
  13244. var fontFamily = {
  13245. name: "font-family",
  13246. initialValue: '',
  13247. prefix: false,
  13248. type: PropertyDescriptorParsingType.LIST,
  13249. parse: function parse(tokens) {
  13250. return tokens.filter(isStringToken$1).map(function (token) {return token.value;});
  13251. } };
  13252. var isStringToken$1 = function isStringToken$1(token) {
  13253. return token.type === TokenType.STRING_TOKEN || token.type === TokenType.IDENT_TOKEN;
  13254. };
  13255. var fontSize = {
  13256. name: "font-size",
  13257. initialValue: '0',
  13258. prefix: false,
  13259. type: PropertyDescriptorParsingType.TYPE_VALUE,
  13260. format: 'length' };
  13261. var fontWeight = {
  13262. name: 'font-weight',
  13263. initialValue: 'normal',
  13264. type: PropertyDescriptorParsingType.VALUE,
  13265. prefix: false,
  13266. parse: function parse(token) {
  13267. if (isNumberToken(token)) {
  13268. return token.number;
  13269. }
  13270. if (isIdentToken(token)) {
  13271. switch (token.value) {
  13272. case 'bold':
  13273. return 700;
  13274. case 'normal':
  13275. default:
  13276. return 400;}
  13277. }
  13278. return 400;
  13279. } };
  13280. var fontVariant = {
  13281. name: 'font-variant',
  13282. initialValue: 'none',
  13283. type: PropertyDescriptorParsingType.LIST,
  13284. prefix: false,
  13285. parse: function parse(tokens) {
  13286. return tokens.filter(isIdentToken).map(function (token) {return token.value;});
  13287. } };
  13288. var FONT_STYLE;
  13289. (function (FONT_STYLE) {
  13290. FONT_STYLE["NORMAL"] = "normal";
  13291. FONT_STYLE["ITALIC"] = "italic";
  13292. FONT_STYLE["OBLIQUE"] = "oblique";
  13293. })(FONT_STYLE || (FONT_STYLE = {}));
  13294. var fontStyle = {
  13295. name: 'font-style',
  13296. initialValue: 'normal',
  13297. prefix: false,
  13298. type: PropertyDescriptorParsingType.IDENT_VALUE,
  13299. parse: function parse(overflow) {
  13300. switch (overflow) {
  13301. case 'oblique':
  13302. return FONT_STYLE.OBLIQUE;
  13303. case 'italic':
  13304. return FONT_STYLE.ITALIC;
  13305. case 'normal':
  13306. default:
  13307. return FONT_STYLE.NORMAL;}
  13308. } };
  13309. var contains = function contains(bit, value) {return (bit & value) !== 0;};
  13310. var content = {
  13311. name: 'content',
  13312. initialValue: 'none',
  13313. type: PropertyDescriptorParsingType.LIST,
  13314. prefix: false,
  13315. parse: function parse(tokens) {
  13316. if (tokens.length === 0) {
  13317. return [];
  13318. }
  13319. var first = tokens[0];
  13320. if (first.type === TokenType.IDENT_TOKEN && first.value === 'none') {
  13321. return [];
  13322. }
  13323. return tokens;
  13324. } };
  13325. var counterIncrement = {
  13326. name: 'counter-increment',
  13327. initialValue: 'none',
  13328. prefix: true,
  13329. type: PropertyDescriptorParsingType.LIST,
  13330. parse: function parse(tokens) {
  13331. if (tokens.length === 0) {
  13332. return null;
  13333. }
  13334. var first = tokens[0];
  13335. if (first.type === TokenType.IDENT_TOKEN && first.value === 'none') {
  13336. return null;
  13337. }
  13338. var increments = [];
  13339. var filtered = tokens.filter(nonWhiteSpace);
  13340. for (var i = 0; i < filtered.length; i++) {
  13341. var counter = filtered[i];
  13342. var next = filtered[i + 1];
  13343. if (counter.type === TokenType.IDENT_TOKEN) {
  13344. var increment = next && isNumberToken(next) ? next.number : 1;
  13345. increments.push({ counter: counter.value, increment: increment });
  13346. }
  13347. }
  13348. return increments;
  13349. } };
  13350. var counterReset = {
  13351. name: 'counter-reset',
  13352. initialValue: 'none',
  13353. prefix: true,
  13354. type: PropertyDescriptorParsingType.LIST,
  13355. parse: function parse(tokens) {
  13356. if (tokens.length === 0) {
  13357. return [];
  13358. }
  13359. var resets = [];
  13360. var filtered = tokens.filter(nonWhiteSpace);
  13361. for (var i = 0; i < filtered.length; i++) {
  13362. var counter = filtered[i];
  13363. var next = filtered[i + 1];
  13364. if (isIdentToken(counter) && counter.value !== 'none') {
  13365. var reset = next && isNumberToken(next) ? next.number : 0;
  13366. resets.push({ counter: counter.value, reset: reset });
  13367. }
  13368. }
  13369. return resets;
  13370. } };
  13371. var quotes = {
  13372. name: 'quotes',
  13373. initialValue: 'none',
  13374. prefix: true,
  13375. type: PropertyDescriptorParsingType.LIST,
  13376. parse: function parse(tokens) {
  13377. if (tokens.length === 0) {
  13378. return null;
  13379. }
  13380. var first = tokens[0];
  13381. if (first.type === TokenType.IDENT_TOKEN && first.value === 'none') {
  13382. return null;
  13383. }
  13384. var quotes = [];
  13385. var filtered = tokens.filter(isStringToken);
  13386. if (filtered.length % 2 !== 0) {
  13387. return null;
  13388. }
  13389. for (var i = 0; i < filtered.length; i += 2) {
  13390. var open_1 = filtered[i].value;
  13391. var close_1 = filtered[i + 1].value;
  13392. quotes.push({ open: open_1, close: close_1 });
  13393. }
  13394. return quotes;
  13395. } };
  13396. var getQuote = function getQuote(quotes, depth, open) {
  13397. if (!quotes) {
  13398. return '';
  13399. }
  13400. var quote = quotes[Math.min(depth, quotes.length - 1)];
  13401. if (!quote) {
  13402. return '';
  13403. }
  13404. return open ? quote.open : quote.close;
  13405. };
  13406. var boxShadow = {
  13407. name: 'box-shadow',
  13408. initialValue: 'none',
  13409. type: PropertyDescriptorParsingType.LIST,
  13410. prefix: false,
  13411. parse: function parse(tokens) {
  13412. if (tokens.length === 1 && isIdentWithValue(tokens[0], 'none')) {
  13413. return [];
  13414. }
  13415. return parseFunctionArgs(tokens).map(function (values) {
  13416. var shadow = {
  13417. color: 0x000000ff,
  13418. offsetX: ZERO_LENGTH,
  13419. offsetY: ZERO_LENGTH,
  13420. blur: ZERO_LENGTH,
  13421. spread: ZERO_LENGTH,
  13422. inset: false };
  13423. var c = 0;
  13424. for (var i = 0; i < values.length; i++) {
  13425. var token = values[i];
  13426. if (isIdentWithValue(token, 'inset')) {
  13427. shadow.inset = true;
  13428. } else
  13429. if (isLength(token)) {
  13430. if (c === 0) {
  13431. shadow.offsetX = token;
  13432. } else
  13433. if (c === 1) {
  13434. shadow.offsetY = token;
  13435. } else
  13436. if (c === 2) {
  13437. shadow.blur = token;
  13438. } else
  13439. {
  13440. shadow.spread = token;
  13441. }
  13442. c++;
  13443. } else
  13444. {
  13445. shadow.color = color.parse(token);
  13446. }
  13447. }
  13448. return shadow;
  13449. });
  13450. } };
  13451. var CSSParsedDeclaration = /** @class */function () {
  13452. function CSSParsedDeclaration(declaration) {
  13453. this.backgroundClip = parse(backgroundClip, declaration.backgroundClip);
  13454. this.backgroundColor = parse(backgroundColor, declaration.backgroundColor);
  13455. this.backgroundImage = parse(backgroundImage, declaration.backgroundImage);
  13456. this.backgroundOrigin = parse(backgroundOrigin, declaration.backgroundOrigin);
  13457. this.backgroundPosition = parse(backgroundPosition, declaration.backgroundPosition);
  13458. this.backgroundRepeat = parse(backgroundRepeat, declaration.backgroundRepeat);
  13459. this.backgroundSize = parse(backgroundSize, declaration.backgroundSize);
  13460. this.borderTopColor = parse(borderTopColor, declaration.borderTopColor);
  13461. this.borderRightColor = parse(borderRightColor, declaration.borderRightColor);
  13462. this.borderBottomColor = parse(borderBottomColor, declaration.borderBottomColor);
  13463. this.borderLeftColor = parse(borderLeftColor, declaration.borderLeftColor);
  13464. this.borderTopLeftRadius = parse(borderTopLeftRadius, declaration.borderTopLeftRadius);
  13465. this.borderTopRightRadius = parse(borderTopRightRadius, declaration.borderTopRightRadius);
  13466. this.borderBottomRightRadius = parse(borderBottomRightRadius, declaration.borderBottomRightRadius);
  13467. this.borderBottomLeftRadius = parse(borderBottomLeftRadius, declaration.borderBottomLeftRadius);
  13468. this.borderTopStyle = parse(borderTopStyle, declaration.borderTopStyle);
  13469. this.borderRightStyle = parse(borderRightStyle, declaration.borderRightStyle);
  13470. this.borderBottomStyle = parse(borderBottomStyle, declaration.borderBottomStyle);
  13471. this.borderLeftStyle = parse(borderLeftStyle, declaration.borderLeftStyle);
  13472. this.borderTopWidth = parse(borderTopWidth, declaration.borderTopWidth);
  13473. this.borderRightWidth = parse(borderRightWidth, declaration.borderRightWidth);
  13474. this.borderBottomWidth = parse(borderBottomWidth, declaration.borderBottomWidth);
  13475. this.borderLeftWidth = parse(borderLeftWidth, declaration.borderLeftWidth);
  13476. this.boxShadow = parse(boxShadow, declaration.boxShadow);
  13477. this.color = parse(color$1, declaration.color);
  13478. this.display = parse(display, declaration.display);
  13479. this.float = parse(_float, declaration.cssFloat);
  13480. this.fontFamily = parse(fontFamily, declaration.fontFamily);
  13481. this.fontSize = parse(fontSize, declaration.fontSize);
  13482. this.fontStyle = parse(fontStyle, declaration.fontStyle);
  13483. this.fontVariant = parse(fontVariant, declaration.fontVariant);
  13484. this.fontWeight = parse(fontWeight, declaration.fontWeight);
  13485. this.letterSpacing = parse(letterSpacing, declaration.letterSpacing);
  13486. this.lineBreak = parse(lineBreak, declaration.lineBreak);
  13487. this.lineHeight = parse(lineHeight, declaration.lineHeight);
  13488. this.listStyleImage = parse(listStyleImage, declaration.listStyleImage);
  13489. this.listStylePosition = parse(listStylePosition, declaration.listStylePosition);
  13490. this.listStyleType = parse(listStyleType, declaration.listStyleType);
  13491. this.marginTop = parse(marginTop, declaration.marginTop);
  13492. this.marginRight = parse(marginRight, declaration.marginRight);
  13493. this.marginBottom = parse(marginBottom, declaration.marginBottom);
  13494. this.marginLeft = parse(marginLeft, declaration.marginLeft);
  13495. this.opacity = parse(opacity, declaration.opacity);
  13496. var overflowTuple = parse(overflow, declaration.overflow);
  13497. this.overflowX = overflowTuple[0];
  13498. this.overflowY = overflowTuple[overflowTuple.length > 1 ? 1 : 0];
  13499. this.overflowWrap = parse(overflowWrap, declaration.overflowWrap);
  13500. this.paddingTop = parse(paddingTop, declaration.paddingTop);
  13501. this.paddingRight = parse(paddingRight, declaration.paddingRight);
  13502. this.paddingBottom = parse(paddingBottom, declaration.paddingBottom);
  13503. this.paddingLeft = parse(paddingLeft, declaration.paddingLeft);
  13504. this.position = parse(position, declaration.position);
  13505. this.textAlign = parse(textAlign, declaration.textAlign);
  13506. this.textDecorationColor = parse(textDecorationColor, declaration.textDecorationColor || declaration.color);
  13507. this.textDecorationLine = parse(textDecorationLine, declaration.textDecorationLine);
  13508. this.textShadow = parse(textShadow, declaration.textShadow);
  13509. this.textTransform = parse(textTransform, declaration.textTransform);
  13510. this.transform = parse(transform, declaration.transform);
  13511. this.transformOrigin = parse(transformOrigin, declaration.transformOrigin);
  13512. this.visibility = parse(visibility, declaration.visibility);
  13513. this.wordBreak = parse(wordBreak, declaration.wordBreak);
  13514. this.zIndex = parse(zIndex, declaration.zIndex);
  13515. }
  13516. CSSParsedDeclaration.prototype.isVisible = function () {
  13517. return this.display > 0 && this.opacity > 0 && this.visibility === VISIBILITY.VISIBLE;
  13518. };
  13519. CSSParsedDeclaration.prototype.isTransparent = function () {
  13520. return isTransparent(this.backgroundColor);
  13521. };
  13522. CSSParsedDeclaration.prototype.isTransformed = function () {
  13523. return this.transform !== null;
  13524. };
  13525. CSSParsedDeclaration.prototype.isPositioned = function () {
  13526. return this.position !== POSITION.STATIC;
  13527. };
  13528. CSSParsedDeclaration.prototype.isPositionedWithZIndex = function () {
  13529. return this.isPositioned() && !this.zIndex.auto;
  13530. };
  13531. CSSParsedDeclaration.prototype.isFloating = function () {
  13532. return this.float !== FLOAT.NONE;
  13533. };
  13534. CSSParsedDeclaration.prototype.isInlineLevel = function () {
  13535. return contains(this.display, 4 /* INLINE */) ||
  13536. contains(this.display, 33554432 /* INLINE_BLOCK */) ||
  13537. contains(this.display, 268435456 /* INLINE_FLEX */) ||
  13538. contains(this.display, 536870912 /* INLINE_GRID */) ||
  13539. contains(this.display, 67108864 /* INLINE_LIST_ITEM */) ||
  13540. contains(this.display, 134217728 /* INLINE_TABLE */);
  13541. };
  13542. return CSSParsedDeclaration;
  13543. }();
  13544. var CSSParsedPseudoDeclaration = /** @class */function () {
  13545. function CSSParsedPseudoDeclaration(declaration) {
  13546. this.content = parse(content, declaration.content);
  13547. this.quotes = parse(quotes, declaration.quotes);
  13548. }
  13549. return CSSParsedPseudoDeclaration;
  13550. }();
  13551. var CSSParsedCounterDeclaration = /** @class */function () {
  13552. function CSSParsedCounterDeclaration(declaration) {
  13553. this.counterIncrement = parse(counterIncrement, declaration.counterIncrement);
  13554. this.counterReset = parse(counterReset, declaration.counterReset);
  13555. }
  13556. return CSSParsedCounterDeclaration;
  13557. }();
  13558. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  13559. var parse = function parse(descriptor, style) {
  13560. var tokenizer = new Tokenizer();
  13561. var value = style !== null && typeof style !== 'undefined' ? style.toString() : descriptor.initialValue;
  13562. tokenizer.write(value);
  13563. var parser = new Parser(tokenizer.read());
  13564. switch (descriptor.type) {
  13565. case PropertyDescriptorParsingType.IDENT_VALUE:
  13566. var token = parser.parseComponentValue();
  13567. return descriptor.parse(isIdentToken(token) ? token.value : descriptor.initialValue);
  13568. case PropertyDescriptorParsingType.VALUE:
  13569. return descriptor.parse(parser.parseComponentValue());
  13570. case PropertyDescriptorParsingType.LIST:
  13571. return descriptor.parse(parser.parseComponentValues());
  13572. case PropertyDescriptorParsingType.TOKEN_VALUE:
  13573. return parser.parseComponentValue();
  13574. case PropertyDescriptorParsingType.TYPE_VALUE:
  13575. switch (descriptor.format) {
  13576. case 'angle':
  13577. return angle.parse(parser.parseComponentValue());
  13578. case 'color':
  13579. return color.parse(parser.parseComponentValue());
  13580. case 'image':
  13581. return image.parse(parser.parseComponentValue());
  13582. case 'length':
  13583. var length_1 = parser.parseComponentValue();
  13584. return isLength(length_1) ? length_1 : ZERO_LENGTH;
  13585. case 'length-percentage':
  13586. var value_1 = parser.parseComponentValue();
  13587. return isLengthPercentage(value_1) ? value_1 : ZERO_LENGTH;}}
  13588. throw new Error("Attempting to parse unsupported css format type " + descriptor.format);
  13589. };
  13590. var ElementContainer = /** @class */function () {
  13591. function ElementContainer(element) {
  13592. this.styles = new CSSParsedDeclaration(window.getComputedStyle(element, null));
  13593. this.textNodes = [];
  13594. this.elements = [];
  13595. if (this.styles.transform !== null && isHTMLElementNode(element)) {
  13596. // getBoundingClientRect takes transforms into account
  13597. element.style.transform = 'none';
  13598. }
  13599. this.bounds = parseBounds(element);
  13600. this.flags = 0;
  13601. }
  13602. return ElementContainer;
  13603. }();
  13604. var TextBounds = /** @class */function () {
  13605. function TextBounds(text, bounds) {
  13606. this.text = text;
  13607. this.bounds = bounds;
  13608. }
  13609. return TextBounds;
  13610. }();
  13611. var parseTextBounds = function parseTextBounds(value, styles, node) {
  13612. var textList = breakText(value, styles);
  13613. var textBounds = [];
  13614. var offset = 0;
  13615. textList.forEach(function (text) {
  13616. if (styles.textDecorationLine.length || text.trim().length > 0) {
  13617. if (FEATURES.SUPPORT_RANGE_BOUNDS) {
  13618. textBounds.push(new TextBounds(text, getRangeBounds(node, offset, text.length)));
  13619. } else
  13620. {
  13621. var replacementNode = node.splitText(text.length);
  13622. textBounds.push(new TextBounds(text, getWrapperBounds(node)));
  13623. node = replacementNode;
  13624. }
  13625. } else
  13626. if (!FEATURES.SUPPORT_RANGE_BOUNDS) {
  13627. node = node.splitText(text.length);
  13628. }
  13629. offset += text.length;
  13630. });
  13631. return textBounds;
  13632. };
  13633. var getWrapperBounds = function getWrapperBounds(node) {
  13634. var ownerDocument = node.ownerDocument;
  13635. if (ownerDocument) {
  13636. var wrapper = ownerDocument.createElement('html2canvaswrapper');
  13637. wrapper.appendChild(node.cloneNode(true));
  13638. var parentNode = node.parentNode;
  13639. if (parentNode) {
  13640. parentNode.replaceChild(wrapper, node);
  13641. var bounds = parseBounds(wrapper);
  13642. if (wrapper.firstChild) {
  13643. parentNode.replaceChild(wrapper.firstChild, wrapper);
  13644. }
  13645. return bounds;
  13646. }
  13647. }
  13648. return new Bounds(0, 0, 0, 0);
  13649. };
  13650. var getRangeBounds = function getRangeBounds(node, offset, length) {
  13651. var ownerDocument = node.ownerDocument;
  13652. if (!ownerDocument) {
  13653. throw new Error('Node has no owner document');
  13654. }
  13655. var range = ownerDocument.createRange();
  13656. range.setStart(node, offset);
  13657. range.setEnd(node, offset + length);
  13658. return Bounds.fromClientRect(range.getBoundingClientRect());
  13659. };
  13660. var breakText = function breakText(value, styles) {
  13661. return styles.letterSpacing !== 0 ? toCodePoints(value).map(function (i) {return fromCodePoint(i);}) : breakWords(value, styles);
  13662. };
  13663. var breakWords = function breakWords(str, styles) {
  13664. var breaker = LineBreaker(str, {
  13665. lineBreak: styles.lineBreak,
  13666. wordBreak: styles.overflowWrap === OVERFLOW_WRAP.BREAK_WORD ? 'break-word' : styles.wordBreak });
  13667. var words = [];
  13668. var bk;
  13669. while (!(bk = breaker.next()).done) {
  13670. if (bk.value) {
  13671. words.push(bk.value.slice());
  13672. }
  13673. }
  13674. return words;
  13675. };
  13676. var TextContainer = /** @class */function () {
  13677. function TextContainer(node, styles) {
  13678. this.text = transform$1(node.data, styles.textTransform);
  13679. this.textBounds = parseTextBounds(this.text, styles, node);
  13680. }
  13681. return TextContainer;
  13682. }();
  13683. var transform$1 = function transform$1(text, transform) {
  13684. switch (transform) {
  13685. case TEXT_TRANSFORM.LOWERCASE:
  13686. return text.toLowerCase();
  13687. case TEXT_TRANSFORM.CAPITALIZE:
  13688. return text.replace(CAPITALIZE, capitalize);
  13689. case TEXT_TRANSFORM.UPPERCASE:
  13690. return text.toUpperCase();
  13691. default:
  13692. return text;}
  13693. };
  13694. var CAPITALIZE = /(^|\s|:|-|\(|\))([a-z])/g;
  13695. var capitalize = function capitalize(m, p1, p2) {
  13696. if (m.length > 0) {
  13697. return p1 + p2.toUpperCase();
  13698. }
  13699. return m;
  13700. };
  13701. var ImageElementContainer = /** @class */function (_super) {
  13702. __extends(ImageElementContainer, _super);
  13703. function ImageElementContainer(img) {
  13704. var _this = _super.call(this, img) || this;
  13705. _this.src = img.currentSrc || img.src;
  13706. _this.intrinsicWidth = img.naturalWidth;
  13707. _this.intrinsicHeight = img.naturalHeight;
  13708. CacheStorage.getInstance().addImage(_this.src);
  13709. return _this;
  13710. }
  13711. return ImageElementContainer;
  13712. }(ElementContainer);
  13713. var CanvasElementContainer = /** @class */function (_super) {
  13714. __extends(CanvasElementContainer, _super);
  13715. function CanvasElementContainer(canvas) {
  13716. var _this = _super.call(this, canvas) || this;
  13717. _this.canvas = canvas;
  13718. _this.intrinsicWidth = canvas.width;
  13719. _this.intrinsicHeight = canvas.height;
  13720. return _this;
  13721. }
  13722. return CanvasElementContainer;
  13723. }(ElementContainer);
  13724. var SVGElementContainer = /** @class */function (_super) {
  13725. __extends(SVGElementContainer, _super);
  13726. function SVGElementContainer(img) {
  13727. var _this = _super.call(this, img) || this;
  13728. var s = new XMLSerializer();
  13729. _this.svg = "data:image/svg+xml," + encodeURIComponent(s.serializeToString(img));
  13730. _this.intrinsicWidth = img.width.baseVal.value;
  13731. _this.intrinsicHeight = img.height.baseVal.value;
  13732. CacheStorage.getInstance().addImage(_this.svg);
  13733. return _this;
  13734. }
  13735. return SVGElementContainer;
  13736. }(ElementContainer);
  13737. var LIElementContainer = /** @class */function (_super) {
  13738. __extends(LIElementContainer, _super);
  13739. function LIElementContainer(element) {
  13740. var _this = _super.call(this, element) || this;
  13741. _this.value = element.value;
  13742. return _this;
  13743. }
  13744. return LIElementContainer;
  13745. }(ElementContainer);
  13746. var OLElementContainer = /** @class */function (_super) {
  13747. __extends(OLElementContainer, _super);
  13748. function OLElementContainer(element) {
  13749. var _this = _super.call(this, element) || this;
  13750. _this.start = element.start;
  13751. _this.reversed = typeof element.reversed === 'boolean' && element.reversed === true;
  13752. return _this;
  13753. }
  13754. return OLElementContainer;
  13755. }(ElementContainer);
  13756. var CHECKBOX_BORDER_RADIUS = [
  13757. {
  13758. type: TokenType.DIMENSION_TOKEN,
  13759. flags: 0,
  13760. unit: 'px',
  13761. number: 3 }];
  13762. var RADIO_BORDER_RADIUS = [
  13763. {
  13764. type: TokenType.PERCENTAGE_TOKEN,
  13765. flags: 0,
  13766. number: 50 }];
  13767. var reformatInputBounds = function reformatInputBounds(bounds) {
  13768. if (bounds.width > bounds.height) {
  13769. return new Bounds(bounds.left + (bounds.width - bounds.height) / 2, bounds.top, bounds.height, bounds.height);
  13770. } else
  13771. if (bounds.width < bounds.height) {
  13772. return new Bounds(bounds.left, bounds.top + (bounds.height - bounds.width) / 2, bounds.width, bounds.width);
  13773. }
  13774. return bounds;
  13775. };
  13776. var getInputValue = function getInputValue(node) {
  13777. var value = node.type === PASSWORD ? new Array(node.value.length + 1).join("\u2022") : node.value;
  13778. return value.length === 0 ? node.placeholder || '' : value;
  13779. };
  13780. var CHECKBOX = 'checkbox';
  13781. var RADIO = 'radio';
  13782. var PASSWORD = 'password';
  13783. var INPUT_COLOR = 0x2a2a2aff;
  13784. var InputElementContainer = /** @class */function (_super) {
  13785. __extends(InputElementContainer, _super);
  13786. function InputElementContainer(input) {
  13787. var _this = _super.call(this, input) || this;
  13788. _this.type = input.type.toLowerCase();
  13789. _this.checked = input.checked;
  13790. _this.value = getInputValue(input);
  13791. if (_this.type === CHECKBOX || _this.type === RADIO) {
  13792. _this.styles.backgroundColor = 0xdededeff;
  13793. _this.styles.borderTopColor = _this.styles.borderRightColor = _this.styles.borderBottomColor = _this.styles.borderLeftColor = 0xa5a5a5ff;
  13794. _this.styles.borderTopWidth = _this.styles.borderRightWidth = _this.styles.borderBottomWidth = _this.styles.borderLeftWidth = 1;
  13795. _this.styles.borderTopStyle = _this.styles.borderRightStyle = _this.styles.borderBottomStyle = _this.styles.borderLeftStyle =
  13796. BORDER_STYLE.SOLID;
  13797. _this.styles.backgroundClip = [BACKGROUND_CLIP.BORDER_BOX];
  13798. _this.styles.backgroundOrigin = [0 /* BORDER_BOX */];
  13799. _this.bounds = reformatInputBounds(_this.bounds);
  13800. }
  13801. switch (_this.type) {
  13802. case CHECKBOX:
  13803. _this.styles.borderTopRightRadius = _this.styles.borderTopLeftRadius = _this.styles.borderBottomRightRadius = _this.styles.borderBottomLeftRadius = CHECKBOX_BORDER_RADIUS;
  13804. break;
  13805. case RADIO:
  13806. _this.styles.borderTopRightRadius = _this.styles.borderTopLeftRadius = _this.styles.borderBottomRightRadius = _this.styles.borderBottomLeftRadius = RADIO_BORDER_RADIUS;
  13807. break;}
  13808. return _this;
  13809. }
  13810. return InputElementContainer;
  13811. }(ElementContainer);
  13812. var SelectElementContainer = /** @class */function (_super) {
  13813. __extends(SelectElementContainer, _super);
  13814. function SelectElementContainer(element) {
  13815. var _this = _super.call(this, element) || this;
  13816. var option = element.options[element.selectedIndex || 0];
  13817. _this.value = option ? option.text || '' : '';
  13818. return _this;
  13819. }
  13820. return SelectElementContainer;
  13821. }(ElementContainer);
  13822. var TextareaElementContainer = /** @class */function (_super) {
  13823. __extends(TextareaElementContainer, _super);
  13824. function TextareaElementContainer(element) {
  13825. var _this = _super.call(this, element) || this;
  13826. _this.value = element.value;
  13827. return _this;
  13828. }
  13829. return TextareaElementContainer;
  13830. }(ElementContainer);
  13831. var parseColor = function parseColor(value) {return color.parse(Parser.create(value).parseComponentValue());};
  13832. var IFrameElementContainer = /** @class */function (_super) {
  13833. __extends(IFrameElementContainer, _super);
  13834. function IFrameElementContainer(iframe) {
  13835. var _this = _super.call(this, iframe) || this;
  13836. _this.src = iframe.src;
  13837. _this.width = parseInt(iframe.width, 10) || 0;
  13838. _this.height = parseInt(iframe.height, 10) || 0;
  13839. _this.backgroundColor = _this.styles.backgroundColor;
  13840. try {
  13841. if (iframe.contentWindow &&
  13842. iframe.contentWindow.document &&
  13843. iframe.contentWindow.document.documentElement) {
  13844. _this.tree = parseTree(iframe.contentWindow.document.documentElement);
  13845. // http://www.w3.org/TR/css3-background/#special-backgrounds
  13846. var documentBackgroundColor = iframe.contentWindow.document.documentElement ?
  13847. parseColor(getComputedStyle(iframe.contentWindow.document.documentElement).
  13848. backgroundColor) :
  13849. COLORS.TRANSPARENT;
  13850. var bodyBackgroundColor = iframe.contentWindow.document.body ?
  13851. parseColor(getComputedStyle(iframe.contentWindow.document.body).backgroundColor) :
  13852. COLORS.TRANSPARENT;
  13853. _this.backgroundColor = isTransparent(documentBackgroundColor) ?
  13854. isTransparent(bodyBackgroundColor) ?
  13855. _this.styles.backgroundColor :
  13856. bodyBackgroundColor :
  13857. documentBackgroundColor;
  13858. }
  13859. }
  13860. catch (e) {}
  13861. return _this;
  13862. }
  13863. return IFrameElementContainer;
  13864. }(ElementContainer);
  13865. var LIST_OWNERS = ['OL', 'UL', 'MENU'];
  13866. var parseNodeTree = function parseNodeTree(node, parent, root) {
  13867. for (var childNode = node.firstChild, nextNode = void 0; childNode; childNode = nextNode) {
  13868. nextNode = childNode.nextSibling;
  13869. if (isTextNode(childNode) && childNode.data.trim().length > 0) {
  13870. parent.textNodes.push(new TextContainer(childNode, parent.styles));
  13871. } else
  13872. if (isElementNode(childNode)) {
  13873. var container = createContainer(childNode);
  13874. if (container.styles.isVisible()) {
  13875. if (createsRealStackingContext(childNode, container, root)) {
  13876. container.flags |= 4 /* CREATES_REAL_STACKING_CONTEXT */;
  13877. } else
  13878. if (createsStackingContext(container.styles)) {
  13879. container.flags |= 2 /* CREATES_STACKING_CONTEXT */;
  13880. }
  13881. if (LIST_OWNERS.indexOf(childNode.tagName) !== -1) {
  13882. container.flags |= 8 /* IS_LIST_OWNER */;
  13883. }
  13884. parent.elements.push(container);
  13885. if (!isTextareaElement(childNode) && !isSVGElement(childNode) && !isSelectElement(childNode)) {
  13886. parseNodeTree(childNode, container, root);
  13887. }
  13888. }
  13889. }
  13890. }
  13891. };
  13892. var createContainer = function createContainer(element) {
  13893. if (isImageElement(element)) {
  13894. return new ImageElementContainer(element);
  13895. }
  13896. if (isCanvasElement(element)) {
  13897. return new CanvasElementContainer(element);
  13898. }
  13899. if (isSVGElement(element)) {
  13900. return new SVGElementContainer(element);
  13901. }
  13902. if (isLIElement(element)) {
  13903. return new LIElementContainer(element);
  13904. }
  13905. if (isOLElement(element)) {
  13906. return new OLElementContainer(element);
  13907. }
  13908. if (isInputElement(element)) {
  13909. return new InputElementContainer(element);
  13910. }
  13911. if (isSelectElement(element)) {
  13912. return new SelectElementContainer(element);
  13913. }
  13914. if (isTextareaElement(element)) {
  13915. return new TextareaElementContainer(element);
  13916. }
  13917. if (isIFrameElement(element)) {
  13918. return new IFrameElementContainer(element);
  13919. }
  13920. return new ElementContainer(element);
  13921. };
  13922. var parseTree = function parseTree(element) {
  13923. var container = createContainer(element);
  13924. container.flags |= 4 /* CREATES_REAL_STACKING_CONTEXT */;
  13925. parseNodeTree(element, container, container);
  13926. return container;
  13927. };
  13928. var createsRealStackingContext = function createsRealStackingContext(node, container, root) {
  13929. return container.styles.isPositionedWithZIndex() ||
  13930. container.styles.opacity < 1 ||
  13931. container.styles.isTransformed() ||
  13932. isBodyElement(node) && root.styles.isTransparent();
  13933. };
  13934. var createsStackingContext = function createsStackingContext(styles) {return styles.isPositioned() || styles.isFloating();};
  13935. var isTextNode = function isTextNode(node) {return node.nodeType === Node.TEXT_NODE;};
  13936. var isElementNode = function isElementNode(node) {return node.nodeType === Node.ELEMENT_NODE;};
  13937. var isHTMLElementNode = function isHTMLElementNode(node) {
  13938. return typeof node.style !== 'undefined';
  13939. };
  13940. var isLIElement = function isLIElement(node) {return node.tagName === 'LI';};
  13941. var isOLElement = function isOLElement(node) {return node.tagName === 'OL';};
  13942. var isInputElement = function isInputElement(node) {return node.tagName === 'INPUT';};
  13943. var isHTMLElement = function isHTMLElement(node) {return node.tagName === 'HTML';};
  13944. var isSVGElement = function isSVGElement(node) {return node.tagName === 'svg';};
  13945. var isBodyElement = function isBodyElement(node) {return node.tagName === 'BODY';};
  13946. var isCanvasElement = function isCanvasElement(node) {return node.tagName === 'CANVAS';};
  13947. var isImageElement = function isImageElement(node) {return node.tagName === 'IMG';};
  13948. var isIFrameElement = function isIFrameElement(node) {return node.tagName === 'IFRAME';};
  13949. var isStyleElement = function isStyleElement(node) {return node.tagName === 'STYLE';};
  13950. var isScriptElement = function isScriptElement(node) {return node.tagName === 'SCRIPT';};
  13951. var isTextareaElement = function isTextareaElement(node) {return node.tagName === 'TEXTAREA';};
  13952. var isSelectElement = function isSelectElement(node) {return node.tagName === 'SELECT';};
  13953. var CounterState = /** @class */function () {
  13954. function CounterState() {
  13955. this.counters = {};
  13956. }
  13957. CounterState.prototype.getCounterValue = function (name) {
  13958. var counter = this.counters[name];
  13959. if (counter && counter.length) {
  13960. return counter[counter.length - 1];
  13961. }
  13962. return 1;
  13963. };
  13964. CounterState.prototype.getCounterValues = function (name) {
  13965. var counter = this.counters[name];
  13966. return counter ? counter : [];
  13967. };
  13968. CounterState.prototype.pop = function (counters) {
  13969. var _this = this;
  13970. counters.forEach(function (counter) {return _this.counters[counter].pop();});
  13971. };
  13972. CounterState.prototype.parse = function (style) {
  13973. var _this = this;
  13974. var counterIncrement = style.counterIncrement;
  13975. var counterReset = style.counterReset;
  13976. var canReset = true;
  13977. if (counterIncrement !== null) {
  13978. counterIncrement.forEach(function (entry) {
  13979. var counter = _this.counters[entry.counter];
  13980. if (counter && entry.increment !== 0) {
  13981. canReset = false;
  13982. counter[Math.max(0, counter.length - 1)] += entry.increment;
  13983. }
  13984. });
  13985. }
  13986. var counterNames = [];
  13987. if (canReset) {
  13988. counterReset.forEach(function (entry) {
  13989. var counter = _this.counters[entry.counter];
  13990. counterNames.push(entry.counter);
  13991. if (!counter) {
  13992. counter = _this.counters[entry.counter] = [];
  13993. }
  13994. counter.push(entry.reset);
  13995. });
  13996. }
  13997. return counterNames;
  13998. };
  13999. return CounterState;
  14000. }();
  14001. var ROMAN_UPPER = {
  14002. integers: [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1],
  14003. values: ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'] };
  14004. var ARMENIAN = {
  14005. integers: [
  14006. 9000,
  14007. 8000,
  14008. 7000,
  14009. 6000,
  14010. 5000,
  14011. 4000,
  14012. 3000,
  14013. 2000,
  14014. 1000,
  14015. 900,
  14016. 800,
  14017. 700,
  14018. 600,
  14019. 500,
  14020. 400,
  14021. 300,
  14022. 200,
  14023. 100,
  14024. 90,
  14025. 80,
  14026. 70,
  14027. 60,
  14028. 50,
  14029. 40,
  14030. 30,
  14031. 20,
  14032. 10,
  14033. 9,
  14034. 8,
  14035. 7,
  14036. 6,
  14037. 5,
  14038. 4,
  14039. 3,
  14040. 2,
  14041. 1],
  14042. values: [
  14043. 'Ք',
  14044. 'Փ',
  14045. 'Ւ',
  14046. 'Ց',
  14047. 'Ր',
  14048. 'Տ',
  14049. 'Վ',
  14050. 'Ս',
  14051. 'Ռ',
  14052. 'Ջ',
  14053. 'Պ',
  14054. 'Չ',
  14055. 'Ո',
  14056. 'Շ',
  14057. 'Ն',
  14058. 'Յ',
  14059. 'Մ',
  14060. 'Ճ',
  14061. 'Ղ',
  14062. 'Ձ',
  14063. 'Հ',
  14064. 'Կ',
  14065. 'Ծ',
  14066. 'Խ',
  14067. 'Լ',
  14068. 'Ի',
  14069. 'Ժ',
  14070. 'Թ',
  14071. 'Ը',
  14072. 'Է',
  14073. 'Զ',
  14074. 'Ե',
  14075. 'Դ',
  14076. 'Գ',
  14077. 'Բ',
  14078. 'Ա'] };
  14079. var HEBREW = {
  14080. integers: [
  14081. 10000,
  14082. 9000,
  14083. 8000,
  14084. 7000,
  14085. 6000,
  14086. 5000,
  14087. 4000,
  14088. 3000,
  14089. 2000,
  14090. 1000,
  14091. 400,
  14092. 300,
  14093. 200,
  14094. 100,
  14095. 90,
  14096. 80,
  14097. 70,
  14098. 60,
  14099. 50,
  14100. 40,
  14101. 30,
  14102. 20,
  14103. 19,
  14104. 18,
  14105. 17,
  14106. 16,
  14107. 15,
  14108. 10,
  14109. 9,
  14110. 8,
  14111. 7,
  14112. 6,
  14113. 5,
  14114. 4,
  14115. 3,
  14116. 2,
  14117. 1],
  14118. values: [
  14119. 'י׳',
  14120. 'ט׳',
  14121. 'ח׳',
  14122. 'ז׳',
  14123. 'ו׳',
  14124. 'ה׳',
  14125. 'ד׳',
  14126. 'ג׳',
  14127. 'ב׳',
  14128. 'א׳',
  14129. 'ת',
  14130. 'ש',
  14131. 'ר',
  14132. 'ק',
  14133. 'צ',
  14134. 'פ',
  14135. 'ע',
  14136. 'ס',
  14137. 'נ',
  14138. 'מ',
  14139. 'ל',
  14140. 'כ',
  14141. 'יט',
  14142. 'יח',
  14143. 'יז',
  14144. 'טז',
  14145. 'טו',
  14146. 'י',
  14147. 'ט',
  14148. 'ח',
  14149. 'ז',
  14150. 'ו',
  14151. 'ה',
  14152. 'ד',
  14153. 'ג',
  14154. 'ב',
  14155. 'א'] };
  14156. var GEORGIAN = {
  14157. integers: [
  14158. 10000,
  14159. 9000,
  14160. 8000,
  14161. 7000,
  14162. 6000,
  14163. 5000,
  14164. 4000,
  14165. 3000,
  14166. 2000,
  14167. 1000,
  14168. 900,
  14169. 800,
  14170. 700,
  14171. 600,
  14172. 500,
  14173. 400,
  14174. 300,
  14175. 200,
  14176. 100,
  14177. 90,
  14178. 80,
  14179. 70,
  14180. 60,
  14181. 50,
  14182. 40,
  14183. 30,
  14184. 20,
  14185. 10,
  14186. 9,
  14187. 8,
  14188. 7,
  14189. 6,
  14190. 5,
  14191. 4,
  14192. 3,
  14193. 2,
  14194. 1],
  14195. values: [
  14196. 'ჵ',
  14197. 'ჰ',
  14198. 'ჯ',
  14199. 'ჴ',
  14200. 'ხ',
  14201. 'ჭ',
  14202. 'წ',
  14203. 'ძ',
  14204. 'ც',
  14205. 'ჩ',
  14206. 'შ',
  14207. 'ყ',
  14208. 'ღ',
  14209. 'ქ',
  14210. 'ფ',
  14211. 'ჳ',
  14212. 'ტ',
  14213. 'ს',
  14214. 'რ',
  14215. 'ჟ',
  14216. 'პ',
  14217. 'ო',
  14218. 'ჲ',
  14219. 'ნ',
  14220. 'მ',
  14221. 'ლ',
  14222. 'კ',
  14223. 'ი',
  14224. 'თ',
  14225. 'ჱ',
  14226. 'ზ',
  14227. 'ვ',
  14228. 'ე',
  14229. 'დ',
  14230. 'გ',
  14231. 'ბ',
  14232. 'ა'] };
  14233. var createAdditiveCounter = function createAdditiveCounter(value, min, max, symbols, fallback, suffix) {
  14234. if (value < min || value > max) {
  14235. return createCounterText(value, fallback, suffix.length > 0);
  14236. }
  14237. return symbols.integers.reduce(function (string, integer, index) {
  14238. while (value >= integer) {
  14239. value -= integer;
  14240. string += symbols.values[index];
  14241. }
  14242. return string;
  14243. }, '') + suffix;
  14244. };
  14245. var createCounterStyleWithSymbolResolver = function createCounterStyleWithSymbolResolver(value, codePointRangeLength, isNumeric, resolver) {
  14246. var string = '';
  14247. do {
  14248. if (!isNumeric) {
  14249. value--;
  14250. }
  14251. string = resolver(value) + string;
  14252. value /= codePointRangeLength;
  14253. } while (value * codePointRangeLength >= codePointRangeLength);
  14254. return string;
  14255. };
  14256. var createCounterStyleFromRange = function createCounterStyleFromRange(value, codePointRangeStart, codePointRangeEnd, isNumeric, suffix) {
  14257. var codePointRangeLength = codePointRangeEnd - codePointRangeStart + 1;
  14258. return (value < 0 ? '-' : '') + (
  14259. createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, isNumeric, function (codePoint) {
  14260. return fromCodePoint(Math.floor(codePoint % codePointRangeLength) + codePointRangeStart);
  14261. }) +
  14262. suffix);
  14263. };
  14264. var createCounterStyleFromSymbols = function createCounterStyleFromSymbols(value, symbols, suffix) {
  14265. if (suffix === void 0) {suffix = '. ';}
  14266. var codePointRangeLength = symbols.length;
  14267. return createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, false, function (codePoint) {return symbols[Math.floor(codePoint % codePointRangeLength)];}) + suffix;
  14268. };
  14269. var CJK_ZEROS = 1 << 0;
  14270. var CJK_TEN_COEFFICIENTS = 1 << 1;
  14271. var CJK_TEN_HIGH_COEFFICIENTS = 1 << 2;
  14272. var CJK_HUNDRED_COEFFICIENTS = 1 << 3;
  14273. var createCJKCounter = function createCJKCounter(value, numbers, multipliers, negativeSign, suffix, flags) {
  14274. if (value < -9999 || value > 9999) {
  14275. return createCounterText(value, LIST_STYLE_TYPE.CJK_DECIMAL, suffix.length > 0);
  14276. }
  14277. var tmp = Math.abs(value);
  14278. var string = suffix;
  14279. if (tmp === 0) {
  14280. return numbers[0] + string;
  14281. }
  14282. for (var digit = 0; tmp > 0 && digit <= 4; digit++) {
  14283. var coefficient = tmp % 10;
  14284. if (coefficient === 0 && contains(flags, CJK_ZEROS) && string !== '') {
  14285. string = numbers[coefficient] + string;
  14286. } else
  14287. if (coefficient > 1 ||
  14288. coefficient === 1 && digit === 0 ||
  14289. coefficient === 1 && digit === 1 && contains(flags, CJK_TEN_COEFFICIENTS) ||
  14290. coefficient === 1 && digit === 1 && contains(flags, CJK_TEN_HIGH_COEFFICIENTS) && value > 100 ||
  14291. coefficient === 1 && digit > 1 && contains(flags, CJK_HUNDRED_COEFFICIENTS)) {
  14292. string = numbers[coefficient] + (digit > 0 ? multipliers[digit - 1] : '') + string;
  14293. } else
  14294. if (coefficient === 1 && digit > 0) {
  14295. string = multipliers[digit - 1] + string;
  14296. }
  14297. tmp = Math.floor(tmp / 10);
  14298. }
  14299. return (value < 0 ? negativeSign : '') + string;
  14300. };
  14301. var CHINESE_INFORMAL_MULTIPLIERS = '十百千萬';
  14302. var CHINESE_FORMAL_MULTIPLIERS = '拾佰仟萬';
  14303. var JAPANESE_NEGATIVE = 'マイナス';
  14304. var KOREAN_NEGATIVE = '마이너스';
  14305. var createCounterText = function createCounterText(value, type, appendSuffix) {
  14306. var defaultSuffix = appendSuffix ? '. ' : '';
  14307. var cjkSuffix = appendSuffix ? '、' : '';
  14308. var koreanSuffix = appendSuffix ? ', ' : '';
  14309. var spaceSuffix = appendSuffix ? ' ' : '';
  14310. switch (type) {
  14311. case LIST_STYLE_TYPE.DISC:
  14312. return '•' + spaceSuffix;
  14313. case LIST_STYLE_TYPE.CIRCLE:
  14314. return '◦' + spaceSuffix;
  14315. case LIST_STYLE_TYPE.SQUARE:
  14316. return '◾' + spaceSuffix;
  14317. case LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO:
  14318. var string = createCounterStyleFromRange(value, 48, 57, true, defaultSuffix);
  14319. return string.length < 4 ? "0" + string : string;
  14320. case LIST_STYLE_TYPE.CJK_DECIMAL:
  14321. return createCounterStyleFromSymbols(value, '〇一二三四五六七八九', cjkSuffix);
  14322. case LIST_STYLE_TYPE.LOWER_ROMAN:
  14323. return createAdditiveCounter(value, 1, 3999, ROMAN_UPPER, LIST_STYLE_TYPE.DECIMAL, defaultSuffix).toLowerCase();
  14324. case LIST_STYLE_TYPE.UPPER_ROMAN:
  14325. return createAdditiveCounter(value, 1, 3999, ROMAN_UPPER, LIST_STYLE_TYPE.DECIMAL, defaultSuffix);
  14326. case LIST_STYLE_TYPE.LOWER_GREEK:
  14327. return createCounterStyleFromRange(value, 945, 969, false, defaultSuffix);
  14328. case LIST_STYLE_TYPE.LOWER_ALPHA:
  14329. return createCounterStyleFromRange(value, 97, 122, false, defaultSuffix);
  14330. case LIST_STYLE_TYPE.UPPER_ALPHA:
  14331. return createCounterStyleFromRange(value, 65, 90, false, defaultSuffix);
  14332. case LIST_STYLE_TYPE.ARABIC_INDIC:
  14333. return createCounterStyleFromRange(value, 1632, 1641, true, defaultSuffix);
  14334. case LIST_STYLE_TYPE.ARMENIAN:
  14335. case LIST_STYLE_TYPE.UPPER_ARMENIAN:
  14336. return createAdditiveCounter(value, 1, 9999, ARMENIAN, LIST_STYLE_TYPE.DECIMAL, defaultSuffix);
  14337. case LIST_STYLE_TYPE.LOWER_ARMENIAN:
  14338. return createAdditiveCounter(value, 1, 9999, ARMENIAN, LIST_STYLE_TYPE.DECIMAL, defaultSuffix).toLowerCase();
  14339. case LIST_STYLE_TYPE.BENGALI:
  14340. return createCounterStyleFromRange(value, 2534, 2543, true, defaultSuffix);
  14341. case LIST_STYLE_TYPE.CAMBODIAN:
  14342. case LIST_STYLE_TYPE.KHMER:
  14343. return createCounterStyleFromRange(value, 6112, 6121, true, defaultSuffix);
  14344. case LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH:
  14345. return createCounterStyleFromSymbols(value, '子丑寅卯辰巳午未申酉戌亥', cjkSuffix);
  14346. case LIST_STYLE_TYPE.CJK_HEAVENLY_STEM:
  14347. return createCounterStyleFromSymbols(value, '甲乙丙丁戊己庚辛壬癸', cjkSuffix);
  14348. case LIST_STYLE_TYPE.CJK_IDEOGRAPHIC:
  14349. case LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL:
  14350. return createCJKCounter(value, '零一二三四五六七八九', CHINESE_INFORMAL_MULTIPLIERS, '負', cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
  14351. case LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL:
  14352. return createCJKCounter(value, '零壹貳參肆伍陸柒捌玖', CHINESE_FORMAL_MULTIPLIERS, '負', cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
  14353. case LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL:
  14354. return createCJKCounter(value, '零一二三四五六七八九', CHINESE_INFORMAL_MULTIPLIERS, '负', cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
  14355. case LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL:
  14356. return createCJKCounter(value, '零壹贰叁肆伍陆柒捌玖', CHINESE_FORMAL_MULTIPLIERS, '负', cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
  14357. case LIST_STYLE_TYPE.JAPANESE_INFORMAL:
  14358. return createCJKCounter(value, '〇一二三四五六七八九', '十百千万', JAPANESE_NEGATIVE, cjkSuffix, 0);
  14359. case LIST_STYLE_TYPE.JAPANESE_FORMAL:
  14360. return createCJKCounter(value, '零壱弐参四伍六七八九', '拾百千万', JAPANESE_NEGATIVE, cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);
  14361. case LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL:
  14362. return createCJKCounter(value, '영일이삼사오육칠팔구', '십백천만', KOREAN_NEGATIVE, koreanSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);
  14363. case LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL:
  14364. return createCJKCounter(value, '零一二三四五六七八九', '十百千萬', KOREAN_NEGATIVE, koreanSuffix, 0);
  14365. case LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL:
  14366. return createCJKCounter(value, '零壹貳參四五六七八九', '拾百千', KOREAN_NEGATIVE, koreanSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);
  14367. case LIST_STYLE_TYPE.DEVANAGARI:
  14368. return createCounterStyleFromRange(value, 0x966, 0x96f, true, defaultSuffix);
  14369. case LIST_STYLE_TYPE.GEORGIAN:
  14370. return createAdditiveCounter(value, 1, 19999, GEORGIAN, LIST_STYLE_TYPE.DECIMAL, defaultSuffix);
  14371. case LIST_STYLE_TYPE.GUJARATI:
  14372. return createCounterStyleFromRange(value, 0xae6, 0xaef, true, defaultSuffix);
  14373. case LIST_STYLE_TYPE.GURMUKHI:
  14374. return createCounterStyleFromRange(value, 0xa66, 0xa6f, true, defaultSuffix);
  14375. case LIST_STYLE_TYPE.HEBREW:
  14376. return createAdditiveCounter(value, 1, 10999, HEBREW, LIST_STYLE_TYPE.DECIMAL, defaultSuffix);
  14377. case LIST_STYLE_TYPE.HIRAGANA:
  14378. return createCounterStyleFromSymbols(value, 'あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん');
  14379. case LIST_STYLE_TYPE.HIRAGANA_IROHA:
  14380. return createCounterStyleFromSymbols(value, 'いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす');
  14381. case LIST_STYLE_TYPE.KANNADA:
  14382. return createCounterStyleFromRange(value, 0xce6, 0xcef, true, defaultSuffix);
  14383. case LIST_STYLE_TYPE.KATAKANA:
  14384. return createCounterStyleFromSymbols(value, 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン', cjkSuffix);
  14385. case LIST_STYLE_TYPE.KATAKANA_IROHA:
  14386. return createCounterStyleFromSymbols(value, 'イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス', cjkSuffix);
  14387. case LIST_STYLE_TYPE.LAO:
  14388. return createCounterStyleFromRange(value, 0xed0, 0xed9, true, defaultSuffix);
  14389. case LIST_STYLE_TYPE.MONGOLIAN:
  14390. return createCounterStyleFromRange(value, 0x1810, 0x1819, true, defaultSuffix);
  14391. case LIST_STYLE_TYPE.MYANMAR:
  14392. return createCounterStyleFromRange(value, 0x1040, 0x1049, true, defaultSuffix);
  14393. case LIST_STYLE_TYPE.ORIYA:
  14394. return createCounterStyleFromRange(value, 0xb66, 0xb6f, true, defaultSuffix);
  14395. case LIST_STYLE_TYPE.PERSIAN:
  14396. return createCounterStyleFromRange(value, 0x6f0, 0x6f9, true, defaultSuffix);
  14397. case LIST_STYLE_TYPE.TAMIL:
  14398. return createCounterStyleFromRange(value, 0xbe6, 0xbef, true, defaultSuffix);
  14399. case LIST_STYLE_TYPE.TELUGU:
  14400. return createCounterStyleFromRange(value, 0xc66, 0xc6f, true, defaultSuffix);
  14401. case LIST_STYLE_TYPE.THAI:
  14402. return createCounterStyleFromRange(value, 0xe50, 0xe59, true, defaultSuffix);
  14403. case LIST_STYLE_TYPE.TIBETAN:
  14404. return createCounterStyleFromRange(value, 0xf20, 0xf29, true, defaultSuffix);
  14405. case LIST_STYLE_TYPE.DECIMAL:
  14406. default:
  14407. return createCounterStyleFromRange(value, 48, 57, true, defaultSuffix);}
  14408. };
  14409. var IGNORE_ATTRIBUTE = 'data-html2canvas-ignore';
  14410. var DocumentCloner = /** @class */function () {
  14411. function DocumentCloner(element, options) {
  14412. this.options = options;
  14413. this.scrolledElements = [];
  14414. this.referenceElement = element;
  14415. this.counters = new CounterState();
  14416. this.quoteDepth = 0;
  14417. if (!element.ownerDocument) {
  14418. throw new Error('Cloned element does not have an owner document');
  14419. }
  14420. this.documentElement = this.cloneNode(element.ownerDocument.documentElement);
  14421. }
  14422. DocumentCloner.prototype.toIFrame = function (ownerDocument, windowSize) {
  14423. var _this = this;
  14424. var iframe = createIFrameContainer(ownerDocument, windowSize);
  14425. if (!iframe.contentWindow) {
  14426. return Promise.reject("Unable to find iframe window");
  14427. }
  14428. var scrollX = ownerDocument.defaultView.pageXOffset;
  14429. var scrollY = ownerDocument.defaultView.pageYOffset;
  14430. var cloneWindow = iframe.contentWindow;
  14431. var documentClone = cloneWindow.document;
  14432. /* Chrome doesn't detect relative background-images assigned in inline <style> sheets when fetched through getComputedStyle
  14433. if window url is about:blank, we can assign the url to current by writing onto the document
  14434. */
  14435. var iframeLoad = iframeLoader(iframe).then(function () {return __awaiter(_this, void 0, void 0, function () {
  14436. var onclone;
  14437. return __generator(this, function (_a) {
  14438. switch (_a.label) {
  14439. case 0:
  14440. this.scrolledElements.forEach(restoreNodeScroll);
  14441. if (cloneWindow) {
  14442. cloneWindow.scrollTo(windowSize.left, windowSize.top);
  14443. if (/(iPad|iPhone|iPod)/g.test(navigator.userAgent) && (
  14444. cloneWindow.scrollY !== windowSize.top || cloneWindow.scrollX !== windowSize.left)) {
  14445. documentClone.documentElement.style.top = -windowSize.top + 'px';
  14446. documentClone.documentElement.style.left = -windowSize.left + 'px';
  14447. documentClone.documentElement.style.position = 'absolute';
  14448. }
  14449. }
  14450. onclone = this.options.onclone;
  14451. if (typeof this.clonedReferenceElement === 'undefined') {
  14452. return [2 /*return*/, Promise.reject("Error finding the " + this.referenceElement.nodeName + " in the cloned document")];
  14453. }
  14454. if (!(documentClone.fonts && documentClone.fonts.ready)) return [3 /*break*/, 2];
  14455. return [4 /*yield*/, documentClone.fonts.ready];
  14456. case 1:
  14457. _a.sent();
  14458. _a.label = 2;
  14459. case 2:
  14460. if (typeof onclone === 'function') {
  14461. return [2 /*return*/, Promise.resolve().
  14462. then(function () {return onclone(documentClone);}).
  14463. then(function () {return iframe;})];
  14464. }
  14465. return [2 /*return*/, iframe];}
  14466. });
  14467. });});
  14468. documentClone.open();
  14469. documentClone.write(serializeDoctype(document.doctype) + "<html></html>");
  14470. // Chrome scrolls the parent document for some reason after the write to the cloned window???
  14471. restoreOwnerScroll(this.referenceElement.ownerDocument, scrollX, scrollY);
  14472. documentClone.replaceChild(documentClone.adoptNode(this.documentElement), documentClone.documentElement);
  14473. documentClone.close();
  14474. return iframeLoad;
  14475. };
  14476. DocumentCloner.prototype.createElementClone = function (node) {
  14477. if (isCanvasElement(node)) {
  14478. return this.createCanvasClone(node);
  14479. }
  14480. /*
  14481. if (isIFrameElement(node)) {
  14482. return this.createIFrameClone(node);
  14483. }
  14484. */
  14485. if (isStyleElement(node)) {
  14486. return this.createStyleClone(node);
  14487. }
  14488. return node.cloneNode(false);
  14489. };
  14490. DocumentCloner.prototype.createStyleClone = function (node) {
  14491. try {
  14492. var sheet = node.sheet;
  14493. if (sheet && sheet.cssRules) {
  14494. var css = [].slice.call(sheet.cssRules, 0).reduce(function (css, rule) {
  14495. if (rule && typeof rule.cssText === 'string') {
  14496. return css + rule.cssText;
  14497. }
  14498. return css;
  14499. }, '');
  14500. var style = node.cloneNode(false);
  14501. style.textContent = css;
  14502. return style;
  14503. }
  14504. }
  14505. catch (e) {
  14506. // accessing node.sheet.cssRules throws a DOMException
  14507. Logger.getInstance(this.options.id).error('Unable to access cssRules property', e);
  14508. if (e.name !== 'SecurityError') {
  14509. throw e;
  14510. }
  14511. }
  14512. return node.cloneNode(false);
  14513. };
  14514. DocumentCloner.prototype.createCanvasClone = function (canvas) {
  14515. if (this.options.inlineImages && canvas.ownerDocument) {
  14516. var img = canvas.ownerDocument.createElement('img');
  14517. try {
  14518. img.src = canvas.toDataURL();
  14519. return img;
  14520. }
  14521. catch (e) {
  14522. Logger.getInstance(this.options.id).info("Unable to clone canvas contents, canvas is tainted");
  14523. }
  14524. }
  14525. var clonedCanvas = canvas.cloneNode(false);
  14526. try {
  14527. clonedCanvas.width = canvas.width;
  14528. clonedCanvas.height = canvas.height;
  14529. var ctx = canvas.getContext('2d');
  14530. var clonedCtx = clonedCanvas.getContext('2d');
  14531. if (clonedCtx) {
  14532. if (ctx) {
  14533. clonedCtx.putImageData(ctx.getImageData(0, 0, canvas.width, canvas.height), 0, 0);
  14534. } else
  14535. {
  14536. clonedCtx.drawImage(canvas, 0, 0);
  14537. }
  14538. }
  14539. return clonedCanvas;
  14540. }
  14541. catch (e) {}
  14542. return clonedCanvas;
  14543. };
  14544. /*
  14545. createIFrameClone(iframe: HTMLIFrameElement) {
  14546. const tempIframe = <HTMLIFrameElement>iframe.cloneNode(false);
  14547. const iframeKey = generateIframeKey();
  14548. tempIframe.setAttribute('data-html2canvas-internal-iframe-key', iframeKey);
  14549. const {width, height} = parseBounds(iframe);
  14550. this.resourceLoader.cache[iframeKey] = getIframeDocumentElement(iframe, this.options)
  14551. .then(documentElement => {
  14552. return this.renderer(
  14553. documentElement,
  14554. {
  14555. allowTaint: this.options.allowTaint,
  14556. backgroundColor: '#ffffff',
  14557. canvas: null,
  14558. imageTimeout: this.options.imageTimeout,
  14559. logging: this.options.logging,
  14560. proxy: this.options.proxy,
  14561. removeContainer: this.options.removeContainer,
  14562. scale: this.options.scale,
  14563. foreignObjectRendering: this.options.foreignObjectRendering,
  14564. useCORS: this.options.useCORS,
  14565. target: new CanvasRenderer(),
  14566. width,
  14567. height,
  14568. x: 0,
  14569. y: 0,
  14570. windowWidth: documentElement.ownerDocument.defaultView.innerWidth,
  14571. windowHeight: documentElement.ownerDocument.defaultView.innerHeight,
  14572. scrollX: documentElement.ownerDocument.defaultView.pageXOffset,
  14573. scrollY: documentElement.ownerDocument.defaultView.pageYOffset
  14574. },
  14575. );
  14576. })
  14577. .then(
  14578. (canvas: HTMLCanvasElement) =>
  14579. new Promise((resolve, reject) => {
  14580. const iframeCanvas = document.createElement('img');
  14581. iframeCanvas.onload = () => resolve(canvas);
  14582. iframeCanvas.onerror = (event) => {
  14583. // Empty iframes may result in empty "data:," URLs, which are invalid from the <img>'s point of view
  14584. // and instead of `onload` cause `onerror` and unhandled rejection warnings
  14585. // https://github.com/niklasvh/html2canvas/issues/1502
  14586. iframeCanvas.src == 'data:,' ? resolve(canvas) : reject(event);
  14587. };
  14588. iframeCanvas.src = canvas.toDataURL();
  14589. if (tempIframe.parentNode && iframe.ownerDocument && iframe.ownerDocument.defaultView) {
  14590. tempIframe.parentNode.replaceChild(
  14591. copyCSSStyles(
  14592. iframe.ownerDocument.defaultView.getComputedStyle(iframe),
  14593. iframeCanvas
  14594. ),
  14595. tempIframe
  14596. );
  14597. }
  14598. })
  14599. );
  14600. return tempIframe;
  14601. }
  14602. */
  14603. DocumentCloner.prototype.cloneNode = function (node) {
  14604. if (isTextNode(node)) {
  14605. return document.createTextNode(node.data);
  14606. }
  14607. if (!node.ownerDocument) {
  14608. return node.cloneNode(false);
  14609. }
  14610. var window = node.ownerDocument.defaultView;
  14611. if (isHTMLElementNode(node) && window) {
  14612. var clone = this.createElementClone(node);
  14613. var style = window.getComputedStyle(node);
  14614. var styleBefore = window.getComputedStyle(node, ':before');
  14615. var styleAfter = window.getComputedStyle(node, ':after');
  14616. if (this.referenceElement === node) {
  14617. this.clonedReferenceElement = clone;
  14618. }
  14619. if (isBodyElement(clone)) {
  14620. createPseudoHideStyles(clone);
  14621. }
  14622. var counters = this.counters.parse(new CSSParsedCounterDeclaration(style));
  14623. var before = this.resolvePseudoContent(node, clone, styleBefore, PseudoElementType.BEFORE);
  14624. for (var child = node.firstChild; child; child = child.nextSibling) {
  14625. if (!isElementNode(child) ||
  14626. !isScriptElement(child) &&
  14627. !child.hasAttribute(IGNORE_ATTRIBUTE) && (
  14628. typeof this.options.ignoreElements !== 'function' || !this.options.ignoreElements(child))) {
  14629. if (!this.options.copyStyles || !isElementNode(child) || !isStyleElement(child)) {
  14630. clone.appendChild(this.cloneNode(child));
  14631. }
  14632. }
  14633. }
  14634. if (before) {
  14635. clone.insertBefore(before, clone.firstChild);
  14636. }
  14637. var after = this.resolvePseudoContent(node, clone, styleAfter, PseudoElementType.AFTER);
  14638. if (after) {
  14639. clone.appendChild(after);
  14640. }
  14641. this.counters.pop(counters);
  14642. if (style && this.options.copyStyles && !isIFrameElement(node)) {
  14643. copyCSSStyles(style, clone);
  14644. }
  14645. //this.inlineAllImages(clone);
  14646. if (node.scrollTop !== 0 || node.scrollLeft !== 0) {
  14647. this.scrolledElements.push([clone, node.scrollLeft, node.scrollTop]);
  14648. }
  14649. if ((isTextareaElement(node) || isSelectElement(node)) && (
  14650. isTextareaElement(clone) || isSelectElement(clone))) {
  14651. clone.value = node.value;
  14652. }
  14653. return clone;
  14654. }
  14655. return node.cloneNode(false);
  14656. };
  14657. DocumentCloner.prototype.resolvePseudoContent = function (node, clone, style, pseudoElt) {
  14658. var _this = this;
  14659. if (!style) {
  14660. return;
  14661. }
  14662. var value = style.content;
  14663. var document = clone.ownerDocument;
  14664. if (!document || !value || value === 'none' || value === '-moz-alt-content' || style.display === 'none') {
  14665. return;
  14666. }
  14667. this.counters.parse(new CSSParsedCounterDeclaration(style));
  14668. var declaration = new CSSParsedPseudoDeclaration(style);
  14669. var anonymousReplacedElement = document.createElement('html2canvaspseudoelement');
  14670. copyCSSStyles(style, anonymousReplacedElement);
  14671. declaration.content.forEach(function (token) {
  14672. if (token.type === TokenType.STRING_TOKEN) {
  14673. anonymousReplacedElement.appendChild(document.createTextNode(token.value));
  14674. } else
  14675. if (token.type === TokenType.URL_TOKEN) {
  14676. var img = document.createElement('img');
  14677. img.src = token.value;
  14678. img.style.opacity = '1';
  14679. anonymousReplacedElement.appendChild(img);
  14680. } else
  14681. if (token.type === TokenType.FUNCTION) {
  14682. if (token.name === 'attr') {
  14683. var attr = token.values.filter(isIdentToken);
  14684. if (attr.length) {
  14685. anonymousReplacedElement.appendChild(document.createTextNode(node.getAttribute(attr[0].value) || ''));
  14686. }
  14687. } else
  14688. if (token.name === 'counter') {
  14689. var _a = token.values.filter(nonFunctionArgSeparator),counter = _a[0],counterStyle = _a[1];
  14690. if (counter && isIdentToken(counter)) {
  14691. var counterState = _this.counters.getCounterValue(counter.value);
  14692. var counterType = counterStyle && isIdentToken(counterStyle) ?
  14693. listStyleType.parse(counterStyle.value) :
  14694. LIST_STYLE_TYPE.DECIMAL;
  14695. anonymousReplacedElement.appendChild(document.createTextNode(createCounterText(counterState, counterType, false)));
  14696. }
  14697. } else
  14698. if (token.name === 'counters') {
  14699. var _b = token.values.filter(nonFunctionArgSeparator),counter = _b[0],delim = _b[1],counterStyle = _b[2];
  14700. if (counter && isIdentToken(counter)) {
  14701. var counterStates = _this.counters.getCounterValues(counter.value);
  14702. var counterType_1 = counterStyle && isIdentToken(counterStyle) ?
  14703. listStyleType.parse(counterStyle.value) :
  14704. LIST_STYLE_TYPE.DECIMAL;
  14705. var separator = delim && delim.type === TokenType.STRING_TOKEN ? delim.value : '';
  14706. var text = counterStates.
  14707. map(function (value) {return createCounterText(value, counterType_1, false);}).
  14708. join(separator);
  14709. anonymousReplacedElement.appendChild(document.createTextNode(text));
  14710. }
  14711. }
  14712. } else
  14713. if (token.type === TokenType.IDENT_TOKEN) {
  14714. switch (token.value) {
  14715. case 'open-quote':
  14716. anonymousReplacedElement.appendChild(document.createTextNode(getQuote(declaration.quotes, _this.quoteDepth++, true)));
  14717. break;
  14718. case 'close-quote':
  14719. anonymousReplacedElement.appendChild(document.createTextNode(getQuote(declaration.quotes, --_this.quoteDepth, false)));
  14720. break;
  14721. default:
  14722. // safari doesn't parse string tokens correctly because of lack of quotes
  14723. anonymousReplacedElement.appendChild(document.createTextNode(token.value));}
  14724. }
  14725. });
  14726. anonymousReplacedElement.className = PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + " " + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
  14727. clone.className +=
  14728. pseudoElt === PseudoElementType.BEFORE ?
  14729. " " + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE :
  14730. " " + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
  14731. return anonymousReplacedElement;
  14732. };
  14733. DocumentCloner.destroy = function (container) {
  14734. if (container.parentNode) {
  14735. container.parentNode.removeChild(container);
  14736. return true;
  14737. }
  14738. return false;
  14739. };
  14740. return DocumentCloner;
  14741. }();
  14742. var PseudoElementType;
  14743. (function (PseudoElementType) {
  14744. PseudoElementType[PseudoElementType["BEFORE"] = 0] = "BEFORE";
  14745. PseudoElementType[PseudoElementType["AFTER"] = 1] = "AFTER";
  14746. })(PseudoElementType || (PseudoElementType = {}));
  14747. var createIFrameContainer = function createIFrameContainer(ownerDocument, bounds) {
  14748. var cloneIframeContainer = ownerDocument.createElement('iframe');
  14749. cloneIframeContainer.className = 'html2canvas-container';
  14750. cloneIframeContainer.style.visibility = 'hidden';
  14751. cloneIframeContainer.style.position = 'fixed';
  14752. cloneIframeContainer.style.left = '-10000px';
  14753. cloneIframeContainer.style.top = '0px';
  14754. cloneIframeContainer.style.border = '0';
  14755. cloneIframeContainer.width = bounds.width.toString();
  14756. cloneIframeContainer.height = bounds.height.toString();
  14757. cloneIframeContainer.scrolling = 'no'; // ios won't scroll without it
  14758. cloneIframeContainer.setAttribute(IGNORE_ATTRIBUTE, 'true');
  14759. ownerDocument.body.appendChild(cloneIframeContainer);
  14760. return cloneIframeContainer;
  14761. };
  14762. var iframeLoader = function iframeLoader(iframe) {
  14763. return new Promise(function (resolve, reject) {
  14764. var cloneWindow = iframe.contentWindow;
  14765. if (!cloneWindow) {
  14766. return reject("No window assigned for iframe");
  14767. }
  14768. var documentClone = cloneWindow.document;
  14769. cloneWindow.onload = iframe.onload = documentClone.onreadystatechange = function () {
  14770. cloneWindow.onload = iframe.onload = documentClone.onreadystatechange = null;
  14771. var interval = setInterval(function () {
  14772. if (documentClone.body.childNodes.length > 0 && documentClone.readyState === 'complete') {
  14773. clearInterval(interval);
  14774. resolve(iframe);
  14775. }
  14776. }, 50);
  14777. };
  14778. });
  14779. };
  14780. var copyCSSStyles = function copyCSSStyles(style, target) {
  14781. // Edge does not provide value for cssText
  14782. for (var i = style.length - 1; i >= 0; i--) {
  14783. var property = style.item(i);
  14784. // Safari shows pseudoelements if content is set
  14785. if (property !== 'content') {
  14786. target.style.setProperty(property, style.getPropertyValue(property));
  14787. }
  14788. }
  14789. return target;
  14790. };
  14791. var serializeDoctype = function serializeDoctype(doctype) {
  14792. var str = '';
  14793. if (doctype) {
  14794. str += '<!DOCTYPE ';
  14795. if (doctype.name) {
  14796. str += doctype.name;
  14797. }
  14798. if (doctype.internalSubset) {
  14799. str += doctype.internalSubset;
  14800. }
  14801. if (doctype.publicId) {
  14802. str += "\"" + doctype.publicId + "\"";
  14803. }
  14804. if (doctype.systemId) {
  14805. str += "\"" + doctype.systemId + "\"";
  14806. }
  14807. str += '>';
  14808. }
  14809. return str;
  14810. };
  14811. var restoreOwnerScroll = function restoreOwnerScroll(ownerDocument, x, y) {
  14812. if (ownerDocument &&
  14813. ownerDocument.defaultView && (
  14814. x !== ownerDocument.defaultView.pageXOffset || y !== ownerDocument.defaultView.pageYOffset)) {
  14815. ownerDocument.defaultView.scrollTo(x, y);
  14816. }
  14817. };
  14818. var restoreNodeScroll = function restoreNodeScroll(_a) {
  14819. var element = _a[0],x = _a[1],y = _a[2];
  14820. element.scrollLeft = x;
  14821. element.scrollTop = y;
  14822. };
  14823. var PSEUDO_BEFORE = ':before';
  14824. var PSEUDO_AFTER = ':after';
  14825. var PSEUDO_HIDE_ELEMENT_CLASS_BEFORE = '___html2canvas___pseudoelement_before';
  14826. var PSEUDO_HIDE_ELEMENT_CLASS_AFTER = '___html2canvas___pseudoelement_after';
  14827. var PSEUDO_HIDE_ELEMENT_STYLE = "{\n content: \"\" !important;\n display: none !important;\n}";
  14828. var createPseudoHideStyles = function createPseudoHideStyles(body) {
  14829. createStyles(body, "." + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + PSEUDO_BEFORE + PSEUDO_HIDE_ELEMENT_STYLE + "\n ." + PSEUDO_HIDE_ELEMENT_CLASS_AFTER + PSEUDO_AFTER + PSEUDO_HIDE_ELEMENT_STYLE);
  14830. };
  14831. var createStyles = function createStyles(body, styles) {
  14832. var document = body.ownerDocument;
  14833. if (document) {
  14834. var style = document.createElement('style');
  14835. style.textContent = styles;
  14836. body.appendChild(style);
  14837. }
  14838. };
  14839. var PathType;
  14840. (function (PathType) {
  14841. PathType[PathType["VECTOR"] = 0] = "VECTOR";
  14842. PathType[PathType["BEZIER_CURVE"] = 1] = "BEZIER_CURVE";
  14843. })(PathType || (PathType = {}));
  14844. var equalPath = function equalPath(a, b) {
  14845. if (a.length === b.length) {
  14846. return a.some(function (v, i) {return v === b[i];});
  14847. }
  14848. return false;
  14849. };
  14850. var transformPath = function transformPath(path, deltaX, deltaY, deltaW, deltaH) {
  14851. return path.map(function (point, index) {
  14852. switch (index) {
  14853. case 0:
  14854. return point.add(deltaX, deltaY);
  14855. case 1:
  14856. return point.add(deltaX + deltaW, deltaY);
  14857. case 2:
  14858. return point.add(deltaX + deltaW, deltaY + deltaH);
  14859. case 3:
  14860. return point.add(deltaX, deltaY + deltaH);}
  14861. return point;
  14862. });
  14863. };
  14864. var Vector = /** @class */function () {
  14865. function Vector(x, y) {
  14866. this.type = PathType.VECTOR;
  14867. this.x = x;
  14868. this.y = y;
  14869. }
  14870. Vector.prototype.add = function (deltaX, deltaY) {
  14871. return new Vector(this.x + deltaX, this.y + deltaY);
  14872. };
  14873. return Vector;
  14874. }();
  14875. var lerp = function lerp(a, b, t) {
  14876. return new Vector(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t);
  14877. };
  14878. var BezierCurve = /** @class */function () {
  14879. function BezierCurve(start, startControl, endControl, end) {
  14880. this.type = PathType.BEZIER_CURVE;
  14881. this.start = start;
  14882. this.startControl = startControl;
  14883. this.endControl = endControl;
  14884. this.end = end;
  14885. }
  14886. BezierCurve.prototype.subdivide = function (t, firstHalf) {
  14887. var ab = lerp(this.start, this.startControl, t);
  14888. var bc = lerp(this.startControl, this.endControl, t);
  14889. var cd = lerp(this.endControl, this.end, t);
  14890. var abbc = lerp(ab, bc, t);
  14891. var bccd = lerp(bc, cd, t);
  14892. var dest = lerp(abbc, bccd, t);
  14893. return firstHalf ? new BezierCurve(this.start, ab, abbc, dest) : new BezierCurve(dest, bccd, cd, this.end);
  14894. };
  14895. BezierCurve.prototype.add = function (deltaX, deltaY) {
  14896. return new BezierCurve(this.start.add(deltaX, deltaY), this.startControl.add(deltaX, deltaY), this.endControl.add(deltaX, deltaY), this.end.add(deltaX, deltaY));
  14897. };
  14898. BezierCurve.prototype.reverse = function () {
  14899. return new BezierCurve(this.end, this.endControl, this.startControl, this.start);
  14900. };
  14901. return BezierCurve;
  14902. }();
  14903. var isBezierCurve = function isBezierCurve(path) {return path.type === PathType.BEZIER_CURVE;};
  14904. var BoundCurves = /** @class */function () {
  14905. function BoundCurves(element) {
  14906. var styles = element.styles;
  14907. var bounds = element.bounds;
  14908. var _a = getAbsoluteValueForTuple(styles.borderTopLeftRadius, bounds.width, bounds.height),tlh = _a[0],tlv = _a[1];
  14909. var _b = getAbsoluteValueForTuple(styles.borderTopRightRadius, bounds.width, bounds.height),trh = _b[0],trv = _b[1];
  14910. var _c = getAbsoluteValueForTuple(styles.borderBottomRightRadius, bounds.width, bounds.height),brh = _c[0],brv = _c[1];
  14911. var _d = getAbsoluteValueForTuple(styles.borderBottomLeftRadius, bounds.width, bounds.height),blh = _d[0],blv = _d[1];
  14912. var factors = [];
  14913. factors.push((tlh + trh) / bounds.width);
  14914. factors.push((blh + brh) / bounds.width);
  14915. factors.push((tlv + blv) / bounds.height);
  14916. factors.push((trv + brv) / bounds.height);
  14917. var maxFactor = Math.max.apply(Math, factors);
  14918. if (maxFactor > 1) {
  14919. tlh /= maxFactor;
  14920. tlv /= maxFactor;
  14921. trh /= maxFactor;
  14922. trv /= maxFactor;
  14923. brh /= maxFactor;
  14924. brv /= maxFactor;
  14925. blh /= maxFactor;
  14926. blv /= maxFactor;
  14927. }
  14928. var topWidth = bounds.width - trh;
  14929. var rightHeight = bounds.height - brv;
  14930. var bottomWidth = bounds.width - brh;
  14931. var leftHeight = bounds.height - blv;
  14932. var borderTopWidth = styles.borderTopWidth;
  14933. var borderRightWidth = styles.borderRightWidth;
  14934. var borderBottomWidth = styles.borderBottomWidth;
  14935. var borderLeftWidth = styles.borderLeftWidth;
  14936. var paddingTop = getAbsoluteValue(styles.paddingTop, element.bounds.width);
  14937. var paddingRight = getAbsoluteValue(styles.paddingRight, element.bounds.width);
  14938. var paddingBottom = getAbsoluteValue(styles.paddingBottom, element.bounds.width);
  14939. var paddingLeft = getAbsoluteValue(styles.paddingLeft, element.bounds.width);
  14940. this.topLeftBorderBox =
  14941. tlh > 0 || tlv > 0 ?
  14942. getCurvePoints(bounds.left, bounds.top, tlh, tlv, CORNER.TOP_LEFT) :
  14943. new Vector(bounds.left, bounds.top);
  14944. this.topRightBorderBox =
  14945. trh > 0 || trv > 0 ?
  14946. getCurvePoints(bounds.left + topWidth, bounds.top, trh, trv, CORNER.TOP_RIGHT) :
  14947. new Vector(bounds.left + bounds.width, bounds.top);
  14948. this.bottomRightBorderBox =
  14949. brh > 0 || brv > 0 ?
  14950. getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh, brv, CORNER.BOTTOM_RIGHT) :
  14951. new Vector(bounds.left + bounds.width, bounds.top + bounds.height);
  14952. this.bottomLeftBorderBox =
  14953. blh > 0 || blv > 0 ?
  14954. getCurvePoints(bounds.left, bounds.top + leftHeight, blh, blv, CORNER.BOTTOM_LEFT) :
  14955. new Vector(bounds.left, bounds.top + bounds.height);
  14956. this.topLeftPaddingBox =
  14957. tlh > 0 || tlv > 0 ?
  14958. getCurvePoints(bounds.left + borderLeftWidth, bounds.top + borderTopWidth, Math.max(0, tlh - borderLeftWidth), Math.max(0, tlv - borderTopWidth), CORNER.TOP_LEFT) :
  14959. new Vector(bounds.left + borderLeftWidth, bounds.top + borderTopWidth);
  14960. this.topRightPaddingBox =
  14961. trh > 0 || trv > 0 ?
  14962. getCurvePoints(bounds.left + Math.min(topWidth, bounds.width + borderLeftWidth), bounds.top + borderTopWidth, topWidth > bounds.width + borderLeftWidth ? 0 : trh - borderLeftWidth, trv - borderTopWidth, CORNER.TOP_RIGHT) :
  14963. new Vector(bounds.left + bounds.width - borderRightWidth, bounds.top + borderTopWidth);
  14964. this.bottomRightPaddingBox =
  14965. brh > 0 || brv > 0 ?
  14966. getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - borderLeftWidth), bounds.top + Math.min(rightHeight, bounds.height + borderTopWidth), Math.max(0, brh - borderRightWidth), brv - borderBottomWidth, CORNER.BOTTOM_RIGHT) :
  14967. new Vector(bounds.left + bounds.width - borderRightWidth, bounds.top + bounds.height - borderBottomWidth);
  14968. this.bottomLeftPaddingBox =
  14969. blh > 0 || blv > 0 ?
  14970. getCurvePoints(bounds.left + borderLeftWidth, bounds.top + leftHeight, Math.max(0, blh - borderLeftWidth), blv - borderBottomWidth, CORNER.BOTTOM_LEFT) :
  14971. new Vector(bounds.left + borderLeftWidth, bounds.top + bounds.height - borderBottomWidth);
  14972. this.topLeftContentBox =
  14973. tlh > 0 || tlv > 0 ?
  14974. getCurvePoints(bounds.left + borderLeftWidth + paddingLeft, bounds.top + borderTopWidth + paddingTop, Math.max(0, tlh - (borderLeftWidth + paddingLeft)), Math.max(0, tlv - (borderTopWidth + paddingTop)), CORNER.TOP_LEFT) :
  14975. new Vector(bounds.left + borderLeftWidth + paddingLeft, bounds.top + borderTopWidth + paddingTop);
  14976. this.topRightContentBox =
  14977. trh > 0 || trv > 0 ?
  14978. getCurvePoints(bounds.left + Math.min(topWidth, bounds.width + borderLeftWidth + paddingLeft), bounds.top + borderTopWidth + paddingTop, topWidth > bounds.width + borderLeftWidth + paddingLeft ? 0 : trh - borderLeftWidth + paddingLeft, trv - (borderTopWidth + paddingTop), CORNER.TOP_RIGHT) :
  14979. new Vector(bounds.left + bounds.width - (borderRightWidth + paddingRight), bounds.top + borderTopWidth + paddingTop);
  14980. this.bottomRightContentBox =
  14981. brh > 0 || brv > 0 ?
  14982. getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - (borderLeftWidth + paddingLeft)), bounds.top + Math.min(rightHeight, bounds.height + borderTopWidth + paddingTop), Math.max(0, brh - (borderRightWidth + paddingRight)), brv - (borderBottomWidth + paddingBottom), CORNER.BOTTOM_RIGHT) :
  14983. new Vector(bounds.left + bounds.width - (borderRightWidth + paddingRight), bounds.top + bounds.height - (borderBottomWidth + paddingBottom));
  14984. this.bottomLeftContentBox =
  14985. blh > 0 || blv > 0 ?
  14986. getCurvePoints(bounds.left + borderLeftWidth + paddingLeft, bounds.top + leftHeight, Math.max(0, blh - (borderLeftWidth + paddingLeft)), blv - (borderBottomWidth + paddingBottom), CORNER.BOTTOM_LEFT) :
  14987. new Vector(bounds.left + borderLeftWidth + paddingLeft, bounds.top + bounds.height - (borderBottomWidth + paddingBottom));
  14988. }
  14989. return BoundCurves;
  14990. }();
  14991. var CORNER;
  14992. (function (CORNER) {
  14993. CORNER[CORNER["TOP_LEFT"] = 0] = "TOP_LEFT";
  14994. CORNER[CORNER["TOP_RIGHT"] = 1] = "TOP_RIGHT";
  14995. CORNER[CORNER["BOTTOM_RIGHT"] = 2] = "BOTTOM_RIGHT";
  14996. CORNER[CORNER["BOTTOM_LEFT"] = 3] = "BOTTOM_LEFT";
  14997. })(CORNER || (CORNER = {}));
  14998. var getCurvePoints = function getCurvePoints(x, y, r1, r2, position) {
  14999. var kappa = 4 * ((Math.sqrt(2) - 1) / 3);
  15000. var ox = r1 * kappa; // control point offset horizontal
  15001. var oy = r2 * kappa; // control point offset vertical
  15002. var xm = x + r1; // x-middle
  15003. var ym = y + r2; // y-middle
  15004. switch (position) {
  15005. case CORNER.TOP_LEFT:
  15006. return new BezierCurve(new Vector(x, ym), new Vector(x, ym - oy), new Vector(xm - ox, y), new Vector(xm, y));
  15007. case CORNER.TOP_RIGHT:
  15008. return new BezierCurve(new Vector(x, y), new Vector(x + ox, y), new Vector(xm, ym - oy), new Vector(xm, ym));
  15009. case CORNER.BOTTOM_RIGHT:
  15010. return new BezierCurve(new Vector(xm, y), new Vector(xm, y + oy), new Vector(x + ox, ym), new Vector(x, ym));
  15011. case CORNER.BOTTOM_LEFT:
  15012. default:
  15013. return new BezierCurve(new Vector(xm, ym), new Vector(xm - ox, ym), new Vector(x, y + oy), new Vector(x, y));}
  15014. };
  15015. var calculateBorderBoxPath = function calculateBorderBoxPath(curves) {
  15016. return [curves.topLeftBorderBox, curves.topRightBorderBox, curves.bottomRightBorderBox, curves.bottomLeftBorderBox];
  15017. };
  15018. var calculateContentBoxPath = function calculateContentBoxPath(curves) {
  15019. return [
  15020. curves.topLeftContentBox,
  15021. curves.topRightContentBox,
  15022. curves.bottomRightContentBox,
  15023. curves.bottomLeftContentBox];
  15024. };
  15025. var calculatePaddingBoxPath = function calculatePaddingBoxPath(curves) {
  15026. return [
  15027. curves.topLeftPaddingBox,
  15028. curves.topRightPaddingBox,
  15029. curves.bottomRightPaddingBox,
  15030. curves.bottomLeftPaddingBox];
  15031. };
  15032. var TransformEffect = /** @class */function () {
  15033. function TransformEffect(offsetX, offsetY, matrix) {
  15034. this.type = 0 /* TRANSFORM */;
  15035. this.offsetX = offsetX;
  15036. this.offsetY = offsetY;
  15037. this.matrix = matrix;
  15038. this.target = 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */;
  15039. }
  15040. return TransformEffect;
  15041. }();
  15042. var ClipEffect = /** @class */function () {
  15043. function ClipEffect(path, target) {
  15044. this.type = 1 /* CLIP */;
  15045. this.target = target;
  15046. this.path = path;
  15047. }
  15048. return ClipEffect;
  15049. }();
  15050. var isTransformEffect = function isTransformEffect(effect) {
  15051. return effect.type === 0 /* TRANSFORM */;
  15052. };
  15053. var isClipEffect = function isClipEffect(effect) {return effect.type === 1 /* CLIP */;};
  15054. var StackingContext = /** @class */function () {
  15055. function StackingContext(container) {
  15056. this.element = container;
  15057. this.inlineLevel = [];
  15058. this.nonInlineLevel = [];
  15059. this.negativeZIndex = [];
  15060. this.zeroOrAutoZIndexOrTransformedOrOpacity = [];
  15061. this.positiveZIndex = [];
  15062. this.nonPositionedFloats = [];
  15063. this.nonPositionedInlineLevel = [];
  15064. }
  15065. return StackingContext;
  15066. }();
  15067. var ElementPaint = /** @class */function () {
  15068. function ElementPaint(element, parentStack) {
  15069. this.container = element;
  15070. this.effects = parentStack.slice(0);
  15071. this.curves = new BoundCurves(element);
  15072. if (element.styles.transform !== null) {
  15073. var offsetX = element.bounds.left + element.styles.transformOrigin[0].number;
  15074. var offsetY = element.bounds.top + element.styles.transformOrigin[1].number;
  15075. var matrix = element.styles.transform;
  15076. this.effects.push(new TransformEffect(offsetX, offsetY, matrix));
  15077. }
  15078. if (element.styles.overflowX !== OVERFLOW.VISIBLE) {
  15079. var borderBox = calculateBorderBoxPath(this.curves);
  15080. var paddingBox = calculatePaddingBoxPath(this.curves);
  15081. if (equalPath(borderBox, paddingBox)) {
  15082. this.effects.push(new ClipEffect(borderBox, 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */));
  15083. } else
  15084. {
  15085. this.effects.push(new ClipEffect(borderBox, 2 /* BACKGROUND_BORDERS */));
  15086. this.effects.push(new ClipEffect(paddingBox, 4 /* CONTENT */));
  15087. }
  15088. }
  15089. }
  15090. ElementPaint.prototype.getParentEffects = function () {
  15091. var effects = this.effects.slice(0);
  15092. if (this.container.styles.overflowX !== OVERFLOW.VISIBLE) {
  15093. var borderBox = calculateBorderBoxPath(this.curves);
  15094. var paddingBox = calculatePaddingBoxPath(this.curves);
  15095. if (!equalPath(borderBox, paddingBox)) {
  15096. effects.push(new ClipEffect(paddingBox, 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */));
  15097. }
  15098. }
  15099. return effects;
  15100. };
  15101. return ElementPaint;
  15102. }();
  15103. var parseStackTree = function parseStackTree(parent, stackingContext, realStackingContext, listItems) {
  15104. parent.container.elements.forEach(function (child) {
  15105. var treatAsRealStackingContext = contains(child.flags, 4 /* CREATES_REAL_STACKING_CONTEXT */);
  15106. var createsStackingContext = contains(child.flags, 2 /* CREATES_STACKING_CONTEXT */);
  15107. var paintContainer = new ElementPaint(child, parent.getParentEffects());
  15108. if (contains(child.styles.display, 2048 /* LIST_ITEM */)) {
  15109. listItems.push(paintContainer);
  15110. }
  15111. var listOwnerItems = contains(child.flags, 8 /* IS_LIST_OWNER */) ? [] : listItems;
  15112. if (treatAsRealStackingContext || createsStackingContext) {
  15113. var parentStack = treatAsRealStackingContext || child.styles.isPositioned() ? realStackingContext : stackingContext;
  15114. var stack = new StackingContext(paintContainer);
  15115. if (child.styles.isPositioned() || child.styles.opacity < 1 || child.styles.isTransformed()) {
  15116. var order_1 = child.styles.zIndex.order;
  15117. if (order_1 < 0) {
  15118. var index_1 = 0;
  15119. parentStack.negativeZIndex.some(function (current, i) {
  15120. if (order_1 > current.element.container.styles.zIndex.order) {
  15121. index_1 = i;
  15122. return false;
  15123. } else
  15124. if (index_1 > 0) {
  15125. return true;
  15126. }
  15127. return false;
  15128. });
  15129. parentStack.negativeZIndex.splice(index_1, 0, stack);
  15130. } else
  15131. if (order_1 > 0) {
  15132. var index_2 = 0;
  15133. parentStack.positiveZIndex.some(function (current, i) {
  15134. if (order_1 > current.element.container.styles.zIndex.order) {
  15135. index_2 = i + 1;
  15136. return false;
  15137. } else
  15138. if (index_2 > 0) {
  15139. return true;
  15140. }
  15141. return false;
  15142. });
  15143. parentStack.positiveZIndex.splice(index_2, 0, stack);
  15144. } else
  15145. {
  15146. parentStack.zeroOrAutoZIndexOrTransformedOrOpacity.push(stack);
  15147. }
  15148. } else
  15149. {
  15150. if (child.styles.isFloating()) {
  15151. parentStack.nonPositionedFloats.push(stack);
  15152. } else
  15153. {
  15154. parentStack.nonPositionedInlineLevel.push(stack);
  15155. }
  15156. }
  15157. parseStackTree(paintContainer, stack, treatAsRealStackingContext ? stack : realStackingContext, listOwnerItems);
  15158. } else
  15159. {
  15160. if (child.styles.isInlineLevel()) {
  15161. stackingContext.inlineLevel.push(paintContainer);
  15162. } else
  15163. {
  15164. stackingContext.nonInlineLevel.push(paintContainer);
  15165. }
  15166. parseStackTree(paintContainer, stackingContext, realStackingContext, listOwnerItems);
  15167. }
  15168. if (contains(child.flags, 8 /* IS_LIST_OWNER */)) {
  15169. processListItems(child, listOwnerItems);
  15170. }
  15171. });
  15172. };
  15173. var processListItems = function processListItems(owner, elements) {
  15174. var numbering = owner instanceof OLElementContainer ? owner.start : 1;
  15175. var reversed = owner instanceof OLElementContainer ? owner.reversed : false;
  15176. for (var i = 0; i < elements.length; i++) {
  15177. var item = elements[i];
  15178. if (item.container instanceof LIElementContainer &&
  15179. typeof item.container.value === 'number' &&
  15180. item.container.value !== 0) {
  15181. numbering = item.container.value;
  15182. }
  15183. item.listValue = createCounterText(numbering, item.container.styles.listStyleType, true);
  15184. numbering += reversed ? -1 : 1;
  15185. }
  15186. };
  15187. var parseStackingContexts = function parseStackingContexts(container) {
  15188. var paintContainer = new ElementPaint(container, []);
  15189. var root = new StackingContext(paintContainer);
  15190. var listItems = [];
  15191. parseStackTree(paintContainer, root, root, listItems);
  15192. processListItems(paintContainer.container, listItems);
  15193. return root;
  15194. };
  15195. var parsePathForBorder = function parsePathForBorder(curves, borderSide) {
  15196. switch (borderSide) {
  15197. case 0:
  15198. return createPathFromCurves(curves.topLeftBorderBox, curves.topLeftPaddingBox, curves.topRightBorderBox, curves.topRightPaddingBox);
  15199. case 1:
  15200. return createPathFromCurves(curves.topRightBorderBox, curves.topRightPaddingBox, curves.bottomRightBorderBox, curves.bottomRightPaddingBox);
  15201. case 2:
  15202. return createPathFromCurves(curves.bottomRightBorderBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox);
  15203. case 3:
  15204. default:
  15205. return createPathFromCurves(curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox, curves.topLeftBorderBox, curves.topLeftPaddingBox);}
  15206. };
  15207. var createPathFromCurves = function createPathFromCurves(outer1, inner1, outer2, inner2) {
  15208. var path = [];
  15209. if (isBezierCurve(outer1)) {
  15210. path.push(outer1.subdivide(0.5, false));
  15211. } else
  15212. {
  15213. path.push(outer1);
  15214. }
  15215. if (isBezierCurve(outer2)) {
  15216. path.push(outer2.subdivide(0.5, true));
  15217. } else
  15218. {
  15219. path.push(outer2);
  15220. }
  15221. if (isBezierCurve(inner2)) {
  15222. path.push(inner2.subdivide(0.5, true).reverse());
  15223. } else
  15224. {
  15225. path.push(inner2);
  15226. }
  15227. if (isBezierCurve(inner1)) {
  15228. path.push(inner1.subdivide(0.5, false).reverse());
  15229. } else
  15230. {
  15231. path.push(inner1);
  15232. }
  15233. return path;
  15234. };
  15235. var paddingBox = function paddingBox(element) {
  15236. var bounds = element.bounds;
  15237. var styles = element.styles;
  15238. return bounds.add(styles.borderLeftWidth, styles.borderTopWidth, -(styles.borderRightWidth + styles.borderLeftWidth), -(styles.borderTopWidth + styles.borderBottomWidth));
  15239. };
  15240. var contentBox = function contentBox(element) {
  15241. var styles = element.styles;
  15242. var bounds = element.bounds;
  15243. var paddingLeft = getAbsoluteValue(styles.paddingLeft, bounds.width);
  15244. var paddingRight = getAbsoluteValue(styles.paddingRight, bounds.width);
  15245. var paddingTop = getAbsoluteValue(styles.paddingTop, bounds.width);
  15246. var paddingBottom = getAbsoluteValue(styles.paddingBottom, bounds.width);
  15247. return bounds.add(paddingLeft + styles.borderLeftWidth, paddingTop + styles.borderTopWidth, -(styles.borderRightWidth + styles.borderLeftWidth + paddingLeft + paddingRight), -(styles.borderTopWidth + styles.borderBottomWidth + paddingTop + paddingBottom));
  15248. };
  15249. var calculateBackgroundPositioningArea = function calculateBackgroundPositioningArea(backgroundOrigin, element) {
  15250. if (backgroundOrigin === 0 /* BORDER_BOX */) {
  15251. return element.bounds;
  15252. }
  15253. if (backgroundOrigin === 2 /* CONTENT_BOX */) {
  15254. return contentBox(element);
  15255. }
  15256. return paddingBox(element);
  15257. };
  15258. var calculateBackgroundPaintingArea = function calculateBackgroundPaintingArea(backgroundClip, element) {
  15259. if (backgroundClip === BACKGROUND_CLIP.BORDER_BOX) {
  15260. return element.bounds;
  15261. }
  15262. if (backgroundClip === BACKGROUND_CLIP.CONTENT_BOX) {
  15263. return contentBox(element);
  15264. }
  15265. return paddingBox(element);
  15266. };
  15267. var calculateBackgroundRendering = function calculateBackgroundRendering(container, index, intrinsicSize) {
  15268. var backgroundPositioningArea = calculateBackgroundPositioningArea(getBackgroundValueForIndex(container.styles.backgroundOrigin, index), container);
  15269. var backgroundPaintingArea = calculateBackgroundPaintingArea(getBackgroundValueForIndex(container.styles.backgroundClip, index), container);
  15270. var backgroundImageSize = calculateBackgroundSize(getBackgroundValueForIndex(container.styles.backgroundSize, index), intrinsicSize, backgroundPositioningArea);
  15271. var sizeWidth = backgroundImageSize[0],sizeHeight = backgroundImageSize[1];
  15272. var position = getAbsoluteValueForTuple(getBackgroundValueForIndex(container.styles.backgroundPosition, index), backgroundPositioningArea.width - sizeWidth, backgroundPositioningArea.height - sizeHeight);
  15273. var path = calculateBackgroundRepeatPath(getBackgroundValueForIndex(container.styles.backgroundRepeat, index), position, backgroundImageSize, backgroundPositioningArea, backgroundPaintingArea);
  15274. var offsetX = Math.round(backgroundPositioningArea.left + position[0]);
  15275. var offsetY = Math.round(backgroundPositioningArea.top + position[1]);
  15276. return [path, offsetX, offsetY, sizeWidth, sizeHeight];
  15277. };
  15278. var isAuto = function isAuto(token) {return isIdentToken(token) && token.value === BACKGROUND_SIZE.AUTO;};
  15279. var hasIntrinsicValue = function hasIntrinsicValue(value) {return typeof value === 'number';};
  15280. var calculateBackgroundSize = function calculateBackgroundSize(size, _a, bounds) {
  15281. var intrinsicWidth = _a[0],intrinsicHeight = _a[1],intrinsicProportion = _a[2];
  15282. var first = size[0],second = size[1];
  15283. if (isLengthPercentage(first) && second && isLengthPercentage(second)) {
  15284. return [getAbsoluteValue(first, bounds.width), getAbsoluteValue(second, bounds.height)];
  15285. }
  15286. var hasIntrinsicProportion = hasIntrinsicValue(intrinsicProportion);
  15287. if (isIdentToken(first) && (first.value === BACKGROUND_SIZE.CONTAIN || first.value === BACKGROUND_SIZE.COVER)) {
  15288. if (hasIntrinsicValue(intrinsicProportion)) {
  15289. var targetRatio = bounds.width / bounds.height;
  15290. return targetRatio < intrinsicProportion !== (first.value === BACKGROUND_SIZE.COVER) ?
  15291. [bounds.width, bounds.width / intrinsicProportion] :
  15292. [bounds.height * intrinsicProportion, bounds.height];
  15293. }
  15294. return [bounds.width, bounds.height];
  15295. }
  15296. var hasIntrinsicWidth = hasIntrinsicValue(intrinsicWidth);
  15297. var hasIntrinsicHeight = hasIntrinsicValue(intrinsicHeight);
  15298. var hasIntrinsicDimensions = hasIntrinsicWidth || hasIntrinsicHeight;
  15299. // If the background-size is auto or auto auto:
  15300. if (isAuto(first) && (!second || isAuto(second))) {
  15301. // If the image has both horizontal and vertical intrinsic dimensions, it's rendered at that size.
  15302. if (hasIntrinsicWidth && hasIntrinsicHeight) {
  15303. return [intrinsicWidth, intrinsicHeight];
  15304. }
  15305. // If the image has no intrinsic dimensions and has no intrinsic proportions,
  15306. // it's rendered at the size of the background positioning area.
  15307. if (!hasIntrinsicProportion && !hasIntrinsicDimensions) {
  15308. return [bounds.width, bounds.height];
  15309. }
  15310. // TODO If the image has no intrinsic dimensions but has intrinsic proportions, it's rendered as if contain had been specified instead.
  15311. // If the image has only one intrinsic dimension and has intrinsic proportions, it's rendered at the size corresponding to that one dimension.
  15312. // The other dimension is computed using the specified dimension and the intrinsic proportions.
  15313. if (hasIntrinsicDimensions && hasIntrinsicProportion) {
  15314. var width_1 = hasIntrinsicWidth ?
  15315. intrinsicWidth :
  15316. intrinsicHeight * intrinsicProportion;
  15317. var height_1 = hasIntrinsicHeight ?
  15318. intrinsicHeight :
  15319. intrinsicWidth / intrinsicProportion;
  15320. return [width_1, height_1];
  15321. }
  15322. // If the image has only one intrinsic dimension but has no intrinsic proportions,
  15323. // it's rendered using the specified dimension and the other dimension of the background positioning area.
  15324. var width_2 = hasIntrinsicWidth ? intrinsicWidth : bounds.width;
  15325. var height_2 = hasIntrinsicHeight ? intrinsicHeight : bounds.height;
  15326. return [width_2, height_2];
  15327. }
  15328. // If the image has intrinsic proportions, it's stretched to the specified dimension.
  15329. // The unspecified dimension is computed using the specified dimension and the intrinsic proportions.
  15330. if (hasIntrinsicProportion) {
  15331. var width_3 = 0;
  15332. var height_3 = 0;
  15333. if (isLengthPercentage(first)) {
  15334. width_3 = getAbsoluteValue(first, bounds.width);
  15335. } else
  15336. if (isLengthPercentage(second)) {
  15337. height_3 = getAbsoluteValue(second, bounds.height);
  15338. }
  15339. if (isAuto(first)) {
  15340. width_3 = height_3 * intrinsicProportion;
  15341. } else
  15342. if (!second || isAuto(second)) {
  15343. height_3 = width_3 / intrinsicProportion;
  15344. }
  15345. return [width_3, height_3];
  15346. }
  15347. // If the image has no intrinsic proportions, it's stretched to the specified dimension.
  15348. // The unspecified dimension is computed using the image's corresponding intrinsic dimension,
  15349. // if there is one. If there is no such intrinsic dimension,
  15350. // it becomes the corresponding dimension of the background positioning area.
  15351. var width = null;
  15352. var height = null;
  15353. if (isLengthPercentage(first)) {
  15354. width = getAbsoluteValue(first, bounds.width);
  15355. } else
  15356. if (second && isLengthPercentage(second)) {
  15357. height = getAbsoluteValue(second, bounds.height);
  15358. }
  15359. if (width !== null && (!second || isAuto(second))) {
  15360. height =
  15361. hasIntrinsicWidth && hasIntrinsicHeight ?
  15362. width / intrinsicWidth * intrinsicHeight :
  15363. bounds.height;
  15364. }
  15365. if (height !== null && isAuto(first)) {
  15366. width =
  15367. hasIntrinsicWidth && hasIntrinsicHeight ?
  15368. height / intrinsicHeight * intrinsicWidth :
  15369. bounds.width;
  15370. }
  15371. if (width !== null && height !== null) {
  15372. return [width, height];
  15373. }
  15374. throw new Error("Unable to calculate background-size for element");
  15375. };
  15376. var getBackgroundValueForIndex = function getBackgroundValueForIndex(values, index) {
  15377. var value = values[index];
  15378. if (typeof value === 'undefined') {
  15379. return values[0];
  15380. }
  15381. return value;
  15382. };
  15383. var calculateBackgroundRepeatPath = function calculateBackgroundRepeatPath(repeat, _a, _b, backgroundPositioningArea, backgroundPaintingArea) {
  15384. var x = _a[0],y = _a[1];
  15385. var width = _b[0],height = _b[1];
  15386. switch (repeat) {
  15387. case BACKGROUND_REPEAT.REPEAT_X:
  15388. return [
  15389. new Vector(Math.round(backgroundPositioningArea.left), Math.round(backgroundPositioningArea.top + y)),
  15390. new Vector(Math.round(backgroundPositioningArea.left + backgroundPositioningArea.width), Math.round(backgroundPositioningArea.top + y)),
  15391. new Vector(Math.round(backgroundPositioningArea.left + backgroundPositioningArea.width), Math.round(height + backgroundPositioningArea.top + y)),
  15392. new Vector(Math.round(backgroundPositioningArea.left), Math.round(height + backgroundPositioningArea.top + y))];
  15393. case BACKGROUND_REPEAT.REPEAT_Y:
  15394. return [
  15395. new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top)),
  15396. new Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top)),
  15397. new Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.height + backgroundPositioningArea.top)),
  15398. new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.height + backgroundPositioningArea.top))];
  15399. case BACKGROUND_REPEAT.NO_REPEAT:
  15400. return [
  15401. new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top + y)),
  15402. new Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top + y)),
  15403. new Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top + y + height)),
  15404. new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top + y + height))];
  15405. default:
  15406. return [
  15407. new Vector(Math.round(backgroundPaintingArea.left), Math.round(backgroundPaintingArea.top)),
  15408. new Vector(Math.round(backgroundPaintingArea.left + backgroundPaintingArea.width), Math.round(backgroundPaintingArea.top)),
  15409. new Vector(Math.round(backgroundPaintingArea.left + backgroundPaintingArea.width), Math.round(backgroundPaintingArea.height + backgroundPaintingArea.top)),
  15410. new Vector(Math.round(backgroundPaintingArea.left), Math.round(backgroundPaintingArea.height + backgroundPaintingArea.top))];}
  15411. };
  15412. var SMALL_IMAGE = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
  15413. var SAMPLE_TEXT = 'Hidden Text';
  15414. var FontMetrics = /** @class */function () {
  15415. function FontMetrics(document) {
  15416. this._data = {};
  15417. this._document = document;
  15418. }
  15419. FontMetrics.prototype.parseMetrics = function (fontFamily, fontSize) {
  15420. var container = this._document.createElement('div');
  15421. var img = this._document.createElement('img');
  15422. var span = this._document.createElement('span');
  15423. var body = this._document.body;
  15424. container.style.visibility = 'hidden';
  15425. container.style.fontFamily = fontFamily;
  15426. container.style.fontSize = fontSize;
  15427. container.style.margin = '0';
  15428. container.style.padding = '0';
  15429. body.appendChild(container);
  15430. img.src = SMALL_IMAGE;
  15431. img.width = 1;
  15432. img.height = 1;
  15433. img.style.margin = '0';
  15434. img.style.padding = '0';
  15435. img.style.verticalAlign = 'baseline';
  15436. span.style.fontFamily = fontFamily;
  15437. span.style.fontSize = fontSize;
  15438. span.style.margin = '0';
  15439. span.style.padding = '0';
  15440. span.appendChild(this._document.createTextNode(SAMPLE_TEXT));
  15441. container.appendChild(span);
  15442. container.appendChild(img);
  15443. var baseline = img.offsetTop - span.offsetTop + 2;
  15444. container.removeChild(span);
  15445. container.appendChild(this._document.createTextNode(SAMPLE_TEXT));
  15446. container.style.lineHeight = 'normal';
  15447. img.style.verticalAlign = 'super';
  15448. var middle = img.offsetTop - container.offsetTop + 2;
  15449. body.removeChild(container);
  15450. return { baseline: baseline, middle: middle };
  15451. };
  15452. FontMetrics.prototype.getMetrics = function (fontFamily, fontSize) {
  15453. var key = fontFamily + " " + fontSize;
  15454. if (typeof this._data[key] === 'undefined') {
  15455. this._data[key] = this.parseMetrics(fontFamily, fontSize);
  15456. }
  15457. return this._data[key];
  15458. };
  15459. return FontMetrics;
  15460. }();
  15461. var MASK_OFFSET = 10000;
  15462. var CanvasRenderer = /** @class */function () {
  15463. function CanvasRenderer(options) {
  15464. this._activeEffects = [];
  15465. this.canvas = options.canvas ? options.canvas : document.createElement('canvas');
  15466. this.ctx = this.canvas.getContext('2d');
  15467. this.options = options;
  15468. if (!options.canvas) {
  15469. this.canvas.width = Math.floor(options.width * options.scale);
  15470. this.canvas.height = Math.floor(options.height * options.scale);
  15471. this.canvas.style.width = options.width + "px";
  15472. this.canvas.style.height = options.height + "px";
  15473. }
  15474. this.fontMetrics = new FontMetrics(document);
  15475. this.ctx.scale(this.options.scale, this.options.scale);
  15476. this.ctx.translate(-options.x + options.scrollX, -options.y + options.scrollY);
  15477. this.ctx.textBaseline = 'bottom';
  15478. this._activeEffects = [];
  15479. Logger.getInstance(options.id).debug("Canvas renderer initialized (" + options.width + "x" + options.height + " at " + options.x + "," + options.y + ") with scale " + options.scale);
  15480. }
  15481. CanvasRenderer.prototype.applyEffects = function (effects, target) {
  15482. var _this = this;
  15483. while (this._activeEffects.length) {
  15484. this.popEffect();
  15485. }
  15486. effects.filter(function (effect) {return contains(effect.target, target);}).forEach(function (effect) {return _this.applyEffect(effect);});
  15487. };
  15488. CanvasRenderer.prototype.applyEffect = function (effect) {
  15489. this.ctx.save();
  15490. if (isTransformEffect(effect)) {
  15491. this.ctx.translate(effect.offsetX, effect.offsetY);
  15492. this.ctx.transform(effect.matrix[0], effect.matrix[1], effect.matrix[2], effect.matrix[3], effect.matrix[4], effect.matrix[5]);
  15493. this.ctx.translate(-effect.offsetX, -effect.offsetY);
  15494. }
  15495. if (isClipEffect(effect)) {
  15496. this.path(effect.path);
  15497. this.ctx.clip();
  15498. }
  15499. this._activeEffects.push(effect);
  15500. };
  15501. CanvasRenderer.prototype.popEffect = function () {
  15502. this._activeEffects.pop();
  15503. this.ctx.restore();
  15504. };
  15505. CanvasRenderer.prototype.renderStack = function (stack) {
  15506. return __awaiter(this, void 0, void 0, function () {
  15507. var styles;
  15508. return __generator(this, function (_a) {
  15509. switch (_a.label) {
  15510. case 0:
  15511. styles = stack.element.container.styles;
  15512. if (!styles.isVisible()) return [3 /*break*/, 2];
  15513. this.ctx.globalAlpha = styles.opacity;
  15514. return [4 /*yield*/, this.renderStackContent(stack)];
  15515. case 1:
  15516. _a.sent();
  15517. _a.label = 2;
  15518. case 2:return [2 /*return*/];}
  15519. });
  15520. });
  15521. };
  15522. CanvasRenderer.prototype.renderNode = function (paint) {
  15523. return __awaiter(this, void 0, void 0, function () {
  15524. return __generator(this, function (_a) {
  15525. switch (_a.label) {
  15526. case 0:
  15527. if (!paint.container.styles.isVisible()) return [3 /*break*/, 3];
  15528. return [4 /*yield*/, this.renderNodeBackgroundAndBorders(paint)];
  15529. case 1:
  15530. _a.sent();
  15531. return [4 /*yield*/, this.renderNodeContent(paint)];
  15532. case 2:
  15533. _a.sent();
  15534. _a.label = 3;
  15535. case 3:return [2 /*return*/];}
  15536. });
  15537. });
  15538. };
  15539. CanvasRenderer.prototype.renderTextWithLetterSpacing = function (text, letterSpacing) {
  15540. var _this = this;
  15541. if (letterSpacing === 0) {
  15542. this.ctx.fillText(text.text, text.bounds.left, text.bounds.top + text.bounds.height);
  15543. } else
  15544. {
  15545. var letters = toCodePoints(text.text).map(function (i) {return fromCodePoint(i);});
  15546. letters.reduce(function (left, letter) {
  15547. _this.ctx.fillText(letter, left, text.bounds.top + text.bounds.height);
  15548. return left + _this.ctx.measureText(letter).width;
  15549. }, text.bounds.left);
  15550. }
  15551. };
  15552. CanvasRenderer.prototype.createFontStyle = function (styles) {
  15553. var fontVariant = styles.fontVariant.
  15554. filter(function (variant) {return variant === 'normal' || variant === 'small-caps';}).
  15555. join('');
  15556. var fontFamily = styles.fontFamily.join(', ');
  15557. var fontSize = isDimensionToken(styles.fontSize) ?
  15558. "" + styles.fontSize.number + styles.fontSize.unit :
  15559. styles.fontSize.number + "px";
  15560. return [
  15561. [styles.fontStyle, fontVariant, styles.fontWeight, fontSize, fontFamily].join(' '),
  15562. fontFamily,
  15563. fontSize];
  15564. };
  15565. CanvasRenderer.prototype.renderTextNode = function (text, styles) {
  15566. return __awaiter(this, void 0, void 0, function () {
  15567. var _a, font, fontFamily, fontSize;
  15568. var _this = this;
  15569. return __generator(this, function (_b) {
  15570. _a = this.createFontStyle(styles), font = _a[0], fontFamily = _a[1], fontSize = _a[2];
  15571. this.ctx.font = font;
  15572. text.textBounds.forEach(function (text) {
  15573. _this.ctx.fillStyle = asString(styles.color);
  15574. _this.renderTextWithLetterSpacing(text, styles.letterSpacing);
  15575. var textShadows = styles.textShadow;
  15576. if (textShadows.length && text.text.trim().length) {
  15577. textShadows.
  15578. slice(0).
  15579. reverse().
  15580. forEach(function (textShadow) {
  15581. _this.ctx.shadowColor = asString(textShadow.color);
  15582. _this.ctx.shadowOffsetX = textShadow.offsetX.number * _this.options.scale;
  15583. _this.ctx.shadowOffsetY = textShadow.offsetY.number * _this.options.scale;
  15584. _this.ctx.shadowBlur = textShadow.blur.number;
  15585. _this.ctx.fillText(text.text, text.bounds.left, text.bounds.top + text.bounds.height);
  15586. });
  15587. _this.ctx.shadowColor = '';
  15588. _this.ctx.shadowOffsetX = 0;
  15589. _this.ctx.shadowOffsetY = 0;
  15590. _this.ctx.shadowBlur = 0;
  15591. }
  15592. if (styles.textDecorationLine.length) {
  15593. _this.ctx.fillStyle = asString(styles.textDecorationColor || styles.color);
  15594. styles.textDecorationLine.forEach(function (textDecorationLine) {
  15595. switch (textDecorationLine) {
  15596. case 1 /* UNDERLINE */:
  15597. // Draws a line at the baseline of the font
  15598. // TODO As some browsers display the line as more than 1px if the font-size is big,
  15599. // need to take that into account both in position and size
  15600. var baseline = _this.fontMetrics.getMetrics(fontFamily, fontSize).baseline;
  15601. _this.ctx.fillRect(text.bounds.left, Math.round(text.bounds.top + baseline), text.bounds.width, 1);
  15602. break;
  15603. case 2 /* OVERLINE */:
  15604. _this.ctx.fillRect(text.bounds.left, Math.round(text.bounds.top), text.bounds.width, 1);
  15605. break;
  15606. case 3 /* LINE_THROUGH */:
  15607. // TODO try and find exact position for line-through
  15608. var middle = _this.fontMetrics.getMetrics(fontFamily, fontSize).middle;
  15609. _this.ctx.fillRect(text.bounds.left, Math.ceil(text.bounds.top + middle), text.bounds.width, 1);
  15610. break;}
  15611. });
  15612. }
  15613. });
  15614. return [2 /*return*/];
  15615. });
  15616. });
  15617. };
  15618. CanvasRenderer.prototype.renderReplacedElement = function (container, curves, image) {
  15619. if (image && container.intrinsicWidth > 0 && container.intrinsicHeight > 0) {
  15620. var box = contentBox(container);
  15621. var path = calculatePaddingBoxPath(curves);
  15622. this.path(path);
  15623. this.ctx.save();
  15624. this.ctx.clip();
  15625. this.ctx.drawImage(image, 0, 0, container.intrinsicWidth, container.intrinsicHeight, box.left, box.top, box.width, box.height);
  15626. this.ctx.restore();
  15627. }
  15628. };
  15629. CanvasRenderer.prototype.renderNodeContent = function (paint) {
  15630. return __awaiter(this, void 0, void 0, function () {
  15631. var container, curves, styles, _i, _a, child, image, e_1, image, e_2, iframeRenderer, canvas, size, bounds, x, textBounds, img, image, url, e_3, bounds;
  15632. return __generator(this, function (_b) {
  15633. switch (_b.label) {
  15634. case 0:
  15635. this.applyEffects(paint.effects, 4 /* CONTENT */);
  15636. container = paint.container;
  15637. curves = paint.curves;
  15638. styles = container.styles;
  15639. _i = 0, _a = container.textNodes;
  15640. _b.label = 1;
  15641. case 1:
  15642. if (!(_i < _a.length)) return [3 /*break*/, 4];
  15643. child = _a[_i];
  15644. return [4 /*yield*/, this.renderTextNode(child, styles)];
  15645. case 2:
  15646. _b.sent();
  15647. _b.label = 3;
  15648. case 3:
  15649. _i++;
  15650. return [3 /*break*/, 1];
  15651. case 4:
  15652. if (!(container instanceof ImageElementContainer)) return [3 /*break*/, 8];
  15653. _b.label = 5;
  15654. case 5:
  15655. _b.trys.push([5, 7,, 8]);
  15656. return [4 /*yield*/, this.options.cache.match(container.src)];
  15657. case 6:
  15658. image = _b.sent();
  15659. this.renderReplacedElement(container, curves, image);
  15660. return [3 /*break*/, 8];
  15661. case 7:
  15662. e_1 = _b.sent();
  15663. Logger.getInstance(this.options.id).error("Error loading image " + container.src);
  15664. return [3 /*break*/, 8];
  15665. case 8:
  15666. if (container instanceof CanvasElementContainer) {
  15667. this.renderReplacedElement(container, curves, container.canvas);
  15668. }
  15669. if (!(container instanceof SVGElementContainer)) return [3 /*break*/, 12];
  15670. _b.label = 9;
  15671. case 9:
  15672. _b.trys.push([9, 11,, 12]);
  15673. return [4 /*yield*/, this.options.cache.match(container.svg)];
  15674. case 10:
  15675. image = _b.sent();
  15676. this.renderReplacedElement(container, curves, image);
  15677. return [3 /*break*/, 12];
  15678. case 11:
  15679. e_2 = _b.sent();
  15680. Logger.getInstance(this.options.id).error("Error loading svg " + container.svg.substring(0, 255));
  15681. return [3 /*break*/, 12];
  15682. case 12:
  15683. if (!(container instanceof IFrameElementContainer && container.tree)) return [3 /*break*/, 14];
  15684. iframeRenderer = new CanvasRenderer({
  15685. id: this.options.id,
  15686. scale: this.options.scale,
  15687. backgroundColor: container.backgroundColor,
  15688. x: 0,
  15689. y: 0,
  15690. scrollX: 0,
  15691. scrollY: 0,
  15692. width: container.width,
  15693. height: container.height,
  15694. cache: this.options.cache,
  15695. windowWidth: container.width,
  15696. windowHeight: container.height });
  15697. return [4 /*yield*/, iframeRenderer.render(container.tree)];
  15698. case 13:
  15699. canvas = _b.sent();
  15700. if (container.width && container.height) {
  15701. this.ctx.drawImage(canvas, 0, 0, container.width, container.height, container.bounds.left, container.bounds.top, container.bounds.width, container.bounds.height);
  15702. }
  15703. _b.label = 14;
  15704. case 14:
  15705. if (container instanceof InputElementContainer) {
  15706. size = Math.min(container.bounds.width, container.bounds.height);
  15707. if (container.type === CHECKBOX) {
  15708. if (container.checked) {
  15709. this.ctx.save();
  15710. this.path([
  15711. new Vector(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79),
  15712. new Vector(container.bounds.left + size * 0.16, container.bounds.top + size * 0.5549),
  15713. new Vector(container.bounds.left + size * 0.27347, container.bounds.top + size * 0.44071),
  15714. new Vector(container.bounds.left + size * 0.39694, container.bounds.top + size * 0.5649),
  15715. new Vector(container.bounds.left + size * 0.72983, container.bounds.top + size * 0.23),
  15716. new Vector(container.bounds.left + size * 0.84, container.bounds.top + size * 0.34085),
  15717. new Vector(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79)]);
  15718. this.ctx.fillStyle = asString(INPUT_COLOR);
  15719. this.ctx.fill();
  15720. this.ctx.restore();
  15721. }
  15722. } else
  15723. if (container.type === RADIO) {
  15724. if (container.checked) {
  15725. this.ctx.save();
  15726. this.ctx.beginPath();
  15727. this.ctx.arc(container.bounds.left + size / 2, container.bounds.top + size / 2, size / 4, 0, Math.PI * 2, true);
  15728. this.ctx.fillStyle = asString(INPUT_COLOR);
  15729. this.ctx.fill();
  15730. this.ctx.restore();
  15731. }
  15732. }
  15733. }
  15734. if (isTextInputElement(container) && container.value.length) {
  15735. this.ctx.font = this.createFontStyle(styles)[0];
  15736. this.ctx.fillStyle = asString(styles.color);
  15737. this.ctx.textBaseline = 'middle';
  15738. this.ctx.textAlign = canvasTextAlign(container.styles.textAlign);
  15739. bounds = contentBox(container);
  15740. x = 0;
  15741. switch (container.styles.textAlign) {
  15742. case TEXT_ALIGN.CENTER:
  15743. x += bounds.width / 2;
  15744. break;
  15745. case TEXT_ALIGN.RIGHT:
  15746. x += bounds.width;
  15747. break;}
  15748. textBounds = bounds.add(x, 0, 0, -bounds.height / 2 + 1);
  15749. this.ctx.save();
  15750. this.path([
  15751. new Vector(bounds.left, bounds.top),
  15752. new Vector(bounds.left + bounds.width, bounds.top),
  15753. new Vector(bounds.left + bounds.width, bounds.top + bounds.height),
  15754. new Vector(bounds.left, bounds.top + bounds.height)]);
  15755. this.ctx.clip();
  15756. this.renderTextWithLetterSpacing(new TextBounds(container.value, textBounds), styles.letterSpacing);
  15757. this.ctx.restore();
  15758. this.ctx.textBaseline = 'bottom';
  15759. this.ctx.textAlign = 'left';
  15760. }
  15761. if (!contains(container.styles.display, 2048 /* LIST_ITEM */)) return [3 /*break*/, 20];
  15762. if (!(container.styles.listStyleImage !== null)) return [3 /*break*/, 19];
  15763. img = container.styles.listStyleImage;
  15764. if (!(img.type === CSSImageType.URL)) return [3 /*break*/, 18];
  15765. image = void 0;
  15766. url = img.url;
  15767. _b.label = 15;
  15768. case 15:
  15769. _b.trys.push([15, 17,, 18]);
  15770. return [4 /*yield*/, this.options.cache.match(url)];
  15771. case 16:
  15772. image = _b.sent();
  15773. this.ctx.drawImage(image, container.bounds.left - (image.width + 10), container.bounds.top);
  15774. return [3 /*break*/, 18];
  15775. case 17:
  15776. e_3 = _b.sent();
  15777. Logger.getInstance(this.options.id).error("Error loading list-style-image " + url);
  15778. return [3 /*break*/, 18];
  15779. case 18:return [3 /*break*/, 20];
  15780. case 19:
  15781. if (paint.listValue && container.styles.listStyleType !== LIST_STYLE_TYPE.NONE) {
  15782. this.ctx.font = this.createFontStyle(styles)[0];
  15783. this.ctx.fillStyle = asString(styles.color);
  15784. this.ctx.textBaseline = 'middle';
  15785. this.ctx.textAlign = 'right';
  15786. bounds = new Bounds(container.bounds.left, container.bounds.top + getAbsoluteValue(container.styles.paddingTop, container.bounds.width), container.bounds.width, computeLineHeight(styles.lineHeight, styles.fontSize.number) / 2 + 1);
  15787. this.renderTextWithLetterSpacing(new TextBounds(paint.listValue, bounds), styles.letterSpacing);
  15788. this.ctx.textBaseline = 'bottom';
  15789. this.ctx.textAlign = 'left';
  15790. }
  15791. _b.label = 20;
  15792. case 20:return [2 /*return*/];}
  15793. });
  15794. });
  15795. };
  15796. CanvasRenderer.prototype.renderStackContent = function (stack) {
  15797. return __awaiter(this, void 0, void 0, function () {
  15798. var _i, _a, child, _b, _c, child, _d, _e, child, _f, _g, child, _h, _j, child, _k, _l, child, _m, _o, child;
  15799. return __generator(this, function (_p) {
  15800. switch (_p.label) {
  15801. case 0:
  15802. // https://www.w3.org/TR/css-position-3/#painting-order
  15803. // 1. the background and borders of the element forming the stacking context.
  15804. return [4 /*yield*/, this.renderNodeBackgroundAndBorders(stack.element)];
  15805. case 1:
  15806. // https://www.w3.org/TR/css-position-3/#painting-order
  15807. // 1. the background and borders of the element forming the stacking context.
  15808. _p.sent();
  15809. _i = 0, _a = stack.negativeZIndex;
  15810. _p.label = 2;
  15811. case 2:
  15812. if (!(_i < _a.length)) return [3 /*break*/, 5];
  15813. child = _a[_i];
  15814. return [4 /*yield*/, this.renderStack(child)];
  15815. case 3:
  15816. _p.sent();
  15817. _p.label = 4;
  15818. case 4:
  15819. _i++;
  15820. return [3 /*break*/, 2];
  15821. case 5:
  15822. // 3. For all its in-flow, non-positioned, block-level descendants in tree order:
  15823. return [4 /*yield*/, this.renderNodeContent(stack.element)];
  15824. case 6:
  15825. // 3. For all its in-flow, non-positioned, block-level descendants in tree order:
  15826. _p.sent();
  15827. _b = 0, _c = stack.nonInlineLevel;
  15828. _p.label = 7;
  15829. case 7:
  15830. if (!(_b < _c.length)) return [3 /*break*/, 10];
  15831. child = _c[_b];
  15832. return [4 /*yield*/, this.renderNode(child)];
  15833. case 8:
  15834. _p.sent();
  15835. _p.label = 9;
  15836. case 9:
  15837. _b++;
  15838. return [3 /*break*/, 7];
  15839. case 10:
  15840. _d = 0, _e = stack.nonPositionedFloats;
  15841. _p.label = 11;
  15842. case 11:
  15843. if (!(_d < _e.length)) return [3 /*break*/, 14];
  15844. child = _e[_d];
  15845. return [4 /*yield*/, this.renderStack(child)];
  15846. case 12:
  15847. _p.sent();
  15848. _p.label = 13;
  15849. case 13:
  15850. _d++;
  15851. return [3 /*break*/, 11];
  15852. case 14:
  15853. _f = 0, _g = stack.nonPositionedInlineLevel;
  15854. _p.label = 15;
  15855. case 15:
  15856. if (!(_f < _g.length)) return [3 /*break*/, 18];
  15857. child = _g[_f];
  15858. return [4 /*yield*/, this.renderStack(child)];
  15859. case 16:
  15860. _p.sent();
  15861. _p.label = 17;
  15862. case 17:
  15863. _f++;
  15864. return [3 /*break*/, 15];
  15865. case 18:
  15866. _h = 0, _j = stack.inlineLevel;
  15867. _p.label = 19;
  15868. case 19:
  15869. if (!(_h < _j.length)) return [3 /*break*/, 22];
  15870. child = _j[_h];
  15871. return [4 /*yield*/, this.renderNode(child)];
  15872. case 20:
  15873. _p.sent();
  15874. _p.label = 21;
  15875. case 21:
  15876. _h++;
  15877. return [3 /*break*/, 19];
  15878. case 22:
  15879. _k = 0, _l = stack.zeroOrAutoZIndexOrTransformedOrOpacity;
  15880. _p.label = 23;
  15881. case 23:
  15882. if (!(_k < _l.length)) return [3 /*break*/, 26];
  15883. child = _l[_k];
  15884. return [4 /*yield*/, this.renderStack(child)];
  15885. case 24:
  15886. _p.sent();
  15887. _p.label = 25;
  15888. case 25:
  15889. _k++;
  15890. return [3 /*break*/, 23];
  15891. case 26:
  15892. _m = 0, _o = stack.positiveZIndex;
  15893. _p.label = 27;
  15894. case 27:
  15895. if (!(_m < _o.length)) return [3 /*break*/, 30];
  15896. child = _o[_m];
  15897. return [4 /*yield*/, this.renderStack(child)];
  15898. case 28:
  15899. _p.sent();
  15900. _p.label = 29;
  15901. case 29:
  15902. _m++;
  15903. return [3 /*break*/, 27];
  15904. case 30:return [2 /*return*/];}
  15905. });
  15906. });
  15907. };
  15908. CanvasRenderer.prototype.mask = function (paths) {
  15909. this.ctx.beginPath();
  15910. this.ctx.moveTo(0, 0);
  15911. this.ctx.lineTo(this.canvas.width, 0);
  15912. this.ctx.lineTo(this.canvas.width, this.canvas.height);
  15913. this.ctx.lineTo(0, this.canvas.height);
  15914. this.ctx.lineTo(0, 0);
  15915. this.formatPath(paths.slice(0).reverse());
  15916. this.ctx.closePath();
  15917. };
  15918. CanvasRenderer.prototype.path = function (paths) {
  15919. this.ctx.beginPath();
  15920. this.formatPath(paths);
  15921. this.ctx.closePath();
  15922. };
  15923. CanvasRenderer.prototype.formatPath = function (paths) {
  15924. var _this = this;
  15925. paths.forEach(function (point, index) {
  15926. var start = isBezierCurve(point) ? point.start : point;
  15927. if (index === 0) {
  15928. _this.ctx.moveTo(start.x, start.y);
  15929. } else
  15930. {
  15931. _this.ctx.lineTo(start.x, start.y);
  15932. }
  15933. if (isBezierCurve(point)) {
  15934. _this.ctx.bezierCurveTo(point.startControl.x, point.startControl.y, point.endControl.x, point.endControl.y, point.end.x, point.end.y);
  15935. }
  15936. });
  15937. };
  15938. CanvasRenderer.prototype.renderRepeat = function (path, pattern, offsetX, offsetY) {
  15939. this.path(path);
  15940. this.ctx.fillStyle = pattern;
  15941. this.ctx.translate(offsetX, offsetY);
  15942. this.ctx.fill();
  15943. this.ctx.translate(-offsetX, -offsetY);
  15944. };
  15945. CanvasRenderer.prototype.resizeImage = function (image, width, height) {
  15946. if (image.width === width && image.height === height) {
  15947. return image;
  15948. }
  15949. var canvas = this.canvas.ownerDocument.createElement('canvas');
  15950. canvas.width = width;
  15951. canvas.height = height;
  15952. var ctx = canvas.getContext('2d');
  15953. ctx.drawImage(image, 0, 0, image.width, image.height, 0, 0, width, height);
  15954. return canvas;
  15955. };
  15956. CanvasRenderer.prototype.renderBackgroundImage = function (container) {
  15957. return __awaiter(this, void 0, void 0, function () {
  15958. var index, _loop_1, this_1, _i, _a, backgroundImage;
  15959. return __generator(this, function (_b) {
  15960. switch (_b.label) {
  15961. case 0:
  15962. index = container.styles.backgroundImage.length - 1;
  15963. _loop_1 = function _loop_1(backgroundImage) {
  15964. var image, url, e_4, _a, path, x, y, width, height, pattern, _b, path, x, y, width, height, _c, lineLength, x0, x1, y0, y1, canvas, ctx, gradient_1, pattern, _d, path, left, top_1, width, height, position, x, y, _e, rx, ry, radialGradient_1, midX, midY, f, invF;
  15965. return __generator(this, function (_f) {
  15966. switch (_f.label) {
  15967. case 0:
  15968. if (!(backgroundImage.type === CSSImageType.URL)) return [3 /*break*/, 5];
  15969. image = void 0;
  15970. url = backgroundImage.url;
  15971. _f.label = 1;
  15972. case 1:
  15973. _f.trys.push([1, 3,, 4]);
  15974. return [4 /*yield*/, this_1.options.cache.match(url)];
  15975. case 2:
  15976. image = _f.sent();
  15977. return [3 /*break*/, 4];
  15978. case 3:
  15979. e_4 = _f.sent();
  15980. Logger.getInstance(this_1.options.id).error("Error loading background-image " + url);
  15981. return [3 /*break*/, 4];
  15982. case 4:
  15983. if (image) {
  15984. _a = calculateBackgroundRendering(container, index, [
  15985. image.width,
  15986. image.height,
  15987. image.width / image.height]),
  15988. path = _a[0], x = _a[1], y = _a[2], width = _a[3], height = _a[4];
  15989. pattern = this_1.ctx.createPattern(this_1.resizeImage(image, width, height), 'repeat');
  15990. this_1.renderRepeat(path, pattern, x, y);
  15991. }
  15992. return [3 /*break*/, 6];
  15993. case 5:
  15994. if (isLinearGradient(backgroundImage)) {
  15995. _b = calculateBackgroundRendering(container, index, [null, null, null]), path = _b[0], x = _b[1], y = _b[2], width = _b[3], height = _b[4];
  15996. _c = calculateGradientDirection(backgroundImage.angle, width, height), lineLength = _c[0], x0 = _c[1], x1 = _c[2], y0 = _c[3], y1 = _c[4];
  15997. canvas = document.createElement('canvas');
  15998. canvas.width = width;
  15999. canvas.height = height;
  16000. ctx = canvas.getContext('2d');
  16001. gradient_1 = ctx.createLinearGradient(x0, y0, x1, y1);
  16002. processColorStops(backgroundImage.stops, lineLength).forEach(function (colorStop) {
  16003. return gradient_1.addColorStop(colorStop.stop, asString(colorStop.color));
  16004. });
  16005. ctx.fillStyle = gradient_1;
  16006. ctx.fillRect(0, 0, width, height);
  16007. if (width > 0 && height > 0) {
  16008. pattern = this_1.ctx.createPattern(canvas, 'repeat');
  16009. this_1.renderRepeat(path, pattern, x, y);
  16010. }
  16011. } else
  16012. if (isRadialGradient(backgroundImage)) {
  16013. _d = calculateBackgroundRendering(container, index, [
  16014. null,
  16015. null,
  16016. null]),
  16017. path = _d[0], left = _d[1], top_1 = _d[2], width = _d[3], height = _d[4];
  16018. position = backgroundImage.position.length === 0 ? [FIFTY_PERCENT] : backgroundImage.position;
  16019. x = getAbsoluteValue(position[0], width);
  16020. y = getAbsoluteValue(position[position.length - 1], height);
  16021. _e = calculateRadius(backgroundImage, x, y, width, height), rx = _e[0], ry = _e[1];
  16022. if (rx > 0 && rx > 0) {
  16023. radialGradient_1 = this_1.ctx.createRadialGradient(left + x, top_1 + y, 0, left + x, top_1 + y, rx);
  16024. processColorStops(backgroundImage.stops, rx * 2).forEach(function (colorStop) {
  16025. return radialGradient_1.addColorStop(colorStop.stop, asString(colorStop.color));
  16026. });
  16027. this_1.path(path);
  16028. this_1.ctx.fillStyle = radialGradient_1;
  16029. if (rx !== ry) {
  16030. midX = container.bounds.left + 0.5 * container.bounds.width;
  16031. midY = container.bounds.top + 0.5 * container.bounds.height;
  16032. f = ry / rx;
  16033. invF = 1 / f;
  16034. this_1.ctx.save();
  16035. this_1.ctx.translate(midX, midY);
  16036. this_1.ctx.transform(1, 0, 0, f, 0, 0);
  16037. this_1.ctx.translate(-midX, -midY);
  16038. this_1.ctx.fillRect(left, invF * (top_1 - midY) + midY, width, height * invF);
  16039. this_1.ctx.restore();
  16040. } else
  16041. {
  16042. this_1.ctx.fill();
  16043. }
  16044. }
  16045. }
  16046. _f.label = 6;
  16047. case 6:
  16048. index--;
  16049. return [2 /*return*/];}
  16050. });
  16051. };
  16052. this_1 = this;
  16053. _i = 0, _a = container.styles.backgroundImage.slice(0).reverse();
  16054. _b.label = 1;
  16055. case 1:
  16056. if (!(_i < _a.length)) return [3 /*break*/, 4];
  16057. backgroundImage = _a[_i];
  16058. return [5 /*yield**/, _loop_1(backgroundImage)];
  16059. case 2:
  16060. _b.sent();
  16061. _b.label = 3;
  16062. case 3:
  16063. _i++;
  16064. return [3 /*break*/, 1];
  16065. case 4:return [2 /*return*/];}
  16066. });
  16067. });
  16068. };
  16069. CanvasRenderer.prototype.renderBorder = function (color, side, curvePoints) {
  16070. return __awaiter(this, void 0, void 0, function () {
  16071. return __generator(this, function (_a) {
  16072. this.path(parsePathForBorder(curvePoints, side));
  16073. this.ctx.fillStyle = asString(color);
  16074. this.ctx.fill();
  16075. return [2 /*return*/];
  16076. });
  16077. });
  16078. };
  16079. CanvasRenderer.prototype.renderNodeBackgroundAndBorders = function (paint) {
  16080. return __awaiter(this, void 0, void 0, function () {
  16081. var styles, hasBackground, borders, backgroundPaintingArea, side, _i, borders_1, border;
  16082. var _this = this;
  16083. return __generator(this, function (_a) {
  16084. switch (_a.label) {
  16085. case 0:
  16086. this.applyEffects(paint.effects, 2 /* BACKGROUND_BORDERS */);
  16087. styles = paint.container.styles;
  16088. hasBackground = !isTransparent(styles.backgroundColor) || styles.backgroundImage.length;
  16089. borders = [
  16090. { style: styles.borderTopStyle, color: styles.borderTopColor },
  16091. { style: styles.borderRightStyle, color: styles.borderRightColor },
  16092. { style: styles.borderBottomStyle, color: styles.borderBottomColor },
  16093. { style: styles.borderLeftStyle, color: styles.borderLeftColor }];
  16094. backgroundPaintingArea = calculateBackgroundCurvedPaintingArea(getBackgroundValueForIndex(styles.backgroundClip, 0), paint.curves);
  16095. if (!(hasBackground || styles.boxShadow.length)) return [3 /*break*/, 2];
  16096. this.ctx.save();
  16097. this.path(backgroundPaintingArea);
  16098. this.ctx.clip();
  16099. if (!isTransparent(styles.backgroundColor)) {
  16100. this.ctx.fillStyle = asString(styles.backgroundColor);
  16101. this.ctx.fill();
  16102. }
  16103. return [4 /*yield*/, this.renderBackgroundImage(paint.container)];
  16104. case 1:
  16105. _a.sent();
  16106. this.ctx.restore();
  16107. styles.boxShadow.
  16108. slice(0).
  16109. reverse().
  16110. forEach(function (shadow) {
  16111. _this.ctx.save();
  16112. var borderBoxArea = calculateBorderBoxPath(paint.curves);
  16113. var maskOffset = shadow.inset ? 0 : MASK_OFFSET;
  16114. var shadowPaintingArea = transformPath(borderBoxArea, -maskOffset + (shadow.inset ? 1 : -1) * shadow.spread.number, (shadow.inset ? 1 : -1) * shadow.spread.number, shadow.spread.number * (shadow.inset ? -2 : 2), shadow.spread.number * (shadow.inset ? -2 : 2));
  16115. if (shadow.inset) {
  16116. _this.path(borderBoxArea);
  16117. _this.ctx.clip();
  16118. _this.mask(shadowPaintingArea);
  16119. } else
  16120. {
  16121. _this.mask(borderBoxArea);
  16122. _this.ctx.clip();
  16123. _this.path(shadowPaintingArea);
  16124. }
  16125. _this.ctx.shadowOffsetX = shadow.offsetX.number + maskOffset;
  16126. _this.ctx.shadowOffsetY = shadow.offsetY.number;
  16127. _this.ctx.shadowColor = asString(shadow.color);
  16128. _this.ctx.shadowBlur = shadow.blur.number;
  16129. _this.ctx.fillStyle = shadow.inset ? asString(shadow.color) : 'rgba(0,0,0,1)';
  16130. _this.ctx.fill();
  16131. _this.ctx.restore();
  16132. });
  16133. _a.label = 2;
  16134. case 2:
  16135. side = 0;
  16136. _i = 0, borders_1 = borders;
  16137. _a.label = 3;
  16138. case 3:
  16139. if (!(_i < borders_1.length)) return [3 /*break*/, 7];
  16140. border = borders_1[_i];
  16141. if (!(border.style !== BORDER_STYLE.NONE && !isTransparent(border.color))) return [3 /*break*/, 5];
  16142. return [4 /*yield*/, this.renderBorder(border.color, side, paint.curves)];
  16143. case 4:
  16144. _a.sent();
  16145. _a.label = 5;
  16146. case 5:
  16147. side++;
  16148. _a.label = 6;
  16149. case 6:
  16150. _i++;
  16151. return [3 /*break*/, 3];
  16152. case 7:return [2 /*return*/];}
  16153. });
  16154. });
  16155. };
  16156. CanvasRenderer.prototype.render = function (element) {
  16157. return __awaiter(this, void 0, void 0, function () {
  16158. var stack;
  16159. return __generator(this, function (_a) {
  16160. switch (_a.label) {
  16161. case 0:
  16162. if (this.options.backgroundColor) {
  16163. this.ctx.fillStyle = asString(this.options.backgroundColor);
  16164. this.ctx.fillRect(this.options.x - this.options.scrollX, this.options.y - this.options.scrollY, this.options.width, this.options.height);
  16165. }
  16166. stack = parseStackingContexts(element);
  16167. return [4 /*yield*/, this.renderStack(stack)];
  16168. case 1:
  16169. _a.sent();
  16170. this.applyEffects([], 2 /* BACKGROUND_BORDERS */);
  16171. return [2 /*return*/, this.canvas];}
  16172. });
  16173. });
  16174. };
  16175. return CanvasRenderer;
  16176. }();
  16177. var isTextInputElement = function isTextInputElement(container) {
  16178. if (container instanceof TextareaElementContainer) {
  16179. return true;
  16180. } else
  16181. if (container instanceof SelectElementContainer) {
  16182. return true;
  16183. } else
  16184. if (container instanceof InputElementContainer && container.type !== RADIO && container.type !== CHECKBOX) {
  16185. return true;
  16186. }
  16187. return false;
  16188. };
  16189. var calculateBackgroundCurvedPaintingArea = function calculateBackgroundCurvedPaintingArea(clip, curves) {
  16190. switch (clip) {
  16191. case BACKGROUND_CLIP.BORDER_BOX:
  16192. return calculateBorderBoxPath(curves);
  16193. case BACKGROUND_CLIP.CONTENT_BOX:
  16194. return calculateContentBoxPath(curves);
  16195. case BACKGROUND_CLIP.PADDING_BOX:
  16196. default:
  16197. return calculatePaddingBoxPath(curves);}
  16198. };
  16199. var canvasTextAlign = function canvasTextAlign(textAlign) {
  16200. switch (textAlign) {
  16201. case TEXT_ALIGN.CENTER:
  16202. return 'center';
  16203. case TEXT_ALIGN.RIGHT:
  16204. return 'right';
  16205. case TEXT_ALIGN.LEFT:
  16206. default:
  16207. return 'left';}
  16208. };
  16209. var ForeignObjectRenderer = /** @class */function () {
  16210. function ForeignObjectRenderer(options) {
  16211. this.canvas = options.canvas ? options.canvas : document.createElement('canvas');
  16212. this.ctx = this.canvas.getContext('2d');
  16213. this.options = options;
  16214. this.canvas.width = Math.floor(options.width * options.scale);
  16215. this.canvas.height = Math.floor(options.height * options.scale);
  16216. this.canvas.style.width = options.width + "px";
  16217. this.canvas.style.height = options.height + "px";
  16218. this.ctx.scale(this.options.scale, this.options.scale);
  16219. this.ctx.translate(-options.x + options.scrollX, -options.y + options.scrollY);
  16220. Logger.getInstance(options.id).debug("EXPERIMENTAL ForeignObject renderer initialized (" + options.width + "x" + options.height + " at " + options.x + "," + options.y + ") with scale " + options.scale);
  16221. }
  16222. ForeignObjectRenderer.prototype.render = function (element) {
  16223. return __awaiter(this, void 0, void 0, function () {
  16224. var svg, img;
  16225. return __generator(this, function (_a) {
  16226. switch (_a.label) {
  16227. case 0:
  16228. svg = createForeignObjectSVG(Math.max(this.options.windowWidth, this.options.width) * this.options.scale, Math.max(this.options.windowHeight, this.options.height) * this.options.scale, this.options.scrollX * this.options.scale, this.options.scrollY * this.options.scale, element);
  16229. return [4 /*yield*/, loadSerializedSVG$1(svg)];
  16230. case 1:
  16231. img = _a.sent();
  16232. if (this.options.backgroundColor) {
  16233. this.ctx.fillStyle = asString(this.options.backgroundColor);
  16234. this.ctx.fillRect(0, 0, this.options.width * this.options.scale, this.options.height * this.options.scale);
  16235. }
  16236. this.ctx.drawImage(img, -this.options.x * this.options.scale, -this.options.y * this.options.scale);
  16237. return [2 /*return*/, this.canvas];}
  16238. });
  16239. });
  16240. };
  16241. return ForeignObjectRenderer;
  16242. }();
  16243. var loadSerializedSVG$1 = function loadSerializedSVG$1(svg) {
  16244. return new Promise(function (resolve, reject) {
  16245. var img = new Image();
  16246. img.onload = function () {
  16247. resolve(img);
  16248. };
  16249. img.onerror = reject;
  16250. img.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(svg));
  16251. });
  16252. };
  16253. var _this = undefined;
  16254. var parseColor$1 = function parseColor$1(value) {return color.parse(Parser.create(value).parseComponentValue());};
  16255. var html2canvas = function html2canvas(element, options) {
  16256. if (options === void 0) {options = {};}
  16257. return renderElement(element, options);
  16258. };
  16259. CacheStorage.setContext(window);
  16260. var renderElement = function renderElement(element, opts) {return __awaiter(_this, void 0, void 0, function () {
  16261. var ownerDocument, defaultView, instanceName, _a, width, height, left, top, defaultResourceOptions, resourceOptions, defaultOptions, options, windowBounds, documentCloner, clonedElement, container, documentBackgroundColor, bodyBackgroundColor, bgColor, defaultBackgroundColor, backgroundColor, renderOptions, canvas, renderer, root, renderer;
  16262. return __generator(this, function (_b) {
  16263. switch (_b.label) {
  16264. case 0:
  16265. ownerDocument = element.ownerDocument;
  16266. if (!ownerDocument) {
  16267. throw new Error("Element is not attached to a Document");
  16268. }
  16269. defaultView = ownerDocument.defaultView;
  16270. if (!defaultView) {
  16271. throw new Error("Document is not attached to a Window");
  16272. }
  16273. instanceName = (Math.round(Math.random() * 1000) + Date.now()).toString(16);
  16274. _a = isBodyElement(element) || isHTMLElement(element) ? parseDocumentSize(ownerDocument) : parseBounds(element), width = _a.width, height = _a.height, left = _a.left, top = _a.top;
  16275. defaultResourceOptions = {
  16276. allowTaint: false,
  16277. imageTimeout: 15000,
  16278. proxy: undefined,
  16279. useCORS: false };
  16280. resourceOptions = _assign({}, defaultResourceOptions, opts);
  16281. defaultOptions = {
  16282. backgroundColor: '#ffffff',
  16283. cache: opts.cache ? opts.cache : CacheStorage.create(instanceName, resourceOptions),
  16284. logging: true,
  16285. removeContainer: true,
  16286. foreignObjectRendering: false,
  16287. scale: defaultView.devicePixelRatio || 1,
  16288. windowWidth: defaultView.innerWidth,
  16289. windowHeight: defaultView.innerHeight,
  16290. scrollX: defaultView.pageXOffset,
  16291. scrollY: defaultView.pageYOffset,
  16292. x: left,
  16293. y: top,
  16294. width: Math.ceil(width),
  16295. height: Math.ceil(height),
  16296. id: instanceName };
  16297. options = _assign({}, defaultOptions, resourceOptions, opts);
  16298. windowBounds = new Bounds(options.scrollX, options.scrollY, options.windowWidth, options.windowHeight);
  16299. Logger.create({ id: instanceName, enabled: options.logging });
  16300. Logger.getInstance(instanceName).debug("Starting document clone");
  16301. documentCloner = new DocumentCloner(element, {
  16302. id: instanceName,
  16303. onclone: options.onclone,
  16304. ignoreElements: options.ignoreElements,
  16305. inlineImages: options.foreignObjectRendering,
  16306. copyStyles: options.foreignObjectRendering });
  16307. clonedElement = documentCloner.clonedReferenceElement;
  16308. if (!clonedElement) {
  16309. return [2 /*return*/, Promise.reject("Unable to find element in cloned iframe")];
  16310. }
  16311. return [4 /*yield*/, documentCloner.toIFrame(ownerDocument, windowBounds)];
  16312. case 1:
  16313. container = _b.sent();
  16314. documentBackgroundColor = ownerDocument.documentElement ?
  16315. parseColor$1(getComputedStyle(ownerDocument.documentElement).backgroundColor) :
  16316. COLORS.TRANSPARENT;
  16317. bodyBackgroundColor = ownerDocument.body ?
  16318. parseColor$1(getComputedStyle(ownerDocument.body).backgroundColor) :
  16319. COLORS.TRANSPARENT;
  16320. bgColor = opts.backgroundColor;
  16321. defaultBackgroundColor = typeof bgColor === 'string' ? parseColor$1(bgColor) : bgColor === null ? COLORS.TRANSPARENT : 0xffffffff;
  16322. backgroundColor = element === ownerDocument.documentElement ?
  16323. isTransparent(documentBackgroundColor) ?
  16324. isTransparent(bodyBackgroundColor) ?
  16325. defaultBackgroundColor :
  16326. bodyBackgroundColor :
  16327. documentBackgroundColor :
  16328. defaultBackgroundColor;
  16329. renderOptions = {
  16330. id: instanceName,
  16331. cache: options.cache,
  16332. canvas: options.canvas,
  16333. backgroundColor: backgroundColor,
  16334. scale: options.scale,
  16335. x: options.x,
  16336. y: options.y,
  16337. scrollX: options.scrollX,
  16338. scrollY: options.scrollY,
  16339. width: options.width,
  16340. height: options.height,
  16341. windowWidth: options.windowWidth,
  16342. windowHeight: options.windowHeight };
  16343. if (!options.foreignObjectRendering) return [3 /*break*/, 3];
  16344. Logger.getInstance(instanceName).debug("Document cloned, using foreign object rendering");
  16345. renderer = new ForeignObjectRenderer(renderOptions);
  16346. return [4 /*yield*/, renderer.render(clonedElement)];
  16347. case 2:
  16348. canvas = _b.sent();
  16349. return [3 /*break*/, 5];
  16350. case 3:
  16351. Logger.getInstance(instanceName).debug("Document cloned, using computed rendering");
  16352. CacheStorage.attachInstance(options.cache);
  16353. Logger.getInstance(instanceName).debug("Starting DOM parsing");
  16354. root = parseTree(clonedElement);
  16355. CacheStorage.detachInstance();
  16356. if (backgroundColor === root.styles.backgroundColor) {
  16357. root.styles.backgroundColor = COLORS.TRANSPARENT;
  16358. }
  16359. Logger.getInstance(instanceName).debug("Starting renderer");
  16360. renderer = new CanvasRenderer(renderOptions);
  16361. return [4 /*yield*/, renderer.render(root)];
  16362. case 4:
  16363. canvas = _b.sent();
  16364. _b.label = 5;
  16365. case 5:
  16366. if (options.removeContainer === true) {
  16367. if (!DocumentCloner.destroy(container)) {
  16368. Logger.getInstance(instanceName).error("Cannot detach cloned iframe as it is not in the DOM anymore");
  16369. }
  16370. }
  16371. Logger.getInstance(instanceName).debug("Finished rendering");
  16372. Logger.destroy(instanceName);
  16373. CacheStorage.destroy(instanceName);
  16374. return [2 /*return*/, canvas];}
  16375. });
  16376. });};
  16377. return html2canvas;
  16378. });
  16379. /***/ }),
  16380. /***/ 418:
  16381. /*!*********************************************************************************!*\
  16382. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/browser.js ***!
  16383. \*********************************************************************************/
  16384. /*! no static exports found */
  16385. /***/ (function(module, exports, __webpack_require__) {
  16386. var canPromise = __webpack_require__(/*! ./can-promise */ 419);
  16387. var QRCode = __webpack_require__(/*! ./core/qrcode */ 420);
  16388. var CanvasRenderer = __webpack_require__(/*! ./renderer/canvas */ 448);
  16389. var SvgRenderer = __webpack_require__(/*! ./renderer/svg-tag.js */ 450);
  16390. function renderCanvas(renderFunc, canvas, text, opts, cb) {
  16391. var args = [].slice.call(arguments, 1);
  16392. var argsNum = args.length;
  16393. var isLastArgCb = typeof args[argsNum - 1] === 'function';
  16394. if (!isLastArgCb && !canPromise()) {
  16395. throw new Error('Callback required as last argument');
  16396. }
  16397. if (isLastArgCb) {
  16398. if (argsNum < 2) {
  16399. throw new Error('Too few arguments provided');
  16400. }
  16401. if (argsNum === 2) {
  16402. cb = text;
  16403. text = canvas;
  16404. canvas = opts = undefined;
  16405. } else if (argsNum === 3) {
  16406. if (canvas.getContext && typeof cb === 'undefined') {
  16407. cb = opts;
  16408. opts = undefined;
  16409. } else {
  16410. cb = opts;
  16411. opts = text;
  16412. text = canvas;
  16413. canvas = undefined;
  16414. }
  16415. }
  16416. } else {
  16417. if (argsNum < 1) {
  16418. throw new Error('Too few arguments provided');
  16419. }
  16420. if (argsNum === 1) {
  16421. text = canvas;
  16422. canvas = opts = undefined;
  16423. } else if (argsNum === 2 && !canvas.getContext) {
  16424. opts = text;
  16425. text = canvas;
  16426. canvas = undefined;
  16427. }
  16428. return new Promise(function (resolve, reject) {
  16429. try {
  16430. var data = QRCode.create(text, opts);
  16431. resolve(renderFunc(data, canvas, opts));
  16432. } catch (e) {
  16433. reject(e);
  16434. }
  16435. });
  16436. }
  16437. try {
  16438. var data = QRCode.create(text, opts);
  16439. cb(null, renderFunc(data, canvas, opts));
  16440. } catch (e) {
  16441. cb(e);
  16442. }
  16443. }
  16444. exports.create = QRCode.create;
  16445. exports.toCanvas = renderCanvas.bind(null, CanvasRenderer.render);
  16446. exports.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL);
  16447. // only svg for now.
  16448. exports.toString = renderCanvas.bind(null, function (data, _, opts) {
  16449. return SvgRenderer.render(data, opts);
  16450. });
  16451. /***/ }),
  16452. /***/ 419:
  16453. /*!*************************************************************************************!*\
  16454. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/can-promise.js ***!
  16455. \*************************************************************************************/
  16456. /*! no static exports found */
  16457. /***/ (function(module, exports) {
  16458. // can-promise has a crash in some versions of react native that dont have
  16459. // standard global objects
  16460. // https://github.com/soldair/node-qrcode/issues/157
  16461. module.exports = function () {
  16462. return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then;
  16463. };
  16464. /***/ }),
  16465. /***/ 420:
  16466. /*!*************************************************************************************!*\
  16467. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/qrcode.js ***!
  16468. \*************************************************************************************/
  16469. /*! no static exports found */
  16470. /***/ (function(module, exports, __webpack_require__) {
  16471. var BufferUtil = __webpack_require__(/*! ../utils/buffer */ 421);
  16472. var Utils = __webpack_require__(/*! ./utils */ 423);
  16473. var ECLevel = __webpack_require__(/*! ./error-correction-level */ 424);
  16474. var BitBuffer = __webpack_require__(/*! ./bit-buffer */ 425);
  16475. var BitMatrix = __webpack_require__(/*! ./bit-matrix */ 426);
  16476. var AlignmentPattern = __webpack_require__(/*! ./alignment-pattern */ 427);
  16477. var FinderPattern = __webpack_require__(/*! ./finder-pattern */ 428);
  16478. var MaskPattern = __webpack_require__(/*! ./mask-pattern */ 429);
  16479. var ECCode = __webpack_require__(/*! ./error-correction-code */ 430);
  16480. var ReedSolomonEncoder = __webpack_require__(/*! ./reed-solomon-encoder */ 431);
  16481. var Version = __webpack_require__(/*! ./version */ 437);
  16482. var FormatInfo = __webpack_require__(/*! ./format-info */ 441);
  16483. var Mode = __webpack_require__(/*! ./mode */ 438);
  16484. var Segments = __webpack_require__(/*! ./segments */ 442);
  16485. var isArray = __webpack_require__(/*! isarray */ 422);
  16486. /**
  16487. * QRCode for JavaScript
  16488. *
  16489. * modified by Ryan Day for nodejs support
  16490. * Copyright (c) 2011 Ryan Day
  16491. *
  16492. * Licensed under the MIT license:
  16493. * http://www.opensource.org/licenses/mit-license.php
  16494. *
  16495. //---------------------------------------------------------------------
  16496. // QRCode for JavaScript
  16497. //
  16498. // Copyright (c) 2009 Kazuhiko Arase
  16499. //
  16500. // URL: http://www.d-project.com/
  16501. //
  16502. // Licensed under the MIT license:
  16503. // http://www.opensource.org/licenses/mit-license.php
  16504. //
  16505. // The word "QR Code" is registered trademark of
  16506. // DENSO WAVE INCORPORATED
  16507. // http://www.denso-wave.com/qrcode/faqpatent-e.html
  16508. //
  16509. //---------------------------------------------------------------------
  16510. */
  16511. /**
  16512. * Add finder patterns bits to matrix
  16513. *
  16514. * @param {BitMatrix} matrix Modules matrix
  16515. * @param {Number} version QR Code version
  16516. */
  16517. function setupFinderPattern(matrix, version) {
  16518. var size = matrix.size;
  16519. var pos = FinderPattern.getPositions(version);
  16520. for (var i = 0; i < pos.length; i++) {
  16521. var row = pos[i][0];
  16522. var col = pos[i][1];
  16523. for (var r = -1; r <= 7; r++) {
  16524. if (row + r <= -1 || size <= row + r) continue;
  16525. for (var c = -1; c <= 7; c++) {
  16526. if (col + c <= -1 || size <= col + c) continue;
  16527. if (r >= 0 && r <= 6 && (c === 0 || c === 6) ||
  16528. c >= 0 && c <= 6 && (r === 0 || r === 6) ||
  16529. r >= 2 && r <= 4 && c >= 2 && c <= 4) {
  16530. matrix.set(row + r, col + c, true, true);
  16531. } else {
  16532. matrix.set(row + r, col + c, false, true);
  16533. }
  16534. }
  16535. }
  16536. }
  16537. }
  16538. /**
  16539. * Add timing pattern bits to matrix
  16540. *
  16541. * Note: this function must be called before {@link setupAlignmentPattern}
  16542. *
  16543. * @param {BitMatrix} matrix Modules matrix
  16544. */
  16545. function setupTimingPattern(matrix) {
  16546. var size = matrix.size;
  16547. for (var r = 8; r < size - 8; r++) {
  16548. var value = r % 2 === 0;
  16549. matrix.set(r, 6, value, true);
  16550. matrix.set(6, r, value, true);
  16551. }
  16552. }
  16553. /**
  16554. * Add alignment patterns bits to matrix
  16555. *
  16556. * Note: this function must be called after {@link setupTimingPattern}
  16557. *
  16558. * @param {BitMatrix} matrix Modules matrix
  16559. * @param {Number} version QR Code version
  16560. */
  16561. function setupAlignmentPattern(matrix, version) {
  16562. var pos = AlignmentPattern.getPositions(version);
  16563. for (var i = 0; i < pos.length; i++) {
  16564. var row = pos[i][0];
  16565. var col = pos[i][1];
  16566. for (var r = -2; r <= 2; r++) {
  16567. for (var c = -2; c <= 2; c++) {
  16568. if (r === -2 || r === 2 || c === -2 || c === 2 ||
  16569. r === 0 && c === 0) {
  16570. matrix.set(row + r, col + c, true, true);
  16571. } else {
  16572. matrix.set(row + r, col + c, false, true);
  16573. }
  16574. }
  16575. }
  16576. }
  16577. }
  16578. /**
  16579. * Add version info bits to matrix
  16580. *
  16581. * @param {BitMatrix} matrix Modules matrix
  16582. * @param {Number} version QR Code version
  16583. */
  16584. function setupVersionInfo(matrix, version) {
  16585. var size = matrix.size;
  16586. var bits = Version.getEncodedBits(version);
  16587. var row, col, mod;
  16588. for (var i = 0; i < 18; i++) {
  16589. row = Math.floor(i / 3);
  16590. col = i % 3 + size - 8 - 3;
  16591. mod = (bits >> i & 1) === 1;
  16592. matrix.set(row, col, mod, true);
  16593. matrix.set(col, row, mod, true);
  16594. }
  16595. }
  16596. /**
  16597. * Add format info bits to matrix
  16598. *
  16599. * @param {BitMatrix} matrix Modules matrix
  16600. * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
  16601. * @param {Number} maskPattern Mask pattern reference value
  16602. */
  16603. function setupFormatInfo(matrix, errorCorrectionLevel, maskPattern) {
  16604. var size = matrix.size;
  16605. var bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern);
  16606. var i, mod;
  16607. for (i = 0; i < 15; i++) {
  16608. mod = (bits >> i & 1) === 1;
  16609. // vertical
  16610. if (i < 6) {
  16611. matrix.set(i, 8, mod, true);
  16612. } else if (i < 8) {
  16613. matrix.set(i + 1, 8, mod, true);
  16614. } else {
  16615. matrix.set(size - 15 + i, 8, mod, true);
  16616. }
  16617. // horizontal
  16618. if (i < 8) {
  16619. matrix.set(8, size - i - 1, mod, true);
  16620. } else if (i < 9) {
  16621. matrix.set(8, 15 - i - 1 + 1, mod, true);
  16622. } else {
  16623. matrix.set(8, 15 - i - 1, mod, true);
  16624. }
  16625. }
  16626. // fixed module
  16627. matrix.set(size - 8, 8, 1, true);
  16628. }
  16629. /**
  16630. * Add encoded data bits to matrix
  16631. *
  16632. * @param {BitMatrix} matrix Modules matrix
  16633. * @param {Buffer} data Data codewords
  16634. */
  16635. function setupData(matrix, data) {
  16636. var size = matrix.size;
  16637. var inc = -1;
  16638. var row = size - 1;
  16639. var bitIndex = 7;
  16640. var byteIndex = 0;
  16641. for (var col = size - 1; col > 0; col -= 2) {
  16642. if (col === 6) col--;
  16643. while (true) {
  16644. for (var c = 0; c < 2; c++) {
  16645. if (!matrix.isReserved(row, col - c)) {
  16646. var dark = false;
  16647. if (byteIndex < data.length) {
  16648. dark = (data[byteIndex] >>> bitIndex & 1) === 1;
  16649. }
  16650. matrix.set(row, col - c, dark);
  16651. bitIndex--;
  16652. if (bitIndex === -1) {
  16653. byteIndex++;
  16654. bitIndex = 7;
  16655. }
  16656. }
  16657. }
  16658. row += inc;
  16659. if (row < 0 || size <= row) {
  16660. row -= inc;
  16661. inc = -inc;
  16662. break;
  16663. }
  16664. }
  16665. }
  16666. }
  16667. /**
  16668. * Create encoded codewords from data input
  16669. *
  16670. * @param {Number} version QR Code version
  16671. * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
  16672. * @param {ByteData} data Data input
  16673. * @return {Buffer} Buffer containing encoded codewords
  16674. */
  16675. function createData(version, errorCorrectionLevel, segments) {
  16676. // Prepare data buffer
  16677. var buffer = new BitBuffer();
  16678. segments.forEach(function (data) {
  16679. // prefix data with mode indicator (4 bits)
  16680. buffer.put(data.mode.bit, 4);
  16681. // Prefix data with character count indicator.
  16682. // The character count indicator is a string of bits that represents the
  16683. // number of characters that are being encoded.
  16684. // The character count indicator must be placed after the mode indicator
  16685. // and must be a certain number of bits long, depending on the QR version
  16686. // and data mode
  16687. // @see {@link Mode.getCharCountIndicator}.
  16688. buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version));
  16689. // add binary data sequence to buffer
  16690. data.write(buffer);
  16691. });
  16692. // Calculate required number of bits
  16693. var totalCodewords = Utils.getSymbolTotalCodewords(version);
  16694. var ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel);
  16695. var dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8;
  16696. // Add a terminator.
  16697. // If the bit string is shorter than the total number of required bits,
  16698. // a terminator of up to four 0s must be added to the right side of the string.
  16699. // If the bit string is more than four bits shorter than the required number of bits,
  16700. // add four 0s to the end.
  16701. if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {
  16702. buffer.put(0, 4);
  16703. }
  16704. // If the bit string is fewer than four bits shorter, add only the number of 0s that
  16705. // are needed to reach the required number of bits.
  16706. // After adding the terminator, if the number of bits in the string is not a multiple of 8,
  16707. // pad the string on the right with 0s to make the string's length a multiple of 8.
  16708. while (buffer.getLengthInBits() % 8 !== 0) {
  16709. buffer.putBit(0);
  16710. }
  16711. // Add pad bytes if the string is still shorter than the total number of required bits.
  16712. // Extend the buffer to fill the data capacity of the symbol corresponding to
  16713. // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)
  16714. // and 00010001 (0x11) alternately.
  16715. var remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8;
  16716. for (var i = 0; i < remainingByte; i++) {
  16717. buffer.put(i % 2 ? 0x11 : 0xEC, 8);
  16718. }
  16719. return createCodewords(buffer, version, errorCorrectionLevel);
  16720. }
  16721. /**
  16722. * Encode input data with Reed-Solomon and return codewords with
  16723. * relative error correction bits
  16724. *
  16725. * @param {BitBuffer} bitBuffer Data to encode
  16726. * @param {Number} version QR Code version
  16727. * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
  16728. * @return {Buffer} Buffer containing encoded codewords
  16729. */
  16730. function createCodewords(bitBuffer, version, errorCorrectionLevel) {
  16731. // Total codewords for this QR code version (Data + Error correction)
  16732. var totalCodewords = Utils.getSymbolTotalCodewords(version);
  16733. // Total number of error correction codewords
  16734. var ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel);
  16735. // Total number of data codewords
  16736. var dataTotalCodewords = totalCodewords - ecTotalCodewords;
  16737. // Total number of blocks
  16738. var ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel);
  16739. // Calculate how many blocks each group should contain
  16740. var blocksInGroup2 = totalCodewords % ecTotalBlocks;
  16741. var blocksInGroup1 = ecTotalBlocks - blocksInGroup2;
  16742. var totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks);
  16743. var dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks);
  16744. var dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1;
  16745. // Number of EC codewords is the same for both groups
  16746. var ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1;
  16747. // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount
  16748. var rs = new ReedSolomonEncoder(ecCount);
  16749. var offset = 0;
  16750. var dcData = new Array(ecTotalBlocks);
  16751. var ecData = new Array(ecTotalBlocks);
  16752. var maxDataSize = 0;
  16753. var buffer = BufferUtil.from(bitBuffer.buffer);
  16754. // Divide the buffer into the required number of blocks
  16755. for (var b = 0; b < ecTotalBlocks; b++) {
  16756. var dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2;
  16757. // extract a block of data from buffer
  16758. dcData[b] = buffer.slice(offset, offset + dataSize);
  16759. // Calculate EC codewords for this data block
  16760. ecData[b] = rs.encode(dcData[b]);
  16761. offset += dataSize;
  16762. maxDataSize = Math.max(maxDataSize, dataSize);
  16763. }
  16764. // Create final data
  16765. // Interleave the data and error correction codewords from each block
  16766. var data = BufferUtil.alloc(totalCodewords);
  16767. var index = 0;
  16768. var i, r;
  16769. // Add data codewords
  16770. for (i = 0; i < maxDataSize; i++) {
  16771. for (r = 0; r < ecTotalBlocks; r++) {
  16772. if (i < dcData[r].length) {
  16773. data[index++] = dcData[r][i];
  16774. }
  16775. }
  16776. }
  16777. // Apped EC codewords
  16778. for (i = 0; i < ecCount; i++) {
  16779. for (r = 0; r < ecTotalBlocks; r++) {
  16780. data[index++] = ecData[r][i];
  16781. }
  16782. }
  16783. return data;
  16784. }
  16785. /**
  16786. * Build QR Code symbol
  16787. *
  16788. * @param {String} data Input string
  16789. * @param {Number} version QR Code version
  16790. * @param {ErrorCorretionLevel} errorCorrectionLevel Error level
  16791. * @param {MaskPattern} maskPattern Mask pattern
  16792. * @return {Object} Object containing symbol data
  16793. */
  16794. function createSymbol(data, version, errorCorrectionLevel, maskPattern) {
  16795. var segments;
  16796. if (isArray(data)) {
  16797. segments = Segments.fromArray(data);
  16798. } else if (typeof data === 'string') {
  16799. var estimatedVersion = version;
  16800. if (!estimatedVersion) {
  16801. var rawSegments = Segments.rawSplit(data);
  16802. // Estimate best version that can contain raw splitted segments
  16803. estimatedVersion = Version.getBestVersionForData(rawSegments,
  16804. errorCorrectionLevel);
  16805. }
  16806. // Build optimized segments
  16807. // If estimated version is undefined, try with the highest version
  16808. segments = Segments.fromString(data, estimatedVersion || 40);
  16809. } else {
  16810. throw new Error('Invalid data');
  16811. }
  16812. // Get the min version that can contain data
  16813. var bestVersion = Version.getBestVersionForData(segments,
  16814. errorCorrectionLevel);
  16815. // If no version is found, data cannot be stored
  16816. if (!bestVersion) {
  16817. throw new Error('The amount of data is too big to be stored in a QR Code');
  16818. }
  16819. // If not specified, use min version as default
  16820. if (!version) {
  16821. version = bestVersion;
  16822. // Check if the specified version can contain the data
  16823. } else if (version < bestVersion) {
  16824. throw new Error('\n' +
  16825. 'The chosen QR Code version cannot contain this amount of data.\n' +
  16826. 'Minimum version required to store current data is: ' + bestVersion + '.\n');
  16827. }
  16828. var dataBits = createData(version, errorCorrectionLevel, segments);
  16829. // Allocate matrix buffer
  16830. var moduleCount = Utils.getSymbolSize(version);
  16831. var modules = new BitMatrix(moduleCount);
  16832. // Add function modules
  16833. setupFinderPattern(modules, version);
  16834. setupTimingPattern(modules);
  16835. setupAlignmentPattern(modules, version);
  16836. // Add temporary dummy bits for format info just to set them as reserved.
  16837. // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}
  16838. // since the masking operation must be performed only on the encoding region.
  16839. // These blocks will be replaced with correct values later in code.
  16840. setupFormatInfo(modules, errorCorrectionLevel, 0);
  16841. if (version >= 7) {
  16842. setupVersionInfo(modules, version);
  16843. }
  16844. // Add data codewords
  16845. setupData(modules, dataBits);
  16846. if (isNaN(maskPattern)) {
  16847. // Find best mask pattern
  16848. maskPattern = MaskPattern.getBestMask(modules,
  16849. setupFormatInfo.bind(null, modules, errorCorrectionLevel));
  16850. }
  16851. // Apply mask pattern
  16852. MaskPattern.applyMask(maskPattern, modules);
  16853. // Replace format info bits with correct values
  16854. setupFormatInfo(modules, errorCorrectionLevel, maskPattern);
  16855. return {
  16856. modules: modules,
  16857. version: version,
  16858. errorCorrectionLevel: errorCorrectionLevel,
  16859. maskPattern: maskPattern,
  16860. segments: segments };
  16861. }
  16862. /**
  16863. * QR Code
  16864. *
  16865. * @param {String | Array} data Input data
  16866. * @param {Object} options Optional configurations
  16867. * @param {Number} options.version QR Code version
  16868. * @param {String} options.errorCorrectionLevel Error correction level
  16869. * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis
  16870. */
  16871. exports.create = function create(data, options) {
  16872. if (typeof data === 'undefined' || data === '') {
  16873. throw new Error('No input text');
  16874. }
  16875. var errorCorrectionLevel = ECLevel.M;
  16876. var version;
  16877. var mask;
  16878. if (typeof options !== 'undefined') {
  16879. // Use higher error correction level as default
  16880. errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M);
  16881. version = Version.from(options.version);
  16882. mask = MaskPattern.from(options.maskPattern);
  16883. if (options.toSJISFunc) {
  16884. Utils.setToSJISFunction(options.toSJISFunc);
  16885. }
  16886. }
  16887. return createSymbol(data, version, errorCorrectionLevel, mask);
  16888. };
  16889. /***/ }),
  16890. /***/ 421:
  16891. /*!*************************************************************************************************!*\
  16892. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/utils/typedarray-buffer.js ***!
  16893. \*************************************************************************************************/
  16894. /*! no static exports found */
  16895. /***/ (function(module, exports, __webpack_require__) {
  16896. "use strict";
  16897. /**
  16898. * Implementation of a subset of node.js Buffer methods for the browser.
  16899. * Based on https://github.com/feross/buffer
  16900. */
  16901. /* eslint-disable no-proto */
  16902. var isArray = __webpack_require__(/*! isarray */ 422);
  16903. function typedArraySupport() {
  16904. // Can typed array instances be augmented?
  16905. try {
  16906. var arr = new Uint8Array(1);
  16907. arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function foo() {return 42;} };
  16908. return arr.foo() === 42;
  16909. } catch (e) {
  16910. return false;
  16911. }
  16912. }
  16913. Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport();
  16914. var K_MAX_LENGTH = Buffer.TYPED_ARRAY_SUPPORT ?
  16915. 0x7fffffff :
  16916. 0x3fffffff;
  16917. function Buffer(arg, offset, length) {
  16918. if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
  16919. return new Buffer(arg, offset, length);
  16920. }
  16921. if (typeof arg === 'number') {
  16922. return allocUnsafe(this, arg);
  16923. }
  16924. return from(this, arg, offset, length);
  16925. }
  16926. if (Buffer.TYPED_ARRAY_SUPPORT) {
  16927. Buffer.prototype.__proto__ = Uint8Array.prototype;
  16928. Buffer.__proto__ = Uint8Array;
  16929. // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
  16930. if (typeof Symbol !== 'undefined' && Symbol.species &&
  16931. Buffer[Symbol.species] === Buffer) {
  16932. Object.defineProperty(Buffer, Symbol.species, {
  16933. value: null,
  16934. configurable: true,
  16935. enumerable: false,
  16936. writable: false });
  16937. }
  16938. }
  16939. function checked(length) {
  16940. // Note: cannot use `length < K_MAX_LENGTH` here because that fails when
  16941. // length is NaN (which is otherwise coerced to zero.)
  16942. if (length >= K_MAX_LENGTH) {
  16943. throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
  16944. 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes');
  16945. }
  16946. return length | 0;
  16947. }
  16948. function isnan(val) {
  16949. return val !== val; // eslint-disable-line no-self-compare
  16950. }
  16951. function createBuffer(that, length) {
  16952. var buf;
  16953. if (Buffer.TYPED_ARRAY_SUPPORT) {
  16954. buf = new Uint8Array(length);
  16955. buf.__proto__ = Buffer.prototype;
  16956. } else {
  16957. // Fallback: Return an object instance of the Buffer class
  16958. buf = that;
  16959. if (buf === null) {
  16960. buf = new Buffer(length);
  16961. }
  16962. buf.length = length;
  16963. }
  16964. return buf;
  16965. }
  16966. function allocUnsafe(that, size) {
  16967. var buf = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
  16968. if (!Buffer.TYPED_ARRAY_SUPPORT) {
  16969. for (var i = 0; i < size; ++i) {
  16970. buf[i] = 0;
  16971. }
  16972. }
  16973. return buf;
  16974. }
  16975. function fromString(that, string) {
  16976. var length = byteLength(string) | 0;
  16977. var buf = createBuffer(that, length);
  16978. var actual = buf.write(string);
  16979. if (actual !== length) {
  16980. // Writing a hex string, for example, that contains invalid characters will
  16981. // cause everything after the first invalid character to be ignored. (e.g.
  16982. // 'abxxcd' will be treated as 'ab')
  16983. buf = buf.slice(0, actual);
  16984. }
  16985. return buf;
  16986. }
  16987. function fromArrayLike(that, array) {
  16988. var length = array.length < 0 ? 0 : checked(array.length) | 0;
  16989. var buf = createBuffer(that, length);
  16990. for (var i = 0; i < length; i += 1) {
  16991. buf[i] = array[i] & 255;
  16992. }
  16993. return buf;
  16994. }
  16995. function fromArrayBuffer(that, array, byteOffset, length) {
  16996. if (byteOffset < 0 || array.byteLength < byteOffset) {
  16997. throw new RangeError('\'offset\' is out of bounds');
  16998. }
  16999. if (array.byteLength < byteOffset + (length || 0)) {
  17000. throw new RangeError('\'length\' is out of bounds');
  17001. }
  17002. var buf;
  17003. if (byteOffset === undefined && length === undefined) {
  17004. buf = new Uint8Array(array);
  17005. } else if (length === undefined) {
  17006. buf = new Uint8Array(array, byteOffset);
  17007. } else {
  17008. buf = new Uint8Array(array, byteOffset, length);
  17009. }
  17010. if (Buffer.TYPED_ARRAY_SUPPORT) {
  17011. // Return an augmented `Uint8Array` instance, for best performance
  17012. buf.__proto__ = Buffer.prototype;
  17013. } else {
  17014. // Fallback: Return an object instance of the Buffer class
  17015. buf = fromArrayLike(that, buf);
  17016. }
  17017. return buf;
  17018. }
  17019. function fromObject(that, obj) {
  17020. if (Buffer.isBuffer(obj)) {
  17021. var len = checked(obj.length) | 0;
  17022. var buf = createBuffer(that, len);
  17023. if (buf.length === 0) {
  17024. return buf;
  17025. }
  17026. obj.copy(buf, 0, 0, len);
  17027. return buf;
  17028. }
  17029. if (obj) {
  17030. if (typeof ArrayBuffer !== 'undefined' &&
  17031. obj.buffer instanceof ArrayBuffer || 'length' in obj) {
  17032. if (typeof obj.length !== 'number' || isnan(obj.length)) {
  17033. return createBuffer(that, 0);
  17034. }
  17035. return fromArrayLike(that, obj);
  17036. }
  17037. if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
  17038. return fromArrayLike(that, obj.data);
  17039. }
  17040. }
  17041. throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');
  17042. }
  17043. function utf8ToBytes(string, units) {
  17044. units = units || Infinity;
  17045. var codePoint;
  17046. var length = string.length;
  17047. var leadSurrogate = null;
  17048. var bytes = [];
  17049. for (var i = 0; i < length; ++i) {
  17050. codePoint = string.charCodeAt(i);
  17051. // is surrogate component
  17052. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  17053. // last char was a lead
  17054. if (!leadSurrogate) {
  17055. // no lead yet
  17056. if (codePoint > 0xDBFF) {
  17057. // unexpected trail
  17058. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  17059. continue;
  17060. } else if (i + 1 === length) {
  17061. // unpaired lead
  17062. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  17063. continue;
  17064. }
  17065. // valid lead
  17066. leadSurrogate = codePoint;
  17067. continue;
  17068. }
  17069. // 2 leads in a row
  17070. if (codePoint < 0xDC00) {
  17071. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  17072. leadSurrogate = codePoint;
  17073. continue;
  17074. }
  17075. // valid surrogate pair
  17076. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
  17077. } else if (leadSurrogate) {
  17078. // valid bmp char, but last char was a lead
  17079. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  17080. }
  17081. leadSurrogate = null;
  17082. // encode utf8
  17083. if (codePoint < 0x80) {
  17084. if ((units -= 1) < 0) break;
  17085. bytes.push(codePoint);
  17086. } else if (codePoint < 0x800) {
  17087. if ((units -= 2) < 0) break;
  17088. bytes.push(
  17089. codePoint >> 0x6 | 0xC0,
  17090. codePoint & 0x3F | 0x80);
  17091. } else if (codePoint < 0x10000) {
  17092. if ((units -= 3) < 0) break;
  17093. bytes.push(
  17094. codePoint >> 0xC | 0xE0,
  17095. codePoint >> 0x6 & 0x3F | 0x80,
  17096. codePoint & 0x3F | 0x80);
  17097. } else if (codePoint < 0x110000) {
  17098. if ((units -= 4) < 0) break;
  17099. bytes.push(
  17100. codePoint >> 0x12 | 0xF0,
  17101. codePoint >> 0xC & 0x3F | 0x80,
  17102. codePoint >> 0x6 & 0x3F | 0x80,
  17103. codePoint & 0x3F | 0x80);
  17104. } else {
  17105. throw new Error('Invalid code point');
  17106. }
  17107. }
  17108. return bytes;
  17109. }
  17110. function byteLength(string) {
  17111. if (Buffer.isBuffer(string)) {
  17112. return string.length;
  17113. }
  17114. if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (
  17115. ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
  17116. return string.byteLength;
  17117. }
  17118. if (typeof string !== 'string') {
  17119. string = '' + string;
  17120. }
  17121. var len = string.length;
  17122. if (len === 0) return 0;
  17123. return utf8ToBytes(string).length;
  17124. }
  17125. function blitBuffer(src, dst, offset, length) {
  17126. for (var i = 0; i < length; ++i) {
  17127. if (i + offset >= dst.length || i >= src.length) break;
  17128. dst[i + offset] = src[i];
  17129. }
  17130. return i;
  17131. }
  17132. function utf8Write(buf, string, offset, length) {
  17133. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
  17134. }
  17135. function from(that, value, offset, length) {
  17136. if (typeof value === 'number') {
  17137. throw new TypeError('"value" argument must not be a number');
  17138. }
  17139. if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
  17140. return fromArrayBuffer(that, value, offset, length);
  17141. }
  17142. if (typeof value === 'string') {
  17143. return fromString(that, value, offset);
  17144. }
  17145. return fromObject(that, value);
  17146. }
  17147. Buffer.prototype.write = function write(string, offset, length) {
  17148. // Buffer#write(string)
  17149. if (offset === undefined) {
  17150. length = this.length;
  17151. offset = 0;
  17152. // Buffer#write(string, encoding)
  17153. } else if (length === undefined && typeof offset === 'string') {
  17154. length = this.length;
  17155. offset = 0;
  17156. // Buffer#write(string, offset[, length])
  17157. } else if (isFinite(offset)) {
  17158. offset = offset | 0;
  17159. if (isFinite(length)) {
  17160. length = length | 0;
  17161. } else {
  17162. length = undefined;
  17163. }
  17164. }
  17165. var remaining = this.length - offset;
  17166. if (length === undefined || length > remaining) length = remaining;
  17167. if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
  17168. throw new RangeError('Attempt to write outside buffer bounds');
  17169. }
  17170. return utf8Write(this, string, offset, length);
  17171. };
  17172. Buffer.prototype.slice = function slice(start, end) {
  17173. var len = this.length;
  17174. start = ~~start;
  17175. end = end === undefined ? len : ~~end;
  17176. if (start < 0) {
  17177. start += len;
  17178. if (start < 0) start = 0;
  17179. } else if (start > len) {
  17180. start = len;
  17181. }
  17182. if (end < 0) {
  17183. end += len;
  17184. if (end < 0) end = 0;
  17185. } else if (end > len) {
  17186. end = len;
  17187. }
  17188. if (end < start) end = start;
  17189. var newBuf;
  17190. if (Buffer.TYPED_ARRAY_SUPPORT) {
  17191. newBuf = this.subarray(start, end);
  17192. // Return an augmented `Uint8Array` instance
  17193. newBuf.__proto__ = Buffer.prototype;
  17194. } else {
  17195. var sliceLen = end - start;
  17196. newBuf = new Buffer(sliceLen, undefined);
  17197. for (var i = 0; i < sliceLen; ++i) {
  17198. newBuf[i] = this[i + start];
  17199. }
  17200. }
  17201. return newBuf;
  17202. };
  17203. Buffer.prototype.copy = function copy(target, targetStart, start, end) {
  17204. if (!start) start = 0;
  17205. if (!end && end !== 0) end = this.length;
  17206. if (targetStart >= target.length) targetStart = target.length;
  17207. if (!targetStart) targetStart = 0;
  17208. if (end > 0 && end < start) end = start;
  17209. // Copy 0 bytes; we're done
  17210. if (end === start) return 0;
  17211. if (target.length === 0 || this.length === 0) return 0;
  17212. // Fatal error conditions
  17213. if (targetStart < 0) {
  17214. throw new RangeError('targetStart out of bounds');
  17215. }
  17216. if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');
  17217. if (end < 0) throw new RangeError('sourceEnd out of bounds');
  17218. // Are we oob?
  17219. if (end > this.length) end = this.length;
  17220. if (target.length - targetStart < end - start) {
  17221. end = target.length - targetStart + start;
  17222. }
  17223. var len = end - start;
  17224. var i;
  17225. if (this === target && start < targetStart && targetStart < end) {
  17226. // descending copy from end
  17227. for (i = len - 1; i >= 0; --i) {
  17228. target[i + targetStart] = this[i + start];
  17229. }
  17230. } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
  17231. // ascending copy from start
  17232. for (i = 0; i < len; ++i) {
  17233. target[i + targetStart] = this[i + start];
  17234. }
  17235. } else {
  17236. Uint8Array.prototype.set.call(
  17237. target,
  17238. this.subarray(start, start + len),
  17239. targetStart);
  17240. }
  17241. return len;
  17242. };
  17243. Buffer.prototype.fill = function fill(val, start, end) {
  17244. // Handle string cases:
  17245. if (typeof val === 'string') {
  17246. if (typeof start === 'string') {
  17247. start = 0;
  17248. end = this.length;
  17249. } else if (typeof end === 'string') {
  17250. end = this.length;
  17251. }
  17252. if (val.length === 1) {
  17253. var code = val.charCodeAt(0);
  17254. if (code < 256) {
  17255. val = code;
  17256. }
  17257. }
  17258. } else if (typeof val === 'number') {
  17259. val = val & 255;
  17260. }
  17261. // Invalid ranges are not set to a default, so can range check early.
  17262. if (start < 0 || this.length < start || this.length < end) {
  17263. throw new RangeError('Out of range index');
  17264. }
  17265. if (end <= start) {
  17266. return this;
  17267. }
  17268. start = start >>> 0;
  17269. end = end === undefined ? this.length : end >>> 0;
  17270. if (!val) val = 0;
  17271. var i;
  17272. if (typeof val === 'number') {
  17273. for (i = start; i < end; ++i) {
  17274. this[i] = val;
  17275. }
  17276. } else {
  17277. var bytes = Buffer.isBuffer(val) ?
  17278. val :
  17279. new Buffer(val);
  17280. var len = bytes.length;
  17281. for (i = 0; i < end - start; ++i) {
  17282. this[i + start] = bytes[i % len];
  17283. }
  17284. }
  17285. return this;
  17286. };
  17287. Buffer.concat = function concat(list, length) {
  17288. if (!isArray(list)) {
  17289. throw new TypeError('"list" argument must be an Array of Buffers');
  17290. }
  17291. if (list.length === 0) {
  17292. return createBuffer(null, 0);
  17293. }
  17294. var i;
  17295. if (length === undefined) {
  17296. length = 0;
  17297. for (i = 0; i < list.length; ++i) {
  17298. length += list[i].length;
  17299. }
  17300. }
  17301. var buffer = allocUnsafe(null, length);
  17302. var pos = 0;
  17303. for (i = 0; i < list.length; ++i) {
  17304. var buf = list[i];
  17305. if (!Buffer.isBuffer(buf)) {
  17306. throw new TypeError('"list" argument must be an Array of Buffers');
  17307. }
  17308. buf.copy(buffer, pos);
  17309. pos += buf.length;
  17310. }
  17311. return buffer;
  17312. };
  17313. Buffer.byteLength = byteLength;
  17314. Buffer.prototype._isBuffer = true;
  17315. Buffer.isBuffer = function isBuffer(b) {
  17316. return !!(b != null && b._isBuffer);
  17317. };
  17318. module.exports.alloc = function (size) {
  17319. var buffer = new Buffer(size);
  17320. buffer.fill(0);
  17321. return buffer;
  17322. };
  17323. module.exports.from = function (data) {
  17324. return new Buffer(data);
  17325. };
  17326. /***/ }),
  17327. /***/ 422:
  17328. /*!***************************************!*\
  17329. !*** ./node_modules/isarray/index.js ***!
  17330. \***************************************/
  17331. /*! no static exports found */
  17332. /***/ (function(module, exports) {
  17333. var toString = {}.toString;
  17334. module.exports = Array.isArray || function (arr) {
  17335. return toString.call(arr) == '[object Array]';
  17336. };
  17337. /***/ }),
  17338. /***/ 423:
  17339. /*!************************************************************************************!*\
  17340. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/utils.js ***!
  17341. \************************************************************************************/
  17342. /*! no static exports found */
  17343. /***/ (function(module, exports) {
  17344. var toSJISFunction;
  17345. var CODEWORDS_COUNT = [
  17346. 0, // Not used
  17347. 26, 44, 70, 100, 134, 172, 196, 242, 292, 346,
  17348. 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,
  17349. 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,
  17350. 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706];
  17351. /**
  17352. * Returns the QR Code size for the specified version
  17353. *
  17354. * @param {Number} version QR Code version
  17355. * @return {Number} size of QR code
  17356. */
  17357. exports.getSymbolSize = function getSymbolSize(version) {
  17358. if (!version) throw new Error('"version" cannot be null or undefined');
  17359. if (version < 1 || version > 40) throw new Error('"version" should be in range from 1 to 40');
  17360. return version * 4 + 17;
  17361. };
  17362. /**
  17363. * Returns the total number of codewords used to store data and EC information.
  17364. *
  17365. * @param {Number} version QR Code version
  17366. * @return {Number} Data length in bits
  17367. */
  17368. exports.getSymbolTotalCodewords = function getSymbolTotalCodewords(version) {
  17369. return CODEWORDS_COUNT[version];
  17370. };
  17371. /**
  17372. * Encode data with Bose-Chaudhuri-Hocquenghem
  17373. *
  17374. * @param {Number} data Value to encode
  17375. * @return {Number} Encoded value
  17376. */
  17377. exports.getBCHDigit = function (data) {
  17378. var digit = 0;
  17379. while (data !== 0) {
  17380. digit++;
  17381. data >>>= 1;
  17382. }
  17383. return digit;
  17384. };
  17385. exports.setToSJISFunction = function setToSJISFunction(f) {
  17386. if (typeof f !== 'function') {
  17387. throw new Error('"toSJISFunc" is not a valid function.');
  17388. }
  17389. toSJISFunction = f;
  17390. };
  17391. exports.isKanjiModeEnabled = function () {
  17392. return typeof toSJISFunction !== 'undefined';
  17393. };
  17394. exports.toSJIS = function toSJIS(kanji) {
  17395. return toSJISFunction(kanji);
  17396. };
  17397. /***/ }),
  17398. /***/ 424:
  17399. /*!*****************************************************************************************************!*\
  17400. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/error-correction-level.js ***!
  17401. \*****************************************************************************************************/
  17402. /*! no static exports found */
  17403. /***/ (function(module, exports) {
  17404. exports.L = { bit: 1 };
  17405. exports.M = { bit: 0 };
  17406. exports.Q = { bit: 3 };
  17407. exports.H = { bit: 2 };
  17408. function fromString(string) {
  17409. if (typeof string !== 'string') {
  17410. throw new Error('Param is not a string');
  17411. }
  17412. var lcStr = string.toLowerCase();
  17413. switch (lcStr) {
  17414. case 'l':
  17415. case 'low':
  17416. return exports.L;
  17417. case 'm':
  17418. case 'medium':
  17419. return exports.M;
  17420. case 'q':
  17421. case 'quartile':
  17422. return exports.Q;
  17423. case 'h':
  17424. case 'high':
  17425. return exports.H;
  17426. default:
  17427. throw new Error('Unknown EC Level: ' + string);}
  17428. }
  17429. exports.isValid = function isValid(level) {
  17430. return level && typeof level.bit !== 'undefined' &&
  17431. level.bit >= 0 && level.bit < 4;
  17432. };
  17433. exports.from = function from(value, defaultValue) {
  17434. if (exports.isValid(value)) {
  17435. return value;
  17436. }
  17437. try {
  17438. return fromString(value);
  17439. } catch (e) {
  17440. return defaultValue;
  17441. }
  17442. };
  17443. /***/ }),
  17444. /***/ 425:
  17445. /*!*****************************************************************************************!*\
  17446. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/bit-buffer.js ***!
  17447. \*****************************************************************************************/
  17448. /*! no static exports found */
  17449. /***/ (function(module, exports) {
  17450. function BitBuffer() {
  17451. this.buffer = [];
  17452. this.length = 0;
  17453. }
  17454. BitBuffer.prototype = {
  17455. get: function get(index) {
  17456. var bufIndex = Math.floor(index / 8);
  17457. return (this.buffer[bufIndex] >>> 7 - index % 8 & 1) === 1;
  17458. },
  17459. put: function put(num, length) {
  17460. for (var i = 0; i < length; i++) {
  17461. this.putBit((num >>> length - i - 1 & 1) === 1);
  17462. }
  17463. },
  17464. getLengthInBits: function getLengthInBits() {
  17465. return this.length;
  17466. },
  17467. putBit: function putBit(bit) {
  17468. var bufIndex = Math.floor(this.length / 8);
  17469. if (this.buffer.length <= bufIndex) {
  17470. this.buffer.push(0);
  17471. }
  17472. if (bit) {
  17473. this.buffer[bufIndex] |= 0x80 >>> this.length % 8;
  17474. }
  17475. this.length++;
  17476. } };
  17477. module.exports = BitBuffer;
  17478. /***/ }),
  17479. /***/ 426:
  17480. /*!*****************************************************************************************!*\
  17481. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/bit-matrix.js ***!
  17482. \*****************************************************************************************/
  17483. /*! no static exports found */
  17484. /***/ (function(module, exports, __webpack_require__) {
  17485. var BufferUtil = __webpack_require__(/*! ../utils/buffer */ 421);
  17486. /**
  17487. * Helper class to handle QR Code symbol modules
  17488. *
  17489. * @param {Number} size Symbol size
  17490. */
  17491. function BitMatrix(size) {
  17492. if (!size || size < 1) {
  17493. throw new Error('BitMatrix size must be defined and greater than 0');
  17494. }
  17495. this.size = size;
  17496. this.data = BufferUtil.alloc(size * size);
  17497. this.reservedBit = BufferUtil.alloc(size * size);
  17498. }
  17499. /**
  17500. * Set bit value at specified location
  17501. * If reserved flag is set, this bit will be ignored during masking process
  17502. *
  17503. * @param {Number} row
  17504. * @param {Number} col
  17505. * @param {Boolean} value
  17506. * @param {Boolean} reserved
  17507. */
  17508. BitMatrix.prototype.set = function (row, col, value, reserved) {
  17509. var index = row * this.size + col;
  17510. this.data[index] = value;
  17511. if (reserved) this.reservedBit[index] = true;
  17512. };
  17513. /**
  17514. * Returns bit value at specified location
  17515. *
  17516. * @param {Number} row
  17517. * @param {Number} col
  17518. * @return {Boolean}
  17519. */
  17520. BitMatrix.prototype.get = function (row, col) {
  17521. return this.data[row * this.size + col];
  17522. };
  17523. /**
  17524. * Applies xor operator at specified location
  17525. * (used during masking process)
  17526. *
  17527. * @param {Number} row
  17528. * @param {Number} col
  17529. * @param {Boolean} value
  17530. */
  17531. BitMatrix.prototype.xor = function (row, col, value) {
  17532. this.data[row * this.size + col] ^= value;
  17533. };
  17534. /**
  17535. * Check if bit at specified location is reserved
  17536. *
  17537. * @param {Number} row
  17538. * @param {Number} col
  17539. * @return {Boolean}
  17540. */
  17541. BitMatrix.prototype.isReserved = function (row, col) {
  17542. return this.reservedBit[row * this.size + col];
  17543. };
  17544. module.exports = BitMatrix;
  17545. /***/ }),
  17546. /***/ 427:
  17547. /*!************************************************************************************************!*\
  17548. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/alignment-pattern.js ***!
  17549. \************************************************************************************************/
  17550. /*! no static exports found */
  17551. /***/ (function(module, exports, __webpack_require__) {
  17552. /**
  17553. * Alignment pattern are fixed reference pattern in defined positions
  17554. * in a matrix symbology, which enables the decode software to re-synchronise
  17555. * the coordinate mapping of the image modules in the event of moderate amounts
  17556. * of distortion of the image.
  17557. *
  17558. * Alignment patterns are present only in QR Code symbols of version 2 or larger
  17559. * and their number depends on the symbol version.
  17560. */
  17561. var getSymbolSize = __webpack_require__(/*! ./utils */ 423).getSymbolSize;
  17562. /**
  17563. * Calculate the row/column coordinates of the center module of each alignment pattern
  17564. * for the specified QR Code version.
  17565. *
  17566. * The alignment patterns are positioned symmetrically on either side of the diagonal
  17567. * running from the top left corner of the symbol to the bottom right corner.
  17568. *
  17569. * Since positions are simmetrical only half of the coordinates are returned.
  17570. * Each item of the array will represent in turn the x and y coordinate.
  17571. * @see {@link getPositions}
  17572. *
  17573. * @param {Number} version QR Code version
  17574. * @return {Array} Array of coordinate
  17575. */
  17576. exports.getRowColCoords = function getRowColCoords(version) {
  17577. if (version === 1) return [];
  17578. var posCount = Math.floor(version / 7) + 2;
  17579. var size = getSymbolSize(version);
  17580. var intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2;
  17581. var positions = [size - 7]; // Last coord is always (size - 7)
  17582. for (var i = 1; i < posCount - 1; i++) {
  17583. positions[i] = positions[i - 1] - intervals;
  17584. }
  17585. positions.push(6); // First coord is always 6
  17586. return positions.reverse();
  17587. };
  17588. /**
  17589. * Returns an array containing the positions of each alignment pattern.
  17590. * Each array's element represent the center point of the pattern as (x, y) coordinates
  17591. *
  17592. * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}
  17593. * and filtering out the items that overlaps with finder pattern
  17594. *
  17595. * @example
  17596. * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.
  17597. * The alignment patterns, therefore, are to be centered on (row, column)
  17598. * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).
  17599. * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns
  17600. * and are not therefore used for alignment patterns.
  17601. *
  17602. * var pos = getPositions(7)
  17603. * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]
  17604. *
  17605. * @param {Number} version QR Code version
  17606. * @return {Array} Array of coordinates
  17607. */
  17608. exports.getPositions = function getPositions(version) {
  17609. var coords = [];
  17610. var pos = exports.getRowColCoords(version);
  17611. var posLength = pos.length;
  17612. for (var i = 0; i < posLength; i++) {
  17613. for (var j = 0; j < posLength; j++) {
  17614. // Skip if position is occupied by finder patterns
  17615. if (i === 0 && j === 0 || // top-left
  17616. i === 0 && j === posLength - 1 || // bottom-left
  17617. i === posLength - 1 && j === 0) {// top-right
  17618. continue;
  17619. }
  17620. coords.push([pos[i], pos[j]]);
  17621. }
  17622. }
  17623. return coords;
  17624. };
  17625. /***/ }),
  17626. /***/ 428:
  17627. /*!*********************************************************************************************!*\
  17628. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/finder-pattern.js ***!
  17629. \*********************************************************************************************/
  17630. /*! no static exports found */
  17631. /***/ (function(module, exports, __webpack_require__) {
  17632. var getSymbolSize = __webpack_require__(/*! ./utils */ 423).getSymbolSize;
  17633. var FINDER_PATTERN_SIZE = 7;
  17634. /**
  17635. * Returns an array containing the positions of each finder pattern.
  17636. * Each array's element represent the top-left point of the pattern as (x, y) coordinates
  17637. *
  17638. * @param {Number} version QR Code version
  17639. * @return {Array} Array of coordinates
  17640. */
  17641. exports.getPositions = function getPositions(version) {
  17642. var size = getSymbolSize(version);
  17643. return [
  17644. // top-left
  17645. [0, 0],
  17646. // top-right
  17647. [size - FINDER_PATTERN_SIZE, 0],
  17648. // bottom-left
  17649. [0, size - FINDER_PATTERN_SIZE]];
  17650. };
  17651. /***/ }),
  17652. /***/ 429:
  17653. /*!*******************************************************************************************!*\
  17654. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/mask-pattern.js ***!
  17655. \*******************************************************************************************/
  17656. /*! no static exports found */
  17657. /***/ (function(module, exports) {
  17658. /**
  17659. * Data mask pattern reference
  17660. * @type {Object}
  17661. */
  17662. exports.Patterns = {
  17663. PATTERN000: 0,
  17664. PATTERN001: 1,
  17665. PATTERN010: 2,
  17666. PATTERN011: 3,
  17667. PATTERN100: 4,
  17668. PATTERN101: 5,
  17669. PATTERN110: 6,
  17670. PATTERN111: 7 };
  17671. /**
  17672. * Weighted penalty scores for the undesirable features
  17673. * @type {Object}
  17674. */
  17675. var PenaltyScores = {
  17676. N1: 3,
  17677. N2: 3,
  17678. N3: 40,
  17679. N4: 10 };
  17680. /**
  17681. * Check if mask pattern value is valid
  17682. *
  17683. * @param {Number} mask Mask pattern
  17684. * @return {Boolean} true if valid, false otherwise
  17685. */
  17686. exports.isValid = function isValid(mask) {
  17687. return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7;
  17688. };
  17689. /**
  17690. * Returns mask pattern from a value.
  17691. * If value is not valid, returns undefined
  17692. *
  17693. * @param {Number|String} value Mask pattern value
  17694. * @return {Number} Valid mask pattern or undefined
  17695. */
  17696. exports.from = function from(value) {
  17697. return exports.isValid(value) ? parseInt(value, 10) : undefined;
  17698. };
  17699. /**
  17700. * Find adjacent modules in row/column with the same color
  17701. * and assign a penalty value.
  17702. *
  17703. * Points: N1 + i
  17704. * i is the amount by which the number of adjacent modules of the same color exceeds 5
  17705. */
  17706. exports.getPenaltyN1 = function getPenaltyN1(data) {
  17707. var size = data.size;
  17708. var points = 0;
  17709. var sameCountCol = 0;
  17710. var sameCountRow = 0;
  17711. var lastCol = null;
  17712. var lastRow = null;
  17713. for (var row = 0; row < size; row++) {
  17714. sameCountCol = sameCountRow = 0;
  17715. lastCol = lastRow = null;
  17716. for (var col = 0; col < size; col++) {
  17717. var module = data.get(row, col);
  17718. if (module === lastCol) {
  17719. sameCountCol++;
  17720. } else {
  17721. if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
  17722. lastCol = module;
  17723. sameCountCol = 1;
  17724. }
  17725. module = data.get(col, row);
  17726. if (module === lastRow) {
  17727. sameCountRow++;
  17728. } else {
  17729. if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
  17730. lastRow = module;
  17731. sameCountRow = 1;
  17732. }
  17733. }
  17734. if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
  17735. if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
  17736. }
  17737. return points;
  17738. };
  17739. /**
  17740. * Find 2x2 blocks with the same color and assign a penalty value
  17741. *
  17742. * Points: N2 * (m - 1) * (n - 1)
  17743. */
  17744. exports.getPenaltyN2 = function getPenaltyN2(data) {
  17745. var size = data.size;
  17746. var points = 0;
  17747. for (var row = 0; row < size - 1; row++) {
  17748. for (var col = 0; col < size - 1; col++) {
  17749. var last = data.get(row, col) +
  17750. data.get(row, col + 1) +
  17751. data.get(row + 1, col) +
  17752. data.get(row + 1, col + 1);
  17753. if (last === 4 || last === 0) points++;
  17754. }
  17755. }
  17756. return points * PenaltyScores.N2;
  17757. };
  17758. /**
  17759. * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,
  17760. * preceded or followed by light area 4 modules wide
  17761. *
  17762. * Points: N3 * number of pattern found
  17763. */
  17764. exports.getPenaltyN3 = function getPenaltyN3(data) {
  17765. var size = data.size;
  17766. var points = 0;
  17767. var bitsCol = 0;
  17768. var bitsRow = 0;
  17769. for (var row = 0; row < size; row++) {
  17770. bitsCol = bitsRow = 0;
  17771. for (var col = 0; col < size; col++) {
  17772. bitsCol = bitsCol << 1 & 0x7FF | data.get(row, col);
  17773. if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++;
  17774. bitsRow = bitsRow << 1 & 0x7FF | data.get(col, row);
  17775. if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++;
  17776. }
  17777. }
  17778. return points * PenaltyScores.N3;
  17779. };
  17780. /**
  17781. * Calculate proportion of dark modules in entire symbol
  17782. *
  17783. * Points: N4 * k
  17784. *
  17785. * k is the rating of the deviation of the proportion of dark modules
  17786. * in the symbol from 50% in steps of 5%
  17787. */
  17788. exports.getPenaltyN4 = function getPenaltyN4(data) {
  17789. var darkCount = 0;
  17790. var modulesCount = data.data.length;
  17791. for (var i = 0; i < modulesCount; i++) {darkCount += data.data[i];}
  17792. var k = Math.abs(Math.ceil(darkCount * 100 / modulesCount / 5) - 10);
  17793. return k * PenaltyScores.N4;
  17794. };
  17795. /**
  17796. * Return mask value at given position
  17797. *
  17798. * @param {Number} maskPattern Pattern reference value
  17799. * @param {Number} i Row
  17800. * @param {Number} j Column
  17801. * @return {Boolean} Mask value
  17802. */
  17803. function getMaskAt(maskPattern, i, j) {
  17804. switch (maskPattern) {
  17805. case exports.Patterns.PATTERN000:return (i + j) % 2 === 0;
  17806. case exports.Patterns.PATTERN001:return i % 2 === 0;
  17807. case exports.Patterns.PATTERN010:return j % 3 === 0;
  17808. case exports.Patterns.PATTERN011:return (i + j) % 3 === 0;
  17809. case exports.Patterns.PATTERN100:return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0;
  17810. case exports.Patterns.PATTERN101:return i * j % 2 + i * j % 3 === 0;
  17811. case exports.Patterns.PATTERN110:return (i * j % 2 + i * j % 3) % 2 === 0;
  17812. case exports.Patterns.PATTERN111:return (i * j % 3 + (i + j) % 2) % 2 === 0;
  17813. default:throw new Error('bad maskPattern:' + maskPattern);}
  17814. }
  17815. /**
  17816. * Apply a mask pattern to a BitMatrix
  17817. *
  17818. * @param {Number} pattern Pattern reference number
  17819. * @param {BitMatrix} data BitMatrix data
  17820. */
  17821. exports.applyMask = function applyMask(pattern, data) {
  17822. var size = data.size;
  17823. for (var col = 0; col < size; col++) {
  17824. for (var row = 0; row < size; row++) {
  17825. if (data.isReserved(row, col)) continue;
  17826. data.xor(row, col, getMaskAt(pattern, row, col));
  17827. }
  17828. }
  17829. };
  17830. /**
  17831. * Returns the best mask pattern for data
  17832. *
  17833. * @param {BitMatrix} data
  17834. * @return {Number} Mask pattern reference number
  17835. */
  17836. exports.getBestMask = function getBestMask(data, setupFormatFunc) {
  17837. var numPatterns = Object.keys(exports.Patterns).length;
  17838. var bestPattern = 0;
  17839. var lowerPenalty = Infinity;
  17840. for (var p = 0; p < numPatterns; p++) {
  17841. setupFormatFunc(p);
  17842. exports.applyMask(p, data);
  17843. // Calculate penalty
  17844. var penalty =
  17845. exports.getPenaltyN1(data) +
  17846. exports.getPenaltyN2(data) +
  17847. exports.getPenaltyN3(data) +
  17848. exports.getPenaltyN4(data);
  17849. // Undo previously applied mask
  17850. exports.applyMask(p, data);
  17851. if (penalty < lowerPenalty) {
  17852. lowerPenalty = penalty;
  17853. bestPattern = p;
  17854. }
  17855. }
  17856. return bestPattern;
  17857. };
  17858. /***/ }),
  17859. /***/ 430:
  17860. /*!****************************************************************************************************!*\
  17861. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/error-correction-code.js ***!
  17862. \****************************************************************************************************/
  17863. /*! no static exports found */
  17864. /***/ (function(module, exports, __webpack_require__) {
  17865. var ECLevel = __webpack_require__(/*! ./error-correction-level */ 424);
  17866. var EC_BLOCKS_TABLE = [
  17867. // L M Q H
  17868. 1, 1, 1, 1,
  17869. 1, 1, 1, 1,
  17870. 1, 1, 2, 2,
  17871. 1, 2, 2, 4,
  17872. 1, 2, 4, 4,
  17873. 2, 4, 4, 4,
  17874. 2, 4, 6, 5,
  17875. 2, 4, 6, 6,
  17876. 2, 5, 8, 8,
  17877. 4, 5, 8, 8,
  17878. 4, 5, 8, 11,
  17879. 4, 8, 10, 11,
  17880. 4, 9, 12, 16,
  17881. 4, 9, 16, 16,
  17882. 6, 10, 12, 18,
  17883. 6, 10, 17, 16,
  17884. 6, 11, 16, 19,
  17885. 6, 13, 18, 21,
  17886. 7, 14, 21, 25,
  17887. 8, 16, 20, 25,
  17888. 8, 17, 23, 25,
  17889. 9, 17, 23, 34,
  17890. 9, 18, 25, 30,
  17891. 10, 20, 27, 32,
  17892. 12, 21, 29, 35,
  17893. 12, 23, 34, 37,
  17894. 12, 25, 34, 40,
  17895. 13, 26, 35, 42,
  17896. 14, 28, 38, 45,
  17897. 15, 29, 40, 48,
  17898. 16, 31, 43, 51,
  17899. 17, 33, 45, 54,
  17900. 18, 35, 48, 57,
  17901. 19, 37, 51, 60,
  17902. 19, 38, 53, 63,
  17903. 20, 40, 56, 66,
  17904. 21, 43, 59, 70,
  17905. 22, 45, 62, 74,
  17906. 24, 47, 65, 77,
  17907. 25, 49, 68, 81];
  17908. var EC_CODEWORDS_TABLE = [
  17909. // L M Q H
  17910. 7, 10, 13, 17,
  17911. 10, 16, 22, 28,
  17912. 15, 26, 36, 44,
  17913. 20, 36, 52, 64,
  17914. 26, 48, 72, 88,
  17915. 36, 64, 96, 112,
  17916. 40, 72, 108, 130,
  17917. 48, 88, 132, 156,
  17918. 60, 110, 160, 192,
  17919. 72, 130, 192, 224,
  17920. 80, 150, 224, 264,
  17921. 96, 176, 260, 308,
  17922. 104, 198, 288, 352,
  17923. 120, 216, 320, 384,
  17924. 132, 240, 360, 432,
  17925. 144, 280, 408, 480,
  17926. 168, 308, 448, 532,
  17927. 180, 338, 504, 588,
  17928. 196, 364, 546, 650,
  17929. 224, 416, 600, 700,
  17930. 224, 442, 644, 750,
  17931. 252, 476, 690, 816,
  17932. 270, 504, 750, 900,
  17933. 300, 560, 810, 960,
  17934. 312, 588, 870, 1050,
  17935. 336, 644, 952, 1110,
  17936. 360, 700, 1020, 1200,
  17937. 390, 728, 1050, 1260,
  17938. 420, 784, 1140, 1350,
  17939. 450, 812, 1200, 1440,
  17940. 480, 868, 1290, 1530,
  17941. 510, 924, 1350, 1620,
  17942. 540, 980, 1440, 1710,
  17943. 570, 1036, 1530, 1800,
  17944. 570, 1064, 1590, 1890,
  17945. 600, 1120, 1680, 1980,
  17946. 630, 1204, 1770, 2100,
  17947. 660, 1260, 1860, 2220,
  17948. 720, 1316, 1950, 2310,
  17949. 750, 1372, 2040, 2430];
  17950. /**
  17951. * Returns the number of error correction block that the QR Code should contain
  17952. * for the specified version and error correction level.
  17953. *
  17954. * @param {Number} version QR Code version
  17955. * @param {Number} errorCorrectionLevel Error correction level
  17956. * @return {Number} Number of error correction blocks
  17957. */
  17958. exports.getBlocksCount = function getBlocksCount(version, errorCorrectionLevel) {
  17959. switch (errorCorrectionLevel) {
  17960. case ECLevel.L:
  17961. return EC_BLOCKS_TABLE[(version - 1) * 4 + 0];
  17962. case ECLevel.M:
  17963. return EC_BLOCKS_TABLE[(version - 1) * 4 + 1];
  17964. case ECLevel.Q:
  17965. return EC_BLOCKS_TABLE[(version - 1) * 4 + 2];
  17966. case ECLevel.H:
  17967. return EC_BLOCKS_TABLE[(version - 1) * 4 + 3];
  17968. default:
  17969. return undefined;}
  17970. };
  17971. /**
  17972. * Returns the number of error correction codewords to use for the specified
  17973. * version and error correction level.
  17974. *
  17975. * @param {Number} version QR Code version
  17976. * @param {Number} errorCorrectionLevel Error correction level
  17977. * @return {Number} Number of error correction codewords
  17978. */
  17979. exports.getTotalCodewordsCount = function getTotalCodewordsCount(version, errorCorrectionLevel) {
  17980. switch (errorCorrectionLevel) {
  17981. case ECLevel.L:
  17982. return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0];
  17983. case ECLevel.M:
  17984. return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1];
  17985. case ECLevel.Q:
  17986. return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2];
  17987. case ECLevel.H:
  17988. return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3];
  17989. default:
  17990. return undefined;}
  17991. };
  17992. /***/ }),
  17993. /***/ 431:
  17994. /*!***************************************************************************************************!*\
  17995. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/reed-solomon-encoder.js ***!
  17996. \***************************************************************************************************/
  17997. /*! no static exports found */
  17998. /***/ (function(module, exports, __webpack_require__) {
  17999. var BufferUtil = __webpack_require__(/*! ../utils/buffer */ 421);
  18000. var Polynomial = __webpack_require__(/*! ./polynomial */ 432);
  18001. var Buffer = __webpack_require__(/*! buffer */ 434).Buffer;
  18002. function ReedSolomonEncoder(degree) {
  18003. this.genPoly = undefined;
  18004. this.degree = degree;
  18005. if (this.degree) this.initialize(this.degree);
  18006. }
  18007. /**
  18008. * Initialize the encoder.
  18009. * The input param should correspond to the number of error correction codewords.
  18010. *
  18011. * @param {Number} degree
  18012. */
  18013. ReedSolomonEncoder.prototype.initialize = function initialize(degree) {
  18014. // create an irreducible generator polynomial
  18015. this.degree = degree;
  18016. this.genPoly = Polynomial.generateECPolynomial(this.degree);
  18017. };
  18018. /**
  18019. * Encodes a chunk of data
  18020. *
  18021. * @param {Buffer} data Buffer containing input data
  18022. * @return {Buffer} Buffer containing encoded data
  18023. */
  18024. ReedSolomonEncoder.prototype.encode = function encode(data) {
  18025. if (!this.genPoly) {
  18026. throw new Error('Encoder not initialized');
  18027. }
  18028. // Calculate EC for this data block
  18029. // extends data size to data+genPoly size
  18030. var pad = BufferUtil.alloc(this.degree);
  18031. var paddedData = Buffer.concat([data, pad], data.length + this.degree);
  18032. // The error correction codewords are the remainder after dividing the data codewords
  18033. // by a generator polynomial
  18034. var remainder = Polynomial.mod(paddedData, this.genPoly);
  18035. // return EC data blocks (last n byte, where n is the degree of genPoly)
  18036. // If coefficients number in remainder are less than genPoly degree,
  18037. // pad with 0s to the left to reach the needed number of coefficients
  18038. var start = this.degree - remainder.length;
  18039. if (start > 0) {
  18040. var buff = BufferUtil.alloc(this.degree);
  18041. remainder.copy(buff, start);
  18042. return buff;
  18043. }
  18044. return remainder;
  18045. };
  18046. module.exports = ReedSolomonEncoder;
  18047. /***/ }),
  18048. /***/ 432:
  18049. /*!*****************************************************************************************!*\
  18050. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/polynomial.js ***!
  18051. \*****************************************************************************************/
  18052. /*! no static exports found */
  18053. /***/ (function(module, exports, __webpack_require__) {
  18054. var BufferUtil = __webpack_require__(/*! ../utils/buffer */ 421);
  18055. var GF = __webpack_require__(/*! ./galois-field */ 433);
  18056. /**
  18057. * Multiplies two polynomials inside Galois Field
  18058. *
  18059. * @param {Buffer} p1 Polynomial
  18060. * @param {Buffer} p2 Polynomial
  18061. * @return {Buffer} Product of p1 and p2
  18062. */
  18063. exports.mul = function mul(p1, p2) {
  18064. var coeff = BufferUtil.alloc(p1.length + p2.length - 1);
  18065. for (var i = 0; i < p1.length; i++) {
  18066. for (var j = 0; j < p2.length; j++) {
  18067. coeff[i + j] ^= GF.mul(p1[i], p2[j]);
  18068. }
  18069. }
  18070. return coeff;
  18071. };
  18072. /**
  18073. * Calculate the remainder of polynomials division
  18074. *
  18075. * @param {Buffer} divident Polynomial
  18076. * @param {Buffer} divisor Polynomial
  18077. * @return {Buffer} Remainder
  18078. */
  18079. exports.mod = function mod(divident, divisor) {
  18080. var result = BufferUtil.from(divident);
  18081. while (result.length - divisor.length >= 0) {
  18082. var coeff = result[0];
  18083. for (var i = 0; i < divisor.length; i++) {
  18084. result[i] ^= GF.mul(divisor[i], coeff);
  18085. }
  18086. // remove all zeros from buffer head
  18087. var offset = 0;
  18088. while (offset < result.length && result[offset] === 0) {offset++;}
  18089. result = result.slice(offset);
  18090. }
  18091. return result;
  18092. };
  18093. /**
  18094. * Generate an irreducible generator polynomial of specified degree
  18095. * (used by Reed-Solomon encoder)
  18096. *
  18097. * @param {Number} degree Degree of the generator polynomial
  18098. * @return {Buffer} Buffer containing polynomial coefficients
  18099. */
  18100. exports.generateECPolynomial = function generateECPolynomial(degree) {
  18101. var poly = BufferUtil.from([1]);
  18102. for (var i = 0; i < degree; i++) {
  18103. poly = exports.mul(poly, [1, GF.exp(i)]);
  18104. }
  18105. return poly;
  18106. };
  18107. /***/ }),
  18108. /***/ 433:
  18109. /*!*******************************************************************************************!*\
  18110. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/galois-field.js ***!
  18111. \*******************************************************************************************/
  18112. /*! no static exports found */
  18113. /***/ (function(module, exports, __webpack_require__) {
  18114. var BufferUtil = __webpack_require__(/*! ../utils/buffer */ 421);
  18115. var EXP_TABLE = BufferUtil.alloc(512);
  18116. var LOG_TABLE = BufferUtil.alloc(256)
  18117. /**
  18118. * Precompute the log and anti-log tables for faster computation later
  18119. *
  18120. * For each possible value in the galois field 2^8, we will pre-compute
  18121. * the logarithm and anti-logarithm (exponential) of this value
  18122. *
  18123. * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}
  18124. */;
  18125. (function initTables() {
  18126. var x = 1;
  18127. for (var i = 0; i < 255; i++) {
  18128. EXP_TABLE[i] = x;
  18129. LOG_TABLE[x] = i;
  18130. x <<= 1; // multiply by 2
  18131. // The QR code specification says to use byte-wise modulo 100011101 arithmetic.
  18132. // This means that when a number is 256 or larger, it should be XORed with 0x11D.
  18133. if (x & 0x100) {// similar to x >= 256, but a lot faster (because 0x100 == 256)
  18134. x ^= 0x11D;
  18135. }
  18136. }
  18137. // Optimization: double the size of the anti-log table so that we don't need to mod 255 to
  18138. // stay inside the bounds (because we will mainly use this table for the multiplication of
  18139. // two GF numbers, no more).
  18140. // @see {@link mul}
  18141. for (i = 255; i < 512; i++) {
  18142. EXP_TABLE[i] = EXP_TABLE[i - 255];
  18143. }
  18144. })();
  18145. /**
  18146. * Returns log value of n inside Galois Field
  18147. *
  18148. * @param {Number} n
  18149. * @return {Number}
  18150. */
  18151. exports.log = function log(n) {
  18152. if (n < 1) throw new Error('log(' + n + ')');
  18153. return LOG_TABLE[n];
  18154. };
  18155. /**
  18156. * Returns anti-log value of n inside Galois Field
  18157. *
  18158. * @param {Number} n
  18159. * @return {Number}
  18160. */
  18161. exports.exp = function exp(n) {
  18162. return EXP_TABLE[n];
  18163. };
  18164. /**
  18165. * Multiplies two number inside Galois Field
  18166. *
  18167. * @param {Number} x
  18168. * @param {Number} y
  18169. * @return {Number}
  18170. */
  18171. exports.mul = function mul(x, y) {
  18172. if (x === 0 || y === 0) return 0;
  18173. // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized
  18174. // @see {@link initTables}
  18175. return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]];
  18176. };
  18177. /***/ }),
  18178. /***/ 434:
  18179. /*!**************************************!*\
  18180. !*** ./node_modules/buffer/index.js ***!
  18181. \**************************************/
  18182. /*! no static exports found */
  18183. /***/ (function(module, exports, __webpack_require__) {
  18184. "use strict";
  18185. /* WEBPACK VAR INJECTION */(function(global) {/*!
  18186. * The buffer module from node.js, for the browser.
  18187. *
  18188. * @author Feross Aboukhadijeh <http://feross.org>
  18189. * @license MIT
  18190. */
  18191. /* eslint-disable no-proto */
  18192. var base64 = __webpack_require__(/*! base64-js */ 435)
  18193. var ieee754 = __webpack_require__(/*! ieee754 */ 436)
  18194. var isArray = __webpack_require__(/*! isarray */ 422)
  18195. exports.Buffer = Buffer
  18196. exports.SlowBuffer = SlowBuffer
  18197. exports.INSPECT_MAX_BYTES = 50
  18198. /**
  18199. * If `Buffer.TYPED_ARRAY_SUPPORT`:
  18200. * === true Use Uint8Array implementation (fastest)
  18201. * === false Use Object implementation (most compatible, even IE6)
  18202. *
  18203. * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
  18204. * Opera 11.6+, iOS 4.2+.
  18205. *
  18206. * Due to various browser bugs, sometimes the Object implementation will be used even
  18207. * when the browser supports typed arrays.
  18208. *
  18209. * Note:
  18210. *
  18211. * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
  18212. * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
  18213. *
  18214. * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
  18215. *
  18216. * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
  18217. * incorrect length in some situations.
  18218. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
  18219. * get the Object implementation, which is slower but behaves correctly.
  18220. */
  18221. Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
  18222. ? global.TYPED_ARRAY_SUPPORT
  18223. : typedArraySupport()
  18224. /*
  18225. * Export kMaxLength after typed array support is determined.
  18226. */
  18227. exports.kMaxLength = kMaxLength()
  18228. function typedArraySupport () {
  18229. try {
  18230. var arr = new Uint8Array(1)
  18231. arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
  18232. return arr.foo() === 42 && // typed array instances can be augmented
  18233. typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
  18234. arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
  18235. } catch (e) {
  18236. return false
  18237. }
  18238. }
  18239. function kMaxLength () {
  18240. return Buffer.TYPED_ARRAY_SUPPORT
  18241. ? 0x7fffffff
  18242. : 0x3fffffff
  18243. }
  18244. function createBuffer (that, length) {
  18245. if (kMaxLength() < length) {
  18246. throw new RangeError('Invalid typed array length')
  18247. }
  18248. if (Buffer.TYPED_ARRAY_SUPPORT) {
  18249. // Return an augmented `Uint8Array` instance, for best performance
  18250. that = new Uint8Array(length)
  18251. that.__proto__ = Buffer.prototype
  18252. } else {
  18253. // Fallback: Return an object instance of the Buffer class
  18254. if (that === null) {
  18255. that = new Buffer(length)
  18256. }
  18257. that.length = length
  18258. }
  18259. return that
  18260. }
  18261. /**
  18262. * The Buffer constructor returns instances of `Uint8Array` that have their
  18263. * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
  18264. * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
  18265. * and the `Uint8Array` methods. Square bracket notation works as expected -- it
  18266. * returns a single octet.
  18267. *
  18268. * The `Uint8Array` prototype remains unmodified.
  18269. */
  18270. function Buffer (arg, encodingOrOffset, length) {
  18271. if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
  18272. return new Buffer(arg, encodingOrOffset, length)
  18273. }
  18274. // Common case.
  18275. if (typeof arg === 'number') {
  18276. if (typeof encodingOrOffset === 'string') {
  18277. throw new Error(
  18278. 'If encoding is specified then the first argument must be a string'
  18279. )
  18280. }
  18281. return allocUnsafe(this, arg)
  18282. }
  18283. return from(this, arg, encodingOrOffset, length)
  18284. }
  18285. Buffer.poolSize = 8192 // not used by this implementation
  18286. // TODO: Legacy, not needed anymore. Remove in next major version.
  18287. Buffer._augment = function (arr) {
  18288. arr.__proto__ = Buffer.prototype
  18289. return arr
  18290. }
  18291. function from (that, value, encodingOrOffset, length) {
  18292. if (typeof value === 'number') {
  18293. throw new TypeError('"value" argument must not be a number')
  18294. }
  18295. if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
  18296. return fromArrayBuffer(that, value, encodingOrOffset, length)
  18297. }
  18298. if (typeof value === 'string') {
  18299. return fromString(that, value, encodingOrOffset)
  18300. }
  18301. return fromObject(that, value)
  18302. }
  18303. /**
  18304. * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
  18305. * if value is a number.
  18306. * Buffer.from(str[, encoding])
  18307. * Buffer.from(array)
  18308. * Buffer.from(buffer)
  18309. * Buffer.from(arrayBuffer[, byteOffset[, length]])
  18310. **/
  18311. Buffer.from = function (value, encodingOrOffset, length) {
  18312. return from(null, value, encodingOrOffset, length)
  18313. }
  18314. if (Buffer.TYPED_ARRAY_SUPPORT) {
  18315. Buffer.prototype.__proto__ = Uint8Array.prototype
  18316. Buffer.__proto__ = Uint8Array
  18317. if (typeof Symbol !== 'undefined' && Symbol.species &&
  18318. Buffer[Symbol.species] === Buffer) {
  18319. // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
  18320. Object.defineProperty(Buffer, Symbol.species, {
  18321. value: null,
  18322. configurable: true
  18323. })
  18324. }
  18325. }
  18326. function assertSize (size) {
  18327. if (typeof size !== 'number') {
  18328. throw new TypeError('"size" argument must be a number')
  18329. } else if (size < 0) {
  18330. throw new RangeError('"size" argument must not be negative')
  18331. }
  18332. }
  18333. function alloc (that, size, fill, encoding) {
  18334. assertSize(size)
  18335. if (size <= 0) {
  18336. return createBuffer(that, size)
  18337. }
  18338. if (fill !== undefined) {
  18339. // Only pay attention to encoding if it's a string. This
  18340. // prevents accidentally sending in a number that would
  18341. // be interpretted as a start offset.
  18342. return typeof encoding === 'string'
  18343. ? createBuffer(that, size).fill(fill, encoding)
  18344. : createBuffer(that, size).fill(fill)
  18345. }
  18346. return createBuffer(that, size)
  18347. }
  18348. /**
  18349. * Creates a new filled Buffer instance.
  18350. * alloc(size[, fill[, encoding]])
  18351. **/
  18352. Buffer.alloc = function (size, fill, encoding) {
  18353. return alloc(null, size, fill, encoding)
  18354. }
  18355. function allocUnsafe (that, size) {
  18356. assertSize(size)
  18357. that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
  18358. if (!Buffer.TYPED_ARRAY_SUPPORT) {
  18359. for (var i = 0; i < size; ++i) {
  18360. that[i] = 0
  18361. }
  18362. }
  18363. return that
  18364. }
  18365. /**
  18366. * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
  18367. * */
  18368. Buffer.allocUnsafe = function (size) {
  18369. return allocUnsafe(null, size)
  18370. }
  18371. /**
  18372. * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
  18373. */
  18374. Buffer.allocUnsafeSlow = function (size) {
  18375. return allocUnsafe(null, size)
  18376. }
  18377. function fromString (that, string, encoding) {
  18378. if (typeof encoding !== 'string' || encoding === '') {
  18379. encoding = 'utf8'
  18380. }
  18381. if (!Buffer.isEncoding(encoding)) {
  18382. throw new TypeError('"encoding" must be a valid string encoding')
  18383. }
  18384. var length = byteLength(string, encoding) | 0
  18385. that = createBuffer(that, length)
  18386. var actual = that.write(string, encoding)
  18387. if (actual !== length) {
  18388. // Writing a hex string, for example, that contains invalid characters will
  18389. // cause everything after the first invalid character to be ignored. (e.g.
  18390. // 'abxxcd' will be treated as 'ab')
  18391. that = that.slice(0, actual)
  18392. }
  18393. return that
  18394. }
  18395. function fromArrayLike (that, array) {
  18396. var length = array.length < 0 ? 0 : checked(array.length) | 0
  18397. that = createBuffer(that, length)
  18398. for (var i = 0; i < length; i += 1) {
  18399. that[i] = array[i] & 255
  18400. }
  18401. return that
  18402. }
  18403. function fromArrayBuffer (that, array, byteOffset, length) {
  18404. array.byteLength // this throws if `array` is not a valid ArrayBuffer
  18405. if (byteOffset < 0 || array.byteLength < byteOffset) {
  18406. throw new RangeError('\'offset\' is out of bounds')
  18407. }
  18408. if (array.byteLength < byteOffset + (length || 0)) {
  18409. throw new RangeError('\'length\' is out of bounds')
  18410. }
  18411. if (byteOffset === undefined && length === undefined) {
  18412. array = new Uint8Array(array)
  18413. } else if (length === undefined) {
  18414. array = new Uint8Array(array, byteOffset)
  18415. } else {
  18416. array = new Uint8Array(array, byteOffset, length)
  18417. }
  18418. if (Buffer.TYPED_ARRAY_SUPPORT) {
  18419. // Return an augmented `Uint8Array` instance, for best performance
  18420. that = array
  18421. that.__proto__ = Buffer.prototype
  18422. } else {
  18423. // Fallback: Return an object instance of the Buffer class
  18424. that = fromArrayLike(that, array)
  18425. }
  18426. return that
  18427. }
  18428. function fromObject (that, obj) {
  18429. if (Buffer.isBuffer(obj)) {
  18430. var len = checked(obj.length) | 0
  18431. that = createBuffer(that, len)
  18432. if (that.length === 0) {
  18433. return that
  18434. }
  18435. obj.copy(that, 0, 0, len)
  18436. return that
  18437. }
  18438. if (obj) {
  18439. if ((typeof ArrayBuffer !== 'undefined' &&
  18440. obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
  18441. if (typeof obj.length !== 'number' || isnan(obj.length)) {
  18442. return createBuffer(that, 0)
  18443. }
  18444. return fromArrayLike(that, obj)
  18445. }
  18446. if (obj.type === 'Buffer' && isArray(obj.data)) {
  18447. return fromArrayLike(that, obj.data)
  18448. }
  18449. }
  18450. throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
  18451. }
  18452. function checked (length) {
  18453. // Note: cannot use `length < kMaxLength()` here because that fails when
  18454. // length is NaN (which is otherwise coerced to zero.)
  18455. if (length >= kMaxLength()) {
  18456. throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
  18457. 'size: 0x' + kMaxLength().toString(16) + ' bytes')
  18458. }
  18459. return length | 0
  18460. }
  18461. function SlowBuffer (length) {
  18462. if (+length != length) { // eslint-disable-line eqeqeq
  18463. length = 0
  18464. }
  18465. return Buffer.alloc(+length)
  18466. }
  18467. Buffer.isBuffer = function isBuffer (b) {
  18468. return !!(b != null && b._isBuffer)
  18469. }
  18470. Buffer.compare = function compare (a, b) {
  18471. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  18472. throw new TypeError('Arguments must be Buffers')
  18473. }
  18474. if (a === b) return 0
  18475. var x = a.length
  18476. var y = b.length
  18477. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  18478. if (a[i] !== b[i]) {
  18479. x = a[i]
  18480. y = b[i]
  18481. break
  18482. }
  18483. }
  18484. if (x < y) return -1
  18485. if (y < x) return 1
  18486. return 0
  18487. }
  18488. Buffer.isEncoding = function isEncoding (encoding) {
  18489. switch (String(encoding).toLowerCase()) {
  18490. case 'hex':
  18491. case 'utf8':
  18492. case 'utf-8':
  18493. case 'ascii':
  18494. case 'latin1':
  18495. case 'binary':
  18496. case 'base64':
  18497. case 'ucs2':
  18498. case 'ucs-2':
  18499. case 'utf16le':
  18500. case 'utf-16le':
  18501. return true
  18502. default:
  18503. return false
  18504. }
  18505. }
  18506. Buffer.concat = function concat (list, length) {
  18507. if (!isArray(list)) {
  18508. throw new TypeError('"list" argument must be an Array of Buffers')
  18509. }
  18510. if (list.length === 0) {
  18511. return Buffer.alloc(0)
  18512. }
  18513. var i
  18514. if (length === undefined) {
  18515. length = 0
  18516. for (i = 0; i < list.length; ++i) {
  18517. length += list[i].length
  18518. }
  18519. }
  18520. var buffer = Buffer.allocUnsafe(length)
  18521. var pos = 0
  18522. for (i = 0; i < list.length; ++i) {
  18523. var buf = list[i]
  18524. if (!Buffer.isBuffer(buf)) {
  18525. throw new TypeError('"list" argument must be an Array of Buffers')
  18526. }
  18527. buf.copy(buffer, pos)
  18528. pos += buf.length
  18529. }
  18530. return buffer
  18531. }
  18532. function byteLength (string, encoding) {
  18533. if (Buffer.isBuffer(string)) {
  18534. return string.length
  18535. }
  18536. if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
  18537. (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
  18538. return string.byteLength
  18539. }
  18540. if (typeof string !== 'string') {
  18541. string = '' + string
  18542. }
  18543. var len = string.length
  18544. if (len === 0) return 0
  18545. // Use a for loop to avoid recursion
  18546. var loweredCase = false
  18547. for (;;) {
  18548. switch (encoding) {
  18549. case 'ascii':
  18550. case 'latin1':
  18551. case 'binary':
  18552. return len
  18553. case 'utf8':
  18554. case 'utf-8':
  18555. case undefined:
  18556. return utf8ToBytes(string).length
  18557. case 'ucs2':
  18558. case 'ucs-2':
  18559. case 'utf16le':
  18560. case 'utf-16le':
  18561. return len * 2
  18562. case 'hex':
  18563. return len >>> 1
  18564. case 'base64':
  18565. return base64ToBytes(string).length
  18566. default:
  18567. if (loweredCase) return utf8ToBytes(string).length // assume utf8
  18568. encoding = ('' + encoding).toLowerCase()
  18569. loweredCase = true
  18570. }
  18571. }
  18572. }
  18573. Buffer.byteLength = byteLength
  18574. function slowToString (encoding, start, end) {
  18575. var loweredCase = false
  18576. // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  18577. // property of a typed array.
  18578. // This behaves neither like String nor Uint8Array in that we set start/end
  18579. // to their upper/lower bounds if the value passed is out of range.
  18580. // undefined is handled specially as per ECMA-262 6th Edition,
  18581. // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  18582. if (start === undefined || start < 0) {
  18583. start = 0
  18584. }
  18585. // Return early if start > this.length. Done here to prevent potential uint32
  18586. // coercion fail below.
  18587. if (start > this.length) {
  18588. return ''
  18589. }
  18590. if (end === undefined || end > this.length) {
  18591. end = this.length
  18592. }
  18593. if (end <= 0) {
  18594. return ''
  18595. }
  18596. // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
  18597. end >>>= 0
  18598. start >>>= 0
  18599. if (end <= start) {
  18600. return ''
  18601. }
  18602. if (!encoding) encoding = 'utf8'
  18603. while (true) {
  18604. switch (encoding) {
  18605. case 'hex':
  18606. return hexSlice(this, start, end)
  18607. case 'utf8':
  18608. case 'utf-8':
  18609. return utf8Slice(this, start, end)
  18610. case 'ascii':
  18611. return asciiSlice(this, start, end)
  18612. case 'latin1':
  18613. case 'binary':
  18614. return latin1Slice(this, start, end)
  18615. case 'base64':
  18616. return base64Slice(this, start, end)
  18617. case 'ucs2':
  18618. case 'ucs-2':
  18619. case 'utf16le':
  18620. case 'utf-16le':
  18621. return utf16leSlice(this, start, end)
  18622. default:
  18623. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  18624. encoding = (encoding + '').toLowerCase()
  18625. loweredCase = true
  18626. }
  18627. }
  18628. }
  18629. // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
  18630. // Buffer instances.
  18631. Buffer.prototype._isBuffer = true
  18632. function swap (b, n, m) {
  18633. var i = b[n]
  18634. b[n] = b[m]
  18635. b[m] = i
  18636. }
  18637. Buffer.prototype.swap16 = function swap16 () {
  18638. var len = this.length
  18639. if (len % 2 !== 0) {
  18640. throw new RangeError('Buffer size must be a multiple of 16-bits')
  18641. }
  18642. for (var i = 0; i < len; i += 2) {
  18643. swap(this, i, i + 1)
  18644. }
  18645. return this
  18646. }
  18647. Buffer.prototype.swap32 = function swap32 () {
  18648. var len = this.length
  18649. if (len % 4 !== 0) {
  18650. throw new RangeError('Buffer size must be a multiple of 32-bits')
  18651. }
  18652. for (var i = 0; i < len; i += 4) {
  18653. swap(this, i, i + 3)
  18654. swap(this, i + 1, i + 2)
  18655. }
  18656. return this
  18657. }
  18658. Buffer.prototype.swap64 = function swap64 () {
  18659. var len = this.length
  18660. if (len % 8 !== 0) {
  18661. throw new RangeError('Buffer size must be a multiple of 64-bits')
  18662. }
  18663. for (var i = 0; i < len; i += 8) {
  18664. swap(this, i, i + 7)
  18665. swap(this, i + 1, i + 6)
  18666. swap(this, i + 2, i + 5)
  18667. swap(this, i + 3, i + 4)
  18668. }
  18669. return this
  18670. }
  18671. Buffer.prototype.toString = function toString () {
  18672. var length = this.length | 0
  18673. if (length === 0) return ''
  18674. if (arguments.length === 0) return utf8Slice(this, 0, length)
  18675. return slowToString.apply(this, arguments)
  18676. }
  18677. Buffer.prototype.equals = function equals (b) {
  18678. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
  18679. if (this === b) return true
  18680. return Buffer.compare(this, b) === 0
  18681. }
  18682. Buffer.prototype.inspect = function inspect () {
  18683. var str = ''
  18684. var max = exports.INSPECT_MAX_BYTES
  18685. if (this.length > 0) {
  18686. str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
  18687. if (this.length > max) str += ' ... '
  18688. }
  18689. return '<Buffer ' + str + '>'
  18690. }
  18691. Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
  18692. if (!Buffer.isBuffer(target)) {
  18693. throw new TypeError('Argument must be a Buffer')
  18694. }
  18695. if (start === undefined) {
  18696. start = 0
  18697. }
  18698. if (end === undefined) {
  18699. end = target ? target.length : 0
  18700. }
  18701. if (thisStart === undefined) {
  18702. thisStart = 0
  18703. }
  18704. if (thisEnd === undefined) {
  18705. thisEnd = this.length
  18706. }
  18707. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  18708. throw new RangeError('out of range index')
  18709. }
  18710. if (thisStart >= thisEnd && start >= end) {
  18711. return 0
  18712. }
  18713. if (thisStart >= thisEnd) {
  18714. return -1
  18715. }
  18716. if (start >= end) {
  18717. return 1
  18718. }
  18719. start >>>= 0
  18720. end >>>= 0
  18721. thisStart >>>= 0
  18722. thisEnd >>>= 0
  18723. if (this === target) return 0
  18724. var x = thisEnd - thisStart
  18725. var y = end - start
  18726. var len = Math.min(x, y)
  18727. var thisCopy = this.slice(thisStart, thisEnd)
  18728. var targetCopy = target.slice(start, end)
  18729. for (var i = 0; i < len; ++i) {
  18730. if (thisCopy[i] !== targetCopy[i]) {
  18731. x = thisCopy[i]
  18732. y = targetCopy[i]
  18733. break
  18734. }
  18735. }
  18736. if (x < y) return -1
  18737. if (y < x) return 1
  18738. return 0
  18739. }
  18740. // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
  18741. // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
  18742. //
  18743. // Arguments:
  18744. // - buffer - a Buffer to search
  18745. // - val - a string, Buffer, or number
  18746. // - byteOffset - an index into `buffer`; will be clamped to an int32
  18747. // - encoding - an optional encoding, relevant is val is a string
  18748. // - dir - true for indexOf, false for lastIndexOf
  18749. function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
  18750. // Empty buffer means no match
  18751. if (buffer.length === 0) return -1
  18752. // Normalize byteOffset
  18753. if (typeof byteOffset === 'string') {
  18754. encoding = byteOffset
  18755. byteOffset = 0
  18756. } else if (byteOffset > 0x7fffffff) {
  18757. byteOffset = 0x7fffffff
  18758. } else if (byteOffset < -0x80000000) {
  18759. byteOffset = -0x80000000
  18760. }
  18761. byteOffset = +byteOffset // Coerce to Number.
  18762. if (isNaN(byteOffset)) {
  18763. // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
  18764. byteOffset = dir ? 0 : (buffer.length - 1)
  18765. }
  18766. // Normalize byteOffset: negative offsets start from the end of the buffer
  18767. if (byteOffset < 0) byteOffset = buffer.length + byteOffset
  18768. if (byteOffset >= buffer.length) {
  18769. if (dir) return -1
  18770. else byteOffset = buffer.length - 1
  18771. } else if (byteOffset < 0) {
  18772. if (dir) byteOffset = 0
  18773. else return -1
  18774. }
  18775. // Normalize val
  18776. if (typeof val === 'string') {
  18777. val = Buffer.from(val, encoding)
  18778. }
  18779. // Finally, search either indexOf (if dir is true) or lastIndexOf
  18780. if (Buffer.isBuffer(val)) {
  18781. // Special case: looking for empty string/buffer always fails
  18782. if (val.length === 0) {
  18783. return -1
  18784. }
  18785. return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
  18786. } else if (typeof val === 'number') {
  18787. val = val & 0xFF // Search for a byte value [0-255]
  18788. if (Buffer.TYPED_ARRAY_SUPPORT &&
  18789. typeof Uint8Array.prototype.indexOf === 'function') {
  18790. if (dir) {
  18791. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
  18792. } else {
  18793. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
  18794. }
  18795. }
  18796. return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
  18797. }
  18798. throw new TypeError('val must be string, number or Buffer')
  18799. }
  18800. function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
  18801. var indexSize = 1
  18802. var arrLength = arr.length
  18803. var valLength = val.length
  18804. if (encoding !== undefined) {
  18805. encoding = String(encoding).toLowerCase()
  18806. if (encoding === 'ucs2' || encoding === 'ucs-2' ||
  18807. encoding === 'utf16le' || encoding === 'utf-16le') {
  18808. if (arr.length < 2 || val.length < 2) {
  18809. return -1
  18810. }
  18811. indexSize = 2
  18812. arrLength /= 2
  18813. valLength /= 2
  18814. byteOffset /= 2
  18815. }
  18816. }
  18817. function read (buf, i) {
  18818. if (indexSize === 1) {
  18819. return buf[i]
  18820. } else {
  18821. return buf.readUInt16BE(i * indexSize)
  18822. }
  18823. }
  18824. var i
  18825. if (dir) {
  18826. var foundIndex = -1
  18827. for (i = byteOffset; i < arrLength; i++) {
  18828. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  18829. if (foundIndex === -1) foundIndex = i
  18830. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
  18831. } else {
  18832. if (foundIndex !== -1) i -= i - foundIndex
  18833. foundIndex = -1
  18834. }
  18835. }
  18836. } else {
  18837. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
  18838. for (i = byteOffset; i >= 0; i--) {
  18839. var found = true
  18840. for (var j = 0; j < valLength; j++) {
  18841. if (read(arr, i + j) !== read(val, j)) {
  18842. found = false
  18843. break
  18844. }
  18845. }
  18846. if (found) return i
  18847. }
  18848. }
  18849. return -1
  18850. }
  18851. Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
  18852. return this.indexOf(val, byteOffset, encoding) !== -1
  18853. }
  18854. Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
  18855. return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
  18856. }
  18857. Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
  18858. return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
  18859. }
  18860. function hexWrite (buf, string, offset, length) {
  18861. offset = Number(offset) || 0
  18862. var remaining = buf.length - offset
  18863. if (!length) {
  18864. length = remaining
  18865. } else {
  18866. length = Number(length)
  18867. if (length > remaining) {
  18868. length = remaining
  18869. }
  18870. }
  18871. // must be an even number of digits
  18872. var strLen = string.length
  18873. if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
  18874. if (length > strLen / 2) {
  18875. length = strLen / 2
  18876. }
  18877. for (var i = 0; i < length; ++i) {
  18878. var parsed = parseInt(string.substr(i * 2, 2), 16)
  18879. if (isNaN(parsed)) return i
  18880. buf[offset + i] = parsed
  18881. }
  18882. return i
  18883. }
  18884. function utf8Write (buf, string, offset, length) {
  18885. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
  18886. }
  18887. function asciiWrite (buf, string, offset, length) {
  18888. return blitBuffer(asciiToBytes(string), buf, offset, length)
  18889. }
  18890. function latin1Write (buf, string, offset, length) {
  18891. return asciiWrite(buf, string, offset, length)
  18892. }
  18893. function base64Write (buf, string, offset, length) {
  18894. return blitBuffer(base64ToBytes(string), buf, offset, length)
  18895. }
  18896. function ucs2Write (buf, string, offset, length) {
  18897. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
  18898. }
  18899. Buffer.prototype.write = function write (string, offset, length, encoding) {
  18900. // Buffer#write(string)
  18901. if (offset === undefined) {
  18902. encoding = 'utf8'
  18903. length = this.length
  18904. offset = 0
  18905. // Buffer#write(string, encoding)
  18906. } else if (length === undefined && typeof offset === 'string') {
  18907. encoding = offset
  18908. length = this.length
  18909. offset = 0
  18910. // Buffer#write(string, offset[, length][, encoding])
  18911. } else if (isFinite(offset)) {
  18912. offset = offset | 0
  18913. if (isFinite(length)) {
  18914. length = length | 0
  18915. if (encoding === undefined) encoding = 'utf8'
  18916. } else {
  18917. encoding = length
  18918. length = undefined
  18919. }
  18920. // legacy write(string, encoding, offset, length) - remove in v0.13
  18921. } else {
  18922. throw new Error(
  18923. 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
  18924. )
  18925. }
  18926. var remaining = this.length - offset
  18927. if (length === undefined || length > remaining) length = remaining
  18928. if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
  18929. throw new RangeError('Attempt to write outside buffer bounds')
  18930. }
  18931. if (!encoding) encoding = 'utf8'
  18932. var loweredCase = false
  18933. for (;;) {
  18934. switch (encoding) {
  18935. case 'hex':
  18936. return hexWrite(this, string, offset, length)
  18937. case 'utf8':
  18938. case 'utf-8':
  18939. return utf8Write(this, string, offset, length)
  18940. case 'ascii':
  18941. return asciiWrite(this, string, offset, length)
  18942. case 'latin1':
  18943. case 'binary':
  18944. return latin1Write(this, string, offset, length)
  18945. case 'base64':
  18946. // Warning: maxLength not taken into account in base64Write
  18947. return base64Write(this, string, offset, length)
  18948. case 'ucs2':
  18949. case 'ucs-2':
  18950. case 'utf16le':
  18951. case 'utf-16le':
  18952. return ucs2Write(this, string, offset, length)
  18953. default:
  18954. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  18955. encoding = ('' + encoding).toLowerCase()
  18956. loweredCase = true
  18957. }
  18958. }
  18959. }
  18960. Buffer.prototype.toJSON = function toJSON () {
  18961. return {
  18962. type: 'Buffer',
  18963. data: Array.prototype.slice.call(this._arr || this, 0)
  18964. }
  18965. }
  18966. function base64Slice (buf, start, end) {
  18967. if (start === 0 && end === buf.length) {
  18968. return base64.fromByteArray(buf)
  18969. } else {
  18970. return base64.fromByteArray(buf.slice(start, end))
  18971. }
  18972. }
  18973. function utf8Slice (buf, start, end) {
  18974. end = Math.min(buf.length, end)
  18975. var res = []
  18976. var i = start
  18977. while (i < end) {
  18978. var firstByte = buf[i]
  18979. var codePoint = null
  18980. var bytesPerSequence = (firstByte > 0xEF) ? 4
  18981. : (firstByte > 0xDF) ? 3
  18982. : (firstByte > 0xBF) ? 2
  18983. : 1
  18984. if (i + bytesPerSequence <= end) {
  18985. var secondByte, thirdByte, fourthByte, tempCodePoint
  18986. switch (bytesPerSequence) {
  18987. case 1:
  18988. if (firstByte < 0x80) {
  18989. codePoint = firstByte
  18990. }
  18991. break
  18992. case 2:
  18993. secondByte = buf[i + 1]
  18994. if ((secondByte & 0xC0) === 0x80) {
  18995. tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
  18996. if (tempCodePoint > 0x7F) {
  18997. codePoint = tempCodePoint
  18998. }
  18999. }
  19000. break
  19001. case 3:
  19002. secondByte = buf[i + 1]
  19003. thirdByte = buf[i + 2]
  19004. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  19005. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
  19006. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  19007. codePoint = tempCodePoint
  19008. }
  19009. }
  19010. break
  19011. case 4:
  19012. secondByte = buf[i + 1]
  19013. thirdByte = buf[i + 2]
  19014. fourthByte = buf[i + 3]
  19015. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  19016. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
  19017. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  19018. codePoint = tempCodePoint
  19019. }
  19020. }
  19021. }
  19022. }
  19023. if (codePoint === null) {
  19024. // we did not generate a valid codePoint so insert a
  19025. // replacement char (U+FFFD) and advance only 1 byte
  19026. codePoint = 0xFFFD
  19027. bytesPerSequence = 1
  19028. } else if (codePoint > 0xFFFF) {
  19029. // encode to utf16 (surrogate pair dance)
  19030. codePoint -= 0x10000
  19031. res.push(codePoint >>> 10 & 0x3FF | 0xD800)
  19032. codePoint = 0xDC00 | codePoint & 0x3FF
  19033. }
  19034. res.push(codePoint)
  19035. i += bytesPerSequence
  19036. }
  19037. return decodeCodePointsArray(res)
  19038. }
  19039. // Based on http://stackoverflow.com/a/22747272/680742, the browser with
  19040. // the lowest limit is Chrome, with 0x10000 args.
  19041. // We go 1 magnitude less, for safety
  19042. var MAX_ARGUMENTS_LENGTH = 0x1000
  19043. function decodeCodePointsArray (codePoints) {
  19044. var len = codePoints.length
  19045. if (len <= MAX_ARGUMENTS_LENGTH) {
  19046. return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
  19047. }
  19048. // Decode in chunks to avoid "call stack size exceeded".
  19049. var res = ''
  19050. var i = 0
  19051. while (i < len) {
  19052. res += String.fromCharCode.apply(
  19053. String,
  19054. codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
  19055. )
  19056. }
  19057. return res
  19058. }
  19059. function asciiSlice (buf, start, end) {
  19060. var ret = ''
  19061. end = Math.min(buf.length, end)
  19062. for (var i = start; i < end; ++i) {
  19063. ret += String.fromCharCode(buf[i] & 0x7F)
  19064. }
  19065. return ret
  19066. }
  19067. function latin1Slice (buf, start, end) {
  19068. var ret = ''
  19069. end = Math.min(buf.length, end)
  19070. for (var i = start; i < end; ++i) {
  19071. ret += String.fromCharCode(buf[i])
  19072. }
  19073. return ret
  19074. }
  19075. function hexSlice (buf, start, end) {
  19076. var len = buf.length
  19077. if (!start || start < 0) start = 0
  19078. if (!end || end < 0 || end > len) end = len
  19079. var out = ''
  19080. for (var i = start; i < end; ++i) {
  19081. out += toHex(buf[i])
  19082. }
  19083. return out
  19084. }
  19085. function utf16leSlice (buf, start, end) {
  19086. var bytes = buf.slice(start, end)
  19087. var res = ''
  19088. for (var i = 0; i < bytes.length; i += 2) {
  19089. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
  19090. }
  19091. return res
  19092. }
  19093. Buffer.prototype.slice = function slice (start, end) {
  19094. var len = this.length
  19095. start = ~~start
  19096. end = end === undefined ? len : ~~end
  19097. if (start < 0) {
  19098. start += len
  19099. if (start < 0) start = 0
  19100. } else if (start > len) {
  19101. start = len
  19102. }
  19103. if (end < 0) {
  19104. end += len
  19105. if (end < 0) end = 0
  19106. } else if (end > len) {
  19107. end = len
  19108. }
  19109. if (end < start) end = start
  19110. var newBuf
  19111. if (Buffer.TYPED_ARRAY_SUPPORT) {
  19112. newBuf = this.subarray(start, end)
  19113. newBuf.__proto__ = Buffer.prototype
  19114. } else {
  19115. var sliceLen = end - start
  19116. newBuf = new Buffer(sliceLen, undefined)
  19117. for (var i = 0; i < sliceLen; ++i) {
  19118. newBuf[i] = this[i + start]
  19119. }
  19120. }
  19121. return newBuf
  19122. }
  19123. /*
  19124. * Need to make sure that buffer isn't trying to write out of bounds.
  19125. */
  19126. function checkOffset (offset, ext, length) {
  19127. if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
  19128. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
  19129. }
  19130. Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
  19131. offset = offset | 0
  19132. byteLength = byteLength | 0
  19133. if (!noAssert) checkOffset(offset, byteLength, this.length)
  19134. var val = this[offset]
  19135. var mul = 1
  19136. var i = 0
  19137. while (++i < byteLength && (mul *= 0x100)) {
  19138. val += this[offset + i] * mul
  19139. }
  19140. return val
  19141. }
  19142. Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
  19143. offset = offset | 0
  19144. byteLength = byteLength | 0
  19145. if (!noAssert) {
  19146. checkOffset(offset, byteLength, this.length)
  19147. }
  19148. var val = this[offset + --byteLength]
  19149. var mul = 1
  19150. while (byteLength > 0 && (mul *= 0x100)) {
  19151. val += this[offset + --byteLength] * mul
  19152. }
  19153. return val
  19154. }
  19155. Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
  19156. if (!noAssert) checkOffset(offset, 1, this.length)
  19157. return this[offset]
  19158. }
  19159. Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
  19160. if (!noAssert) checkOffset(offset, 2, this.length)
  19161. return this[offset] | (this[offset + 1] << 8)
  19162. }
  19163. Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
  19164. if (!noAssert) checkOffset(offset, 2, this.length)
  19165. return (this[offset] << 8) | this[offset + 1]
  19166. }
  19167. Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
  19168. if (!noAssert) checkOffset(offset, 4, this.length)
  19169. return ((this[offset]) |
  19170. (this[offset + 1] << 8) |
  19171. (this[offset + 2] << 16)) +
  19172. (this[offset + 3] * 0x1000000)
  19173. }
  19174. Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
  19175. if (!noAssert) checkOffset(offset, 4, this.length)
  19176. return (this[offset] * 0x1000000) +
  19177. ((this[offset + 1] << 16) |
  19178. (this[offset + 2] << 8) |
  19179. this[offset + 3])
  19180. }
  19181. Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
  19182. offset = offset | 0
  19183. byteLength = byteLength | 0
  19184. if (!noAssert) checkOffset(offset, byteLength, this.length)
  19185. var val = this[offset]
  19186. var mul = 1
  19187. var i = 0
  19188. while (++i < byteLength && (mul *= 0x100)) {
  19189. val += this[offset + i] * mul
  19190. }
  19191. mul *= 0x80
  19192. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  19193. return val
  19194. }
  19195. Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
  19196. offset = offset | 0
  19197. byteLength = byteLength | 0
  19198. if (!noAssert) checkOffset(offset, byteLength, this.length)
  19199. var i = byteLength
  19200. var mul = 1
  19201. var val = this[offset + --i]
  19202. while (i > 0 && (mul *= 0x100)) {
  19203. val += this[offset + --i] * mul
  19204. }
  19205. mul *= 0x80
  19206. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  19207. return val
  19208. }
  19209. Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
  19210. if (!noAssert) checkOffset(offset, 1, this.length)
  19211. if (!(this[offset] & 0x80)) return (this[offset])
  19212. return ((0xff - this[offset] + 1) * -1)
  19213. }
  19214. Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
  19215. if (!noAssert) checkOffset(offset, 2, this.length)
  19216. var val = this[offset] | (this[offset + 1] << 8)
  19217. return (val & 0x8000) ? val | 0xFFFF0000 : val
  19218. }
  19219. Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
  19220. if (!noAssert) checkOffset(offset, 2, this.length)
  19221. var val = this[offset + 1] | (this[offset] << 8)
  19222. return (val & 0x8000) ? val | 0xFFFF0000 : val
  19223. }
  19224. Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
  19225. if (!noAssert) checkOffset(offset, 4, this.length)
  19226. return (this[offset]) |
  19227. (this[offset + 1] << 8) |
  19228. (this[offset + 2] << 16) |
  19229. (this[offset + 3] << 24)
  19230. }
  19231. Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
  19232. if (!noAssert) checkOffset(offset, 4, this.length)
  19233. return (this[offset] << 24) |
  19234. (this[offset + 1] << 16) |
  19235. (this[offset + 2] << 8) |
  19236. (this[offset + 3])
  19237. }
  19238. Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
  19239. if (!noAssert) checkOffset(offset, 4, this.length)
  19240. return ieee754.read(this, offset, true, 23, 4)
  19241. }
  19242. Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
  19243. if (!noAssert) checkOffset(offset, 4, this.length)
  19244. return ieee754.read(this, offset, false, 23, 4)
  19245. }
  19246. Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
  19247. if (!noAssert) checkOffset(offset, 8, this.length)
  19248. return ieee754.read(this, offset, true, 52, 8)
  19249. }
  19250. Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
  19251. if (!noAssert) checkOffset(offset, 8, this.length)
  19252. return ieee754.read(this, offset, false, 52, 8)
  19253. }
  19254. function checkInt (buf, value, offset, ext, max, min) {
  19255. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
  19256. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
  19257. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  19258. }
  19259. Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
  19260. value = +value
  19261. offset = offset | 0
  19262. byteLength = byteLength | 0
  19263. if (!noAssert) {
  19264. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  19265. checkInt(this, value, offset, byteLength, maxBytes, 0)
  19266. }
  19267. var mul = 1
  19268. var i = 0
  19269. this[offset] = value & 0xFF
  19270. while (++i < byteLength && (mul *= 0x100)) {
  19271. this[offset + i] = (value / mul) & 0xFF
  19272. }
  19273. return offset + byteLength
  19274. }
  19275. Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
  19276. value = +value
  19277. offset = offset | 0
  19278. byteLength = byteLength | 0
  19279. if (!noAssert) {
  19280. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  19281. checkInt(this, value, offset, byteLength, maxBytes, 0)
  19282. }
  19283. var i = byteLength - 1
  19284. var mul = 1
  19285. this[offset + i] = value & 0xFF
  19286. while (--i >= 0 && (mul *= 0x100)) {
  19287. this[offset + i] = (value / mul) & 0xFF
  19288. }
  19289. return offset + byteLength
  19290. }
  19291. Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
  19292. value = +value
  19293. offset = offset | 0
  19294. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
  19295. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  19296. this[offset] = (value & 0xff)
  19297. return offset + 1
  19298. }
  19299. function objectWriteUInt16 (buf, value, offset, littleEndian) {
  19300. if (value < 0) value = 0xffff + value + 1
  19301. for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
  19302. buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
  19303. (littleEndian ? i : 1 - i) * 8
  19304. }
  19305. }
  19306. Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
  19307. value = +value
  19308. offset = offset | 0
  19309. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  19310. if (Buffer.TYPED_ARRAY_SUPPORT) {
  19311. this[offset] = (value & 0xff)
  19312. this[offset + 1] = (value >>> 8)
  19313. } else {
  19314. objectWriteUInt16(this, value, offset, true)
  19315. }
  19316. return offset + 2
  19317. }
  19318. Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
  19319. value = +value
  19320. offset = offset | 0
  19321. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  19322. if (Buffer.TYPED_ARRAY_SUPPORT) {
  19323. this[offset] = (value >>> 8)
  19324. this[offset + 1] = (value & 0xff)
  19325. } else {
  19326. objectWriteUInt16(this, value, offset, false)
  19327. }
  19328. return offset + 2
  19329. }
  19330. function objectWriteUInt32 (buf, value, offset, littleEndian) {
  19331. if (value < 0) value = 0xffffffff + value + 1
  19332. for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
  19333. buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
  19334. }
  19335. }
  19336. Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
  19337. value = +value
  19338. offset = offset | 0
  19339. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  19340. if (Buffer.TYPED_ARRAY_SUPPORT) {
  19341. this[offset + 3] = (value >>> 24)
  19342. this[offset + 2] = (value >>> 16)
  19343. this[offset + 1] = (value >>> 8)
  19344. this[offset] = (value & 0xff)
  19345. } else {
  19346. objectWriteUInt32(this, value, offset, true)
  19347. }
  19348. return offset + 4
  19349. }
  19350. Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
  19351. value = +value
  19352. offset = offset | 0
  19353. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  19354. if (Buffer.TYPED_ARRAY_SUPPORT) {
  19355. this[offset] = (value >>> 24)
  19356. this[offset + 1] = (value >>> 16)
  19357. this[offset + 2] = (value >>> 8)
  19358. this[offset + 3] = (value & 0xff)
  19359. } else {
  19360. objectWriteUInt32(this, value, offset, false)
  19361. }
  19362. return offset + 4
  19363. }
  19364. Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
  19365. value = +value
  19366. offset = offset | 0
  19367. if (!noAssert) {
  19368. var limit = Math.pow(2, 8 * byteLength - 1)
  19369. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  19370. }
  19371. var i = 0
  19372. var mul = 1
  19373. var sub = 0
  19374. this[offset] = value & 0xFF
  19375. while (++i < byteLength && (mul *= 0x100)) {
  19376. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  19377. sub = 1
  19378. }
  19379. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  19380. }
  19381. return offset + byteLength
  19382. }
  19383. Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
  19384. value = +value
  19385. offset = offset | 0
  19386. if (!noAssert) {
  19387. var limit = Math.pow(2, 8 * byteLength - 1)
  19388. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  19389. }
  19390. var i = byteLength - 1
  19391. var mul = 1
  19392. var sub = 0
  19393. this[offset + i] = value & 0xFF
  19394. while (--i >= 0 && (mul *= 0x100)) {
  19395. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  19396. sub = 1
  19397. }
  19398. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  19399. }
  19400. return offset + byteLength
  19401. }
  19402. Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
  19403. value = +value
  19404. offset = offset | 0
  19405. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
  19406. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  19407. if (value < 0) value = 0xff + value + 1
  19408. this[offset] = (value & 0xff)
  19409. return offset + 1
  19410. }
  19411. Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
  19412. value = +value
  19413. offset = offset | 0
  19414. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  19415. if (Buffer.TYPED_ARRAY_SUPPORT) {
  19416. this[offset] = (value & 0xff)
  19417. this[offset + 1] = (value >>> 8)
  19418. } else {
  19419. objectWriteUInt16(this, value, offset, true)
  19420. }
  19421. return offset + 2
  19422. }
  19423. Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
  19424. value = +value
  19425. offset = offset | 0
  19426. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  19427. if (Buffer.TYPED_ARRAY_SUPPORT) {
  19428. this[offset] = (value >>> 8)
  19429. this[offset + 1] = (value & 0xff)
  19430. } else {
  19431. objectWriteUInt16(this, value, offset, false)
  19432. }
  19433. return offset + 2
  19434. }
  19435. Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
  19436. value = +value
  19437. offset = offset | 0
  19438. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  19439. if (Buffer.TYPED_ARRAY_SUPPORT) {
  19440. this[offset] = (value & 0xff)
  19441. this[offset + 1] = (value >>> 8)
  19442. this[offset + 2] = (value >>> 16)
  19443. this[offset + 3] = (value >>> 24)
  19444. } else {
  19445. objectWriteUInt32(this, value, offset, true)
  19446. }
  19447. return offset + 4
  19448. }
  19449. Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
  19450. value = +value
  19451. offset = offset | 0
  19452. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  19453. if (value < 0) value = 0xffffffff + value + 1
  19454. if (Buffer.TYPED_ARRAY_SUPPORT) {
  19455. this[offset] = (value >>> 24)
  19456. this[offset + 1] = (value >>> 16)
  19457. this[offset + 2] = (value >>> 8)
  19458. this[offset + 3] = (value & 0xff)
  19459. } else {
  19460. objectWriteUInt32(this, value, offset, false)
  19461. }
  19462. return offset + 4
  19463. }
  19464. function checkIEEE754 (buf, value, offset, ext, max, min) {
  19465. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  19466. if (offset < 0) throw new RangeError('Index out of range')
  19467. }
  19468. function writeFloat (buf, value, offset, littleEndian, noAssert) {
  19469. if (!noAssert) {
  19470. checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
  19471. }
  19472. ieee754.write(buf, value, offset, littleEndian, 23, 4)
  19473. return offset + 4
  19474. }
  19475. Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
  19476. return writeFloat(this, value, offset, true, noAssert)
  19477. }
  19478. Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
  19479. return writeFloat(this, value, offset, false, noAssert)
  19480. }
  19481. function writeDouble (buf, value, offset, littleEndian, noAssert) {
  19482. if (!noAssert) {
  19483. checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
  19484. }
  19485. ieee754.write(buf, value, offset, littleEndian, 52, 8)
  19486. return offset + 8
  19487. }
  19488. Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
  19489. return writeDouble(this, value, offset, true, noAssert)
  19490. }
  19491. Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
  19492. return writeDouble(this, value, offset, false, noAssert)
  19493. }
  19494. // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  19495. Buffer.prototype.copy = function copy (target, targetStart, start, end) {
  19496. if (!start) start = 0
  19497. if (!end && end !== 0) end = this.length
  19498. if (targetStart >= target.length) targetStart = target.length
  19499. if (!targetStart) targetStart = 0
  19500. if (end > 0 && end < start) end = start
  19501. // Copy 0 bytes; we're done
  19502. if (end === start) return 0
  19503. if (target.length === 0 || this.length === 0) return 0
  19504. // Fatal error conditions
  19505. if (targetStart < 0) {
  19506. throw new RangeError('targetStart out of bounds')
  19507. }
  19508. if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
  19509. if (end < 0) throw new RangeError('sourceEnd out of bounds')
  19510. // Are we oob?
  19511. if (end > this.length) end = this.length
  19512. if (target.length - targetStart < end - start) {
  19513. end = target.length - targetStart + start
  19514. }
  19515. var len = end - start
  19516. var i
  19517. if (this === target && start < targetStart && targetStart < end) {
  19518. // descending copy from end
  19519. for (i = len - 1; i >= 0; --i) {
  19520. target[i + targetStart] = this[i + start]
  19521. }
  19522. } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
  19523. // ascending copy from start
  19524. for (i = 0; i < len; ++i) {
  19525. target[i + targetStart] = this[i + start]
  19526. }
  19527. } else {
  19528. Uint8Array.prototype.set.call(
  19529. target,
  19530. this.subarray(start, start + len),
  19531. targetStart
  19532. )
  19533. }
  19534. return len
  19535. }
  19536. // Usage:
  19537. // buffer.fill(number[, offset[, end]])
  19538. // buffer.fill(buffer[, offset[, end]])
  19539. // buffer.fill(string[, offset[, end]][, encoding])
  19540. Buffer.prototype.fill = function fill (val, start, end, encoding) {
  19541. // Handle string cases:
  19542. if (typeof val === 'string') {
  19543. if (typeof start === 'string') {
  19544. encoding = start
  19545. start = 0
  19546. end = this.length
  19547. } else if (typeof end === 'string') {
  19548. encoding = end
  19549. end = this.length
  19550. }
  19551. if (val.length === 1) {
  19552. var code = val.charCodeAt(0)
  19553. if (code < 256) {
  19554. val = code
  19555. }
  19556. }
  19557. if (encoding !== undefined && typeof encoding !== 'string') {
  19558. throw new TypeError('encoding must be a string')
  19559. }
  19560. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  19561. throw new TypeError('Unknown encoding: ' + encoding)
  19562. }
  19563. } else if (typeof val === 'number') {
  19564. val = val & 255
  19565. }
  19566. // Invalid ranges are not set to a default, so can range check early.
  19567. if (start < 0 || this.length < start || this.length < end) {
  19568. throw new RangeError('Out of range index')
  19569. }
  19570. if (end <= start) {
  19571. return this
  19572. }
  19573. start = start >>> 0
  19574. end = end === undefined ? this.length : end >>> 0
  19575. if (!val) val = 0
  19576. var i
  19577. if (typeof val === 'number') {
  19578. for (i = start; i < end; ++i) {
  19579. this[i] = val
  19580. }
  19581. } else {
  19582. var bytes = Buffer.isBuffer(val)
  19583. ? val
  19584. : utf8ToBytes(new Buffer(val, encoding).toString())
  19585. var len = bytes.length
  19586. for (i = 0; i < end - start; ++i) {
  19587. this[i + start] = bytes[i % len]
  19588. }
  19589. }
  19590. return this
  19591. }
  19592. // HELPER FUNCTIONS
  19593. // ================
  19594. var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
  19595. function base64clean (str) {
  19596. // Node strips out invalid characters like \n and \t from the string, base64-js does not
  19597. str = stringtrim(str).replace(INVALID_BASE64_RE, '')
  19598. // Node converts strings with length < 2 to ''
  19599. if (str.length < 2) return ''
  19600. // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  19601. while (str.length % 4 !== 0) {
  19602. str = str + '='
  19603. }
  19604. return str
  19605. }
  19606. function stringtrim (str) {
  19607. if (str.trim) return str.trim()
  19608. return str.replace(/^\s+|\s+$/g, '')
  19609. }
  19610. function toHex (n) {
  19611. if (n < 16) return '0' + n.toString(16)
  19612. return n.toString(16)
  19613. }
  19614. function utf8ToBytes (string, units) {
  19615. units = units || Infinity
  19616. var codePoint
  19617. var length = string.length
  19618. var leadSurrogate = null
  19619. var bytes = []
  19620. for (var i = 0; i < length; ++i) {
  19621. codePoint = string.charCodeAt(i)
  19622. // is surrogate component
  19623. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  19624. // last char was a lead
  19625. if (!leadSurrogate) {
  19626. // no lead yet
  19627. if (codePoint > 0xDBFF) {
  19628. // unexpected trail
  19629. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  19630. continue
  19631. } else if (i + 1 === length) {
  19632. // unpaired lead
  19633. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  19634. continue
  19635. }
  19636. // valid lead
  19637. leadSurrogate = codePoint
  19638. continue
  19639. }
  19640. // 2 leads in a row
  19641. if (codePoint < 0xDC00) {
  19642. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  19643. leadSurrogate = codePoint
  19644. continue
  19645. }
  19646. // valid surrogate pair
  19647. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
  19648. } else if (leadSurrogate) {
  19649. // valid bmp char, but last char was a lead
  19650. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  19651. }
  19652. leadSurrogate = null
  19653. // encode utf8
  19654. if (codePoint < 0x80) {
  19655. if ((units -= 1) < 0) break
  19656. bytes.push(codePoint)
  19657. } else if (codePoint < 0x800) {
  19658. if ((units -= 2) < 0) break
  19659. bytes.push(
  19660. codePoint >> 0x6 | 0xC0,
  19661. codePoint & 0x3F | 0x80
  19662. )
  19663. } else if (codePoint < 0x10000) {
  19664. if ((units -= 3) < 0) break
  19665. bytes.push(
  19666. codePoint >> 0xC | 0xE0,
  19667. codePoint >> 0x6 & 0x3F | 0x80,
  19668. codePoint & 0x3F | 0x80
  19669. )
  19670. } else if (codePoint < 0x110000) {
  19671. if ((units -= 4) < 0) break
  19672. bytes.push(
  19673. codePoint >> 0x12 | 0xF0,
  19674. codePoint >> 0xC & 0x3F | 0x80,
  19675. codePoint >> 0x6 & 0x3F | 0x80,
  19676. codePoint & 0x3F | 0x80
  19677. )
  19678. } else {
  19679. throw new Error('Invalid code point')
  19680. }
  19681. }
  19682. return bytes
  19683. }
  19684. function asciiToBytes (str) {
  19685. var byteArray = []
  19686. for (var i = 0; i < str.length; ++i) {
  19687. // Node's code seems to be doing this and not & 0x7F..
  19688. byteArray.push(str.charCodeAt(i) & 0xFF)
  19689. }
  19690. return byteArray
  19691. }
  19692. function utf16leToBytes (str, units) {
  19693. var c, hi, lo
  19694. var byteArray = []
  19695. for (var i = 0; i < str.length; ++i) {
  19696. if ((units -= 2) < 0) break
  19697. c = str.charCodeAt(i)
  19698. hi = c >> 8
  19699. lo = c % 256
  19700. byteArray.push(lo)
  19701. byteArray.push(hi)
  19702. }
  19703. return byteArray
  19704. }
  19705. function base64ToBytes (str) {
  19706. return base64.toByteArray(base64clean(str))
  19707. }
  19708. function blitBuffer (src, dst, offset, length) {
  19709. for (var i = 0; i < length; ++i) {
  19710. if ((i + offset >= dst.length) || (i >= src.length)) break
  19711. dst[i + offset] = src[i]
  19712. }
  19713. return i
  19714. }
  19715. function isnan (val) {
  19716. return val !== val // eslint-disable-line no-self-compare
  19717. }
  19718. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 3)))
  19719. /***/ }),
  19720. /***/ 435:
  19721. /*!*****************************************!*\
  19722. !*** ./node_modules/base64-js/index.js ***!
  19723. \*****************************************/
  19724. /*! no static exports found */
  19725. /***/ (function(module, exports, __webpack_require__) {
  19726. "use strict";
  19727. exports.byteLength = byteLength
  19728. exports.toByteArray = toByteArray
  19729. exports.fromByteArray = fromByteArray
  19730. var lookup = []
  19731. var revLookup = []
  19732. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
  19733. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  19734. for (var i = 0, len = code.length; i < len; ++i) {
  19735. lookup[i] = code[i]
  19736. revLookup[code.charCodeAt(i)] = i
  19737. }
  19738. // Support decoding URL-safe base64 strings, as Node.js does.
  19739. // See: https://en.wikipedia.org/wiki/Base64#URL_applications
  19740. revLookup['-'.charCodeAt(0)] = 62
  19741. revLookup['_'.charCodeAt(0)] = 63
  19742. function getLens (b64) {
  19743. var len = b64.length
  19744. if (len % 4 > 0) {
  19745. throw new Error('Invalid string. Length must be a multiple of 4')
  19746. }
  19747. // Trim off extra bytes after placeholder bytes are found
  19748. // See: https://github.com/beatgammit/base64-js/issues/42
  19749. var validLen = b64.indexOf('=')
  19750. if (validLen === -1) validLen = len
  19751. var placeHoldersLen = validLen === len
  19752. ? 0
  19753. : 4 - (validLen % 4)
  19754. return [validLen, placeHoldersLen]
  19755. }
  19756. // base64 is 4/3 + up to two characters of the original data
  19757. function byteLength (b64) {
  19758. var lens = getLens(b64)
  19759. var validLen = lens[0]
  19760. var placeHoldersLen = lens[1]
  19761. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  19762. }
  19763. function _byteLength (b64, validLen, placeHoldersLen) {
  19764. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  19765. }
  19766. function toByteArray (b64) {
  19767. var tmp
  19768. var lens = getLens(b64)
  19769. var validLen = lens[0]
  19770. var placeHoldersLen = lens[1]
  19771. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
  19772. var curByte = 0
  19773. // if there are placeholders, only get up to the last complete 4 chars
  19774. var len = placeHoldersLen > 0
  19775. ? validLen - 4
  19776. : validLen
  19777. var i
  19778. for (i = 0; i < len; i += 4) {
  19779. tmp =
  19780. (revLookup[b64.charCodeAt(i)] << 18) |
  19781. (revLookup[b64.charCodeAt(i + 1)] << 12) |
  19782. (revLookup[b64.charCodeAt(i + 2)] << 6) |
  19783. revLookup[b64.charCodeAt(i + 3)]
  19784. arr[curByte++] = (tmp >> 16) & 0xFF
  19785. arr[curByte++] = (tmp >> 8) & 0xFF
  19786. arr[curByte++] = tmp & 0xFF
  19787. }
  19788. if (placeHoldersLen === 2) {
  19789. tmp =
  19790. (revLookup[b64.charCodeAt(i)] << 2) |
  19791. (revLookup[b64.charCodeAt(i + 1)] >> 4)
  19792. arr[curByte++] = tmp & 0xFF
  19793. }
  19794. if (placeHoldersLen === 1) {
  19795. tmp =
  19796. (revLookup[b64.charCodeAt(i)] << 10) |
  19797. (revLookup[b64.charCodeAt(i + 1)] << 4) |
  19798. (revLookup[b64.charCodeAt(i + 2)] >> 2)
  19799. arr[curByte++] = (tmp >> 8) & 0xFF
  19800. arr[curByte++] = tmp & 0xFF
  19801. }
  19802. return arr
  19803. }
  19804. function tripletToBase64 (num) {
  19805. return lookup[num >> 18 & 0x3F] +
  19806. lookup[num >> 12 & 0x3F] +
  19807. lookup[num >> 6 & 0x3F] +
  19808. lookup[num & 0x3F]
  19809. }
  19810. function encodeChunk (uint8, start, end) {
  19811. var tmp
  19812. var output = []
  19813. for (var i = start; i < end; i += 3) {
  19814. tmp =
  19815. ((uint8[i] << 16) & 0xFF0000) +
  19816. ((uint8[i + 1] << 8) & 0xFF00) +
  19817. (uint8[i + 2] & 0xFF)
  19818. output.push(tripletToBase64(tmp))
  19819. }
  19820. return output.join('')
  19821. }
  19822. function fromByteArray (uint8) {
  19823. var tmp
  19824. var len = uint8.length
  19825. var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
  19826. var parts = []
  19827. var maxChunkLength = 16383 // must be multiple of 3
  19828. // go through the array every three bytes, we'll deal with trailing stuff later
  19829. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  19830. parts.push(encodeChunk(
  19831. uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
  19832. ))
  19833. }
  19834. // pad the end with zeros, but make sure to not forget the extra bytes
  19835. if (extraBytes === 1) {
  19836. tmp = uint8[len - 1]
  19837. parts.push(
  19838. lookup[tmp >> 2] +
  19839. lookup[(tmp << 4) & 0x3F] +
  19840. '=='
  19841. )
  19842. } else if (extraBytes === 2) {
  19843. tmp = (uint8[len - 2] << 8) + uint8[len - 1]
  19844. parts.push(
  19845. lookup[tmp >> 10] +
  19846. lookup[(tmp >> 4) & 0x3F] +
  19847. lookup[(tmp << 2) & 0x3F] +
  19848. '='
  19849. )
  19850. }
  19851. return parts.join('')
  19852. }
  19853. /***/ }),
  19854. /***/ 436:
  19855. /*!***************************************!*\
  19856. !*** ./node_modules/ieee754/index.js ***!
  19857. \***************************************/
  19858. /*! no static exports found */
  19859. /***/ (function(module, exports) {
  19860. exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  19861. var e, m
  19862. var eLen = (nBytes * 8) - mLen - 1
  19863. var eMax = (1 << eLen) - 1
  19864. var eBias = eMax >> 1
  19865. var nBits = -7
  19866. var i = isLE ? (nBytes - 1) : 0
  19867. var d = isLE ? -1 : 1
  19868. var s = buffer[offset + i]
  19869. i += d
  19870. e = s & ((1 << (-nBits)) - 1)
  19871. s >>= (-nBits)
  19872. nBits += eLen
  19873. for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  19874. m = e & ((1 << (-nBits)) - 1)
  19875. e >>= (-nBits)
  19876. nBits += mLen
  19877. for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  19878. if (e === 0) {
  19879. e = 1 - eBias
  19880. } else if (e === eMax) {
  19881. return m ? NaN : ((s ? -1 : 1) * Infinity)
  19882. } else {
  19883. m = m + Math.pow(2, mLen)
  19884. e = e - eBias
  19885. }
  19886. return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
  19887. }
  19888. exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  19889. var e, m, c
  19890. var eLen = (nBytes * 8) - mLen - 1
  19891. var eMax = (1 << eLen) - 1
  19892. var eBias = eMax >> 1
  19893. var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
  19894. var i = isLE ? 0 : (nBytes - 1)
  19895. var d = isLE ? 1 : -1
  19896. var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
  19897. value = Math.abs(value)
  19898. if (isNaN(value) || value === Infinity) {
  19899. m = isNaN(value) ? 1 : 0
  19900. e = eMax
  19901. } else {
  19902. e = Math.floor(Math.log(value) / Math.LN2)
  19903. if (value * (c = Math.pow(2, -e)) < 1) {
  19904. e--
  19905. c *= 2
  19906. }
  19907. if (e + eBias >= 1) {
  19908. value += rt / c
  19909. } else {
  19910. value += rt * Math.pow(2, 1 - eBias)
  19911. }
  19912. if (value * c >= 2) {
  19913. e++
  19914. c /= 2
  19915. }
  19916. if (e + eBias >= eMax) {
  19917. m = 0
  19918. e = eMax
  19919. } else if (e + eBias >= 1) {
  19920. m = ((value * c) - 1) * Math.pow(2, mLen)
  19921. e = e + eBias
  19922. } else {
  19923. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
  19924. e = 0
  19925. }
  19926. }
  19927. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  19928. e = (e << mLen) | m
  19929. eLen += mLen
  19930. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  19931. buffer[offset + i - d] |= s * 128
  19932. }
  19933. /***/ }),
  19934. /***/ 437:
  19935. /*!**************************************************************************************!*\
  19936. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/version.js ***!
  19937. \**************************************************************************************/
  19938. /*! no static exports found */
  19939. /***/ (function(module, exports, __webpack_require__) {
  19940. var Utils = __webpack_require__(/*! ./utils */ 423);
  19941. var ECCode = __webpack_require__(/*! ./error-correction-code */ 430);
  19942. var ECLevel = __webpack_require__(/*! ./error-correction-level */ 424);
  19943. var Mode = __webpack_require__(/*! ./mode */ 438);
  19944. var VersionCheck = __webpack_require__(/*! ./version-check */ 439);
  19945. var isArray = __webpack_require__(/*! isarray */ 422);
  19946. // Generator polynomial used to encode version information
  19947. var G18 = 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0;
  19948. var G18_BCH = Utils.getBCHDigit(G18);
  19949. function getBestVersionForDataLength(mode, length, errorCorrectionLevel) {
  19950. for (var currentVersion = 1; currentVersion <= 40; currentVersion++) {
  19951. if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {
  19952. return currentVersion;
  19953. }
  19954. }
  19955. return undefined;
  19956. }
  19957. function getReservedBitsCount(mode, version) {
  19958. // Character count indicator + mode indicator bits
  19959. return Mode.getCharCountIndicator(mode, version) + 4;
  19960. }
  19961. function getTotalBitsFromDataArray(segments, version) {
  19962. var totalBits = 0;
  19963. segments.forEach(function (data) {
  19964. var reservedBits = getReservedBitsCount(data.mode, version);
  19965. totalBits += reservedBits + data.getBitsLength();
  19966. });
  19967. return totalBits;
  19968. }
  19969. function getBestVersionForMixedData(segments, errorCorrectionLevel) {
  19970. for (var currentVersion = 1; currentVersion <= 40; currentVersion++) {
  19971. var length = getTotalBitsFromDataArray(segments, currentVersion);
  19972. if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) {
  19973. return currentVersion;
  19974. }
  19975. }
  19976. return undefined;
  19977. }
  19978. /**
  19979. * Returns version number from a value.
  19980. * If value is not a valid version, returns defaultValue
  19981. *
  19982. * @param {Number|String} value QR Code version
  19983. * @param {Number} defaultValue Fallback value
  19984. * @return {Number} QR Code version number
  19985. */
  19986. exports.from = function from(value, defaultValue) {
  19987. if (VersionCheck.isValid(value)) {
  19988. return parseInt(value, 10);
  19989. }
  19990. return defaultValue;
  19991. };
  19992. /**
  19993. * Returns how much data can be stored with the specified QR code version
  19994. * and error correction level
  19995. *
  19996. * @param {Number} version QR Code version (1-40)
  19997. * @param {Number} errorCorrectionLevel Error correction level
  19998. * @param {Mode} mode Data mode
  19999. * @return {Number} Quantity of storable data
  20000. */
  20001. exports.getCapacity = function getCapacity(version, errorCorrectionLevel, mode) {
  20002. if (!VersionCheck.isValid(version)) {
  20003. throw new Error('Invalid QR Code version');
  20004. }
  20005. // Use Byte mode as default
  20006. if (typeof mode === 'undefined') mode = Mode.BYTE;
  20007. // Total codewords for this QR code version (Data + Error correction)
  20008. var totalCodewords = Utils.getSymbolTotalCodewords(version);
  20009. // Total number of error correction codewords
  20010. var ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel);
  20011. // Total number of data codewords
  20012. var dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8;
  20013. if (mode === Mode.MIXED) return dataTotalCodewordsBits;
  20014. var usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version);
  20015. // Return max number of storable codewords
  20016. switch (mode) {
  20017. case Mode.NUMERIC:
  20018. return Math.floor(usableBits / 10 * 3);
  20019. case Mode.ALPHANUMERIC:
  20020. return Math.floor(usableBits / 11 * 2);
  20021. case Mode.KANJI:
  20022. return Math.floor(usableBits / 13);
  20023. case Mode.BYTE:
  20024. default:
  20025. return Math.floor(usableBits / 8);}
  20026. };
  20027. /**
  20028. * Returns the minimum version needed to contain the amount of data
  20029. *
  20030. * @param {Segment} data Segment of data
  20031. * @param {Number} [errorCorrectionLevel=H] Error correction level
  20032. * @param {Mode} mode Data mode
  20033. * @return {Number} QR Code version
  20034. */
  20035. exports.getBestVersionForData = function getBestVersionForData(data, errorCorrectionLevel) {
  20036. var seg;
  20037. var ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M);
  20038. if (isArray(data)) {
  20039. if (data.length > 1) {
  20040. return getBestVersionForMixedData(data, ecl);
  20041. }
  20042. if (data.length === 0) {
  20043. return 1;
  20044. }
  20045. seg = data[0];
  20046. } else {
  20047. seg = data;
  20048. }
  20049. return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl);
  20050. };
  20051. /**
  20052. * Returns version information with relative error correction bits
  20053. *
  20054. * The version information is included in QR Code symbols of version 7 or larger.
  20055. * It consists of an 18-bit sequence containing 6 data bits,
  20056. * with 12 error correction bits calculated using the (18, 6) Golay code.
  20057. *
  20058. * @param {Number} version QR Code version
  20059. * @return {Number} Encoded version info bits
  20060. */
  20061. exports.getEncodedBits = function getEncodedBits(version) {
  20062. if (!VersionCheck.isValid(version) || version < 7) {
  20063. throw new Error('Invalid QR Code version');
  20064. }
  20065. var d = version << 12;
  20066. while (Utils.getBCHDigit(d) - G18_BCH >= 0) {
  20067. d ^= G18 << Utils.getBCHDigit(d) - G18_BCH;
  20068. }
  20069. return version << 12 | d;
  20070. };
  20071. /***/ }),
  20072. /***/ 438:
  20073. /*!***********************************************************************************!*\
  20074. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/mode.js ***!
  20075. \***********************************************************************************/
  20076. /*! no static exports found */
  20077. /***/ (function(module, exports, __webpack_require__) {
  20078. var VersionCheck = __webpack_require__(/*! ./version-check */ 439);
  20079. var Regex = __webpack_require__(/*! ./regex */ 440);
  20080. /**
  20081. * Numeric mode encodes data from the decimal digit set (0 - 9)
  20082. * (byte values 30HEX to 39HEX).
  20083. * Normally, 3 data characters are represented by 10 bits.
  20084. *
  20085. * @type {Object}
  20086. */
  20087. exports.NUMERIC = {
  20088. id: 'Numeric',
  20089. bit: 1 << 0,
  20090. ccBits: [10, 12, 14] };
  20091. /**
  20092. * Alphanumeric mode encodes data from a set of 45 characters,
  20093. * i.e. 10 numeric digits (0 - 9),
  20094. * 26 alphabetic characters (A - Z),
  20095. * and 9 symbols (SP, $, %, *, +, -, ., /, :).
  20096. * Normally, two input characters are represented by 11 bits.
  20097. *
  20098. * @type {Object}
  20099. */
  20100. exports.ALPHANUMERIC = {
  20101. id: 'Alphanumeric',
  20102. bit: 1 << 1,
  20103. ccBits: [9, 11, 13] };
  20104. /**
  20105. * In byte mode, data is encoded at 8 bits per character.
  20106. *
  20107. * @type {Object}
  20108. */
  20109. exports.BYTE = {
  20110. id: 'Byte',
  20111. bit: 1 << 2,
  20112. ccBits: [8, 16, 16] };
  20113. /**
  20114. * The Kanji mode efficiently encodes Kanji characters in accordance with
  20115. * the Shift JIS system based on JIS X 0208.
  20116. * The Shift JIS values are shifted from the JIS X 0208 values.
  20117. * JIS X 0208 gives details of the shift coded representation.
  20118. * Each two-byte character value is compacted to a 13-bit binary codeword.
  20119. *
  20120. * @type {Object}
  20121. */
  20122. exports.KANJI = {
  20123. id: 'Kanji',
  20124. bit: 1 << 3,
  20125. ccBits: [8, 10, 12] };
  20126. /**
  20127. * Mixed mode will contain a sequences of data in a combination of any of
  20128. * the modes described above
  20129. *
  20130. * @type {Object}
  20131. */
  20132. exports.MIXED = {
  20133. bit: -1 };
  20134. /**
  20135. * Returns the number of bits needed to store the data length
  20136. * according to QR Code specifications.
  20137. *
  20138. * @param {Mode} mode Data mode
  20139. * @param {Number} version QR Code version
  20140. * @return {Number} Number of bits
  20141. */
  20142. exports.getCharCountIndicator = function getCharCountIndicator(mode, version) {
  20143. if (!mode.ccBits) throw new Error('Invalid mode: ' + mode);
  20144. if (!VersionCheck.isValid(version)) {
  20145. throw new Error('Invalid version: ' + version);
  20146. }
  20147. if (version >= 1 && version < 10) return mode.ccBits[0];else
  20148. if (version < 27) return mode.ccBits[1];
  20149. return mode.ccBits[2];
  20150. };
  20151. /**
  20152. * Returns the most efficient mode to store the specified data
  20153. *
  20154. * @param {String} dataStr Input data string
  20155. * @return {Mode} Best mode
  20156. */
  20157. exports.getBestModeForData = function getBestModeForData(dataStr) {
  20158. if (Regex.testNumeric(dataStr)) return exports.NUMERIC;else
  20159. if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC;else
  20160. if (Regex.testKanji(dataStr)) return exports.KANJI;else
  20161. return exports.BYTE;
  20162. };
  20163. /**
  20164. * Return mode name as string
  20165. *
  20166. * @param {Mode} mode Mode object
  20167. * @returns {String} Mode name
  20168. */
  20169. exports.toString = function toString(mode) {
  20170. if (mode && mode.id) return mode.id;
  20171. throw new Error('Invalid mode');
  20172. };
  20173. /**
  20174. * Check if input param is a valid mode object
  20175. *
  20176. * @param {Mode} mode Mode object
  20177. * @returns {Boolean} True if valid mode, false otherwise
  20178. */
  20179. exports.isValid = function isValid(mode) {
  20180. return mode && mode.bit && mode.ccBits;
  20181. };
  20182. /**
  20183. * Get mode object from its name
  20184. *
  20185. * @param {String} string Mode name
  20186. * @returns {Mode} Mode object
  20187. */
  20188. function fromString(string) {
  20189. if (typeof string !== 'string') {
  20190. throw new Error('Param is not a string');
  20191. }
  20192. var lcStr = string.toLowerCase();
  20193. switch (lcStr) {
  20194. case 'numeric':
  20195. return exports.NUMERIC;
  20196. case 'alphanumeric':
  20197. return exports.ALPHANUMERIC;
  20198. case 'kanji':
  20199. return exports.KANJI;
  20200. case 'byte':
  20201. return exports.BYTE;
  20202. default:
  20203. throw new Error('Unknown mode: ' + string);}
  20204. }
  20205. /**
  20206. * Returns mode from a value.
  20207. * If value is not a valid mode, returns defaultValue
  20208. *
  20209. * @param {Mode|String} value Encoding mode
  20210. * @param {Mode} defaultValue Fallback value
  20211. * @return {Mode} Encoding mode
  20212. */
  20213. exports.from = function from(value, defaultValue) {
  20214. if (exports.isValid(value)) {
  20215. return value;
  20216. }
  20217. try {
  20218. return fromString(value);
  20219. } catch (e) {
  20220. return defaultValue;
  20221. }
  20222. };
  20223. /***/ }),
  20224. /***/ 439:
  20225. /*!********************************************************************************************!*\
  20226. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/version-check.js ***!
  20227. \********************************************************************************************/
  20228. /*! no static exports found */
  20229. /***/ (function(module, exports) {
  20230. /**
  20231. * Check if QR Code version is valid
  20232. *
  20233. * @param {Number} version QR Code version
  20234. * @return {Boolean} true if valid version, false otherwise
  20235. */
  20236. exports.isValid = function isValid(version) {
  20237. return !isNaN(version) && version >= 1 && version <= 40;
  20238. };
  20239. /***/ }),
  20240. /***/ 440:
  20241. /*!************************************************************************************!*\
  20242. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/regex.js ***!
  20243. \************************************************************************************/
  20244. /*! no static exports found */
  20245. /***/ (function(module, exports) {
  20246. var numeric = '[0-9]+';
  20247. var alphanumeric = '[A-Z $%*+\\-./:]+';
  20248. var kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +
  20249. '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +
  20250. '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +
  20251. '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+';
  20252. kanji = kanji.replace(/u/g, "\\u");
  20253. var _byte = '(?:(?![A-Z0-9 $%*+\\-./:]|' + kanji + ')(?:.|[\r\n]))+';
  20254. exports.KANJI = new RegExp(kanji, 'g');
  20255. exports.BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\-./:]+', 'g');
  20256. exports.BYTE = new RegExp(_byte, 'g');
  20257. exports.NUMERIC = new RegExp(numeric, 'g');
  20258. exports.ALPHANUMERIC = new RegExp(alphanumeric, 'g');
  20259. var TEST_KANJI = new RegExp('^' + kanji + '$');
  20260. var TEST_NUMERIC = new RegExp('^' + numeric + '$');
  20261. var TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\-./:]+$');
  20262. exports.testKanji = function testKanji(str) {
  20263. return TEST_KANJI.test(str);
  20264. };
  20265. exports.testNumeric = function testNumeric(str) {
  20266. return TEST_NUMERIC.test(str);
  20267. };
  20268. exports.testAlphanumeric = function testAlphanumeric(str) {
  20269. return TEST_ALPHANUMERIC.test(str);
  20270. };
  20271. /***/ }),
  20272. /***/ 441:
  20273. /*!******************************************************************************************!*\
  20274. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/format-info.js ***!
  20275. \******************************************************************************************/
  20276. /*! no static exports found */
  20277. /***/ (function(module, exports, __webpack_require__) {
  20278. var Utils = __webpack_require__(/*! ./utils */ 423);
  20279. var G15 = 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0;
  20280. var G15_MASK = 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1;
  20281. var G15_BCH = Utils.getBCHDigit(G15);
  20282. /**
  20283. * Returns format information with relative error correction bits
  20284. *
  20285. * The format information is a 15-bit sequence containing 5 data bits,
  20286. * with 10 error correction bits calculated using the (15, 5) BCH code.
  20287. *
  20288. * @param {Number} errorCorrectionLevel Error correction level
  20289. * @param {Number} mask Mask pattern
  20290. * @return {Number} Encoded format information bits
  20291. */
  20292. exports.getEncodedBits = function getEncodedBits(errorCorrectionLevel, mask) {
  20293. var data = errorCorrectionLevel.bit << 3 | mask;
  20294. var d = data << 10;
  20295. while (Utils.getBCHDigit(d) - G15_BCH >= 0) {
  20296. d ^= G15 << Utils.getBCHDigit(d) - G15_BCH;
  20297. }
  20298. // xor final data with mask pattern in order to ensure that
  20299. // no combination of Error Correction Level and data mask pattern
  20300. // will result in an all-zero data string
  20301. return (data << 10 | d) ^ G15_MASK;
  20302. };
  20303. /***/ }),
  20304. /***/ 442:
  20305. /*!***************************************************************************************!*\
  20306. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/segments.js ***!
  20307. \***************************************************************************************/
  20308. /*! no static exports found */
  20309. /***/ (function(module, exports, __webpack_require__) {
  20310. var Mode = __webpack_require__(/*! ./mode */ 438);
  20311. var NumericData = __webpack_require__(/*! ./numeric-data */ 443);
  20312. var AlphanumericData = __webpack_require__(/*! ./alphanumeric-data */ 444);
  20313. var ByteData = __webpack_require__(/*! ./byte-data */ 445);
  20314. var KanjiData = __webpack_require__(/*! ./kanji-data */ 446);
  20315. var Regex = __webpack_require__(/*! ./regex */ 440);
  20316. var Utils = __webpack_require__(/*! ./utils */ 423);
  20317. var dijkstra = __webpack_require__(/*! dijkstrajs */ 447);
  20318. /**
  20319. * Returns UTF8 byte length
  20320. *
  20321. * @param {String} str Input string
  20322. * @return {Number} Number of byte
  20323. */
  20324. function getStringByteLength(str) {
  20325. return unescape(encodeURIComponent(str)).length;
  20326. }
  20327. /**
  20328. * Get a list of segments of the specified mode
  20329. * from a string
  20330. *
  20331. * @param {Mode} mode Segment mode
  20332. * @param {String} str String to process
  20333. * @return {Array} Array of object with segments data
  20334. */
  20335. function getSegments(regex, mode, str) {
  20336. var segments = [];
  20337. var result;
  20338. while ((result = regex.exec(str)) !== null) {
  20339. segments.push({
  20340. data: result[0],
  20341. index: result.index,
  20342. mode: mode,
  20343. length: result[0].length });
  20344. }
  20345. return segments;
  20346. }
  20347. /**
  20348. * Extracts a series of segments with the appropriate
  20349. * modes from a string
  20350. *
  20351. * @param {String} dataStr Input string
  20352. * @return {Array} Array of object with segments data
  20353. */
  20354. function getSegmentsFromString(dataStr) {
  20355. var numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr);
  20356. var alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr);
  20357. var byteSegs;
  20358. var kanjiSegs;
  20359. if (Utils.isKanjiModeEnabled()) {
  20360. byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr);
  20361. kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr);
  20362. } else {
  20363. byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr);
  20364. kanjiSegs = [];
  20365. }
  20366. var segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs);
  20367. return segs.
  20368. sort(function (s1, s2) {
  20369. return s1.index - s2.index;
  20370. }).
  20371. map(function (obj) {
  20372. return {
  20373. data: obj.data,
  20374. mode: obj.mode,
  20375. length: obj.length };
  20376. });
  20377. }
  20378. /**
  20379. * Returns how many bits are needed to encode a string of
  20380. * specified length with the specified mode
  20381. *
  20382. * @param {Number} length String length
  20383. * @param {Mode} mode Segment mode
  20384. * @return {Number} Bit length
  20385. */
  20386. function getSegmentBitsLength(length, mode) {
  20387. switch (mode) {
  20388. case Mode.NUMERIC:
  20389. return NumericData.getBitsLength(length);
  20390. case Mode.ALPHANUMERIC:
  20391. return AlphanumericData.getBitsLength(length);
  20392. case Mode.KANJI:
  20393. return KanjiData.getBitsLength(length);
  20394. case Mode.BYTE:
  20395. return ByteData.getBitsLength(length);}
  20396. }
  20397. /**
  20398. * Merges adjacent segments which have the same mode
  20399. *
  20400. * @param {Array} segs Array of object with segments data
  20401. * @return {Array} Array of object with segments data
  20402. */
  20403. function mergeSegments(segs) {
  20404. return segs.reduce(function (acc, curr) {
  20405. var prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null;
  20406. if (prevSeg && prevSeg.mode === curr.mode) {
  20407. acc[acc.length - 1].data += curr.data;
  20408. return acc;
  20409. }
  20410. acc.push(curr);
  20411. return acc;
  20412. }, []);
  20413. }
  20414. /**
  20415. * Generates a list of all possible nodes combination which
  20416. * will be used to build a segments graph.
  20417. *
  20418. * Nodes are divided by groups. Each group will contain a list of all the modes
  20419. * in which is possible to encode the given text.
  20420. *
  20421. * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.
  20422. * The group for '12345' will contain then 3 objects, one for each
  20423. * possible encoding mode.
  20424. *
  20425. * Each node represents a possible segment.
  20426. *
  20427. * @param {Array} segs Array of object with segments data
  20428. * @return {Array} Array of object with segments data
  20429. */
  20430. function buildNodes(segs) {
  20431. var nodes = [];
  20432. for (var i = 0; i < segs.length; i++) {
  20433. var seg = segs[i];
  20434. switch (seg.mode) {
  20435. case Mode.NUMERIC:
  20436. nodes.push([seg,
  20437. { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length },
  20438. { data: seg.data, mode: Mode.BYTE, length: seg.length }]);
  20439. break;
  20440. case Mode.ALPHANUMERIC:
  20441. nodes.push([seg,
  20442. { data: seg.data, mode: Mode.BYTE, length: seg.length }]);
  20443. break;
  20444. case Mode.KANJI:
  20445. nodes.push([seg,
  20446. { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }]);
  20447. break;
  20448. case Mode.BYTE:
  20449. nodes.push([
  20450. { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }]);}
  20451. }
  20452. return nodes;
  20453. }
  20454. /**
  20455. * Builds a graph from a list of nodes.
  20456. * All segments in each node group will be connected with all the segments of
  20457. * the next group and so on.
  20458. *
  20459. * At each connection will be assigned a weight depending on the
  20460. * segment's byte length.
  20461. *
  20462. * @param {Array} nodes Array of object with segments data
  20463. * @param {Number} version QR Code version
  20464. * @return {Object} Graph of all possible segments
  20465. */
  20466. function buildGraph(nodes, version) {
  20467. var table = {};
  20468. var graph = { 'start': {} };
  20469. var prevNodeIds = ['start'];
  20470. for (var i = 0; i < nodes.length; i++) {
  20471. var nodeGroup = nodes[i];
  20472. var currentNodeIds = [];
  20473. for (var j = 0; j < nodeGroup.length; j++) {
  20474. var node = nodeGroup[j];
  20475. var key = '' + i + j;
  20476. currentNodeIds.push(key);
  20477. table[key] = { node: node, lastCount: 0 };
  20478. graph[key] = {};
  20479. for (var n = 0; n < prevNodeIds.length; n++) {
  20480. var prevNodeId = prevNodeIds[n];
  20481. if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {
  20482. graph[prevNodeId][key] =
  20483. getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -
  20484. getSegmentBitsLength(table[prevNodeId].lastCount, node.mode);
  20485. table[prevNodeId].lastCount += node.length;
  20486. } else {
  20487. if (table[prevNodeId]) table[prevNodeId].lastCount = node.length;
  20488. graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +
  20489. 4 + Mode.getCharCountIndicator(node.mode, version); // switch cost
  20490. }
  20491. }
  20492. }
  20493. prevNodeIds = currentNodeIds;
  20494. }
  20495. for (n = 0; n < prevNodeIds.length; n++) {
  20496. graph[prevNodeIds[n]]['end'] = 0;
  20497. }
  20498. return { map: graph, table: table };
  20499. }
  20500. /**
  20501. * Builds a segment from a specified data and mode.
  20502. * If a mode is not specified, the more suitable will be used.
  20503. *
  20504. * @param {String} data Input data
  20505. * @param {Mode | String} modesHint Data mode
  20506. * @return {Segment} Segment
  20507. */
  20508. function buildSingleSegment(data, modesHint) {
  20509. var mode;
  20510. var bestMode = Mode.getBestModeForData(data);
  20511. mode = Mode.from(modesHint, bestMode);
  20512. // Make sure data can be encoded
  20513. if (mode !== Mode.BYTE && mode.bit < bestMode.bit) {
  20514. throw new Error('"' + data + '"' +
  20515. ' cannot be encoded with mode ' + Mode.toString(mode) +
  20516. '.\n Suggested mode is: ' + Mode.toString(bestMode));
  20517. }
  20518. // Use Mode.BYTE if Kanji support is disabled
  20519. if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) {
  20520. mode = Mode.BYTE;
  20521. }
  20522. switch (mode) {
  20523. case Mode.NUMERIC:
  20524. return new NumericData(data);
  20525. case Mode.ALPHANUMERIC:
  20526. return new AlphanumericData(data);
  20527. case Mode.KANJI:
  20528. return new KanjiData(data);
  20529. case Mode.BYTE:
  20530. return new ByteData(data);}
  20531. }
  20532. /**
  20533. * Builds a list of segments from an array.
  20534. * Array can contain Strings or Objects with segment's info.
  20535. *
  20536. * For each item which is a string, will be generated a segment with the given
  20537. * string and the more appropriate encoding mode.
  20538. *
  20539. * For each item which is an object, will be generated a segment with the given
  20540. * data and mode.
  20541. * Objects must contain at least the property "data".
  20542. * If property "mode" is not present, the more suitable mode will be used.
  20543. *
  20544. * @param {Array} array Array of objects with segments data
  20545. * @return {Array} Array of Segments
  20546. */
  20547. exports.fromArray = function fromArray(array) {
  20548. return array.reduce(function (acc, seg) {
  20549. if (typeof seg === 'string') {
  20550. acc.push(buildSingleSegment(seg, null));
  20551. } else if (seg.data) {
  20552. acc.push(buildSingleSegment(seg.data, seg.mode));
  20553. }
  20554. return acc;
  20555. }, []);
  20556. };
  20557. /**
  20558. * Builds an optimized sequence of segments from a string,
  20559. * which will produce the shortest possible bitstream.
  20560. *
  20561. * @param {String} data Input string
  20562. * @param {Number} version QR Code version
  20563. * @return {Array} Array of segments
  20564. */
  20565. exports.fromString = function fromString(data, version) {
  20566. var segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled());
  20567. var nodes = buildNodes(segs);
  20568. var graph = buildGraph(nodes, version);
  20569. var path = dijkstra.find_path(graph.map, 'start', 'end');
  20570. var optimizedSegs = [];
  20571. for (var i = 1; i < path.length - 1; i++) {
  20572. optimizedSegs.push(graph.table[path[i]].node);
  20573. }
  20574. return exports.fromArray(mergeSegments(optimizedSegs));
  20575. };
  20576. /**
  20577. * Splits a string in various segments with the modes which
  20578. * best represent their content.
  20579. * The produced segments are far from being optimized.
  20580. * The output of this function is only used to estimate a QR Code version
  20581. * which may contain the data.
  20582. *
  20583. * @param {string} data Input string
  20584. * @return {Array} Array of segments
  20585. */
  20586. exports.rawSplit = function rawSplit(data) {
  20587. return exports.fromArray(
  20588. getSegmentsFromString(data, Utils.isKanjiModeEnabled()));
  20589. };
  20590. /***/ }),
  20591. /***/ 443:
  20592. /*!*******************************************************************************************!*\
  20593. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/numeric-data.js ***!
  20594. \*******************************************************************************************/
  20595. /*! no static exports found */
  20596. /***/ (function(module, exports, __webpack_require__) {
  20597. var Mode = __webpack_require__(/*! ./mode */ 438);
  20598. function NumericData(data) {
  20599. this.mode = Mode.NUMERIC;
  20600. this.data = data.toString();
  20601. }
  20602. NumericData.getBitsLength = function getBitsLength(length) {
  20603. return 10 * Math.floor(length / 3) + (length % 3 ? length % 3 * 3 + 1 : 0);
  20604. };
  20605. NumericData.prototype.getLength = function getLength() {
  20606. return this.data.length;
  20607. };
  20608. NumericData.prototype.getBitsLength = function getBitsLength() {
  20609. return NumericData.getBitsLength(this.data.length);
  20610. };
  20611. NumericData.prototype.write = function write(bitBuffer) {
  20612. var i, group, value;
  20613. // The input data string is divided into groups of three digits,
  20614. // and each group is converted to its 10-bit binary equivalent.
  20615. for (i = 0; i + 3 <= this.data.length; i += 3) {
  20616. group = this.data.substr(i, 3);
  20617. value = parseInt(group, 10);
  20618. bitBuffer.put(value, 10);
  20619. }
  20620. // If the number of input digits is not an exact multiple of three,
  20621. // the final one or two digits are converted to 4 or 7 bits respectively.
  20622. var remainingNum = this.data.length - i;
  20623. if (remainingNum > 0) {
  20624. group = this.data.substr(i);
  20625. value = parseInt(group, 10);
  20626. bitBuffer.put(value, remainingNum * 3 + 1);
  20627. }
  20628. };
  20629. module.exports = NumericData;
  20630. /***/ }),
  20631. /***/ 444:
  20632. /*!************************************************************************************************!*\
  20633. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/alphanumeric-data.js ***!
  20634. \************************************************************************************************/
  20635. /*! no static exports found */
  20636. /***/ (function(module, exports, __webpack_require__) {
  20637. var Mode = __webpack_require__(/*! ./mode */ 438);
  20638. /**
  20639. * Array of characters available in alphanumeric mode
  20640. *
  20641. * As per QR Code specification, to each character
  20642. * is assigned a value from 0 to 44 which in this case coincides
  20643. * with the array index
  20644. *
  20645. * @type {Array}
  20646. */
  20647. var ALPHA_NUM_CHARS = [
  20648. '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
  20649. 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
  20650. 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
  20651. ' ', '$', '%', '*', '+', '-', '.', '/', ':'];
  20652. function AlphanumericData(data) {
  20653. this.mode = Mode.ALPHANUMERIC;
  20654. this.data = data;
  20655. }
  20656. AlphanumericData.getBitsLength = function getBitsLength(length) {
  20657. return 11 * Math.floor(length / 2) + 6 * (length % 2);
  20658. };
  20659. AlphanumericData.prototype.getLength = function getLength() {
  20660. return this.data.length;
  20661. };
  20662. AlphanumericData.prototype.getBitsLength = function getBitsLength() {
  20663. return AlphanumericData.getBitsLength(this.data.length);
  20664. };
  20665. AlphanumericData.prototype.write = function write(bitBuffer) {
  20666. var i;
  20667. // Input data characters are divided into groups of two characters
  20668. // and encoded as 11-bit binary codes.
  20669. for (i = 0; i + 2 <= this.data.length; i += 2) {
  20670. // The character value of the first character is multiplied by 45
  20671. var value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45;
  20672. // The character value of the second digit is added to the product
  20673. value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1]);
  20674. // The sum is then stored as 11-bit binary number
  20675. bitBuffer.put(value, 11);
  20676. }
  20677. // If the number of input data characters is not a multiple of two,
  20678. // the character value of the final character is encoded as a 6-bit binary number.
  20679. if (this.data.length % 2) {
  20680. bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6);
  20681. }
  20682. };
  20683. module.exports = AlphanumericData;
  20684. /***/ }),
  20685. /***/ 445:
  20686. /*!****************************************************************************************!*\
  20687. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/byte-data.js ***!
  20688. \****************************************************************************************/
  20689. /*! no static exports found */
  20690. /***/ (function(module, exports, __webpack_require__) {
  20691. var BufferUtil = __webpack_require__(/*! ../utils/buffer */ 421);
  20692. var Mode = __webpack_require__(/*! ./mode */ 438);
  20693. function ByteData(data) {
  20694. this.mode = Mode.BYTE;
  20695. this.data = BufferUtil.from(data);
  20696. }
  20697. ByteData.getBitsLength = function getBitsLength(length) {
  20698. return length * 8;
  20699. };
  20700. ByteData.prototype.getLength = function getLength() {
  20701. return this.data.length;
  20702. };
  20703. ByteData.prototype.getBitsLength = function getBitsLength() {
  20704. return ByteData.getBitsLength(this.data.length);
  20705. };
  20706. ByteData.prototype.write = function (bitBuffer) {
  20707. for (var i = 0, l = this.data.length; i < l; i++) {
  20708. bitBuffer.put(this.data[i], 8);
  20709. }
  20710. };
  20711. module.exports = ByteData;
  20712. /***/ }),
  20713. /***/ 446:
  20714. /*!*****************************************************************************************!*\
  20715. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/core/kanji-data.js ***!
  20716. \*****************************************************************************************/
  20717. /*! no static exports found */
  20718. /***/ (function(module, exports, __webpack_require__) {
  20719. var Mode = __webpack_require__(/*! ./mode */ 438);
  20720. var Utils = __webpack_require__(/*! ./utils */ 423);
  20721. function KanjiData(data) {
  20722. this.mode = Mode.KANJI;
  20723. this.data = data;
  20724. }
  20725. KanjiData.getBitsLength = function getBitsLength(length) {
  20726. return length * 13;
  20727. };
  20728. KanjiData.prototype.getLength = function getLength() {
  20729. return this.data.length;
  20730. };
  20731. KanjiData.prototype.getBitsLength = function getBitsLength() {
  20732. return KanjiData.getBitsLength(this.data.length);
  20733. };
  20734. KanjiData.prototype.write = function (bitBuffer) {
  20735. var i;
  20736. // In the Shift JIS system, Kanji characters are represented by a two byte combination.
  20737. // These byte values are shifted from the JIS X 0208 values.
  20738. // JIS X 0208 gives details of the shift coded representation.
  20739. for (i = 0; i < this.data.length; i++) {
  20740. var value = Utils.toSJIS(this.data[i]);
  20741. // For characters with Shift JIS values from 0x8140 to 0x9FFC:
  20742. if (value >= 0x8140 && value <= 0x9FFC) {
  20743. // Subtract 0x8140 from Shift JIS value
  20744. value -= 0x8140;
  20745. // For characters with Shift JIS values from 0xE040 to 0xEBBF
  20746. } else if (value >= 0xE040 && value <= 0xEBBF) {
  20747. // Subtract 0xC140 from Shift JIS value
  20748. value -= 0xC140;
  20749. } else {
  20750. throw new Error(
  20751. 'Invalid SJIS character: ' + this.data[i] + '\n' +
  20752. 'Make sure your charset is UTF-8');
  20753. }
  20754. // Multiply most significant byte of result by 0xC0
  20755. // and add least significant byte to product
  20756. value = (value >>> 8 & 0xff) * 0xC0 + (value & 0xff);
  20757. // Convert result to a 13-bit binary string
  20758. bitBuffer.put(value, 13);
  20759. }
  20760. };
  20761. module.exports = KanjiData;
  20762. /***/ }),
  20763. /***/ 447:
  20764. /*!**********************************************************************************!*\
  20765. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/dijkstrajs/dijkstra.js ***!
  20766. \**********************************************************************************/
  20767. /*! no static exports found */
  20768. /***/ (function(module, exports, __webpack_require__) {
  20769. "use strict";
  20770. /******************************************************************************
  20771. * Created 2008-08-19.
  20772. *
  20773. * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.
  20774. *
  20775. * Copyright (C) 2008
  20776. * Wyatt Baldwin <self@wyattbaldwin.com>
  20777. * All rights reserved
  20778. *
  20779. * Licensed under the MIT license.
  20780. *
  20781. * http://www.opensource.org/licenses/mit-license.php
  20782. *
  20783. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20784. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20785. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20786. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20787. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20788. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20789. * THE SOFTWARE.
  20790. *****************************************************************************/
  20791. var dijkstra = {
  20792. single_source_shortest_paths: function single_source_shortest_paths(graph, s, d) {
  20793. // Predecessor map for each node that has been encountered.
  20794. // node ID => predecessor node ID
  20795. var predecessors = {};
  20796. // Costs of shortest paths from s to all nodes encountered.
  20797. // node ID => cost
  20798. var costs = {};
  20799. costs[s] = 0;
  20800. // Costs of shortest paths from s to all nodes encountered; differs from
  20801. // `costs` in that it provides easy access to the node that currently has
  20802. // the known shortest path from s.
  20803. // XXX: Do we actually need both `costs` and `open`?
  20804. var open = dijkstra.PriorityQueue.make();
  20805. open.push(s, 0);
  20806. var closest,
  20807. u, v,
  20808. cost_of_s_to_u,
  20809. adjacent_nodes,
  20810. cost_of_e,
  20811. cost_of_s_to_u_plus_cost_of_e,
  20812. cost_of_s_to_v,
  20813. first_visit;
  20814. while (!open.empty()) {
  20815. // In the nodes remaining in graph that have a known cost from s,
  20816. // find the node, u, that currently has the shortest path from s.
  20817. closest = open.pop();
  20818. u = closest.value;
  20819. cost_of_s_to_u = closest.cost;
  20820. // Get nodes adjacent to u...
  20821. adjacent_nodes = graph[u] || {};
  20822. // ...and explore the edges that connect u to those nodes, updating
  20823. // the cost of the shortest paths to any or all of those nodes as
  20824. // necessary. v is the node across the current edge from u.
  20825. for (v in adjacent_nodes) {
  20826. if (adjacent_nodes.hasOwnProperty(v)) {
  20827. // Get the cost of the edge running from u to v.
  20828. cost_of_e = adjacent_nodes[v];
  20829. // Cost of s to u plus the cost of u to v across e--this is *a*
  20830. // cost from s to v that may or may not be less than the current
  20831. // known cost to v.
  20832. cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;
  20833. // If we haven't visited v yet OR if the current known cost from s to
  20834. // v is greater than the new cost we just found (cost of s to u plus
  20835. // cost of u to v across e), update v's cost in the cost list and
  20836. // update v's predecessor in the predecessor list (it's now u).
  20837. cost_of_s_to_v = costs[v];
  20838. first_visit = typeof costs[v] === 'undefined';
  20839. if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {
  20840. costs[v] = cost_of_s_to_u_plus_cost_of_e;
  20841. open.push(v, cost_of_s_to_u_plus_cost_of_e);
  20842. predecessors[v] = u;
  20843. }
  20844. }
  20845. }
  20846. }
  20847. if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {
  20848. var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');
  20849. throw new Error(msg);
  20850. }
  20851. return predecessors;
  20852. },
  20853. extract_shortest_path_from_predecessor_list: function extract_shortest_path_from_predecessor_list(predecessors, d) {
  20854. var nodes = [];
  20855. var u = d;
  20856. var predecessor;
  20857. while (u) {
  20858. nodes.push(u);
  20859. predecessor = predecessors[u];
  20860. u = predecessors[u];
  20861. }
  20862. nodes.reverse();
  20863. return nodes;
  20864. },
  20865. find_path: function find_path(graph, s, d) {
  20866. var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);
  20867. return dijkstra.extract_shortest_path_from_predecessor_list(
  20868. predecessors, d);
  20869. },
  20870. /**
  20871. * A very naive priority queue implementation.
  20872. */
  20873. PriorityQueue: {
  20874. make: function make(opts) {
  20875. var T = dijkstra.PriorityQueue,
  20876. t = {},
  20877. key;
  20878. opts = opts || {};
  20879. for (key in T) {
  20880. if (T.hasOwnProperty(key)) {
  20881. t[key] = T[key];
  20882. }
  20883. }
  20884. t.queue = [];
  20885. t.sorter = opts.sorter || T.default_sorter;
  20886. return t;
  20887. },
  20888. default_sorter: function default_sorter(a, b) {
  20889. return a.cost - b.cost;
  20890. },
  20891. /**
  20892. * Add a new item to the queue and ensure the highest priority element
  20893. * is at the front of the queue.
  20894. */
  20895. push: function push(value, cost) {
  20896. var item = { value: value, cost: cost };
  20897. this.queue.push(item);
  20898. this.queue.sort(this.sorter);
  20899. },
  20900. /**
  20901. * Return the highest priority element in the queue.
  20902. */
  20903. pop: function pop() {
  20904. return this.queue.shift();
  20905. },
  20906. empty: function empty() {
  20907. return this.queue.length === 0;
  20908. } } };
  20909. // node.js module exports
  20910. if (true) {
  20911. module.exports = dijkstra;
  20912. }
  20913. /***/ }),
  20914. /***/ 448:
  20915. /*!*****************************************************************************************!*\
  20916. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/renderer/canvas.js ***!
  20917. \*****************************************************************************************/
  20918. /*! no static exports found */
  20919. /***/ (function(module, exports, __webpack_require__) {
  20920. var Utils = __webpack_require__(/*! ./utils */ 449);
  20921. function clearCanvas(ctx, canvas, size) {
  20922. ctx.clearRect(0, 0, canvas.width, canvas.height);
  20923. if (!canvas.style) canvas.style = {};
  20924. canvas.height = size;
  20925. canvas.width = size;
  20926. canvas.style.height = size + 'px';
  20927. canvas.style.width = size + 'px';
  20928. }
  20929. function getCanvasElement() {
  20930. try {
  20931. return document.createElement('canvas');
  20932. } catch (e) {
  20933. throw new Error('You need to specify a canvas element');
  20934. }
  20935. }
  20936. exports.render = function render(qrData, canvas, options) {
  20937. var opts = options;
  20938. var canvasEl = canvas;
  20939. if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
  20940. opts = canvas;
  20941. canvas = undefined;
  20942. }
  20943. if (!canvas) {
  20944. canvasEl = getCanvasElement();
  20945. }
  20946. opts = Utils.getOptions(opts);
  20947. var size = Utils.getImageWidth(qrData.modules.size, opts);
  20948. var ctx = canvasEl.getContext('2d');
  20949. var image = ctx.createImageData(size, size);
  20950. Utils.qrToImageData(image.data, qrData, opts);
  20951. clearCanvas(ctx, canvasEl, size);
  20952. ctx.putImageData(image, 0, 0);
  20953. return canvasEl;
  20954. };
  20955. exports.renderToDataURL = function renderToDataURL(qrData, canvas, options) {
  20956. var opts = options;
  20957. if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
  20958. opts = canvas;
  20959. canvas = undefined;
  20960. }
  20961. if (!opts) opts = {};
  20962. var canvasEl = exports.render(qrData, canvas, opts);
  20963. var type = opts.type || 'image/png';
  20964. var rendererOpts = opts.rendererOpts || {};
  20965. return canvasEl.toDataURL(type, rendererOpts.quality);
  20966. };
  20967. /***/ }),
  20968. /***/ 449:
  20969. /*!****************************************************************************************!*\
  20970. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/renderer/utils.js ***!
  20971. \****************************************************************************************/
  20972. /*! no static exports found */
  20973. /***/ (function(module, exports) {
  20974. function hex2rgba(hex) {
  20975. if (typeof hex === 'number') {
  20976. hex = hex.toString();
  20977. }
  20978. if (typeof hex !== 'string') {
  20979. throw new Error('Color should be defined as hex string');
  20980. }
  20981. var hexCode = hex.slice().replace('#', '').split('');
  20982. if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {
  20983. throw new Error('Invalid hex color: ' + hex);
  20984. }
  20985. // Convert from short to long form (fff -> ffffff)
  20986. if (hexCode.length === 3 || hexCode.length === 4) {
  20987. hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {
  20988. return [c, c];
  20989. }));
  20990. }
  20991. // Add default alpha value
  20992. if (hexCode.length === 6) hexCode.push('F', 'F');
  20993. var hexValue = parseInt(hexCode.join(''), 16);
  20994. return {
  20995. r: hexValue >> 24 & 255,
  20996. g: hexValue >> 16 & 255,
  20997. b: hexValue >> 8 & 255,
  20998. a: hexValue & 255,
  20999. hex: '#' + hexCode.slice(0, 6).join('') };
  21000. }
  21001. exports.getOptions = function getOptions(options) {
  21002. if (!options) options = {};
  21003. if (!options.color) options.color = {};
  21004. var margin = typeof options.margin === 'undefined' ||
  21005. options.margin === null ||
  21006. options.margin < 0 ? 4 : options.margin;
  21007. var width = options.width && options.width >= 21 ? options.width : undefined;
  21008. var scale = options.scale || 4;
  21009. return {
  21010. width: width,
  21011. scale: width ? 4 : scale,
  21012. margin: margin,
  21013. color: {
  21014. dark: hex2rgba(options.color.dark || '#000000ff'),
  21015. light: hex2rgba(options.color.light || '#ffffffff') },
  21016. type: options.type,
  21017. rendererOpts: options.rendererOpts || {} };
  21018. };
  21019. exports.getScale = function getScale(qrSize, opts) {
  21020. return opts.width && opts.width >= qrSize + opts.margin * 2 ?
  21021. opts.width / (qrSize + opts.margin * 2) :
  21022. opts.scale;
  21023. };
  21024. exports.getImageWidth = function getImageWidth(qrSize, opts) {
  21025. var scale = exports.getScale(qrSize, opts);
  21026. return Math.floor((qrSize + opts.margin * 2) * scale);
  21027. };
  21028. exports.qrToImageData = function qrToImageData(imgData, qr, opts) {
  21029. var size = qr.modules.size;
  21030. var data = qr.modules.data;
  21031. var scale = exports.getScale(size, opts);
  21032. var symbolSize = Math.floor((size + opts.margin * 2) * scale);
  21033. var scaledMargin = opts.margin * scale;
  21034. var palette = [opts.color.light, opts.color.dark];
  21035. for (var i = 0; i < symbolSize; i++) {
  21036. for (var j = 0; j < symbolSize; j++) {
  21037. var posDst = (i * symbolSize + j) * 4;
  21038. var pxColor = opts.color.light;
  21039. if (i >= scaledMargin && j >= scaledMargin &&
  21040. i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {
  21041. var iSrc = Math.floor((i - scaledMargin) / scale);
  21042. var jSrc = Math.floor((j - scaledMargin) / scale);
  21043. pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0];
  21044. }
  21045. imgData[posDst++] = pxColor.r;
  21046. imgData[posDst++] = pxColor.g;
  21047. imgData[posDst++] = pxColor.b;
  21048. imgData[posDst] = pxColor.a;
  21049. }
  21050. }
  21051. };
  21052. /***/ }),
  21053. /***/ 450:
  21054. /*!******************************************************************************************!*\
  21055. !*** /Users/wanglili/Documents/liuniu/Mazui/node_modules/qrcode/lib/renderer/svg-tag.js ***!
  21056. \******************************************************************************************/
  21057. /*! no static exports found */
  21058. /***/ (function(module, exports, __webpack_require__) {
  21059. var Utils = __webpack_require__(/*! ./utils */ 449);
  21060. function getColorAttrib(color, attrib) {
  21061. var alpha = color.a / 255;
  21062. var str = attrib + '="' + color.hex + '"';
  21063. return alpha < 1 ?
  21064. str + ' ' + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"' :
  21065. str;
  21066. }
  21067. function svgCmd(cmd, x, y) {
  21068. var str = cmd + x;
  21069. if (typeof y !== 'undefined') str += ' ' + y;
  21070. return str;
  21071. }
  21072. function qrToPath(data, size, margin) {
  21073. var path = '';
  21074. var moveBy = 0;
  21075. var newRow = false;
  21076. var lineLength = 0;
  21077. for (var i = 0; i < data.length; i++) {
  21078. var col = Math.floor(i % size);
  21079. var row = Math.floor(i / size);
  21080. if (!col && !newRow) newRow = true;
  21081. if (data[i]) {
  21082. lineLength++;
  21083. if (!(i > 0 && col > 0 && data[i - 1])) {
  21084. path += newRow ?
  21085. svgCmd('M', col + margin, 0.5 + row + margin) :
  21086. svgCmd('m', moveBy, 0);
  21087. moveBy = 0;
  21088. newRow = false;
  21089. }
  21090. if (!(col + 1 < size && data[i + 1])) {
  21091. path += svgCmd('h', lineLength);
  21092. lineLength = 0;
  21093. }
  21094. } else {
  21095. moveBy++;
  21096. }
  21097. }
  21098. return path;
  21099. }
  21100. exports.render = function render(qrData, options, cb) {
  21101. var opts = Utils.getOptions(options);
  21102. var size = qrData.modules.size;
  21103. var data = qrData.modules.data;
  21104. var qrcodesize = size + opts.margin * 2;
  21105. var bg = !opts.color.light.a ?
  21106. '' :
  21107. '<path ' + getColorAttrib(opts.color.light, 'fill') +
  21108. ' d="M0 0h' + qrcodesize + 'v' + qrcodesize + 'H0z"/>';
  21109. var path =
  21110. '<path ' + getColorAttrib(opts.color.dark, 'stroke') +
  21111. ' d="' + qrToPath(data, size, opts.margin) + '"/>';
  21112. var viewBox = 'viewBox="' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '"';
  21113. var width = !opts.width ? '' : 'width="' + opts.width + '" height="' + opts.width + '" ';
  21114. var svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg + path + '</svg>\n';
  21115. if (typeof cb === 'function') {
  21116. cb(null, svgTag);
  21117. }
  21118. return svgTag;
  21119. };
  21120. /***/ }),
  21121. /***/ 459:
  21122. /*!***********************************************************************************!*\
  21123. !*** /Users/wanglili/Documents/liuniu/Mazui/components/Sansnn-uQRCode/uqrcode.js ***!
  21124. \***********************************************************************************/
  21125. /*! no static exports found */
  21126. /***/ (function(module, exports, __webpack_require__) {
  21127. "use strict";
  21128. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; //---------------------------------------------------------------------
  21129. // github https://github.com/Sansnn/uQRCode
  21130. //---------------------------------------------------------------------
  21131. var uQRCode = {};
  21132. (function () {
  21133. //---------------------------------------------------------------------
  21134. // QRCode for JavaScript
  21135. //
  21136. // Copyright (c) 2009 Kazuhiko Arase
  21137. //
  21138. // URL: http://www.d-project.com/
  21139. //
  21140. // Licensed under the MIT license:
  21141. // http://www.opensource.org/licenses/mit-license.php
  21142. //
  21143. // The word "QR Code" is registered trademark of
  21144. // DENSO WAVE INCORPORATED
  21145. // http://www.denso-wave.com/qrcode/faqpatent-e.html
  21146. //
  21147. //---------------------------------------------------------------------
  21148. //---------------------------------------------------------------------
  21149. // QR8bitByte
  21150. //---------------------------------------------------------------------
  21151. function QR8bitByte(data) {
  21152. this.mode = QRMode.MODE_8BIT_BYTE;
  21153. this.data = data;
  21154. }
  21155. QR8bitByte.prototype = {
  21156. getLength: function getLength(buffer) {
  21157. return this.data.length;
  21158. },
  21159. write: function write(buffer) {
  21160. for (var i = 0; i < this.data.length; i++) {
  21161. // not JIS ...
  21162. buffer.put(this.data.charCodeAt(i), 8);
  21163. }
  21164. } };
  21165. //---------------------------------------------------------------------
  21166. // QRCode
  21167. //---------------------------------------------------------------------
  21168. function QRCode(typeNumber, errorCorrectLevel) {
  21169. this.typeNumber = typeNumber;
  21170. this.errorCorrectLevel = errorCorrectLevel;
  21171. this.modules = null;
  21172. this.moduleCount = 0;
  21173. this.dataCache = null;
  21174. this.dataList = new Array();
  21175. }
  21176. QRCode.prototype = {
  21177. addData: function addData(data) {
  21178. var newData = new QR8bitByte(data);
  21179. this.dataList.push(newData);
  21180. this.dataCache = null;
  21181. },
  21182. isDark: function isDark(row, col) {
  21183. if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {
  21184. throw new Error(row + "," + col);
  21185. }
  21186. return this.modules[row][col];
  21187. },
  21188. getModuleCount: function getModuleCount() {
  21189. return this.moduleCount;
  21190. },
  21191. make: function make() {
  21192. // Calculate automatically typeNumber if provided is < 1
  21193. if (this.typeNumber < 1) {
  21194. var typeNumber = 1;
  21195. for (typeNumber = 1; typeNumber < 40; typeNumber++) {
  21196. var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel);
  21197. var buffer = new QRBitBuffer();
  21198. var totalDataCount = 0;
  21199. for (var i = 0; i < rsBlocks.length; i++) {
  21200. totalDataCount += rsBlocks[i].dataCount;
  21201. }
  21202. for (var i = 0; i < this.dataList.length; i++) {
  21203. var data = this.dataList[i];
  21204. buffer.put(data.mode, 4);
  21205. buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));
  21206. data.write(buffer);
  21207. }
  21208. if (buffer.getLengthInBits() <= totalDataCount * 8)
  21209. break;
  21210. }
  21211. this.typeNumber = typeNumber;
  21212. }
  21213. this.makeImpl(false, this.getBestMaskPattern());
  21214. },
  21215. makeImpl: function makeImpl(test, maskPattern) {
  21216. this.moduleCount = this.typeNumber * 4 + 17;
  21217. this.modules = new Array(this.moduleCount);
  21218. for (var row = 0; row < this.moduleCount; row++) {
  21219. this.modules[row] = new Array(this.moduleCount);
  21220. for (var col = 0; col < this.moduleCount; col++) {
  21221. this.modules[row][col] = null; //(col + row) % 3;
  21222. }
  21223. }
  21224. this.setupPositionProbePattern(0, 0);
  21225. this.setupPositionProbePattern(this.moduleCount - 7, 0);
  21226. this.setupPositionProbePattern(0, this.moduleCount - 7);
  21227. this.setupPositionAdjustPattern();
  21228. this.setupTimingPattern();
  21229. this.setupTypeInfo(test, maskPattern);
  21230. if (this.typeNumber >= 7) {
  21231. this.setupTypeNumber(test);
  21232. }
  21233. if (this.dataCache == null) {
  21234. this.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);
  21235. }
  21236. this.mapData(this.dataCache, maskPattern);
  21237. },
  21238. setupPositionProbePattern: function setupPositionProbePattern(row, col) {
  21239. for (var r = -1; r <= 7; r++) {
  21240. if (row + r <= -1 || this.moduleCount <= row + r) continue;
  21241. for (var c = -1; c <= 7; c++) {
  21242. if (col + c <= -1 || this.moduleCount <= col + c) continue;
  21243. if (0 <= r && r <= 6 && (c == 0 || c == 6) ||
  21244. 0 <= c && c <= 6 && (r == 0 || r == 6) ||
  21245. 2 <= r && r <= 4 && 2 <= c && c <= 4) {
  21246. this.modules[row + r][col + c] = true;
  21247. } else {
  21248. this.modules[row + r][col + c] = false;
  21249. }
  21250. }
  21251. }
  21252. },
  21253. getBestMaskPattern: function getBestMaskPattern() {
  21254. var minLostPoint = 0;
  21255. var pattern = 0;
  21256. for (var i = 0; i < 8; i++) {
  21257. this.makeImpl(true, i);
  21258. var lostPoint = QRUtil.getLostPoint(this);
  21259. if (i == 0 || minLostPoint > lostPoint) {
  21260. minLostPoint = lostPoint;
  21261. pattern = i;
  21262. }
  21263. }
  21264. return pattern;
  21265. },
  21266. createMovieClip: function createMovieClip(target_mc, instance_name, depth) {
  21267. var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);
  21268. var cs = 1;
  21269. this.make();
  21270. for (var row = 0; row < this.modules.length; row++) {
  21271. var y = row * cs;
  21272. for (var col = 0; col < this.modules[row].length; col++) {
  21273. var x = col * cs;
  21274. var dark = this.modules[row][col];
  21275. if (dark) {
  21276. qr_mc.beginFill(0, 100);
  21277. qr_mc.moveTo(x, y);
  21278. qr_mc.lineTo(x + cs, y);
  21279. qr_mc.lineTo(x + cs, y + cs);
  21280. qr_mc.lineTo(x, y + cs);
  21281. qr_mc.endFill();
  21282. }
  21283. }
  21284. }
  21285. return qr_mc;
  21286. },
  21287. setupTimingPattern: function setupTimingPattern() {
  21288. for (var r = 8; r < this.moduleCount - 8; r++) {
  21289. if (this.modules[r][6] != null) {
  21290. continue;
  21291. }
  21292. this.modules[r][6] = r % 2 == 0;
  21293. }
  21294. for (var c = 8; c < this.moduleCount - 8; c++) {
  21295. if (this.modules[6][c] != null) {
  21296. continue;
  21297. }
  21298. this.modules[6][c] = c % 2 == 0;
  21299. }
  21300. },
  21301. setupPositionAdjustPattern: function setupPositionAdjustPattern() {
  21302. var pos = QRUtil.getPatternPosition(this.typeNumber);
  21303. for (var i = 0; i < pos.length; i++) {
  21304. for (var j = 0; j < pos.length; j++) {
  21305. var row = pos[i];
  21306. var col = pos[j];
  21307. if (this.modules[row][col] != null) {
  21308. continue;
  21309. }
  21310. for (var r = -2; r <= 2; r++) {
  21311. for (var c = -2; c <= 2; c++) {
  21312. if (r == -2 || r == 2 || c == -2 || c == 2 ||
  21313. r == 0 && c == 0) {
  21314. this.modules[row + r][col + c] = true;
  21315. } else {
  21316. this.modules[row + r][col + c] = false;
  21317. }
  21318. }
  21319. }
  21320. }
  21321. }
  21322. },
  21323. setupTypeNumber: function setupTypeNumber(test) {
  21324. var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
  21325. for (var i = 0; i < 18; i++) {
  21326. var mod = !test && (bits >> i & 1) == 1;
  21327. this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
  21328. }
  21329. for (var i = 0; i < 18; i++) {
  21330. var mod = !test && (bits >> i & 1) == 1;
  21331. this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
  21332. }
  21333. },
  21334. setupTypeInfo: function setupTypeInfo(test, maskPattern) {
  21335. var data = this.errorCorrectLevel << 3 | maskPattern;
  21336. var bits = QRUtil.getBCHTypeInfo(data);
  21337. // vertical
  21338. for (var i = 0; i < 15; i++) {
  21339. var mod = !test && (bits >> i & 1) == 1;
  21340. if (i < 6) {
  21341. this.modules[i][8] = mod;
  21342. } else if (i < 8) {
  21343. this.modules[i + 1][8] = mod;
  21344. } else {
  21345. this.modules[this.moduleCount - 15 + i][8] = mod;
  21346. }
  21347. }
  21348. // horizontal
  21349. for (var i = 0; i < 15; i++) {
  21350. var mod = !test && (bits >> i & 1) == 1;
  21351. if (i < 8) {
  21352. this.modules[8][this.moduleCount - i - 1] = mod;
  21353. } else if (i < 9) {
  21354. this.modules[8][15 - i - 1 + 1] = mod;
  21355. } else {
  21356. this.modules[8][15 - i - 1] = mod;
  21357. }
  21358. }
  21359. // fixed module
  21360. this.modules[this.moduleCount - 8][8] = !test;
  21361. },
  21362. mapData: function mapData(data, maskPattern) {
  21363. var inc = -1;
  21364. var row = this.moduleCount - 1;
  21365. var bitIndex = 7;
  21366. var byteIndex = 0;
  21367. for (var col = this.moduleCount - 1; col > 0; col -= 2) {
  21368. if (col == 6) col--;
  21369. while (true) {
  21370. for (var c = 0; c < 2; c++) {
  21371. if (this.modules[row][col - c] == null) {
  21372. var dark = false;
  21373. if (byteIndex < data.length) {
  21374. dark = (data[byteIndex] >>> bitIndex & 1) == 1;
  21375. }
  21376. var mask = QRUtil.getMask(maskPattern, row, col - c);
  21377. if (mask) {
  21378. dark = !dark;
  21379. }
  21380. this.modules[row][col - c] = dark;
  21381. bitIndex--;
  21382. if (bitIndex == -1) {
  21383. byteIndex++;
  21384. bitIndex = 7;
  21385. }
  21386. }
  21387. }
  21388. row += inc;
  21389. if (row < 0 || this.moduleCount <= row) {
  21390. row -= inc;
  21391. inc = -inc;
  21392. break;
  21393. }
  21394. }
  21395. }
  21396. } };
  21397. QRCode.PAD0 = 0xEC;
  21398. QRCode.PAD1 = 0x11;
  21399. QRCode.createData = function (typeNumber, errorCorrectLevel, dataList) {
  21400. var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel);
  21401. var buffer = new QRBitBuffer();
  21402. for (var i = 0; i < dataList.length; i++) {
  21403. var data = dataList[i];
  21404. buffer.put(data.mode, 4);
  21405. buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));
  21406. data.write(buffer);
  21407. }
  21408. // calc num max data.
  21409. var totalDataCount = 0;
  21410. for (var i = 0; i < rsBlocks.length; i++) {
  21411. totalDataCount += rsBlocks[i].dataCount;
  21412. }
  21413. if (buffer.getLengthInBits() > totalDataCount * 8) {
  21414. throw new Error("code length overflow. (" +
  21415. buffer.getLengthInBits() +
  21416. ">" +
  21417. totalDataCount * 8 +
  21418. ")");
  21419. }
  21420. // end code
  21421. if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {
  21422. buffer.put(0, 4);
  21423. }
  21424. // padding
  21425. while (buffer.getLengthInBits() % 8 != 0) {
  21426. buffer.putBit(false);
  21427. }
  21428. // padding
  21429. while (true) {
  21430. if (buffer.getLengthInBits() >= totalDataCount * 8) {
  21431. break;
  21432. }
  21433. buffer.put(QRCode.PAD0, 8);
  21434. if (buffer.getLengthInBits() >= totalDataCount * 8) {
  21435. break;
  21436. }
  21437. buffer.put(QRCode.PAD1, 8);
  21438. }
  21439. return QRCode.createBytes(buffer, rsBlocks);
  21440. };
  21441. QRCode.createBytes = function (buffer, rsBlocks) {
  21442. var offset = 0;
  21443. var maxDcCount = 0;
  21444. var maxEcCount = 0;
  21445. var dcdata = new Array(rsBlocks.length);
  21446. var ecdata = new Array(rsBlocks.length);
  21447. for (var r = 0; r < rsBlocks.length; r++) {
  21448. var dcCount = rsBlocks[r].dataCount;
  21449. var ecCount = rsBlocks[r].totalCount - dcCount;
  21450. maxDcCount = Math.max(maxDcCount, dcCount);
  21451. maxEcCount = Math.max(maxEcCount, ecCount);
  21452. dcdata[r] = new Array(dcCount);
  21453. for (var i = 0; i < dcdata[r].length; i++) {
  21454. dcdata[r][i] = 0xff & buffer.buffer[i + offset];
  21455. }
  21456. offset += dcCount;
  21457. var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
  21458. var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
  21459. var modPoly = rawPoly.mod(rsPoly);
  21460. ecdata[r] = new Array(rsPoly.getLength() - 1);
  21461. for (var i = 0; i < ecdata[r].length; i++) {
  21462. var modIndex = i + modPoly.getLength() - ecdata[r].length;
  21463. ecdata[r][i] = modIndex >= 0 ? modPoly.get(modIndex) : 0;
  21464. }
  21465. }
  21466. var totalCodeCount = 0;
  21467. for (var i = 0; i < rsBlocks.length; i++) {
  21468. totalCodeCount += rsBlocks[i].totalCount;
  21469. }
  21470. var data = new Array(totalCodeCount);
  21471. var index = 0;
  21472. for (var i = 0; i < maxDcCount; i++) {
  21473. for (var r = 0; r < rsBlocks.length; r++) {
  21474. if (i < dcdata[r].length) {
  21475. data[index++] = dcdata[r][i];
  21476. }
  21477. }
  21478. }
  21479. for (var i = 0; i < maxEcCount; i++) {
  21480. for (var r = 0; r < rsBlocks.length; r++) {
  21481. if (i < ecdata[r].length) {
  21482. data[index++] = ecdata[r][i];
  21483. }
  21484. }
  21485. }
  21486. return data;
  21487. };
  21488. //---------------------------------------------------------------------
  21489. // QRMode
  21490. //---------------------------------------------------------------------
  21491. var QRMode = {
  21492. MODE_NUMBER: 1 << 0,
  21493. MODE_ALPHA_NUM: 1 << 1,
  21494. MODE_8BIT_BYTE: 1 << 2,
  21495. MODE_KANJI: 1 << 3 };
  21496. //---------------------------------------------------------------------
  21497. // QRErrorCorrectLevel
  21498. //---------------------------------------------------------------------
  21499. var QRErrorCorrectLevel = {
  21500. L: 1,
  21501. M: 0,
  21502. Q: 3,
  21503. H: 2 };
  21504. //---------------------------------------------------------------------
  21505. // QRMaskPattern
  21506. //---------------------------------------------------------------------
  21507. var QRMaskPattern = {
  21508. PATTERN000: 0,
  21509. PATTERN001: 1,
  21510. PATTERN010: 2,
  21511. PATTERN011: 3,
  21512. PATTERN100: 4,
  21513. PATTERN101: 5,
  21514. PATTERN110: 6,
  21515. PATTERN111: 7 };
  21516. //---------------------------------------------------------------------
  21517. // QRUtil
  21518. //---------------------------------------------------------------------
  21519. var QRUtil = {
  21520. PATTERN_POSITION_TABLE: [
  21521. [],
  21522. [6, 18],
  21523. [6, 22],
  21524. [6, 26],
  21525. [6, 30],
  21526. [6, 34],
  21527. [6, 22, 38],
  21528. [6, 24, 42],
  21529. [6, 26, 46],
  21530. [6, 28, 50],
  21531. [6, 30, 54],
  21532. [6, 32, 58],
  21533. [6, 34, 62],
  21534. [6, 26, 46, 66],
  21535. [6, 26, 48, 70],
  21536. [6, 26, 50, 74],
  21537. [6, 30, 54, 78],
  21538. [6, 30, 56, 82],
  21539. [6, 30, 58, 86],
  21540. [6, 34, 62, 90],
  21541. [6, 28, 50, 72, 94],
  21542. [6, 26, 50, 74, 98],
  21543. [6, 30, 54, 78, 102],
  21544. [6, 28, 54, 80, 106],
  21545. [6, 32, 58, 84, 110],
  21546. [6, 30, 58, 86, 114],
  21547. [6, 34, 62, 90, 118],
  21548. [6, 26, 50, 74, 98, 122],
  21549. [6, 30, 54, 78, 102, 126],
  21550. [6, 26, 52, 78, 104, 130],
  21551. [6, 30, 56, 82, 108, 134],
  21552. [6, 34, 60, 86, 112, 138],
  21553. [6, 30, 58, 86, 114, 142],
  21554. [6, 34, 62, 90, 118, 146],
  21555. [6, 30, 54, 78, 102, 126, 150],
  21556. [6, 24, 50, 76, 102, 128, 154],
  21557. [6, 28, 54, 80, 106, 132, 158],
  21558. [6, 32, 58, 84, 110, 136, 162],
  21559. [6, 26, 54, 82, 110, 138, 166],
  21560. [6, 30, 58, 86, 114, 142, 170]],
  21561. G15: 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0,
  21562. G18: 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0,
  21563. G15_MASK: 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1,
  21564. getBCHTypeInfo: function getBCHTypeInfo(data) {
  21565. var d = data << 10;
  21566. while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
  21567. d ^= QRUtil.G15 << QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15);
  21568. }
  21569. return (data << 10 | d) ^ QRUtil.G15_MASK;
  21570. },
  21571. getBCHTypeNumber: function getBCHTypeNumber(data) {
  21572. var d = data << 12;
  21573. while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
  21574. d ^= QRUtil.G18 << QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18);
  21575. }
  21576. return data << 12 | d;
  21577. },
  21578. getBCHDigit: function getBCHDigit(data) {
  21579. var digit = 0;
  21580. while (data != 0) {
  21581. digit++;
  21582. data >>>= 1;
  21583. }
  21584. return digit;
  21585. },
  21586. getPatternPosition: function getPatternPosition(typeNumber) {
  21587. return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
  21588. },
  21589. getMask: function getMask(maskPattern, i, j) {
  21590. switch (maskPattern) {
  21591. case QRMaskPattern.PATTERN000:
  21592. return (i + j) % 2 == 0;
  21593. case QRMaskPattern.PATTERN001:
  21594. return i % 2 == 0;
  21595. case QRMaskPattern.PATTERN010:
  21596. return j % 3 == 0;
  21597. case QRMaskPattern.PATTERN011:
  21598. return (i + j) % 3 == 0;
  21599. case QRMaskPattern.PATTERN100:
  21600. return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;
  21601. case QRMaskPattern.PATTERN101:
  21602. return i * j % 2 + i * j % 3 == 0;
  21603. case QRMaskPattern.PATTERN110:
  21604. return (i * j % 2 + i * j % 3) % 2 == 0;
  21605. case QRMaskPattern.PATTERN111:
  21606. return (i * j % 3 + (i + j) % 2) % 2 == 0;
  21607. default:
  21608. throw new Error("bad maskPattern:" + maskPattern);}
  21609. },
  21610. getErrorCorrectPolynomial: function getErrorCorrectPolynomial(errorCorrectLength) {
  21611. var a = new QRPolynomial([1], 0);
  21612. for (var i = 0; i < errorCorrectLength; i++) {
  21613. a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0));
  21614. }
  21615. return a;
  21616. },
  21617. getLengthInBits: function getLengthInBits(mode, type) {
  21618. if (1 <= type && type < 10) {
  21619. // 1 - 9
  21620. switch (mode) {
  21621. case QRMode.MODE_NUMBER:
  21622. return 10;
  21623. case QRMode.MODE_ALPHA_NUM:
  21624. return 9;
  21625. case QRMode.MODE_8BIT_BYTE:
  21626. return 8;
  21627. case QRMode.MODE_KANJI:
  21628. return 8;
  21629. default:
  21630. throw new Error("mode:" + mode);}
  21631. } else if (type < 27) {
  21632. // 10 - 26
  21633. switch (mode) {
  21634. case QRMode.MODE_NUMBER:
  21635. return 12;
  21636. case QRMode.MODE_ALPHA_NUM:
  21637. return 11;
  21638. case QRMode.MODE_8BIT_BYTE:
  21639. return 16;
  21640. case QRMode.MODE_KANJI:
  21641. return 10;
  21642. default:
  21643. throw new Error("mode:" + mode);}
  21644. } else if (type < 41) {
  21645. // 27 - 40
  21646. switch (mode) {
  21647. case QRMode.MODE_NUMBER:
  21648. return 14;
  21649. case QRMode.MODE_ALPHA_NUM:
  21650. return 13;
  21651. case QRMode.MODE_8BIT_BYTE:
  21652. return 16;
  21653. case QRMode.MODE_KANJI:
  21654. return 12;
  21655. default:
  21656. throw new Error("mode:" + mode);}
  21657. } else {
  21658. throw new Error("type:" + type);
  21659. }
  21660. },
  21661. getLostPoint: function getLostPoint(qrCode) {
  21662. var moduleCount = qrCode.getModuleCount();
  21663. var lostPoint = 0;
  21664. // LEVEL1
  21665. for (var row = 0; row < moduleCount; row++) {
  21666. for (var col = 0; col < moduleCount; col++) {
  21667. var sameCount = 0;
  21668. var dark = qrCode.isDark(row, col);
  21669. for (var r = -1; r <= 1; r++) {
  21670. if (row + r < 0 || moduleCount <= row + r) {
  21671. continue;
  21672. }
  21673. for (var c = -1; c <= 1; c++) {
  21674. if (col + c < 0 || moduleCount <= col + c) {
  21675. continue;
  21676. }
  21677. if (r == 0 && c == 0) {
  21678. continue;
  21679. }
  21680. if (dark == qrCode.isDark(row + r, col + c)) {
  21681. sameCount++;
  21682. }
  21683. }
  21684. }
  21685. if (sameCount > 5) {
  21686. lostPoint += 3 + sameCount - 5;
  21687. }
  21688. }
  21689. }
  21690. // LEVEL2
  21691. for (var row = 0; row < moduleCount - 1; row++) {
  21692. for (var col = 0; col < moduleCount - 1; col++) {
  21693. var count = 0;
  21694. if (qrCode.isDark(row, col)) count++;
  21695. if (qrCode.isDark(row + 1, col)) count++;
  21696. if (qrCode.isDark(row, col + 1)) count++;
  21697. if (qrCode.isDark(row + 1, col + 1)) count++;
  21698. if (count == 0 || count == 4) {
  21699. lostPoint += 3;
  21700. }
  21701. }
  21702. }
  21703. // LEVEL3
  21704. for (var row = 0; row < moduleCount; row++) {
  21705. for (var col = 0; col < moduleCount - 6; col++) {
  21706. if (qrCode.isDark(row, col) &&
  21707. !qrCode.isDark(row, col + 1) &&
  21708. qrCode.isDark(row, col + 2) &&
  21709. qrCode.isDark(row, col + 3) &&
  21710. qrCode.isDark(row, col + 4) &&
  21711. !qrCode.isDark(row, col + 5) &&
  21712. qrCode.isDark(row, col + 6)) {
  21713. lostPoint += 40;
  21714. }
  21715. }
  21716. }
  21717. for (var col = 0; col < moduleCount; col++) {
  21718. for (var row = 0; row < moduleCount - 6; row++) {
  21719. if (qrCode.isDark(row, col) &&
  21720. !qrCode.isDark(row + 1, col) &&
  21721. qrCode.isDark(row + 2, col) &&
  21722. qrCode.isDark(row + 3, col) &&
  21723. qrCode.isDark(row + 4, col) &&
  21724. !qrCode.isDark(row + 5, col) &&
  21725. qrCode.isDark(row + 6, col)) {
  21726. lostPoint += 40;
  21727. }
  21728. }
  21729. }
  21730. // LEVEL4
  21731. var darkCount = 0;
  21732. for (var col = 0; col < moduleCount; col++) {
  21733. for (var row = 0; row < moduleCount; row++) {
  21734. if (qrCode.isDark(row, col)) {
  21735. darkCount++;
  21736. }
  21737. }
  21738. }
  21739. var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
  21740. lostPoint += ratio * 10;
  21741. return lostPoint;
  21742. } };
  21743. //---------------------------------------------------------------------
  21744. // QRMath
  21745. //---------------------------------------------------------------------
  21746. var QRMath = {
  21747. glog: function glog(n) {
  21748. if (n < 1) {
  21749. throw new Error("glog(" + n + ")");
  21750. }
  21751. return QRMath.LOG_TABLE[n];
  21752. },
  21753. gexp: function gexp(n) {
  21754. while (n < 0) {
  21755. n += 255;
  21756. }
  21757. while (n >= 256) {
  21758. n -= 255;
  21759. }
  21760. return QRMath.EXP_TABLE[n];
  21761. },
  21762. EXP_TABLE: new Array(256),
  21763. LOG_TABLE: new Array(256) };
  21764. for (var i = 0; i < 8; i++) {
  21765. QRMath.EXP_TABLE[i] = 1 << i;
  21766. }
  21767. for (var i = 8; i < 256; i++) {
  21768. QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^
  21769. QRMath.EXP_TABLE[i - 5] ^
  21770. QRMath.EXP_TABLE[i - 6] ^
  21771. QRMath.EXP_TABLE[i - 8];
  21772. }
  21773. for (var i = 0; i < 255; i++) {
  21774. QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i;
  21775. }
  21776. //---------------------------------------------------------------------
  21777. // QRPolynomial
  21778. //---------------------------------------------------------------------
  21779. function QRPolynomial(num, shift) {
  21780. if (num.length == undefined) {
  21781. throw new Error(num.length + "/" + shift);
  21782. }
  21783. var offset = 0;
  21784. while (offset < num.length && num[offset] == 0) {
  21785. offset++;
  21786. }
  21787. this.num = new Array(num.length - offset + shift);
  21788. for (var i = 0; i < num.length - offset; i++) {
  21789. this.num[i] = num[i + offset];
  21790. }
  21791. }
  21792. QRPolynomial.prototype = {
  21793. get: function get(index) {
  21794. return this.num[index];
  21795. },
  21796. getLength: function getLength() {
  21797. return this.num.length;
  21798. },
  21799. multiply: function multiply(e) {
  21800. var num = new Array(this.getLength() + e.getLength() - 1);
  21801. for (var i = 0; i < this.getLength(); i++) {
  21802. for (var j = 0; j < e.getLength(); j++) {
  21803. num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j)));
  21804. }
  21805. }
  21806. return new QRPolynomial(num, 0);
  21807. },
  21808. mod: function mod(e) {
  21809. if (this.getLength() - e.getLength() < 0) {
  21810. return this;
  21811. }
  21812. var ratio = QRMath.glog(this.get(0)) - QRMath.glog(e.get(0));
  21813. var num = new Array(this.getLength());
  21814. for (var i = 0; i < this.getLength(); i++) {
  21815. num[i] = this.get(i);
  21816. }
  21817. for (var i = 0; i < e.getLength(); i++) {
  21818. num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio);
  21819. }
  21820. // recursive call
  21821. return new QRPolynomial(num, 0).mod(e);
  21822. } };
  21823. //---------------------------------------------------------------------
  21824. // QRRSBlock
  21825. //---------------------------------------------------------------------
  21826. function QRRSBlock(totalCount, dataCount) {
  21827. this.totalCount = totalCount;
  21828. this.dataCount = dataCount;
  21829. }
  21830. QRRSBlock.RS_BLOCK_TABLE = [
  21831. // L
  21832. // M
  21833. // Q
  21834. // H
  21835. // 1
  21836. [1, 26, 19],
  21837. [1, 26, 16],
  21838. [1, 26, 13],
  21839. [1, 26, 9],
  21840. // 2
  21841. [1, 44, 34],
  21842. [1, 44, 28],
  21843. [1, 44, 22],
  21844. [1, 44, 16],
  21845. // 3
  21846. [1, 70, 55],
  21847. [1, 70, 44],
  21848. [2, 35, 17],
  21849. [2, 35, 13],
  21850. // 4
  21851. [1, 100, 80],
  21852. [2, 50, 32],
  21853. [2, 50, 24],
  21854. [4, 25, 9],
  21855. // 5
  21856. [1, 134, 108],
  21857. [2, 67, 43],
  21858. [2, 33, 15, 2, 34, 16],
  21859. [2, 33, 11, 2, 34, 12],
  21860. // 6
  21861. [2, 86, 68],
  21862. [4, 43, 27],
  21863. [4, 43, 19],
  21864. [4, 43, 15],
  21865. // 7
  21866. [2, 98, 78],
  21867. [4, 49, 31],
  21868. [2, 32, 14, 4, 33, 15],
  21869. [4, 39, 13, 1, 40, 14],
  21870. // 8
  21871. [2, 121, 97],
  21872. [2, 60, 38, 2, 61, 39],
  21873. [4, 40, 18, 2, 41, 19],
  21874. [4, 40, 14, 2, 41, 15],
  21875. // 9
  21876. [2, 146, 116],
  21877. [3, 58, 36, 2, 59, 37],
  21878. [4, 36, 16, 4, 37, 17],
  21879. [4, 36, 12, 4, 37, 13],
  21880. // 10
  21881. [2, 86, 68, 2, 87, 69],
  21882. [4, 69, 43, 1, 70, 44],
  21883. [6, 43, 19, 2, 44, 20],
  21884. [6, 43, 15, 2, 44, 16],
  21885. // 11
  21886. [4, 101, 81],
  21887. [1, 80, 50, 4, 81, 51],
  21888. [4, 50, 22, 4, 51, 23],
  21889. [3, 36, 12, 8, 37, 13],
  21890. // 12
  21891. [2, 116, 92, 2, 117, 93],
  21892. [6, 58, 36, 2, 59, 37],
  21893. [4, 46, 20, 6, 47, 21],
  21894. [7, 42, 14, 4, 43, 15],
  21895. // 13
  21896. [4, 133, 107],
  21897. [8, 59, 37, 1, 60, 38],
  21898. [8, 44, 20, 4, 45, 21],
  21899. [12, 33, 11, 4, 34, 12],
  21900. // 14
  21901. [3, 145, 115, 1, 146, 116],
  21902. [4, 64, 40, 5, 65, 41],
  21903. [11, 36, 16, 5, 37, 17],
  21904. [11, 36, 12, 5, 37, 13],
  21905. // 15
  21906. [5, 109, 87, 1, 110, 88],
  21907. [5, 65, 41, 5, 66, 42],
  21908. [5, 54, 24, 7, 55, 25],
  21909. [11, 36, 12],
  21910. // 16
  21911. [5, 122, 98, 1, 123, 99],
  21912. [7, 73, 45, 3, 74, 46],
  21913. [15, 43, 19, 2, 44, 20],
  21914. [3, 45, 15, 13, 46, 16],
  21915. // 17
  21916. [1, 135, 107, 5, 136, 108],
  21917. [10, 74, 46, 1, 75, 47],
  21918. [1, 50, 22, 15, 51, 23],
  21919. [2, 42, 14, 17, 43, 15],
  21920. // 18
  21921. [5, 150, 120, 1, 151, 121],
  21922. [9, 69, 43, 4, 70, 44],
  21923. [17, 50, 22, 1, 51, 23],
  21924. [2, 42, 14, 19, 43, 15],
  21925. // 19
  21926. [3, 141, 113, 4, 142, 114],
  21927. [3, 70, 44, 11, 71, 45],
  21928. [17, 47, 21, 4, 48, 22],
  21929. [9, 39, 13, 16, 40, 14],
  21930. // 20
  21931. [3, 135, 107, 5, 136, 108],
  21932. [3, 67, 41, 13, 68, 42],
  21933. [15, 54, 24, 5, 55, 25],
  21934. [15, 43, 15, 10, 44, 16],
  21935. // 21
  21936. [4, 144, 116, 4, 145, 117],
  21937. [17, 68, 42],
  21938. [17, 50, 22, 6, 51, 23],
  21939. [19, 46, 16, 6, 47, 17],
  21940. // 22
  21941. [2, 139, 111, 7, 140, 112],
  21942. [17, 74, 46],
  21943. [7, 54, 24, 16, 55, 25],
  21944. [34, 37, 13],
  21945. // 23
  21946. [4, 151, 121, 5, 152, 122],
  21947. [4, 75, 47, 14, 76, 48],
  21948. [11, 54, 24, 14, 55, 25],
  21949. [16, 45, 15, 14, 46, 16],
  21950. // 24
  21951. [6, 147, 117, 4, 148, 118],
  21952. [6, 73, 45, 14, 74, 46],
  21953. [11, 54, 24, 16, 55, 25],
  21954. [30, 46, 16, 2, 47, 17],
  21955. // 25
  21956. [8, 132, 106, 4, 133, 107],
  21957. [8, 75, 47, 13, 76, 48],
  21958. [7, 54, 24, 22, 55, 25],
  21959. [22, 45, 15, 13, 46, 16],
  21960. // 26
  21961. [10, 142, 114, 2, 143, 115],
  21962. [19, 74, 46, 4, 75, 47],
  21963. [28, 50, 22, 6, 51, 23],
  21964. [33, 46, 16, 4, 47, 17],
  21965. // 27
  21966. [8, 152, 122, 4, 153, 123],
  21967. [22, 73, 45, 3, 74, 46],
  21968. [8, 53, 23, 26, 54, 24],
  21969. [12, 45, 15, 28, 46, 16],
  21970. // 28
  21971. [3, 147, 117, 10, 148, 118],
  21972. [3, 73, 45, 23, 74, 46],
  21973. [4, 54, 24, 31, 55, 25],
  21974. [11, 45, 15, 31, 46, 16],
  21975. // 29
  21976. [7, 146, 116, 7, 147, 117],
  21977. [21, 73, 45, 7, 74, 46],
  21978. [1, 53, 23, 37, 54, 24],
  21979. [19, 45, 15, 26, 46, 16],
  21980. // 30
  21981. [5, 145, 115, 10, 146, 116],
  21982. [19, 75, 47, 10, 76, 48],
  21983. [15, 54, 24, 25, 55, 25],
  21984. [23, 45, 15, 25, 46, 16],
  21985. // 31
  21986. [13, 145, 115, 3, 146, 116],
  21987. [2, 74, 46, 29, 75, 47],
  21988. [42, 54, 24, 1, 55, 25],
  21989. [23, 45, 15, 28, 46, 16],
  21990. // 32
  21991. [17, 145, 115],
  21992. [10, 74, 46, 23, 75, 47],
  21993. [10, 54, 24, 35, 55, 25],
  21994. [19, 45, 15, 35, 46, 16],
  21995. // 33
  21996. [17, 145, 115, 1, 146, 116],
  21997. [14, 74, 46, 21, 75, 47],
  21998. [29, 54, 24, 19, 55, 25],
  21999. [11, 45, 15, 46, 46, 16],
  22000. // 34
  22001. [13, 145, 115, 6, 146, 116],
  22002. [14, 74, 46, 23, 75, 47],
  22003. [44, 54, 24, 7, 55, 25],
  22004. [59, 46, 16, 1, 47, 17],
  22005. // 35
  22006. [12, 151, 121, 7, 152, 122],
  22007. [12, 75, 47, 26, 76, 48],
  22008. [39, 54, 24, 14, 55, 25],
  22009. [22, 45, 15, 41, 46, 16],
  22010. // 36
  22011. [6, 151, 121, 14, 152, 122],
  22012. [6, 75, 47, 34, 76, 48],
  22013. [46, 54, 24, 10, 55, 25],
  22014. [2, 45, 15, 64, 46, 16],
  22015. // 37
  22016. [17, 152, 122, 4, 153, 123],
  22017. [29, 74, 46, 14, 75, 47],
  22018. [49, 54, 24, 10, 55, 25],
  22019. [24, 45, 15, 46, 46, 16],
  22020. // 38
  22021. [4, 152, 122, 18, 153, 123],
  22022. [13, 74, 46, 32, 75, 47],
  22023. [48, 54, 24, 14, 55, 25],
  22024. [42, 45, 15, 32, 46, 16],
  22025. // 39
  22026. [20, 147, 117, 4, 148, 118],
  22027. [40, 75, 47, 7, 76, 48],
  22028. [43, 54, 24, 22, 55, 25],
  22029. [10, 45, 15, 67, 46, 16],
  22030. // 40
  22031. [19, 148, 118, 6, 149, 119],
  22032. [18, 75, 47, 31, 76, 48],
  22033. [34, 54, 24, 34, 55, 25],
  22034. [20, 45, 15, 61, 46, 16]];
  22035. QRRSBlock.getRSBlocks = function (typeNumber, errorCorrectLevel) {
  22036. var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel);
  22037. if (rsBlock == undefined) {
  22038. throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel);
  22039. }
  22040. var length = rsBlock.length / 3;
  22041. var list = new Array();
  22042. for (var i = 0; i < length; i++) {
  22043. var count = rsBlock[i * 3 + 0];
  22044. var totalCount = rsBlock[i * 3 + 1];
  22045. var dataCount = rsBlock[i * 3 + 2];
  22046. for (var j = 0; j < count; j++) {
  22047. list.push(new QRRSBlock(totalCount, dataCount));
  22048. }
  22049. }
  22050. return list;
  22051. };
  22052. QRRSBlock.getRsBlockTable = function (typeNumber, errorCorrectLevel) {
  22053. switch (errorCorrectLevel) {
  22054. case QRErrorCorrectLevel.L:
  22055. return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];
  22056. case QRErrorCorrectLevel.M:
  22057. return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];
  22058. case QRErrorCorrectLevel.Q:
  22059. return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];
  22060. case QRErrorCorrectLevel.H:
  22061. return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];
  22062. default:
  22063. return undefined;}
  22064. };
  22065. //---------------------------------------------------------------------
  22066. // QRBitBuffer
  22067. //---------------------------------------------------------------------
  22068. function QRBitBuffer() {
  22069. this.buffer = new Array();
  22070. this.length = 0;
  22071. }
  22072. QRBitBuffer.prototype = {
  22073. get: function get(index) {
  22074. var bufIndex = Math.floor(index / 8);
  22075. return (this.buffer[bufIndex] >>> 7 - index % 8 & 1) == 1;
  22076. },
  22077. put: function put(num, length) {
  22078. for (var i = 0; i < length; i++) {
  22079. this.putBit((num >>> length - i - 1 & 1) == 1);
  22080. }
  22081. },
  22082. getLengthInBits: function getLengthInBits() {
  22083. return this.length;
  22084. },
  22085. putBit: function putBit(bit) {
  22086. var bufIndex = Math.floor(this.length / 8);
  22087. if (this.buffer.length <= bufIndex) {
  22088. this.buffer.push(0);
  22089. }
  22090. if (bit) {
  22091. this.buffer[bufIndex] |= 0x80 >>> this.length % 8;
  22092. }
  22093. this.length++;
  22094. } };
  22095. //---------------------------------------------------------------------
  22096. // Support Chinese
  22097. //---------------------------------------------------------------------
  22098. function utf16To8(text) {
  22099. var result = '';
  22100. var c;
  22101. for (var i = 0; i < text.length; i++) {
  22102. c = text.charCodeAt(i);
  22103. if (c >= 0x0001 && c <= 0x007F) {
  22104. result += text.charAt(i);
  22105. } else if (c > 0x07FF) {
  22106. result += String.fromCharCode(0xE0 | c >> 12 & 0x0F);
  22107. result += String.fromCharCode(0x80 | c >> 6 & 0x3F);
  22108. result += String.fromCharCode(0x80 | c >> 0 & 0x3F);
  22109. } else {
  22110. result += String.fromCharCode(0xC0 | c >> 6 & 0x1F);
  22111. result += String.fromCharCode(0x80 | c >> 0 & 0x3F);
  22112. }
  22113. }
  22114. return result;
  22115. }
  22116. uQRCode = {
  22117. defaults: {
  22118. size: 258,
  22119. margin: 0,
  22120. backgroundColor: '#ffffff',
  22121. foregroundColor: '#000000',
  22122. fileType: 'png', // 'jpg', 'png'
  22123. correctLevel: 3,
  22124. typeNumber: -1 },
  22125. make: function make(options) {
  22126. var defaultOptions = {
  22127. canvasId: options.canvasId,
  22128. componentInstance: options.componentInstance,
  22129. text: options.text,
  22130. size: this.defaults.size,
  22131. margin: this.defaults.margin,
  22132. backgroundColor: this.defaults.backgroundColor,
  22133. foregroundColor: this.defaults.foregroundColor,
  22134. fileType: this.defaults.fileType,
  22135. correctLevel: this.defaults.correctLevel,
  22136. typeNumber: this.defaults.typeNumber };
  22137. if (options) {
  22138. for (var i in options) {
  22139. defaultOptions[i] = options[i];
  22140. }
  22141. }
  22142. options = defaultOptions;
  22143. if (!options.canvasId) {
  22144. console.error('uQRCode: Please set canvasId!');
  22145. return;
  22146. }
  22147. function createCanvas() {
  22148. var qrcode = new QRCode(options.typeNumber, options.correctLevel);
  22149. qrcode.addData(utf16To8(options.text));
  22150. qrcode.make();
  22151. var ctx = uni.createCanvasContext(options.canvasId, options.componentInstance);
  22152. ctx.setFillStyle(options.backgroundColor);
  22153. ctx.fillRect(0, 0, options.size, options.size);
  22154. var tileW = (options.size - options.margin * 2) / qrcode.getModuleCount();
  22155. var tileH = tileW;
  22156. for (var row = 0; row < qrcode.getModuleCount(); row++) {
  22157. for (var col = 0; col < qrcode.getModuleCount(); col++) {
  22158. var style = qrcode.isDark(row, col) ? options.foregroundColor : options.backgroundColor;
  22159. ctx.setFillStyle(style);
  22160. var x = Math.round(col * tileW) + options.margin;
  22161. var y = Math.round(row * tileH) + options.margin;
  22162. var w = Math.ceil((col + 1) * tileW) - Math.floor(col * tileW);
  22163. var h = Math.ceil((row + 1) * tileW) - Math.floor(row * tileW);
  22164. ctx.fillRect(x, y, w, h);
  22165. }
  22166. }
  22167. setTimeout(function () {
  22168. ctx.draw(false, function () {
  22169. setTimeout(function () {
  22170. uni.canvasToTempFilePath({
  22171. canvasId: options.canvasId,
  22172. fileType: options.fileType,
  22173. width: options.size,
  22174. height: options.size,
  22175. destWidth: options.size,
  22176. destHeight: options.size,
  22177. success: function success(res) {
  22178. options.success && options.success(res.tempFilePath);
  22179. },
  22180. fail: function fail(error) {
  22181. options.fail && options.fail(error);
  22182. },
  22183. complete: function complete(res) {
  22184. options.complete && options.complete(res);
  22185. } },
  22186. options.componentInstance);
  22187. }, options.text.length + 100);
  22188. });
  22189. }, 150);
  22190. }
  22191. createCanvas();
  22192. } };
  22193. })();var _default =
  22194. uQRCode;exports.default = _default;
  22195. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  22196. /***/ }),
  22197. /***/ 46:
  22198. /*!***********************************************************!*\
  22199. !*** /Users/wanglili/Documents/liuniu/Mazui/api/index.js ***!
  22200. \***********************************************************/
  22201. /*! no static exports found */
  22202. /***/ (function(module, exports, __webpack_require__) {
  22203. "use strict";
  22204. Object.defineProperty(exports, "__esModule", { value: true });exports.upload = upload;exports.choseType = choseType;exports.getHospitalList = getHospitalList;exports.setDoctor = setDoctor;exports.setDoctorExt = setDoctorExt;exports.setPatient = setPatient;exports.setOrgan = setOrgan;exports.sendFile = sendFile;var _request = _interopRequireWildcard(__webpack_require__(/*! @/utils/request */ 23));function _getRequireWildcardCache() {if (typeof WeakMap !== "function") return null;var cache = new WeakMap();_getRequireWildcardCache = function _getRequireWildcardCache() {return cache;};return cache;}function _interopRequireWildcard(obj) {if (obj && obj.__esModule) {return obj;}if (obj === null || typeof obj !== "object" && typeof obj !== "function") {return { default: obj };}var cache = _getRequireWildcardCache();if (cache && cache.has(obj)) {return cache.get(obj);}var newObj = {};var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;for (var key in obj) {if (Object.prototype.hasOwnProperty.call(obj, key)) {var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;if (desc && (desc.get || desc.set)) {Object.defineProperty(newObj, key, desc);} else {newObj[key] = obj[key];}}}newObj.default = obj;if (cache) {cache.set(obj, newObj);}return newObj;}
  22205. //上传图片
  22206. function upload(data) {
  22207. return (0, _request.upFilse)({
  22208. url: '/api/index/upload_oss',
  22209. method: 'post',
  22210. data: data });
  22211. }
  22212. //选择身份
  22213. function choseType(data) {
  22214. return (0, _request.default)({
  22215. url: '/api/user.user/choseType',
  22216. method: 'post',
  22217. data: data });
  22218. }
  22219. //获取医院列表
  22220. function getHospitalList(data) {
  22221. return (0, _request.default)({
  22222. url: '/api/system.hospital/getHospitalList',
  22223. method: 'get',
  22224. data: data });
  22225. }
  22226. //保存医生信息
  22227. function setDoctor(data) {
  22228. return (0, _request.default)({
  22229. url: '/api/user.user/setDoctor',
  22230. method: 'POST',
  22231. data: data });
  22232. }
  22233. //保存医生额外信息
  22234. function setDoctorExt(data) {
  22235. return (0, _request.default)({
  22236. url: '/api/user.user/setDoctorExt',
  22237. method: 'POST',
  22238. data: data });
  22239. }
  22240. //保存病人信息
  22241. function setPatient(data) {
  22242. return (0, _request.default)({
  22243. url: '/api/user.user/setPatient',
  22244. method: 'post',
  22245. data: data });
  22246. }
  22247. //保存机构信息
  22248. function setOrgan(data) {
  22249. return (0, _request.default)({
  22250. url: '/api/user.user/setOrgan',
  22251. method: 'post',
  22252. data: data });
  22253. }
  22254. //发送文件 sendFile questions
  22255. function sendFile(data) {
  22256. return (0, _request.default)({
  22257. url: '/api/index/questions',
  22258. method: 'post',
  22259. data: data });
  22260. }
  22261. /***/ }),
  22262. /***/ 5:
  22263. /*!*************************************************************!*\
  22264. !*** /Users/wanglili/Documents/liuniu/Mazui/store/index.js ***!
  22265. \*************************************************************/
  22266. /*! no static exports found */
  22267. /***/ (function(module, exports, __webpack_require__) {
  22268. "use strict";
  22269. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  22270. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 6));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  22271. _vue.default.use(_vuex.default);
  22272. var store = new _vuex.default.Store({
  22273. state: {
  22274. baseURL: 'http://doctortest.igxys.com', //请求线上地址配置
  22275. urlFile: '/index', //项目部署所在文件夹
  22276. hasLogin: false, //是否登录
  22277. userInfo: {
  22278. ext_info: {
  22279. status: '' } },
  22280. //登录信息
  22281. loginInterceptor: false, //是否打开强制登录
  22282. orderInfo: {}, //订单信息
  22283. // 是否显示page页面
  22284. addressPageShow: false,
  22285. addressData: {
  22286. city: "",
  22287. detail: "",
  22288. district: "",
  22289. id: '',
  22290. is_default: '',
  22291. phone: "",
  22292. province: "",
  22293. real_name: "" },
  22294. token: ''
  22295. // shareData:'',//分享信息
  22296. },
  22297. mutations: {
  22298. // 登录
  22299. login: function login(state) {
  22300. state.hasLogin = true;
  22301. },
  22302. // 退出登录
  22303. logout: function logout(state) {
  22304. state.hasLogin = false;
  22305. state.userInfo = {};
  22306. uni.removeStorage({
  22307. key: 'userInfo' });
  22308. uni.removeStorage({
  22309. key: 'token' });
  22310. },
  22311. // 保存用户信息
  22312. setUserInfo: function setUserInfo(state, provider) {
  22313. state.userInfo = provider;
  22314. if (!state.userInfo.level_info) {
  22315. state.userInfo.level_info = {
  22316. grade: 0 };
  22317. }
  22318. uni.setStorage({ //缓存用户登陆状态
  22319. key: 'userInfo',
  22320. data: provider });
  22321. } },
  22322. actions: {} });var _default =
  22323. store;exports.default = _default;
  22324. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  22325. /***/ }),
  22326. /***/ 564:
  22327. /*!************************************************************************!*\
  22328. !*** /Users/wanglili/Documents/liuniu/Mazui/components/common/time.js ***!
  22329. \************************************************************************/
  22330. /*! no static exports found */
  22331. /***/ (function(module, exports, __webpack_require__) {
  22332. "use strict";
  22333. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  22334. // 计算当前日期星座
  22335. getHoroscope: function getHoroscope(date) {
  22336. var c = ['摩羯', '水瓶', '双鱼', '白羊', '金牛', '双子', '巨蟹', '狮子', '处女', '天秤', '天蝎', '射手', '摩羯'];
  22337. date = new Date(date);
  22338. var month = date.getMonth() + 1;
  22339. var day = date.getDate();
  22340. var startMonth = month - (day - 14 < '865778999988'.charAt(month));
  22341. return c[startMonth] + '座';
  22342. },
  22343. // 计算指定时间与当前的时间差
  22344. sumAge: function sumAge(data) {
  22345. var dateBegin = new Date(data.replace(/-/g, "/"));
  22346. var dateEnd = new Date(); //获取当前时间
  22347. var dateDiff = dateEnd.getTime() - dateBegin.getTime(); //时间差的毫秒数
  22348. var dayDiff = Math.floor(dateDiff / (24 * 3600 * 1000)); //计算出相差天数
  22349. var leave1 = dateDiff % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
  22350. var hours = Math.floor(leave1 / (3600 * 1000)); //计算出小时数
  22351. //计算相差分钟数
  22352. var leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数
  22353. var minutes = Math.floor(leave2 / (60 * 1000)); //计算相差分钟数
  22354. //计算相差秒数
  22355. var leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数
  22356. var seconds = Math.round(leave3 / 1000);
  22357. return dayDiff + "天 " + hours + "小时 ";
  22358. },
  22359. // 获取聊天时间(相差300s内的信息不会显示时间)
  22360. getChatTime: function getChatTime(v1, v2) {
  22361. v1 = v1.toString().length < 13 ? v1 * 1000 : v1;
  22362. v2 = v2.toString().length < 13 ? v2 * 1000 : v2;
  22363. if ((parseInt(v1) - parseInt(v2)) / 1000 > 300) {
  22364. return this.gettime(v1);
  22365. }
  22366. },
  22367. // 人性化时间格式
  22368. gettime: function gettime(shorttime) {
  22369. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  22370. var now = new Date().getTime();
  22371. var cha = (now - parseInt(shorttime)) / 1000;
  22372. if (cha < 43200) {
  22373. // 当天
  22374. return this.dateFormat(new Date(shorttime), "{A} {t}:{ii}");
  22375. } else if (cha < 518400) {
  22376. // 隔天 显示日期+时间
  22377. return this.dateFormat(new Date(shorttime), "{Mon}月{DD}日 {A} {t}:{ii}");
  22378. } else {
  22379. // 隔年 显示完整日期+时间
  22380. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {A} {t}:{ii}");
  22381. }
  22382. },
  22383. parseNumber: function parseNumber(num) {
  22384. return num < 10 ? "0" + num : num;
  22385. },
  22386. dateFormat: function dateFormat(date, formatStr) {
  22387. var dateObj = {},
  22388. rStr = /\{([^}]+)\}/,
  22389. mons = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
  22390. dateObj["Y"] = date.getFullYear();
  22391. dateObj["M"] = date.getMonth() + 1;
  22392. dateObj["MM"] = this.parseNumber(dateObj["M"]);
  22393. dateObj["Mon"] = mons[dateObj['M'] - 1];
  22394. dateObj["D"] = date.getDate();
  22395. dateObj["DD"] = this.parseNumber(dateObj["D"]);
  22396. dateObj["h"] = date.getHours();
  22397. dateObj["hh"] = this.parseNumber(dateObj["h"]);
  22398. dateObj["t"] = dateObj["h"] > 12 ? dateObj["h"] - 12 : dateObj["h"];
  22399. dateObj["tt"] = this.parseNumber(dateObj["t"]);
  22400. dateObj["A"] = dateObj["h"] > 12 ? '下午' : '上午';
  22401. dateObj["i"] = date.getMinutes();
  22402. dateObj["ii"] = this.parseNumber(dateObj["i"]);
  22403. dateObj["s"] = date.getSeconds();
  22404. dateObj["ss"] = this.parseNumber(dateObj["s"]);
  22405. while (rStr.test(formatStr)) {
  22406. formatStr = formatStr.replace(rStr, dateObj[RegExp.$1]);
  22407. }
  22408. return formatStr;
  22409. },
  22410. // 获取年龄
  22411. getAgeByBirthday: function getAgeByBirthday(data) {
  22412. var birthday = new Date(data.replace(/-/g, "\/"));
  22413. var d = new Date();
  22414. return d.getFullYear() - birthday.getFullYear() - (d.getMonth() < birthday.getMonth() || d.getMonth() == birthday.getMonth() && d.getDate() < birthday.getDate() ? 1 : 0);
  22415. } };exports.default = _default;
  22416. /***/ }),
  22417. /***/ 6:
  22418. /*!********************************************!*\
  22419. !*** ./node_modules/vuex/dist/vuex.esm.js ***!
  22420. \********************************************/
  22421. /*! exports provided: default, Store, createNamespacedHelpers, install, mapActions, mapGetters, mapMutations, mapState */
  22422. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  22423. "use strict";
  22424. __webpack_require__.r(__webpack_exports__);
  22425. /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Store", function() { return Store; });
  22426. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createNamespacedHelpers", function() { return createNamespacedHelpers; });
  22427. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; });
  22428. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return mapActions; });
  22429. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapGetters", function() { return mapGetters; });
  22430. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapMutations", function() { return mapMutations; });
  22431. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapState", function() { return mapState; });
  22432. /*!
  22433. * vuex v3.4.0
  22434. * (c) 2020 Evan You
  22435. * @license MIT
  22436. */
  22437. function applyMixin (Vue) {
  22438. var version = Number(Vue.version.split('.')[0]);
  22439. if (version >= 2) {
  22440. Vue.mixin({ beforeCreate: vuexInit });
  22441. } else {
  22442. // override init and inject vuex init procedure
  22443. // for 1.x backwards compatibility.
  22444. var _init = Vue.prototype._init;
  22445. Vue.prototype._init = function (options) {
  22446. if ( options === void 0 ) options = {};
  22447. options.init = options.init
  22448. ? [vuexInit].concat(options.init)
  22449. : vuexInit;
  22450. _init.call(this, options);
  22451. };
  22452. }
  22453. /**
  22454. * Vuex init hook, injected into each instances init hooks list.
  22455. */
  22456. function vuexInit () {
  22457. var options = this.$options;
  22458. // store injection
  22459. if (options.store) {
  22460. this.$store = typeof options.store === 'function'
  22461. ? options.store()
  22462. : options.store;
  22463. } else if (options.parent && options.parent.$store) {
  22464. this.$store = options.parent.$store;
  22465. }
  22466. }
  22467. }
  22468. var target = typeof window !== 'undefined'
  22469. ? window
  22470. : typeof global !== 'undefined'
  22471. ? global
  22472. : {};
  22473. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  22474. function devtoolPlugin (store) {
  22475. if (!devtoolHook) { return }
  22476. store._devtoolHook = devtoolHook;
  22477. devtoolHook.emit('vuex:init', store);
  22478. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  22479. store.replaceState(targetState);
  22480. });
  22481. store.subscribe(function (mutation, state) {
  22482. devtoolHook.emit('vuex:mutation', mutation, state);
  22483. }, { prepend: true });
  22484. store.subscribeAction(function (action, state) {
  22485. devtoolHook.emit('vuex:action', action, state);
  22486. }, { prepend: true });
  22487. }
  22488. /**
  22489. * Get the first item that pass the test
  22490. * by second argument function
  22491. *
  22492. * @param {Array} list
  22493. * @param {Function} f
  22494. * @return {*}
  22495. */
  22496. /**
  22497. * forEach for object
  22498. */
  22499. function forEachValue (obj, fn) {
  22500. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  22501. }
  22502. function isObject (obj) {
  22503. return obj !== null && typeof obj === 'object'
  22504. }
  22505. function isPromise (val) {
  22506. return val && typeof val.then === 'function'
  22507. }
  22508. function assert (condition, msg) {
  22509. if (!condition) { throw new Error(("[vuex] " + msg)) }
  22510. }
  22511. function partial (fn, arg) {
  22512. return function () {
  22513. return fn(arg)
  22514. }
  22515. }
  22516. // Base data struct for store's module, package with some attribute and method
  22517. var Module = function Module (rawModule, runtime) {
  22518. this.runtime = runtime;
  22519. // Store some children item
  22520. this._children = Object.create(null);
  22521. // Store the origin module object which passed by programmer
  22522. this._rawModule = rawModule;
  22523. var rawState = rawModule.state;
  22524. // Store the origin module's state
  22525. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  22526. };
  22527. var prototypeAccessors = { namespaced: { configurable: true } };
  22528. prototypeAccessors.namespaced.get = function () {
  22529. return !!this._rawModule.namespaced
  22530. };
  22531. Module.prototype.addChild = function addChild (key, module) {
  22532. this._children[key] = module;
  22533. };
  22534. Module.prototype.removeChild = function removeChild (key) {
  22535. delete this._children[key];
  22536. };
  22537. Module.prototype.getChild = function getChild (key) {
  22538. return this._children[key]
  22539. };
  22540. Module.prototype.hasChild = function hasChild (key) {
  22541. return key in this._children
  22542. };
  22543. Module.prototype.update = function update (rawModule) {
  22544. this._rawModule.namespaced = rawModule.namespaced;
  22545. if (rawModule.actions) {
  22546. this._rawModule.actions = rawModule.actions;
  22547. }
  22548. if (rawModule.mutations) {
  22549. this._rawModule.mutations = rawModule.mutations;
  22550. }
  22551. if (rawModule.getters) {
  22552. this._rawModule.getters = rawModule.getters;
  22553. }
  22554. };
  22555. Module.prototype.forEachChild = function forEachChild (fn) {
  22556. forEachValue(this._children, fn);
  22557. };
  22558. Module.prototype.forEachGetter = function forEachGetter (fn) {
  22559. if (this._rawModule.getters) {
  22560. forEachValue(this._rawModule.getters, fn);
  22561. }
  22562. };
  22563. Module.prototype.forEachAction = function forEachAction (fn) {
  22564. if (this._rawModule.actions) {
  22565. forEachValue(this._rawModule.actions, fn);
  22566. }
  22567. };
  22568. Module.prototype.forEachMutation = function forEachMutation (fn) {
  22569. if (this._rawModule.mutations) {
  22570. forEachValue(this._rawModule.mutations, fn);
  22571. }
  22572. };
  22573. Object.defineProperties( Module.prototype, prototypeAccessors );
  22574. var ModuleCollection = function ModuleCollection (rawRootModule) {
  22575. // register root module (Vuex.Store options)
  22576. this.register([], rawRootModule, false);
  22577. };
  22578. ModuleCollection.prototype.get = function get (path) {
  22579. return path.reduce(function (module, key) {
  22580. return module.getChild(key)
  22581. }, this.root)
  22582. };
  22583. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  22584. var module = this.root;
  22585. return path.reduce(function (namespace, key) {
  22586. module = module.getChild(key);
  22587. return namespace + (module.namespaced ? key + '/' : '')
  22588. }, '')
  22589. };
  22590. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  22591. update([], this.root, rawRootModule);
  22592. };
  22593. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  22594. var this$1 = this;
  22595. if ( runtime === void 0 ) runtime = true;
  22596. if ((true)) {
  22597. assertRawModule(path, rawModule);
  22598. }
  22599. var newModule = new Module(rawModule, runtime);
  22600. if (path.length === 0) {
  22601. this.root = newModule;
  22602. } else {
  22603. var parent = this.get(path.slice(0, -1));
  22604. parent.addChild(path[path.length - 1], newModule);
  22605. }
  22606. // register nested modules
  22607. if (rawModule.modules) {
  22608. forEachValue(rawModule.modules, function (rawChildModule, key) {
  22609. this$1.register(path.concat(key), rawChildModule, runtime);
  22610. });
  22611. }
  22612. };
  22613. ModuleCollection.prototype.unregister = function unregister (path) {
  22614. var parent = this.get(path.slice(0, -1));
  22615. var key = path[path.length - 1];
  22616. if (!parent.getChild(key).runtime) { return }
  22617. parent.removeChild(key);
  22618. };
  22619. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  22620. var parent = this.get(path.slice(0, -1));
  22621. var key = path[path.length - 1];
  22622. return parent.hasChild(key)
  22623. };
  22624. function update (path, targetModule, newModule) {
  22625. if ((true)) {
  22626. assertRawModule(path, newModule);
  22627. }
  22628. // update target module
  22629. targetModule.update(newModule);
  22630. // update nested modules
  22631. if (newModule.modules) {
  22632. for (var key in newModule.modules) {
  22633. if (!targetModule.getChild(key)) {
  22634. if ((true)) {
  22635. console.warn(
  22636. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  22637. 'manual reload is needed'
  22638. );
  22639. }
  22640. return
  22641. }
  22642. update(
  22643. path.concat(key),
  22644. targetModule.getChild(key),
  22645. newModule.modules[key]
  22646. );
  22647. }
  22648. }
  22649. }
  22650. var functionAssert = {
  22651. assert: function (value) { return typeof value === 'function'; },
  22652. expected: 'function'
  22653. };
  22654. var objectAssert = {
  22655. assert: function (value) { return typeof value === 'function' ||
  22656. (typeof value === 'object' && typeof value.handler === 'function'); },
  22657. expected: 'function or object with "handler" function'
  22658. };
  22659. var assertTypes = {
  22660. getters: functionAssert,
  22661. mutations: functionAssert,
  22662. actions: objectAssert
  22663. };
  22664. function assertRawModule (path, rawModule) {
  22665. Object.keys(assertTypes).forEach(function (key) {
  22666. if (!rawModule[key]) { return }
  22667. var assertOptions = assertTypes[key];
  22668. forEachValue(rawModule[key], function (value, type) {
  22669. assert(
  22670. assertOptions.assert(value),
  22671. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  22672. );
  22673. });
  22674. });
  22675. }
  22676. function makeAssertionMessage (path, key, type, value, expected) {
  22677. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  22678. if (path.length > 0) {
  22679. buf += " in module \"" + (path.join('.')) + "\"";
  22680. }
  22681. buf += " is " + (JSON.stringify(value)) + ".";
  22682. return buf
  22683. }
  22684. var Vue; // bind on install
  22685. var Store = function Store (options) {
  22686. var this$1 = this;
  22687. if ( options === void 0 ) options = {};
  22688. // Auto install if it is not done yet and `window` has `Vue`.
  22689. // To allow users to avoid auto-installation in some cases,
  22690. // this code should be placed here. See #731
  22691. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  22692. install(window.Vue);
  22693. }
  22694. if ((true)) {
  22695. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  22696. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  22697. assert(this instanceof Store, "store must be called with the new operator.");
  22698. }
  22699. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  22700. var strict = options.strict; if ( strict === void 0 ) strict = false;
  22701. // store internal state
  22702. this._committing = false;
  22703. this._actions = Object.create(null);
  22704. this._actionSubscribers = [];
  22705. this._mutations = Object.create(null);
  22706. this._wrappedGetters = Object.create(null);
  22707. this._modules = new ModuleCollection(options);
  22708. this._modulesNamespaceMap = Object.create(null);
  22709. this._subscribers = [];
  22710. this._watcherVM = new Vue();
  22711. this._makeLocalGettersCache = Object.create(null);
  22712. // bind commit and dispatch to self
  22713. var store = this;
  22714. var ref = this;
  22715. var dispatch = ref.dispatch;
  22716. var commit = ref.commit;
  22717. this.dispatch = function boundDispatch (type, payload) {
  22718. return dispatch.call(store, type, payload)
  22719. };
  22720. this.commit = function boundCommit (type, payload, options) {
  22721. return commit.call(store, type, payload, options)
  22722. };
  22723. // strict mode
  22724. this.strict = strict;
  22725. var state = this._modules.root.state;
  22726. // init root module.
  22727. // this also recursively registers all sub-modules
  22728. // and collects all module getters inside this._wrappedGetters
  22729. installModule(this, state, [], this._modules.root);
  22730. // initialize the store vm, which is responsible for the reactivity
  22731. // (also registers _wrappedGetters as computed properties)
  22732. resetStoreVM(this, state);
  22733. // apply plugins
  22734. plugins.forEach(function (plugin) { return plugin(this$1); });
  22735. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  22736. if (useDevtools) {
  22737. devtoolPlugin(this);
  22738. }
  22739. };
  22740. var prototypeAccessors$1 = { state: { configurable: true } };
  22741. prototypeAccessors$1.state.get = function () {
  22742. return this._vm._data.$$state
  22743. };
  22744. prototypeAccessors$1.state.set = function (v) {
  22745. if ((true)) {
  22746. assert(false, "use store.replaceState() to explicit replace store state.");
  22747. }
  22748. };
  22749. Store.prototype.commit = function commit (_type, _payload, _options) {
  22750. var this$1 = this;
  22751. // check object-style commit
  22752. var ref = unifyObjectStyle(_type, _payload, _options);
  22753. var type = ref.type;
  22754. var payload = ref.payload;
  22755. var options = ref.options;
  22756. var mutation = { type: type, payload: payload };
  22757. var entry = this._mutations[type];
  22758. if (!entry) {
  22759. if ((true)) {
  22760. console.error(("[vuex] unknown mutation type: " + type));
  22761. }
  22762. return
  22763. }
  22764. this._withCommit(function () {
  22765. entry.forEach(function commitIterator (handler) {
  22766. handler(payload);
  22767. });
  22768. });
  22769. this._subscribers
  22770. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  22771. .forEach(function (sub) { return sub(mutation, this$1.state); });
  22772. if (
  22773. ( true) &&
  22774. options && options.silent
  22775. ) {
  22776. console.warn(
  22777. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  22778. 'Use the filter functionality in the vue-devtools'
  22779. );
  22780. }
  22781. };
  22782. Store.prototype.dispatch = function dispatch (_type, _payload) {
  22783. var this$1 = this;
  22784. // check object-style dispatch
  22785. var ref = unifyObjectStyle(_type, _payload);
  22786. var type = ref.type;
  22787. var payload = ref.payload;
  22788. var action = { type: type, payload: payload };
  22789. var entry = this._actions[type];
  22790. if (!entry) {
  22791. if ((true)) {
  22792. console.error(("[vuex] unknown action type: " + type));
  22793. }
  22794. return
  22795. }
  22796. try {
  22797. this._actionSubscribers
  22798. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  22799. .filter(function (sub) { return sub.before; })
  22800. .forEach(function (sub) { return sub.before(action, this$1.state); });
  22801. } catch (e) {
  22802. if ((true)) {
  22803. console.warn("[vuex] error in before action subscribers: ");
  22804. console.error(e);
  22805. }
  22806. }
  22807. var result = entry.length > 1
  22808. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  22809. : entry[0](payload);
  22810. return new Promise(function (resolve, reject) {
  22811. result.then(function (res) {
  22812. try {
  22813. this$1._actionSubscribers
  22814. .filter(function (sub) { return sub.after; })
  22815. .forEach(function (sub) { return sub.after(action, this$1.state); });
  22816. } catch (e) {
  22817. if ((true)) {
  22818. console.warn("[vuex] error in after action subscribers: ");
  22819. console.error(e);
  22820. }
  22821. }
  22822. resolve(res);
  22823. }, function (error) {
  22824. try {
  22825. this$1._actionSubscribers
  22826. .filter(function (sub) { return sub.error; })
  22827. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  22828. } catch (e) {
  22829. if ((true)) {
  22830. console.warn("[vuex] error in error action subscribers: ");
  22831. console.error(e);
  22832. }
  22833. }
  22834. reject(error);
  22835. });
  22836. })
  22837. };
  22838. Store.prototype.subscribe = function subscribe (fn, options) {
  22839. return genericSubscribe(fn, this._subscribers, options)
  22840. };
  22841. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  22842. var subs = typeof fn === 'function' ? { before: fn } : fn;
  22843. return genericSubscribe(subs, this._actionSubscribers, options)
  22844. };
  22845. Store.prototype.watch = function watch (getter, cb, options) {
  22846. var this$1 = this;
  22847. if ((true)) {
  22848. assert(typeof getter === 'function', "store.watch only accepts a function.");
  22849. }
  22850. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  22851. };
  22852. Store.prototype.replaceState = function replaceState (state) {
  22853. var this$1 = this;
  22854. this._withCommit(function () {
  22855. this$1._vm._data.$$state = state;
  22856. });
  22857. };
  22858. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  22859. if ( options === void 0 ) options = {};
  22860. if (typeof path === 'string') { path = [path]; }
  22861. if ((true)) {
  22862. assert(Array.isArray(path), "module path must be a string or an Array.");
  22863. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  22864. }
  22865. this._modules.register(path, rawModule);
  22866. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  22867. // reset store to update getters...
  22868. resetStoreVM(this, this.state);
  22869. };
  22870. Store.prototype.unregisterModule = function unregisterModule (path) {
  22871. var this$1 = this;
  22872. if (typeof path === 'string') { path = [path]; }
  22873. if ((true)) {
  22874. assert(Array.isArray(path), "module path must be a string or an Array.");
  22875. }
  22876. this._modules.unregister(path);
  22877. this._withCommit(function () {
  22878. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  22879. Vue.delete(parentState, path[path.length - 1]);
  22880. });
  22881. resetStore(this);
  22882. };
  22883. Store.prototype.hasModule = function hasModule (path) {
  22884. if (typeof path === 'string') { path = [path]; }
  22885. if ((true)) {
  22886. assert(Array.isArray(path), "module path must be a string or an Array.");
  22887. }
  22888. return this._modules.isRegistered(path)
  22889. };
  22890. Store.prototype.hotUpdate = function hotUpdate (newOptions) {
  22891. this._modules.update(newOptions);
  22892. resetStore(this, true);
  22893. };
  22894. Store.prototype._withCommit = function _withCommit (fn) {
  22895. var committing = this._committing;
  22896. this._committing = true;
  22897. fn();
  22898. this._committing = committing;
  22899. };
  22900. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  22901. function genericSubscribe (fn, subs, options) {
  22902. if (subs.indexOf(fn) < 0) {
  22903. options && options.prepend
  22904. ? subs.unshift(fn)
  22905. : subs.push(fn);
  22906. }
  22907. return function () {
  22908. var i = subs.indexOf(fn);
  22909. if (i > -1) {
  22910. subs.splice(i, 1);
  22911. }
  22912. }
  22913. }
  22914. function resetStore (store, hot) {
  22915. store._actions = Object.create(null);
  22916. store._mutations = Object.create(null);
  22917. store._wrappedGetters = Object.create(null);
  22918. store._modulesNamespaceMap = Object.create(null);
  22919. var state = store.state;
  22920. // init all modules
  22921. installModule(store, state, [], store._modules.root, true);
  22922. // reset vm
  22923. resetStoreVM(store, state, hot);
  22924. }
  22925. function resetStoreVM (store, state, hot) {
  22926. var oldVm = store._vm;
  22927. // bind store public getters
  22928. store.getters = {};
  22929. // reset local getters cache
  22930. store._makeLocalGettersCache = Object.create(null);
  22931. var wrappedGetters = store._wrappedGetters;
  22932. var computed = {};
  22933. forEachValue(wrappedGetters, function (fn, key) {
  22934. // use computed to leverage its lazy-caching mechanism
  22935. // direct inline function use will lead to closure preserving oldVm.
  22936. // using partial to return function with only arguments preserved in closure environment.
  22937. computed[key] = partial(fn, store);
  22938. Object.defineProperty(store.getters, key, {
  22939. get: function () { return store._vm[key]; },
  22940. enumerable: true // for local getters
  22941. });
  22942. });
  22943. // use a Vue instance to store the state tree
  22944. // suppress warnings just in case the user has added
  22945. // some funky global mixins
  22946. var silent = Vue.config.silent;
  22947. Vue.config.silent = true;
  22948. store._vm = new Vue({
  22949. data: {
  22950. $$state: state
  22951. },
  22952. computed: computed
  22953. });
  22954. Vue.config.silent = silent;
  22955. // enable strict mode for new vm
  22956. if (store.strict) {
  22957. enableStrictMode(store);
  22958. }
  22959. if (oldVm) {
  22960. if (hot) {
  22961. // dispatch changes in all subscribed watchers
  22962. // to force getter re-evaluation for hot reloading.
  22963. store._withCommit(function () {
  22964. oldVm._data.$$state = null;
  22965. });
  22966. }
  22967. Vue.nextTick(function () { return oldVm.$destroy(); });
  22968. }
  22969. }
  22970. function installModule (store, rootState, path, module, hot) {
  22971. var isRoot = !path.length;
  22972. var namespace = store._modules.getNamespace(path);
  22973. // register in namespace map
  22974. if (module.namespaced) {
  22975. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  22976. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  22977. }
  22978. store._modulesNamespaceMap[namespace] = module;
  22979. }
  22980. // set state
  22981. if (!isRoot && !hot) {
  22982. var parentState = getNestedState(rootState, path.slice(0, -1));
  22983. var moduleName = path[path.length - 1];
  22984. store._withCommit(function () {
  22985. if ((true)) {
  22986. if (moduleName in parentState) {
  22987. console.warn(
  22988. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  22989. );
  22990. }
  22991. }
  22992. Vue.set(parentState, moduleName, module.state);
  22993. });
  22994. }
  22995. var local = module.context = makeLocalContext(store, namespace, path);
  22996. module.forEachMutation(function (mutation, key) {
  22997. var namespacedType = namespace + key;
  22998. registerMutation(store, namespacedType, mutation, local);
  22999. });
  23000. module.forEachAction(function (action, key) {
  23001. var type = action.root ? key : namespace + key;
  23002. var handler = action.handler || action;
  23003. registerAction(store, type, handler, local);
  23004. });
  23005. module.forEachGetter(function (getter, key) {
  23006. var namespacedType = namespace + key;
  23007. registerGetter(store, namespacedType, getter, local);
  23008. });
  23009. module.forEachChild(function (child, key) {
  23010. installModule(store, rootState, path.concat(key), child, hot);
  23011. });
  23012. }
  23013. /**
  23014. * make localized dispatch, commit, getters and state
  23015. * if there is no namespace, just use root ones
  23016. */
  23017. function makeLocalContext (store, namespace, path) {
  23018. var noNamespace = namespace === '';
  23019. var local = {
  23020. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  23021. var args = unifyObjectStyle(_type, _payload, _options);
  23022. var payload = args.payload;
  23023. var options = args.options;
  23024. var type = args.type;
  23025. if (!options || !options.root) {
  23026. type = namespace + type;
  23027. if (( true) && !store._actions[type]) {
  23028. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  23029. return
  23030. }
  23031. }
  23032. return store.dispatch(type, payload)
  23033. },
  23034. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  23035. var args = unifyObjectStyle(_type, _payload, _options);
  23036. var payload = args.payload;
  23037. var options = args.options;
  23038. var type = args.type;
  23039. if (!options || !options.root) {
  23040. type = namespace + type;
  23041. if (( true) && !store._mutations[type]) {
  23042. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  23043. return
  23044. }
  23045. }
  23046. store.commit(type, payload, options);
  23047. }
  23048. };
  23049. // getters and state object must be gotten lazily
  23050. // because they will be changed by vm update
  23051. Object.defineProperties(local, {
  23052. getters: {
  23053. get: noNamespace
  23054. ? function () { return store.getters; }
  23055. : function () { return makeLocalGetters(store, namespace); }
  23056. },
  23057. state: {
  23058. get: function () { return getNestedState(store.state, path); }
  23059. }
  23060. });
  23061. return local
  23062. }
  23063. function makeLocalGetters (store, namespace) {
  23064. if (!store._makeLocalGettersCache[namespace]) {
  23065. var gettersProxy = {};
  23066. var splitPos = namespace.length;
  23067. Object.keys(store.getters).forEach(function (type) {
  23068. // skip if the target getter is not match this namespace
  23069. if (type.slice(0, splitPos) !== namespace) { return }
  23070. // extract local getter type
  23071. var localType = type.slice(splitPos);
  23072. // Add a port to the getters proxy.
  23073. // Define as getter property because
  23074. // we do not want to evaluate the getters in this time.
  23075. Object.defineProperty(gettersProxy, localType, {
  23076. get: function () { return store.getters[type]; },
  23077. enumerable: true
  23078. });
  23079. });
  23080. store._makeLocalGettersCache[namespace] = gettersProxy;
  23081. }
  23082. return store._makeLocalGettersCache[namespace]
  23083. }
  23084. function registerMutation (store, type, handler, local) {
  23085. var entry = store._mutations[type] || (store._mutations[type] = []);
  23086. entry.push(function wrappedMutationHandler (payload) {
  23087. handler.call(store, local.state, payload);
  23088. });
  23089. }
  23090. function registerAction (store, type, handler, local) {
  23091. var entry = store._actions[type] || (store._actions[type] = []);
  23092. entry.push(function wrappedActionHandler (payload) {
  23093. var res = handler.call(store, {
  23094. dispatch: local.dispatch,
  23095. commit: local.commit,
  23096. getters: local.getters,
  23097. state: local.state,
  23098. rootGetters: store.getters,
  23099. rootState: store.state
  23100. }, payload);
  23101. if (!isPromise(res)) {
  23102. res = Promise.resolve(res);
  23103. }
  23104. if (store._devtoolHook) {
  23105. return res.catch(function (err) {
  23106. store._devtoolHook.emit('vuex:error', err);
  23107. throw err
  23108. })
  23109. } else {
  23110. return res
  23111. }
  23112. });
  23113. }
  23114. function registerGetter (store, type, rawGetter, local) {
  23115. if (store._wrappedGetters[type]) {
  23116. if ((true)) {
  23117. console.error(("[vuex] duplicate getter key: " + type));
  23118. }
  23119. return
  23120. }
  23121. store._wrappedGetters[type] = function wrappedGetter (store) {
  23122. return rawGetter(
  23123. local.state, // local state
  23124. local.getters, // local getters
  23125. store.state, // root state
  23126. store.getters // root getters
  23127. )
  23128. };
  23129. }
  23130. function enableStrictMode (store) {
  23131. store._vm.$watch(function () { return this._data.$$state }, function () {
  23132. if ((true)) {
  23133. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  23134. }
  23135. }, { deep: true, sync: true });
  23136. }
  23137. function getNestedState (state, path) {
  23138. return path.reduce(function (state, key) { return state[key]; }, state)
  23139. }
  23140. function unifyObjectStyle (type, payload, options) {
  23141. if (isObject(type) && type.type) {
  23142. options = payload;
  23143. payload = type;
  23144. type = type.type;
  23145. }
  23146. if ((true)) {
  23147. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  23148. }
  23149. return { type: type, payload: payload, options: options }
  23150. }
  23151. function install (_Vue) {
  23152. if (Vue && _Vue === Vue) {
  23153. if ((true)) {
  23154. console.error(
  23155. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  23156. );
  23157. }
  23158. return
  23159. }
  23160. Vue = _Vue;
  23161. applyMixin(Vue);
  23162. }
  23163. /**
  23164. * Reduce the code which written in Vue.js for getting the state.
  23165. * @param {String} [namespace] - Module's namespace
  23166. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  23167. * @param {Object}
  23168. */
  23169. var mapState = normalizeNamespace(function (namespace, states) {
  23170. var res = {};
  23171. if (( true) && !isValidMap(states)) {
  23172. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  23173. }
  23174. normalizeMap(states).forEach(function (ref) {
  23175. var key = ref.key;
  23176. var val = ref.val;
  23177. res[key] = function mappedState () {
  23178. var state = this.$store.state;
  23179. var getters = this.$store.getters;
  23180. if (namespace) {
  23181. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  23182. if (!module) {
  23183. return
  23184. }
  23185. state = module.context.state;
  23186. getters = module.context.getters;
  23187. }
  23188. return typeof val === 'function'
  23189. ? val.call(this, state, getters)
  23190. : state[val]
  23191. };
  23192. // mark vuex getter for devtools
  23193. res[key].vuex = true;
  23194. });
  23195. return res
  23196. });
  23197. /**
  23198. * Reduce the code which written in Vue.js for committing the mutation
  23199. * @param {String} [namespace] - Module's namespace
  23200. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  23201. * @return {Object}
  23202. */
  23203. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  23204. var res = {};
  23205. if (( true) && !isValidMap(mutations)) {
  23206. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  23207. }
  23208. normalizeMap(mutations).forEach(function (ref) {
  23209. var key = ref.key;
  23210. var val = ref.val;
  23211. res[key] = function mappedMutation () {
  23212. var args = [], len = arguments.length;
  23213. while ( len-- ) args[ len ] = arguments[ len ];
  23214. // Get the commit method from store
  23215. var commit = this.$store.commit;
  23216. if (namespace) {
  23217. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  23218. if (!module) {
  23219. return
  23220. }
  23221. commit = module.context.commit;
  23222. }
  23223. return typeof val === 'function'
  23224. ? val.apply(this, [commit].concat(args))
  23225. : commit.apply(this.$store, [val].concat(args))
  23226. };
  23227. });
  23228. return res
  23229. });
  23230. /**
  23231. * Reduce the code which written in Vue.js for getting the getters
  23232. * @param {String} [namespace] - Module's namespace
  23233. * @param {Object|Array} getters
  23234. * @return {Object}
  23235. */
  23236. var mapGetters = normalizeNamespace(function (namespace, getters) {
  23237. var res = {};
  23238. if (( true) && !isValidMap(getters)) {
  23239. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  23240. }
  23241. normalizeMap(getters).forEach(function (ref) {
  23242. var key = ref.key;
  23243. var val = ref.val;
  23244. // The namespace has been mutated by normalizeNamespace
  23245. val = namespace + val;
  23246. res[key] = function mappedGetter () {
  23247. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  23248. return
  23249. }
  23250. if (( true) && !(val in this.$store.getters)) {
  23251. console.error(("[vuex] unknown getter: " + val));
  23252. return
  23253. }
  23254. return this.$store.getters[val]
  23255. };
  23256. // mark vuex getter for devtools
  23257. res[key].vuex = true;
  23258. });
  23259. return res
  23260. });
  23261. /**
  23262. * Reduce the code which written in Vue.js for dispatch the action
  23263. * @param {String} [namespace] - Module's namespace
  23264. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  23265. * @return {Object}
  23266. */
  23267. var mapActions = normalizeNamespace(function (namespace, actions) {
  23268. var res = {};
  23269. if (( true) && !isValidMap(actions)) {
  23270. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  23271. }
  23272. normalizeMap(actions).forEach(function (ref) {
  23273. var key = ref.key;
  23274. var val = ref.val;
  23275. res[key] = function mappedAction () {
  23276. var args = [], len = arguments.length;
  23277. while ( len-- ) args[ len ] = arguments[ len ];
  23278. // get dispatch function from store
  23279. var dispatch = this.$store.dispatch;
  23280. if (namespace) {
  23281. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  23282. if (!module) {
  23283. return
  23284. }
  23285. dispatch = module.context.dispatch;
  23286. }
  23287. return typeof val === 'function'
  23288. ? val.apply(this, [dispatch].concat(args))
  23289. : dispatch.apply(this.$store, [val].concat(args))
  23290. };
  23291. });
  23292. return res
  23293. });
  23294. /**
  23295. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  23296. * @param {String} namespace
  23297. * @return {Object}
  23298. */
  23299. var createNamespacedHelpers = function (namespace) { return ({
  23300. mapState: mapState.bind(null, namespace),
  23301. mapGetters: mapGetters.bind(null, namespace),
  23302. mapMutations: mapMutations.bind(null, namespace),
  23303. mapActions: mapActions.bind(null, namespace)
  23304. }); };
  23305. /**
  23306. * Normalize the map
  23307. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  23308. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  23309. * @param {Array|Object} map
  23310. * @return {Object}
  23311. */
  23312. function normalizeMap (map) {
  23313. if (!isValidMap(map)) {
  23314. return []
  23315. }
  23316. return Array.isArray(map)
  23317. ? map.map(function (key) { return ({ key: key, val: key }); })
  23318. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  23319. }
  23320. /**
  23321. * Validate whether given map is valid or not
  23322. * @param {*} map
  23323. * @return {Boolean}
  23324. */
  23325. function isValidMap (map) {
  23326. return Array.isArray(map) || isObject(map)
  23327. }
  23328. /**
  23329. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  23330. * @param {Function} fn
  23331. * @return {Function}
  23332. */
  23333. function normalizeNamespace (fn) {
  23334. return function (namespace, map) {
  23335. if (typeof namespace !== 'string') {
  23336. map = namespace;
  23337. namespace = '';
  23338. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  23339. namespace += '/';
  23340. }
  23341. return fn(namespace, map)
  23342. }
  23343. }
  23344. /**
  23345. * Search a special module from store by namespace. if module not exist, print error message.
  23346. * @param {Object} store
  23347. * @param {String} helper
  23348. * @param {String} namespace
  23349. * @return {Object}
  23350. */
  23351. function getModuleByNamespace (store, helper, namespace) {
  23352. var module = store._modulesNamespaceMap[namespace];
  23353. if (( true) && !module) {
  23354. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  23355. }
  23356. return module
  23357. }
  23358. var index = {
  23359. Store: Store,
  23360. install: install,
  23361. version: '3.4.0',
  23362. mapState: mapState,
  23363. mapMutations: mapMutations,
  23364. mapGetters: mapGetters,
  23365. mapActions: mapActions,
  23366. createNamespacedHelpers: createNamespacedHelpers
  23367. };
  23368. /* harmony default export */ __webpack_exports__["default"] = (index);
  23369. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 3)))
  23370. /***/ }),
  23371. /***/ 614:
  23372. /*!***************************************************************************************!*\
  23373. !*** /Users/wanglili/Documents/liuniu/Mazui/components/w-picker/areadata/areadata.js ***!
  23374. \***************************************************************************************/
  23375. /*! no static exports found */
  23376. /***/ (function(module, exports, __webpack_require__) {
  23377. "use strict";
  23378. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var cityData = [{
  23379. value: '110000',
  23380. label: '北京市',
  23381. children: [{
  23382. value: "110100",
  23383. label: "北京市",
  23384. children: [{
  23385. value: "110101",
  23386. label: "东城区" },
  23387. {
  23388. value: "110102",
  23389. label: "西城区" },
  23390. {
  23391. value: "110105",
  23392. label: "朝阳区" },
  23393. {
  23394. value: "110106",
  23395. label: "丰台区" },
  23396. {
  23397. value: "110107",
  23398. label: "石景山区" },
  23399. {
  23400. value: "110108",
  23401. label: "海淀区" },
  23402. {
  23403. value: "110109",
  23404. label: "门头沟区" },
  23405. {
  23406. value: "110111",
  23407. label: "房山区" },
  23408. {
  23409. value: "110112",
  23410. label: "通州区" },
  23411. {
  23412. value: "110113",
  23413. label: "顺义区" },
  23414. {
  23415. value: "110114",
  23416. label: "昌平区" },
  23417. {
  23418. value: "110115",
  23419. label: "大兴区" },
  23420. {
  23421. value: "110116",
  23422. label: "怀柔区" },
  23423. {
  23424. value: "110117",
  23425. label: "平谷区" },
  23426. {
  23427. value: "110118",
  23428. label: "密云区" },
  23429. {
  23430. value: "110119",
  23431. label: "延庆区" }] }] },
  23432. {
  23433. value: '120000',
  23434. label: '天津市',
  23435. children: [{
  23436. value: "120100",
  23437. label: "天津市",
  23438. children: [{
  23439. value: "120101",
  23440. label: "和平区" },
  23441. {
  23442. value: "120102",
  23443. label: "河东区" },
  23444. {
  23445. value: "120103",
  23446. label: "河西区" },
  23447. {
  23448. value: "120104",
  23449. label: "南开区" },
  23450. {
  23451. value: "120105",
  23452. label: "河北区" },
  23453. {
  23454. value: "120106",
  23455. label: "红桥区" },
  23456. {
  23457. value: "120110",
  23458. label: "东丽区" },
  23459. {
  23460. value: "120111",
  23461. label: "西青区" },
  23462. {
  23463. value: "120112",
  23464. label: "津南区" },
  23465. {
  23466. value: "120113",
  23467. label: "北辰区" },
  23468. {
  23469. value: "120114",
  23470. label: "武清区" },
  23471. {
  23472. value: "120115",
  23473. label: "宝坻区" },
  23474. {
  23475. value: "120116",
  23476. label: "滨海新区" },
  23477. {
  23478. value: "120117",
  23479. label: "宁河区" },
  23480. {
  23481. value: "120118",
  23482. label: "静海区" },
  23483. {
  23484. value: "120119",
  23485. label: "蓟州区" }] }] },
  23486. {
  23487. value: '130000',
  23488. label: '河北省',
  23489. children: [{
  23490. value: "130100",
  23491. label: "石家庄市",
  23492. children: [{
  23493. value: "130102",
  23494. label: "长安区" },
  23495. {
  23496. value: "130104",
  23497. label: "桥西区" },
  23498. {
  23499. value: "130105",
  23500. label: "新华区" },
  23501. {
  23502. value: "130107",
  23503. label: "井陉矿区" },
  23504. {
  23505. value: "130108",
  23506. label: "裕华区" },
  23507. {
  23508. value: "130109",
  23509. label: "藁城区" },
  23510. {
  23511. value: "130110",
  23512. label: "鹿泉区" },
  23513. {
  23514. value: "130111",
  23515. label: "栾城区" },
  23516. {
  23517. value: "130121",
  23518. label: "井陉县" },
  23519. {
  23520. value: "130123",
  23521. label: "正定县" },
  23522. {
  23523. value: "130125",
  23524. label: "行唐县" },
  23525. {
  23526. value: "130126",
  23527. label: "灵寿县" },
  23528. {
  23529. value: "130127",
  23530. label: "高邑县" },
  23531. {
  23532. value: "130128",
  23533. label: "深泽县" },
  23534. {
  23535. value: "130129",
  23536. label: "赞皇县" },
  23537. {
  23538. value: "130130",
  23539. label: "无极县" },
  23540. {
  23541. value: "130131",
  23542. label: "平山县" },
  23543. {
  23544. value: "130132",
  23545. label: "元氏县" },
  23546. {
  23547. value: "130133",
  23548. label: "赵县" },
  23549. {
  23550. value: "130181",
  23551. label: "辛集市" },
  23552. {
  23553. value: "130183",
  23554. label: "晋州市" },
  23555. {
  23556. value: "130184",
  23557. label: "新乐市" },
  23558. {
  23559. value: "130172",
  23560. label: "石家庄循环化工园区" },
  23561. {
  23562. value: "130171",
  23563. label: "石家庄高新技术产业开发区" }] },
  23564. {
  23565. value: "130200",
  23566. label: "唐山市",
  23567. children: [{
  23568. value: "130202",
  23569. label: "路南区" },
  23570. {
  23571. value: "130203",
  23572. label: "路北区" },
  23573. {
  23574. value: "130204",
  23575. label: "古冶区" },
  23576. {
  23577. value: "130205",
  23578. label: "开平区" },
  23579. {
  23580. value: "130207",
  23581. label: "丰南区" },
  23582. {
  23583. value: "130208",
  23584. label: "丰润区" },
  23585. {
  23586. value: "130209",
  23587. label: "曹妃甸区" },
  23588. {
  23589. value: "130223",
  23590. label: "滦县" },
  23591. {
  23592. value: "130224",
  23593. label: "滦南县" },
  23594. {
  23595. value: "130225",
  23596. label: "乐亭县" },
  23597. {
  23598. value: "130227",
  23599. label: "迁西县" },
  23600. {
  23601. value: "130229",
  23602. label: "玉田县" },
  23603. {
  23604. value: "130281",
  23605. label: "遵化市" },
  23606. {
  23607. value: "130283",
  23608. label: "迁安市" },
  23609. {
  23610. value: "130271",
  23611. label: "唐山市芦台经济技术开发区" },
  23612. {
  23613. value: "130272",
  23614. label: "唐山市汉沽管理区" },
  23615. {
  23616. value: "130273",
  23617. label: "唐山高新技术产业开发区" },
  23618. {
  23619. value: "130274",
  23620. label: "河北唐山海港经济开发区" }] },
  23621. {
  23622. value: "130300",
  23623. label: "秦皇岛市",
  23624. children: [{
  23625. value: "130302",
  23626. label: "海港区" },
  23627. {
  23628. value: "130303",
  23629. label: "山海关区" },
  23630. {
  23631. value: "130304",
  23632. label: "北戴河区" },
  23633. {
  23634. value: "130321",
  23635. label: "青龙满族自治县" },
  23636. {
  23637. value: "130322",
  23638. label: "昌黎县" },
  23639. {
  23640. value: "130306",
  23641. label: "抚宁区" },
  23642. {
  23643. value: "130324",
  23644. label: "卢龙县" },
  23645. {
  23646. value: "130371",
  23647. label: "秦皇岛市经济技术开发区" },
  23648. {
  23649. value: "130372",
  23650. label: "北戴河新区" }] },
  23651. {
  23652. value: "130400",
  23653. label: "邯郸市",
  23654. children: [{
  23655. value: "130402",
  23656. label: "邯山区" },
  23657. {
  23658. value: "130403",
  23659. label: "丛台区" },
  23660. {
  23661. value: "130404",
  23662. label: "复兴区" },
  23663. {
  23664. value: "130406",
  23665. label: "峰峰矿区" },
  23666. {
  23667. value: "130421",
  23668. label: "邯郸县" },
  23669. {
  23670. value: "130423",
  23671. label: "临漳县" },
  23672. {
  23673. value: "130424",
  23674. label: "成安县" },
  23675. {
  23676. value: "130425",
  23677. label: "大名县" },
  23678. {
  23679. value: "130426",
  23680. label: "涉县" },
  23681. {
  23682. value: "130427",
  23683. label: "磁县" },
  23684. {
  23685. value: "130407",
  23686. label: "肥乡区" },
  23687. {
  23688. value: "130408",
  23689. label: "永年区" },
  23690. {
  23691. value: "130430",
  23692. label: "邱县" },
  23693. {
  23694. value: "130431",
  23695. label: "鸡泽县" },
  23696. {
  23697. value: "130432",
  23698. label: "广平县" },
  23699. {
  23700. value: "130433",
  23701. label: "馆陶县" },
  23702. {
  23703. value: "130434",
  23704. label: "魏县" },
  23705. {
  23706. value: "130435",
  23707. label: "曲周县" },
  23708. {
  23709. value: "130481",
  23710. label: "武安市" },
  23711. {
  23712. value: "130471",
  23713. label: "邯郸经济技术开发区" },
  23714. {
  23715. value: "130473",
  23716. label: "邯郸冀南新区" }] },
  23717. {
  23718. value: "130500",
  23719. label: "邢台市",
  23720. children: [{
  23721. value: "130502",
  23722. label: "桥东区" },
  23723. {
  23724. value: "130503",
  23725. label: "桥西区" },
  23726. {
  23727. value: "130521",
  23728. label: "邢台县" },
  23729. {
  23730. value: "130522",
  23731. label: "临城县" },
  23732. {
  23733. value: "130523",
  23734. label: "内丘县" },
  23735. {
  23736. value: "130524",
  23737. label: "柏乡县" },
  23738. {
  23739. value: "130525",
  23740. label: "隆尧县" },
  23741. {
  23742. value: "130526",
  23743. label: "任县" },
  23744. {
  23745. value: "130527",
  23746. label: "南和县" },
  23747. {
  23748. value: "130528",
  23749. label: "宁晋县" },
  23750. {
  23751. value: "130529",
  23752. label: "巨鹿县" },
  23753. {
  23754. value: "130530",
  23755. label: "新河县" },
  23756. {
  23757. value: "130531",
  23758. label: "广宗县" },
  23759. {
  23760. value: "130532",
  23761. label: "平乡县" },
  23762. {
  23763. value: "130533",
  23764. label: "威县" },
  23765. {
  23766. value: "130534",
  23767. label: "清河县" },
  23768. {
  23769. value: "130535",
  23770. label: "临西县" },
  23771. {
  23772. value: "130581",
  23773. label: "南宫市" },
  23774. {
  23775. value: "130582",
  23776. label: "沙河市" },
  23777. {
  23778. value: "130571",
  23779. label: "河北邢台经济开发区" }] },
  23780. {
  23781. value: "130600",
  23782. label: "保定市",
  23783. children: [{
  23784. value: "130602",
  23785. label: "竞秀区" },
  23786. {
  23787. value: "130606",
  23788. label: "莲池区" },
  23789. {
  23790. value: "130607",
  23791. label: "满城区" },
  23792. {
  23793. value: "130608",
  23794. label: "清苑区" },
  23795. {
  23796. value: "130623",
  23797. label: "涞水县" },
  23798. {
  23799. value: "130624",
  23800. label: "阜平县" },
  23801. {
  23802. value: "130609",
  23803. label: "徐水区" },
  23804. {
  23805. value: "130626",
  23806. label: "定兴县" },
  23807. {
  23808. value: "130627",
  23809. label: "唐县" },
  23810. {
  23811. value: "130628",
  23812. label: "高阳县" },
  23813. {
  23814. value: "130629",
  23815. label: "容城县" },
  23816. {
  23817. value: "130630",
  23818. label: "涞源县" },
  23819. {
  23820. value: "130631",
  23821. label: "望都县" },
  23822. {
  23823. value: "130632",
  23824. label: "安新县" },
  23825. {
  23826. value: "130633",
  23827. label: "易县" },
  23828. {
  23829. value: "130634",
  23830. label: "曲阳县" },
  23831. {
  23832. value: "130635",
  23833. label: "蠡县" },
  23834. {
  23835. value: "130636",
  23836. label: "顺平县" },
  23837. {
  23838. value: "130637",
  23839. label: "博野县" },
  23840. {
  23841. value: "130638",
  23842. label: "雄县" },
  23843. {
  23844. value: "130681",
  23845. label: "涿州市" },
  23846. {
  23847. value: "130682",
  23848. label: "定州市" },
  23849. {
  23850. value: "130683",
  23851. label: "安国市" },
  23852. {
  23853. value: "130684",
  23854. label: "高碑店市" },
  23855. {
  23856. value: "130671",
  23857. label: "保定高新技术产业开发区" },
  23858. {
  23859. value: "130672",
  23860. label: "保定白沟新城" }] },
  23861. {
  23862. value: "130700",
  23863. label: "张家口市",
  23864. children: [{
  23865. value: "130702",
  23866. label: "桥东区" },
  23867. {
  23868. value: "130703",
  23869. label: "桥西区" },
  23870. {
  23871. value: "130705",
  23872. label: "宣化区" },
  23873. {
  23874. value: "130706",
  23875. label: "下花园区" },
  23876. {
  23877. value: "130708",
  23878. label: "万全区" },
  23879. {
  23880. value: "130709",
  23881. label: "崇礼区" },
  23882. {
  23883. value: "130722",
  23884. label: "张北县" },
  23885. {
  23886. value: "130723",
  23887. label: "康保县" },
  23888. {
  23889. value: "130724",
  23890. label: "沽源县" },
  23891. {
  23892. value: "130725",
  23893. label: "尚义县" },
  23894. {
  23895. value: "130726",
  23896. label: "蔚县" },
  23897. {
  23898. value: "130727",
  23899. label: "阳原县" },
  23900. {
  23901. value: "130728",
  23902. label: "怀安县" },
  23903. {
  23904. value: "130730",
  23905. label: "怀来县" },
  23906. {
  23907. value: "130731",
  23908. label: "涿鹿县" },
  23909. {
  23910. value: "130732",
  23911. label: "赤城县" },
  23912. {
  23913. value: "130733",
  23914. label: "崇礼县" },
  23915. {
  23916. value: "130771",
  23917. label: "张家口市高新技术产业开发区" },
  23918. {
  23919. value: "130772",
  23920. label: "张家口市察北管理区" },
  23921. {
  23922. value: "130773",
  23923. label: "张家口市塞北管理区" }] },
  23924. {
  23925. value: "130800",
  23926. label: "承德市",
  23927. children: [{
  23928. value: "130802",
  23929. label: "双桥区" },
  23930. {
  23931. value: "130803",
  23932. label: "双滦区" },
  23933. {
  23934. value: "130804",
  23935. label: "鹰手营子矿区" },
  23936. {
  23937. value: "130821",
  23938. label: "承德县" },
  23939. {
  23940. value: "130822",
  23941. label: "兴隆县" },
  23942. {
  23943. value: "130881",
  23944. label: "平泉市" },
  23945. {
  23946. value: "130824",
  23947. label: "滦平县" },
  23948. {
  23949. value: "130825",
  23950. label: "隆化县" },
  23951. {
  23952. value: "130826",
  23953. label: "丰宁满族自治县" },
  23954. {
  23955. value: "130827",
  23956. label: "宽城满族自治县" },
  23957. {
  23958. value: "130828",
  23959. label: "围场满族蒙古族自治县" },
  23960. {
  23961. value: "130871",
  23962. label: "承德高新技术产业开发区" }] },
  23963. {
  23964. value: "130900",
  23965. label: "沧州市",
  23966. children: [{
  23967. value: "130902",
  23968. label: "新华区" },
  23969. {
  23970. value: "130903",
  23971. label: "运河区" },
  23972. {
  23973. value: "130921",
  23974. label: "沧县" },
  23975. {
  23976. value: "130922",
  23977. label: "青县" },
  23978. {
  23979. value: "130923",
  23980. label: "东光县" },
  23981. {
  23982. value: "130924",
  23983. label: "海兴县" },
  23984. {
  23985. value: "130925",
  23986. label: "盐山县" },
  23987. {
  23988. value: "130926",
  23989. label: "肃宁县" },
  23990. {
  23991. value: "130927",
  23992. label: "南皮县" },
  23993. {
  23994. value: "130928",
  23995. label: "吴桥县" },
  23996. {
  23997. value: "130929",
  23998. label: "献县" },
  23999. {
  24000. value: "130930",
  24001. label: "孟村回族自治县" },
  24002. {
  24003. value: "130981",
  24004. label: "泊头市" },
  24005. {
  24006. value: "130982",
  24007. label: "任丘市" },
  24008. {
  24009. value: "130983",
  24010. label: "黄骅市" },
  24011. {
  24012. value: "130984",
  24013. label: "河间市" },
  24014. {
  24015. value: "130971",
  24016. label: "河北沧州经济开发区" },
  24017. {
  24018. value: "130972",
  24019. label: "沧州高新技术产业开发区" },
  24020. {
  24021. value: "130973",
  24022. label: "沧州渤海新区" }] },
  24023. {
  24024. value: "131000",
  24025. label: "廊坊市",
  24026. children: [{
  24027. value: "131002",
  24028. label: "安次区" },
  24029. {
  24030. value: "131003",
  24031. label: "广阳区" },
  24032. {
  24033. value: "131022",
  24034. label: "固安县" },
  24035. {
  24036. value: "131023",
  24037. label: "永清县" },
  24038. {
  24039. value: "131024",
  24040. label: "香河县" },
  24041. {
  24042. value: "131025",
  24043. label: "大城县" },
  24044. {
  24045. value: "131026",
  24046. label: "文安县" },
  24047. {
  24048. value: "131028",
  24049. label: "大厂回族自治县" },
  24050. {
  24051. value: "131071",
  24052. label: "廊坊经济技术开发区" },
  24053. {
  24054. value: "131081",
  24055. label: "霸州市" },
  24056. {
  24057. value: "131082",
  24058. label: "三河市" }] },
  24059. {
  24060. value: "131100",
  24061. label: "衡水市",
  24062. children: [{
  24063. value: "131102",
  24064. label: "桃城区" },
  24065. {
  24066. value: "131121",
  24067. label: "枣强县" },
  24068. {
  24069. value: "131122",
  24070. label: "武邑县" },
  24071. {
  24072. value: "131123",
  24073. label: "武强县" },
  24074. {
  24075. value: "131124",
  24076. label: "饶阳县" },
  24077. {
  24078. value: "131125",
  24079. label: "安平县" },
  24080. {
  24081. value: "131126",
  24082. label: "故城县" },
  24083. {
  24084. value: "131127",
  24085. label: "景县" },
  24086. {
  24087. value: "131128",
  24088. label: "阜城县" },
  24089. {
  24090. value: "131103",
  24091. label: "冀州区" },
  24092. {
  24093. value: "131182",
  24094. label: "深州市" },
  24095. {
  24096. value: "131172",
  24097. label: "衡水滨湖新区" },
  24098. {
  24099. value: "131171",
  24100. label: "河北衡水经济开发区" }] }] },
  24101. {
  24102. value: '140000',
  24103. label: '山西省',
  24104. children: [{
  24105. value: "140100",
  24106. label: "太原市",
  24107. children: [{
  24108. value: "140105",
  24109. label: "小店区" },
  24110. {
  24111. value: "140106",
  24112. label: "迎泽区" },
  24113. {
  24114. value: "140107",
  24115. label: "杏花岭区" },
  24116. {
  24117. value: "140108",
  24118. label: "尖草坪区" },
  24119. {
  24120. value: "140109",
  24121. label: "万柏林区" },
  24122. {
  24123. value: "140110",
  24124. label: "晋源区" },
  24125. {
  24126. value: "140121",
  24127. label: "清徐县" },
  24128. {
  24129. value: "140122",
  24130. label: "阳曲县" },
  24131. {
  24132. value: "140123",
  24133. label: "娄烦县" },
  24134. {
  24135. value: "140181",
  24136. label: "古交市" },
  24137. {
  24138. value: "140171",
  24139. label: "山西转型综合改革示范区" }] },
  24140. {
  24141. value: "140200",
  24142. label: "大同市",
  24143. children: [{
  24144. value: "140202",
  24145. label: "城区" },
  24146. {
  24147. value: "140203",
  24148. label: "矿区" },
  24149. {
  24150. value: "140211",
  24151. label: "南郊区" },
  24152. {
  24153. value: "140212",
  24154. label: "新荣区" },
  24155. {
  24156. value: "140221",
  24157. label: "阳高县" },
  24158. {
  24159. value: "140222",
  24160. label: "天镇县" },
  24161. {
  24162. value: "140223",
  24163. label: "广灵县" },
  24164. {
  24165. value: "140224",
  24166. label: "灵丘县" },
  24167. {
  24168. value: "140225",
  24169. label: "浑源县" },
  24170. {
  24171. value: "140226",
  24172. label: "左云县" },
  24173. {
  24174. value: "140227",
  24175. label: "大同县" },
  24176. {
  24177. value: "140271",
  24178. label: "山西大同经济开发区" }] },
  24179. {
  24180. value: "140300",
  24181. label: "阳泉市",
  24182. children: [{
  24183. value: "140302",
  24184. label: "城区" },
  24185. {
  24186. value: "140303",
  24187. label: "矿区" },
  24188. {
  24189. value: "140311",
  24190. label: "郊区" },
  24191. {
  24192. value: "140321",
  24193. label: "平定县" },
  24194. {
  24195. value: "140322",
  24196. label: "盂县" },
  24197. {
  24198. value: "140371",
  24199. label: "山西阳泉经济开发区" }] },
  24200. {
  24201. value: "140400",
  24202. label: "长治市",
  24203. children: [{
  24204. value: "140421",
  24205. label: "长治县" },
  24206. {
  24207. value: "140423",
  24208. label: "襄垣县" },
  24209. {
  24210. value: "140424",
  24211. label: "屯留县" },
  24212. {
  24213. value: "140425",
  24214. label: "平顺县" },
  24215. {
  24216. value: "140426",
  24217. label: "黎城县" },
  24218. {
  24219. value: "140427",
  24220. label: "壶关县" },
  24221. {
  24222. value: "140428",
  24223. label: "长子县" },
  24224. {
  24225. value: "140429",
  24226. label: "武乡县" },
  24227. {
  24228. value: "140430",
  24229. label: "沁县" },
  24230. {
  24231. value: "140431",
  24232. label: "沁源县" },
  24233. {
  24234. value: "140481",
  24235. label: "潞城市" },
  24236. {
  24237. value: "140402",
  24238. label: "城区" },
  24239. {
  24240. value: "140411",
  24241. label: "郊区" },
  24242. {
  24243. value: "140471",
  24244. label: "山西长治高新技术产业园区" }] },
  24245. {
  24246. value: "140500",
  24247. label: "晋城市",
  24248. children: [{
  24249. value: "140502",
  24250. label: "城区" },
  24251. {
  24252. value: "140521",
  24253. label: "沁水县" },
  24254. {
  24255. value: "140522",
  24256. label: "阳城县" },
  24257. {
  24258. value: "140524",
  24259. label: "陵川县" },
  24260. {
  24261. value: "140525",
  24262. label: "泽州县" },
  24263. {
  24264. value: "140581",
  24265. label: "高平市" }] },
  24266. {
  24267. value: "140600",
  24268. label: "朔州市",
  24269. children: [{
  24270. value: "140602",
  24271. label: "朔城区" },
  24272. {
  24273. value: "140603",
  24274. label: "平鲁区" },
  24275. {
  24276. value: "140621",
  24277. label: "山阴县" },
  24278. {
  24279. value: "140622",
  24280. label: "应县" },
  24281. {
  24282. value: "140623",
  24283. label: "右玉县" },
  24284. {
  24285. value: "140624",
  24286. label: "怀仁县" },
  24287. {
  24288. value: "140671",
  24289. label: "山西朔州经济开发区" }] },
  24290. {
  24291. value: "140700",
  24292. label: "晋中市",
  24293. children: [{
  24294. value: "140702",
  24295. label: "榆次区" },
  24296. {
  24297. value: "140721",
  24298. label: "榆社县" },
  24299. {
  24300. value: "140722",
  24301. label: "左权县" },
  24302. {
  24303. value: "140723",
  24304. label: "和顺县" },
  24305. {
  24306. value: "140724",
  24307. label: "昔阳县" },
  24308. {
  24309. value: "140725",
  24310. label: "寿阳县" },
  24311. {
  24312. value: "140726",
  24313. label: "太谷县" },
  24314. {
  24315. value: "140727",
  24316. label: "祁县" },
  24317. {
  24318. value: "140728",
  24319. label: "平遥县" },
  24320. {
  24321. value: "140729",
  24322. label: "灵石县" },
  24323. {
  24324. value: "140781",
  24325. label: "介休市" }] },
  24326. {
  24327. value: "140800",
  24328. label: "运城市",
  24329. children: [{
  24330. value: "140802",
  24331. label: "盐湖区" },
  24332. {
  24333. value: "140821",
  24334. label: "临猗县" },
  24335. {
  24336. value: "140822",
  24337. label: "万荣县" },
  24338. {
  24339. value: "140823",
  24340. label: "闻喜县" },
  24341. {
  24342. value: "140824",
  24343. label: "稷山县" },
  24344. {
  24345. value: "140825",
  24346. label: "新绛县" },
  24347. {
  24348. value: "140826",
  24349. label: "绛县" },
  24350. {
  24351. value: "140827",
  24352. label: "垣曲县" },
  24353. {
  24354. value: "140828",
  24355. label: "夏县" },
  24356. {
  24357. value: "140829",
  24358. label: "平陆县" },
  24359. {
  24360. value: "140830",
  24361. label: "芮城县" },
  24362. {
  24363. value: "140881",
  24364. label: "永济市" },
  24365. {
  24366. value: "140882",
  24367. label: "河津市" }] },
  24368. {
  24369. value: "140900",
  24370. label: "忻州市",
  24371. children: [{
  24372. value: "140902",
  24373. label: "忻府区" },
  24374. {
  24375. value: "140921",
  24376. label: "定襄县" },
  24377. {
  24378. value: "140922",
  24379. label: "五台县" },
  24380. {
  24381. value: "140923",
  24382. label: "代县" },
  24383. {
  24384. value: "140924",
  24385. label: "繁峙县" },
  24386. {
  24387. value: "140925",
  24388. label: "宁武县" },
  24389. {
  24390. value: "140926",
  24391. label: "静乐县" },
  24392. {
  24393. value: "140927",
  24394. label: "神池县" },
  24395. {
  24396. value: "140928",
  24397. label: "五寨县" },
  24398. {
  24399. value: "140929",
  24400. label: "岢岚县" },
  24401. {
  24402. value: "140930",
  24403. label: "河曲县" },
  24404. {
  24405. value: "140931",
  24406. label: "保德县" },
  24407. {
  24408. value: "140932",
  24409. label: "偏关县" },
  24410. {
  24411. value: "140981",
  24412. label: "原平市" },
  24413. {
  24414. value: "140971",
  24415. label: "五台山风景名胜区" }] },
  24416. {
  24417. value: "141000",
  24418. label: "临汾市",
  24419. children: [{
  24420. value: "141002",
  24421. label: "尧都区" },
  24422. {
  24423. value: "141021",
  24424. label: "曲沃县" },
  24425. {
  24426. value: "141022",
  24427. label: "翼城县" },
  24428. {
  24429. value: "141023",
  24430. label: "襄汾县" },
  24431. {
  24432. value: "141024",
  24433. label: "洪洞县" },
  24434. {
  24435. value: "141025",
  24436. label: "古县" },
  24437. {
  24438. value: "141026",
  24439. label: "安泽县" },
  24440. {
  24441. value: "141027",
  24442. label: "浮山县" },
  24443. {
  24444. value: "141028",
  24445. label: "吉县" },
  24446. {
  24447. value: "141029",
  24448. label: "乡宁县" },
  24449. {
  24450. value: "141030",
  24451. label: "大宁县" },
  24452. {
  24453. value: "141031",
  24454. label: "隰县" },
  24455. {
  24456. value: "141032",
  24457. label: "永和县" },
  24458. {
  24459. value: "141033",
  24460. label: "蒲县" },
  24461. {
  24462. value: "141034",
  24463. label: "汾西县" },
  24464. {
  24465. value: "141081",
  24466. label: "侯马市" },
  24467. {
  24468. value: "141082",
  24469. label: "霍州市" }] },
  24470. {
  24471. value: "141100",
  24472. label: "吕梁市",
  24473. children: [{
  24474. value: "141102",
  24475. label: "离石区" },
  24476. {
  24477. value: "141121",
  24478. label: "文水县" },
  24479. {
  24480. value: "141122",
  24481. label: "交城县" },
  24482. {
  24483. value: "141123",
  24484. label: "兴县" },
  24485. {
  24486. value: "141124",
  24487. label: "临县" },
  24488. {
  24489. value: "141125",
  24490. label: "柳林县" },
  24491. {
  24492. value: "141126",
  24493. label: "石楼县" },
  24494. {
  24495. value: "141127",
  24496. label: "岚县" },
  24497. {
  24498. value: "141128",
  24499. label: "方山县" },
  24500. {
  24501. value: "141129",
  24502. label: "中阳县" },
  24503. {
  24504. value: "141130",
  24505. label: "交口县" },
  24506. {
  24507. value: "141181",
  24508. label: "孝义市" },
  24509. {
  24510. value: "141182",
  24511. label: "汾阳市" }] }] },
  24512. {
  24513. value: '150000',
  24514. label: '内蒙古',
  24515. children: [{
  24516. value: "150100",
  24517. label: "呼和浩特市",
  24518. children: [{
  24519. value: "150102",
  24520. label: "新城区" },
  24521. {
  24522. value: "150103",
  24523. label: "回民区" },
  24524. {
  24525. value: "150104",
  24526. label: "玉泉区" },
  24527. {
  24528. value: "150105",
  24529. label: "赛罕区" },
  24530. {
  24531. value: "150121",
  24532. label: "土默特左旗" },
  24533. {
  24534. value: "150122",
  24535. label: "托克托县" },
  24536. {
  24537. value: "150123",
  24538. label: "和林格尔县" },
  24539. {
  24540. value: "150124",
  24541. label: "清水河县" },
  24542. {
  24543. value: "150125",
  24544. label: "武川县" },
  24545. {
  24546. value: "150171",
  24547. label: "呼和浩特金海工业园区" },
  24548. {
  24549. value: "150172",
  24550. label: "呼和浩特经济技术开发区" }] },
  24551. {
  24552. value: "150200",
  24553. label: "包头市",
  24554. children: [{
  24555. value: "150202",
  24556. label: "东河区" },
  24557. {
  24558. value: "150203",
  24559. label: "昆都仑区" },
  24560. {
  24561. value: "150204",
  24562. label: "青山区" },
  24563. {
  24564. value: "150205",
  24565. label: "石拐区" },
  24566. {
  24567. value: "150206",
  24568. label: "白云矿区" },
  24569. {
  24570. value: "150207",
  24571. label: "九原区" },
  24572. {
  24573. value: "150221",
  24574. label: "土默特右旗" },
  24575. {
  24576. value: "150222",
  24577. label: "固阳县" },
  24578. {
  24579. value: "150223",
  24580. label: "达尔罕茂明安联合旗" },
  24581. {
  24582. value: "150271",
  24583. label: "包头稀土高新技术产业开发区" }] },
  24584. {
  24585. value: "150300",
  24586. label: "乌海市",
  24587. children: [{
  24588. value: "150302",
  24589. label: "海勃湾区" },
  24590. {
  24591. value: "150303",
  24592. label: "海南区" },
  24593. {
  24594. value: "150304",
  24595. label: "乌达区" }] },
  24596. {
  24597. value: "150400",
  24598. label: "赤峰市",
  24599. children: [{
  24600. value: "150402",
  24601. label: "红山区" },
  24602. {
  24603. value: "150403",
  24604. label: "元宝山区" },
  24605. {
  24606. value: "150404",
  24607. label: "松山区" },
  24608. {
  24609. value: "150421",
  24610. label: "阿鲁科尔沁旗" },
  24611. {
  24612. value: "150422",
  24613. label: "巴林左旗" },
  24614. {
  24615. value: "150423",
  24616. label: "巴林右旗" },
  24617. {
  24618. value: "150424",
  24619. label: "林西县" },
  24620. {
  24621. value: "150425",
  24622. label: "克什克腾旗" },
  24623. {
  24624. value: "150426",
  24625. label: "翁牛特旗" },
  24626. {
  24627. value: "150428",
  24628. label: "喀喇沁旗" },
  24629. {
  24630. value: "150429",
  24631. label: "宁城县" },
  24632. {
  24633. value: "150430",
  24634. label: "敖汉旗" }] },
  24635. {
  24636. value: "150500",
  24637. label: "通辽市",
  24638. children: [{
  24639. value: "150502",
  24640. label: "科尔沁区" },
  24641. {
  24642. value: "150521",
  24643. label: "科尔沁左翼中旗" },
  24644. {
  24645. value: "150522",
  24646. label: "科尔沁左翼后旗" },
  24647. {
  24648. value: "150523",
  24649. label: "开鲁县" },
  24650. {
  24651. value: "150524",
  24652. label: "库伦旗" },
  24653. {
  24654. value: "150525",
  24655. label: "奈曼旗" },
  24656. {
  24657. value: "150526",
  24658. label: "扎鲁特旗" },
  24659. {
  24660. value: "150581",
  24661. label: "霍林郭勒市" },
  24662. {
  24663. value: "150571",
  24664. label: "通辽经济技术开发区" }] },
  24665. {
  24666. value: "150600",
  24667. label: "鄂尔多斯市",
  24668. children: [{
  24669. value: "150602",
  24670. label: "东胜区" },
  24671. {
  24672. value: "150621",
  24673. label: "达拉特旗" },
  24674. {
  24675. value: "150622",
  24676. label: "准格尔旗" },
  24677. {
  24678. value: "150623",
  24679. label: "鄂托克前旗" },
  24680. {
  24681. value: "150624",
  24682. label: "鄂托克旗" },
  24683. {
  24684. value: "150625",
  24685. label: "杭锦旗" },
  24686. {
  24687. value: "150626",
  24688. label: "乌审旗" },
  24689. {
  24690. value: "150627",
  24691. label: "伊金霍洛旗" },
  24692. {
  24693. value: "150603",
  24694. label: "康巴什区" }] },
  24695. {
  24696. value: "150700",
  24697. label: "呼伦贝尔市",
  24698. children: [{
  24699. value: "150702",
  24700. label: "海拉尔区" },
  24701. {
  24702. value: "150721",
  24703. label: "阿荣旗" },
  24704. {
  24705. value: "150722",
  24706. label: "莫力达瓦达斡尔族自治旗" },
  24707. {
  24708. value: "150723",
  24709. label: "鄂伦春自治旗" },
  24710. {
  24711. value: "150724",
  24712. label: "鄂温克族自治旗" },
  24713. {
  24714. value: "150725",
  24715. label: "陈巴尔虎旗" },
  24716. {
  24717. value: "150726",
  24718. label: "新巴尔虎左旗" },
  24719. {
  24720. value: "150727",
  24721. label: "新巴尔虎右旗" },
  24722. {
  24723. value: "150781",
  24724. label: "满洲里市" },
  24725. {
  24726. value: "150782",
  24727. label: "牙克石市" },
  24728. {
  24729. value: "150783",
  24730. label: "扎兰屯市" },
  24731. {
  24732. value: "150784",
  24733. label: "额尔古纳市" },
  24734. {
  24735. value: "150785",
  24736. label: "根河市" },
  24737. {
  24738. value: "150703",
  24739. label: "扎赉诺尔区" }] },
  24740. {
  24741. value: "150800",
  24742. label: "巴彦淖尔市",
  24743. children: [{
  24744. value: "150802",
  24745. label: "临河区" },
  24746. {
  24747. value: "150821",
  24748. label: "五原县" },
  24749. {
  24750. value: "150822",
  24751. label: "磴口县" },
  24752. {
  24753. value: "150823",
  24754. label: "乌拉特前旗" },
  24755. {
  24756. value: "150824",
  24757. label: "乌拉特中旗" },
  24758. {
  24759. value: "150825",
  24760. label: "乌拉特后旗" },
  24761. {
  24762. value: "150826",
  24763. label: "杭锦后旗" }] },
  24764. {
  24765. value: "150900",
  24766. label: "乌兰察布市",
  24767. children: [{
  24768. value: "150902",
  24769. label: "集宁区" },
  24770. {
  24771. value: "150921",
  24772. label: "卓资县" },
  24773. {
  24774. value: "150922",
  24775. label: "化德县" },
  24776. {
  24777. value: "150923",
  24778. label: "商都县" },
  24779. {
  24780. value: "150924",
  24781. label: "兴和县" },
  24782. {
  24783. value: "150925",
  24784. label: "凉城县" },
  24785. {
  24786. value: "150926",
  24787. label: "察哈尔右翼前旗" },
  24788. {
  24789. value: "150927",
  24790. label: "察哈尔右翼中旗" },
  24791. {
  24792. value: "150928",
  24793. label: "察哈尔右翼后旗" },
  24794. {
  24795. value: "150929",
  24796. label: "四子王旗" },
  24797. {
  24798. value: "150981",
  24799. label: "丰镇市" }] },
  24800. {
  24801. value: "152200",
  24802. label: "兴安盟",
  24803. children: [{
  24804. value: "152201",
  24805. label: "乌兰浩特市" },
  24806. {
  24807. value: "152202",
  24808. label: "阿尔山市" },
  24809. {
  24810. value: "152221",
  24811. label: "科尔沁右翼前旗" },
  24812. {
  24813. value: "152222",
  24814. label: "科尔沁右翼中旗" },
  24815. {
  24816. value: "152223",
  24817. label: "扎赉特旗" },
  24818. {
  24819. value: "152224",
  24820. label: "突泉县" }] },
  24821. {
  24822. value: "152500",
  24823. label: "锡林郭勒盟",
  24824. children: [{
  24825. value: "152501",
  24826. label: "二连浩特市" },
  24827. {
  24828. value: "152502",
  24829. label: "锡林浩特市" },
  24830. {
  24831. value: "152522",
  24832. label: "阿巴嘎旗" },
  24833. {
  24834. value: "152523",
  24835. label: "苏尼特左旗" },
  24836. {
  24837. value: "152524",
  24838. label: "苏尼特右旗" },
  24839. {
  24840. value: "152525",
  24841. label: "东乌珠穆沁旗" },
  24842. {
  24843. value: "152526",
  24844. label: "西乌珠穆沁旗" },
  24845. {
  24846. value: "152527",
  24847. label: "太仆寺旗" },
  24848. {
  24849. value: "152528",
  24850. label: "镶黄旗" },
  24851. {
  24852. value: "152529",
  24853. label: "正镶白旗" },
  24854. {
  24855. value: "152530",
  24856. label: "正蓝旗" },
  24857. {
  24858. value: "152531",
  24859. label: "多伦县" },
  24860. {
  24861. value: "152571",
  24862. label: "乌拉盖管委会" }] },
  24863. {
  24864. value: "152900",
  24865. label: "阿拉善盟",
  24866. children: [{
  24867. value: "152921",
  24868. label: "阿拉善左旗" },
  24869. {
  24870. value: "152922",
  24871. label: "阿拉善右旗" },
  24872. {
  24873. value: "152923",
  24874. label: "额济纳旗" },
  24875. {
  24876. value: "152971",
  24877. label: "内蒙古阿拉善经济开发区" }] }] },
  24878. {
  24879. value: '210000',
  24880. label: '辽宁省',
  24881. children: [{
  24882. value: "210100",
  24883. label: "沈阳市",
  24884. children: [{
  24885. value: "210102",
  24886. label: "和平区" },
  24887. {
  24888. value: "210103",
  24889. label: "沈河区" },
  24890. {
  24891. value: "210104",
  24892. label: "大东区" },
  24893. {
  24894. value: "210105",
  24895. label: "皇姑区" },
  24896. {
  24897. value: "210106",
  24898. label: "铁西区" },
  24899. {
  24900. value: "210111",
  24901. label: "苏家屯区" },
  24902. {
  24903. value: "210112",
  24904. label: "东陵区" },
  24905. {
  24906. value: "210113",
  24907. label: "新城子区" },
  24908. {
  24909. value: "210114",
  24910. label: "于洪区" },
  24911. {
  24912. value: "210115",
  24913. label: "辽中区" },
  24914. {
  24915. value: "210123",
  24916. label: "康平县" },
  24917. {
  24918. value: "210124",
  24919. label: "法库县" },
  24920. {
  24921. value: "210181",
  24922. label: "新民市" },
  24923. {
  24924. value: "210112",
  24925. label: "浑南区" },
  24926. {
  24927. value: "210113",
  24928. label: "沈北新区" }] },
  24929. {
  24930. value: "210200",
  24931. label: "大连市",
  24932. children: [{
  24933. value: "210202",
  24934. label: "中山区" },
  24935. {
  24936. value: "210203",
  24937. label: "西岗区" },
  24938. {
  24939. value: "210204",
  24940. label: "沙河口区" },
  24941. {
  24942. value: "210211",
  24943. label: "甘井子区" },
  24944. {
  24945. value: "210212",
  24946. label: "旅顺口区" },
  24947. {
  24948. value: "210213",
  24949. label: "金州区" },
  24950. {
  24951. value: "210224",
  24952. label: "长海县" },
  24953. {
  24954. value: "210251",
  24955. label: "开发区" },
  24956. {
  24957. value: "210281",
  24958. label: "瓦房店市" },
  24959. {
  24960. value: "210214",
  24961. label: "普兰店区" },
  24962. {
  24963. value: "210283",
  24964. label: "庄河市" }] },
  24965. {
  24966. value: "210300",
  24967. label: "鞍山市",
  24968. children: [{
  24969. value: "210302",
  24970. label: "铁东区" },
  24971. {
  24972. value: "210303",
  24973. label: "铁西区" },
  24974. {
  24975. value: "210304",
  24976. label: "立山区" },
  24977. {
  24978. value: "210311",
  24979. label: "千山区" },
  24980. {
  24981. value: "210321",
  24982. label: "台安县" },
  24983. {
  24984. value: "210323",
  24985. label: "岫岩满族自治县" },
  24986. {
  24987. value: "210381",
  24988. label: "海城市" }] },
  24989. {
  24990. value: "210400",
  24991. label: "抚顺市",
  24992. children: [{
  24993. value: "210402",
  24994. label: "新抚区" },
  24995. {
  24996. value: "210403",
  24997. label: "东洲区" },
  24998. {
  24999. value: "210404",
  25000. label: "望花区" },
  25001. {
  25002. value: "210411",
  25003. label: "顺城区" },
  25004. {
  25005. value: "210421",
  25006. label: "抚顺县" },
  25007. {
  25008. value: "210422",
  25009. label: "新宾满族自治县" },
  25010. {
  25011. value: "210423",
  25012. label: "清原满族自治县" }] },
  25013. {
  25014. value: "210500",
  25015. label: "本溪市",
  25016. children: [{
  25017. value: "210502",
  25018. label: "平山区" },
  25019. {
  25020. value: "210503",
  25021. label: "溪湖区" },
  25022. {
  25023. value: "210504",
  25024. label: "明山区" },
  25025. {
  25026. value: "210505",
  25027. label: "南芬区" },
  25028. {
  25029. value: "210521",
  25030. label: "本溪满族自治县" },
  25031. {
  25032. value: "210522",
  25033. label: "桓仁满族自治县" }] },
  25034. {
  25035. value: "210600",
  25036. label: "丹东市",
  25037. children: [{
  25038. value: "210602",
  25039. label: "元宝区" },
  25040. {
  25041. value: "210603",
  25042. label: "振兴区" },
  25043. {
  25044. value: "210604",
  25045. label: "振安区" },
  25046. {
  25047. value: "210624",
  25048. label: "宽甸满族自治县" },
  25049. {
  25050. value: "210681",
  25051. label: "东港市" },
  25052. {
  25053. value: "210682",
  25054. label: "凤城市" }] },
  25055. {
  25056. value: "210700",
  25057. label: "锦州市",
  25058. children: [{
  25059. value: "210702",
  25060. label: "古塔区" },
  25061. {
  25062. value: "210703",
  25063. label: "凌河区" },
  25064. {
  25065. value: "210711",
  25066. label: "太和区" },
  25067. {
  25068. value: "210726",
  25069. label: "黑山县" },
  25070. {
  25071. value: "210727",
  25072. label: "义县" },
  25073. {
  25074. value: "210781",
  25075. label: "凌海市" },
  25076. {
  25077. value: "210782",
  25078. label: "北镇市" }] },
  25079. {
  25080. value: "210800",
  25081. label: "营口市",
  25082. children: [{
  25083. value: "210802",
  25084. label: "站前区" },
  25085. {
  25086. value: "210803",
  25087. label: "西市区" },
  25088. {
  25089. value: "210804",
  25090. label: "鲅鱼圈区" },
  25091. {
  25092. value: "210811",
  25093. label: "老边区" },
  25094. {
  25095. value: "210881",
  25096. label: "盖州市" },
  25097. {
  25098. value: "210882",
  25099. label: "大石桥市" }] },
  25100. {
  25101. value: "210900",
  25102. label: "阜新市",
  25103. children: [{
  25104. value: "210902",
  25105. label: "海州区" },
  25106. {
  25107. value: "210903",
  25108. label: "新邱区" },
  25109. {
  25110. value: "210904",
  25111. label: "太平区" },
  25112. {
  25113. value: "210905",
  25114. label: "清河门区" },
  25115. {
  25116. value: "210911",
  25117. label: "细河区" },
  25118. {
  25119. value: "210921",
  25120. label: "阜新蒙古族自治县" },
  25121. {
  25122. value: "210922",
  25123. label: "彰武县" }] },
  25124. {
  25125. value: "211000",
  25126. label: "辽阳市",
  25127. children: [{
  25128. value: "211002",
  25129. label: "白塔区" },
  25130. {
  25131. value: "211003",
  25132. label: "文圣区" },
  25133. {
  25134. value: "211004",
  25135. label: "宏伟区" },
  25136. {
  25137. value: "211005",
  25138. label: "弓长岭区" },
  25139. {
  25140. value: "211011",
  25141. label: "太子河区" },
  25142. {
  25143. value: "211021",
  25144. label: "辽阳县" },
  25145. {
  25146. value: "211081",
  25147. label: "灯塔市" }] },
  25148. {
  25149. value: "211100",
  25150. label: "盘锦市",
  25151. children: [{
  25152. value: "211102",
  25153. label: "双台子区" },
  25154. {
  25155. value: "211103",
  25156. label: "兴隆台区" },
  25157. {
  25158. value: "211121",
  25159. label: "大洼县" },
  25160. {
  25161. value: "211122",
  25162. label: "盘山县" }] },
  25163. {
  25164. value: "211200",
  25165. label: "铁岭市",
  25166. children: [{
  25167. value: "211202",
  25168. label: "银州区" },
  25169. {
  25170. value: "211204",
  25171. label: "清河区" },
  25172. {
  25173. value: "211221",
  25174. label: "铁岭县" },
  25175. {
  25176. value: "211223",
  25177. label: "西丰县" },
  25178. {
  25179. value: "211224",
  25180. label: "昌图县" },
  25181. {
  25182. value: "211281",
  25183. label: "调兵山市" },
  25184. {
  25185. value: "211282",
  25186. label: "开原市" }] },
  25187. {
  25188. value: "211300",
  25189. label: "朝阳市",
  25190. children: [{
  25191. value: "211302",
  25192. label: "双塔区" },
  25193. {
  25194. value: "211303",
  25195. label: "龙城区" },
  25196. {
  25197. value: "211321",
  25198. label: "朝阳县" },
  25199. {
  25200. value: "211322",
  25201. label: "建平县" },
  25202. {
  25203. value: "211324",
  25204. label: "喀喇沁左翼蒙古族自治县" },
  25205. {
  25206. value: "211381",
  25207. label: "北票市" },
  25208. {
  25209. value: "211382",
  25210. label: "凌源市" }] },
  25211. {
  25212. value: "211400",
  25213. label: "葫芦岛市",
  25214. children: [{
  25215. value: "211402",
  25216. label: "连山区" },
  25217. {
  25218. value: "211403",
  25219. label: "龙港区" },
  25220. {
  25221. value: "211404",
  25222. label: "南票区" },
  25223. {
  25224. value: "211421",
  25225. label: "绥中县" },
  25226. {
  25227. value: "211422",
  25228. label: "建昌县" },
  25229. {
  25230. value: "211481",
  25231. label: "兴城市" }] }] },
  25232. {
  25233. value: '220000',
  25234. label: '吉林省',
  25235. children: [{
  25236. value: "220100",
  25237. label: "长春市",
  25238. children: [{
  25239. value: "220102",
  25240. label: "南关区" },
  25241. {
  25242. value: "220103",
  25243. label: "宽城区" },
  25244. {
  25245. value: "220104",
  25246. label: "朝阳区" },
  25247. {
  25248. value: "220105",
  25249. label: "二道区" },
  25250. {
  25251. value: "220106",
  25252. label: "绿园区" },
  25253. {
  25254. value: "220112",
  25255. label: "双阳区" },
  25256. {
  25257. value: "220122",
  25258. label: "农安县" },
  25259. {
  25260. value: "220181",
  25261. label: "九台市" },
  25262. {
  25263. value: "220182",
  25264. label: "榆树市" },
  25265. {
  25266. value: "220183",
  25267. label: "德惠市" },
  25268. {
  25269. value: "220171",
  25270. label: "长春经济技术开发区" },
  25271. {
  25272. value: "220172",
  25273. label: "长春净月高新技术产业开发区" },
  25274. {
  25275. value: "220173",
  25276. label: "长春高新技术产业开发区" },
  25277. {
  25278. value: "220174",
  25279. label: "长春汽车经济技术开发区" }] },
  25280. {
  25281. value: "220200",
  25282. label: "吉林市",
  25283. children: [{
  25284. value: "220202",
  25285. label: "昌邑区" },
  25286. {
  25287. value: "220203",
  25288. label: "龙潭区" },
  25289. {
  25290. value: "220204",
  25291. label: "船营区" },
  25292. {
  25293. value: "220211",
  25294. label: "丰满区" },
  25295. {
  25296. value: "220221",
  25297. label: "永吉县" },
  25298. {
  25299. value: "220281",
  25300. label: "蛟河市" },
  25301. {
  25302. value: "220282",
  25303. label: "桦甸市" },
  25304. {
  25305. value: "220283",
  25306. label: "舒兰市" },
  25307. {
  25308. value: "220284",
  25309. label: "磐石市" },
  25310. {
  25311. value: "220271",
  25312. label: "吉林经济开发区" },
  25313. {
  25314. value: "220272",
  25315. label: "吉林高新技术产业开发区" },
  25316. {
  25317. value: "220273",
  25318. label: "吉林中国新加坡食品区" }] },
  25319. {
  25320. value: "220300",
  25321. label: "四平市",
  25322. children: [{
  25323. value: "220302",
  25324. label: "铁西区" },
  25325. {
  25326. value: "220303",
  25327. label: "铁东区" },
  25328. {
  25329. value: "220322",
  25330. label: "梨树县" },
  25331. {
  25332. value: "220323",
  25333. label: "伊通满族自治县" },
  25334. {
  25335. value: "220381",
  25336. label: "公主岭市" },
  25337. {
  25338. value: "220382",
  25339. label: "双辽市" }] },
  25340. {
  25341. value: "220400",
  25342. label: "辽源市",
  25343. children: [{
  25344. value: "220402",
  25345. label: "龙山区" },
  25346. {
  25347. value: "220403",
  25348. label: "西安区" },
  25349. {
  25350. value: "220421",
  25351. label: "东丰县" },
  25352. {
  25353. value: "220422",
  25354. label: "东辽县" }] },
  25355. {
  25356. value: "220500",
  25357. label: "通化市",
  25358. children: [{
  25359. value: "220502",
  25360. label: "东昌区" },
  25361. {
  25362. value: "220503",
  25363. label: "二道江区" },
  25364. {
  25365. value: "220521",
  25366. label: "通化县" },
  25367. {
  25368. value: "220523",
  25369. label: "辉南县" },
  25370. {
  25371. value: "220524",
  25372. label: "柳河县" },
  25373. {
  25374. value: "220581",
  25375. label: "梅河口市" },
  25376. {
  25377. value: "220582",
  25378. label: "集安市" }] },
  25379. {
  25380. value: "220600",
  25381. label: "白山市",
  25382. children: [{
  25383. value: "220602",
  25384. label: "八道江区" },
  25385. {
  25386. value: "220621",
  25387. label: "抚松县" },
  25388. {
  25389. value: "220622",
  25390. label: "靖宇县" },
  25391. {
  25392. value: "220623",
  25393. label: "长白朝鲜族自治县" },
  25394. {
  25395. value: "220605",
  25396. label: "江源区" },
  25397. {
  25398. value: "220681",
  25399. label: "临江市" },
  25400. {
  25401. value: "220602",
  25402. label: "浑江区" }] },
  25403. {
  25404. value: "220700",
  25405. label: "松原市",
  25406. children: [{
  25407. value: "220702",
  25408. label: "宁江区" },
  25409. {
  25410. value: "220721",
  25411. label: "前郭尔罗斯蒙古族自治县" },
  25412. {
  25413. value: "220722",
  25414. label: "长岭县" },
  25415. {
  25416. value: "220723",
  25417. label: "乾安县" },
  25418. {
  25419. value: "220781",
  25420. label: "扶余市" },
  25421. {
  25422. value: "220771",
  25423. label: "吉林松原经济开发区" }] },
  25424. {
  25425. value: "220800",
  25426. label: "白城市",
  25427. children: [{
  25428. value: "220802",
  25429. label: "洮北区" },
  25430. {
  25431. value: "220821",
  25432. label: "镇赉县" },
  25433. {
  25434. value: "220822",
  25435. label: "通榆县" },
  25436. {
  25437. value: "220881",
  25438. label: "洮南市" },
  25439. {
  25440. value: "220882",
  25441. label: "大安市" },
  25442. {
  25443. value: "220871",
  25444. label: "吉林白城经济开发区" }] },
  25445. {
  25446. value: "222400",
  25447. label: "延边朝鲜族自治州",
  25448. children: [{
  25449. value: "222401",
  25450. label: "延吉市" },
  25451. {
  25452. value: "222402",
  25453. label: "图们市" },
  25454. {
  25455. value: "222403",
  25456. label: "敦化市" },
  25457. {
  25458. value: "222404",
  25459. label: "珲春市" },
  25460. {
  25461. value: "222405",
  25462. label: "龙井市" },
  25463. {
  25464. value: "222406",
  25465. label: "和龙市" },
  25466. {
  25467. value: "222424",
  25468. label: "汪清县" },
  25469. {
  25470. value: "222426",
  25471. label: "安图县" }] }] },
  25472. {
  25473. value: '230000',
  25474. label: '黑龙江省',
  25475. children: [{
  25476. value: "230100",
  25477. label: "哈尔滨市",
  25478. children: [{
  25479. value: "230102",
  25480. label: "道里区" },
  25481. {
  25482. value: "230103",
  25483. label: "南岗区" },
  25484. {
  25485. value: "230104",
  25486. label: "道外区" },
  25487. {
  25488. value: "230110",
  25489. label: "香坊区" },
  25490. {
  25491. value: "230107",
  25492. label: "动力区" },
  25493. {
  25494. value: "230108",
  25495. label: "平房区" },
  25496. {
  25497. value: "230109",
  25498. label: "松北区" },
  25499. {
  25500. value: "230111",
  25501. label: "呼兰区" },
  25502. {
  25503. value: "230123",
  25504. label: "依兰县" },
  25505. {
  25506. value: "230124",
  25507. label: "方正县" },
  25508. {
  25509. value: "230125",
  25510. label: "宾县" },
  25511. {
  25512. value: "230126",
  25513. label: "巴彦县" },
  25514. {
  25515. value: "230127",
  25516. label: "木兰县" },
  25517. {
  25518. value: "230128",
  25519. label: "通河县" },
  25520. {
  25521. value: "230129",
  25522. label: "延寿县" },
  25523. {
  25524. value: "230112",
  25525. label: "阿城区" },
  25526. {
  25527. value: "230113",
  25528. label: "双城区" },
  25529. {
  25530. value: "230183",
  25531. label: "尚志市" },
  25532. {
  25533. value: "230184",
  25534. label: "五常市" }] },
  25535. {
  25536. value: "230200",
  25537. label: "齐齐哈尔市",
  25538. children: [{
  25539. value: "230202",
  25540. label: "龙沙区" },
  25541. {
  25542. value: "230203",
  25543. label: "建华区" },
  25544. {
  25545. value: "230204",
  25546. label: "铁锋区" },
  25547. {
  25548. value: "230205",
  25549. label: "昂昂溪区" },
  25550. {
  25551. value: "230206",
  25552. label: "富拉尔基区" },
  25553. {
  25554. value: "230207",
  25555. label: "碾子山区" },
  25556. {
  25557. value: "230208",
  25558. label: "梅里斯达斡尔族区" },
  25559. {
  25560. value: "230221",
  25561. label: "龙江县" },
  25562. {
  25563. value: "230223",
  25564. label: "依安县" },
  25565. {
  25566. value: "230224",
  25567. label: "泰来县" },
  25568. {
  25569. value: "230225",
  25570. label: "甘南县" },
  25571. {
  25572. value: "230227",
  25573. label: "富裕县" },
  25574. {
  25575. value: "230229",
  25576. label: "克山县" },
  25577. {
  25578. value: "230230",
  25579. label: "克东县" },
  25580. {
  25581. value: "230231",
  25582. label: "拜泉县" },
  25583. {
  25584. value: "230281",
  25585. label: "讷河市" }] },
  25586. {
  25587. value: "230300",
  25588. label: "鸡西市",
  25589. children: [{
  25590. value: "230302",
  25591. label: "鸡冠区" },
  25592. {
  25593. value: "230303",
  25594. label: "恒山区" },
  25595. {
  25596. value: "230304",
  25597. label: "滴道区" },
  25598. {
  25599. value: "230305",
  25600. label: "梨树区" },
  25601. {
  25602. value: "230306",
  25603. label: "城子河区" },
  25604. {
  25605. value: "230307",
  25606. label: "麻山区" },
  25607. {
  25608. value: "230321",
  25609. label: "鸡东县" },
  25610. {
  25611. value: "230381",
  25612. label: "虎林市" },
  25613. {
  25614. value: "230382",
  25615. label: "密山市" }] },
  25616. {
  25617. value: "230400",
  25618. label: "鹤岗市",
  25619. children: [{
  25620. value: "230402",
  25621. label: "向阳区" },
  25622. {
  25623. value: "230403",
  25624. label: "工农区" },
  25625. {
  25626. value: "230404",
  25627. label: "南山区" },
  25628. {
  25629. value: "230405",
  25630. label: "兴安区" },
  25631. {
  25632. value: "230406",
  25633. label: "东山区" },
  25634. {
  25635. value: "230407",
  25636. label: "兴山区" },
  25637. {
  25638. value: "230421",
  25639. label: "萝北县" },
  25640. {
  25641. value: "230422",
  25642. label: "绥滨县" }] },
  25643. {
  25644. value: "230500",
  25645. label: "双鸭山市",
  25646. children: [{
  25647. value: "230502",
  25648. label: "尖山区" },
  25649. {
  25650. value: "230503",
  25651. label: "岭东区" },
  25652. {
  25653. value: "230505",
  25654. label: "四方台区" },
  25655. {
  25656. value: "230506",
  25657. label: "宝山区" },
  25658. {
  25659. value: "230521",
  25660. label: "集贤县" },
  25661. {
  25662. value: "230522",
  25663. label: "友谊县" },
  25664. {
  25665. value: "230523",
  25666. label: "宝清县" },
  25667. {
  25668. value: "230524",
  25669. label: "饶河县" }] },
  25670. {
  25671. value: "230600",
  25672. label: "大庆市",
  25673. children: [{
  25674. value: "230602",
  25675. label: "萨尔图区" },
  25676. {
  25677. value: "230603",
  25678. label: "龙凤区" },
  25679. {
  25680. value: "230604",
  25681. label: "让胡路区" },
  25682. {
  25683. value: "230605",
  25684. label: "红岗区" },
  25685. {
  25686. value: "230606",
  25687. label: "大同区" },
  25688. {
  25689. value: "230621",
  25690. label: "肇州县" },
  25691. {
  25692. value: "230622",
  25693. label: "肇源县" },
  25694. {
  25695. value: "230623",
  25696. label: "林甸县" },
  25697. {
  25698. value: "230624",
  25699. label: "杜尔伯特蒙古族自治县" },
  25700. {
  25701. value: "230671",
  25702. label: "大庆高新技术产业开发区" }] },
  25703. {
  25704. value: "230700",
  25705. label: "伊春市",
  25706. children: [{
  25707. value: "230702",
  25708. label: "伊春区" },
  25709. {
  25710. value: "230703",
  25711. label: "南岔区" },
  25712. {
  25713. value: "230704",
  25714. label: "友好区" },
  25715. {
  25716. value: "230705",
  25717. label: "西林区" },
  25718. {
  25719. value: "230706",
  25720. label: "翠峦区" },
  25721. {
  25722. value: "230707",
  25723. label: "新青区" },
  25724. {
  25725. value: "230708",
  25726. label: "美溪区" },
  25727. {
  25728. value: "230709",
  25729. label: "金山屯区" },
  25730. {
  25731. value: "230710",
  25732. label: "五营区" },
  25733. {
  25734. value: "230711",
  25735. label: "乌马河区" },
  25736. {
  25737. value: "230712",
  25738. label: "汤旺河区" },
  25739. {
  25740. value: "230713",
  25741. label: "带岭区" },
  25742. {
  25743. value: "230714",
  25744. label: "乌伊岭区" },
  25745. {
  25746. value: "230715",
  25747. label: "红星区" },
  25748. {
  25749. value: "230716",
  25750. label: "上甘岭区" },
  25751. {
  25752. value: "230722",
  25753. label: "嘉荫县" },
  25754. {
  25755. value: "230781",
  25756. label: "铁力市" }] },
  25757. {
  25758. value: "230800",
  25759. label: "佳木斯市",
  25760. children: [{
  25761. value: "230803",
  25762. label: "向阳区" },
  25763. {
  25764. value: "230804",
  25765. label: "前进区" },
  25766. {
  25767. value: "230805",
  25768. label: "东风区" },
  25769. {
  25770. value: "230811",
  25771. label: "郊区" },
  25772. {
  25773. value: "230822",
  25774. label: "桦南县" },
  25775. {
  25776. value: "230826",
  25777. label: "桦川县" },
  25778. {
  25779. value: "230828",
  25780. label: "汤原县" },
  25781. {
  25782. value: "230833",
  25783. label: "抚远市" },
  25784. {
  25785. value: "230881",
  25786. label: "同江市" },
  25787. {
  25788. value: "230882",
  25789. label: "富锦市" }] },
  25790. {
  25791. value: "230900",
  25792. label: "七台河市",
  25793. children: [{
  25794. value: "230902",
  25795. label: "新兴区" },
  25796. {
  25797. value: "230903",
  25798. label: "桃山区" },
  25799. {
  25800. value: "230904",
  25801. label: "茄子河区" },
  25802. {
  25803. value: "230921",
  25804. label: "勃利县" }] },
  25805. {
  25806. value: "231000",
  25807. label: "牡丹江市",
  25808. children: [{
  25809. value: "231002",
  25810. label: "东安区" },
  25811. {
  25812. value: "231003",
  25813. label: "阳明区" },
  25814. {
  25815. value: "231004",
  25816. label: "爱民区" },
  25817. {
  25818. value: "231005",
  25819. label: "西安区" },
  25820. {
  25821. value: "231086",
  25822. label: "东宁市" },
  25823. {
  25824. value: "231025",
  25825. label: "林口县" },
  25826. {
  25827. value: "231081",
  25828. label: "绥芬河市" },
  25829. {
  25830. value: "231083",
  25831. label: "海林市" },
  25832. {
  25833. value: "231084",
  25834. label: "宁安市" },
  25835. {
  25836. value: "231085",
  25837. label: "穆棱市" },
  25838. {
  25839. value: "231071",
  25840. label: "牡丹江经济技术开发区" }] },
  25841. {
  25842. value: "231100",
  25843. label: "黑河市",
  25844. children: [{
  25845. value: "231102",
  25846. label: "爱辉区" },
  25847. {
  25848. value: "231121",
  25849. label: "嫩江县" },
  25850. {
  25851. value: "231123",
  25852. label: "逊克县" },
  25853. {
  25854. value: "231124",
  25855. label: "孙吴县" },
  25856. {
  25857. value: "231181",
  25858. label: "北安市" },
  25859. {
  25860. value: "231182",
  25861. label: "五大连池市" }] },
  25862. {
  25863. value: "231200",
  25864. label: "绥化市",
  25865. children: [{
  25866. value: "231202",
  25867. label: "北林区" },
  25868. {
  25869. value: "231221",
  25870. label: "望奎县" },
  25871. {
  25872. value: "231222",
  25873. label: "兰西县" },
  25874. {
  25875. value: "231223",
  25876. label: "青冈县" },
  25877. {
  25878. value: "231224",
  25879. label: "庆安县" },
  25880. {
  25881. value: "231225",
  25882. label: "明水县" },
  25883. {
  25884. value: "231226",
  25885. label: "绥棱县" },
  25886. {
  25887. value: "231281",
  25888. label: "安达市" },
  25889. {
  25890. value: "231282",
  25891. label: "肇东市" },
  25892. {
  25893. value: "231283",
  25894. label: "海伦市" }] },
  25895. {
  25896. value: "232700",
  25897. label: "大兴安岭地区",
  25898. children: [{
  25899. value: "232721",
  25900. label: "呼玛县" },
  25901. {
  25902. value: "232722",
  25903. label: "塔河县" },
  25904. {
  25905. value: "232723",
  25906. label: "漠河县" },
  25907. {
  25908. value: "232701",
  25909. label: "加格达奇区" },
  25910. {
  25911. value: "232704",
  25912. label: "呼中区" },
  25913. {
  25914. value: "232703",
  25915. label: "新林区" }] }] },
  25916. {
  25917. value: '310000',
  25918. label: '上海市',
  25919. children: [{
  25920. value: '310100',
  25921. label: '上海市',
  25922. children: [{
  25923. value: "310101",
  25924. label: "黄浦区" },
  25925. {
  25926. value: "310104",
  25927. label: "徐汇区" },
  25928. {
  25929. value: "310105",
  25930. label: "长宁区" },
  25931. {
  25932. value: "310106",
  25933. label: "静安区" },
  25934. {
  25935. value: "310107",
  25936. label: "普陀区" },
  25937. {
  25938. value: "310109",
  25939. label: "虹口区" },
  25940. {
  25941. value: "310110",
  25942. label: "杨浦区" },
  25943. {
  25944. value: "310112",
  25945. label: "闵行区" },
  25946. {
  25947. value: "310113",
  25948. label: "宝山区" },
  25949. {
  25950. value: "310114",
  25951. label: "嘉定区" },
  25952. {
  25953. value: "310115",
  25954. label: "浦东新区" },
  25955. {
  25956. value: "310116",
  25957. label: "金山区" },
  25958. {
  25959. value: "310117",
  25960. label: "松江区" },
  25961. {
  25962. value: "310118",
  25963. label: "青浦区" },
  25964. {
  25965. value: "310120",
  25966. label: "奉贤区" },
  25967. {
  25968. value: "310151",
  25969. label: "崇明区" }] }] },
  25970. {
  25971. value: '320000',
  25972. label: '江苏省',
  25973. children: [{
  25974. value: "320100",
  25975. label: "南京市",
  25976. children: [{
  25977. value: "320102",
  25978. label: "玄武区" },
  25979. {
  25980. value: "320104",
  25981. label: "秦淮区" },
  25982. {
  25983. value: "320105",
  25984. label: "建邺区" },
  25985. {
  25986. value: "320106",
  25987. label: "鼓楼区" },
  25988. {
  25989. value: "320111",
  25990. label: "浦口区" },
  25991. {
  25992. value: "320113",
  25993. label: "栖霞区" },
  25994. {
  25995. value: "320114",
  25996. label: "雨花台区" },
  25997. {
  25998. value: "320115",
  25999. label: "江宁区" },
  26000. {
  26001. value: "320116",
  26002. label: "六合区" },
  26003. {
  26004. value: "320117",
  26005. label: "溧水区" },
  26006. {
  26007. value: "320118",
  26008. label: "高淳区" }] },
  26009. {
  26010. value: "320200",
  26011. label: "无锡市",
  26012. children: [{
  26013. value: "320205",
  26014. label: "锡山区" },
  26015. {
  26016. value: "320206",
  26017. label: "惠山区" },
  26018. {
  26019. value: "320211",
  26020. label: "滨湖区" },
  26021. {
  26022. value: "320281",
  26023. label: "江阴市" },
  26024. {
  26025. value: "320282",
  26026. label: "宜兴市" },
  26027. {
  26028. value: "320213",
  26029. label: "梁溪区" },
  26030. {
  26031. value: "320214",
  26032. label: "新吴区" }] },
  26033. {
  26034. value: "320300",
  26035. label: "徐州市",
  26036. children: [{
  26037. value: "320302",
  26038. label: "鼓楼区" },
  26039. {
  26040. value: "320303",
  26041. label: "云龙区" },
  26042. {
  26043. value: "320305",
  26044. label: "贾汪区" },
  26045. {
  26046. value: "320311",
  26047. label: "泉山区" },
  26048. {
  26049. value: "320321",
  26050. label: "丰县" },
  26051. {
  26052. value: "320322",
  26053. label: "沛县" },
  26054. {
  26055. value: "320324",
  26056. label: "睢宁县" },
  26057. {
  26058. value: "320381",
  26059. label: "新沂市" },
  26060. {
  26061. value: "320382",
  26062. label: "邳州市" },
  26063. {
  26064. value: "320371",
  26065. label: "徐州经济技术开发区" }] },
  26066. {
  26067. value: "320400",
  26068. label: "常州市",
  26069. children: [{
  26070. value: "320402",
  26071. label: "天宁区" },
  26072. {
  26073. value: "320404",
  26074. label: "钟楼区" },
  26075. {
  26076. value: "320411",
  26077. label: "新北区" },
  26078. {
  26079. value: "320412",
  26080. label: "武进区" },
  26081. {
  26082. value: "320481",
  26083. label: "溧阳市" },
  26084. {
  26085. value: "320413",
  26086. label: "金坛区" }] },
  26087. {
  26088. value: "320500",
  26089. label: "苏州市",
  26090. children: [{
  26091. value: "320505",
  26092. label: "虎丘区" },
  26093. {
  26094. value: "320506",
  26095. label: "吴中区" },
  26096. {
  26097. value: "320507",
  26098. label: "相城区" },
  26099. {
  26100. value: "320581",
  26101. label: "常熟市" },
  26102. {
  26103. value: "320582",
  26104. label: "张家港市" },
  26105. {
  26106. value: "320583",
  26107. label: "昆山市" },
  26108. {
  26109. value: "320509",
  26110. label: "吴江区" },
  26111. {
  26112. value: "320585",
  26113. label: "太仓市" },
  26114. {
  26115. value: "320508",
  26116. label: "姑苏区" },
  26117. {
  26118. value: "320571",
  26119. label: "苏州工业园区" }] },
  26120. {
  26121. value: "320600",
  26122. label: "南通市",
  26123. children: [{
  26124. value: "320602",
  26125. label: "崇川区" },
  26126. {
  26127. value: "320611",
  26128. label: "港闸区" },
  26129. {
  26130. value: "320612",
  26131. label: "通州区" },
  26132. {
  26133. value: "320621",
  26134. label: "海安县" },
  26135. {
  26136. value: "320623",
  26137. label: "如东县" },
  26138. {
  26139. value: "320681",
  26140. label: "启东市" },
  26141. {
  26142. value: "320682",
  26143. label: "如皋市" },
  26144. {
  26145. value: "320684",
  26146. label: "海门市" },
  26147. {
  26148. value: "320671",
  26149. label: "南通经济技术开发区" }] },
  26150. {
  26151. value: "320700",
  26152. label: "连云港市",
  26153. children: [{
  26154. value: "320703",
  26155. label: "连云区" },
  26156. {
  26157. value: "320706",
  26158. label: "海州区" },
  26159. {
  26160. value: "320707",
  26161. label: "赣榆区" },
  26162. {
  26163. value: "320722",
  26164. label: "东海县" },
  26165. {
  26166. value: "320723",
  26167. label: "灌云县" },
  26168. {
  26169. value: "320724",
  26170. label: "灌南县" },
  26171. {
  26172. value: "320771",
  26173. label: "连云港经济技术开发区" },
  26174. {
  26175. value: "320772",
  26176. label: "连云港高新技术产业开发区" }] },
  26177. {
  26178. value: "320800",
  26179. label: "淮安市",
  26180. children: [{
  26181. value: "320804",
  26182. label: "淮阴区" },
  26183. {
  26184. value: "320812",
  26185. label: "清江浦区" },
  26186. {
  26187. value: "320826",
  26188. label: "涟水县" },
  26189. {
  26190. value: "320813",
  26191. label: "洪泽区" },
  26192. {
  26193. value: "320830",
  26194. label: "盱眙县" },
  26195. {
  26196. value: "320831",
  26197. label: "金湖县" },
  26198. {
  26199. value: "320803",
  26200. label: "淮安区" },
  26201. {
  26202. value: "320871",
  26203. label: "淮安经济技术开发区" }] },
  26204. {
  26205. value: "320900",
  26206. label: "盐城市",
  26207. children: [{
  26208. value: "320902",
  26209. label: "亭湖区" },
  26210. {
  26211. value: "320903",
  26212. label: "盐都区" },
  26213. {
  26214. value: "320921",
  26215. label: "响水县" },
  26216. {
  26217. value: "320922",
  26218. label: "滨海县" },
  26219. {
  26220. value: "320904",
  26221. label: "大丰区" },
  26222. {
  26223. value: "320923",
  26224. label: "阜宁县" },
  26225. {
  26226. value: "320924",
  26227. label: "射阳县" },
  26228. {
  26229. value: "320925",
  26230. label: "建湖县" },
  26231. {
  26232. value: "320981",
  26233. label: "东台市" },
  26234. {
  26235. value: "320971",
  26236. label: "盐城经济技术开发区" }] },
  26237. {
  26238. value: "321000",
  26239. label: "扬州市",
  26240. children: [{
  26241. value: "321002",
  26242. label: "广陵区" },
  26243. {
  26244. value: "321003",
  26245. label: "邗江区" },
  26246. {
  26247. value: "321011",
  26248. label: "维扬区" },
  26249. {
  26250. value: "321023",
  26251. label: "宝应县" },
  26252. {
  26253. value: "321081",
  26254. label: "仪征市" },
  26255. {
  26256. value: "321084",
  26257. label: "高邮市" },
  26258. {
  26259. value: "321012",
  26260. label: "江都区" },
  26261. {
  26262. value: "321071",
  26263. label: "扬州经济技术开发区" }] },
  26264. {
  26265. value: "321100",
  26266. label: "镇江市",
  26267. children: [{
  26268. value: "321102",
  26269. label: "京口区" },
  26270. {
  26271. value: "321111",
  26272. label: "润州区" },
  26273. {
  26274. value: "321112",
  26275. label: "丹徒区" },
  26276. {
  26277. value: "321181",
  26278. label: "丹阳市" },
  26279. {
  26280. value: "321182",
  26281. label: "扬中市" },
  26282. {
  26283. value: "321183",
  26284. label: "句容市" },
  26285. {
  26286. value: "321171",
  26287. label: "镇江新区" }] },
  26288. {
  26289. value: "321200",
  26290. label: "泰州市",
  26291. children: [{
  26292. value: "321202",
  26293. label: "海陵区" },
  26294. {
  26295. value: "321203",
  26296. label: "高港区" },
  26297. {
  26298. value: "321281",
  26299. label: "兴化市" },
  26300. {
  26301. value: "321282",
  26302. label: "靖江市" },
  26303. {
  26304. value: "321283",
  26305. label: "泰兴市" },
  26306. {
  26307. value: "321204",
  26308. label: "姜堰区" },
  26309. {
  26310. value: "321271",
  26311. label: "泰州医药高新技术产业开发区" }] },
  26312. {
  26313. value: "321300",
  26314. label: "宿迁市",
  26315. children: [{
  26316. value: "321302",
  26317. label: "宿城区" },
  26318. {
  26319. value: "321311",
  26320. label: "宿豫区" },
  26321. {
  26322. value: "321322",
  26323. label: "沭阳县" },
  26324. {
  26325. value: "321323",
  26326. label: "泗阳县" },
  26327. {
  26328. value: "321324",
  26329. label: "泗洪县" }] }] },
  26330. {
  26331. value: '330000',
  26332. label: '浙江省',
  26333. children: [{
  26334. value: "330100",
  26335. label: "杭州市",
  26336. children: [{
  26337. value: "330102",
  26338. label: "上城区" },
  26339. {
  26340. value: "330103",
  26341. label: "下城区" },
  26342. {
  26343. value: "330104",
  26344. label: "江干区" },
  26345. {
  26346. value: "330105",
  26347. label: "拱墅区" },
  26348. {
  26349. value: "330106",
  26350. label: "西湖区" },
  26351. {
  26352. value: "330108",
  26353. label: "滨江区" },
  26354. {
  26355. value: "330109",
  26356. label: "萧山区" },
  26357. {
  26358. value: "330110",
  26359. label: "余杭区" },
  26360. {
  26361. value: "330122",
  26362. label: "桐庐县" },
  26363. {
  26364. value: "330127",
  26365. label: "淳安县" },
  26366. {
  26367. value: "330182",
  26368. label: "建德市" },
  26369. {
  26370. value: "330111",
  26371. label: "富阳区" },
  26372. {
  26373. value: "330112",
  26374. label: "临安区" },
  26375. {
  26376. value: "330186",
  26377. label: "其它区" }] },
  26378. {
  26379. value: "330200",
  26380. label: "宁波市",
  26381. children: [{
  26382. value: "330203",
  26383. label: "海曙区" },
  26384. {
  26385. value: "330205",
  26386. label: "江北区" },
  26387. {
  26388. value: "330206",
  26389. label: "北仑区" },
  26390. {
  26391. value: "330211",
  26392. label: "镇海区" },
  26393. {
  26394. value: "330212",
  26395. label: "鄞州区" },
  26396. {
  26397. value: "330225",
  26398. label: "象山县" },
  26399. {
  26400. value: "330226",
  26401. label: "宁海县" },
  26402. {
  26403. value: "330281",
  26404. label: "余姚市" },
  26405. {
  26406. value: "330282",
  26407. label: "慈溪市" },
  26408. {
  26409. value: "330213",
  26410. label: "奉化区" }] },
  26411. {
  26412. value: "330300",
  26413. label: "温州市",
  26414. children: [{
  26415. value: "330302",
  26416. label: "鹿城区" },
  26417. {
  26418. value: "330303",
  26419. label: "龙湾区" },
  26420. {
  26421. value: "330304",
  26422. label: "瓯海区" },
  26423. {
  26424. value: "330305",
  26425. label: "洞头区" },
  26426. {
  26427. value: "330324",
  26428. label: "永嘉县" },
  26429. {
  26430. value: "330326",
  26431. label: "平阳县" },
  26432. {
  26433. value: "330327",
  26434. label: "苍南县" },
  26435. {
  26436. value: "330328",
  26437. label: "文成县" },
  26438. {
  26439. value: "330329",
  26440. label: "泰顺县" },
  26441. {
  26442. value: "330381",
  26443. label: "瑞安市" },
  26444. {
  26445. value: "330382",
  26446. label: "乐清市" },
  26447. {
  26448. value: "330371",
  26449. label: "温州经济技术开发区" }] },
  26450. {
  26451. value: "330400",
  26452. label: "嘉兴市",
  26453. children: [{
  26454. value: "330402",
  26455. label: "南湖区" },
  26456. {
  26457. value: "330411",
  26458. label: "秀洲区" },
  26459. {
  26460. value: "330421",
  26461. label: "嘉善县" },
  26462. {
  26463. value: "330424",
  26464. label: "海盐县" },
  26465. {
  26466. value: "330481",
  26467. label: "海宁市" },
  26468. {
  26469. value: "330482",
  26470. label: "平湖市" },
  26471. {
  26472. value: "330483",
  26473. label: "桐乡市" }] },
  26474. {
  26475. value: "330500",
  26476. label: "湖州市",
  26477. children: [{
  26478. value: "330502",
  26479. label: "吴兴区" },
  26480. {
  26481. value: "330503",
  26482. label: "南浔区" },
  26483. {
  26484. value: "330521",
  26485. label: "德清县" },
  26486. {
  26487. value: "330522",
  26488. label: "长兴县" },
  26489. {
  26490. value: "330523",
  26491. label: "安吉县" }] },
  26492. {
  26493. value: "330600",
  26494. label: "绍兴市",
  26495. children: [{
  26496. value: "330602",
  26497. label: "越城区" },
  26498. {
  26499. value: "330621",
  26500. label: "柯桥区" },
  26501. {
  26502. value: "330681",
  26503. label: "诸暨市" },
  26504. {
  26505. value: "330604",
  26506. label: "上虞区" },
  26507. {
  26508. value: "330683",
  26509. label: "嵊州市" },
  26510. {
  26511. value: "330624",
  26512. label: "新昌县" }] },
  26513. {
  26514. value: "330700",
  26515. label: "金华市",
  26516. children: [{
  26517. value: "330702",
  26518. label: "婺城区" },
  26519. {
  26520. value: "330703",
  26521. label: "金东区" },
  26522. {
  26523. value: "330723",
  26524. label: "武义县" },
  26525. {
  26526. value: "330726",
  26527. label: "浦江县" },
  26528. {
  26529. value: "330727",
  26530. label: "磐安县" },
  26531. {
  26532. value: "330781",
  26533. label: "兰溪市" },
  26534. {
  26535. value: "330782",
  26536. label: "义乌市" },
  26537. {
  26538. value: "330783",
  26539. label: "东阳市" },
  26540. {
  26541. value: "330784",
  26542. label: "永康市" }] },
  26543. {
  26544. value: "330800",
  26545. label: "衢州市",
  26546. children: [{
  26547. value: "330802",
  26548. label: "柯城区" },
  26549. {
  26550. value: "330803",
  26551. label: "衢江区" },
  26552. {
  26553. value: "330822",
  26554. label: "常山县" },
  26555. {
  26556. value: "330824",
  26557. label: "开化县" },
  26558. {
  26559. value: "330825",
  26560. label: "龙游县" },
  26561. {
  26562. value: "330881",
  26563. label: "江山市" }] },
  26564. {
  26565. value: "330900",
  26566. label: "舟山市",
  26567. children: [{
  26568. value: "330902",
  26569. label: "定海区" },
  26570. {
  26571. value: "330903",
  26572. label: "普陀区" },
  26573. {
  26574. value: "330921",
  26575. label: "岱山县" },
  26576. {
  26577. value: "330922",
  26578. label: "嵊泗县" }] },
  26579. {
  26580. value: "331000",
  26581. label: "台州市",
  26582. children: [{
  26583. value: "331002",
  26584. label: "椒江区" },
  26585. {
  26586. value: "331003",
  26587. label: "黄岩区" },
  26588. {
  26589. value: "331004",
  26590. label: "路桥区" },
  26591. {
  26592. value: "331083",
  26593. label: "玉环市" },
  26594. {
  26595. value: "331022",
  26596. label: "三门县" },
  26597. {
  26598. value: "331023",
  26599. label: "天台县" },
  26600. {
  26601. value: "331024",
  26602. label: "仙居县" },
  26603. {
  26604. value: "331081",
  26605. label: "温岭市" },
  26606. {
  26607. value: "331082",
  26608. label: "临海市" }] },
  26609. {
  26610. value: "331100",
  26611. label: "丽水市",
  26612. children: [{
  26613. value: "331102",
  26614. label: "莲都区" },
  26615. {
  26616. value: "331121",
  26617. label: "青田县" },
  26618. {
  26619. value: "331122",
  26620. label: "缙云县" },
  26621. {
  26622. value: "331123",
  26623. label: "遂昌县" },
  26624. {
  26625. value: "331124",
  26626. label: "松阳县" },
  26627. {
  26628. value: "331125",
  26629. label: "云和县" },
  26630. {
  26631. value: "331126",
  26632. label: "庆元县" },
  26633. {
  26634. value: "331127",
  26635. label: "景宁畲族自治县" },
  26636. {
  26637. value: "331181",
  26638. label: "龙泉市" }] }] },
  26639. {
  26640. value: '340000',
  26641. label: '安徽省',
  26642. children: [{
  26643. value: "340100",
  26644. label: "合肥市",
  26645. children: [{
  26646. value: "340111",
  26647. label: "包河区" },
  26648. {
  26649. value: "340104",
  26650. label: "蜀山区" },
  26651. {
  26652. value: "340103",
  26653. label: "庐阳区" },
  26654. {
  26655. value: "340102",
  26656. label: "瑶海区" },
  26657. {
  26658. value: "340171",
  26659. label: "合肥高新技术产业开发区" },
  26660. {
  26661. value: "340172",
  26662. label: "合肥经济技术开发区" },
  26663. {
  26664. value: "340173",
  26665. label: "合肥新站高新技术产业开发区" },
  26666. {
  26667. value: "340121",
  26668. label: "长丰县" },
  26669. {
  26670. value: "340122",
  26671. label: "肥东县" },
  26672. {
  26673. value: "340123",
  26674. label: "肥西县" },
  26675. {
  26676. value: "340124",
  26677. label: "庐江县" },
  26678. {
  26679. value: "340181",
  26680. label: "巢湖市" }] },
  26681. {
  26682. value: "340200",
  26683. label: "芜湖市",
  26684. children: [{
  26685. value: "340202",
  26686. label: "镜湖区" },
  26687. {
  26688. value: "340203",
  26689. label: "弋江区" },
  26690. {
  26691. value: "340207",
  26692. label: "鸠江区" },
  26693. {
  26694. value: "340208",
  26695. label: "三山区" },
  26696. {
  26697. value: "340221",
  26698. label: "芜湖县" },
  26699. {
  26700. value: "340222",
  26701. label: "繁昌县" },
  26702. {
  26703. value: "340223",
  26704. label: "南陵县" },
  26705. {
  26706. value: "340225",
  26707. label: "无为县" },
  26708. {
  26709. value: "340272",
  26710. label: "安徽芜湖长江大桥经济开发区" },
  26711. {
  26712. value: "340271",
  26713. label: "芜湖经济技术开发区" }] },
  26714. {
  26715. value: "340300",
  26716. label: "蚌埠市",
  26717. children: [{
  26718. value: "340302",
  26719. label: "龙子湖区" },
  26720. {
  26721. value: "340303",
  26722. label: "蚌山区" },
  26723. {
  26724. value: "340304",
  26725. label: "禹会区" },
  26726. {
  26727. value: "340311",
  26728. label: "淮上区" },
  26729. {
  26730. value: "340321",
  26731. label: "怀远县" },
  26732. {
  26733. value: "340322",
  26734. label: "五河县" },
  26735. {
  26736. value: "340323",
  26737. label: "固镇县" },
  26738. {
  26739. value: "340371",
  26740. label: "蚌埠市高新技术开发区" },
  26741. {
  26742. value: "340372 ",
  26743. label: "蚌埠市经济开发区" }] },
  26744. {
  26745. value: "340400",
  26746. label: "淮南市",
  26747. children: [{
  26748. value: "340402",
  26749. label: "大通区" },
  26750. {
  26751. value: "340403",
  26752. label: "田家庵区" },
  26753. {
  26754. value: "340404",
  26755. label: "谢家集区" },
  26756. {
  26757. value: "340405",
  26758. label: "八公山区" },
  26759. {
  26760. value: "340406",
  26761. label: "潘集区" },
  26762. {
  26763. value: "340421",
  26764. label: "凤台县" },
  26765. {
  26766. value: "340422",
  26767. label: "寿县" }] },
  26768. {
  26769. value: "340500",
  26770. label: "马鞍山市",
  26771. children: [{
  26772. value: "340503",
  26773. label: "花山区" },
  26774. {
  26775. value: "340504",
  26776. label: "雨山区" },
  26777. {
  26778. value: "340521",
  26779. label: "当涂县" },
  26780. {
  26781. value: "340506",
  26782. label: "博望区" },
  26783. {
  26784. value: "340522",
  26785. label: "含山县" },
  26786. {
  26787. value: "340523",
  26788. label: "和县" }] },
  26789. {
  26790. value: "340600",
  26791. label: "淮北市",
  26792. children: [{
  26793. value: "340602",
  26794. label: "杜集区" },
  26795. {
  26796. value: "340603",
  26797. label: "相山区" },
  26798. {
  26799. value: "340604",
  26800. label: "烈山区" },
  26801. {
  26802. value: "340621",
  26803. label: "濉溪县" }] },
  26804. {
  26805. value: "340700",
  26806. label: "铜陵市",
  26807. children: [{
  26808. value: "340705",
  26809. label: "铜官区" },
  26810. {
  26811. value: "340706",
  26812. label: "义安区" },
  26813. {
  26814. value: "340711",
  26815. label: "郊区" },
  26816. {
  26817. value: "340722",
  26818. label: "枞阳县" }] },
  26819. {
  26820. value: "340800",
  26821. label: "安庆市",
  26822. children: [{
  26823. value: "340802",
  26824. label: "迎江区" },
  26825. {
  26826. value: "340803",
  26827. label: "大观区" },
  26828. {
  26829. value: "340811",
  26830. label: "宜秀区" },
  26831. {
  26832. value: "340822",
  26833. label: "怀宁县" },
  26834. {
  26835. value: "340824",
  26836. label: "潜山县" },
  26837. {
  26838. value: "340825",
  26839. label: "太湖县" },
  26840. {
  26841. value: "340826",
  26842. label: "宿松县" },
  26843. {
  26844. value: "340827",
  26845. label: "望江县" },
  26846. {
  26847. value: "340828",
  26848. label: "岳西县" },
  26849. {
  26850. value: "340881",
  26851. label: "桐城市" },
  26852. {
  26853. value: "340871",
  26854. label: "安徽安庆经济开发区" }] },
  26855. {
  26856. value: "341000",
  26857. label: "黄山市",
  26858. children: [{
  26859. value: "341002",
  26860. label: "屯溪区" },
  26861. {
  26862. value: "341003",
  26863. label: "黄山区" },
  26864. {
  26865. value: "341004",
  26866. label: "徽州区" },
  26867. {
  26868. value: "341021",
  26869. label: "歙县" },
  26870. {
  26871. value: "341022",
  26872. label: "休宁县" },
  26873. {
  26874. value: "341023",
  26875. label: "黟县" },
  26876. {
  26877. value: "341024",
  26878. label: "祁门县" }] },
  26879. {
  26880. value: "341100",
  26881. label: "滁州市",
  26882. children: [{
  26883. value: "341102",
  26884. label: "琅琊区" },
  26885. {
  26886. value: "341103",
  26887. label: "南谯区" },
  26888. {
  26889. value: "341122",
  26890. label: "来安县" },
  26891. {
  26892. value: "341124",
  26893. label: "全椒县" },
  26894. {
  26895. value: "341125",
  26896. label: "定远县" },
  26897. {
  26898. value: "341126",
  26899. label: "凤阳县" },
  26900. {
  26901. value: "341181",
  26902. label: "天长市" },
  26903. {
  26904. value: "341182",
  26905. label: "明光市" },
  26906. {
  26907. value: "341171",
  26908. label: "苏滁现代产业园" },
  26909. {
  26910. value: "341172",
  26911. label: "滁州经济技术开发区" }] },
  26912. {
  26913. value: "341200",
  26914. label: "阜阳市",
  26915. children: [{
  26916. value: "341202",
  26917. label: "颍州区" },
  26918. {
  26919. value: "341203",
  26920. label: "颍东区" },
  26921. {
  26922. value: "341204",
  26923. label: "颍泉区" },
  26924. {
  26925. value: "341221",
  26926. label: "临泉县" },
  26927. {
  26928. value: "341222",
  26929. label: "太和县" },
  26930. {
  26931. value: "341225",
  26932. label: "阜南县" },
  26933. {
  26934. value: "341226",
  26935. label: "颍上县" },
  26936. {
  26937. value: "341282",
  26938. label: "界首市" },
  26939. {
  26940. value: "341272",
  26941. label: "阜阳经济技术开发区" },
  26942. {
  26943. value: "341271",
  26944. label: "阜阳合肥现代产业园区" }] },
  26945. {
  26946. value: "341300",
  26947. label: "宿州市",
  26948. children: [{
  26949. value: "341302",
  26950. label: "埇桥区" },
  26951. {
  26952. value: "341321",
  26953. label: "砀山县" },
  26954. {
  26955. value: "341322",
  26956. label: "萧县" },
  26957. {
  26958. value: "341323",
  26959. label: "灵璧县" },
  26960. {
  26961. value: "341324",
  26962. label: "泗县" },
  26963. {
  26964. value: "341371",
  26965. label: "宿州马鞍山现代产业园区" },
  26966. {
  26967. value: "341372",
  26968. label: "宿州经济技术开发区" }] },
  26969. {
  26970. value: "341500",
  26971. label: "六安市",
  26972. children: [{
  26973. value: "341502",
  26974. label: "金安区" },
  26975. {
  26976. value: "341503",
  26977. label: "裕安区" },
  26978. {
  26979. value: "341504",
  26980. label: "叶集区" },
  26981. {
  26982. value: "341522",
  26983. label: "霍邱县" },
  26984. {
  26985. value: "341523",
  26986. label: "舒城县" },
  26987. {
  26988. value: "341524",
  26989. label: "金寨县" },
  26990. {
  26991. value: "341525",
  26992. label: "霍山县" }] },
  26993. {
  26994. value: "341600",
  26995. label: "亳州市",
  26996. children: [{
  26997. value: "341602",
  26998. label: "谯城区" },
  26999. {
  27000. value: "341621",
  27001. label: "涡阳县" },
  27002. {
  27003. value: "341622",
  27004. label: "蒙城县" },
  27005. {
  27006. value: "341623",
  27007. label: "利辛县" }] },
  27008. {
  27009. value: "341700",
  27010. label: "池州市",
  27011. children: [{
  27012. value: "341702",
  27013. label: "贵池区" },
  27014. {
  27015. value: "341721",
  27016. label: "东至县" },
  27017. {
  27018. value: "341722",
  27019. label: "石台县" },
  27020. {
  27021. value: "341723",
  27022. label: "青阳县" }] },
  27023. {
  27024. value: "341800",
  27025. label: "宣城市",
  27026. children: [{
  27027. value: "341802",
  27028. label: "宣州区" },
  27029. {
  27030. value: "341821",
  27031. label: "郎溪县" },
  27032. {
  27033. value: "341822",
  27034. label: "广德县" },
  27035. {
  27036. value: "341823",
  27037. label: "泾县" },
  27038. {
  27039. value: "341824",
  27040. label: "绩溪县" },
  27041. {
  27042. value: "341825",
  27043. label: "旌德县" },
  27044. {
  27045. value: "341881",
  27046. label: "宁国市" },
  27047. {
  27048. value: "341871",
  27049. label: "宣城市经济开发区" }] }] },
  27050. {
  27051. value: '350000',
  27052. label: '福建省',
  27053. children: [{
  27054. value: "350100",
  27055. label: "福州市",
  27056. children: [{
  27057. value: "350102",
  27058. label: "鼓楼区" },
  27059. {
  27060. value: "350103",
  27061. label: "台江区" },
  27062. {
  27063. value: "350104",
  27064. label: "仓山区" },
  27065. {
  27066. value: "350105",
  27067. label: "马尾区" },
  27068. {
  27069. value: "350111",
  27070. label: "晋安区" },
  27071. {
  27072. value: "350121",
  27073. label: "闽侯县" },
  27074. {
  27075. value: "350122",
  27076. label: "连江县" },
  27077. {
  27078. value: "350123",
  27079. label: "罗源县" },
  27080. {
  27081. value: "350124",
  27082. label: "闽清县" },
  27083. {
  27084. value: "350125",
  27085. label: "永泰县" },
  27086. {
  27087. value: "350128",
  27088. label: "平潭县" },
  27089. {
  27090. value: "350181",
  27091. label: "福清市" },
  27092. {
  27093. value: "350182",
  27094. label: "长乐市" }] },
  27095. {
  27096. value: "350200",
  27097. label: "厦门市",
  27098. children: [{
  27099. value: "350203",
  27100. label: "思明区" },
  27101. {
  27102. value: "350205",
  27103. label: "海沧区" },
  27104. {
  27105. value: "350206",
  27106. label: "湖里区" },
  27107. {
  27108. value: "350211",
  27109. label: "集美区" },
  27110. {
  27111. value: "350212",
  27112. label: "同安区" },
  27113. {
  27114. value: "350213",
  27115. label: "翔安区" }] },
  27116. {
  27117. value: "350300",
  27118. label: "莆田市",
  27119. children: [{
  27120. value: "350302",
  27121. label: "城厢区" },
  27122. {
  27123. value: "350303",
  27124. label: "涵江区" },
  27125. {
  27126. value: "350304",
  27127. label: "荔城区" },
  27128. {
  27129. value: "350305",
  27130. label: "秀屿区" },
  27131. {
  27132. value: "350322",
  27133. label: "仙游县" }] },
  27134. {
  27135. value: "350400",
  27136. label: "三明市",
  27137. children: [{
  27138. value: "350402",
  27139. label: "梅列区" },
  27140. {
  27141. value: "350403",
  27142. label: "三元区" },
  27143. {
  27144. value: "350421",
  27145. label: "明溪县" },
  27146. {
  27147. value: "350423",
  27148. label: "清流县" },
  27149. {
  27150. value: "350424",
  27151. label: "宁化县" },
  27152. {
  27153. value: "350425",
  27154. label: "大田县" },
  27155. {
  27156. value: "350426",
  27157. label: "尤溪县" },
  27158. {
  27159. value: "350427",
  27160. label: "沙县" },
  27161. {
  27162. value: "350428",
  27163. label: "将乐县" },
  27164. {
  27165. value: "350429",
  27166. label: "泰宁县" },
  27167. {
  27168. value: "350430",
  27169. label: "建宁县" },
  27170. {
  27171. value: "350481",
  27172. label: "永安市" }] },
  27173. {
  27174. value: "350500",
  27175. label: "泉州市",
  27176. children: [{
  27177. value: "350502",
  27178. label: "鲤城区" },
  27179. {
  27180. value: "350503",
  27181. label: "丰泽区" },
  27182. {
  27183. value: "350504",
  27184. label: "洛江区" },
  27185. {
  27186. value: "350505",
  27187. label: "泉港区" },
  27188. {
  27189. value: "350521",
  27190. label: "惠安县" },
  27191. {
  27192. value: "350524",
  27193. label: "安溪县" },
  27194. {
  27195. value: "350525",
  27196. label: "永春县" },
  27197. {
  27198. value: "350526",
  27199. label: "德化县" },
  27200. {
  27201. value: "350527",
  27202. label: "金门县" },
  27203. {
  27204. value: "350581",
  27205. label: "石狮市" },
  27206. {
  27207. value: "350582",
  27208. label: "晋江市" },
  27209. {
  27210. value: "350583",
  27211. label: "南安市" }] },
  27212. {
  27213. value: "350600",
  27214. label: "漳州市",
  27215. children: [{
  27216. value: "350602",
  27217. label: "芗城区" },
  27218. {
  27219. value: "350603",
  27220. label: "龙文区" },
  27221. {
  27222. value: "350622",
  27223. label: "云霄县" },
  27224. {
  27225. value: "350623",
  27226. label: "漳浦县" },
  27227. {
  27228. value: "350624",
  27229. label: "诏安县" },
  27230. {
  27231. value: "350625",
  27232. label: "长泰县" },
  27233. {
  27234. value: "350626",
  27235. label: "东山县" },
  27236. {
  27237. value: "350627",
  27238. label: "南靖县" },
  27239. {
  27240. value: "350628",
  27241. label: "平和县" },
  27242. {
  27243. value: "350629",
  27244. label: "华安县" },
  27245. {
  27246. value: "350681",
  27247. label: "龙海市" }] },
  27248. {
  27249. value: "350700",
  27250. label: "南平市",
  27251. children: [{
  27252. value: "350702",
  27253. label: "延平区" },
  27254. {
  27255. value: "350721",
  27256. label: "顺昌县" },
  27257. {
  27258. value: "350722",
  27259. label: "浦城县" },
  27260. {
  27261. value: "350723",
  27262. label: "光泽县" },
  27263. {
  27264. value: "350724",
  27265. label: "松溪县" },
  27266. {
  27267. value: "350725",
  27268. label: "政和县" },
  27269. {
  27270. value: "350781",
  27271. label: "邵武市" },
  27272. {
  27273. value: "350782",
  27274. label: "武夷山市" },
  27275. {
  27276. value: "350783",
  27277. label: "建瓯市" },
  27278. {
  27279. value: "350703",
  27280. label: "建阳区" }] },
  27281. {
  27282. value: "350800",
  27283. label: "龙岩市",
  27284. children: [{
  27285. value: "350802",
  27286. label: "新罗区" },
  27287. {
  27288. value: "350821",
  27289. label: "长汀县" },
  27290. {
  27291. value: "350803",
  27292. label: "永定区" },
  27293. {
  27294. value: "350823",
  27295. label: "上杭县" },
  27296. {
  27297. value: "350824",
  27298. label: "武平县" },
  27299. {
  27300. value: "350825",
  27301. label: "连城县" },
  27302. {
  27303. value: "350881",
  27304. label: "漳平市" }] },
  27305. {
  27306. value: "350900",
  27307. label: "宁德市",
  27308. children: [{
  27309. value: "350902",
  27310. label: "蕉城区" },
  27311. {
  27312. value: "350921",
  27313. label: "霞浦县" },
  27314. {
  27315. value: "350922",
  27316. label: "古田县" },
  27317. {
  27318. value: "350923",
  27319. label: "屏南县" },
  27320. {
  27321. value: "350924",
  27322. label: "寿宁县" },
  27323. {
  27324. value: "350925",
  27325. label: "周宁县" },
  27326. {
  27327. value: "350926",
  27328. label: "柘荣县" },
  27329. {
  27330. value: "350981",
  27331. label: "福安市" },
  27332. {
  27333. value: "350982",
  27334. label: "福鼎市" }] }] },
  27335. {
  27336. value: '360000',
  27337. label: '江西省',
  27338. children: [{
  27339. value: "360100",
  27340. label: "南昌市",
  27341. children: [{
  27342. value: "360102",
  27343. label: "东湖区" },
  27344. {
  27345. value: "360103",
  27346. label: "西湖区" },
  27347. {
  27348. value: "360104",
  27349. label: "青云谱区" },
  27350. {
  27351. value: "360105",
  27352. label: "湾里区" },
  27353. {
  27354. value: "360111",
  27355. label: "青山湖区" },
  27356. {
  27357. value: "360121",
  27358. label: "南昌县" },
  27359. {
  27360. value: "360112",
  27361. label: "新建区" },
  27362. {
  27363. value: "360123",
  27364. label: "安义县" },
  27365. {
  27366. value: "360124",
  27367. label: "进贤县" }] },
  27368. {
  27369. value: "360200",
  27370. label: "景德镇市",
  27371. children: [{
  27372. value: "360202",
  27373. label: "昌江区" },
  27374. {
  27375. value: "360203",
  27376. label: "珠山区" },
  27377. {
  27378. value: "360222",
  27379. label: "浮梁县" },
  27380. {
  27381. value: "360281",
  27382. label: "乐平市" }] },
  27383. {
  27384. value: "360300",
  27385. label: "萍乡市",
  27386. children: [{
  27387. value: "360302",
  27388. label: "安源区" },
  27389. {
  27390. value: "360313",
  27391. label: "湘东区" },
  27392. {
  27393. value: "360321",
  27394. label: "莲花县" },
  27395. {
  27396. value: "360322",
  27397. label: "上栗县" },
  27398. {
  27399. value: "360323",
  27400. label: "芦溪县" }] },
  27401. {
  27402. value: "360400",
  27403. label: "九江市",
  27404. children: [{
  27405. value: "360402",
  27406. label: "濂溪区" },
  27407. {
  27408. value: "360403",
  27409. label: "浔阳区" },
  27410. {
  27411. value: "360404",
  27412. label: "柴桑区" },
  27413. {
  27414. value: "360423",
  27415. label: "武宁县" },
  27416. {
  27417. value: "360424",
  27418. label: "修水县" },
  27419. {
  27420. value: "360425",
  27421. label: "永修县" },
  27422. {
  27423. value: "360426",
  27424. label: "德安县" },
  27425. {
  27426. value: "360428",
  27427. label: "都昌县" },
  27428. {
  27429. value: "360429",
  27430. label: "湖口县" },
  27431. {
  27432. value: "360430",
  27433. label: "彭泽县" },
  27434. {
  27435. value: "360481",
  27436. label: "瑞昌市" },
  27437. {
  27438. value: "360482",
  27439. label: "共青城市" },
  27440. {
  27441. value: "360483",
  27442. label: "庐山市" }] },
  27443. {
  27444. value: "360500",
  27445. label: "新余市",
  27446. children: [{
  27447. value: "360502",
  27448. label: "渝水区" },
  27449. {
  27450. value: "360521",
  27451. label: "分宜县" }] },
  27452. {
  27453. value: "360600",
  27454. label: "鹰潭市",
  27455. children: [{
  27456. value: "360602",
  27457. label: "月湖区" },
  27458. {
  27459. value: "360622",
  27460. label: "余江县" },
  27461. {
  27462. value: "360681",
  27463. label: "贵溪市" }] },
  27464. {
  27465. value: "360700",
  27466. label: "赣州市",
  27467. children: [{
  27468. value: "360702",
  27469. label: "章贡区" },
  27470. {
  27471. value: "360704",
  27472. label: "赣县区" },
  27473. {
  27474. value: "360722",
  27475. label: "信丰县" },
  27476. {
  27477. value: "360723",
  27478. label: "大余县" },
  27479. {
  27480. value: "360724",
  27481. label: "上犹县" },
  27482. {
  27483. value: "360725",
  27484. label: "崇义县" },
  27485. {
  27486. value: "360726",
  27487. label: "安远县" },
  27488. {
  27489. value: "360727",
  27490. label: "龙南县" },
  27491. {
  27492. value: "360728",
  27493. label: "定南县" },
  27494. {
  27495. value: "360729",
  27496. label: "全南县" },
  27497. {
  27498. value: "360730",
  27499. label: "宁都县" },
  27500. {
  27501. value: "360731",
  27502. label: "于都县" },
  27503. {
  27504. value: "360732",
  27505. label: "兴国县" },
  27506. {
  27507. value: "360733",
  27508. label: "会昌县" },
  27509. {
  27510. value: "360734",
  27511. label: "寻乌县" },
  27512. {
  27513. value: "360735",
  27514. label: "石城县" },
  27515. {
  27516. value: "360781",
  27517. label: "瑞金市" },
  27518. {
  27519. value: "360703",
  27520. label: "南康区" }] },
  27521. {
  27522. value: "360800",
  27523. label: "吉安市",
  27524. children: [{
  27525. value: "360802",
  27526. label: "吉州区" },
  27527. {
  27528. value: "360803",
  27529. label: "青原区" },
  27530. {
  27531. value: "360821",
  27532. label: "吉安县" },
  27533. {
  27534. value: "360822",
  27535. label: "吉水县" },
  27536. {
  27537. value: "360823",
  27538. label: "峡江县" },
  27539. {
  27540. value: "360824",
  27541. label: "新干县" },
  27542. {
  27543. value: "360825",
  27544. label: "永丰县" },
  27545. {
  27546. value: "360826",
  27547. label: "泰和县" },
  27548. {
  27549. value: "360827",
  27550. label: "遂川县" },
  27551. {
  27552. value: "360828",
  27553. label: "万安县" },
  27554. {
  27555. value: "360829",
  27556. label: "安福县" },
  27557. {
  27558. value: "360830",
  27559. label: "永新县" },
  27560. {
  27561. value: "360881",
  27562. label: "井冈山市" }] },
  27563. {
  27564. value: "360900",
  27565. label: "宜春市",
  27566. children: [{
  27567. value: "360902",
  27568. label: "袁州区" },
  27569. {
  27570. value: "360921",
  27571. label: "奉新县" },
  27572. {
  27573. value: "360922",
  27574. label: "万载县" },
  27575. {
  27576. value: "360923",
  27577. label: "上高县" },
  27578. {
  27579. value: "360924",
  27580. label: "宜丰县" },
  27581. {
  27582. value: "360925",
  27583. label: "靖安县" },
  27584. {
  27585. value: "360926",
  27586. label: "铜鼓县" },
  27587. {
  27588. value: "360981",
  27589. label: "丰城市" },
  27590. {
  27591. value: "360982",
  27592. label: "樟树市" },
  27593. {
  27594. value: "360983",
  27595. label: "高安市" }] },
  27596. {
  27597. value: "361000",
  27598. label: "抚州市",
  27599. children: [{
  27600. value: "361002",
  27601. label: "临川区" },
  27602. {
  27603. value: "361021",
  27604. label: "南城县" },
  27605. {
  27606. value: "361022",
  27607. label: "黎川县" },
  27608. {
  27609. value: "361023",
  27610. label: "南丰县" },
  27611. {
  27612. value: "361024",
  27613. label: "崇仁县" },
  27614. {
  27615. value: "361025",
  27616. label: "乐安县" },
  27617. {
  27618. value: "361026",
  27619. label: "宜黄县" },
  27620. {
  27621. value: "361027",
  27622. label: "金溪县" },
  27623. {
  27624. value: "361028",
  27625. label: "资溪县" },
  27626. {
  27627. value: "361003",
  27628. label: "东乡区" },
  27629. {
  27630. value: "361030",
  27631. label: "广昌县" }] },
  27632. {
  27633. value: "361100",
  27634. label: "上饶市",
  27635. children: [{
  27636. value: "361102",
  27637. label: "信州区" },
  27638. {
  27639. value: "361121",
  27640. label: "上饶县" },
  27641. {
  27642. value: "361103",
  27643. label: "广丰区" },
  27644. {
  27645. value: "361123",
  27646. label: "玉山县" },
  27647. {
  27648. value: "361124",
  27649. label: "铅山县" },
  27650. {
  27651. value: "361125",
  27652. label: "横峰县" },
  27653. {
  27654. value: "361126",
  27655. label: "弋阳县" },
  27656. {
  27657. value: "361127",
  27658. label: "余干县" },
  27659. {
  27660. value: "361128",
  27661. label: "鄱阳县" },
  27662. {
  27663. value: "361129",
  27664. label: "万年县" },
  27665. {
  27666. value: "361130",
  27667. label: "婺源县" },
  27668. {
  27669. value: "361181",
  27670. label: "德兴市" }] }] },
  27671. {
  27672. value: '370000',
  27673. label: '山东省',
  27674. children: [{
  27675. value: "370100",
  27676. label: "济南市",
  27677. children: [{
  27678. value: "370102",
  27679. label: "历下区" },
  27680. {
  27681. value: "370103",
  27682. label: "市中区" },
  27683. {
  27684. value: "370104",
  27685. label: "槐荫区" },
  27686. {
  27687. value: "370105",
  27688. label: "天桥区" },
  27689. {
  27690. value: "370112",
  27691. label: "历城区" },
  27692. {
  27693. value: "370113",
  27694. label: "长清区" },
  27695. {
  27696. value: "370124",
  27697. label: "平阴县" },
  27698. {
  27699. value: "370125",
  27700. label: "济阳县" },
  27701. {
  27702. value: "370126",
  27703. label: "商河县" },
  27704. {
  27705. value: "370114",
  27706. label: "章丘区" },
  27707. {
  27708. value: "370171",
  27709. label: "济南高新技术产业开发区" }] },
  27710. {
  27711. value: "370200",
  27712. label: "青岛市",
  27713. children: [{
  27714. value: "370202",
  27715. label: "市南区" },
  27716. {
  27717. value: "370203",
  27718. label: "市北区" },
  27719. {
  27720. value: "370211",
  27721. label: "黄岛区" },
  27722. {
  27723. value: "370212",
  27724. label: "崂山区" },
  27725. {
  27726. value: "370213",
  27727. label: "李沧区" },
  27728. {
  27729. value: "370214",
  27730. label: "城阳区" },
  27731. {
  27732. value: "370281",
  27733. label: "胶州市" },
  27734. {
  27735. value: "370215",
  27736. label: "即墨区" },
  27737. {
  27738. value: "370283",
  27739. label: "平度市" },
  27740. {
  27741. value: "370285",
  27742. label: "莱西市" },
  27743. {
  27744. value: "370271",
  27745. label: "青岛高新技术产业开发区" }] },
  27746. {
  27747. value: "370300",
  27748. label: "淄博市",
  27749. children: [{
  27750. value: "370302",
  27751. label: "淄川区" },
  27752. {
  27753. value: "370303",
  27754. label: "张店区" },
  27755. {
  27756. value: "370304",
  27757. label: "博山区" },
  27758. {
  27759. value: "370305",
  27760. label: "临淄区" },
  27761. {
  27762. value: "370306",
  27763. label: "周村区" },
  27764. {
  27765. value: "370321",
  27766. label: "桓台县" },
  27767. {
  27768. value: "370322",
  27769. label: "高青县" },
  27770. {
  27771. value: "370323",
  27772. label: "沂源县" }] },
  27773. {
  27774. value: "370400",
  27775. label: "枣庄市",
  27776. children: [{
  27777. value: "370402",
  27778. label: "市中区" },
  27779. {
  27780. value: "370403",
  27781. label: "薛城区" },
  27782. {
  27783. value: "370404",
  27784. label: "峄城区" },
  27785. {
  27786. value: "370405",
  27787. label: "台儿庄区" },
  27788. {
  27789. value: "370406",
  27790. label: "山亭区" },
  27791. {
  27792. value: "370481",
  27793. label: "滕州市" }] },
  27794. {
  27795. value: "370500",
  27796. label: "东营市",
  27797. children: [{
  27798. value: "370502",
  27799. label: "东营区" },
  27800. {
  27801. value: "370503",
  27802. label: "河口区" },
  27803. {
  27804. value: "370521",
  27805. label: "垦利县" },
  27806. {
  27807. value: "370522",
  27808. label: "利津县" },
  27809. {
  27810. value: "370523",
  27811. label: "广饶县" },
  27812. {
  27813. value: "370589",
  27814. label: "西城区" },
  27815. {
  27816. value: "370571",
  27817. label: "东营经济技术开发区" },
  27818. {
  27819. value: "370572",
  27820. label: "东营港经济开发区" }] },
  27821. {
  27822. value: "370600",
  27823. label: "烟台市",
  27824. children: [{
  27825. value: "370602",
  27826. label: "芝罘区" },
  27827. {
  27828. value: "370611",
  27829. label: "福山区" },
  27830. {
  27831. value: "370612",
  27832. label: "牟平区" },
  27833. {
  27834. value: "370613",
  27835. label: "莱山区" },
  27836. {
  27837. value: "370634",
  27838. label: "长岛县" },
  27839. {
  27840. value: "370681",
  27841. label: "龙口市" },
  27842. {
  27843. value: "370682",
  27844. label: "莱阳市" },
  27845. {
  27846. value: "370683",
  27847. label: "莱州市" },
  27848. {
  27849. value: "370684",
  27850. label: "蓬莱市" },
  27851. {
  27852. value: "370685",
  27853. label: "招远市" },
  27854. {
  27855. value: "370686",
  27856. label: "栖霞市" },
  27857. {
  27858. value: "370687",
  27859. label: "海阳市" },
  27860. {
  27861. value: "370671",
  27862. label: "烟台高新技术产业开发区" },
  27863. {
  27864. value: "370672",
  27865. label: "烟台经济技术开发区" }] },
  27866. {
  27867. value: "370700",
  27868. label: "潍坊市",
  27869. children: [{
  27870. value: "370702",
  27871. label: "潍城区" },
  27872. {
  27873. value: "370703",
  27874. label: "寒亭区" },
  27875. {
  27876. value: "370704",
  27877. label: "坊子区" },
  27878. {
  27879. value: "370705",
  27880. label: "奎文区" },
  27881. {
  27882. value: "370724",
  27883. label: "临朐县" },
  27884. {
  27885. value: "370725",
  27886. label: "昌乐县" },
  27887. {
  27888. value: "370772",
  27889. label: "潍坊滨海经济技术开发区" },
  27890. {
  27891. value: "370781",
  27892. label: "青州市" },
  27893. {
  27894. value: "370782",
  27895. label: "诸城市" },
  27896. {
  27897. value: "370783",
  27898. label: "寿光市" },
  27899. {
  27900. value: "370784",
  27901. label: "安丘市" },
  27902. {
  27903. value: "370785",
  27904. label: "高密市" },
  27905. {
  27906. value: "370786",
  27907. label: "昌邑市" }] },
  27908. {
  27909. value: "370800",
  27910. label: "济宁市",
  27911. children: [{
  27912. value: "370811",
  27913. label: "任城区" },
  27914. {
  27915. value: "370826",
  27916. label: "微山县" },
  27917. {
  27918. value: "370827",
  27919. label: "鱼台县" },
  27920. {
  27921. value: "370828",
  27922. label: "金乡县" },
  27923. {
  27924. value: "370829",
  27925. label: "嘉祥县" },
  27926. {
  27927. value: "370830",
  27928. label: "汶上县" },
  27929. {
  27930. value: "370831",
  27931. label: "泗水县" },
  27932. {
  27933. value: "370832",
  27934. label: "梁山县" },
  27935. {
  27936. value: "370881",
  27937. label: "曲阜市" },
  27938. {
  27939. value: "370812",
  27940. label: "兖州区" },
  27941. {
  27942. value: "370883",
  27943. label: "邹城市" },
  27944. {
  27945. value: "370871",
  27946. label: "济宁高新技术产业开发区" }] },
  27947. {
  27948. value: "370900",
  27949. label: "泰安市",
  27950. children: [{
  27951. value: "370902",
  27952. label: "泰山区" },
  27953. {
  27954. value: "370903",
  27955. label: "岱岳区" },
  27956. {
  27957. value: "370921",
  27958. label: "宁阳县" },
  27959. {
  27960. value: "370923",
  27961. label: "东平县" },
  27962. {
  27963. value: "370982",
  27964. label: "新泰市" },
  27965. {
  27966. value: "370983",
  27967. label: "肥城市" }] },
  27968. {
  27969. value: "371000",
  27970. label: "威海市",
  27971. children: [{
  27972. value: "371002",
  27973. label: "环翠区" },
  27974. {
  27975. value: "371003",
  27976. label: "文登区" },
  27977. {
  27978. value: "371082",
  27979. label: "荣成市" },
  27980. {
  27981. value: "371083",
  27982. label: "乳山市" },
  27983. {
  27984. value: "371071",
  27985. label: "威海火炬高技术产业开发区" },
  27986. {
  27987. value: "371072",
  27988. label: "威海经济技术开发区" },
  27989. {
  27990. value: "371073",
  27991. label: "威海临港经济技术开发区" }] },
  27992. {
  27993. value: "371100",
  27994. label: "日照市",
  27995. children: [{
  27996. value: "371102",
  27997. label: "东港区" },
  27998. {
  27999. value: "371103",
  28000. label: "岚山区" },
  28001. {
  28002. value: "371121",
  28003. label: "五莲县" },
  28004. {
  28005. value: "371122",
  28006. label: "莒县" },
  28007. {
  28008. value: "371171",
  28009. label: "日照经济技术开发区" },
  28010. {
  28011. value: "371172",
  28012. label: "日照国际海洋城" }] },
  28013. {
  28014. value: "371200",
  28015. label: "莱芜市",
  28016. children: [{
  28017. value: "371202",
  28018. label: "莱城区" },
  28019. {
  28020. value: "371203",
  28021. label: "钢城区" }] },
  28022. {
  28023. value: "371300",
  28024. label: "临沂市",
  28025. children: [{
  28026. value: "371302",
  28027. label: "兰山区" },
  28028. {
  28029. value: "371311",
  28030. label: "罗庄区" },
  28031. {
  28032. value: "371312",
  28033. label: "河东区" },
  28034. {
  28035. value: "371321",
  28036. label: "沂南县" },
  28037. {
  28038. value: "371322",
  28039. label: "郯城县" },
  28040. {
  28041. value: "371323",
  28042. label: "沂水县" },
  28043. {
  28044. value: "371324",
  28045. label: "兰陵县" },
  28046. {
  28047. value: "371325",
  28048. label: "费县" },
  28049. {
  28050. value: "371326",
  28051. label: "平邑县" },
  28052. {
  28053. value: "371327",
  28054. label: "莒南县" },
  28055. {
  28056. value: "371328",
  28057. label: "蒙阴县" },
  28058. {
  28059. value: "371329",
  28060. label: "临沭县" },
  28061. {
  28062. value: "371371",
  28063. label: "临沂高新技术产业开发区" },
  28064. {
  28065. value: "371373",
  28066. label: "临沂临港经济开发区" },
  28067. {
  28068. value: "371372",
  28069. label: "临沂经济技术开发区" }] },
  28070. {
  28071. value: "371400",
  28072. label: "德州市",
  28073. children: [{
  28074. value: "371402",
  28075. label: "德城区" },
  28076. {
  28077. value: "371403",
  28078. label: "陵城区" },
  28079. {
  28080. value: "371422",
  28081. label: "宁津县" },
  28082. {
  28083. value: "371423",
  28084. label: "庆云县" },
  28085. {
  28086. value: "371424",
  28087. label: "临邑县" },
  28088. {
  28089. value: "371425",
  28090. label: "齐河县" },
  28091. {
  28092. value: "371426",
  28093. label: "平原县" },
  28094. {
  28095. value: "371427",
  28096. label: "夏津县" },
  28097. {
  28098. value: "371428",
  28099. label: "武城县" },
  28100. {
  28101. value: "371481",
  28102. label: "乐陵市" },
  28103. {
  28104. value: "371482",
  28105. label: "禹城市" },
  28106. {
  28107. value: "371471",
  28108. label: "德州经济技术开发区" },
  28109. {
  28110. value: "371472",
  28111. label: "德州运河经济开发区" }] },
  28112. {
  28113. value: "371500",
  28114. label: "聊城市",
  28115. children: [{
  28116. value: "371502",
  28117. label: "东昌府区" },
  28118. {
  28119. value: "371521",
  28120. label: "阳谷县" },
  28121. {
  28122. value: "371522",
  28123. label: "莘县" },
  28124. {
  28125. value: "371523",
  28126. label: "茌平县" },
  28127. {
  28128. value: "371524",
  28129. label: "东阿县" },
  28130. {
  28131. value: "371525",
  28132. label: "冠县" },
  28133. {
  28134. value: "371526",
  28135. label: "高唐县" },
  28136. {
  28137. value: "371581",
  28138. label: "临清市" }] },
  28139. {
  28140. value: "371600",
  28141. label: "滨州市",
  28142. children: [{
  28143. value: "371602",
  28144. label: "滨城区" },
  28145. {
  28146. value: "371621",
  28147. label: "惠民县" },
  28148. {
  28149. value: "371622",
  28150. label: "阳信县" },
  28151. {
  28152. value: "371623",
  28153. label: "无棣县" },
  28154. {
  28155. value: "371603",
  28156. label: "沾化区" },
  28157. {
  28158. value: "371625",
  28159. label: "博兴县" },
  28160. {
  28161. value: "371626",
  28162. label: "邹平县" }] },
  28163. {
  28164. value: "371700",
  28165. label: "菏泽市",
  28166. children: [{
  28167. value: "371702",
  28168. label: "牡丹区" },
  28169. {
  28170. value: "371721",
  28171. label: "曹县" },
  28172. {
  28173. value: "371722",
  28174. label: "单县" },
  28175. {
  28176. value: "371723",
  28177. label: "成武县" },
  28178. {
  28179. value: "371724",
  28180. label: "巨野县" },
  28181. {
  28182. value: "371725",
  28183. label: "郓城县" },
  28184. {
  28185. value: "371726",
  28186. label: "鄄城县" },
  28187. {
  28188. value: "371727",
  28189. label: "定陶区" },
  28190. {
  28191. value: "371728",
  28192. label: "东明县" },
  28193. {
  28194. value: "371771",
  28195. label: "菏泽经济技术开发区" },
  28196. {
  28197. value: "371772",
  28198. label: "菏泽高新技术开发区" }] }] },
  28199. {
  28200. value: '410000',
  28201. label: '河南省',
  28202. children: [{
  28203. value: "410100",
  28204. label: "郑州市",
  28205. children: [{
  28206. value: "410102",
  28207. label: "中原区" },
  28208. {
  28209. value: "410103",
  28210. label: "二七区" },
  28211. {
  28212. value: "410104",
  28213. label: "管城回族区" },
  28214. {
  28215. value: "410105",
  28216. label: "金水区" },
  28217. {
  28218. value: "410106",
  28219. label: "上街区" },
  28220. {
  28221. value: "410108",
  28222. label: "惠济区" },
  28223. {
  28224. value: "410122",
  28225. label: "中牟县" },
  28226. {
  28227. value: "410181",
  28228. label: "巩义市" },
  28229. {
  28230. value: "410182",
  28231. label: "荥阳市" },
  28232. {
  28233. value: "410183",
  28234. label: "新密市" },
  28235. {
  28236. value: "410184",
  28237. label: "新郑市" },
  28238. {
  28239. value: "410185",
  28240. label: "登封市" },
  28241. {
  28242. value: "410171",
  28243. label: "郑州经济技术开发区" },
  28244. {
  28245. value: "410172",
  28246. label: "郑州高新技术产业开发区" },
  28247. {
  28248. value: "410173",
  28249. label: "郑州航空港经济综合实验区" }] },
  28250. {
  28251. value: "410200",
  28252. label: "开封市",
  28253. children: [{
  28254. value: "410202",
  28255. label: "龙亭区" },
  28256. {
  28257. value: "410203",
  28258. label: "顺河回族区" },
  28259. {
  28260. value: "410204",
  28261. label: "鼓楼区" },
  28262. {
  28263. value: "410205",
  28264. label: "禹王台区" },
  28265. {
  28266. value: "410211",
  28267. label: "金明区" },
  28268. {
  28269. value: "410221",
  28270. label: "杞县" },
  28271. {
  28272. value: "410222",
  28273. label: "通许县" },
  28274. {
  28275. value: "410223",
  28276. label: "尉氏县" },
  28277. {
  28278. value: "410225",
  28279. label: "兰考县" },
  28280. {
  28281. value: "410212",
  28282. label: "祥符区" }] },
  28283. {
  28284. value: "410300",
  28285. label: "洛阳市",
  28286. children: [{
  28287. value: "410302",
  28288. label: "老城区" },
  28289. {
  28290. value: "410303",
  28291. label: "西工区" },
  28292. {
  28293. value: "410304",
  28294. label: "廛河回族区" },
  28295. {
  28296. value: "410305",
  28297. label: "涧西区" },
  28298. {
  28299. value: "410306",
  28300. label: "吉利区" },
  28301. {
  28302. value: "410307",
  28303. label: "洛龙区" },
  28304. {
  28305. value: "410322",
  28306. label: "孟津县" },
  28307. {
  28308. value: "410323",
  28309. label: "新安县" },
  28310. {
  28311. value: "410324",
  28312. label: "栾川县" },
  28313. {
  28314. value: "410325",
  28315. label: "嵩县" },
  28316. {
  28317. value: "410326",
  28318. label: "汝阳县" },
  28319. {
  28320. value: "410327",
  28321. label: "宜阳县" },
  28322. {
  28323. value: "410328",
  28324. label: "洛宁县" },
  28325. {
  28326. value: "410329",
  28327. label: "伊川县" },
  28328. {
  28329. value: "410381",
  28330. label: "偃师市" },
  28331. {
  28332. value: "410371",
  28333. label: "洛阳高新技术产业开发区" },
  28334. {
  28335. value: "471005",
  28336. label: "其它区" }] },
  28337. {
  28338. value: "410400",
  28339. label: "平顶山市",
  28340. children: [{
  28341. value: "410402",
  28342. label: "新华区" },
  28343. {
  28344. value: "410403",
  28345. label: "卫东区" },
  28346. {
  28347. value: "410404",
  28348. label: "石龙区" },
  28349. {
  28350. value: "410411",
  28351. label: "湛河区" },
  28352. {
  28353. value: "410421",
  28354. label: "宝丰县" },
  28355. {
  28356. value: "410422",
  28357. label: "叶县" },
  28358. {
  28359. value: "410423",
  28360. label: "鲁山县" },
  28361. {
  28362. value: "410425",
  28363. label: "郏县" },
  28364. {
  28365. value: "410481",
  28366. label: "舞钢市" },
  28367. {
  28368. value: "410482",
  28369. label: "汝州市" },
  28370. {
  28371. value: "410471",
  28372. label: "平顶山高新技术产业开发区" },
  28373. {
  28374. value: "410472",
  28375. label: "平顶山市新城区" }] },
  28376. {
  28377. value: "410500",
  28378. label: "安阳市",
  28379. children: [{
  28380. value: "410502",
  28381. label: "文峰区" },
  28382. {
  28383. value: "410503",
  28384. label: "北关区" },
  28385. {
  28386. value: "410505",
  28387. label: "殷都区" },
  28388. {
  28389. value: "410506",
  28390. label: "龙安区" },
  28391. {
  28392. value: "410522",
  28393. label: "安阳县" },
  28394. {
  28395. value: "410523",
  28396. label: "汤阴县" },
  28397. {
  28398. value: "410526",
  28399. label: "滑县" },
  28400. {
  28401. value: "410527",
  28402. label: "内黄县" },
  28403. {
  28404. value: "410581",
  28405. label: "林州市" },
  28406. {
  28407. value: "410571",
  28408. label: "安阳高新技术产业开发区" }] },
  28409. {
  28410. value: "410600",
  28411. label: "鹤壁市",
  28412. children: [{
  28413. value: "410602",
  28414. label: "鹤山区" },
  28415. {
  28416. value: "410603",
  28417. label: "山城区" },
  28418. {
  28419. value: "410611",
  28420. label: "淇滨区" },
  28421. {
  28422. value: "410621",
  28423. label: "浚县" },
  28424. {
  28425. value: "410622",
  28426. label: "淇县" },
  28427. {
  28428. value: "410671",
  28429. label: "鹤壁经济技术开发区" }] },
  28430. {
  28431. value: "410700",
  28432. label: "新乡市",
  28433. children: [{
  28434. value: "410702",
  28435. label: "红旗区" },
  28436. {
  28437. value: "410703",
  28438. label: "卫滨区" },
  28439. {
  28440. value: "410704",
  28441. label: "凤泉区" },
  28442. {
  28443. value: "410711",
  28444. label: "牧野区" },
  28445. {
  28446. value: "410721",
  28447. label: "新乡县" },
  28448. {
  28449. value: "410724",
  28450. label: "获嘉县" },
  28451. {
  28452. value: "410725",
  28453. label: "原阳县" },
  28454. {
  28455. value: "410726",
  28456. label: "延津县" },
  28457. {
  28458. value: "410727",
  28459. label: "封丘县" },
  28460. {
  28461. value: "410728",
  28462. label: "长垣县" },
  28463. {
  28464. value: "410781",
  28465. label: "卫辉市" },
  28466. {
  28467. value: "410782",
  28468. label: "辉县市" },
  28469. {
  28470. value: "410771",
  28471. label: "新乡高新技术产业开发区" },
  28472. {
  28473. value: "410773",
  28474. label: "新乡市平原城乡一体化示范区" },
  28475. {
  28476. value: "410772",
  28477. label: "新乡经济技术开发区" }] },
  28478. {
  28479. value: "410800",
  28480. label: "焦作市",
  28481. children: [{
  28482. value: "410802",
  28483. label: "解放区" },
  28484. {
  28485. value: "410803",
  28486. label: "中站区" },
  28487. {
  28488. value: "410804",
  28489. label: "马村区" },
  28490. {
  28491. value: "410811",
  28492. label: "山阳区" },
  28493. {
  28494. value: "410821",
  28495. label: "修武县" },
  28496. {
  28497. value: "410822",
  28498. label: "博爱县" },
  28499. {
  28500. value: "410823",
  28501. label: "武陟县" },
  28502. {
  28503. value: "410825",
  28504. label: "温县" },
  28505. {
  28506. value: "410882",
  28507. label: "沁阳市" },
  28508. {
  28509. value: "410883",
  28510. label: "孟州市" },
  28511. {
  28512. value: "410871",
  28513. label: "焦作城乡一体化示范区" }] },
  28514. {
  28515. value: "410900",
  28516. label: "濮阳市",
  28517. children: [{
  28518. value: "410902",
  28519. label: "华龙区" },
  28520. {
  28521. value: "410922",
  28522. label: "清丰县" },
  28523. {
  28524. value: "410923",
  28525. label: "南乐县" },
  28526. {
  28527. value: "410926",
  28528. label: "范县" },
  28529. {
  28530. value: "410927",
  28531. label: "台前县" },
  28532. {
  28533. value: "410928",
  28534. label: "濮阳县" },
  28535. {
  28536. value: "410971",
  28537. label: "河南濮阳工业园区" },
  28538. {
  28539. value: "410972",
  28540. label: "濮阳经济技术开发区" }] },
  28541. {
  28542. value: "411000",
  28543. label: "许昌市",
  28544. children: [{
  28545. value: "411002",
  28546. label: "魏都区" },
  28547. {
  28548. value: "411003",
  28549. label: "建安区" },
  28550. {
  28551. value: "411024",
  28552. label: "鄢陵县" },
  28553. {
  28554. value: "411025",
  28555. label: "襄城县" },
  28556. {
  28557. value: "411081",
  28558. label: "禹州市" },
  28559. {
  28560. value: "411082",
  28561. label: "长葛市" },
  28562. {
  28563. value: "411071",
  28564. label: "许昌经济技术开发区" }] },
  28565. {
  28566. value: "411100",
  28567. label: "漯河市",
  28568. children: [{
  28569. value: "411102",
  28570. label: "源汇区" },
  28571. {
  28572. value: "411103",
  28573. label: "郾城区" },
  28574. {
  28575. value: "411104",
  28576. label: "召陵区" },
  28577. {
  28578. value: "411121",
  28579. label: "舞阳县" },
  28580. {
  28581. value: "411122",
  28582. label: "临颍县" },
  28583. {
  28584. value: "411171",
  28585. label: "漯河经济技术开发区" }] },
  28586. {
  28587. value: "411200",
  28588. label: "三门峡市",
  28589. children: [{
  28590. value: "411202",
  28591. label: "湖滨区" },
  28592. {
  28593. value: "411221",
  28594. label: "渑池县" },
  28595. {
  28596. value: "411222",
  28597. label: "陕县" },
  28598. {
  28599. value: "411224",
  28600. label: "卢氏县" },
  28601. {
  28602. value: "411281",
  28603. label: "义马市" },
  28604. {
  28605. value: "411282",
  28606. label: "灵宝市" },
  28607. {
  28608. value: "411203",
  28609. label: "陕州区" },
  28610. {
  28611. value: "411271",
  28612. label: "河南三门峡经济开发区" }] },
  28613. {
  28614. value: "411300",
  28615. label: "南阳市",
  28616. children: [{
  28617. value: "411302",
  28618. label: "宛城区" },
  28619. {
  28620. value: "411303",
  28621. label: "卧龙区" },
  28622. {
  28623. value: "411321",
  28624. label: "南召县" },
  28625. {
  28626. value: "411322",
  28627. label: "方城县" },
  28628. {
  28629. value: "411323",
  28630. label: "西峡县" },
  28631. {
  28632. value: "411324",
  28633. label: "镇平县" },
  28634. {
  28635. value: "411325",
  28636. label: "内乡县" },
  28637. {
  28638. value: "411326",
  28639. label: "淅川县" },
  28640. {
  28641. value: "411327",
  28642. label: "社旗县" },
  28643. {
  28644. value: "411328",
  28645. label: "唐河县" },
  28646. {
  28647. value: "411329",
  28648. label: "新野县" },
  28649. {
  28650. value: "411330",
  28651. label: "桐柏县" },
  28652. {
  28653. value: "411381",
  28654. label: "邓州市" },
  28655. {
  28656. value: "411371",
  28657. label: "南阳高新技术产业开发区" },
  28658. {
  28659. value: "411372",
  28660. label: "南阳市城乡一体化示范区" }] },
  28661. {
  28662. value: "411400",
  28663. label: "商丘市",
  28664. children: [{
  28665. value: "411402",
  28666. label: "梁园区" },
  28667. {
  28668. value: "411403",
  28669. label: "睢阳区" },
  28670. {
  28671. value: "411421",
  28672. label: "民权县" },
  28673. {
  28674. value: "411422",
  28675. label: "睢县" },
  28676. {
  28677. value: "411423",
  28678. label: "宁陵县" },
  28679. {
  28680. value: "411424",
  28681. label: "柘城县" },
  28682. {
  28683. value: "411425",
  28684. label: "虞城县" },
  28685. {
  28686. value: "411426",
  28687. label: "夏邑县" },
  28688. {
  28689. value: "411481",
  28690. label: "永城市" },
  28691. {
  28692. value: "411471",
  28693. label: "豫东综合物流产业聚集区" },
  28694. {
  28695. value: "411472",
  28696. label: "河南商丘经济开发" }] },
  28697. {
  28698. value: "411500",
  28699. label: "信阳市",
  28700. children: [{
  28701. value: "411502",
  28702. label: "浉河区" },
  28703. {
  28704. value: "411503",
  28705. label: "平桥区" },
  28706. {
  28707. value: "411521",
  28708. label: "罗山县" },
  28709. {
  28710. value: "411522",
  28711. label: "光山县" },
  28712. {
  28713. value: "411523",
  28714. label: "新县" },
  28715. {
  28716. value: "411524",
  28717. label: "商城县" },
  28718. {
  28719. value: "411525",
  28720. label: "固始县" },
  28721. {
  28722. value: "411526",
  28723. label: "潢川县" },
  28724. {
  28725. value: "411527",
  28726. label: "淮滨县" },
  28727. {
  28728. value: "411528",
  28729. label: "息县" },
  28730. {
  28731. value: "411571",
  28732. label: "信阳高新技术产业开发区" }] },
  28733. {
  28734. value: "411600",
  28735. label: "周口市",
  28736. children: [{
  28737. value: "411602",
  28738. label: "川汇区" },
  28739. {
  28740. value: "411621",
  28741. label: "扶沟县" },
  28742. {
  28743. value: "411622",
  28744. label: "西华县" },
  28745. {
  28746. value: "411623",
  28747. label: "商水县" },
  28748. {
  28749. value: "411624",
  28750. label: "沈丘县" },
  28751. {
  28752. value: "411625",
  28753. label: "郸城县" },
  28754. {
  28755. value: "411626",
  28756. label: "淮阳县" },
  28757. {
  28758. value: "411627",
  28759. label: "太康县" },
  28760. {
  28761. value: "411628",
  28762. label: "鹿邑县" },
  28763. {
  28764. value: "411681",
  28765. label: "项城市" },
  28766. {
  28767. value: "411671",
  28768. label: "河南周口经济开发区" }] },
  28769. {
  28770. value: "411700",
  28771. label: "驻马店市",
  28772. children: [{
  28773. value: "411702",
  28774. label: "驿城区" },
  28775. {
  28776. value: "411721",
  28777. label: "西平县" },
  28778. {
  28779. value: "411722",
  28780. label: "上蔡县" },
  28781. {
  28782. value: "411723",
  28783. label: "平舆县" },
  28784. {
  28785. value: "411724",
  28786. label: "正阳县" },
  28787. {
  28788. value: "411725",
  28789. label: "确山县" },
  28790. {
  28791. value: "411726",
  28792. label: "泌阳县" },
  28793. {
  28794. value: "411727",
  28795. label: "汝南县" },
  28796. {
  28797. value: "411628",
  28798. label: "遂平县" },
  28799. {
  28800. value: "411729",
  28801. label: "新蔡县" },
  28802. {
  28803. value: "411771",
  28804. label: "河南驻马店经济开发区" }] }] },
  28805. {
  28806. value: '420000',
  28807. label: '湖北省',
  28808. children: [{
  28809. value: "420100",
  28810. label: "武汉市",
  28811. children: [{
  28812. value: "420101",
  28813. label: "市辖区" },
  28814. {
  28815. value: "420102",
  28816. label: "江岸区" },
  28817. {
  28818. value: "420103",
  28819. label: "江汉区" },
  28820. {
  28821. value: "420104",
  28822. label: "硚口区" },
  28823. {
  28824. value: "420105",
  28825. label: "汉阳区" },
  28826. {
  28827. value: "420106",
  28828. label: "武昌区" },
  28829. {
  28830. value: "420107",
  28831. label: "青山区" },
  28832. {
  28833. value: "420111",
  28834. label: "洪山区" },
  28835. {
  28836. value: "420112",
  28837. label: "东西湖区" },
  28838. {
  28839. value: "420113",
  28840. label: "汉南区" },
  28841. {
  28842. value: "420114",
  28843. label: "蔡甸区" },
  28844. {
  28845. value: "420115",
  28846. label: "江夏区" },
  28847. {
  28848. value: "420116",
  28849. label: "黄陂区" },
  28850. {
  28851. value: "420117",
  28852. label: "新洲区" }] },
  28853. {
  28854. value: "420200",
  28855. label: "黄石市",
  28856. children: [{
  28857. value: "420201",
  28858. label: "市辖区" },
  28859. {
  28860. value: "420202",
  28861. label: "黄石港区" },
  28862. {
  28863. value: "420203",
  28864. label: "西塞山区" },
  28865. {
  28866. value: "420204",
  28867. label: "下陆区" },
  28868. {
  28869. value: "420205",
  28870. label: "铁山区" },
  28871. {
  28872. value: "420222",
  28873. label: "阳新县" },
  28874. {
  28875. value: "420281",
  28876. label: "大冶市" }] },
  28877. {
  28878. value: "420300",
  28879. label: "十堰市",
  28880. children: [{
  28881. value: "420301",
  28882. label: "市辖区" },
  28883. {
  28884. value: "420302",
  28885. label: "茅箭区" },
  28886. {
  28887. value: "420303",
  28888. label: "张湾区" },
  28889. {
  28890. value: "420304",
  28891. label: "郧阳区" },
  28892. {
  28893. value: "420322",
  28894. label: "郧西县" },
  28895. {
  28896. value: "420323",
  28897. label: "竹山县" },
  28898. {
  28899. value: "420324",
  28900. label: "竹溪县" },
  28901. {
  28902. value: "420325",
  28903. label: "房县" },
  28904. {
  28905. value: "420381",
  28906. label: "丹江口市" }] },
  28907. {
  28908. value: "420500",
  28909. label: "宜昌市",
  28910. children: [{
  28911. value: "420501",
  28912. label: "市辖区" },
  28913. {
  28914. value: "420502",
  28915. label: "西陵区" },
  28916. {
  28917. value: "420503",
  28918. label: "伍家岗区" },
  28919. {
  28920. value: "420504",
  28921. label: "点军区" },
  28922. {
  28923. value: "420505",
  28924. label: "猇亭区" },
  28925. {
  28926. value: "420506",
  28927. label: "夷陵区" },
  28928. {
  28929. value: "420525",
  28930. label: "远安县" },
  28931. {
  28932. value: "420526",
  28933. label: "兴山县" },
  28934. {
  28935. value: "420527",
  28936. label: "秭归县" },
  28937. {
  28938. value: "420528",
  28939. label: "长阳土家族自治县" },
  28940. {
  28941. value: "420529",
  28942. label: "五峰土家族自治县" },
  28943. {
  28944. value: "420581",
  28945. label: "宜都市" },
  28946. {
  28947. value: "420582",
  28948. label: "当阳市" },
  28949. {
  28950. value: "420583",
  28951. label: "枝江市" }] },
  28952. {
  28953. value: "420600",
  28954. label: "襄阳市",
  28955. children: [{
  28956. value: "420601",
  28957. label: "市辖区" },
  28958. {
  28959. value: "420602",
  28960. label: "襄城区" },
  28961. {
  28962. value: "420606",
  28963. label: "樊城区" },
  28964. {
  28965. value: "420607",
  28966. label: "襄州区" },
  28967. {
  28968. value: "420624",
  28969. label: "南漳县" },
  28970. {
  28971. value: "420625",
  28972. label: "谷城县" },
  28973. {
  28974. value: "420626",
  28975. label: "保康县" },
  28976. {
  28977. value: "420682",
  28978. label: "老河口市" },
  28979. {
  28980. value: "420683",
  28981. label: "枣阳市" },
  28982. {
  28983. value: "420684",
  28984. label: "宜城市" }] },
  28985. {
  28986. value: "420700",
  28987. label: "鄂州市",
  28988. children: [{
  28989. value: "420701",
  28990. label: "市辖区" },
  28991. {
  28992. value: "420702",
  28993. label: "梁子湖区" },
  28994. {
  28995. value: "420703",
  28996. label: "华容区" },
  28997. {
  28998. value: "420704",
  28999. label: "鄂城区" }] },
  29000. {
  29001. value: "420800",
  29002. label: "荆门市",
  29003. children: [{
  29004. value: "420801",
  29005. label: "市辖区" },
  29006. {
  29007. value: "420802",
  29008. label: "东宝区" },
  29009. {
  29010. value: "420804",
  29011. label: "掇刀区" },
  29012. {
  29013. value: "420821",
  29014. label: "京山县" },
  29015. {
  29016. value: "420822",
  29017. label: "沙洋县" },
  29018. {
  29019. value: "420881",
  29020. label: "钟祥市" }] },
  29021. {
  29022. value: "420900",
  29023. label: "孝感市",
  29024. children: [{
  29025. value: "420901",
  29026. label: "市辖区" },
  29027. {
  29028. value: "420902",
  29029. label: "孝南区" },
  29030. {
  29031. value: "420921",
  29032. label: "孝昌县" },
  29033. {
  29034. value: "420922",
  29035. label: "大悟县" },
  29036. {
  29037. value: "420923",
  29038. label: "云梦县" },
  29039. {
  29040. value: "420981",
  29041. label: "应城市" },
  29042. {
  29043. value: "420982",
  29044. label: "安陆市" },
  29045. {
  29046. value: "420984",
  29047. label: "汉川市" }] },
  29048. {
  29049. value: "421000",
  29050. label: "荆州市",
  29051. children: [{
  29052. value: "421001",
  29053. label: "市辖区" },
  29054. {
  29055. value: "421002",
  29056. label: "沙市区" },
  29057. {
  29058. value: "421003",
  29059. label: "荆州区" },
  29060. {
  29061. value: "421022",
  29062. label: "公安县" },
  29063. {
  29064. value: "421023",
  29065. label: "监利县" },
  29066. {
  29067. value: "421024",
  29068. label: "江陵县" },
  29069. {
  29070. value: "421071",
  29071. label: "荆州经济技术开发区" },
  29072. {
  29073. value: "421081",
  29074. label: "石首市" },
  29075. {
  29076. value: "421083",
  29077. label: "洪湖市" },
  29078. {
  29079. value: "421087",
  29080. label: "松滋市" }] },
  29081. {
  29082. value: "421100",
  29083. label: "黄冈市",
  29084. children: [{
  29085. value: "421101",
  29086. label: "市辖区" },
  29087. {
  29088. value: "421102",
  29089. label: "黄州区" },
  29090. {
  29091. value: "421121",
  29092. label: "团风县" },
  29093. {
  29094. value: "421122",
  29095. label: "红安县" },
  29096. {
  29097. value: "421123",
  29098. label: "罗田县" },
  29099. {
  29100. value: "421124",
  29101. label: "英山县" },
  29102. {
  29103. value: "421125",
  29104. label: "浠水县" },
  29105. {
  29106. value: "421126",
  29107. label: "蕲春县" },
  29108. {
  29109. value: "421127",
  29110. label: "黄梅县" },
  29111. {
  29112. value: "421171",
  29113. label: "龙感湖管理区" },
  29114. {
  29115. value: "421181",
  29116. label: "麻城市" },
  29117. {
  29118. value: "421182",
  29119. label: "武穴市" }] },
  29120. {
  29121. value: "421200",
  29122. label: "咸宁市",
  29123. children: [{
  29124. value: "421201",
  29125. label: "市辖区" },
  29126. {
  29127. value: "421202",
  29128. label: "咸安区" },
  29129. {
  29130. value: "421221",
  29131. label: "嘉鱼县" },
  29132. {
  29133. value: "421222",
  29134. label: "通城县" },
  29135. {
  29136. value: "421223",
  29137. label: "崇阳县" },
  29138. {
  29139. value: "421224",
  29140. label: "通山县" },
  29141. {
  29142. value: "421281",
  29143. label: "赤壁市" }] },
  29144. {
  29145. value: "421300",
  29146. label: "随州市",
  29147. children: [{
  29148. value: "421301",
  29149. label: "市辖区" },
  29150. {
  29151. value: "421303",
  29152. label: "曾都区" },
  29153. {
  29154. value: "421321",
  29155. label: "随县" },
  29156. {
  29157. value: "421381",
  29158. label: "广水市" }] },
  29159. {
  29160. value: "422800",
  29161. label: "恩施土家族苗族自治州",
  29162. children: [{
  29163. value: "422801",
  29164. label: "恩施市" },
  29165. {
  29166. value: "422802",
  29167. label: "利川市" },
  29168. {
  29169. value: "422822",
  29170. label: "建始县" },
  29171. {
  29172. value: "422823",
  29173. label: "巴东县" },
  29174. {
  29175. value: "422825",
  29176. label: "宣恩县" },
  29177. {
  29178. value: "422826",
  29179. label: "咸丰县" },
  29180. {
  29181. value: "422827",
  29182. label: "来凤县" },
  29183. {
  29184. value: "422828",
  29185. label: "鹤峰县" }] },
  29186. {
  29187. value: "429000",
  29188. label: "省直辖县级行政区划",
  29189. children: [{
  29190. value: "429004",
  29191. label: "仙桃市" },
  29192. {
  29193. value: "429005",
  29194. label: "潜江市" },
  29195. {
  29196. value: "429006",
  29197. label: "天门市" },
  29198. {
  29199. value: "429021",
  29200. label: "神农架林区" }] }] },
  29201. {
  29202. value: '430000',
  29203. label: '湖南省',
  29204. children: [{
  29205. value: "430100",
  29206. label: "长沙市",
  29207. children: [{
  29208. value: "430101",
  29209. label: "市辖区" },
  29210. {
  29211. value: "430102",
  29212. label: "芙蓉区" },
  29213. {
  29214. value: "430103",
  29215. label: "天心区" },
  29216. {
  29217. value: "430104",
  29218. label: "岳麓区" },
  29219. {
  29220. value: "430105",
  29221. label: "开福区" },
  29222. {
  29223. value: "430111",
  29224. label: "雨花区" },
  29225. {
  29226. value: "430112",
  29227. label: "望城区" },
  29228. {
  29229. value: "430121",
  29230. label: "长沙县" },
  29231. {
  29232. value: "430181",
  29233. label: "浏阳市" },
  29234. {
  29235. value: "430182",
  29236. label: "宁乡市" }] },
  29237. {
  29238. value: "430200",
  29239. label: "株洲市",
  29240. children: [{
  29241. value: "430201",
  29242. label: "市辖区" },
  29243. {
  29244. value: "430202",
  29245. label: "荷塘区" },
  29246. {
  29247. value: "430203",
  29248. label: "芦淞区" },
  29249. {
  29250. value: "430204",
  29251. label: "石峰区" },
  29252. {
  29253. value: "430211",
  29254. label: "天元区" },
  29255. {
  29256. value: "430221",
  29257. label: "株洲县" },
  29258. {
  29259. value: "430223",
  29260. label: "攸县" },
  29261. {
  29262. value: "430224",
  29263. label: "茶陵县" },
  29264. {
  29265. value: "430225",
  29266. label: "炎陵县" },
  29267. {
  29268. value: "430271",
  29269. label: "云龙示范区" },
  29270. {
  29271. value: "430281",
  29272. label: "醴陵市" }] },
  29273. {
  29274. value: "430300",
  29275. label: "湘潭市",
  29276. children: [{
  29277. value: "430301",
  29278. label: "市辖区" },
  29279. {
  29280. value: "430302",
  29281. label: "雨湖区" },
  29282. {
  29283. value: "430304",
  29284. label: "岳塘区" },
  29285. {
  29286. value: "430321",
  29287. label: "湘潭县" },
  29288. {
  29289. value: "430371",
  29290. label: "湖南湘潭高新技术产业园区" },
  29291. {
  29292. value: "430372",
  29293. label: "湘潭昭山示范区" },
  29294. {
  29295. value: "430373",
  29296. label: "湘潭九华示范区" },
  29297. {
  29298. value: "430381",
  29299. label: "湘乡市" },
  29300. {
  29301. value: "430382",
  29302. label: "韶山市" }] },
  29303. {
  29304. value: "430400",
  29305. label: "衡阳市",
  29306. children: [{
  29307. value: "430401",
  29308. label: "市辖区" },
  29309. {
  29310. value: "430405",
  29311. label: "珠晖区" },
  29312. {
  29313. value: "430406",
  29314. label: "雁峰区" },
  29315. {
  29316. value: "430407",
  29317. label: "石鼓区" },
  29318. {
  29319. value: "430408",
  29320. label: "蒸湘区" },
  29321. {
  29322. value: "430412",
  29323. label: "南岳区" },
  29324. {
  29325. value: "430421",
  29326. label: "衡阳县" },
  29327. {
  29328. value: "430422",
  29329. label: "衡南县" },
  29330. {
  29331. value: "430423",
  29332. label: "衡山县" },
  29333. {
  29334. value: "430424",
  29335. label: "衡东县" },
  29336. {
  29337. value: "430426",
  29338. label: "祁东县" },
  29339. {
  29340. value: "430471",
  29341. label: "衡阳综合保税区" },
  29342. {
  29343. value: "430472",
  29344. label: "湖南衡阳高新技术产业园区" },
  29345. {
  29346. value: "430473",
  29347. label: "湖南衡阳松木经济开发区" },
  29348. {
  29349. value: "430481",
  29350. label: "耒阳市" },
  29351. {
  29352. value: "430482",
  29353. label: "常宁市" }] },
  29354. {
  29355. value: "430500",
  29356. label: "邵阳市",
  29357. children: [{
  29358. value: "430501",
  29359. label: "市辖区" },
  29360. {
  29361. value: "430502",
  29362. label: "双清区" },
  29363. {
  29364. value: "430503",
  29365. label: "大祥区" },
  29366. {
  29367. value: "430511",
  29368. label: "北塔区" },
  29369. {
  29370. value: "430521",
  29371. label: "邵东县" },
  29372. {
  29373. value: "430522",
  29374. label: "新邵县" },
  29375. {
  29376. value: "430523",
  29377. label: "邵阳县" },
  29378. {
  29379. value: "430524",
  29380. label: "隆回县" },
  29381. {
  29382. value: "430525",
  29383. label: "洞口县" },
  29384. {
  29385. value: "430527",
  29386. label: "绥宁县" },
  29387. {
  29388. value: "430528",
  29389. label: "新宁县" },
  29390. {
  29391. value: "430529",
  29392. label: "城步苗族自治县" },
  29393. {
  29394. value: "430581",
  29395. label: "武冈市" }] },
  29396. {
  29397. value: "430600",
  29398. label: "岳阳市",
  29399. children: [{
  29400. value: "430601",
  29401. label: "市辖区" },
  29402. {
  29403. value: "430602",
  29404. label: "岳阳楼区" },
  29405. {
  29406. value: "430603",
  29407. label: "云溪区" },
  29408. {
  29409. value: "430611",
  29410. label: "君山区" },
  29411. {
  29412. value: "430621",
  29413. label: "岳阳县" },
  29414. {
  29415. value: "430623",
  29416. label: "华容县" },
  29417. {
  29418. value: "430624",
  29419. label: "湘阴县" },
  29420. {
  29421. value: "430626",
  29422. label: "平江县" },
  29423. {
  29424. value: "430671",
  29425. label: "岳阳市屈原管理区" },
  29426. {
  29427. value: "430681",
  29428. label: "汨罗市" },
  29429. {
  29430. value: "430682",
  29431. label: "临湘市" }] },
  29432. {
  29433. value: "430700",
  29434. label: "常德市",
  29435. children: [{
  29436. value: "430701",
  29437. label: "市辖区" },
  29438. {
  29439. value: "430702",
  29440. label: "武陵区" },
  29441. {
  29442. value: "430703",
  29443. label: "鼎城区" },
  29444. {
  29445. value: "430721",
  29446. label: "安乡县" },
  29447. {
  29448. value: "430722",
  29449. label: "汉寿县" },
  29450. {
  29451. value: "430723",
  29452. label: "澧县" },
  29453. {
  29454. value: "430724",
  29455. label: "临澧县" },
  29456. {
  29457. value: "430725",
  29458. label: "桃源县" },
  29459. {
  29460. value: "430726",
  29461. label: "石门县" },
  29462. {
  29463. value: "430771",
  29464. label: "常德市西洞庭管理区" },
  29465. {
  29466. value: "430781",
  29467. label: "津市市" }] },
  29468. {
  29469. value: "430800",
  29470. label: "张家界市",
  29471. children: [{
  29472. value: "430801",
  29473. label: "市辖区" },
  29474. {
  29475. value: "430802",
  29476. label: "永定区" },
  29477. {
  29478. value: "430811",
  29479. label: "武陵源区" },
  29480. {
  29481. value: "430821",
  29482. label: "慈利县" },
  29483. {
  29484. value: "430822",
  29485. label: "桑植县" }] },
  29486. {
  29487. value: "430900",
  29488. label: "益阳市",
  29489. children: [{
  29490. value: "430901",
  29491. label: "市辖区" },
  29492. {
  29493. value: "430902",
  29494. label: "资阳区" },
  29495. {
  29496. value: "430903",
  29497. label: "赫山区" },
  29498. {
  29499. value: "430921",
  29500. label: "南县" },
  29501. {
  29502. value: "430922",
  29503. label: "桃江县" },
  29504. {
  29505. value: "430923",
  29506. label: "安化县" },
  29507. {
  29508. value: "430971",
  29509. label: "益阳市大通湖管理区" },
  29510. {
  29511. value: "430972",
  29512. label: "湖南益阳高新技术产业园区" },
  29513. {
  29514. value: "430981",
  29515. label: "沅江市" }] },
  29516. {
  29517. value: "431000",
  29518. label: "郴州市",
  29519. children: [{
  29520. value: "431001",
  29521. label: "市辖区" },
  29522. {
  29523. value: "431002",
  29524. label: "北湖区" },
  29525. {
  29526. value: "431003",
  29527. label: "苏仙区" },
  29528. {
  29529. value: "431021",
  29530. label: "桂阳县" },
  29531. {
  29532. value: "431022",
  29533. label: "宜章县" },
  29534. {
  29535. value: "431023",
  29536. label: "永兴县" },
  29537. {
  29538. value: "431024",
  29539. label: "嘉禾县" },
  29540. {
  29541. value: "431025",
  29542. label: "临武县" },
  29543. {
  29544. value: "431026",
  29545. label: "汝城县" },
  29546. {
  29547. value: "431027",
  29548. label: "桂东县" },
  29549. {
  29550. value: "431028",
  29551. label: "安仁县" },
  29552. {
  29553. value: "431081",
  29554. label: "资兴市" }] },
  29555. {
  29556. value: "431100",
  29557. label: "永州市",
  29558. children: [{
  29559. value: "431101",
  29560. label: "市辖区" },
  29561. {
  29562. value: "431102",
  29563. label: "零陵区" },
  29564. {
  29565. value: "431103",
  29566. label: "冷水滩区" },
  29567. {
  29568. value: "431121",
  29569. label: "祁阳县" },
  29570. {
  29571. value: "431122",
  29572. label: "东安县" },
  29573. {
  29574. value: "431123",
  29575. label: "双牌县" },
  29576. {
  29577. value: "431124",
  29578. label: "道县" },
  29579. {
  29580. value: "431125",
  29581. label: "江永县" },
  29582. {
  29583. value: "431126",
  29584. label: "宁远县" },
  29585. {
  29586. value: "431127",
  29587. label: "蓝山县" },
  29588. {
  29589. value: "431128",
  29590. label: "新田县" },
  29591. {
  29592. value: "431129",
  29593. label: "江华瑶族自治县" },
  29594. {
  29595. value: "431171",
  29596. label: "永州经济技术开发区" },
  29597. {
  29598. value: "431172",
  29599. label: "永州市金洞管理区" },
  29600. {
  29601. value: "431173",
  29602. label: "永州市回龙圩管理区" }] },
  29603. {
  29604. value: "431200",
  29605. label: "怀化市",
  29606. children: [{
  29607. value: "431201",
  29608. label: "市辖区" },
  29609. {
  29610. value: "431202",
  29611. label: "鹤城区" },
  29612. {
  29613. value: "431221",
  29614. label: "中方县" },
  29615. {
  29616. value: "431222",
  29617. label: "沅陵县" },
  29618. {
  29619. value: "431223",
  29620. label: "辰溪县" },
  29621. {
  29622. value: "431224",
  29623. label: "溆浦县" },
  29624. {
  29625. value: "431225",
  29626. label: "会同县" },
  29627. {
  29628. value: "431226",
  29629. label: "麻阳苗族自治县" },
  29630. {
  29631. value: "431227",
  29632. label: "新晃侗族自治县" },
  29633. {
  29634. value: "431228",
  29635. label: "芷江侗族自治县" },
  29636. {
  29637. value: "431229",
  29638. label: "靖州苗族侗族自治县" },
  29639. {
  29640. value: "431230",
  29641. label: "通道侗族自治县" },
  29642. {
  29643. value: "431271",
  29644. label: "怀化市洪江管理区" },
  29645. {
  29646. value: "431281",
  29647. label: "洪江市" }] },
  29648. {
  29649. value: "431300",
  29650. label: "娄底市",
  29651. children: [{
  29652. value: "431301",
  29653. label: "市辖区" },
  29654. {
  29655. value: "431302",
  29656. label: "娄星区" },
  29657. {
  29658. value: "431321",
  29659. label: "双峰县" },
  29660. {
  29661. value: "431322",
  29662. label: "新化县" },
  29663. {
  29664. value: "431381",
  29665. label: "冷水江市" },
  29666. {
  29667. value: "431382",
  29668. label: "涟源市" }] },
  29669. {
  29670. value: "433100",
  29671. label: "湘西土家族苗族自治州",
  29672. children: [{
  29673. value: "433101",
  29674. label: "吉首市" },
  29675. {
  29676. value: "433122",
  29677. label: "泸溪县" },
  29678. {
  29679. value: "433123",
  29680. label: "凤凰县" },
  29681. {
  29682. value: "433124",
  29683. label: "花垣县" },
  29684. {
  29685. value: "433125",
  29686. label: "保靖县" },
  29687. {
  29688. value: "433126",
  29689. label: "古丈县" },
  29690. {
  29691. value: "433127",
  29692. label: "永顺县" },
  29693. {
  29694. value: "433130",
  29695. label: "龙山县" },
  29696. {
  29697. value: "433172",
  29698. label: "湖南吉首经济开发区" },
  29699. {
  29700. value: "433173",
  29701. label: "湖南永顺经济开发区" }] }] },
  29702. {
  29703. value: '440000',
  29704. label: '广东省',
  29705. children: [{
  29706. value: "440100",
  29707. label: "广州市",
  29708. children: [{
  29709. value: "440101",
  29710. label: "市辖区" },
  29711. {
  29712. value: "440103",
  29713. label: "荔湾区" },
  29714. {
  29715. value: "440104",
  29716. label: "越秀区" },
  29717. {
  29718. value: "440105",
  29719. label: "海珠区" },
  29720. {
  29721. value: "440106",
  29722. label: "天河区" },
  29723. {
  29724. value: "440111",
  29725. label: "白云区" },
  29726. {
  29727. value: "440112",
  29728. label: "黄埔区" },
  29729. {
  29730. value: "440113",
  29731. label: "番禺区" },
  29732. {
  29733. value: "440114",
  29734. label: "花都区" },
  29735. {
  29736. value: "440115",
  29737. label: "南沙区" },
  29738. {
  29739. value: "440117",
  29740. label: "从化区" },
  29741. {
  29742. value: "440118",
  29743. label: "增城区" }] },
  29744. {
  29745. value: "440200",
  29746. label: "韶关市",
  29747. children: [{
  29748. value: "440201",
  29749. label: "市辖区" },
  29750. {
  29751. value: "440203",
  29752. label: "武江区" },
  29753. {
  29754. value: "440204",
  29755. label: "浈江区" },
  29756. {
  29757. value: "440205",
  29758. label: "曲江区" },
  29759. {
  29760. value: "440222",
  29761. label: "始兴县" },
  29762. {
  29763. value: "440224",
  29764. label: "仁化县" },
  29765. {
  29766. value: "440229",
  29767. label: "翁源县" },
  29768. {
  29769. value: "440232",
  29770. label: "乳源瑶族自治县" },
  29771. {
  29772. value: "440233",
  29773. label: "新丰县" },
  29774. {
  29775. value: "440281",
  29776. label: "乐昌市" },
  29777. {
  29778. value: "440282",
  29779. label: "南雄市" }] },
  29780. {
  29781. value: "440300",
  29782. label: "深圳市",
  29783. children: [{
  29784. value: "440301",
  29785. label: "市辖区" },
  29786. {
  29787. value: "440303",
  29788. label: "罗湖区" },
  29789. {
  29790. value: "440304",
  29791. label: "福田区" },
  29792. {
  29793. value: "440305",
  29794. label: "南山区" },
  29795. {
  29796. value: "440306",
  29797. label: "宝安区" },
  29798. {
  29799. value: "440307",
  29800. label: "龙岗区" },
  29801. {
  29802. value: "440308",
  29803. label: "盐田区" },
  29804. {
  29805. value: "440309",
  29806. label: "龙华区" },
  29807. {
  29808. value: "440310",
  29809. label: "坪山区" }] },
  29810. {
  29811. value: "440400",
  29812. label: "珠海市",
  29813. children: [{
  29814. value: "440401",
  29815. label: "市辖区" },
  29816. {
  29817. value: "440402",
  29818. label: "香洲区" },
  29819. {
  29820. value: "440403",
  29821. label: "斗门区" },
  29822. {
  29823. value: "440404",
  29824. label: "金湾区" }] },
  29825. {
  29826. value: "440500",
  29827. label: "汕头市",
  29828. children: [{
  29829. value: "440501",
  29830. label: "市辖区" },
  29831. {
  29832. value: "440507",
  29833. label: "龙湖区" },
  29834. {
  29835. value: "440511",
  29836. label: "金平区" },
  29837. {
  29838. value: "440512",
  29839. label: "濠江区" },
  29840. {
  29841. value: "440513",
  29842. label: "潮阳区" },
  29843. {
  29844. value: "440514",
  29845. label: "潮南区" },
  29846. {
  29847. value: "440515",
  29848. label: "澄海区" },
  29849. {
  29850. value: "440523",
  29851. label: "南澳县" }] },
  29852. {
  29853. value: "440600",
  29854. label: "佛山市",
  29855. children: [{
  29856. value: "440601",
  29857. label: "市辖区" },
  29858. {
  29859. value: "440604",
  29860. label: "禅城区" },
  29861. {
  29862. value: "440605",
  29863. label: "南海区" },
  29864. {
  29865. value: "440606",
  29866. label: "顺德区" },
  29867. {
  29868. value: "440607",
  29869. label: "三水区" },
  29870. {
  29871. value: "440608",
  29872. label: "高明区" }] },
  29873. {
  29874. value: "440700",
  29875. label: "江门市",
  29876. children: [{
  29877. value: "440701",
  29878. label: "市辖区" },
  29879. {
  29880. value: "440703",
  29881. label: "蓬江区" },
  29882. {
  29883. value: "440704",
  29884. label: "江海区" },
  29885. {
  29886. value: "440705",
  29887. label: "新会区" },
  29888. {
  29889. value: "440781",
  29890. label: "台山市" },
  29891. {
  29892. value: "440783",
  29893. label: "开平市" },
  29894. {
  29895. value: "440784",
  29896. label: "鹤山市" },
  29897. {
  29898. value: "440785",
  29899. label: "恩平市" }] },
  29900. {
  29901. value: "440800",
  29902. label: "湛江市",
  29903. children: [{
  29904. value: "440801",
  29905. label: "市辖区" },
  29906. {
  29907. value: "440802",
  29908. label: "赤坎区" },
  29909. {
  29910. value: "440803",
  29911. label: "霞山区" },
  29912. {
  29913. value: "440804",
  29914. label: "坡头区" },
  29915. {
  29916. value: "440811",
  29917. label: "麻章区" },
  29918. {
  29919. value: "440823",
  29920. label: "遂溪县" },
  29921. {
  29922. value: "440825",
  29923. label: "徐闻县" },
  29924. {
  29925. value: "440881",
  29926. label: "廉江市" },
  29927. {
  29928. value: "440882",
  29929. label: "雷州市" },
  29930. {
  29931. value: "440883",
  29932. label: "吴川市" }] },
  29933. {
  29934. value: "440900",
  29935. label: "茂名市",
  29936. children: [{
  29937. value: "440901",
  29938. label: "市辖区" },
  29939. {
  29940. value: "440902",
  29941. label: "茂南区" },
  29942. {
  29943. value: "440904",
  29944. label: "电白区" },
  29945. {
  29946. value: "440981",
  29947. label: "高州市" },
  29948. {
  29949. value: "440982",
  29950. label: "化州市" },
  29951. {
  29952. value: "440983",
  29953. label: "信宜市" }] },
  29954. {
  29955. value: "441200",
  29956. label: "肇庆市",
  29957. children: [{
  29958. value: "441201",
  29959. label: "市辖区" },
  29960. {
  29961. value: "441202",
  29962. label: "端州区" },
  29963. {
  29964. value: "441203",
  29965. label: "鼎湖区" },
  29966. {
  29967. value: "441204",
  29968. label: "高要区" },
  29969. {
  29970. value: "441223",
  29971. label: "广宁县" },
  29972. {
  29973. value: "441224",
  29974. label: "怀集县" },
  29975. {
  29976. value: "441225",
  29977. label: "封开县" },
  29978. {
  29979. value: "441226",
  29980. label: "德庆县" },
  29981. {
  29982. value: "441284",
  29983. label: "四会市" }] },
  29984. {
  29985. value: "441300",
  29986. label: "惠州市",
  29987. children: [{
  29988. value: "441301",
  29989. label: "市辖区" },
  29990. {
  29991. value: "441302",
  29992. label: "惠城区" },
  29993. {
  29994. value: "441303",
  29995. label: "惠阳区" },
  29996. {
  29997. value: "441322",
  29998. label: "博罗县" },
  29999. {
  30000. value: "441323",
  30001. label: "惠东县" },
  30002. {
  30003. value: "441324",
  30004. label: "龙门县" }] },
  30005. {
  30006. value: "441400",
  30007. label: "梅州市",
  30008. children: [{
  30009. value: "441401",
  30010. label: "市辖区" },
  30011. {
  30012. value: "441402",
  30013. label: "梅江区" },
  30014. {
  30015. value: "441403",
  30016. label: "梅县区" },
  30017. {
  30018. value: "441422",
  30019. label: "大埔县" },
  30020. {
  30021. value: "441423",
  30022. label: "丰顺县" },
  30023. {
  30024. value: "441424",
  30025. label: "五华县" },
  30026. {
  30027. value: "441426",
  30028. label: "平远县" },
  30029. {
  30030. value: "441427",
  30031. label: "蕉岭县" },
  30032. {
  30033. value: "441481",
  30034. label: "兴宁市" }] },
  30035. {
  30036. value: "441500",
  30037. label: "汕尾市",
  30038. children: [{
  30039. value: "441501",
  30040. label: "市辖区" },
  30041. {
  30042. value: "441502",
  30043. label: "城区" },
  30044. {
  30045. value: "441521",
  30046. label: "海丰县" },
  30047. {
  30048. value: "441523",
  30049. label: "陆河县" },
  30050. {
  30051. value: "441581",
  30052. label: "陆丰市" }] },
  30053. {
  30054. value: "441600",
  30055. label: "河源市",
  30056. children: [{
  30057. value: "441601",
  30058. label: "市辖区" },
  30059. {
  30060. value: "441602",
  30061. label: "源城区" },
  30062. {
  30063. value: "441621",
  30064. label: "紫金县" },
  30065. {
  30066. value: "441622",
  30067. label: "龙川县" },
  30068. {
  30069. value: "441623",
  30070. label: "连平县" },
  30071. {
  30072. value: "441624",
  30073. label: "和平县" },
  30074. {
  30075. value: "441625",
  30076. label: "东源县" }] },
  30077. {
  30078. value: "441700",
  30079. label: "阳江市",
  30080. children: [{
  30081. value: "441701",
  30082. label: "市辖区" },
  30083. {
  30084. value: "441702",
  30085. label: "江城区" },
  30086. {
  30087. value: "441704",
  30088. label: "阳东区" },
  30089. {
  30090. value: "441721",
  30091. label: "阳西县" },
  30092. {
  30093. value: "441781",
  30094. label: "阳春市" }] },
  30095. {
  30096. value: "441800",
  30097. label: "清远市",
  30098. children: [{
  30099. value: "441801",
  30100. label: "市辖区" },
  30101. {
  30102. value: "441802",
  30103. label: "清城区" },
  30104. {
  30105. value: "441803",
  30106. label: "清新区" },
  30107. {
  30108. value: "441821",
  30109. label: "佛冈县" },
  30110. {
  30111. value: "441823",
  30112. label: "阳山县" },
  30113. {
  30114. value: "441825",
  30115. label: "连山壮族瑶族自治县" },
  30116. {
  30117. value: "441826",
  30118. label: "连南瑶族自治县" },
  30119. {
  30120. value: "441881",
  30121. label: "英德市" },
  30122. {
  30123. value: "441882",
  30124. label: "连州市" }] },
  30125. {
  30126. value: "441900",
  30127. label: "东莞市",
  30128. children: [{
  30129. value: "441901",
  30130. label: "市辖区" }] },
  30131. {
  30132. value: "442000",
  30133. label: "中山市",
  30134. children: [{
  30135. value: "442001",
  30136. label: "市辖区" }] },
  30137. {
  30138. value: "445100",
  30139. label: "潮州市",
  30140. children: [{
  30141. value: "445101",
  30142. label: "市辖区" },
  30143. {
  30144. value: "445102",
  30145. label: "湘桥区" },
  30146. {
  30147. value: "445103",
  30148. label: "潮安区" },
  30149. {
  30150. value: "445122",
  30151. label: "饶平县" }] },
  30152. {
  30153. value: "445200",
  30154. label: "揭阳市",
  30155. children: [{
  30156. value: "445201",
  30157. label: "市辖区" },
  30158. {
  30159. value: "445202",
  30160. label: "榕城区" },
  30161. {
  30162. value: "445203",
  30163. label: "揭东区" },
  30164. {
  30165. value: "445222",
  30166. label: "揭西县" },
  30167. {
  30168. value: "445224",
  30169. label: "惠来县" },
  30170. {
  30171. value: "445281",
  30172. label: "普宁市" }] },
  30173. {
  30174. value: "445300",
  30175. label: "云浮市",
  30176. children: [{
  30177. value: "445301",
  30178. label: "市辖区" },
  30179. {
  30180. value: "445302",
  30181. label: "云城区" },
  30182. {
  30183. value: "445303",
  30184. label: "云安区" },
  30185. {
  30186. value: "445321",
  30187. label: "新兴县" },
  30188. {
  30189. value: "445322",
  30190. label: "郁南县" },
  30191. {
  30192. value: "445381",
  30193. label: "罗定市" }] }] },
  30194. {
  30195. value: '450000',
  30196. label: '广西壮族',
  30197. children: [{
  30198. value: "450100",
  30199. label: "南宁市",
  30200. children: [{
  30201. value: "450101",
  30202. label: "市辖区" },
  30203. {
  30204. value: "450102",
  30205. label: "兴宁区" },
  30206. {
  30207. value: "450103",
  30208. label: "青秀区" },
  30209. {
  30210. value: "450105",
  30211. label: "江南区" },
  30212. {
  30213. value: "450107",
  30214. label: "西乡塘区" },
  30215. {
  30216. value: "450108",
  30217. label: "良庆区" },
  30218. {
  30219. value: "450109",
  30220. label: "邕宁区" },
  30221. {
  30222. value: "450110",
  30223. label: "武鸣区" },
  30224. {
  30225. value: "450123",
  30226. label: "隆安县" },
  30227. {
  30228. value: "450124",
  30229. label: "马山县" },
  30230. {
  30231. value: "450125",
  30232. label: "上林县" },
  30233. {
  30234. value: "450126",
  30235. label: "宾阳县" },
  30236. {
  30237. value: "450127",
  30238. label: "横县" }] },
  30239. {
  30240. value: "450200",
  30241. label: "柳州市",
  30242. children: [{
  30243. value: "450201",
  30244. label: "市辖区" },
  30245. {
  30246. value: "450202",
  30247. label: "城中区" },
  30248. {
  30249. value: "450203",
  30250. label: "鱼峰区" },
  30251. {
  30252. value: "450204",
  30253. label: "柳南区" },
  30254. {
  30255. value: "450205",
  30256. label: "柳北区" },
  30257. {
  30258. value: "450206",
  30259. label: "柳江区" },
  30260. {
  30261. value: "450222",
  30262. label: "柳城县" },
  30263. {
  30264. value: "450223",
  30265. label: "鹿寨县" },
  30266. {
  30267. value: "450224",
  30268. label: "融安县" },
  30269. {
  30270. value: "450225",
  30271. label: "融水苗族自治县" },
  30272. {
  30273. value: "450226",
  30274. label: "三江侗族自治县" }] },
  30275. {
  30276. value: "450300",
  30277. label: "桂林市",
  30278. children: [{
  30279. value: "450301",
  30280. label: "市辖区" },
  30281. {
  30282. value: "450302",
  30283. label: "秀峰区" },
  30284. {
  30285. value: "450303",
  30286. label: "叠彩区" },
  30287. {
  30288. value: "450304",
  30289. label: "象山区" },
  30290. {
  30291. value: "450305",
  30292. label: "七星区" },
  30293. {
  30294. value: "450311",
  30295. label: "雁山区" },
  30296. {
  30297. value: "450312",
  30298. label: "临桂区" },
  30299. {
  30300. value: "450321",
  30301. label: "阳朔县" },
  30302. {
  30303. value: "450323",
  30304. label: "灵川县" },
  30305. {
  30306. value: "450324",
  30307. label: "全州县" },
  30308. {
  30309. value: "450325",
  30310. label: "兴安县" },
  30311. {
  30312. value: "450326",
  30313. label: "永福县" },
  30314. {
  30315. value: "450327",
  30316. label: "灌阳县" },
  30317. {
  30318. value: "450328",
  30319. label: "龙胜各族自治县" },
  30320. {
  30321. value: "450329",
  30322. label: "资源县" },
  30323. {
  30324. value: "450330",
  30325. label: "平乐县" },
  30326. {
  30327. value: "450331",
  30328. label: "荔浦县" },
  30329. {
  30330. value: "450332",
  30331. label: "恭城瑶族自治县" }] },
  30332. {
  30333. value: "450400",
  30334. label: "梧州市",
  30335. children: [{
  30336. value: "450401",
  30337. label: "市辖区" },
  30338. {
  30339. value: "450403",
  30340. label: "万秀区" },
  30341. {
  30342. value: "450405",
  30343. label: "长洲区" },
  30344. {
  30345. value: "450406",
  30346. label: "龙圩区" },
  30347. {
  30348. value: "450421",
  30349. label: "苍梧县" },
  30350. {
  30351. value: "450422",
  30352. label: "藤县" },
  30353. {
  30354. value: "450423",
  30355. label: "蒙山县" },
  30356. {
  30357. value: "450481",
  30358. label: "岑溪市" }] },
  30359. {
  30360. value: "450500",
  30361. label: "北海市",
  30362. children: [{
  30363. value: "450501",
  30364. label: "市辖区" },
  30365. {
  30366. value: "450502",
  30367. label: "海城区" },
  30368. {
  30369. value: "450503",
  30370. label: "银海区" },
  30371. {
  30372. value: "450512",
  30373. label: "铁山港区" },
  30374. {
  30375. value: "450521",
  30376. label: "合浦县" }] },
  30377. {
  30378. value: "450600",
  30379. label: "防城港市",
  30380. children: [{
  30381. value: "450601",
  30382. label: "市辖区" },
  30383. {
  30384. value: "450602",
  30385. label: "港口区" },
  30386. {
  30387. value: "450603",
  30388. label: "防城区" },
  30389. {
  30390. value: "450621",
  30391. label: "上思县" },
  30392. {
  30393. value: "450681",
  30394. label: "东兴市" }] },
  30395. {
  30396. value: "450700",
  30397. label: "钦州市",
  30398. children: [{
  30399. value: "450701",
  30400. label: "市辖区" },
  30401. {
  30402. value: "450702",
  30403. label: "钦南区" },
  30404. {
  30405. value: "450703",
  30406. label: "钦北区" },
  30407. {
  30408. value: "450721",
  30409. label: "灵山县" },
  30410. {
  30411. value: "450722",
  30412. label: "浦北县" }] },
  30413. {
  30414. value: "450800",
  30415. label: "贵港市",
  30416. children: [{
  30417. value: "450801",
  30418. label: "市辖区" },
  30419. {
  30420. value: "450802",
  30421. label: "港北区" },
  30422. {
  30423. value: "450803",
  30424. label: "港南区" },
  30425. {
  30426. value: "450804",
  30427. label: "覃塘区" },
  30428. {
  30429. value: "450821",
  30430. label: "平南县" },
  30431. {
  30432. value: "450881",
  30433. label: "桂平市" }] },
  30434. {
  30435. value: "450900",
  30436. label: "玉林市",
  30437. children: [{
  30438. value: "450901",
  30439. label: "市辖区" },
  30440. {
  30441. value: "450902",
  30442. label: "玉州区" },
  30443. {
  30444. value: "450903",
  30445. label: "福绵区" },
  30446. {
  30447. value: "450921",
  30448. label: "容县" },
  30449. {
  30450. value: "450922",
  30451. label: "陆川县" },
  30452. {
  30453. value: "450923",
  30454. label: "博白县" },
  30455. {
  30456. value: "450924",
  30457. label: "兴业县" },
  30458. {
  30459. value: "450981",
  30460. label: "北流市" }] },
  30461. {
  30462. value: "451000",
  30463. label: "百色市",
  30464. children: [{
  30465. value: "451001",
  30466. label: "市辖区" },
  30467. {
  30468. value: "451002",
  30469. label: "右江区" },
  30470. {
  30471. value: "451021",
  30472. label: "田阳县" },
  30473. {
  30474. value: "451022",
  30475. label: "田东县" },
  30476. {
  30477. value: "451023",
  30478. label: "平果县" },
  30479. {
  30480. value: "451024",
  30481. label: "德保县" },
  30482. {
  30483. value: "451026",
  30484. label: "那坡县" },
  30485. {
  30486. value: "451027",
  30487. label: "凌云县" },
  30488. {
  30489. value: "451028",
  30490. label: "乐业县" },
  30491. {
  30492. value: "451029",
  30493. label: "田林县" },
  30494. {
  30495. value: "451030",
  30496. label: "西林县" },
  30497. {
  30498. value: "451031",
  30499. label: "隆林各族自治县" },
  30500. {
  30501. value: "451081",
  30502. label: "靖西市" }] },
  30503. {
  30504. value: "451100",
  30505. label: "贺州市",
  30506. children: [{
  30507. value: "451101",
  30508. label: "市辖区" },
  30509. {
  30510. value: "451102",
  30511. label: "八步区" },
  30512. {
  30513. value: "451103",
  30514. label: "平桂区" },
  30515. {
  30516. value: "451121",
  30517. label: "昭平县" },
  30518. {
  30519. value: "451122",
  30520. label: "钟山县" },
  30521. {
  30522. value: "451123",
  30523. label: "富川瑶族自治县" }] },
  30524. {
  30525. value: "451200",
  30526. label: "河池市",
  30527. children: [{
  30528. value: "451201",
  30529. label: "市辖区" },
  30530. {
  30531. value: "451202",
  30532. label: "金城江区" },
  30533. {
  30534. value: "451203",
  30535. label: "宜州区" },
  30536. {
  30537. value: "451221",
  30538. label: "南丹县" },
  30539. {
  30540. value: "451222",
  30541. label: "天峨县" },
  30542. {
  30543. value: "451223",
  30544. label: "凤山县" },
  30545. {
  30546. value: "451224",
  30547. label: "东兰县" },
  30548. {
  30549. value: "451225",
  30550. label: "罗城仫佬族自治县" },
  30551. {
  30552. value: "451226",
  30553. label: "环江毛南族自治县" },
  30554. {
  30555. value: "451227",
  30556. label: "巴马瑶族自治县" },
  30557. {
  30558. value: "451228",
  30559. label: "都安瑶族自治县" },
  30560. {
  30561. value: "451229",
  30562. label: "大化瑶族自治县" }] },
  30563. {
  30564. value: "451300",
  30565. label: "来宾市",
  30566. children: [{
  30567. value: "451301",
  30568. label: "市辖区" },
  30569. {
  30570. value: "451302",
  30571. label: "兴宾区" },
  30572. {
  30573. value: "451321",
  30574. label: "忻城县" },
  30575. {
  30576. value: "451322",
  30577. label: "象州县" },
  30578. {
  30579. value: "451323",
  30580. label: "武宣县" },
  30581. {
  30582. value: "451324",
  30583. label: "金秀瑶族自治县" },
  30584. {
  30585. value: "451381",
  30586. label: "合山市" }] },
  30587. {
  30588. value: "451400",
  30589. label: "崇左市",
  30590. children: [{
  30591. value: "451401",
  30592. label: "市辖区" },
  30593. {
  30594. value: "451402",
  30595. label: "江州区" },
  30596. {
  30597. value: "451421",
  30598. label: "扶绥县" },
  30599. {
  30600. value: "451422",
  30601. label: "宁明县" },
  30602. {
  30603. value: "451423",
  30604. label: "龙州县" },
  30605. {
  30606. value: "451424",
  30607. label: "大新县" },
  30608. {
  30609. value: "451425",
  30610. label: "天等县" },
  30611. {
  30612. value: "451481",
  30613. label: "凭祥市" }] }] },
  30614. {
  30615. value: '460000',
  30616. label: '海南省',
  30617. children: [{
  30618. value: "460100",
  30619. label: "海口市",
  30620. children: [{
  30621. value: "460101",
  30622. label: "市辖区" },
  30623. {
  30624. value: "460105",
  30625. label: "秀英区" },
  30626. {
  30627. value: "460106",
  30628. label: "龙华区" },
  30629. {
  30630. value: "460107",
  30631. label: "琼山区" },
  30632. {
  30633. value: "460108",
  30634. label: "美兰区" }] },
  30635. {
  30636. value: "460200",
  30637. label: "三亚市",
  30638. children: [{
  30639. value: "460201",
  30640. label: "市辖区" },
  30641. {
  30642. value: "460202",
  30643. label: "海棠区" },
  30644. {
  30645. value: "460203",
  30646. label: "吉阳区" },
  30647. {
  30648. value: "460204",
  30649. label: "天涯区" },
  30650. {
  30651. value: "460205",
  30652. label: "崖州区" }] },
  30653. {
  30654. value: "460300",
  30655. label: "三沙市",
  30656. children: [{
  30657. value: "460321",
  30658. label: "西沙群岛" },
  30659. {
  30660. value: "460322",
  30661. label: "南沙群岛" },
  30662. {
  30663. value: "460323",
  30664. label: "中沙群岛的岛礁及其海域" }] },
  30665. {
  30666. value: "460400",
  30667. label: "儋州市",
  30668. children: [{
  30669. value: "460401",
  30670. label: "市辖区" }] },
  30671. {
  30672. value: "469000",
  30673. label: "省直辖县级行政区划",
  30674. children: [{
  30675. value: "469001",
  30676. label: "五指山市" },
  30677. {
  30678. value: "469002",
  30679. label: "琼海市" },
  30680. {
  30681. value: "469005",
  30682. label: "文昌市" },
  30683. {
  30684. value: "469006",
  30685. label: "万宁市" },
  30686. {
  30687. value: "469007",
  30688. label: "东方市" },
  30689. {
  30690. value: "469021",
  30691. label: "定安县" },
  30692. {
  30693. value: "469022",
  30694. label: "屯昌县" },
  30695. {
  30696. value: "469023",
  30697. label: "澄迈县" },
  30698. {
  30699. value: "469024",
  30700. label: "临高县" },
  30701. {
  30702. value: "469025",
  30703. label: "白沙黎族自治县" },
  30704. {
  30705. value: "469026",
  30706. label: "昌江黎族自治县" },
  30707. {
  30708. value: "469027",
  30709. label: "乐东黎族自治县" },
  30710. {
  30711. value: "469028",
  30712. label: "陵水黎族自治县" },
  30713. {
  30714. value: "469029",
  30715. label: "保亭黎族苗族自治县" },
  30716. {
  30717. value: "469030",
  30718. label: "琼中黎族苗族自治县" }] }] },
  30719. {
  30720. value: '500000',
  30721. label: '重庆',
  30722. children: [{
  30723. value: "500100",
  30724. label: "市辖区",
  30725. children: [{
  30726. value: "500101",
  30727. label: "万州区" },
  30728. {
  30729. value: "500102",
  30730. label: "涪陵区" },
  30731. {
  30732. value: "500103",
  30733. label: "渝中区" },
  30734. {
  30735. value: "500104",
  30736. label: "大渡口区" },
  30737. {
  30738. value: "500105",
  30739. label: "江北区" },
  30740. {
  30741. value: "500106",
  30742. label: "沙坪坝区" },
  30743. {
  30744. value: "500107",
  30745. label: "九龙坡区" },
  30746. {
  30747. value: "500108",
  30748. label: "南岸区" },
  30749. {
  30750. value: "500109",
  30751. label: "北碚区" },
  30752. {
  30753. value: "500110",
  30754. label: "綦江区" },
  30755. {
  30756. value: "500111",
  30757. label: "大足区" },
  30758. {
  30759. value: "500112",
  30760. label: "渝北区" },
  30761. {
  30762. value: "500113",
  30763. label: "巴南区" },
  30764. {
  30765. value: "500114",
  30766. label: "黔江区" },
  30767. {
  30768. value: "500115",
  30769. label: "长寿区" },
  30770. {
  30771. value: "500116",
  30772. label: "江津区" },
  30773. {
  30774. value: "500117",
  30775. label: "合川区" },
  30776. {
  30777. value: "500118",
  30778. label: "永川区" },
  30779. {
  30780. value: "500119",
  30781. label: "南川区" },
  30782. {
  30783. value: "500120",
  30784. label: "璧山区" },
  30785. {
  30786. value: "500151",
  30787. label: "铜梁区" },
  30788. {
  30789. value: "500152",
  30790. label: "潼南区" },
  30791. {
  30792. value: "500153",
  30793. label: "荣昌区" },
  30794. {
  30795. value: "500154",
  30796. label: "开州区" },
  30797. {
  30798. value: "500155",
  30799. label: "梁平区" },
  30800. {
  30801. value: "500156",
  30802. label: "武隆区" }] },
  30803. {
  30804. value: "500200",
  30805. label: "县",
  30806. children: [{
  30807. value: "500229",
  30808. label: "城口县" },
  30809. {
  30810. value: "500230",
  30811. label: "丰都县" },
  30812. {
  30813. value: "500231",
  30814. label: "垫江县" },
  30815. {
  30816. value: "500233",
  30817. label: "忠县" },
  30818. {
  30819. value: "500235",
  30820. label: "云阳县" },
  30821. {
  30822. value: "500236",
  30823. label: "奉节县" },
  30824. {
  30825. value: "500237",
  30826. label: "巫山县" },
  30827. {
  30828. value: "500238",
  30829. label: "巫溪县" },
  30830. {
  30831. value: "500240",
  30832. label: "石柱土家族自治县" },
  30833. {
  30834. value: "500241",
  30835. label: "秀山土家族苗族自治县" },
  30836. {
  30837. value: "500242",
  30838. label: "酉阳土家族苗族自治县" },
  30839. {
  30840. value: "500243",
  30841. label: "彭水苗族土家族自治县" }] }] },
  30842. {
  30843. value: '510000',
  30844. label: '四川省',
  30845. children: [{
  30846. value: "510100",
  30847. label: "成都市",
  30848. children: [{
  30849. value: "510101",
  30850. label: "市辖区" },
  30851. {
  30852. value: "510104",
  30853. label: "锦江区" },
  30854. {
  30855. value: "510105",
  30856. label: "青羊区" },
  30857. {
  30858. value: "510106",
  30859. label: "金牛区" },
  30860. {
  30861. value: "510107",
  30862. label: "武侯区" },
  30863. {
  30864. value: "510108",
  30865. label: "成华区" },
  30866. {
  30867. value: "510112",
  30868. label: "龙泉驿区" },
  30869. {
  30870. value: "510113",
  30871. label: "青白江区" },
  30872. {
  30873. value: "510114",
  30874. label: "新都区" },
  30875. {
  30876. value: "510115",
  30877. label: "温江区" },
  30878. {
  30879. value: "510116",
  30880. label: "双流区" },
  30881. {
  30882. value: "510117",
  30883. label: "郫都区" },
  30884. {
  30885. value: "510121",
  30886. label: "金堂县" },
  30887. {
  30888. value: "510129",
  30889. label: "大邑县" },
  30890. {
  30891. value: "510131",
  30892. label: "蒲江县" },
  30893. {
  30894. value: "510132",
  30895. label: "新津县" },
  30896. {
  30897. value: "510181",
  30898. label: "都江堰市" },
  30899. {
  30900. value: "510182",
  30901. label: "彭州市" },
  30902. {
  30903. value: "510183",
  30904. label: "邛崃市" },
  30905. {
  30906. value: "510184",
  30907. label: "崇州市" },
  30908. {
  30909. value: "510185",
  30910. label: "简阳市" }] },
  30911. {
  30912. value: "510300",
  30913. label: "自贡市",
  30914. children: [{
  30915. value: "510301",
  30916. label: "市辖区" },
  30917. {
  30918. value: "510302",
  30919. label: "自流井区" },
  30920. {
  30921. value: "510303",
  30922. label: "贡井区" },
  30923. {
  30924. value: "510304",
  30925. label: "大安区" },
  30926. {
  30927. value: "510311",
  30928. label: "沿滩区" },
  30929. {
  30930. value: "510321",
  30931. label: "荣县" },
  30932. {
  30933. value: "510322",
  30934. label: "富顺县" }] },
  30935. {
  30936. value: "510400",
  30937. label: "攀枝花市",
  30938. children: [{
  30939. value: "510401",
  30940. label: "市辖区" },
  30941. {
  30942. value: "510402",
  30943. label: "东区" },
  30944. {
  30945. value: "510403",
  30946. label: "西区" },
  30947. {
  30948. value: "510411",
  30949. label: "仁和区" },
  30950. {
  30951. value: "510421",
  30952. label: "米易县" },
  30953. {
  30954. value: "510422",
  30955. label: "盐边县" }] },
  30956. {
  30957. value: "510500",
  30958. label: "泸州市",
  30959. children: [{
  30960. value: "510501",
  30961. label: "市辖区" },
  30962. {
  30963. value: "510502",
  30964. label: "江阳区" },
  30965. {
  30966. value: "510503",
  30967. label: "纳溪区" },
  30968. {
  30969. value: "510504",
  30970. label: "龙马潭区" },
  30971. {
  30972. value: "510521",
  30973. label: "泸县" },
  30974. {
  30975. value: "510522",
  30976. label: "合江县" },
  30977. {
  30978. value: "510524",
  30979. label: "叙永县" },
  30980. {
  30981. value: "510525",
  30982. label: "古蔺县" }] },
  30983. {
  30984. value: "510600",
  30985. label: "德阳市",
  30986. children: [{
  30987. value: "510601",
  30988. label: "市辖区" },
  30989. {
  30990. value: "510603",
  30991. label: "旌阳区" },
  30992. {
  30993. value: "510604",
  30994. label: "罗江区" },
  30995. {
  30996. value: "510623",
  30997. label: "中江县" },
  30998. {
  30999. value: "510681",
  31000. label: "广汉市" },
  31001. {
  31002. value: "510682",
  31003. label: "什邡市" },
  31004. {
  31005. value: "510683",
  31006. label: "绵竹市" }] },
  31007. {
  31008. value: "510700",
  31009. label: "绵阳市",
  31010. children: [{
  31011. value: "510701",
  31012. label: "市辖区" },
  31013. {
  31014. value: "510703",
  31015. label: "涪城区" },
  31016. {
  31017. value: "510704",
  31018. label: "游仙区" },
  31019. {
  31020. value: "510705",
  31021. label: "安州区" },
  31022. {
  31023. value: "510722",
  31024. label: "三台县" },
  31025. {
  31026. value: "510723",
  31027. label: "盐亭县" },
  31028. {
  31029. value: "510725",
  31030. label: "梓潼县" },
  31031. {
  31032. value: "510726",
  31033. label: "北川羌族自治县" },
  31034. {
  31035. value: "510727",
  31036. label: "平武县" },
  31037. {
  31038. value: "510781",
  31039. label: "江油市" }] },
  31040. {
  31041. value: "510800",
  31042. label: "广元市",
  31043. children: [{
  31044. value: "510801",
  31045. label: "市辖区" },
  31046. {
  31047. value: "510802",
  31048. label: "利州区" },
  31049. {
  31050. value: "510811",
  31051. label: "昭化区" },
  31052. {
  31053. value: "510812",
  31054. label: "朝天区" },
  31055. {
  31056. value: "510821",
  31057. label: "旺苍县" },
  31058. {
  31059. value: "510822",
  31060. label: "青川县" },
  31061. {
  31062. value: "510823",
  31063. label: "剑阁县" },
  31064. {
  31065. value: "510824",
  31066. label: "苍溪县" }] },
  31067. {
  31068. value: "510900",
  31069. label: "遂宁市",
  31070. children: [{
  31071. value: "510901",
  31072. label: "市辖区" },
  31073. {
  31074. value: "510903",
  31075. label: "船山区" },
  31076. {
  31077. value: "510904",
  31078. label: "安居区" },
  31079. {
  31080. value: "510921",
  31081. label: "蓬溪县" },
  31082. {
  31083. value: "510922",
  31084. label: "射洪县" },
  31085. {
  31086. value: "510923",
  31087. label: "大英县" }] },
  31088. {
  31089. value: "511000",
  31090. label: "内江市",
  31091. children: [{
  31092. value: "511001",
  31093. label: "市辖区" },
  31094. {
  31095. value: "511002",
  31096. label: "市中区" },
  31097. {
  31098. value: "511011",
  31099. label: "东兴区" },
  31100. {
  31101. value: "511024",
  31102. label: "威远县" },
  31103. {
  31104. value: "511025",
  31105. label: "资中县" },
  31106. {
  31107. value: "511071",
  31108. label: "内江经济开发区" },
  31109. {
  31110. value: "511083",
  31111. label: "隆昌市" }] },
  31112. {
  31113. value: "511100",
  31114. label: "乐山市",
  31115. children: [{
  31116. value: "511101",
  31117. label: "市辖区" },
  31118. {
  31119. value: "511102",
  31120. label: "市中区" },
  31121. {
  31122. value: "511111",
  31123. label: "沙湾区" },
  31124. {
  31125. value: "511112",
  31126. label: "五通桥区" },
  31127. {
  31128. value: "511113",
  31129. label: "金口河区" },
  31130. {
  31131. value: "511123",
  31132. label: "犍为县" },
  31133. {
  31134. value: "511124",
  31135. label: "井研县" },
  31136. {
  31137. value: "511126",
  31138. label: "夹江县" },
  31139. {
  31140. value: "511129",
  31141. label: "沐川县" },
  31142. {
  31143. value: "511132",
  31144. label: "峨边彝族自治县" },
  31145. {
  31146. value: "511133",
  31147. label: "马边彝族自治县" },
  31148. {
  31149. value: "511181",
  31150. label: "峨眉山市" }] },
  31151. {
  31152. value: "511300",
  31153. label: "南充市",
  31154. children: [{
  31155. value: "511301",
  31156. label: "市辖区" },
  31157. {
  31158. value: "511302",
  31159. label: "顺庆区" },
  31160. {
  31161. value: "511303",
  31162. label: "高坪区" },
  31163. {
  31164. value: "511304",
  31165. label: "嘉陵区" },
  31166. {
  31167. value: "511321",
  31168. label: "南部县" },
  31169. {
  31170. value: "511322",
  31171. label: "营山县" },
  31172. {
  31173. value: "511323",
  31174. label: "蓬安县" },
  31175. {
  31176. value: "511324",
  31177. label: "仪陇县" },
  31178. {
  31179. value: "511325",
  31180. label: "西充县" },
  31181. {
  31182. value: "511381",
  31183. label: "阆中市" }] },
  31184. {
  31185. value: "511400",
  31186. label: "眉山市",
  31187. children: [{
  31188. value: "511401",
  31189. label: "市辖区" },
  31190. {
  31191. value: "511402",
  31192. label: "东坡区" },
  31193. {
  31194. value: "511403",
  31195. label: "彭山区" },
  31196. {
  31197. value: "511421",
  31198. label: "仁寿县" },
  31199. {
  31200. value: "511423",
  31201. label: "洪雅县" },
  31202. {
  31203. value: "511424",
  31204. label: "丹棱县" },
  31205. {
  31206. value: "511425",
  31207. label: "青神县" }] },
  31208. {
  31209. value: "511500",
  31210. label: "宜宾市",
  31211. children: [{
  31212. value: "511501",
  31213. label: "市辖区" },
  31214. {
  31215. value: "511502",
  31216. label: "翠屏区" },
  31217. {
  31218. value: "511503",
  31219. label: "南溪区" },
  31220. {
  31221. value: "511521",
  31222. label: "宜宾县" },
  31223. {
  31224. value: "511523",
  31225. label: "江安县" },
  31226. {
  31227. value: "511524",
  31228. label: "长宁县" },
  31229. {
  31230. value: "511525",
  31231. label: "高县" },
  31232. {
  31233. value: "511526",
  31234. label: "珙县" },
  31235. {
  31236. value: "511527",
  31237. label: "筠连县" },
  31238. {
  31239. value: "511528",
  31240. label: "兴文县" },
  31241. {
  31242. value: "511529",
  31243. label: "屏山县" }] },
  31244. {
  31245. value: "511600",
  31246. label: "广安市",
  31247. children: [{
  31248. value: "511601",
  31249. label: "市辖区" },
  31250. {
  31251. value: "511602",
  31252. label: "广安区" },
  31253. {
  31254. value: "511603",
  31255. label: "前锋区" },
  31256. {
  31257. value: "511621",
  31258. label: "岳池县" },
  31259. {
  31260. value: "511622",
  31261. label: "武胜县" },
  31262. {
  31263. value: "511623",
  31264. label: "邻水县" },
  31265. {
  31266. value: "511681",
  31267. label: "华蓥市" }] },
  31268. {
  31269. value: "511700",
  31270. label: "达州市",
  31271. children: [{
  31272. value: "511701",
  31273. label: "市辖区" },
  31274. {
  31275. value: "511702",
  31276. label: "通川区" },
  31277. {
  31278. value: "511703",
  31279. label: "达川区" },
  31280. {
  31281. value: "511722",
  31282. label: "宣汉县" },
  31283. {
  31284. value: "511723",
  31285. label: "开江县" },
  31286. {
  31287. value: "511724",
  31288. label: "大竹县" },
  31289. {
  31290. value: "511725",
  31291. label: "渠县" },
  31292. {
  31293. value: "511771",
  31294. label: "达州经济开发区" },
  31295. {
  31296. value: "511781",
  31297. label: "万源市" }] },
  31298. {
  31299. value: "511800",
  31300. label: "雅安市",
  31301. children: [{
  31302. value: "511801",
  31303. label: "市辖区" },
  31304. {
  31305. value: "511802",
  31306. label: "雨城区" },
  31307. {
  31308. value: "511803",
  31309. label: "名山区" },
  31310. {
  31311. value: "511822",
  31312. label: "荥经县" },
  31313. {
  31314. value: "511823",
  31315. label: "汉源县" },
  31316. {
  31317. value: "511824",
  31318. label: "石棉县" },
  31319. {
  31320. value: "511825",
  31321. label: "天全县" },
  31322. {
  31323. value: "511826",
  31324. label: "芦山县" },
  31325. {
  31326. value: "511827",
  31327. label: "宝兴县" }] },
  31328. {
  31329. value: "511900",
  31330. label: "巴中市",
  31331. children: [{
  31332. value: "511901",
  31333. label: "市辖区" },
  31334. {
  31335. value: "511902",
  31336. label: "巴州区" },
  31337. {
  31338. value: "511903",
  31339. label: "恩阳区" },
  31340. {
  31341. value: "511921",
  31342. label: "通江县" },
  31343. {
  31344. value: "511922",
  31345. label: "南江县" },
  31346. {
  31347. value: "511923",
  31348. label: "平昌县" },
  31349. {
  31350. value: "511971",
  31351. label: "巴中经济开发区" }] },
  31352. {
  31353. value: "512000",
  31354. label: "资阳市",
  31355. children: [{
  31356. value: "512001",
  31357. label: "市辖区" },
  31358. {
  31359. value: "512002",
  31360. label: "雁江区" },
  31361. {
  31362. value: "512021",
  31363. label: "安岳县" },
  31364. {
  31365. value: "512022",
  31366. label: "乐至县" }] },
  31367. {
  31368. value: "513200",
  31369. label: "阿坝藏族羌族自治州",
  31370. children: [{
  31371. value: "513201",
  31372. label: "马尔康市" },
  31373. {
  31374. value: "513221",
  31375. label: "汶川县" },
  31376. {
  31377. value: "513222",
  31378. label: "理县" },
  31379. {
  31380. value: "513223",
  31381. label: "茂县" },
  31382. {
  31383. value: "513224",
  31384. label: "松潘县" },
  31385. {
  31386. value: "513225",
  31387. label: "九寨沟县" },
  31388. {
  31389. value: "513226",
  31390. label: "金川县" },
  31391. {
  31392. value: "513227",
  31393. label: "小金县" },
  31394. {
  31395. value: "513228",
  31396. label: "黑水县" },
  31397. {
  31398. value: "513230",
  31399. label: "壤塘县" },
  31400. {
  31401. value: "513231",
  31402. label: "阿坝县" },
  31403. {
  31404. value: "513232",
  31405. label: "若尔盖县" },
  31406. {
  31407. value: "513233",
  31408. label: "红原县" }] },
  31409. {
  31410. value: "513300",
  31411. label: "甘孜藏族自治州",
  31412. children: [{
  31413. value: "513301",
  31414. label: "康定市" },
  31415. {
  31416. value: "513322",
  31417. label: "泸定县" },
  31418. {
  31419. value: "513323",
  31420. label: "丹巴县" },
  31421. {
  31422. value: "513324",
  31423. label: "九龙县" },
  31424. {
  31425. value: "513325",
  31426. label: "雅江县" },
  31427. {
  31428. value: "513326",
  31429. label: "道孚县" },
  31430. {
  31431. value: "513327",
  31432. label: "炉霍县" },
  31433. {
  31434. value: "513328",
  31435. label: "甘孜县" },
  31436. {
  31437. value: "513329",
  31438. label: "新龙县" },
  31439. {
  31440. value: "513330",
  31441. label: "德格县" },
  31442. {
  31443. value: "513331",
  31444. label: "白玉县" },
  31445. {
  31446. value: "513332",
  31447. label: "石渠县" },
  31448. {
  31449. value: "513333",
  31450. label: "色达县" },
  31451. {
  31452. value: "513334",
  31453. label: "理塘县" },
  31454. {
  31455. value: "513335",
  31456. label: "巴塘县" },
  31457. {
  31458. value: "513336",
  31459. label: "乡城县" },
  31460. {
  31461. value: "513337",
  31462. label: "稻城县" },
  31463. {
  31464. value: "513338",
  31465. label: "得荣县" }] },
  31466. {
  31467. value: "513400",
  31468. label: "凉山彝族自治州",
  31469. children: [{
  31470. value: "513401",
  31471. label: "西昌市" },
  31472. {
  31473. value: "513422",
  31474. label: "木里藏族自治县" },
  31475. {
  31476. value: "513423",
  31477. label: "盐源县" },
  31478. {
  31479. value: "513424",
  31480. label: "德昌县" },
  31481. {
  31482. value: "513425",
  31483. label: "会理县" },
  31484. {
  31485. value: "513426",
  31486. label: "会东县" },
  31487. {
  31488. value: "513427",
  31489. label: "宁南县" },
  31490. {
  31491. value: "513428",
  31492. label: "普格县" },
  31493. {
  31494. value: "513429",
  31495. label: "布拖县" },
  31496. {
  31497. value: "513430",
  31498. label: "金阳县" },
  31499. {
  31500. value: "513431",
  31501. label: "昭觉县" },
  31502. {
  31503. value: "513432",
  31504. label: "喜德县" },
  31505. {
  31506. value: "513433",
  31507. label: "冕宁县" },
  31508. {
  31509. value: "513434",
  31510. label: "越西县" },
  31511. {
  31512. value: "513435",
  31513. label: "甘洛县" },
  31514. {
  31515. value: "513436",
  31516. label: "美姑县" },
  31517. {
  31518. value: "513437",
  31519. label: "雷波县" }] }] },
  31520. {
  31521. value: '520000',
  31522. label: '贵州省',
  31523. children: [{
  31524. value: "520100",
  31525. label: "贵阳市",
  31526. children: [{
  31527. value: "520101",
  31528. label: "市辖区" },
  31529. {
  31530. value: "520102",
  31531. label: "南明区" },
  31532. {
  31533. value: "520103",
  31534. label: "云岩区" },
  31535. {
  31536. value: "520111",
  31537. label: "花溪区" },
  31538. {
  31539. value: "520112",
  31540. label: "乌当区" },
  31541. {
  31542. value: "520113",
  31543. label: "白云区" },
  31544. {
  31545. value: "520115",
  31546. label: "观山湖区" },
  31547. {
  31548. value: "520121",
  31549. label: "开阳县" },
  31550. {
  31551. value: "520122",
  31552. label: "息烽县" },
  31553. {
  31554. value: "520123",
  31555. label: "修文县" },
  31556. {
  31557. value: "520181",
  31558. label: "清镇市" }] },
  31559. {
  31560. value: "520200",
  31561. label: "六盘水市",
  31562. children: [{
  31563. value: "520201",
  31564. label: "钟山区" },
  31565. {
  31566. value: "520203",
  31567. label: "六枝特区" },
  31568. {
  31569. value: "520221",
  31570. label: "水城县" },
  31571. {
  31572. value: "520281",
  31573. label: "盘州市" }] },
  31574. {
  31575. value: "520300",
  31576. label: "遵义市",
  31577. children: [{
  31578. value: "520301",
  31579. label: "市辖区" },
  31580. {
  31581. value: "520302",
  31582. label: "红花岗区" },
  31583. {
  31584. value: "520303",
  31585. label: "汇川区" },
  31586. {
  31587. value: "520304",
  31588. label: "播州区" },
  31589. {
  31590. value: "520322",
  31591. label: "桐梓县" },
  31592. {
  31593. value: "520323",
  31594. label: "绥阳县" },
  31595. {
  31596. value: "520324",
  31597. label: "正安县" },
  31598. {
  31599. value: "520325",
  31600. label: "道真仡佬族苗族自治县" },
  31601. {
  31602. value: "520326",
  31603. label: "务川仡佬族苗族自治县" },
  31604. {
  31605. value: "520327",
  31606. label: "凤冈县" },
  31607. {
  31608. value: "520328",
  31609. label: "湄潭县" },
  31610. {
  31611. value: "520329",
  31612. label: "余庆县" },
  31613. {
  31614. value: "520330",
  31615. label: "习水县" },
  31616. {
  31617. value: "520381",
  31618. label: "赤水市" },
  31619. {
  31620. value: "520382",
  31621. label: "仁怀市" }] },
  31622. {
  31623. value: "520400",
  31624. label: "安顺市",
  31625. children: [{
  31626. value: "520401",
  31627. label: "市辖区" },
  31628. {
  31629. value: "520402",
  31630. label: "西秀区" },
  31631. {
  31632. value: "520403",
  31633. label: "平坝区" },
  31634. {
  31635. value: "520422",
  31636. label: "普定县" },
  31637. {
  31638. value: "520423",
  31639. label: "镇宁布依族苗族自治县" },
  31640. {
  31641. value: "520424",
  31642. label: "关岭布依族苗族自治县" },
  31643. {
  31644. value: "520425",
  31645. label: "紫云苗族布依族自治县" }] },
  31646. {
  31647. value: "520500",
  31648. label: "毕节市",
  31649. children: [{
  31650. value: "520501",
  31651. label: "市辖区" },
  31652. {
  31653. value: "520502",
  31654. label: "七星关区" },
  31655. {
  31656. value: "520521",
  31657. label: "大方县" },
  31658. {
  31659. value: "520522",
  31660. label: "黔西县" },
  31661. {
  31662. value: "520523",
  31663. label: "金沙县" },
  31664. {
  31665. value: "520524",
  31666. label: "织金县" },
  31667. {
  31668. value: "520525",
  31669. label: "纳雍县" },
  31670. {
  31671. value: "520526",
  31672. label: "威宁彝族回族苗族自治县" },
  31673. {
  31674. value: "520527",
  31675. label: "赫章县" }] },
  31676. {
  31677. value: "520600",
  31678. label: "铜仁市",
  31679. children: [{
  31680. value: "520601",
  31681. label: "市辖区" },
  31682. {
  31683. value: "520602",
  31684. label: "碧江区" },
  31685. {
  31686. value: "520603",
  31687. label: "万山区" },
  31688. {
  31689. value: "520621",
  31690. label: "江口县" },
  31691. {
  31692. value: "520622",
  31693. label: "玉屏侗族自治县" },
  31694. {
  31695. value: "520623",
  31696. label: "石阡县" },
  31697. {
  31698. value: "520624",
  31699. label: "思南县" },
  31700. {
  31701. value: "520625",
  31702. label: "印江土家族苗族自治县" },
  31703. {
  31704. value: "520626",
  31705. label: "德江县" },
  31706. {
  31707. value: "520627",
  31708. label: "沿河土家族自治县" },
  31709. {
  31710. value: "520628",
  31711. label: "松桃苗族自治县" }] },
  31712. {
  31713. value: "522300",
  31714. label: "黔西南布依族苗族自治州",
  31715. children: [{
  31716. value: "522301",
  31717. label: "兴义市" },
  31718. {
  31719. value: "522322",
  31720. label: "兴仁县" },
  31721. {
  31722. value: "522323",
  31723. label: "普安县" },
  31724. {
  31725. value: "522324",
  31726. label: "晴隆县" },
  31727. {
  31728. value: "522325",
  31729. label: "贞丰县" },
  31730. {
  31731. value: "522326",
  31732. label: "望谟县" },
  31733. {
  31734. value: "522327",
  31735. label: "册亨县" },
  31736. {
  31737. value: "522328",
  31738. label: "安龙县" }] },
  31739. {
  31740. value: "522600",
  31741. label: "黔东南苗族侗族自治州",
  31742. children: [{
  31743. value: "522601",
  31744. label: "凯里市" },
  31745. {
  31746. value: "522622",
  31747. label: "黄平县" },
  31748. {
  31749. value: "522623",
  31750. label: "施秉县" },
  31751. {
  31752. value: "522624",
  31753. label: "三穗县" },
  31754. {
  31755. value: "522625",
  31756. label: "镇远县" },
  31757. {
  31758. value: "522626",
  31759. label: "岑巩县" },
  31760. {
  31761. value: "522627",
  31762. label: "天柱县" },
  31763. {
  31764. value: "522628",
  31765. label: "锦屏县" },
  31766. {
  31767. value: "522629",
  31768. label: "剑河县" },
  31769. {
  31770. value: "522630",
  31771. label: "台江县" },
  31772. {
  31773. value: "522631",
  31774. label: "黎平县" },
  31775. {
  31776. value: "522632",
  31777. label: "榕江县" },
  31778. {
  31779. value: "522633",
  31780. label: "从江县" },
  31781. {
  31782. value: "522634",
  31783. label: "雷山县" },
  31784. {
  31785. value: "522635",
  31786. label: "麻江县" },
  31787. {
  31788. value: "522636",
  31789. label: "丹寨县" }] },
  31790. {
  31791. value: "522700",
  31792. label: "黔南布依族苗族自治州",
  31793. children: [{
  31794. value: "522701",
  31795. label: "都匀市" },
  31796. {
  31797. value: "522702",
  31798. label: "福泉市" },
  31799. {
  31800. value: "522722",
  31801. label: "荔波县" },
  31802. {
  31803. value: "522723",
  31804. label: "贵定县" },
  31805. {
  31806. value: "522725",
  31807. label: "瓮安县" },
  31808. {
  31809. value: "522726",
  31810. label: "独山县" },
  31811. {
  31812. value: "522727",
  31813. label: "平塘县" },
  31814. {
  31815. value: "522728",
  31816. label: "罗甸县" },
  31817. {
  31818. value: "522729",
  31819. label: "长顺县" },
  31820. {
  31821. value: "522730",
  31822. label: "龙里县" },
  31823. {
  31824. value: "522731",
  31825. label: "惠水县" },
  31826. {
  31827. value: "522732",
  31828. label: "三都水族自治县" }] }] },
  31829. {
  31830. value: '530000',
  31831. label: '云南省',
  31832. children: [{
  31833. value: "530100",
  31834. label: "昆明市",
  31835. children: [{
  31836. value: "530101",
  31837. label: "市辖区" },
  31838. {
  31839. value: "530102",
  31840. label: "五华区" },
  31841. {
  31842. value: "530103",
  31843. label: "盘龙区" },
  31844. {
  31845. value: "530111",
  31846. label: "官渡区" },
  31847. {
  31848. value: "530112",
  31849. label: "西山区" },
  31850. {
  31851. value: "530113",
  31852. label: "东川区" },
  31853. {
  31854. value: "530114",
  31855. label: "呈贡区" },
  31856. {
  31857. value: "530115",
  31858. label: "晋宁区" },
  31859. {
  31860. value: "530124",
  31861. label: "富民县" },
  31862. {
  31863. value: "530125",
  31864. label: "宜良县" },
  31865. {
  31866. value: "530126",
  31867. label: "石林彝族自治县" },
  31868. {
  31869. value: "530127",
  31870. label: "嵩明县" },
  31871. {
  31872. value: "530128",
  31873. label: "禄劝彝族苗族自治县" },
  31874. {
  31875. value: "530129",
  31876. label: "寻甸回族彝族自治县" },
  31877. {
  31878. value: "530181",
  31879. label: "安宁市" }] },
  31880. {
  31881. value: "530300",
  31882. label: "曲靖市",
  31883. children: [{
  31884. value: "530301",
  31885. label: "市辖区" },
  31886. {
  31887. value: "530302",
  31888. label: "麒麟区" },
  31889. {
  31890. value: "530303",
  31891. label: "沾益区" },
  31892. {
  31893. value: "530321",
  31894. label: "马龙县" },
  31895. {
  31896. value: "530322",
  31897. label: "陆良县" },
  31898. {
  31899. value: "530323",
  31900. label: "师宗县" },
  31901. {
  31902. value: "530324",
  31903. label: "罗平县" },
  31904. {
  31905. value: "530325",
  31906. label: "富源县" },
  31907. {
  31908. value: "530326",
  31909. label: "会泽县" },
  31910. {
  31911. value: "530381",
  31912. label: "宣威市" }] },
  31913. {
  31914. value: "530400",
  31915. label: "玉溪市",
  31916. children: [{
  31917. value: "530401",
  31918. label: "市辖区" },
  31919. {
  31920. value: "530402",
  31921. label: "红塔区" },
  31922. {
  31923. value: "530403",
  31924. label: "江川区" },
  31925. {
  31926. value: "530422",
  31927. label: "澄江县" },
  31928. {
  31929. value: "530423",
  31930. label: "通海县" },
  31931. {
  31932. value: "530424",
  31933. label: "华宁县" },
  31934. {
  31935. value: "530425",
  31936. label: "易门县" },
  31937. {
  31938. value: "530426",
  31939. label: "峨山彝族自治县" },
  31940. {
  31941. value: "530427",
  31942. label: "新平彝族傣族自治县" },
  31943. {
  31944. value: "530428",
  31945. label: "元江哈尼族彝族傣族自治县" }] },
  31946. {
  31947. value: "530500",
  31948. label: "保山市",
  31949. children: [{
  31950. value: "530501",
  31951. label: "市辖区" },
  31952. {
  31953. value: "530502",
  31954. label: "隆阳区" },
  31955. {
  31956. value: "530521",
  31957. label: "施甸县" },
  31958. {
  31959. value: "530523",
  31960. label: "龙陵县" },
  31961. {
  31962. value: "530524",
  31963. label: "昌宁县" },
  31964. {
  31965. value: "530581",
  31966. label: "腾冲市" }] },
  31967. {
  31968. value: "530600",
  31969. label: "昭通市",
  31970. children: [{
  31971. value: "530601",
  31972. label: "市辖区" },
  31973. {
  31974. value: "530602",
  31975. label: "昭阳区" },
  31976. {
  31977. value: "530621",
  31978. label: "鲁甸县" },
  31979. {
  31980. value: "530622",
  31981. label: "巧家县" },
  31982. {
  31983. value: "530623",
  31984. label: "盐津县" },
  31985. {
  31986. value: "530624",
  31987. label: "大关县" },
  31988. {
  31989. value: "530625",
  31990. label: "永善县" },
  31991. {
  31992. value: "530626",
  31993. label: "绥江县" },
  31994. {
  31995. value: "530627",
  31996. label: "镇雄县" },
  31997. {
  31998. value: "530628",
  31999. label: "彝良县" },
  32000. {
  32001. value: "530629",
  32002. label: "威信县" },
  32003. {
  32004. value: "530630",
  32005. label: "水富县" }] },
  32006. {
  32007. value: "530700",
  32008. label: "丽江市",
  32009. children: [{
  32010. value: "530701",
  32011. label: "市辖区" },
  32012. {
  32013. value: "530702",
  32014. label: "古城区" },
  32015. {
  32016. value: "530721",
  32017. label: "玉龙纳西族自治县" },
  32018. {
  32019. value: "530722",
  32020. label: "永胜县" },
  32021. {
  32022. value: "530723",
  32023. label: "华坪县" },
  32024. {
  32025. value: "530724",
  32026. label: "宁蒗彝族自治县" }] },
  32027. {
  32028. value: "530800",
  32029. label: "普洱市",
  32030. children: [{
  32031. value: "530801",
  32032. label: "市辖区" },
  32033. {
  32034. value: "530802",
  32035. label: "思茅区" },
  32036. {
  32037. value: "530821",
  32038. label: "宁洱哈尼族彝族自治县" },
  32039. {
  32040. value: "530822",
  32041. label: "墨江哈尼族自治县" },
  32042. {
  32043. value: "530823",
  32044. label: "景东彝族自治县" },
  32045. {
  32046. value: "530824",
  32047. label: "景谷傣族彝族自治县" },
  32048. {
  32049. value: "530825",
  32050. label: "镇沅彝族哈尼族拉祜族自治县" },
  32051. {
  32052. value: "530826",
  32053. label: "江城哈尼族彝族自治县" },
  32054. {
  32055. value: "530827",
  32056. label: "孟连傣族拉祜族佤族自治县" },
  32057. {
  32058. value: "530828",
  32059. label: "澜沧拉祜族自治县" },
  32060. {
  32061. value: "530829",
  32062. label: "西盟佤族自治县" }] },
  32063. {
  32064. value: "530900",
  32065. label: "临沧市",
  32066. children: [{
  32067. value: "530901",
  32068. label: "市辖区" },
  32069. {
  32070. value: "530902",
  32071. label: "临翔区" },
  32072. {
  32073. value: "530921",
  32074. label: "凤庆县" },
  32075. {
  32076. value: "530922",
  32077. label: "云县" },
  32078. {
  32079. value: "530923",
  32080. label: "永德县" },
  32081. {
  32082. value: "530924",
  32083. label: "镇康县" },
  32084. {
  32085. value: "530925",
  32086. label: "双江拉祜族佤族布朗族傣族自治县" },
  32087. {
  32088. value: "530926",
  32089. label: "耿马傣族佤族自治县" },
  32090. {
  32091. value: "530927",
  32092. label: "沧源佤族自治县" }] },
  32093. {
  32094. value: "532300",
  32095. label: "楚雄彝族自治州",
  32096. children: [{
  32097. value: "532301",
  32098. label: "楚雄市" },
  32099. {
  32100. value: "532322",
  32101. label: "双柏县" },
  32102. {
  32103. value: "532323",
  32104. label: "牟定县" },
  32105. {
  32106. value: "532324",
  32107. label: "南华县" },
  32108. {
  32109. value: "532325",
  32110. label: "姚安县" },
  32111. {
  32112. value: "532326",
  32113. label: "大姚县" },
  32114. {
  32115. value: "532327",
  32116. label: "永仁县" },
  32117. {
  32118. value: "532328",
  32119. label: "元谋县" },
  32120. {
  32121. value: "532329",
  32122. label: "武定县" },
  32123. {
  32124. value: "532331",
  32125. label: "禄丰县" }] },
  32126. {
  32127. value: "532500",
  32128. label: "红河哈尼族彝族自治州",
  32129. children: [{
  32130. value: "532501",
  32131. label: "个旧市" },
  32132. {
  32133. value: "532502",
  32134. label: "开远市" },
  32135. {
  32136. value: "532503",
  32137. label: "蒙自市" },
  32138. {
  32139. value: "532504",
  32140. label: "弥勒市" },
  32141. {
  32142. value: "532523",
  32143. label: "屏边苗族自治县" },
  32144. {
  32145. value: "532524",
  32146. label: "建水县" },
  32147. {
  32148. value: "532525",
  32149. label: "石屏县" },
  32150. {
  32151. value: "532527",
  32152. label: "泸西县" },
  32153. {
  32154. value: "532528",
  32155. label: "元阳县" },
  32156. {
  32157. value: "532529",
  32158. label: "红河县" },
  32159. {
  32160. value: "532530",
  32161. label: "金平苗族瑶族傣族自治县" },
  32162. {
  32163. value: "532531",
  32164. label: "绿春县" },
  32165. {
  32166. value: "532532",
  32167. label: "河口瑶族自治县" }] },
  32168. {
  32169. value: "532600",
  32170. label: "文山壮族苗族自治州",
  32171. children: [{
  32172. value: "532601",
  32173. label: "文山市" },
  32174. {
  32175. value: "532622",
  32176. label: "砚山县" },
  32177. {
  32178. value: "532623",
  32179. label: "西畴县" },
  32180. {
  32181. value: "532624",
  32182. label: "麻栗坡县" },
  32183. {
  32184. value: "532625",
  32185. label: "马关县" },
  32186. {
  32187. value: "532626",
  32188. label: "丘北县" },
  32189. {
  32190. value: "532627",
  32191. label: "广南县" },
  32192. {
  32193. value: "532628",
  32194. label: "富宁县" }] },
  32195. {
  32196. value: "532800",
  32197. label: "西双版纳傣族自治州",
  32198. children: [{
  32199. value: "532801",
  32200. label: "景洪市" },
  32201. {
  32202. value: "532822",
  32203. label: "勐海县" },
  32204. {
  32205. value: "532823",
  32206. label: "勐腊县" }] },
  32207. {
  32208. value: "532900",
  32209. label: "大理白族自治州",
  32210. children: [{
  32211. value: "532901",
  32212. label: "大理市" },
  32213. {
  32214. value: "532922",
  32215. label: "漾濞彝族自治县" },
  32216. {
  32217. value: "532923",
  32218. label: "祥云县" },
  32219. {
  32220. value: "532924",
  32221. label: "宾川县" },
  32222. {
  32223. value: "532925",
  32224. label: "弥渡县" },
  32225. {
  32226. value: "532926",
  32227. label: "南涧彝族自治县" },
  32228. {
  32229. value: "532927",
  32230. label: "巍山彝族回族自治县" },
  32231. {
  32232. value: "532928",
  32233. label: "永平县" },
  32234. {
  32235. value: "532929",
  32236. label: "云龙县" },
  32237. {
  32238. value: "532930",
  32239. label: "洱源县" },
  32240. {
  32241. value: "532931",
  32242. label: "剑川县" },
  32243. {
  32244. value: "532932",
  32245. label: "鹤庆县" }] },
  32246. {
  32247. value: "533100",
  32248. label: "德宏傣族景颇族自治州",
  32249. children: [{
  32250. value: "533102",
  32251. label: "瑞丽市" },
  32252. {
  32253. value: "533103",
  32254. label: "芒市" },
  32255. {
  32256. value: "533122",
  32257. label: "梁河县" },
  32258. {
  32259. value: "533123",
  32260. label: "盈江县" },
  32261. {
  32262. value: "533124",
  32263. label: "陇川县" }] },
  32264. {
  32265. value: "533300",
  32266. label: "怒江傈僳族自治州",
  32267. children: [{
  32268. value: "533301",
  32269. label: "泸水市" },
  32270. {
  32271. value: "533323",
  32272. label: "福贡县" },
  32273. {
  32274. value: "533324",
  32275. label: "贡山独龙族怒族自治县" },
  32276. {
  32277. value: "533325",
  32278. label: "兰坪白族普米族自治县" }] },
  32279. {
  32280. value: "533400",
  32281. label: "迪庆藏族自治州",
  32282. children: [{
  32283. value: "533401",
  32284. label: "香格里拉市" },
  32285. {
  32286. value: "533422",
  32287. label: "德钦县" },
  32288. {
  32289. value: "533423",
  32290. label: "维西傈僳族自治县" }] }] },
  32291. {
  32292. value: '540000',
  32293. label: '西藏',
  32294. children: [{
  32295. value: "540100",
  32296. label: "拉萨市",
  32297. children: [{
  32298. value: "540101",
  32299. label: "市辖区" },
  32300. {
  32301. value: "540102",
  32302. label: "城关区" },
  32303. {
  32304. value: "540103",
  32305. label: "堆龙德庆区" },
  32306. {
  32307. value: "540121",
  32308. label: "林周县" },
  32309. {
  32310. value: "540122",
  32311. label: "当雄县" },
  32312. {
  32313. value: "540123",
  32314. label: "尼木县" },
  32315. {
  32316. value: "540124",
  32317. label: "曲水县" },
  32318. {
  32319. value: "540126",
  32320. label: "达孜县" },
  32321. {
  32322. value: "540127",
  32323. label: "墨竹工卡县" },
  32324. {
  32325. value: "540171",
  32326. label: "格尔木藏青工业园区" },
  32327. {
  32328. value: "540172",
  32329. label: "拉萨经济技术开发区" },
  32330. {
  32331. value: "540173",
  32332. label: "西藏文化旅游创意园区" },
  32333. {
  32334. value: "540174",
  32335. label: "达孜工业园区" }] },
  32336. {
  32337. value: "540200",
  32338. label: "日喀则市",
  32339. children: [{
  32340. value: "540202",
  32341. label: "桑珠孜区" },
  32342. {
  32343. value: "540221",
  32344. label: "南木林县" },
  32345. {
  32346. value: "540222",
  32347. label: "江孜县" },
  32348. {
  32349. value: "540223",
  32350. label: "定日县" },
  32351. {
  32352. value: "540224",
  32353. label: "萨迦县" },
  32354. {
  32355. value: "540225",
  32356. label: "拉孜县" },
  32357. {
  32358. value: "540226",
  32359. label: "昂仁县" },
  32360. {
  32361. value: "540227",
  32362. label: "谢通门县" },
  32363. {
  32364. value: "540228",
  32365. label: "白朗县" },
  32366. {
  32367. value: "540229",
  32368. label: "仁布县" },
  32369. {
  32370. value: "540230",
  32371. label: "康马县" },
  32372. {
  32373. value: "540231",
  32374. label: "定结县" },
  32375. {
  32376. value: "540232",
  32377. label: "仲巴县" },
  32378. {
  32379. value: "540233",
  32380. label: "亚东县" },
  32381. {
  32382. value: "540234",
  32383. label: "吉隆县" },
  32384. {
  32385. value: "540235",
  32386. label: "聂拉木县" },
  32387. {
  32388. value: "540236",
  32389. label: "萨嘎县" },
  32390. {
  32391. value: "540237",
  32392. label: "岗巴县" }] },
  32393. {
  32394. value: "540300",
  32395. label: "昌都市",
  32396. children: [{
  32397. value: "540302",
  32398. label: "卡若区" },
  32399. {
  32400. value: "540321",
  32401. label: "江达县" },
  32402. {
  32403. value: "540322",
  32404. label: "贡觉县" },
  32405. {
  32406. value: "540323",
  32407. label: "类乌齐县" },
  32408. {
  32409. value: "540324",
  32410. label: "丁青县" },
  32411. {
  32412. value: "540325",
  32413. label: "察雅县" },
  32414. {
  32415. value: "540326",
  32416. label: "八宿县" },
  32417. {
  32418. value: "540327",
  32419. label: "左贡县" },
  32420. {
  32421. value: "540328",
  32422. label: "芒康县" },
  32423. {
  32424. value: "540329",
  32425. label: "洛隆县" },
  32426. {
  32427. value: "540330",
  32428. label: "边坝县" }] },
  32429. {
  32430. value: "540400",
  32431. label: "林芝市",
  32432. children: [{
  32433. value: "540402",
  32434. label: "巴宜区" },
  32435. {
  32436. value: "540421",
  32437. label: "工布江达县" },
  32438. {
  32439. value: "540422",
  32440. label: "米林县" },
  32441. {
  32442. value: "540423",
  32443. label: "墨脱县" },
  32444. {
  32445. value: "540424",
  32446. label: "波密县" },
  32447. {
  32448. value: "540425",
  32449. label: "察隅县" },
  32450. {
  32451. value: "540426",
  32452. label: "朗县" }] },
  32453. {
  32454. value: "540500",
  32455. label: "山南市",
  32456. children: [{
  32457. value: "540501",
  32458. label: "市辖区" },
  32459. {
  32460. value: "540502",
  32461. label: "乃东区" },
  32462. {
  32463. value: "540521",
  32464. label: "扎囊县" },
  32465. {
  32466. value: "540522",
  32467. label: "贡嘎县" },
  32468. {
  32469. value: "540523",
  32470. label: "桑日县" },
  32471. {
  32472. value: "540524",
  32473. label: "琼结县" },
  32474. {
  32475. value: "540525",
  32476. label: "曲松县" },
  32477. {
  32478. value: "540526",
  32479. label: "措美县" },
  32480. {
  32481. value: "540527",
  32482. label: "洛扎县" },
  32483. {
  32484. value: "540528",
  32485. label: "加查县" },
  32486. {
  32487. value: "540529",
  32488. label: "隆子县" },
  32489. {
  32490. value: "540530",
  32491. label: "错那县" },
  32492. {
  32493. value: "540531",
  32494. label: "浪卡子县" }] },
  32495. {
  32496. value: "542400",
  32497. label: "那曲地区",
  32498. children: [{
  32499. value: "542421",
  32500. label: "那曲县" },
  32501. {
  32502. value: "542422",
  32503. label: "嘉黎县" },
  32504. {
  32505. value: "542423",
  32506. label: "比如县" },
  32507. {
  32508. value: "542424",
  32509. label: "聂荣县" },
  32510. {
  32511. value: "542425",
  32512. label: "安多县" },
  32513. {
  32514. value: "542426",
  32515. label: "申扎县" },
  32516. {
  32517. value: "542427",
  32518. label: "索县" },
  32519. {
  32520. value: "542428",
  32521. label: "班戈县" },
  32522. {
  32523. value: "542429",
  32524. label: "巴青县" },
  32525. {
  32526. value: "542430",
  32527. label: "尼玛县" },
  32528. {
  32529. value: "542431",
  32530. label: "双湖县" }] },
  32531. {
  32532. value: "542500",
  32533. label: "阿里地区",
  32534. children: [{
  32535. value: "542521",
  32536. label: "普兰县" },
  32537. {
  32538. value: "542522",
  32539. label: "札达县" },
  32540. {
  32541. value: "542523",
  32542. label: "噶尔县" },
  32543. {
  32544. value: "542524",
  32545. label: "日土县" },
  32546. {
  32547. value: "542525",
  32548. label: "革吉县" },
  32549. {
  32550. value: "542526",
  32551. label: "改则县" },
  32552. {
  32553. value: "542527",
  32554. label: "措勤县" }] }] },
  32555. {
  32556. value: '610000',
  32557. label: '陕西省',
  32558. children: [{
  32559. value: "610100",
  32560. label: "西安市",
  32561. children: [{
  32562. value: "610101",
  32563. label: "市辖区" },
  32564. {
  32565. value: "610102",
  32566. label: "新城区" },
  32567. {
  32568. value: "610103",
  32569. label: "碑林区" },
  32570. {
  32571. value: "610104",
  32572. label: "莲湖区" },
  32573. {
  32574. value: "610111",
  32575. label: "灞桥区" },
  32576. {
  32577. value: "610112",
  32578. label: "未央区" },
  32579. {
  32580. value: "610113",
  32581. label: "雁塔区" },
  32582. {
  32583. value: "610114",
  32584. label: "阎良区" },
  32585. {
  32586. value: "610115",
  32587. label: "临潼区" },
  32588. {
  32589. value: "610116",
  32590. label: "长安区" },
  32591. {
  32592. value: "610117",
  32593. label: "高陵区" },
  32594. {
  32595. value: "610118",
  32596. label: "鄠邑区" },
  32597. {
  32598. value: "610122",
  32599. label: "蓝田县" },
  32600. {
  32601. value: "610124",
  32602. label: "周至县" }] },
  32603. {
  32604. value: "610200",
  32605. label: "铜川市",
  32606. children: [{
  32607. value: "610201",
  32608. label: "市辖区" },
  32609. {
  32610. value: "610202",
  32611. label: "王益区" },
  32612. {
  32613. value: "610203",
  32614. label: "印台区" },
  32615. {
  32616. value: "610204",
  32617. label: "耀州区" },
  32618. {
  32619. value: "610222",
  32620. label: "宜君县" }] },
  32621. {
  32622. value: "610300",
  32623. label: "宝鸡市",
  32624. children: [{
  32625. value: "610301",
  32626. label: "市辖区" },
  32627. {
  32628. value: "610302",
  32629. label: "渭滨区" },
  32630. {
  32631. value: "610303",
  32632. label: "金台区" },
  32633. {
  32634. value: "610304",
  32635. label: "陈仓区" },
  32636. {
  32637. value: "610322",
  32638. label: "凤翔县" },
  32639. {
  32640. value: "610323",
  32641. label: "岐山县" },
  32642. {
  32643. value: "610324",
  32644. label: "扶风县" },
  32645. {
  32646. value: "610326",
  32647. label: "眉县" },
  32648. {
  32649. value: "610327",
  32650. label: "陇县" },
  32651. {
  32652. value: "610328",
  32653. label: "千阳县" },
  32654. {
  32655. value: "610329",
  32656. label: "麟游县" },
  32657. {
  32658. value: "610330",
  32659. label: "凤县" },
  32660. {
  32661. value: "610331",
  32662. label: "太白县" }] },
  32663. {
  32664. value: "610400",
  32665. label: "咸阳市",
  32666. children: [{
  32667. value: "610401",
  32668. label: "市辖区" },
  32669. {
  32670. value: "610402",
  32671. label: "秦都区" },
  32672. {
  32673. value: "610403",
  32674. label: "杨陵区" },
  32675. {
  32676. value: "610404",
  32677. label: "渭城区" },
  32678. {
  32679. value: "610422",
  32680. label: "三原县" },
  32681. {
  32682. value: "610423",
  32683. label: "泾阳县" },
  32684. {
  32685. value: "610424",
  32686. label: "乾县" },
  32687. {
  32688. value: "610425",
  32689. label: "礼泉县" },
  32690. {
  32691. value: "610426",
  32692. label: "永寿县" },
  32693. {
  32694. value: "610427",
  32695. label: "彬县" },
  32696. {
  32697. value: "610428",
  32698. label: "长武县" },
  32699. {
  32700. value: "610429",
  32701. label: "旬邑县" },
  32702. {
  32703. value: "610430",
  32704. label: "淳化县" },
  32705. {
  32706. value: "610431",
  32707. label: "武功县" },
  32708. {
  32709. value: "610481",
  32710. label: "兴平市" }] },
  32711. {
  32712. value: "610500",
  32713. label: "渭南市",
  32714. children: [{
  32715. value: "610501",
  32716. label: "市辖区" },
  32717. {
  32718. value: "610502",
  32719. label: "临渭区" },
  32720. {
  32721. value: "610503",
  32722. label: "华州区" },
  32723. {
  32724. value: "610522",
  32725. label: "潼关县" },
  32726. {
  32727. value: "610523",
  32728. label: "大荔县" },
  32729. {
  32730. value: "610524",
  32731. label: "合阳县" },
  32732. {
  32733. value: "610525",
  32734. label: "澄城县" },
  32735. {
  32736. value: "610526",
  32737. label: "蒲城县" },
  32738. {
  32739. value: "610527",
  32740. label: "白水县" },
  32741. {
  32742. value: "610528",
  32743. label: "富平县" },
  32744. {
  32745. value: "610581",
  32746. label: "韩城市" },
  32747. {
  32748. value: "610582",
  32749. label: "华阴市" }] },
  32750. {
  32751. value: "610600",
  32752. label: "延安市",
  32753. children: [{
  32754. value: "610601",
  32755. label: "市辖区" },
  32756. {
  32757. value: "610602",
  32758. label: "宝塔区" },
  32759. {
  32760. value: "610603",
  32761. label: "安塞区" },
  32762. {
  32763. value: "610621",
  32764. label: "延长县" },
  32765. {
  32766. value: "610622",
  32767. label: "延川县" },
  32768. {
  32769. value: "610623",
  32770. label: "子长县" },
  32771. {
  32772. value: "610625",
  32773. label: "志丹县" },
  32774. {
  32775. value: "610626",
  32776. label: "吴起县" },
  32777. {
  32778. value: "610627",
  32779. label: "甘泉县" },
  32780. {
  32781. value: "610628",
  32782. label: "富县" },
  32783. {
  32784. value: "610629",
  32785. label: "洛川县" },
  32786. {
  32787. value: "610630",
  32788. label: "宜川县" },
  32789. {
  32790. value: "610631",
  32791. label: "黄龙县" },
  32792. {
  32793. value: "610632",
  32794. label: "黄陵县" }] },
  32795. {
  32796. value: "610700",
  32797. label: "汉中市",
  32798. children: [{
  32799. value: "610701",
  32800. label: "市辖区" },
  32801. {
  32802. value: "610702",
  32803. label: "汉台区" },
  32804. {
  32805. value: "610703",
  32806. label: "南郑区" },
  32807. {
  32808. value: "610722",
  32809. label: "城固县" },
  32810. {
  32811. value: "610723",
  32812. label: "洋县" },
  32813. {
  32814. value: "610724",
  32815. label: "西乡县" },
  32816. {
  32817. value: "610725",
  32818. label: "勉县" },
  32819. {
  32820. value: "610726",
  32821. label: "宁强县" },
  32822. {
  32823. value: "610727",
  32824. label: "略阳县" },
  32825. {
  32826. value: "610728",
  32827. label: "镇巴县" },
  32828. {
  32829. value: "610729",
  32830. label: "留坝县" },
  32831. {
  32832. value: "610730",
  32833. label: "佛坪县" }] },
  32834. {
  32835. value: "610800",
  32836. label: "榆林市",
  32837. children: [{
  32838. value: "610801",
  32839. label: "市辖区" },
  32840. {
  32841. value: "610802",
  32842. label: "榆阳区" },
  32843. {
  32844. value: "610803",
  32845. label: "横山区" },
  32846. {
  32847. value: "610822",
  32848. label: "府谷县" },
  32849. {
  32850. value: "610824",
  32851. label: "靖边县" },
  32852. {
  32853. value: "610825",
  32854. label: "定边县" },
  32855. {
  32856. value: "610826",
  32857. label: "绥德县" },
  32858. {
  32859. value: "610827",
  32860. label: "米脂县" },
  32861. {
  32862. value: "610828",
  32863. label: "佳县" },
  32864. {
  32865. value: "610829",
  32866. label: "吴堡县" },
  32867. {
  32868. value: "610830",
  32869. label: "清涧县" },
  32870. {
  32871. value: "610831",
  32872. label: "子洲县" },
  32873. {
  32874. value: "610881",
  32875. label: "神木市" }] },
  32876. {
  32877. value: "610900",
  32878. label: "安康市",
  32879. children: [{
  32880. value: "610901",
  32881. label: "市辖区" },
  32882. {
  32883. value: "610902",
  32884. label: "汉滨区" },
  32885. {
  32886. value: "610921",
  32887. label: "汉阴县" },
  32888. {
  32889. value: "610922",
  32890. label: "石泉县" },
  32891. {
  32892. value: "610923",
  32893. label: "宁陕县" },
  32894. {
  32895. value: "610924",
  32896. label: "紫阳县" },
  32897. {
  32898. value: "610925",
  32899. label: "岚皋县" },
  32900. {
  32901. value: "610926",
  32902. label: "平利县" },
  32903. {
  32904. value: "610927",
  32905. label: "镇坪县" },
  32906. {
  32907. value: "610928",
  32908. label: "旬阳县" },
  32909. {
  32910. value: "610929",
  32911. label: "白河县" }] },
  32912. {
  32913. value: "611000",
  32914. label: "商洛市",
  32915. children: [{
  32916. value: "611001",
  32917. label: "市辖区" },
  32918. {
  32919. value: "611002",
  32920. label: "商州区" },
  32921. {
  32922. value: "611021",
  32923. label: "洛南县" },
  32924. {
  32925. value: "611022",
  32926. label: "丹凤县" },
  32927. {
  32928. value: "611023",
  32929. label: "商南县" },
  32930. {
  32931. value: "611024",
  32932. label: "山阳县" },
  32933. {
  32934. value: "611025",
  32935. label: "镇安县" },
  32936. {
  32937. value: "611026",
  32938. label: "柞水县" }] }] },
  32939. {
  32940. value: '620000',
  32941. label: '甘肃省',
  32942. children: [{
  32943. value: "620100",
  32944. label: "兰州市",
  32945. children: [{
  32946. value: "620101",
  32947. label: "市辖区" },
  32948. {
  32949. value: "620102",
  32950. label: "城关区" },
  32951. {
  32952. value: "620103",
  32953. label: "七里河区" },
  32954. {
  32955. value: "620104",
  32956. label: "西固区" },
  32957. {
  32958. value: "620105",
  32959. label: "安宁区" },
  32960. {
  32961. value: "620111",
  32962. label: "红古区" },
  32963. {
  32964. value: "620121",
  32965. label: "永登县" },
  32966. {
  32967. value: "620122",
  32968. label: "皋兰县" },
  32969. {
  32970. value: "620123",
  32971. label: "榆中县" },
  32972. {
  32973. value: "620171",
  32974. label: "兰州新区" }] },
  32975. {
  32976. value: "620200",
  32977. label: "嘉峪关市",
  32978. children: [{
  32979. value: "620201",
  32980. label: "市辖区" }] },
  32981. {
  32982. value: "620300",
  32983. label: "金昌市",
  32984. children: [{
  32985. value: "620301",
  32986. label: "市辖区" },
  32987. {
  32988. value: "620302",
  32989. label: "金川区" },
  32990. {
  32991. value: "620321",
  32992. label: "永昌县" }] },
  32993. {
  32994. value: "620400",
  32995. label: "白银市",
  32996. children: [{
  32997. value: "620401",
  32998. label: "市辖区" },
  32999. {
  33000. value: "620402",
  33001. label: "白银区" },
  33002. {
  33003. value: "620403",
  33004. label: "平川区" },
  33005. {
  33006. value: "620421",
  33007. label: "靖远县" },
  33008. {
  33009. value: "620422",
  33010. label: "会宁县" },
  33011. {
  33012. value: "620423",
  33013. label: "景泰县" }] },
  33014. {
  33015. value: "620500",
  33016. label: "天水市",
  33017. children: [{
  33018. value: "620501",
  33019. label: "市辖区" },
  33020. {
  33021. value: "620502",
  33022. label: "秦州区" },
  33023. {
  33024. value: "620503",
  33025. label: "麦积区" },
  33026. {
  33027. value: "620521",
  33028. label: "清水县" },
  33029. {
  33030. value: "620522",
  33031. label: "秦安县" },
  33032. {
  33033. value: "620523",
  33034. label: "甘谷县" },
  33035. {
  33036. value: "620524",
  33037. label: "武山县" },
  33038. {
  33039. value: "620525",
  33040. label: "张家川回族自治县" }] },
  33041. {
  33042. value: "620600",
  33043. label: "武威市",
  33044. children: [{
  33045. value: "620601",
  33046. label: "市辖区" },
  33047. {
  33048. value: "620602",
  33049. label: "凉州区" },
  33050. {
  33051. value: "620621",
  33052. label: "民勤县" },
  33053. {
  33054. value: "620622",
  33055. label: "古浪县" },
  33056. {
  33057. value: "620623",
  33058. label: "天祝藏族自治县" }] },
  33059. {
  33060. value: "620700",
  33061. label: "张掖市",
  33062. children: [{
  33063. value: "620701",
  33064. label: "市辖区" },
  33065. {
  33066. value: "620702",
  33067. label: "甘州区" },
  33068. {
  33069. value: "620721",
  33070. label: "肃南裕固族自治县" },
  33071. {
  33072. value: "620722",
  33073. label: "民乐县" },
  33074. {
  33075. value: "620723",
  33076. label: "临泽县" },
  33077. {
  33078. value: "620724",
  33079. label: "高台县" },
  33080. {
  33081. value: "620725",
  33082. label: "山丹县" }] },
  33083. {
  33084. value: "620800",
  33085. label: "平凉市",
  33086. children: [{
  33087. value: "620801",
  33088. label: "市辖区" },
  33089. {
  33090. value: "620802",
  33091. label: "崆峒区" },
  33092. {
  33093. value: "620821",
  33094. label: "泾川县" },
  33095. {
  33096. value: "620822",
  33097. label: "灵台县" },
  33098. {
  33099. value: "620823",
  33100. label: "崇信县" },
  33101. {
  33102. value: "620824",
  33103. label: "华亭县" },
  33104. {
  33105. value: "620825",
  33106. label: "庄浪县" },
  33107. {
  33108. value: "620826",
  33109. label: "静宁县" },
  33110. {
  33111. value: "620871",
  33112. label: "平凉工业园区" }] },
  33113. {
  33114. value: "620900",
  33115. label: "酒泉市",
  33116. children: [{
  33117. value: "620901",
  33118. label: "市辖区" },
  33119. {
  33120. value: "620902",
  33121. label: "肃州区" },
  33122. {
  33123. value: "620921",
  33124. label: "金塔县" },
  33125. {
  33126. value: "620922",
  33127. label: "瓜州县" },
  33128. {
  33129. value: "620923",
  33130. label: "肃北蒙古族自治县" },
  33131. {
  33132. value: "620924",
  33133. label: "阿克塞哈萨克族自治县" },
  33134. {
  33135. value: "620981",
  33136. label: "玉门市" },
  33137. {
  33138. value: "620982",
  33139. label: "敦煌市" }] },
  33140. {
  33141. value: "621000",
  33142. label: "庆阳市",
  33143. children: [{
  33144. value: "621001",
  33145. label: "市辖区" },
  33146. {
  33147. value: "621002",
  33148. label: "西峰区" },
  33149. {
  33150. value: "621021",
  33151. label: "庆城县" },
  33152. {
  33153. value: "621022",
  33154. label: "环县" },
  33155. {
  33156. value: "621023",
  33157. label: "华池县" },
  33158. {
  33159. value: "621024",
  33160. label: "合水县" },
  33161. {
  33162. value: "621025",
  33163. label: "正宁县" },
  33164. {
  33165. value: "621026",
  33166. label: "宁县" },
  33167. {
  33168. value: "621027",
  33169. label: "镇原县" }] },
  33170. {
  33171. value: "621100",
  33172. label: "定西市",
  33173. children: [{
  33174. value: "621101",
  33175. label: "市辖区" },
  33176. {
  33177. value: "621102",
  33178. label: "安定区" },
  33179. {
  33180. value: "621121",
  33181. label: "通渭县" },
  33182. {
  33183. value: "621122",
  33184. label: "陇西县" },
  33185. {
  33186. value: "621123",
  33187. label: "渭源县" },
  33188. {
  33189. value: "621124",
  33190. label: "临洮县" },
  33191. {
  33192. value: "621125",
  33193. label: "漳县" },
  33194. {
  33195. value: "621126",
  33196. label: "岷县" }] },
  33197. {
  33198. value: "621200",
  33199. label: "陇南市",
  33200. children: [{
  33201. value: "621201",
  33202. label: "市辖区" },
  33203. {
  33204. value: "621202",
  33205. label: "武都区" },
  33206. {
  33207. value: "621221",
  33208. label: "成县" },
  33209. {
  33210. value: "621222",
  33211. label: "文县" },
  33212. {
  33213. value: "621223",
  33214. label: "宕昌县" },
  33215. {
  33216. value: "621224",
  33217. label: "康县" },
  33218. {
  33219. value: "621225",
  33220. label: "西和县" },
  33221. {
  33222. value: "621226",
  33223. label: "礼县" },
  33224. {
  33225. value: "621227",
  33226. label: "徽县" },
  33227. {
  33228. value: "621228",
  33229. label: "两当县" }] },
  33230. {
  33231. value: "622900",
  33232. label: "临夏回族自治州",
  33233. children: [{
  33234. value: "622901",
  33235. label: "临夏市" },
  33236. {
  33237. value: "622921",
  33238. label: "临夏县" },
  33239. {
  33240. value: "622922",
  33241. label: "康乐县" },
  33242. {
  33243. value: "622923",
  33244. label: "永靖县" },
  33245. {
  33246. value: "622924",
  33247. label: "广河县" },
  33248. {
  33249. value: "622925",
  33250. label: "和政县" },
  33251. {
  33252. value: "622926",
  33253. label: "东乡族自治县" },
  33254. {
  33255. value: "622927",
  33256. label: "积石山保安族东乡族撒拉族自治县" }] },
  33257. {
  33258. value: "623000",
  33259. label: "甘南藏族自治州",
  33260. children: [{
  33261. value: "623001",
  33262. label: "合作市" },
  33263. {
  33264. value: "623021",
  33265. label: "临潭县" },
  33266. {
  33267. value: "623022",
  33268. label: "卓尼县" },
  33269. {
  33270. value: "623023",
  33271. label: "舟曲县" },
  33272. {
  33273. value: "623024",
  33274. label: "迭部县" },
  33275. {
  33276. value: "623025",
  33277. label: "玛曲县" },
  33278. {
  33279. value: "623026",
  33280. label: "碌曲县" },
  33281. {
  33282. value: "623027",
  33283. label: "夏河县" }] }] },
  33284. {
  33285. value: '630000',
  33286. label: '青海省',
  33287. children: [{
  33288. value: "630100",
  33289. label: "西宁市",
  33290. children: [{
  33291. value: "630101",
  33292. label: "市辖区" },
  33293. {
  33294. value: "630102",
  33295. label: "城东区" },
  33296. {
  33297. value: "630103",
  33298. label: "城中区" },
  33299. {
  33300. value: "630104",
  33301. label: "城西区" },
  33302. {
  33303. value: "630105",
  33304. label: "城北区" },
  33305. {
  33306. value: "630121",
  33307. label: "大通回族土族自治县" },
  33308. {
  33309. value: "630122",
  33310. label: "湟中县" },
  33311. {
  33312. value: "630123",
  33313. label: "湟源县" }] },
  33314. {
  33315. value: "630200",
  33316. label: "海东市",
  33317. children: [{
  33318. value: "630202",
  33319. label: "乐都区" },
  33320. {
  33321. value: "630203",
  33322. label: "平安区" },
  33323. {
  33324. value: "630222",
  33325. label: "民和回族土族自治县" },
  33326. {
  33327. value: "630223",
  33328. label: "互助土族自治县" },
  33329. {
  33330. value: "630224",
  33331. label: "化隆回族自治县" },
  33332. {
  33333. value: "630225",
  33334. label: "循化撒拉族自治县" }] },
  33335. {
  33336. value: "632200",
  33337. label: "海北藏族自治州",
  33338. children: [{
  33339. value: "632221",
  33340. label: "门源回族自治县" },
  33341. {
  33342. value: "632222",
  33343. label: "祁连县" },
  33344. {
  33345. value: "632223",
  33346. label: "海晏县" },
  33347. {
  33348. value: "632224",
  33349. label: "刚察县" }] },
  33350. {
  33351. value: "632300",
  33352. label: "黄南藏族自治州",
  33353. children: [{
  33354. value: "632321",
  33355. label: "同仁县" },
  33356. {
  33357. value: "632322",
  33358. label: "尖扎县" },
  33359. {
  33360. value: "632323",
  33361. label: "泽库县" },
  33362. {
  33363. value: "632324",
  33364. label: "河南蒙古族自治县" }] },
  33365. {
  33366. value: "632500",
  33367. label: "海南藏族自治州",
  33368. children: [{
  33369. value: "632521",
  33370. label: "共和县" },
  33371. {
  33372. value: "632522",
  33373. label: "同德县" },
  33374. {
  33375. value: "632523",
  33376. label: "贵德县" },
  33377. {
  33378. value: "632524",
  33379. label: "兴海县" },
  33380. {
  33381. value: "632525",
  33382. label: "贵南县" }] },
  33383. {
  33384. value: "632600",
  33385. label: "果洛藏族自治州",
  33386. children: [{
  33387. value: "632621",
  33388. label: "玛沁县" },
  33389. {
  33390. value: "632622",
  33391. label: "班玛县" },
  33392. {
  33393. value: "632623",
  33394. label: "甘德县" },
  33395. {
  33396. value: "632624",
  33397. label: "达日县" },
  33398. {
  33399. value: "632625",
  33400. label: "久治县" },
  33401. {
  33402. value: "632626",
  33403. label: "玛多县" }] },
  33404. {
  33405. value: "632700",
  33406. label: "玉树藏族自治州",
  33407. children: [{
  33408. value: "632701",
  33409. label: "玉树市" },
  33410. {
  33411. value: "632722",
  33412. label: "杂多县" },
  33413. {
  33414. value: "632723",
  33415. label: "称多县" },
  33416. {
  33417. value: "632724",
  33418. label: "治多县" },
  33419. {
  33420. value: "632725",
  33421. label: "囊谦县" },
  33422. {
  33423. value: "632726",
  33424. label: "曲麻莱县" }] },
  33425. {
  33426. value: "632800",
  33427. label: "海西蒙古族藏族自治州",
  33428. children: [{
  33429. value: "632801",
  33430. label: "格尔木市" },
  33431. {
  33432. value: "632802",
  33433. label: "德令哈市" },
  33434. {
  33435. value: "632821",
  33436. label: "乌兰县" },
  33437. {
  33438. value: "632822",
  33439. label: "都兰县" },
  33440. {
  33441. value: "632823",
  33442. label: "天峻县" },
  33443. {
  33444. value: "632857",
  33445. label: "大柴旦行政委员会" },
  33446. {
  33447. value: "632858",
  33448. label: "冷湖行政委员会" },
  33449. {
  33450. value: "632859",
  33451. label: "茫崖行政委员会" }] }] },
  33452. {
  33453. value: '640000',
  33454. label: '宁夏',
  33455. children: [{
  33456. value: "640100",
  33457. label: "银川市",
  33458. children: [{
  33459. value: "640101",
  33460. label: "市辖区" },
  33461. {
  33462. value: "640104",
  33463. label: "兴庆区" },
  33464. {
  33465. value: "640105",
  33466. label: "西夏区" },
  33467. {
  33468. value: "640106",
  33469. label: "金凤区" },
  33470. {
  33471. value: "640121",
  33472. label: "永宁县" },
  33473. {
  33474. value: "640122",
  33475. label: "贺兰县" },
  33476. {
  33477. value: "640181",
  33478. label: "灵武市" }] },
  33479. {
  33480. value: "640200",
  33481. label: "石嘴山市",
  33482. children: [{
  33483. value: "640201",
  33484. label: "市辖区" },
  33485. {
  33486. value: "640202",
  33487. label: "大武口区" },
  33488. {
  33489. value: "640205",
  33490. label: "惠农区" },
  33491. {
  33492. value: "640221",
  33493. label: "平罗县" }] },
  33494. {
  33495. value: "640300",
  33496. label: "吴忠市",
  33497. children: [{
  33498. value: "640301",
  33499. label: "市辖区" },
  33500. {
  33501. value: "640302",
  33502. label: "利通区" },
  33503. {
  33504. value: "640303",
  33505. label: "红寺堡区" },
  33506. {
  33507. value: "640323",
  33508. label: "盐池县" },
  33509. {
  33510. value: "640324",
  33511. label: "同心县" },
  33512. {
  33513. value: "640381",
  33514. label: "青铜峡市" }] },
  33515. {
  33516. value: "640400",
  33517. label: "固原市",
  33518. children: [{
  33519. value: "640401",
  33520. label: "市辖区" },
  33521. {
  33522. value: "640402",
  33523. label: "原州区" },
  33524. {
  33525. value: "640422",
  33526. label: "西吉县" },
  33527. {
  33528. value: "640423",
  33529. label: "隆德县" },
  33530. {
  33531. value: "640424",
  33532. label: "泾源县" },
  33533. {
  33534. value: "640425",
  33535. label: "彭阳县" }] },
  33536. {
  33537. value: "640500",
  33538. label: "中卫市",
  33539. children: [{
  33540. value: "640501",
  33541. label: "市辖区" },
  33542. {
  33543. value: "640502",
  33544. label: "沙坡头区" },
  33545. {
  33546. value: "640521",
  33547. label: "中宁县" },
  33548. {
  33549. value: "640522",
  33550. label: "海原县" }] }] },
  33551. {
  33552. value: '650000',
  33553. label: '新疆',
  33554. children: [{
  33555. value: "650100",
  33556. label: "乌鲁木齐市",
  33557. children: [{
  33558. value: "650101",
  33559. label: "市辖区" },
  33560. {
  33561. value: "650102",
  33562. label: "天山区" },
  33563. {
  33564. value: "650103",
  33565. label: "沙依巴克区" },
  33566. {
  33567. value: "650104",
  33568. label: "新市区" },
  33569. {
  33570. value: "650105",
  33571. label: "水磨沟区" },
  33572. {
  33573. value: "650106",
  33574. label: "头屯河区" },
  33575. {
  33576. value: "650107",
  33577. label: "达坂城区" },
  33578. {
  33579. value: "650109",
  33580. label: "米东区" },
  33581. {
  33582. value: "650121",
  33583. label: "乌鲁木齐县" },
  33584. {
  33585. value: "650171",
  33586. label: "乌鲁木齐经济技术开发区" },
  33587. {
  33588. value: "650172",
  33589. label: "乌鲁木齐高新技术产业开发区" }] },
  33590. {
  33591. value: "650200",
  33592. label: "克拉玛依市",
  33593. children: [{
  33594. value: "650201",
  33595. label: "市辖区" },
  33596. {
  33597. value: "650202",
  33598. label: "独山子区" },
  33599. {
  33600. value: "650203",
  33601. label: "克拉玛依区" },
  33602. {
  33603. value: "650204",
  33604. label: "白碱滩区" },
  33605. {
  33606. value: "650205",
  33607. label: "乌尔禾区" }] },
  33608. {
  33609. value: "650400",
  33610. label: "吐鲁番市",
  33611. children: [{
  33612. value: "650402",
  33613. label: "高昌区" },
  33614. {
  33615. value: "650421",
  33616. label: "鄯善县" },
  33617. {
  33618. value: "650422",
  33619. label: "托克逊县" }] },
  33620. {
  33621. value: "650500",
  33622. label: "哈密市",
  33623. children: [{
  33624. value: "650502",
  33625. label: "伊州区" },
  33626. {
  33627. value: "650521",
  33628. label: "巴里坤哈萨克自治县" },
  33629. {
  33630. value: "650522",
  33631. label: "伊吾县" }] },
  33632. {
  33633. value: "652300",
  33634. label: "昌吉回族自治州",
  33635. children: [{
  33636. value: "652301",
  33637. label: "昌吉市" },
  33638. {
  33639. value: "652302",
  33640. label: "阜康市" },
  33641. {
  33642. value: "652323",
  33643. label: "呼图壁县" },
  33644. {
  33645. value: "652324",
  33646. label: "玛纳斯县" },
  33647. {
  33648. value: "652325",
  33649. label: "奇台县" },
  33650. {
  33651. value: "652327",
  33652. label: "吉木萨尔县" },
  33653. {
  33654. value: "652328",
  33655. label: "木垒哈萨克自治县" }] },
  33656. {
  33657. value: "652700",
  33658. label: "博尔塔拉蒙古自治州",
  33659. children: [{
  33660. value: "652701",
  33661. label: "博乐市" },
  33662. {
  33663. value: "652702",
  33664. label: "阿拉山口市" },
  33665. {
  33666. value: "652722",
  33667. label: "精河县" },
  33668. {
  33669. value: "652723",
  33670. label: "温泉县" }] },
  33671. {
  33672. value: "652800",
  33673. label: "巴音郭楞蒙古自治州",
  33674. children: [{
  33675. value: "652801",
  33676. label: "库尔勒市" },
  33677. {
  33678. value: "652822",
  33679. label: "轮台县" },
  33680. {
  33681. value: "652823",
  33682. label: "尉犁县" },
  33683. {
  33684. value: "652824",
  33685. label: "若羌县" },
  33686. {
  33687. value: "652825",
  33688. label: "且末县" },
  33689. {
  33690. value: "652826",
  33691. label: "焉耆回族自治县" },
  33692. {
  33693. value: "652827",
  33694. label: "和静县" },
  33695. {
  33696. value: "652828",
  33697. label: "和硕县" },
  33698. {
  33699. value: "652829",
  33700. label: "博湖县" },
  33701. {
  33702. value: "652871",
  33703. label: "库尔勒经济技术开发区" }] },
  33704. {
  33705. value: "652900",
  33706. label: "阿克苏地区",
  33707. children: [{
  33708. value: "652901",
  33709. label: "阿克苏市" },
  33710. {
  33711. value: "652922",
  33712. label: "温宿县" },
  33713. {
  33714. value: "652923",
  33715. label: "库车县" },
  33716. {
  33717. value: "652924",
  33718. label: "沙雅县" },
  33719. {
  33720. value: "652925",
  33721. label: "新和县" },
  33722. {
  33723. value: "652926",
  33724. label: "拜城县" },
  33725. {
  33726. value: "652927",
  33727. label: "乌什县" },
  33728. {
  33729. value: "652928",
  33730. label: "阿瓦提县" },
  33731. {
  33732. value: "652929",
  33733. label: "柯坪县" }] },
  33734. {
  33735. value: "653000",
  33736. label: "克孜勒苏柯尔克孜自治州",
  33737. children: [{
  33738. value: "653001",
  33739. label: "阿图什市" },
  33740. {
  33741. value: "653022",
  33742. label: "阿克陶县" },
  33743. {
  33744. value: "653023",
  33745. label: "阿合奇县" },
  33746. {
  33747. value: "653024",
  33748. label: "乌恰县" }] },
  33749. {
  33750. value: "653100",
  33751. label: "喀什地区",
  33752. children: [{
  33753. value: "653101",
  33754. label: "喀什市" },
  33755. {
  33756. value: "653121",
  33757. label: "疏附县" },
  33758. {
  33759. value: "653122",
  33760. label: "疏勒县" },
  33761. {
  33762. value: "653123",
  33763. label: "英吉沙县" },
  33764. {
  33765. value: "653124",
  33766. label: "泽普县" },
  33767. {
  33768. value: "653125",
  33769. label: "莎车县" },
  33770. {
  33771. value: "653126",
  33772. label: "叶城县" },
  33773. {
  33774. value: "653127",
  33775. label: "麦盖提县" },
  33776. {
  33777. value: "653128",
  33778. label: "岳普湖县" },
  33779. {
  33780. value: "653129",
  33781. label: "伽师县" },
  33782. {
  33783. value: "653130",
  33784. label: "巴楚县" },
  33785. {
  33786. value: "653131",
  33787. label: "塔什库尔干塔吉克自治县" }] },
  33788. {
  33789. value: "653200",
  33790. label: "和田地区",
  33791. children: [{
  33792. value: "653201",
  33793. label: "和田市" },
  33794. {
  33795. value: "653221",
  33796. label: "和田县" },
  33797. {
  33798. value: "653222",
  33799. label: "墨玉县" },
  33800. {
  33801. value: "653223",
  33802. label: "皮山县" },
  33803. {
  33804. value: "653224",
  33805. label: "洛浦县" },
  33806. {
  33807. value: "653225",
  33808. label: "策勒县" },
  33809. {
  33810. value: "653226",
  33811. label: "于田县" },
  33812. {
  33813. value: "653227",
  33814. label: "民丰县" }] },
  33815. {
  33816. value: "654000",
  33817. label: "伊犁哈萨克自治州",
  33818. children: [{
  33819. value: "654002",
  33820. label: "伊宁市" },
  33821. {
  33822. value: "654003",
  33823. label: "奎屯市" },
  33824. {
  33825. value: "654004",
  33826. label: "霍尔果斯市" },
  33827. {
  33828. value: "654021",
  33829. label: "伊宁县" },
  33830. {
  33831. value: "654022",
  33832. label: "察布查尔锡伯自治县" },
  33833. {
  33834. value: "654023",
  33835. label: "霍城县" },
  33836. {
  33837. value: "654024",
  33838. label: "巩留县" },
  33839. {
  33840. value: "654025",
  33841. label: "新源县" },
  33842. {
  33843. value: "654026",
  33844. label: "昭苏县" },
  33845. {
  33846. value: "654027",
  33847. label: "特克斯县" },
  33848. {
  33849. value: "654028",
  33850. label: "尼勒克县" }] },
  33851. {
  33852. value: "654200",
  33853. label: "塔城地区",
  33854. children: [{
  33855. value: "654201",
  33856. label: "塔城市" },
  33857. {
  33858. value: "654202",
  33859. label: "乌苏市" },
  33860. {
  33861. value: "654221",
  33862. label: "额敏县" },
  33863. {
  33864. value: "654223",
  33865. label: "沙湾县" },
  33866. {
  33867. value: "654224",
  33868. label: "托里县" },
  33869. {
  33870. value: "654225",
  33871. label: "裕民县" },
  33872. {
  33873. value: "654226",
  33874. label: "和布克赛尔蒙古自治县" }] },
  33875. {
  33876. value: "654300",
  33877. label: "阿勒泰地区",
  33878. children: [{
  33879. value: "654301",
  33880. label: "阿勒泰市" },
  33881. {
  33882. value: "654321",
  33883. label: "布尔津县" },
  33884. {
  33885. value: "654322",
  33886. label: "富蕴县" },
  33887. {
  33888. value: "654323",
  33889. label: "福海县" },
  33890. {
  33891. value: "654324",
  33892. label: "哈巴河县" },
  33893. {
  33894. value: "654325",
  33895. label: "青河县" },
  33896. {
  33897. value: "654326",
  33898. label: "吉木乃县" }] },
  33899. {
  33900. value: "659000",
  33901. label: "自治区直辖县级行政区划",
  33902. children: [{
  33903. value: "659001",
  33904. label: "石河子市" },
  33905. {
  33906. value: "659002",
  33907. label: "阿拉尔市" },
  33908. {
  33909. value: "659003",
  33910. label: "图木舒克市" },
  33911. {
  33912. value: "659004",
  33913. label: "五家渠市" },
  33914. {
  33915. value: "659006",
  33916. label: "铁门关市" }] }] },
  33917. {
  33918. value: '660000',
  33919. label: '台湾省',
  33920. children: [{
  33921. value: "660100",
  33922. label: "台北市",
  33923. children: [{
  33924. value: "660101",
  33925. label: "中正区" },
  33926. {
  33927. value: "660102",
  33928. label: "大同区" },
  33929. {
  33930. value: "660103",
  33931. label: "中山区" },
  33932. {
  33933. value: "660104",
  33934. label: "松山区" },
  33935. {
  33936. value: "660105",
  33937. label: "大安区" },
  33938. {
  33939. value: "660106",
  33940. label: "万华区" },
  33941. {
  33942. value: "660107",
  33943. label: "信义区" },
  33944. {
  33945. value: "660108",
  33946. label: "士林区" },
  33947. {
  33948. value: "660109",
  33949. label: "北投区" },
  33950. {
  33951. value: "660110",
  33952. label: "内湖区" },
  33953. {
  33954. value: "660111",
  33955. label: "南港区" },
  33956. {
  33957. value: "660112",
  33958. label: "文山区" }] },
  33959. {
  33960. value: "660200",
  33961. label: "高雄市",
  33962. children: [{
  33963. value: "660201",
  33964. label: "新兴区" },
  33965. {
  33966. value: "660202",
  33967. label: "前金区" },
  33968. {
  33969. value: "660203",
  33970. label: "芩雅区" },
  33971. {
  33972. value: "660204",
  33973. label: "盐埕区" },
  33974. {
  33975. value: "660205",
  33976. label: "鼓山区" },
  33977. {
  33978. value: "660206",
  33979. label: "旗津区" },
  33980. {
  33981. value: "660207",
  33982. label: "前镇区" },
  33983. {
  33984. value: "660208",
  33985. label: "三民区" },
  33986. {
  33987. value: "660209",
  33988. label: "左营区" },
  33989. {
  33990. value: "660210",
  33991. label: "楠梓区" },
  33992. {
  33993. value: "660211",
  33994. label: "小港区" }] },
  33995. {
  33996. value: "660300",
  33997. label: "台南市",
  33998. children: [{
  33999. value: "660301",
  34000. label: "中西区" },
  34001. {
  34002. value: "660302",
  34003. label: "东区" },
  34004. {
  34005. value: "660303",
  34006. label: "南区" },
  34007. {
  34008. value: "660304",
  34009. label: "北区" },
  34010. {
  34011. value: "660305",
  34012. label: "安平区" },
  34013. {
  34014. value: "660306",
  34015. label: "安南区" }] },
  34016. {
  34017. value: "660400",
  34018. label: "台中市",
  34019. children: [{
  34020. value: "660401",
  34021. label: "中区" },
  34022. {
  34023. value: "660402",
  34024. label: "东区" },
  34025. {
  34026. value: "660403",
  34027. label: "南区" },
  34028. {
  34029. value: "660404",
  34030. label: "西区" },
  34031. {
  34032. value: "660405",
  34033. label: "北区" },
  34034. {
  34035. value: "660406",
  34036. label: "北屯区" },
  34037. {
  34038. value: "660407",
  34039. label: "西屯区" },
  34040. {
  34041. value: "660408",
  34042. label: "南屯区" }] },
  34043. {
  34044. value: "660500",
  34045. label: "金门县",
  34046. children: [{
  34047. value: "660501",
  34048. label: "金门县" }] },
  34049. {
  34050. value: "660600",
  34051. label: "南投县",
  34052. children: [{
  34053. value: "660601",
  34054. label: "南投县" }] },
  34055. {
  34056. value: "660700",
  34057. label: "基隆市",
  34058. children: [{
  34059. value: "660701",
  34060. label: "仁爱区" },
  34061. {
  34062. value: "660702",
  34063. label: "信义区" },
  34064. {
  34065. value: "660703",
  34066. label: "中正区" },
  34067. {
  34068. value: "660704",
  34069. label: "中山区" },
  34070. {
  34071. value: "660705",
  34072. label: "安乐区" },
  34073. {
  34074. value: "660706",
  34075. label: "暖暖区" },
  34076. {
  34077. value: "660707",
  34078. label: "七堵区" }] },
  34079. {
  34080. value: "660800",
  34081. label: "新竹市",
  34082. children: [{
  34083. value: "660801",
  34084. label: "东区" },
  34085. {
  34086. value: "660802",
  34087. label: "北区" },
  34088. {
  34089. value: "660803",
  34090. label: "香山区" }] },
  34091. {
  34092. value: "660900",
  34093. label: "嘉义市",
  34094. children: [{
  34095. value: "660901",
  34096. label: "东区" },
  34097. {
  34098. value: "660902",
  34099. label: "西区" }] },
  34100. {
  34101. value: "661000",
  34102. label: "新北市",
  34103. children: [{
  34104. value: "661001",
  34105. label: "新北市" }] },
  34106. {
  34107. value: "661100",
  34108. label: "宜兰县",
  34109. children: [{
  34110. value: "661100",
  34111. label: "宜兰县" }] },
  34112. {
  34113. value: "661200",
  34114. label: "新竹县",
  34115. children: [{
  34116. value: "661201",
  34117. label: "新竹县" }] },
  34118. {
  34119. value: "661300",
  34120. label: "桃园县",
  34121. children: [{
  34122. value: "661301",
  34123. label: "桃园县" }] },
  34124. {
  34125. value: "661400",
  34126. label: "苗栗县",
  34127. children: [{
  34128. value: "661401",
  34129. label: "苗栗县" }] },
  34130. {
  34131. value: "661500",
  34132. label: "彰化县",
  34133. children: [{
  34134. value: "661501",
  34135. label: "彰化县" }] },
  34136. {
  34137. value: "661600",
  34138. label: "嘉义县",
  34139. children: [{
  34140. value: "661601",
  34141. label: "嘉义县" }] },
  34142. {
  34143. value: "661700",
  34144. label: "云林县",
  34145. children: [{
  34146. value: "661701",
  34147. label: "云林县" }] },
  34148. {
  34149. value: "661800",
  34150. label: "屏东县",
  34151. children: [{
  34152. value: "661801",
  34153. label: "屏东县" }] },
  34154. {
  34155. value: "661900",
  34156. label: "台东县",
  34157. children: [{
  34158. value: "661901",
  34159. label: "台东县" }] },
  34160. {
  34161. value: "662000",
  34162. label: "花莲县",
  34163. children: [{
  34164. value: "662001",
  34165. label: "花莲县" }] },
  34166. {
  34167. value: "662100",
  34168. label: "澎湖县",
  34169. children: [{
  34170. value: "662101",
  34171. label: "澎湖县" }] }] },
  34172. {
  34173. value: '670000',
  34174. label: '香港',
  34175. children: [{
  34176. value: "670100",
  34177. label: "香港岛",
  34178. children: [{
  34179. value: "670101",
  34180. label: "中西区" },
  34181. {
  34182. value: "670102",
  34183. label: "湾仔区" },
  34184. {
  34185. value: "670103",
  34186. label: "东区" },
  34187. {
  34188. value: "670104",
  34189. label: "南区" }] },
  34190. {
  34191. value: "670200",
  34192. label: "九龙半岛",
  34193. children: [{
  34194. value: "670201",
  34195. label: "九龙城区" },
  34196. {
  34197. value: "670202",
  34198. label: "油尖旺区" },
  34199. {
  34200. value: "670203",
  34201. label: "深水埗区" },
  34202. {
  34203. value: "670204",
  34204. label: "黄大仙区" },
  34205. {
  34206. value: "670205",
  34207. label: "观塘区" }] },
  34208. {
  34209. value: "670300",
  34210. label: "新界",
  34211. children: [{
  34212. value: "670301",
  34213. label: "北区" },
  34214. {
  34215. value: "670302",
  34216. label: "大埔区" },
  34217. {
  34218. value: "670303",
  34219. label: "沙田区" },
  34220. {
  34221. value: "670304",
  34222. label: "西贡区" },
  34223. {
  34224. value: "670305",
  34225. label: "元朗区" },
  34226. {
  34227. value: "670306",
  34228. label: "屯门区" },
  34229. {
  34230. value: "670307",
  34231. label: "荃湾区" },
  34232. {
  34233. value: "670308",
  34234. label: "葵青区" },
  34235. {
  34236. value: "670309",
  34237. label: "离岛区" }] }] },
  34238. {
  34239. value: '680000',
  34240. label: '澳门',
  34241. children: [{
  34242. value: "680100",
  34243. label: "澳门半岛",
  34244. children: [{
  34245. value: "680101",
  34246. label: "花地玛堂区" },
  34247. {
  34248. value: "680102",
  34249. label: "圣安多尼堂区" },
  34250. {
  34251. value: "680103",
  34252. label: "大堂区" },
  34253. {
  34254. value: "680104",
  34255. label: "望德堂区" },
  34256. {
  34257. value: "680105",
  34258. label: "风顺堂区" }] },
  34259. {
  34260. value: "680200",
  34261. label: "离岛",
  34262. children: [{
  34263. value: "680201",
  34264. label: "嘉模堂区" },
  34265. {
  34266. value: "680202",
  34267. label: "圣方济各堂区" }] }] }];var _default =
  34268. cityData;exports.default = _default;
  34269. /***/ }),
  34270. /***/ 657:
  34271. /*!****************************************************************************!*\
  34272. !*** /Users/wanglili/Documents/liuniu/Mazui/components/uni-icons/icons.js ***!
  34273. \****************************************************************************/
  34274. /*! no static exports found */
  34275. /***/ (function(module, exports, __webpack_require__) {
  34276. "use strict";
  34277. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  34278. 'contact': "\uE100",
  34279. 'person': "\uE101",
  34280. 'personadd': "\uE102",
  34281. 'contact-filled': "\uE130",
  34282. 'person-filled': "\uE131",
  34283. 'personadd-filled': "\uE132",
  34284. 'phone': "\uE200",
  34285. 'email': "\uE201",
  34286. 'chatbubble': "\uE202",
  34287. 'chatboxes': "\uE203",
  34288. 'phone-filled': "\uE230",
  34289. 'email-filled': "\uE231",
  34290. 'chatbubble-filled': "\uE232",
  34291. 'chatboxes-filled': "\uE233",
  34292. 'weibo': "\uE260",
  34293. 'weixin': "\uE261",
  34294. 'pengyouquan': "\uE262",
  34295. 'chat': "\uE263",
  34296. 'qq': "\uE264",
  34297. 'videocam': "\uE300",
  34298. 'camera': "\uE301",
  34299. 'mic': "\uE302",
  34300. 'location': "\uE303",
  34301. 'mic-filled': "\uE332",
  34302. 'speech': "\uE332",
  34303. 'location-filled': "\uE333",
  34304. 'micoff': "\uE360",
  34305. 'image': "\uE363",
  34306. 'map': "\uE364",
  34307. 'compose': "\uE400",
  34308. 'trash': "\uE401",
  34309. 'upload': "\uE402",
  34310. 'download': "\uE403",
  34311. 'close': "\uE404",
  34312. 'redo': "\uE405",
  34313. 'undo': "\uE406",
  34314. 'refresh': "\uE407",
  34315. 'star': "\uE408",
  34316. 'plus': "\uE409",
  34317. 'minus': "\uE410",
  34318. 'circle': "\uE411",
  34319. 'checkbox': "\uE411",
  34320. 'close-filled': "\uE434",
  34321. 'clear': "\uE434",
  34322. 'refresh-filled': "\uE437",
  34323. 'star-filled': "\uE438",
  34324. 'plus-filled': "\uE439",
  34325. 'minus-filled': "\uE440",
  34326. 'circle-filled': "\uE441",
  34327. 'checkbox-filled': "\uE442",
  34328. 'closeempty': "\uE460",
  34329. 'refreshempty': "\uE461",
  34330. 'reload': "\uE462",
  34331. 'starhalf': "\uE463",
  34332. 'spinner': "\uE464",
  34333. 'spinner-cycle': "\uE465",
  34334. 'search': "\uE466",
  34335. 'plusempty': "\uE468",
  34336. 'forward': "\uE470",
  34337. 'back': "\uE471",
  34338. 'left-nav': "\uE471",
  34339. 'checkmarkempty': "\uE472",
  34340. 'home': "\uE500",
  34341. 'navigate': "\uE501",
  34342. 'gear': "\uE502",
  34343. 'paperplane': "\uE503",
  34344. 'info': "\uE504",
  34345. 'help': "\uE505",
  34346. 'locked': "\uE506",
  34347. 'more': "\uE507",
  34348. 'flag': "\uE508",
  34349. 'home-filled': "\uE530",
  34350. 'gear-filled': "\uE532",
  34351. 'info-filled': "\uE534",
  34352. 'help-filled': "\uE535",
  34353. 'more-filled': "\uE537",
  34354. 'settings': "\uE560",
  34355. 'list': "\uE562",
  34356. 'bars': "\uE563",
  34357. 'loop': "\uE565",
  34358. 'paperclip': "\uE567",
  34359. 'eye': "\uE568",
  34360. 'arrowup': "\uE580",
  34361. 'arrowdown': "\uE581",
  34362. 'arrowleft': "\uE582",
  34363. 'arrowright': "\uE583",
  34364. 'arrowthinup': "\uE584",
  34365. 'arrowthindown': "\uE585",
  34366. 'arrowthinleft': "\uE586",
  34367. 'arrowthinright': "\uE587",
  34368. 'pulldown': "\uE588",
  34369. 'closefill': "\uE589",
  34370. 'sound': "\uE590",
  34371. 'scan': "\uE612" };exports.default = _default;
  34372. /***/ }),
  34373. /***/ 94:
  34374. /*!************************************************************!*\
  34375. !*** /Users/wanglili/Documents/liuniu/Mazui/api/doctor.js ***!
  34376. \************************************************************/
  34377. /*! no static exports found */
  34378. /***/ (function(module, exports, __webpack_require__) {
  34379. "use strict";
  34380. Object.defineProperty(exports, "__esModule", { value: true });exports.getDoctorList = getDoctorList;exports.getDoctor = getDoctor;exports.calculate = calculate;exports.createOrder = createOrder;exports.allComment = allComment;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 23));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  34381. //获取医生列表
  34382. function getDoctorList(data) {
  34383. return (0, _request.default)({
  34384. url: '/api/user.user/getDoctorList',
  34385. method: 'get',
  34386. data: data });
  34387. }
  34388. //获取医生详情
  34389. function getDoctor(data) {
  34390. return (0, _request.default)({
  34391. url: '/api/user.user/getDoctor',
  34392. method: 'post',
  34393. data: data });
  34394. }
  34395. // 计算价格
  34396. function calculate(data) {
  34397. return (0, _request.default)({
  34398. url: '/api/object.order/calculate',
  34399. method: 'post',
  34400. data: data });
  34401. }
  34402. // 创建订单
  34403. function createOrder(data) {
  34404. return (0, _request.default)({
  34405. url: '/api/object.order/createOrder',
  34406. method: 'post',
  34407. data: data });
  34408. }
  34409. // 全部评论
  34410. function allComment(data) {
  34411. return (0, _request.default)({
  34412. url: '/api/user.user/allComment',
  34413. method: 'post',
  34414. data: data });
  34415. }
  34416. /***/ }),
  34417. /***/ 95:
  34418. /*!************************************************************!*\
  34419. !*** /Users/wanglili/Documents/liuniu/Mazui/api/course.js ***!
  34420. \************************************************************/
  34421. /*! no static exports found */
  34422. /***/ (function(module, exports, __webpack_require__) {
  34423. "use strict";
  34424. Object.defineProperty(exports, "__esModule", { value: true });exports.course_list = course_list;exports.details = details;exports.collect = collect;exports.course = course;exports.task_info = task_info;exports.create_order = create_order;exports.GetTask = GetTask;exports.PlayNum = PlayNum;exports.unified = unified;exports.GetUnifiend = GetUnifiend;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 23));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  34425. //专题列表
  34426. function course_list(data) {
  34427. return (0, _request.default)({
  34428. url: '/api/special.special/get_content_recommend',
  34429. method: 'post',
  34430. data: data });
  34431. }
  34432. //专题详情
  34433. function details(data) {
  34434. return (0, _request.default)({
  34435. url: '/api/special.special/details',
  34436. method: 'get',
  34437. data: data });
  34438. }
  34439. //专题收藏
  34440. function collect(data) {
  34441. return (0, _request.default)({
  34442. url: '/api/special.special/collect',
  34443. method: 'get',
  34444. data: data });
  34445. }
  34446. //专题收藏
  34447. function course(data) {
  34448. return (0, _request.default)({
  34449. url: '/api/special.special/get_course_list',
  34450. method: 'get',
  34451. data: data });
  34452. }
  34453. //专题收藏
  34454. function task_info(data) {
  34455. return (0, _request.default)({
  34456. url: '/api/special.special/task_info',
  34457. method: 'get',
  34458. data: data });
  34459. }
  34460. //创建专题支付订单
  34461. function create_order(data) {
  34462. return (0, _request.default)({
  34463. url: '/api/special.special/create_order',
  34464. method: 'post',
  34465. data: data });
  34466. }
  34467. //视频是否可以播放
  34468. function GetTask(data) {
  34469. return (0, _request.default)({
  34470. url: '/api/special.special/get_task_link',
  34471. method: 'post',
  34472. data: data });
  34473. }
  34474. //视频播放数量加一
  34475. function PlayNum(data) {
  34476. return (0, _request.default)({
  34477. url: '/api/special.special/play_num',
  34478. method: 'post',
  34479. data: data });
  34480. }
  34481. //视频分类
  34482. function unified(data) {
  34483. return (0, _request.default)({
  34484. url: '/api/special.special/unified_list',
  34485. method: 'get',
  34486. data: data });
  34487. }
  34488. //视频分类
  34489. function GetUnifiend(data) {
  34490. return (0, _request.default)({
  34491. url: '/api/special.special/get_unifiend_list',
  34492. method: 'get',
  34493. data: data });
  34494. }
  34495. /***/ })
  34496. }]);
  34497. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map