bundle.js 665 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262
  1. (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  2. },{}],2:[function(require,module,exports){
  3. // shim for using process in browser
  4. var process = module.exports = {};
  5. // cached from whatever global is present so that test runners that stub it
  6. // don't break things. But we need to wrap it in a try catch in case it is
  7. // wrapped in strict mode code which doesn't define any globals. It's inside a
  8. // function because try/catches deoptimize in certain engines.
  9. var cachedSetTimeout;
  10. var cachedClearTimeout;
  11. function defaultSetTimout() {
  12. throw new Error('setTimeout has not been defined');
  13. }
  14. function defaultClearTimeout () {
  15. throw new Error('clearTimeout has not been defined');
  16. }
  17. (function () {
  18. try {
  19. if (typeof setTimeout === 'function') {
  20. cachedSetTimeout = setTimeout;
  21. } else {
  22. cachedSetTimeout = defaultSetTimout;
  23. }
  24. } catch (e) {
  25. cachedSetTimeout = defaultSetTimout;
  26. }
  27. try {
  28. if (typeof clearTimeout === 'function') {
  29. cachedClearTimeout = clearTimeout;
  30. } else {
  31. cachedClearTimeout = defaultClearTimeout;
  32. }
  33. } catch (e) {
  34. cachedClearTimeout = defaultClearTimeout;
  35. }
  36. } ())
  37. function runTimeout(fun) {
  38. if (cachedSetTimeout === setTimeout) {
  39. //normal enviroments in sane situations
  40. return setTimeout(fun, 0);
  41. }
  42. // if setTimeout wasn't available but was latter defined
  43. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  44. cachedSetTimeout = setTimeout;
  45. return setTimeout(fun, 0);
  46. }
  47. try {
  48. // when when somebody has screwed with setTimeout but no I.E. maddness
  49. return cachedSetTimeout(fun, 0);
  50. } catch(e){
  51. try {
  52. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  53. return cachedSetTimeout.call(null, fun, 0);
  54. } catch(e){
  55. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  56. return cachedSetTimeout.call(this, fun, 0);
  57. }
  58. }
  59. }
  60. function runClearTimeout(marker) {
  61. if (cachedClearTimeout === clearTimeout) {
  62. //normal enviroments in sane situations
  63. return clearTimeout(marker);
  64. }
  65. // if clearTimeout wasn't available but was latter defined
  66. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  67. cachedClearTimeout = clearTimeout;
  68. return clearTimeout(marker);
  69. }
  70. try {
  71. // when when somebody has screwed with setTimeout but no I.E. maddness
  72. return cachedClearTimeout(marker);
  73. } catch (e){
  74. try {
  75. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  76. return cachedClearTimeout.call(null, marker);
  77. } catch (e){
  78. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  79. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  80. return cachedClearTimeout.call(this, marker);
  81. }
  82. }
  83. }
  84. var queue = [];
  85. var draining = false;
  86. var currentQueue;
  87. var queueIndex = -1;
  88. function cleanUpNextTick() {
  89. if (!draining || !currentQueue) {
  90. return;
  91. }
  92. draining = false;
  93. if (currentQueue.length) {
  94. queue = currentQueue.concat(queue);
  95. } else {
  96. queueIndex = -1;
  97. }
  98. if (queue.length) {
  99. drainQueue();
  100. }
  101. }
  102. function drainQueue() {
  103. if (draining) {
  104. return;
  105. }
  106. var timeout = runTimeout(cleanUpNextTick);
  107. draining = true;
  108. var len = queue.length;
  109. while(len) {
  110. currentQueue = queue;
  111. queue = [];
  112. while (++queueIndex < len) {
  113. if (currentQueue) {
  114. currentQueue[queueIndex].run();
  115. }
  116. }
  117. queueIndex = -1;
  118. len = queue.length;
  119. }
  120. currentQueue = null;
  121. draining = false;
  122. runClearTimeout(timeout);
  123. }
  124. process.nextTick = function (fun) {
  125. var args = new Array(arguments.length - 1);
  126. if (arguments.length > 1) {
  127. for (var i = 1; i < arguments.length; i++) {
  128. args[i - 1] = arguments[i];
  129. }
  130. }
  131. queue.push(new Item(fun, args));
  132. if (queue.length === 1 && !draining) {
  133. runTimeout(drainQueue);
  134. }
  135. };
  136. // v8 likes predictible objects
  137. function Item(fun, array) {
  138. this.fun = fun;
  139. this.array = array;
  140. }
  141. Item.prototype.run = function () {
  142. this.fun.apply(null, this.array);
  143. };
  144. process.title = 'browser';
  145. process.browser = true;
  146. process.env = {};
  147. process.argv = [];
  148. process.version = ''; // empty string to avoid regexp issues
  149. process.versions = {};
  150. function noop() {}
  151. process.on = noop;
  152. process.addListener = noop;
  153. process.once = noop;
  154. process.off = noop;
  155. process.removeListener = noop;
  156. process.removeAllListeners = noop;
  157. process.emit = noop;
  158. process.prependListener = noop;
  159. process.prependOnceListener = noop;
  160. process.listeners = function (name) { return [] }
  161. process.binding = function (name) {
  162. throw new Error('process.binding is not supported');
  163. };
  164. process.cwd = function () { return '/' };
  165. process.chdir = function (dir) {
  166. throw new Error('process.chdir is not supported');
  167. };
  168. process.umask = function() { return 0; };
  169. },{}],3:[function(require,module,exports){
  170. if (typeof Object.create === 'function') {
  171. // implementation from standard node.js 'util' module
  172. module.exports = function inherits(ctor, superCtor) {
  173. ctor.super_ = superCtor
  174. ctor.prototype = Object.create(superCtor.prototype, {
  175. constructor: {
  176. value: ctor,
  177. enumerable: false,
  178. writable: true,
  179. configurable: true
  180. }
  181. });
  182. };
  183. } else {
  184. // old school shim for old browsers
  185. module.exports = function inherits(ctor, superCtor) {
  186. ctor.super_ = superCtor
  187. var TempCtor = function () {}
  188. TempCtor.prototype = superCtor.prototype
  189. ctor.prototype = new TempCtor()
  190. ctor.prototype.constructor = ctor
  191. }
  192. }
  193. },{}],4:[function(require,module,exports){
  194. module.exports = function isBuffer(arg) {
  195. return arg && typeof arg === 'object'
  196. && typeof arg.copy === 'function'
  197. && typeof arg.fill === 'function'
  198. && typeof arg.readUInt8 === 'function';
  199. }
  200. },{}],5:[function(require,module,exports){
  201. (function (process,global){
  202. // Copyright Joyent, Inc. and other Node contributors.
  203. //
  204. // Permission is hereby granted, free of charge, to any person obtaining a
  205. // copy of this software and associated documentation files (the
  206. // "Software"), to deal in the Software without restriction, including
  207. // without limitation the rights to use, copy, modify, merge, publish,
  208. // distribute, sublicense, and/or sell copies of the Software, and to permit
  209. // persons to whom the Software is furnished to do so, subject to the
  210. // following conditions:
  211. //
  212. // The above copyright notice and this permission notice shall be included
  213. // in all copies or substantial portions of the Software.
  214. //
  215. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  216. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  217. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  218. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  219. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  220. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  221. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  222. var formatRegExp = /%[sdj%]/g;
  223. exports.format = function(f) {
  224. if (!isString(f)) {
  225. var objects = [];
  226. for (var i = 0; i < arguments.length; i++) {
  227. objects.push(inspect(arguments[i]));
  228. }
  229. return objects.join(' ');
  230. }
  231. var i = 1;
  232. var args = arguments;
  233. var len = args.length;
  234. var str = String(f).replace(formatRegExp, function(x) {
  235. if (x === '%%') return '%';
  236. if (i >= len) return x;
  237. switch (x) {
  238. case '%s': return String(args[i++]);
  239. case '%d': return Number(args[i++]);
  240. case '%j':
  241. try {
  242. return JSON.stringify(args[i++]);
  243. } catch (_) {
  244. return '[Circular]';
  245. }
  246. default:
  247. return x;
  248. }
  249. });
  250. for (var x = args[i]; i < len; x = args[++i]) {
  251. if (isNull(x) || !isObject(x)) {
  252. str += ' ' + x;
  253. } else {
  254. str += ' ' + inspect(x);
  255. }
  256. }
  257. return str;
  258. };
  259. // Mark that a method should not be used.
  260. // Returns a modified function which warns once by default.
  261. // If --no-deprecation is set, then it is a no-op.
  262. exports.deprecate = function(fn, msg) {
  263. // Allow for deprecating things in the process of starting up.
  264. if (isUndefined(global.process)) {
  265. return function() {
  266. return exports.deprecate(fn, msg).apply(this, arguments);
  267. };
  268. }
  269. if (process.noDeprecation === true) {
  270. return fn;
  271. }
  272. var warned = false;
  273. function deprecated() {
  274. if (!warned) {
  275. if (process.throwDeprecation) {
  276. throw new Error(msg);
  277. } else if (process.traceDeprecation) {
  278. console.trace(msg);
  279. } else {
  280. console.error(msg);
  281. }
  282. warned = true;
  283. }
  284. return fn.apply(this, arguments);
  285. }
  286. return deprecated;
  287. };
  288. var debugs = {};
  289. var debugEnviron;
  290. exports.debuglog = function(set) {
  291. if (isUndefined(debugEnviron))
  292. debugEnviron = process.env.NODE_DEBUG || '';
  293. set = set.toUpperCase();
  294. if (!debugs[set]) {
  295. if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
  296. var pid = process.pid;
  297. debugs[set] = function() {
  298. var msg = exports.format.apply(exports, arguments);
  299. console.error('%s %d: %s', set, pid, msg);
  300. };
  301. } else {
  302. debugs[set] = function() {};
  303. }
  304. }
  305. return debugs[set];
  306. };
  307. /**
  308. * Echos the value of a value. Trys to print the value out
  309. * in the best way possible given the different types.
  310. *
  311. * @param {Object} obj The object to print out.
  312. * @param {Object} opts Optional options object that alters the output.
  313. */
  314. /* legacy: obj, showHidden, depth, colors*/
  315. function inspect(obj, opts) {
  316. // default options
  317. var ctx = {
  318. seen: [],
  319. stylize: stylizeNoColor
  320. };
  321. // legacy...
  322. if (arguments.length >= 3) ctx.depth = arguments[2];
  323. if (arguments.length >= 4) ctx.colors = arguments[3];
  324. if (isBoolean(opts)) {
  325. // legacy...
  326. ctx.showHidden = opts;
  327. } else if (opts) {
  328. // got an "options" object
  329. exports._extend(ctx, opts);
  330. }
  331. // set default options
  332. if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
  333. if (isUndefined(ctx.depth)) ctx.depth = 2;
  334. if (isUndefined(ctx.colors)) ctx.colors = false;
  335. if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
  336. if (ctx.colors) ctx.stylize = stylizeWithColor;
  337. return formatValue(ctx, obj, ctx.depth);
  338. }
  339. exports.inspect = inspect;
  340. // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
  341. inspect.colors = {
  342. 'bold' : [1, 22],
  343. 'italic' : [3, 23],
  344. 'underline' : [4, 24],
  345. 'inverse' : [7, 27],
  346. 'white' : [37, 39],
  347. 'grey' : [90, 39],
  348. 'black' : [30, 39],
  349. 'blue' : [34, 39],
  350. 'cyan' : [36, 39],
  351. 'green' : [32, 39],
  352. 'magenta' : [35, 39],
  353. 'red' : [31, 39],
  354. 'yellow' : [33, 39]
  355. };
  356. // Don't use 'blue' not visible on cmd.exe
  357. inspect.styles = {
  358. 'special': 'cyan',
  359. 'number': 'yellow',
  360. 'boolean': 'yellow',
  361. 'undefined': 'grey',
  362. 'null': 'bold',
  363. 'string': 'green',
  364. 'date': 'magenta',
  365. // "name": intentionally not styling
  366. 'regexp': 'red'
  367. };
  368. function stylizeWithColor(str, styleType) {
  369. var style = inspect.styles[styleType];
  370. if (style) {
  371. return '\u001b[' + inspect.colors[style][0] + 'm' + str +
  372. '\u001b[' + inspect.colors[style][1] + 'm';
  373. } else {
  374. return str;
  375. }
  376. }
  377. function stylizeNoColor(str, styleType) {
  378. return str;
  379. }
  380. function arrayToHash(array) {
  381. var hash = {};
  382. array.forEach(function(val, idx) {
  383. hash[val] = true;
  384. });
  385. return hash;
  386. }
  387. function formatValue(ctx, value, recurseTimes) {
  388. // Provide a hook for user-specified inspect functions.
  389. // Check that value is an object with an inspect function on it
  390. if (ctx.customInspect &&
  391. value &&
  392. isFunction(value.inspect) &&
  393. // Filter out the util module, it's inspect function is special
  394. value.inspect !== exports.inspect &&
  395. // Also filter out any prototype objects using the circular check.
  396. !(value.constructor && value.constructor.prototype === value)) {
  397. var ret = value.inspect(recurseTimes, ctx);
  398. if (!isString(ret)) {
  399. ret = formatValue(ctx, ret, recurseTimes);
  400. }
  401. return ret;
  402. }
  403. // Primitive types cannot have properties
  404. var primitive = formatPrimitive(ctx, value);
  405. if (primitive) {
  406. return primitive;
  407. }
  408. // Look up the keys of the object.
  409. var keys = Object.keys(value);
  410. var visibleKeys = arrayToHash(keys);
  411. if (ctx.showHidden) {
  412. keys = Object.getOwnPropertyNames(value);
  413. }
  414. // IE doesn't make error fields non-enumerable
  415. // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
  416. if (isError(value)
  417. && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
  418. return formatError(value);
  419. }
  420. // Some type of object without properties can be shortcutted.
  421. if (keys.length === 0) {
  422. if (isFunction(value)) {
  423. var name = value.name ? ': ' + value.name : '';
  424. return ctx.stylize('[Function' + name + ']', 'special');
  425. }
  426. if (isRegExp(value)) {
  427. return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
  428. }
  429. if (isDate(value)) {
  430. return ctx.stylize(Date.prototype.toString.call(value), 'date');
  431. }
  432. if (isError(value)) {
  433. return formatError(value);
  434. }
  435. }
  436. var base = '', array = false, braces = ['{', '}'];
  437. // Make Array say that they are Array
  438. if (isArray(value)) {
  439. array = true;
  440. braces = ['[', ']'];
  441. }
  442. // Make functions say that they are functions
  443. if (isFunction(value)) {
  444. var n = value.name ? ': ' + value.name : '';
  445. base = ' [Function' + n + ']';
  446. }
  447. // Make RegExps say that they are RegExps
  448. if (isRegExp(value)) {
  449. base = ' ' + RegExp.prototype.toString.call(value);
  450. }
  451. // Make dates with properties first say the date
  452. if (isDate(value)) {
  453. base = ' ' + Date.prototype.toUTCString.call(value);
  454. }
  455. // Make error with message first say the error
  456. if (isError(value)) {
  457. base = ' ' + formatError(value);
  458. }
  459. if (keys.length === 0 && (!array || value.length == 0)) {
  460. return braces[0] + base + braces[1];
  461. }
  462. if (recurseTimes < 0) {
  463. if (isRegExp(value)) {
  464. return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
  465. } else {
  466. return ctx.stylize('[Object]', 'special');
  467. }
  468. }
  469. ctx.seen.push(value);
  470. var output;
  471. if (array) {
  472. output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
  473. } else {
  474. output = keys.map(function(key) {
  475. return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
  476. });
  477. }
  478. ctx.seen.pop();
  479. return reduceToSingleString(output, base, braces);
  480. }
  481. function formatPrimitive(ctx, value) {
  482. if (isUndefined(value))
  483. return ctx.stylize('undefined', 'undefined');
  484. if (isString(value)) {
  485. var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
  486. .replace(/'/g, "\\'")
  487. .replace(/\\"/g, '"') + '\'';
  488. return ctx.stylize(simple, 'string');
  489. }
  490. if (isNumber(value))
  491. return ctx.stylize('' + value, 'number');
  492. if (isBoolean(value))
  493. return ctx.stylize('' + value, 'boolean');
  494. // For some reason typeof null is "object", so special case here.
  495. if (isNull(value))
  496. return ctx.stylize('null', 'null');
  497. }
  498. function formatError(value) {
  499. return '[' + Error.prototype.toString.call(value) + ']';
  500. }
  501. function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
  502. var output = [];
  503. for (var i = 0, l = value.length; i < l; ++i) {
  504. if (hasOwnProperty(value, String(i))) {
  505. output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
  506. String(i), true));
  507. } else {
  508. output.push('');
  509. }
  510. }
  511. keys.forEach(function(key) {
  512. if (!key.match(/^\d+$/)) {
  513. output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
  514. key, true));
  515. }
  516. });
  517. return output;
  518. }
  519. function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
  520. var name, str, desc;
  521. desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
  522. if (desc.get) {
  523. if (desc.set) {
  524. str = ctx.stylize('[Getter/Setter]', 'special');
  525. } else {
  526. str = ctx.stylize('[Getter]', 'special');
  527. }
  528. } else {
  529. if (desc.set) {
  530. str = ctx.stylize('[Setter]', 'special');
  531. }
  532. }
  533. if (!hasOwnProperty(visibleKeys, key)) {
  534. name = '[' + key + ']';
  535. }
  536. if (!str) {
  537. if (ctx.seen.indexOf(desc.value) < 0) {
  538. if (isNull(recurseTimes)) {
  539. str = formatValue(ctx, desc.value, null);
  540. } else {
  541. str = formatValue(ctx, desc.value, recurseTimes - 1);
  542. }
  543. if (str.indexOf('\n') > -1) {
  544. if (array) {
  545. str = str.split('\n').map(function(line) {
  546. return ' ' + line;
  547. }).join('\n').substr(2);
  548. } else {
  549. str = '\n' + str.split('\n').map(function(line) {
  550. return ' ' + line;
  551. }).join('\n');
  552. }
  553. }
  554. } else {
  555. str = ctx.stylize('[Circular]', 'special');
  556. }
  557. }
  558. if (isUndefined(name)) {
  559. if (array && key.match(/^\d+$/)) {
  560. return str;
  561. }
  562. name = JSON.stringify('' + key);
  563. if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
  564. name = name.substr(1, name.length - 2);
  565. name = ctx.stylize(name, 'name');
  566. } else {
  567. name = name.replace(/'/g, "\\'")
  568. .replace(/\\"/g, '"')
  569. .replace(/(^"|"$)/g, "'");
  570. name = ctx.stylize(name, 'string');
  571. }
  572. }
  573. return name + ': ' + str;
  574. }
  575. function reduceToSingleString(output, base, braces) {
  576. var numLinesEst = 0;
  577. var length = output.reduce(function(prev, cur) {
  578. numLinesEst++;
  579. if (cur.indexOf('\n') >= 0) numLinesEst++;
  580. return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
  581. }, 0);
  582. if (length > 60) {
  583. return braces[0] +
  584. (base === '' ? '' : base + '\n ') +
  585. ' ' +
  586. output.join(',\n ') +
  587. ' ' +
  588. braces[1];
  589. }
  590. return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
  591. }
  592. // NOTE: These type checking functions intentionally don't use `instanceof`
  593. // because it is fragile and can be easily faked with `Object.create()`.
  594. function isArray(ar) {
  595. return Array.isArray(ar);
  596. }
  597. exports.isArray = isArray;
  598. function isBoolean(arg) {
  599. return typeof arg === 'boolean';
  600. }
  601. exports.isBoolean = isBoolean;
  602. function isNull(arg) {
  603. return arg === null;
  604. }
  605. exports.isNull = isNull;
  606. function isNullOrUndefined(arg) {
  607. return arg == null;
  608. }
  609. exports.isNullOrUndefined = isNullOrUndefined;
  610. function isNumber(arg) {
  611. return typeof arg === 'number';
  612. }
  613. exports.isNumber = isNumber;
  614. function isString(arg) {
  615. return typeof arg === 'string';
  616. }
  617. exports.isString = isString;
  618. function isSymbol(arg) {
  619. return typeof arg === 'symbol';
  620. }
  621. exports.isSymbol = isSymbol;
  622. function isUndefined(arg) {
  623. return arg === void 0;
  624. }
  625. exports.isUndefined = isUndefined;
  626. function isRegExp(re) {
  627. return isObject(re) && objectToString(re) === '[object RegExp]';
  628. }
  629. exports.isRegExp = isRegExp;
  630. function isObject(arg) {
  631. return typeof arg === 'object' && arg !== null;
  632. }
  633. exports.isObject = isObject;
  634. function isDate(d) {
  635. return isObject(d) && objectToString(d) === '[object Date]';
  636. }
  637. exports.isDate = isDate;
  638. function isError(e) {
  639. return isObject(e) &&
  640. (objectToString(e) === '[object Error]' || e instanceof Error);
  641. }
  642. exports.isError = isError;
  643. function isFunction(arg) {
  644. return typeof arg === 'function';
  645. }
  646. exports.isFunction = isFunction;
  647. function isPrimitive(arg) {
  648. return arg === null ||
  649. typeof arg === 'boolean' ||
  650. typeof arg === 'number' ||
  651. typeof arg === 'string' ||
  652. typeof arg === 'symbol' || // ES6 symbol
  653. typeof arg === 'undefined';
  654. }
  655. exports.isPrimitive = isPrimitive;
  656. exports.isBuffer = require('./support/isBuffer');
  657. function objectToString(o) {
  658. return Object.prototype.toString.call(o);
  659. }
  660. function pad(n) {
  661. return n < 10 ? '0' + n.toString(10) : n.toString(10);
  662. }
  663. var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
  664. 'Oct', 'Nov', 'Dec'];
  665. // 26 Feb 16:19:34
  666. function timestamp() {
  667. var d = new Date();
  668. var time = [pad(d.getHours()),
  669. pad(d.getMinutes()),
  670. pad(d.getSeconds())].join(':');
  671. return [d.getDate(), months[d.getMonth()], time].join(' ');
  672. }
  673. // log is just a thin wrapper to console.log that prepends a timestamp
  674. exports.log = function() {
  675. console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
  676. };
  677. /**
  678. * Inherit the prototype methods from one constructor into another.
  679. *
  680. * The Function.prototype.inherits from lang.js rewritten as a standalone
  681. * function (not on Function.prototype). NOTE: If this file is to be loaded
  682. * during bootstrapping this function needs to be rewritten using some native
  683. * functions as prototype setup using normal JavaScript does not work as
  684. * expected during bootstrapping (see mirror.js in r114903).
  685. *
  686. * @param {function} ctor Constructor function which needs to inherit the
  687. * prototype.
  688. * @param {function} superCtor Constructor function to inherit prototype from.
  689. */
  690. exports.inherits = require('inherits');
  691. exports._extend = function(origin, add) {
  692. // Don't do anything if add isn't an object
  693. if (!add || !isObject(add)) return origin;
  694. var keys = Object.keys(add);
  695. var i = keys.length;
  696. while (i--) {
  697. origin[keys[i]] = add[keys[i]];
  698. }
  699. return origin;
  700. };
  701. function hasOwnProperty(obj, prop) {
  702. return Object.prototype.hasOwnProperty.call(obj, prop);
  703. }
  704. }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
  705. },{"./support/isBuffer":4,"_process":2,"inherits":3}],6:[function(require,module,exports){
  706. var util = require('util');
  707. var Vue = require('vue'),
  708. VueMaterial = require('vue-material'),
  709. VueResource = require('vue-resource');
  710. Vue.use(VueMaterial);
  711. Vue.use(VueResource);
  712. var App = new Vue({
  713. el: '#app',
  714. http: {
  715. root: 'https://test.nebulon.info/api',
  716. },
  717. methods: {
  718. toggleSidenav() {
  719. this.$refs.leftSidenav.toggle();
  720. },
  721. sidenavOpen() {
  722. console.log('sidenav open');
  723. }
  724. },
  725. mounted: function () {
  726. console.log('mounted');
  727. this.$http.get('lights', { responseType: 'text' }).then(function (result) {
  728. console.log('result', result);
  729. }, function (error) {
  730. console.log('error', error);
  731. });
  732. }
  733. });
  734. },{"util":5,"vue":9,"vue-material":7,"vue-resource":8}],7:[function(require,module,exports){
  735. /*!
  736. * Vue Material v0.7.1
  737. * Made with love by Marcos Moura
  738. * Released under the MIT License.
  739. */
  740. !(function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):"object"==typeof exports?exports.VueMaterial=e(require("vue")):t.VueMaterial=e(t.Vue)})(this,(function(t){return (function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=429)})([(function(t,e){t.exports=function(t,e,n,i){var o,r=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(o=t,r=t.default);var s="function"==typeof r?r.options:r;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),n&&(s._scopeId=n),i){var d=s.computed||(s.computed={});Object.keys(i).forEach((function(t){var e=i[t];d[t]=function(){return e}}))}return{esModule:o,exports:r,options:s}}}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{mdTheme:String},data:function(){return{closestThemedParent:!1}},methods:{getClosestThemedParent:function(t){return!(!t||!t.$el||0===t._uid)&&(t.mdTheme||t.mdName?t:this.getClosestThemedParent(t.$parent))}},computed:{themeClass:function(){if(this.mdTheme)return"md-theme-"+this.mdTheme;var t=this.closestThemedParent.mdTheme;return t||(t=this.closestThemedParent?this.closestThemedParent.mdName:this.$material.currentTheme),"md-theme-"+t}},mounted:function(){this.closestThemedParent=this.getClosestThemedParent(this.$parent),this.$material.currentTheme||this.$material.setCurrentTheme("default")}},t.exports=e.default}),(function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)}),(function(t,e,n){t.exports=!n(9)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))}),(function(t,e,n){var i=n(22)("wks"),o=n(19),r=n(2).Symbol,a="function"==typeof r,s=t.exports=function(t){return i[t]||(i[t]=a&&r[t]||(a?r:o)("Symbol."+t))};s.store=i}),(function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)}),(function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}}),(function(t,e,n){var i=n(32),o=n(15);t.exports=function(t){return i(o(t))}}),(function(t,e,n){var i=n(13),o=n(29),r=n(26),a=Object.defineProperty;e.f=n(3)?Object.defineProperty:function(t,e,n){if(i(t),e=r(e,!0),i(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}}),(function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}}),(function(t,e,n){var i=n(8),o=n(14);t.exports=n(3)?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}}),(function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function t(e,n){return!(!e||!e.$el)&&(0!==e._uid&&(e.$el.classList.contains(n)?e:t(e.$parent,n)))};e.default=i,t.exports=e.default}),(function(t,e,n){var i=n(11);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}}),(function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}}),(function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}}),(function(t,e,n){var i=n(30),o=n(21);t.exports=Object.keys||function(t){return i(t,o)}}),(function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}}),(function(t,e,n){var i=n(2),o=n(5),r=n(28),a=n(10),s="prototype",d=function(t,e,n){var l,c,u,m=t&d.F,f=t&d.G,p=t&d.S,h=t&d.P,b=t&d.B,v=t&d.W,E=f?o:o[e]||(o[e]={}),g=E[s],_=f?i:p?i[e]:(i[e]||{})[s];f&&(n=e);for(l in n)c=!m&&_&&void 0!==_[l],c&&l in E||(u=c?_[l]:n[l],E[l]=f&&"function"!=typeof _[l]?n[l]:b&&c?r(u,i):v&&_[l]==u?(function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e[s]=t[s],e})(u):h&&"function"==typeof u?r(Function.call,u):u,h&&((E.virtual||(E.virtual={}))[l]=u,t&d.R&&g&&!g[l]&&a(g,l,u)))};d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,t.exports=d}),(function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}}),(function(t,e,n){var i=n(22)("keys"),o=n(19);t.exports=function(t){return i[t]||(i[t]=o(t))}}),(function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")}),(function(t,e,n){var i=n(2),o="__core-js_shared__",r=i[o]||(i[o]={});t.exports=function(t){return r[t]||(r[t]={})}}),(function(t,e,n){var i=n(15);t.exports=function(t){return Object(i(t))}}),(function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}}),(function(t,e){t.exports={}}),(function(t,e,n){var i=n(11);t.exports=function(t,e){if(!i(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!i(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}}),(function(t,e,n){var i=n(11),o=n(2).document,r=i(o)&&i(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}}),(function(t,e,n){var i=n(34);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)}}return function(){return t.apply(e,arguments)}}}),(function(t,e,n){t.exports=!n(3)&&!n(9)((function(){return 7!=Object.defineProperty(n(27)("div"),"a",{get:function(){return 7}}).a}))}),(function(t,e,n){var i=n(6),o=n(7),r=n(35)(!1),a=n(20)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),d=0,l=[];for(n in s)n!=a&&i(s,n)&&l.push(n);for(;e.length>d;)i(s,n=e[d++])&&(~r(l,n)||l.push(n));return l}}),(function(t,e,n){var i=n(17),o=Math.min;t.exports=function(t){return t>0?o(i(t),9007199254740991):0}}),(function(t,e,n){var i=n(24);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}}),(function(t,e,n){var i=n(8).f,o=n(6),r=n(4)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,r)&&i(t,r,{configurable:!0,value:e})}}),(function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}}),(function(t,e,n){var i=n(7),o=n(31),r=n(37);t.exports=function(t){return function(e,n,a){var s,d=i(e),l=o(d.length),c=r(a,l);if(t&&n!=n){for(;l>c;)if(s=d[c++],s!=s)return!0}else for(;l>c;c++)if((t||c in d)&&d[c]===n)return t||c||0;return!t&&-1}}}),(function(t,e){t.exports=!0}),(function(t,e,n){var i=n(17),o=Math.max,r=Math.min;t.exports=function(t,e){return t=i(t),t<0?o(t+e,0):r(t,e)}}),(function(t,e){e.f={}.propertyIsEnumerable}),(function(t,e,n){"use strict";function i(){var t=document.createElement("span"),e={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(var n in e)if(void 0!==t.style[n])return e[n]}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i(),t.exports=e.default}),(function(t,e,n){t.exports={default:n(49),__esModule:!0}}),(function(t,e,n){"use strict";var i=n(36),o=n(18),r=n(43),a=n(10),s=n(6),d=n(25),l=n(51),c=n(33),u=n(53),m=n(4)("iterator"),f=!([].keys&&"next"in[].keys()),p="@@iterator",h="keys",b="values",v=function(){return this};t.exports=function(t,e,n,E,g,_,C){l(n,e,E);var M,T,A,x=function(t){if(!f&&t in R)return R[t];switch(t){case h:return function(){return new n(this,t)};case b:return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",N=g==b,y=!1,R=t.prototype,S=R[m]||R[p]||g&&R[g],w=S||x(g),k=g?N?x("entries"):w:void 0,P="Array"==e?R.entries||S:S;if(P&&(A=u(P.call(new t)),A!==Object.prototype&&(c(A,O,!0),i||s(A,m)||a(A,m,v))),N&&S&&S.name!==b&&(y=!0,w=function(){return S.call(this)}),i&&!C||!f&&!y&&R[m]||a(R,m,w),d[e]=w,d[O]=v,g)if(M={values:N?w:x(b),keys:_?w:x(h),entries:k},C)for(T in M)T in R||r(R,T,M[T]);else o(o.P+o.F*(f||y),e,M);return M}}),(function(t,e,n){var i=n(13),o=n(52),r=n(21),a=n(20)("IE_PROTO"),s=function(){},d="prototype",l=function(){var t,e=n(27)("iframe"),i=r.length,o="<",a=">";for(e.style.display="none",n(50).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),l=t.F;i--;)delete l[d][r[i]];return l()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[d]=i(t),n=new s,s[d]=null,n[a]=t):n=l(),void 0===e?n:o(n,e)}}),(function(t,e,n){t.exports=n(10)}),(function(t,e,n){var i=n(2),o=n(5),r=n(36),a=n(45),s=n(8).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=r?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}}),(function(t,e,n){e.f=n(4)}),(function(t,e){e.f=Object.getOwnPropertySymbols}),(function(t,e,n){"use strict";var i=n(55)(!0);n(41)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})}))}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){return Math.random().toString(36).slice(4)};e.default=i,t.exports=e.default}),(function(t,e,n){n(56),t.exports=n(5).Object.keys}),(function(t,e,n){t.exports=n(2).document&&document.documentElement}),(function(t,e,n){"use strict";var i=n(42),o=n(14),r=n(33),a={};n(10)(a,n(4)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=i(a,{next:o(1,n)}),r(t,e+" Iterator")}}),(function(t,e,n){var i=n(8),o=n(13),r=n(16);t.exports=n(3)?Object.defineProperties:function(t,e){o(t);for(var n,a=r(e),s=a.length,d=0;s>d;)i.f(t,n=a[d++],e[n]);return t}}),(function(t,e,n){var i=n(6),o=n(23),r=n(20)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),i(t,r)?t[r]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}}),(function(t,e,n){var i=n(18),o=n(5),r=n(9);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),i(i.S+i.F*r((function(){n(1)})),"Object",a)}}),(function(t,e,n){var i=n(17),o=n(15);t.exports=function(t){return function(e,n){var r,a,s=String(o(e)),d=i(n),l=s.length;return d<0||d>=l?t?"":void 0:(r=s.charCodeAt(d),r<55296||r>56319||d+1===l||(a=s.charCodeAt(d+1))<56320||a>57343?t?s.charAt(d):r:t?s.slice(d,d+2):(r-55296<<10)+(a-56320)+65536)}}}),(function(t,e,n){var i=n(23),o=n(16);n(54)("keys",(function(){return function(t){return o(i(t))}}))}),(function(t,e,n){var i=n(30),o=n(21).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e,n){var i=document.createElement("canvas");t.crossOrigin="Anonymous",t.onload=function(){var t=0,n=void 0,o=void 0,r=void 0,a=void 0,s=void 0,d=void 0,l=void 0;i.width=this.width,i.height=this.height,n=i.getContext("2d"),n.drawImage(this,0,0),o=n.getImageData(0,0,i.width,i.height),r=o.data;for(var c=0,u=r.length;c<u;c+=4)a=r[c],s=r[c+1],d=r[c+2],l=Math.floor((a+s+d)/3),t+=l;e(Math.floor(t/(this.width*this.height)))},t.onerror=n};e.default=i,t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.constructor===Array};e.default=i,t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(63),r=i(o);e.default=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return(0,r.default)(t)}}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(65),r=i(o),a=n(64),s=i(a),d="function"==typeof s.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":typeof t};e.default="function"==typeof s.default&&"symbol"===d(r.default)?function(t){return"undefined"==typeof t?"undefined":d(t)}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":"undefined"==typeof t?"undefined":d(t)}}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{value:[String,Number],disabled:Boolean,required:Boolean,maxlength:[Number,String],placeholder:String},watch:{value:function(t){this.setParentValue(t),this.updateValues(t)},disabled:function(){this.setParentDisabled()},required:function(){this.setParentRequired()},placeholder:function(){this.setParentPlaceholder()},maxlength:function(){this.handleMaxLength()}},methods:{handleMaxLength:function(){this.parentContainer.enableCounter=this.maxlength>0,this.parentContainer.counterLength=this.maxlength},setParentValue:function(t){this.parentContainer.setValue(t||this.$el.value)},setParentDisabled:function(){this.parentContainer.isDisabled=this.disabled},setParentRequired:function(){this.parentContainer.isRequired=this.required},setParentPlaceholder:function(){this.parentContainer.hasPlaceholder=!!this.placeholder},updateValues:function(t){var e=t||this.$el.value||this.value;this.setParentValue(e),this.parentContainer.inputLength=e?e.length:0},onFocus:function(){this.parentContainer&&(this.parentContainer.isFocused=!0)},onBlur:function(){this.parentContainer.isFocused=!1,this.setParentValue()},onInput:function(){this.updateValues(),this.$emit("change",this.$el.value),this.$emit("input",this.$el.value)}}},t.exports=e.default}),(function(t,e,n){t.exports={default:n(66),__esModule:!0}}),(function(t,e,n){t.exports={default:n(67),__esModule:!0}}),(function(t,e,n){t.exports={default:n(68),__esModule:!0}}),(function(t,e,n){n(47),n(83),t.exports=n(5).Array.from}),(function(t,e,n){n(86),n(85),n(87),n(88),t.exports=n(5).Symbol}),(function(t,e,n){n(47),n(89),t.exports=n(45).f("iterator")}),(function(t,e){t.exports=function(){}}),(function(t,e,n){var i=n(24),o=n(4)("toStringTag"),r="Arguments"==i(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:r?i(e):"Object"==(s=i(e))&&"function"==typeof e.callee?"Arguments":s}}),(function(t,e,n){"use strict";var i=n(8),o=n(14);t.exports=function(t,e,n){e in t?i.f(t,e,o(0,n)):t[e]=n}}),(function(t,e,n){var i=n(16),o=n(46),r=n(38);t.exports=function(t){var e=i(t),n=o.f;if(n)for(var a,s=n(t),d=r.f,l=0;s.length>l;)d.call(t,a=s[l++])&&e.push(a);return e}}),(function(t,e,n){var i=n(25),o=n(4)("iterator"),r=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||r[o]===t)}}),(function(t,e,n){var i=n(24);t.exports=Array.isArray||function(t){return"Array"==i(t)}}),(function(t,e,n){var i=n(13);t.exports=function(t,e,n,o){try{return o?e(i(n)[0],n[1]):e(n)}catch(e){var r=t.return;throw void 0!==r&&i(r.call(t)),e}}}),(function(t,e,n){var i=n(4)("iterator"),o=!1;try{var r=[7][i]();r.return=function(){o=!0},Array.from(r,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var r=[7],a=r[i]();a.next=function(){return{done:n=!0}},r[i]=function(){return a},t(r)}catch(t){}return n}}),(function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}}),(function(t,e,n){var i=n(16),o=n(7);t.exports=function(t,e){for(var n,r=o(t),a=i(r),s=a.length,d=0;s>d;)if(r[n=a[d++]]===e)return n}}),(function(t,e,n){var i=n(19)("meta"),o=n(11),r=n(6),a=n(8).f,s=0,d=Object.isExtensible||function(){return!0},l=!n(9)((function(){return d(Object.preventExtensions({}))})),c=function(t){a(t,i,{value:{i:"O"+ ++s,w:{}}})},u=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!r(t,i)){if(!d(t))return"F";if(!e)return"E";c(t)}return t[i].i},m=function(t,e){if(!r(t,i)){if(!d(t))return!0;if(!e)return!1;c(t)}return t[i].w},f=function(t){return l&&p.NEED&&d(t)&&!r(t,i)&&c(t),t},p=t.exports={KEY:i,NEED:!1,fastKey:u,getWeak:m,onFreeze:f}}),(function(t,e,n){var i=n(38),o=n(14),r=n(7),a=n(26),s=n(6),d=n(29),l=Object.getOwnPropertyDescriptor;e.f=n(3)?l:function(t,e){if(t=r(t),e=a(e,!0),d)try{return l(t,e)}catch(t){}if(s(t,e))return o(!i.f.call(t,e),t[e])}}),(function(t,e,n){var i=n(7),o=n(57).f,r={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return o(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==r.call(t)?s(t):o(i(t))}}),(function(t,e,n){var i=n(70),o=n(4)("iterator"),r=n(25);t.exports=n(5).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||r[i(t)]}}),(function(t,e,n){"use strict";var i=n(28),o=n(18),r=n(23),a=n(75),s=n(73),d=n(31),l=n(71),c=n(82);o(o.S+o.F*!n(76)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,o,u,m=r(t),f="function"==typeof this?this:Array,p=arguments.length,h=p>1?arguments[1]:void 0,b=void 0!==h,v=0,E=c(m);if(b&&(h=i(h,p>2?arguments[2]:void 0,2)),void 0==E||f==Array&&s(E))for(e=d(m.length),n=new f(e);e>v;v++)l(n,v,b?h(m[v],v):m[v]);else for(u=E.call(m),n=new f;!(o=u.next()).done;v++)l(n,v,b?a(u,h,[o.value,v],!0):o.value);return n.length=v,n}})}),(function(t,e,n){"use strict";var i=n(69),o=n(77),r=n(25),a=n(7);t.exports=n(41)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,n):"values"==e?o(0,t[n]):o(0,[n,t[n]])}),"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")}),(function(t,e){}),(function(t,e,n){"use strict";var i=n(2),o=n(6),r=n(3),a=n(18),s=n(43),d=n(79).KEY,l=n(9),c=n(22),u=n(33),m=n(19),f=n(4),p=n(45),h=n(44),b=n(78),v=n(72),E=n(74),g=n(13),_=n(7),C=n(26),M=n(14),T=n(42),A=n(81),x=n(80),O=n(8),N=n(16),y=x.f,R=O.f,S=A.f,w=i.Symbol,k=i.JSON,P=k&&k.stringify,H="prototype",L=f("_hidden"),$=f("toPrimitive"),I={}.propertyIsEnumerable,D=c("symbol-registry"),B=c("symbols"),j=c("op-symbols"),F=Object[H],W="function"==typeof w,Y=i.QObject,G=!Y||!Y[H]||!Y[H].findChild,U=r&&l((function(){return 7!=T(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a}))?function(t,e,n){var i=y(F,e);i&&delete F[e],R(t,e,n),i&&t!==F&&R(F,e,i)}:R,z=function(t){var e=B[t]=T(w[H]);return e._k=t,e},K=W&&"symbol"==typeof w.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof w},V=function(t,e,n){return t===F&&V(j,e,n),g(t),e=C(e,!0),g(n),o(B,e)?(n.enumerable?(o(t,L)&&t[L][e]&&(t[L][e]=!1),n=T(n,{enumerable:M(0,!1)})):(o(t,L)||R(t,L,M(1,{})),t[L][e]=!0),U(t,e,n)):R(t,e,n)},q=function(t,e){g(t);for(var n,i=v(e=_(e)),o=0,r=i.length;r>o;)V(t,n=i[o++],e[n]);return t},X=function(t,e){return void 0===e?T(t):q(T(t),e)},J=function(t){var e=I.call(this,t=C(t,!0));return!(this===F&&o(B,t)&&!o(j,t))&&(!(e||!o(this,t)||!o(B,t)||o(this,L)&&this[L][t])||e)},Q=function(t,e){if(t=_(t),e=C(e,!0),t!==F||!o(B,e)||o(j,e)){var n=y(t,e);return!n||!o(B,e)||o(t,L)&&t[L][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=S(_(t)),i=[],r=0;n.length>r;)o(B,e=n[r++])||e==L||e==d||i.push(e);return i},tt=function(t){for(var e,n=t===F,i=S(n?j:_(t)),r=[],a=0;i.length>a;)!o(B,e=i[a++])||n&&!o(F,e)||r.push(B[e]);return r};W||(w=function(){if(this instanceof w)throw TypeError("Symbol is not a constructor!");var t=m(arguments.length>0?arguments[0]:void 0),e=function(n){this===F&&e.call(j,n),o(this,L)&&o(this[L],t)&&(this[L][t]=!1),U(this,t,M(1,n))};return r&&G&&U(F,t,{configurable:!0,set:e}),z(t)},s(w[H],"toString",(function(){return this._k})),x.f=Q,O.f=V,n(57).f=A.f=Z,n(38).f=J,n(46).f=tt,r&&!n(36)&&s(F,"propertyIsEnumerable",J,!0),p.f=function(t){return z(f(t))}),a(a.G+a.W+a.F*!W,{Symbol:w});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)f(et[nt++]);for(var et=N(f.store),nt=0;et.length>nt;)h(et[nt++]);a(a.S+a.F*!W,"Symbol",{for:function(t){return o(D,t+="")?D[t]:D[t]=w(t)},keyFor:function(t){if(K(t))return b(D,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){G=!0},useSimple:function(){G=!1}}),a(a.S+a.F*!W,"Object",{create:X,defineProperty:V,defineProperties:q,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:tt}),k&&a(a.S+a.F*(!W||l((function(){var t=w();return"[null]"!=P([t])||"{}"!=P({a:t})||"{}"!=P(Object(t))}))),"JSON",{stringify:function(t){if(void 0!==t&&!K(t)){for(var e,n,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);return e=i[1],"function"==typeof e&&(n=e),!n&&E(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!K(e))return e}),i[1]=e,P.apply(k,i)}}}),w[H][$]||n(10)(w[H],$,w[H].valueOf),u(w,"Symbol"),u(Math,"Math",!0),u(i.JSON,"JSON",!0)}),(function(t,e,n){n(44)("asyncIterator")}),(function(t,e,n){n(44)("observable")}),(function(t,e,n){n(84);for(var i=n(2),o=n(10),r=n(25),a=n(4)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],d=0;d<5;d++){var l=s[d],c=i[l],u=c&&c.prototype;u&&!u[a]&&o(u,a,l),r[l]=r.Array}}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-avatar",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(260),a=i(r),s=n(233),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-backdrop",a.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(261),a=i(r);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-bottom-bar",a.default),t.component("md-bottom-bar-item",d.default),t.material.styles.push(c.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(262),a=i(r),s=n(263),d=i(s),l=n(234),c=i(l);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-button",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(264),a=i(r),s=n(235),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-button-toggle",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(265),a=i(r),s=n(236),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-card",a.default),t.component("md-card-media",d.default),t.component("md-card-media-cover",c.default),t.component("md-card-media-actions",m.default),t.component("md-card-header",p.default),t.component("md-card-header-text",b.default),t.component("md-card-content",E.default),t.component("md-card-actions",_.default),t.component("md-card-area",M.default),t.component("md-card-expand",A.default),t.material.styles.push(O.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(266),a=i(r),s=n(273),d=i(s),l=n(275),c=i(l),u=n(274),m=i(u),f=n(271),p=i(f),h=n(272),b=i(h),v=n(269),E=i(v),g=n(267),_=i(g),C=n(268),M=i(C),T=n(270),A=i(T),x=n(237),O=i(x);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-checkbox",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(276),a=i(r),s=n(238),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-chips",a.default),t.component("md-chip",d.default),t.material.styles.push(c.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(278),a=i(r),s=n(277),d=i(s),l=n(239),c=i(l);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-dialog",a.default),t.component("md-dialog-title",d.default),t.component("md-dialog-content",c.default),t.component("md-dialog-actions",m.default),t.component("md-dialog-alert",p.default),t.component("md-dialog-confirm",b.default),t.component("md-dialog-prompt",E.default),t.material.styles.push(_.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(279),a=i(r),s=n(282),d=i(s),l=n(281),c=i(l),u=n(280),m=i(u),f=n(283),p=i(f),h=n(284),b=i(h),v=n(285),E=i(v),g=n(240),_=i(g);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-divider",a.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(286),a=i(r);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-file",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(287),a=i(r),s=n(241),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-icon",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(288),a=i(r),s=n(242),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-image",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(289),a=i(r),s=n(243),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-input-container",a.default),t.component("md-input",d.default),t.component("md-textarea",c.default),t.material.styles.push(m.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(291),a=i(r),s=n(290),d=i(s),l=n(292),c=i(l),u=n(244),m=i(u);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-layout",a.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(293),a=i(r);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-list",a.default),t.component("md-list-item",d.default),t.component("md-list-expand",c.default),t.material.styles.push(m.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(294),a=i(r),s=n(123),d=i(s),l=n(295),c=i(l),u=n(245),m=i(u);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-menu",a.default),t.component("md-menu-item",d.default),t.component("md-menu-content",c.default),t.material.styles.push(m.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(301),a=i(r),s=n(303),d=i(s),l=n(302),c=i(l),u=n(246),m=i(u);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-progress",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(304),a=i(r),s=n(247),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-radio",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(305),a=i(r),s=n(248),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-select",a.default),t.component("md-option",d.default),t.material.styles.push(c.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(307),a=i(r),s=n(306),d=i(s),l=n(249),c=i(l);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-sidenav",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(308),a=i(r),s=n(250),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-snackbar",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(309),a=i(r),s=n(251),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-speed-dial",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(310),a=i(r),s=n(252),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-spinner",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(311),a=i(r),s=n(253),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-subheader",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(312),a=i(r),s=n(254),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-switch",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(313),a=i(r),s=n(255),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-table",a.default),t.component("md-table-header",{functional:!0,render:function(t,e){return t("thead",{staticClass:"md-table-header"},e.children)}}),t.component("md-table-body",{functional:!0,render:function(t,e){return t("tbody",{staticClass:"md-table-body"},e.children)}}),t.component("md-table-row",d.default),t.component("md-table-head",c.default),t.component("md-table-cell",m.default),t.component("md-table-edit",p.default),t.component("md-table-card",b.default),t.component("md-table-pagination",_.default),t.component("md-table-alternate-header",E.default),t.material.styles.push(M.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(314),a=i(r),s=n(321),d=i(s),l=n(319),c=i(l),u=n(317),m=i(u),f=n(318),p=i(f),h=n(316),b=i(h),v=n(315),E=i(v),g=n(320),_=i(g),C=n(256),M=i(C);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-tabs",a.default),t.component("md-tab",d.default),t.material.styles.push(c.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(323),a=i(r),s=n(322),d=i(s),l=n(257),c=i(l);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-toolbar",a.default),t.material.styles.push(d.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(324),a=i(r),s=n(258),d=i(s);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-tooltip",a.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(325),a=i(r);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-whiteframe",a.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;
  741. var r=n(326),a=i(r);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){return o.installed?void console.warn("Vue Material is already installed."):(o.installed=!0,t.use(a.default),t.use(d.default),void t.material.styles.push(c.default))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(126),a=i(r),s=n(125),d=i(s),l=n(259),c=i(l);n(200),t.exports=e.default}),(function(t,e,n){var i,o,r;!(function(n,a){o=[e,t],i=a,r="function"==typeof i?i.apply(e,o):i,!(void 0!==r&&(t.exports=r))})(this,(function(t,e){"use strict";function n(t){function e(){var e=window.getComputedStyle(t,null);"vertical"===e.resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),d="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(d)&&(d=0),s()}function n(e){var n=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=n,t.style.overflowY=e}function i(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return e}function o(){var e=t.style.height,n=i(t),o=document.documentElement&&document.documentElement.scrollTop;t.style.height="auto";var r=t.scrollHeight+d;return 0===t.scrollHeight?void(t.style.height=e):(t.style.height=r+"px",l=t.clientWidth,n.forEach((function(t){t.node.scrollTop=t.scrollTop})),void(o&&(document.documentElement.scrollTop=o)))}function s(){o();var e=Math.round(parseFloat(t.style.height)),i=window.getComputedStyle(t,null),r=Math.round(parseFloat(i.height));if(r!==e?"visible"!==i.overflowY&&(n("visible"),o(),r=Math.round(parseFloat(window.getComputedStyle(t,null).height))):"hidden"!==i.overflowY&&(n("hidden"),o(),r=Math.round(parseFloat(window.getComputedStyle(t,null).height))),c!==r){c=r;var s=a("autosize:resized");try{t.dispatchEvent(s)}catch(t){}}}if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!r.has(t)){var d=null,l=t.clientWidth,c=null,u=function(){t.clientWidth!==l&&s()},m=function(e){window.removeEventListener("resize",u,!1),t.removeEventListener("input",s,!1),t.removeEventListener("keyup",s,!1),t.removeEventListener("autosize:destroy",m,!1),t.removeEventListener("autosize:update",s,!1),Object.keys(e).forEach((function(n){t.style[n]=e[n]})),r.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",m,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",s,!1),window.addEventListener("resize",u,!1),t.addEventListener("input",s,!1),t.addEventListener("autosize:update",s,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",r.set(t,{destroy:m,update:s}),e()}}function i(t){var e=r.get(t);e&&e.destroy()}function o(t){var e=r.get(t);e&&e.update()}var r="function"==typeof Map?new Map:(function(){var t=[],e=[];return{has:function(e){return t.indexOf(e)>-1},get:function(n){return e[t.indexOf(n)]},set:function(n,i){t.indexOf(n)===-1&&(t.push(n),e.push(i))},delete:function(n){var i=t.indexOf(n);i>-1&&(t.splice(i,1),e.splice(i,1))}}})(),a=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(t){a=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!1),e}}var s=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(s=function(t){return t},s.destroy=function(t){return t},s.update=function(t){return t}):(s=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return n(t,e)})),t},s.destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],i),t},s.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],o),t}),e.exports=s}))}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(193),r=i(o),a=n(61),s=i(a),d=n(296),l=i(d),c=n(299),u=i(c),m=n(300),f=i(m),p=n(298),h=i(p),b=n(297),v=i(b);e.default={functional:!0,props:{href:String,disabled:Boolean},render:function(t,e){var n=e.children,i=e.data,o=e.props,a=function(){var t=i.nativeOn,e=["contextmenu","dblclick","dragend","mousedown","touchstart","click"],r=n.length;if(o.href)return u.default;if(t)for(var a=e.length;a--;)if(t[e[a]])return l.default;for(;r--;){var d=n[r].componentOptions;if(d)if("md-list-expand"===d.tag){var c=(function(){var t=n[r];return i.scopedSlots={expand:function(){return t}},n.splice(r,1),{v:h.default}})();if("object"===("undefined"==typeof c?"undefined":(0,s.default)(c)))return c.v}else if("router-link"===d.tag)return n[r].data.staticClass="md-list-item-container md-button",f.default}return v.default};return t(a(),(0,r.default)({props:o},i),n)}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(395),r=i(o),a=new r.default({data:function(){return{current:null}}});e.default=a,t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.component("md-ink-ripple",a.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(327),a=i(r);t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){t.material=new t({data:function(){return{styles:[],currentTheme:null,inkRipple:!0}},methods:{registerTheme:function(t,e){var n={};"string"==typeof t?n[t]=e:n=t,_(n,this.styles)},applyCurrentTheme:function(t){C(v[t]),document.body.classList.remove("md-theme-"+this.currentTheme),document.body.classList.add("md-theme-"+t),this.currentTheme=t},setCurrentTheme:function(t){b.indexOf(t)>=0?this.applyCurrentTheme(t):(b.indexOf("default")===-1?this.registerTheme("default",p):console.warn("The theme '"+t+"' doesn't exists. You need to register it first in order to use."),this.applyCurrentTheme("default"))}}}),t.component("md-theme",m.default),t.prototype.$material=t.material}Object.defineProperty(e,"__esModule",{value:!0});var r=n(40),a=i(r);e.default=o;var s=n(127),d=i(s),l=n(128),c=i(l),u=n(328),m=i(u),f=["primary","accent","background","warn","hue-1","hue-2","hue-3"],p={primary:"indigo",accent:"pink",background:"white",warn:"deep-orange"},h=function(t,e){var n=document.head,i="md-theme-"+e,o=n.querySelector("#"+i);if(o)o.textContent=t;else{var r=document.createElement("style");t=t.replace(/THEME_NAME/g,i),r.type="text/css",r.id=i,r.textContent=t,n.appendChild(r)}},b=[],v={},E=function(t,e,n){return f.forEach((function(i){t=t.replace(RegExp("("+i.toUpperCase()+")-(COLOR|CONTRAST)-?(A?\\d*)-?(\\d*\\.?\\d+)?","g"),(function(t,o,r,a,s){var l=void 0,u=0===+a?500:a;if(e[i]?"string"==typeof e[i]?l=d.default[e[i]]:(l=d.default[e[i].color]||d.default[p[i]],u=0===+a?e[i].hue:a):l=d.default[p[i]],"COLOR"===r){var m=d.default[e[i]];return a||m||("accent"===i?u="A200":"background"===i&&(u=50)),"primary"===i&&(v[n]=l[u]),s?(0,c.default)(l[u],s):l[u]}return l.darkText.indexOf(u)>=0?s?(0,c.default)("#000",s):"rgba(0, 0, 0, .87)":s?(0,c.default)("#fff",s):"rgba(255, 255, 255, .87)"}))})),t},g=function(t,e,n){var i=[];n.forEach((function(n){i.push(E(n,t,e))})),h(i.join("\n"),e)},_=function(t,e){var n=t?(0,a.default)(t):[];n.forEach((function(n){g(t[n],n,e),b.push(n)}))},C=function(t){var e=document.querySelector('meta[name="theme-color"]');e?e.setAttribute("content",t):(e=document.createElement("meta"),e.setAttribute("name","theme-color"),e.setAttribute("content",t),document.head.appendChild(e))};t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={red:{50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000",darkText:[50,100,200,300,"A100"]},pink:{50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162",darkText:[50,100,200,"A100"]},purple:{50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff",darkText:[50,100,200,"A100"]},"deep-purple":{50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea",darkText:[50,100,200,"A100"]},indigo:{50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe",darkText:[50,100,200,"A100"]},blue:{50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff",darkText:[50,100,200,300,400,"A100"]},"light-blue":{50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea",darkText:[50,100,200,300,400,500,"A100","A200","A300"]},cyan:{50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4",darkText:[50,100,200,300,400,500,600,"A100","A200","A300","A400"]},teal:{50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5",darkText:[50,100,200,300,400,"A100","A200","A300","A400"]},green:{50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853",darkText:[50,100,200,300,400,500,"A100","A200","A300","A400"]},"light-green":{50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17",darkText:[50,100,200,300,400,500,600,"A100","A200","A300","A400"]},lime:{50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00",darkText:[50,100,200,300,400,500,600,700,800,"A100","A200","A300","A400"]},yellow:{50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600",darkText:[50,100,200,300,400,500,600,700,800,900,"A100","A200","A300","A400"]},amber:{50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00",darkText:[50,100,200,300,400,500,600,700,800,900,"A100","A200","A300","A400"]},orange:{50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00",darkText:[50,100,200,300,400,500,600,700,"A100","A200","A300","A400"]},"deep-orange":{50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00",darkText:[50,100,200,300,400,"A100","A200"]},brown:{50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037",darkText:[50,100,200,"A100","A200","A300","A400"]},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#fff",A200:"#000000",A400:"#303030",A700:"#616161",darkText:[50,100,200,300,400,500,"A100"]},"blue-grey":{50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64",darkText:[50,100,200,300,"A100","A200","A300","A400"]},white:{50:"#fff",100:"#fff",200:"#fff",300:"#fff",400:"#fff",500:"#fff",600:"#fff",700:"#fff",800:"#fff",900:"#fff",A100:"#fff",A200:"#fff",A400:"#fff",A700:"#fff",darkText:[50,100,200,300,400,500,600,700,800,900,"A100","A200","A300","A400"]},black:{50:"#000",100:"#000",200:"#000",300:"#000",400:"#000",500:"#000",600:"#000",700:"#000",800:"#000",900:"#000",A100:"#000",A200:"#000",A400:"#000",A700:"#000",darkText:[]}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){var n="",i="",o="",r=t.toString().match(/^#?(([0-9a-zA-Z]{3}){1,3})$/);if(!r)throw new Error("Invalid color"+t);if(t=r[1],6===t.length)n=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),o=parseInt(t.substring(4,6),16);else if(3===t.length){var a=t.substring(0,1),s=t.substring(1,2),d=t.substring(2,3);n=parseInt(a+a,16),i=parseInt(s+s,16),o=parseInt(d+d,16)}return e?(e>1&&(e/=100),"rgba("+n+", "+i+", "+o+", "+e+")"):"rgb("+n+", "+i+", "+o+")"},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=8,o=function(t,e){return e.top<=i-parseInt(getComputedStyle(t).marginTop,10)},r=function(t,e){return e.top+t.offsetHeight+i>=window.innerHeight-parseInt(getComputedStyle(t).marginTop,10)},a=function(t,e){return e.left<=i-parseInt(getComputedStyle(t).marginLeft,10)},s=function(t,e){return e.left+t.offsetWidth+i>=window.innerWidth-parseInt(getComputedStyle(t).marginLeft,10)},d=function(t,e){var n=getComputedStyle(t);return o(t,e)&&(e.top=i-parseInt(n.marginTop,10)),a(t,e)&&(e.left=i-parseInt(n.marginLeft,10)),s(t,e)&&(e.left=window.innerWidth-i-t.offsetWidth-parseInt(n.marginLeft,10)),r(t,e)&&(e.top=window.innerHeight-i-t.offsetHeight-parseInt(n.marginTop,10)),e};e.default=d,t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){var n=!1;return function(){n||(t.call(),n=!0,window.setTimeout((function(){n=!1}),e))}};e.default=i,t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={mixins:[r.default]},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={methods:{close:function(){this.$emit("close")}}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={props:{mdShift:Boolean},mixins:[r.default],computed:{classes:function(){return this.mdShift?"md-shift":"md-fixed"}},methods:{setActive:function(t){this.$children.forEach((function(e){e.active=e===t})),this.$emit("change",this.$children.findIndex((function(e){return e===t})))}}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{mdIcon:String,mdIconSrc:String,mdIconset:String,mdActive:Boolean,disabled:String,href:String},data:function(){return{active:!1}},computed:{classes:function(){return{"md-active":this.active}}},watch:{mdActive:function(t){this.setActive(t)}},methods:{setActive:function(t){t&&this.$parent.setActive(this)}},mounted:function(){if(!this.$parent.$el.classList.contains("md-bottom-bar"))throw this.$destroy(),new Error("You should wrap the md-bottom-bar-item in a md-bottom-bar");this.mdActive&&(this.active=!0)}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={props:{href:String,target:String,rel:String,type:{type:String,default:"button"},disabled:Boolean},mixins:[r.default],computed:{newRel:function(){return"_blank"===this.target?this.rel||"noopener":this.rel}}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o),a=void 0;e.default={props:{mdSingle:Boolean},mixins:[r.default],mounted:function(){var t=this;this.$children.forEach((function(e){var n=e.$el,i="md-toggle";a=function(){t.mdSingle?(t.$children.forEach((function(t){t.$el.classList.remove(i)})),n.classList.add(i)):n.classList.toggle(i)},n&&n.classList.contains("md-button")&&n.addEventListener("click",a)}))},beforeDestroy:function(){this.$children.forEach((function(t){var e=t.$el;e&&e.classList.contains("md-button")&&e.removeEventListener("click",a)}))}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={props:{mdWithHover:Boolean},mixins:[r.default],computed:{classes:function(){return{"md-with-hover":this.mdWithHover}}}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{mdInset:Boolean},computed:{classes:function(){return{"md-inset":this.mdInset}}}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={methods:{setContentMargin:function(){this.content.style.marginTop=-this.content.offsetHeight+"px"},toggle:function(){this.$refs.expand.classList.toggle("md-active")},onWindowResize:function(){window.requestAnimationFrame(this.setContentMargin)}},mounted:function(){var t=this;window.setTimeout((function(){t.trigger=t.$el.querySelector("[md-expand-trigger]"),t.content=t.$el.querySelector(".md-card-content"),t.content&&(t.setContentMargin(),t.trigger.addEventListener("click",t.toggle),window.addEventListener("resize",t.onWindowResize))}),200)},destroyed:function(){this.content&&(this.trigger.removeEventListener("click",this.toggle),window.removeEventListener("resize",this.onWindowResize))}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={mounted:function(){this.parentClasses=this.$parent.$el.classList,this.parentClasses.contains("md-card-header")&&(this.insideParent=!0,this.parentClasses.add("md-card-header-flex"))},destroyed:function(){this.parentClasses.remove("md-card-header-flex")}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{mdRatio:String,mdMedium:Boolean,mdBig:Boolean},computed:{classes:function t(){var t={"md-16-9":"16:9"===this.mdRatio||"16/9"===this.mdRatio,"md-4-3":"4:3"===this.mdRatio||"4/3"===this.mdRatio,"md-1-1":"1:1"===this.mdRatio||"1/1"===this.mdRatio};return(this.mdMedium||this.mdBig)&&(t={"md-medium":this.mdMedium,"md-big":this.mdBig}),t}}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(58),r=i(o);e.default={props:{mdTextScrim:Boolean,mdSolid:Boolean},data:function(){return{backdropBg:{}}},computed:{classes:function(){return{"md-text-scrim":this.mdTextScrim,"md-solid":this.mdSolid}},styles:function(){return{background:this.backdropBg}}},methods:{applyScrimColor:function(t){this.$refs.backdrop&&(this.backdropBg="linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, "+t/2+") 66%, rgba(0, 0, 0, "+t+") 100%)")},applySolidColor:function(t){var e=this.$el.querySelector(".md-card-area");e&&(e.style.background="rgba(0, 0, 0, "+t+")")}},mounted:function(){var t=this,e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.6;t.mdTextScrim?t.applyScrimColor(e):t.mdSolid&&t.applySolidColor(e)},n=this.$el.querySelector("img");n&&(this.mdTextScrim||this.mdSolid)&&(0,r.default)(n,(function(t){var n=256,i=(100*Math.abs(n-t)/n+15)/100;i>=.7&&(i=.7),e(i)}),e)}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={props:{name:String,value:[String,Boolean],id:String,disabled:Boolean},mixins:[r.default],data:function(){return{checked:this.value}},computed:{classes:function(){return{"md-checked":this.checked,"md-disabled":this.disabled}}},watch:{value:function(){this.checked=!!this.value}},methods:{toggleCheck:function(t){this.disabled||(this.checked=!this.checked,this.$emit("change",this.checked,t),this.$emit("input",this.checked,t))}}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={props:{disabled:Boolean,mdDeletable:Boolean},mixins:[r.default],computed:{classes:function(){return{"md-deletable":this.mdDeletable,"md-disabled":this.disabled}}}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o),a=n(48),s=i(a);e.default={props:{value:Array,disabled:Boolean,mdInputId:String,mdInputName:String,mdInputPlaceholder:String,mdInputType:{type:String,default:"text"},mdStatic:Boolean,mdMax:{type:Number,default:1/0}},mixins:[r.default],data:function(){return{currentChip:null,selectedChips:this.value,inputId:this.mdInputId||"chips-"+(0,s.default)()}},watch:{value:function(t){this.selectedChips=t}},computed:{classes:function(){return{"md-static":this.mdStatic,"md-disabled":this.disabled}}},methods:{applyInputFocus:function(){var t=this;this.$nextTick((function(){t.$refs.input.$el.focus()}))},addChip:function(){if(this.currentChip&&this.selectedChips.length<this.mdMax){var t=this.currentChip.trim();this.selectedChips.indexOf(t)<0&&(this.selectedChips.push(t),this.currentChip=null,this.$emit("input",this.selectedChips),this.$emit("change",this.selectedChips),this.applyInputFocus())}},deleteChip:function(t){var e=this.selectedChips.indexOf(t);e>=0&&this.selectedChips.splice(e,1),this.$emit("change",this.selectedChips),this.applyInputFocus()},deleteLastChip:function(){this.currentChip||(this.selectedChips.pop(),this.$emit("change",this.selectedChips),this.applyInputFocus())}}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o),a=n(39),s=i(a);e.default={props:{mdClickOutsideToClose:{type:Boolean,default:!0},mdEscToClose:{type:Boolean,default:!0},mdBackdrop:{type:Boolean,default:!0},mdOpenFrom:String,mdCloseTo:String,mdFullscreen:{type:Boolean,default:!1}},mixins:[r.default],data:function(){return{active:!1,transitionOff:!1,dialogTransform:""}},computed:{classes:function(){return{"md-active":this.active}},dialogClasses:function(){return{"md-fullscreen":this.mdFullscreen,"md-transition-off":this.transitionOff,"md-reference":this.mdOpenFrom||this.mdCloseTo}},styles:function(){return{transform:this.dialogTransform}}},methods:{removeDialog:function(){document.body.contains(this.dialogElement)&&this.$el.parentNode.removeChild(this.$el)},calculateDialogPos:function(t){var e=document.querySelector(t);if(e){var n=e.getBoundingClientRect(),i=this.dialogInnerElement.getBoundingClientRect(),o=n.width/i.width,r=n.height/i.height,a={top:-(i.top-n.top),left:-(i.left-n.left+n.width)};n.top>i.top+i.height&&(a.top=n.top-i.top),n.left>i.left+i.width&&(a.left=n.left-i.left-n.width),this.dialogTransform="translate3D("+a.left+"px, "+a.top+"px, 0) scale("+o+", "+r+")"}},open:function(){var t=this;document.body.appendChild(this.dialogElement),this.transitionOff=!0,this.calculateDialogPos(this.mdOpenFrom),window.setTimeout((function(){t.dialogElement.focus(),t.transitionOff=!1,t.active=!0})),this.$emit("open")},closeOnEsc:function(){this.mdEscToClose&&this.close()},close:function(){var t=this;document.body.contains(this.dialogElement)&&this.$nextTick((function(){var e=function e(){var n=t.dialogElement.querySelector(".md-ripple.md-active");n&&n.classList.remove("md-active"),t.dialogInnerElement.removeEventListener(s.default,e),document.body.removeChild(t.dialogElement),t.dialogTransform=""};t.transitionOff=!0,t.dialogTransform="",t.calculateDialogPos(t.mdCloseTo),window.setTimeout((function(){t.transitionOff=!1,t.active=!1,t.dialogInnerElement.addEventListener(s.default,e)})),t.$emit("close")}))}},mounted:function(){var t=this;this.$nextTick((function(){t.dialogElement=t.$el,t.dialogInnerElement=t.$refs.dialog,t.removeDialog()}))},beforeDestroy:function(){this.removeDialog()}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{mdTitle:String,mdContent:String,mdContentHtml:String,mdOkText:{type:String,default:"Ok"}},data:function(){return{debounce:!1}},methods:{fireCloseEvent:function(){this.debounce||this.$emit("close")},open:function(){this.$emit("open"),this.debounce=!1,this.$refs.dialog.open()},close:function(){this.fireCloseEvent(),this.debounce=!0,this.$refs.dialog.close()}},mounted:function(){if(!this.mdContent&&!this.mdContentHtml)throw new Error("Missing md-content or md-content-html attributes")}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{mdTitle:String,mdContent:String,mdContentHtml:String,mdOkText:{type:String,default:"Ok"},mdCancelText:{type:String,default:"Cancel"}},data:function(){return{debounce:!1}},methods:{fireCloseEvent:function(t){this.debounce||this.$emit("close",t)},open:function(){this.$emit("open"),this.debounce=!1,this.$refs.dialog.open()},close:function(t){this.fireCloseEvent(t),this.debounce=!0,this.$refs.dialog.close()}},mounted:function(){if(!this.mdContent&&!this.mdContentHtml)throw new Error("Missing md-content or md-content-html attributes")}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{value:{type:[String,Number],required:!0},mdTitle:String,mdContent:String,mdContentHtml:String,mdOkText:{type:String,default:"Ok"},mdCancelText:{type:String,default:"Cancel"},mdInputId:String,mdInputName:String,mdInputMaxlength:[String,Number],mdInputPlaceholder:String},data:function(){return{debounce:!1}},methods:{fireCloseEvent:function(t){this.debounce||this.$emit("close",t)},open:function(){var t=this;this.$emit("open"),this.debounce=!1,this.$refs.dialog.open(),window.setTimeout((function(){t.$refs.input.$el.focus()}))},close:function(t){this.fireCloseEvent(t),this.debounce=!0,this.$refs.dialog.close()},confirmValue:function(){this.$emit("input",this.$refs.input.$el.value),this.close("ok")}}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(60),r=i(o),a=n(12),s=i(a);e.default={props:{value:String,id:String,name:String,disabled:Boolean,required:Boolean,placeholder:String,accept:String,multiple:Boolean},data:function(){return{filename:this.value}},watch:{value:function(){this.filename=this.value}},methods:{getMultipleName:function(t){var e=[];return[].concat((0,r.default)(t)).forEach((function(t){e.push(t.name)})),e.join(", ")},openPicker:function(){this.disabled||(this.$refs.fileInput.click(),this.$refs.textInput.$el.focus())},onFileSelected:function(t){var e=t.target.files||t.dataTransfer.files;e?e.length>1?this.filename=this.getMultipleName(e):1===e.length?this.filename=e[0].name:this.filename=null:this.filename=t.target.value.split("\\").pop(),this.$emit("selected",e||t.target.value),this.$emit("input",this.filename)}},mounted:function(){if(this.parentContainer=(0,s.default)(this.$parent,"md-input-container"),!this.parentContainer)throw this.$destroy(),new Error("You should wrap the md-file in a md-input-container");this.parentContainer.hasFile=!0},beforeDestroy:function(){this.parentContainer.hasFile=!1}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o),a={};e.default={props:{mdSrc:String,mdIconset:{type:String,default:"material-icons"}},data:function(){return{svgContent:null,imageSrc:null}},mixins:[r.default],watch:{mdSrc:function(){this.svgContent=null,this.imageSrc=null,this.checkSrc()}},methods:{isImage:function(t){return t.indexOf("image")>=0},isSVG:function(t){return t.indexOf("svg")>=0},setSVGContent:function(t){var e=this;this.svgContent=t,this.$nextTick((function(){e.$el.children[0].removeAttribute("fill")}))},loadSVG:function(){var t=this;a[this.mdSrc]?this.setSVGContent(a[this.mdSrc]):!(function(){var e=new XMLHttpRequest,n=t;e.open("GET",t.mdSrc,!0),e.onload=function(){var t=this.getResponseHeader("content-type");this.status>=200&&this.status<400&&n.isImage(t)?n.isSVG(t)?(a[n.mdSrc]=this.response,n.setSVGContent(this.response)):n.loadImage():console.warn("The file "+n.mdSrc+" is not a valid image.")},e.send()})()},loadImage:function(){this.imageSrc=this.mdSrc},checkSrc:function(){this.mdSrc&&(this.mdSrc.indexOf(".svg")>=0?this.loadSVG():this.loadImage())}},mounted:function(){this.checkSrc()}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(58),r=i(o);e.default={props:{mdSrc:String},data:function(){return{loaded:!1,applyBlack:!0,imageElement:null}},watch:{mdSrc:function(){this.createImage()}},computed:{classes:function(){return{"md-loaded":this.loaded,"md-black-output":this.applyBlack}}},methods:{analyzeLightness:function(t){var e=this,n=function(){e.loaded=!0};(0,r.default)(t,(function(t){var i=256,o=(100*Math.abs(i-t)/i+15)/100;o>=.7&&(e.applyBlack=!0),e.$nextTick(n)}),n)},createImage:function(){this.loaded=!1,this.applyBlack=!1,this.imageElement=null,this.mdSrc&&(this.imageElement=document.createElement("img"),this.imageElement.crossOrigin="",this.imageElement.src=this.mdSrc,this.analyzeLightness(this.imageElement))}},created:function(){this.createImage()}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(62),r=i(o),a=n(12),s=i(a);e.default={mixins:[r.default],props:{type:{type:String,default:"text"}},mounted:function(){var t=this;this.$nextTick((function(){if(t.parentContainer=(0,s.default)(t.$parent,"md-input-container"),!t.parentContainer)throw t.$destroy(),new Error("You should wrap the md-input in a md-input-container");t.setParentDisabled(),t.setParentRequired(),t.setParentPlaceholder(),t.handleMaxLength(),t.updateValues()}))}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o),a=n(59),s=i(a);e.default={props:{mdInline:Boolean,mdHasPassword:Boolean},mixins:[r.default],data:function(){return{value:"",input:!1,showPassword:!1,enableCounter:!1,hasSelect:!1,hasPlaceholder:!1,hasFile:!1,isDisabled:!1,isRequired:!1,isFocused:!1,counterLength:0,inputLength:0}},computed:{hasValue:function(){return(0,s.default)(this.value)?this.value.length>0:Boolean(this.value)},classes:function(){return{"md-input-inline":this.mdInline,"md-has-password":this.mdHasPassword,"md-has-select":this.hasSelect,"md-has-file":this.hasFile,"md-has-value":this.hasValue,"md-input-placeholder":this.hasPlaceholder,"md-input-disabled":this.isDisabled,"md-input-required":this.isRequired,"md-input-focused":this.isFocused}}},methods:{isInput:function(){return this.input&&"input"===this.input.tagName.toLowerCase()},
  742. togglePasswordType:function(){this.isInput()&&("password"===this.input.type?(this.input.type="text",this.showPassword=!0):(this.input.type="password",this.showPassword=!1),this.input.focus())},setValue:function(t){this.value=t}},mounted:function(){if(this.input=this.$el.querySelectorAll("input, textarea, select, .md-file")[0],!this.input)throw this.$destroy(),new Error("Missing input/select/textarea inside md-input-container")}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(122),r=i(o),a=n(62),s=i(a),d=n(12),l=i(d);e.default={mixins:[s.default],watch:{value:function(){var t=this;this.$nextTick((function(){r.default.update(t.$el)}))}},mounted:function(){var t=this;this.$nextTick((function(){if(t.parentContainer=(0,l.default)(t.$parent,"md-input-container"),!t.parentContainer)throw t.$destroy(),new Error("You should wrap the md-textarea in a md-input-container");t.setParentDisabled(),t.setParentRequired(),t.setParentPlaceholder(),t.handleMaxLength(),t.updateValues(),t.$el.getAttribute("rows")||t.$el.setAttribute("rows","1"),(0,r.default)(t.$el)}))},beforeDestroy:function(){r.default.destroy(this.$el)}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{mdTag:{type:String,default:"div"},mdRow:Boolean,mdRowXsmall:Boolean,mdRowSmall:Boolean,mdRowMedium:Boolean,mdRowLarge:Boolean,mdRowXlarge:Boolean,mdColumn:Boolean,mdColumnXsmall:Boolean,mdColumnSmall:Boolean,mdColumnMedium:Boolean,mdColumnLarge:Boolean,mdColumnXlarge:Boolean,mdHideXsmall:Boolean,mdHideSmall:Boolean,mdHideMedium:Boolean,mdHideLarge:Boolean,mdHideXlarge:Boolean,mdHideXsmallAndUp:Boolean,mdHideSmallAndUp:Boolean,mdHideMediumAndUp:Boolean,mdHideLargeAndUp:Boolean,mdHideXlargeAndUp:Boolean,mdGutter:[String,Number,Boolean],mdAlign:String,mdAlignXsmall:String,mdAlignSmall:String,mdAlignMedium:String,mdAlignLarge:String,mdAlignXlarge:String,mdFlex:[String,Number,Boolean],mdFlexXsmall:[String,Number,Boolean],mdFlexSmall:[String,Number,Boolean],mdFlexMedium:[String,Number,Boolean],mdFlexLarge:[String,Number,Boolean],mdFlexXlarge:[String,Number,Boolean],mdFlexOffset:[String,Number,Boolean],mdFlexOffsetXsmall:[String,Number,Boolean],mdFlexOffsetSmall:[String,Number,Boolean],mdFlexOffsetMedium:[String,Number,Boolean],mdFlexOffsetLarge:[String,Number,Boolean],mdFlexOffsetXlarge:[String,Number,Boolean]},computed:{classes:function t(){var t={"md-row":this.mdRow,"md-row-xsmall":this.mdRowXsmall,"md-row-small":this.mdRowSmall,"md-row-medium":this.mdRowMedium,"md-row-large":this.mdRowLarge,"md-row-xlarge":this.mdRowXlarge,"md-column":this.mdColumn,"md-column-xsmall":this.mdColumnXsmall,"md-column-small":this.mdColumnSmall,"md-column-medium":this.mdColumnMedium,"md-column-large":this.mdColumnLarge,"md-column-xlarge":this.mdColumnXlarge,"md-hide-xsmall":this.mdHideXsmall,"md-hide-small":this.mdHideSmall,"md-hide-medium":this.mdHideMedium,"md-hide-large":this.mdHideLarge,"md-hide-xlarge":this.mdHideXlarge,"md-hide-xsmall-and-up":this.mdHideXsmallAndUp,"md-hide-small-and-up":this.mdHideSmallAndUp,"md-hide-medium-and-up":this.mdHideMediumAndUp,"md-hide-large-and-up":this.mdHideLargeAndUp,"md-hide-xlarge-and-up":this.mdHideXlargeAndUp};return this.mdGutter&&("boolean"==typeof this.mdGutter?t["md-gutter"]=!0:this.mdGutter&&(t["md-gutter-"+this.mdGutter]=!0)),this.generatePropClasses("md-flex","","mdFlex",t),this.generatePropClasses("md-flex","xsmall","mdFlexXsmall",t),this.generatePropClasses("md-flex","small","mdFlexSmall",t),this.generatePropClasses("md-flex","medium","mdFlexMedium",t),this.generatePropClasses("md-flex","large","mdFlexLarge",t),this.generatePropClasses("md-flex","xlarge","mdFlexXlarge",t),this.generatePropClasses("md-flex-offset","","mdFlexOffset",t),this.generatePropClasses("md-flex-offset","xsmall","mdFlexOffsetXsmall",t),this.generatePropClasses("md-flex-offset","small","mdFlexOffsetSmall",t),this.generatePropClasses("md-flex-offset","medium","mdFlexOffsetMedium",t),this.generatePropClasses("md-flex-offset","large","mdFlexOffsetLarge",t),this.generatePropClasses("md-flex-offset","xlarge","mdFlexOffsetXlarge",t),this.generatePropClasses("md-align","","mdAlign",t),this.generatePropClasses("md-align","xsmall","mdAlignXsmall",t),this.generatePropClasses("md-align","small","mdAlignSmall",t),this.generatePropClasses("md-align","medium","mdAlignMedium",t),this.generatePropClasses("md-align","large","mdAlignLarge",t),this.generatePropClasses("md-align","xlarge","mdAlignXlarge",t),t}},methods:{generatePropClasses:function(t,e,n,i){e&&(e="-"+e),this[n]&&("boolean"==typeof this[n]?this[n]?i[t+e]=!0:i[t+e+"-none"]=!0:i[t+e+"-"+this[n]]=!0)}},render:function(t){return t(this.mdTag,{staticClass:"md-layout",class:this.classes},this.$slots.default)}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={mixins:[r.default]},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"md-list-item",props:{disabled:Boolean},computed:{classes:function(){return{"md-disabled":this.disabled}}}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"md-list-item"},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),r=i(o);e.default={name:"md-list-item",props:{disabled:Boolean,mdExpandMultiple:Boolean},data:function(){return{parentList:!1,active:!1,height:0,contentObserver:null,transitionOff:!0}},computed:{classes:function(){return{"md-disabled":this.disabled,"md-active":this.active}},expandClasses:function(){return{"md-transition-off":this.transitionOff}},expandStyles:function(){return{"margin-bottom":this.height}}},methods:{resetSiblings:function(){var t=this;this.parentList.$children.forEach((function(e){e.$el!==t.$el&&e.$el.classList.contains("md-list-item-expand")&&(e.active=!1)}))},calculatePadding:function(){var t=this;window.requestAnimationFrame((function(){t.height=-t.$el.scrollHeight+"px",window.setTimeout((function(){t.transitionOff=!1}))}))},toggleExpandList:function(){this.mdExpandMultiple||this.resetSiblings(),this.calculatePadding(),this.active=!this.active},recalculateAfterChange:function(){this.transitionOff=!0,this.calculatePadding()},observeChildChanges:function(){this.contentObserver=new MutationObserver(this.recalculateAfterChange),this.contentObserver.observe(this.$refs.expand,{childList:!0,characterData:!0,subtree:!0})}},mounted:function(){var t=this;this.$nextTick((function(){t.parentList=(0,r.default)(t.$parent,"md-list"),t.calculatePadding(),t.observeChildChanges(),window.addEventListener("resize",t.recalculateAfterChange)}))},beforeDestroy:function(){this.contentObserver&&this.contentObserver.disconnect(),window.removeEventListener("resize",this.recalculateAfterChange)}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"md-list-item",props:{href:String,target:String,disabled:Boolean},computed:{classes:function(){return{"md-disabled":this.disabled}}}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"md-list-item",props:{disabled:Boolean},computed:{classes:function(){return{"md-disabled":this.disabled}}}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(39),r=i(o),a=n(129),s=i(a);e.default={props:{mdSize:{type:[Number,String],default:0},mdDirection:{type:String,default:"bottom right"},mdAlignTrigger:{type:Boolean,default:!1},mdOffsetX:{type:[Number,String],default:0},mdOffsetY:{type:[Number,String],default:0},mdCloseOnSelect:{type:Boolean,default:!0}},data:function(){return{active:!1}},watch:{mdSize:function(t,e){t>=1&&t<=7&&(this.removeLastSizeMenuContentClass(e),this.addNewSizeMenuContentClass(t))},mdDirection:function(t,e){this.removeLastDirectionMenuContentClass(e),this.addNewDirectionMenuContentClass(t)},mdAlignTrigger:function(t){this.handleAlignTriggerClass(t)}},methods:{validateMenu:function(){if(!this.menuContent)throw this.$destroy(),new Error("You must have a md-menu-content inside your menu.");if(!this.menuTrigger)throw this.$destroy(),new Error("You must have an element with a md-menu-trigger attribute inside your menu.")},removeLastSizeMenuContentClass:function(t){this.menuContent.classList.remove("md-size-"+t)},removeLastDirectionMenuContentClass:function(t){this.menuContent.classList.remove("md-direction-"+t.replace(/ /g,"-"))},addNewSizeMenuContentClass:function(t){this.menuContent.classList.add("md-size-"+t)},addNewDirectionMenuContentClass:function(t){this.menuContent.classList.add("md-direction-"+t.replace(/ /g,"-"))},handleAlignTriggerClass:function(t){t&&this.menuContent.classList.add("md-align-trigger")},getPosition:function(t,e){var n=this.menuTrigger.getBoundingClientRect(),i="top"===t?n.top+n.height-this.menuContent.offsetHeight:n.top,o="left"===e?n.left-this.menuContent.offsetWidth+n.width:n.left;return i+=parseInt(this.mdOffsetY,10),o+=parseInt(this.mdOffsetX,10),this.mdAlignTrigger&&("top"===t?i-=n.height+11:i+=n.height+11),{top:i,left:o}},calculateMenuContentPos:function(){var t=void 0;t=this.mdDirection?this.getPosition.apply(this,this.mdDirection.trim().split(" ")):this.getPosition("bottom","right"),t=(0,s.default)(this.menuContent,t),this.menuContent.style.top=t.top+window.pageYOffset+"px",this.menuContent.style.left=t.left+window.pageXOffset+"px"},recalculateOnResize:function(){window.requestAnimationFrame(this.calculateMenuContentPos)},open:function(){document.body.contains(this.menuContent)&&document.body.removeChild(this.menuContent),document.body.appendChild(this.menuContent),document.body.appendChild(this.backdropElement),window.addEventListener("resize",this.recalculateOnResize),this.calculateMenuContentPos(),getComputedStyle(this.menuContent).top,this.menuContent.classList.add("md-active"),this.menuContent.focus(),this.active=!0,this.$emit("open")},close:function t(){var e=this,t=function t(n){if(e.menuContent&&n.target===e.menuContent){var i=e.menuContent.querySelector(".md-ripple.md-active");e.menuContent.removeEventListener(r.default,t),e.menuTrigger.focus(),e.active=!1,i&&i.classList.remove("md-active"),document.body.removeChild(e.menuContent),document.body.removeChild(e.backdropElement),window.removeEventListener("resize",e.recalculateOnResize)}};this.menuContent.addEventListener(r.default,t),this.menuContent.classList.remove("md-active"),this.$emit("close")},toggle:function(){this.active?this.close():this.open()}},mounted:function(){var t=this;this.$nextTick((function(){t.menuTrigger=t.$el.querySelector("[md-menu-trigger]"),t.menuContent=t.$el.querySelector(".md-menu-content"),t.backdropElement=t.$refs.backdrop.$el,t.validateMenu(),t.handleAlignTriggerClass(t.mdAlignTrigger),t.addNewSizeMenuContentClass(t.mdSize),t.addNewDirectionMenuContentClass(t.mdDirection),t.$el.removeChild(t.$refs.backdrop.$el),t.menuContent.parentNode.removeChild(t.menuContent),t.menuTrigger.addEventListener("click",t.toggle)}))},beforeDestroy:function(){document.body.contains(this.menuContent)&&(document.body.removeChild(this.menuContent),document.body.removeChild(this.backdropElement)),this.menuTrigger.removeEventListener("click",this.toggle),window.removeEventListener("resize",this.recalculateOnResize)}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={data:function(){return{oldHighlight:!1,highlighted:!1,itemsAmount:0}},methods:{close:function(){this.highlighted=!1,this.$parent.close()},highlightItem:function(t){this.oldHighlight=this.highlighted,"up"===t&&(1===this.highlighted?this.highlighted=this.itemsAmount:this.highlighted--),"down"===t&&(this.highlighted===this.itemsAmount?this.highlighted=1:this.highlighted++)},fireClick:function(){this.highlighted>0&&this.$children[0].$children[this.highlighted-1].$el.click()}},mounted:function(){if(!this.$parent.$el.classList.contains("md-menu"))throw this.$destroy(),new Error("You must wrap the md-menu-content in a md-menu")}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),r=i(o);n(199),e.default={props:{href:String,target:String,disabled:Boolean},data:function(){return{parentContent:{},index:0}},computed:{classes:function(){return{"md-highlighted":this.highlighted}},highlighted:function(){return this.index===this.parentContent.highlighted&&(this.disabled&&(this.parentContent.oldHighlight>this.parentContent.highlighted?this.parentContent.highlighted--:this.parentContent.highlighted++),1===this.index?this.parentContent.$el.scrollTop=0:this.index===this.parentContent.itemsAmount?this.parentContent.$el.scrollTop=this.parentContent.$el.scrollHeight:this.$el.scrollIntoViewIfNeeded(!1),!0)}},methods:{close:function(t){this.disabled||(this.parentMenu.mdCloseOnSelect&&this.parentContent.close(),this.$emit("selected",t))}},mounted:function(){if(this.parentContent=(0,r.default)(this.$parent,"md-menu-content"),this.parentMenu=(0,r.default)(this.$parent,"md-menu"),!this.parentContent)throw this.$destroy(),new Error("You must wrap the md-menu-item in a md-menu-content");this.parentContent.itemsAmount++,this.index=this.parentContent.itemsAmount}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={props:{mdIndeterminate:Boolean,mdProgress:{type:Number,default:0}},mixins:[r.default],computed:{classes:function(){return{"md-indeterminate":this.mdIndeterminate}},styles:function(){if(!this.mdIndeterminate)return{width:this.mdProgress+"%"}}}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={props:{name:String,id:String,value:[String,Boolean,Number],mdValue:{type:[String,Boolean,Number],required:!0},disabled:Boolean},mixins:[r.default],computed:{classes:function(){return{"md-checked":"undefined"!=typeof this.value&&this.mdValue.toString()===this.value.toString(),"md-disabled":this.disabled}}},methods:{toggleCheck:function(t){this.disabled||(this.$emit("change",this.mdValue,t),this.$emit("input",this.mdValue,t))}}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),r=i(o);e.default={props:{value:[String,Boolean,Number]},data:function(){return{parentSelect:{},check:!1,index:0}},computed:{isSelected:function(){if(this.value&&this.parentSelect.value){var t=this.value.toString();return this.parentSelect.multiple?this.parentSelect.value.indexOf(t)>=0:this.value&&this.parentSelect.value&&t===this.parentSelect.value.toString()}return!1},classes:function(){return{"md-selected":this.isSelected,"md-checked":this.check}}},methods:{isMultiple:function(){return this.parentSelect.multiple},setParentOption:function(){this.isMultiple()?this.check=!this.check:this.parentSelect.selectOption(this.value,this.$refs.item.textContent)},selectOption:function(t){this.setParentOption(),this.$emit("selected",t)}},watch:{isSelected:function(t){this.isMultiple()&&(this.check=t)},check:function(t){t?this.parentSelect.selectMultiple(this.index,this.value,this.$refs.item.textContent):this.parentSelect.selectMultiple(this.index)}},mounted:function(){if(this.parentSelect=(0,r.default)(this.$parent,"md-select"),this.parentContent=(0,r.default)(this.$parent,"md-menu-content"),!this.parentSelect)throw new Error("You must wrap the md-option in a md-select");this.parentSelect.optionsAmount++,this.index=this.parentSelect.optionsAmount,this.parentSelect.multipleOptions[this.index]={},this.parentSelect.options[this.index]=this,(this.isMultiple()&&this.parentSelect.value.indexOf(this.value)>=0||this.parentSelect.value===this.value)&&this.setParentOption()},beforeDestroy:function(){this.parentSelect&&(delete this.parentSelect.options[this.index],delete this.parentSelect.multipleOptions[this.index])}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(61),r=i(o),a=n(40),s=i(a),d=n(1),l=i(d),c=n(12),u=i(c),m=n(59),f=i(m);e.default={props:{name:String,id:String,required:Boolean,multiple:Boolean,value:[String,Number,Array],disabled:Boolean,placeholder:String,mdMenuClass:String},mixins:[l.default],data:function(){return{selectedValue:null,selectedText:null,multipleOptions:{},options:{},optionsAmount:0}},computed:{classes:function(){return{"md-disabled":this.disabled}},contentClasses:function(){return this.multiple?"md-multiple "+this.mdMenuClass:this.mdMenuClass}},watch:{value:function(t){this.setTextAndValue(t)},disabled:function(){this.setParentDisabled()},required:function(){this.setParentRequired()},placeholder:function(){this.setParentPlaceholder()}},methods:{setParentDisabled:function(){this.parentContainer.isDisabled=this.disabled},setParentRequired:function(){this.parentContainer.isRequired=this.required},setParentPlaceholder:function(){this.parentContainer.hasPlaceholder=!!this.placeholder},getSingleValue:function(t){var e=this,n={};return(0,s.default)(this.options).forEach((function(i){var o=e.options[i];o.value===t&&(n.value=t,n.text=o.$refs.item.textContent)})),n},getMultipleValue:function(t){var e=this;if((0,f.default)(this.value)){var n=(function(){var n=[];return t.forEach((function(t){(0,s.default)(e.options).forEach((function(i){var o=e.options[i];if(o.value===t){var r=o.$refs.item.textContent;e.multipleOptions[i]={value:t,text:r},n.push(r)}}))})),{v:{value:t,text:n.join(", ")}}})();if("object"===("undefined"==typeof n?"undefined":(0,r.default)(n)))return n.v}return{}},setTextAndValue:function(t){var e=this.multiple?this.getMultipleValue(t):this.getSingleValue(t);this.selectedValue=e.value,this.selectedText=e.text,this.parentContainer&&this.parentContainer.setValue(this.selectedText)},changeValue:function(t){this.$emit("input",t),this.$emit("change",t),this.$emit("selected",t)},selectMultiple:function(t,e,n){var i=[];this.multipleOptions[t]={value:e,text:n};for(var o in this.multipleOptions)this.multipleOptions.hasOwnProperty(o)&&this.multipleOptions[o].value&&i.push(this.multipleOptions[o].value);this.changeValue(i)},selectOption:function(t,e){this.selectedText=e,this.setTextAndValue(t),this.changeValue(t)}},mounted:function(){this.parentContainer=(0,u.default)(this.$parent,"md-input-container"),this.parentContainer&&(this.setParentDisabled(),this.setParentRequired(),this.setParentPlaceholder(),this.parentContainer.hasSelect=!0),this.setTextAndValue(this.value)},beforeDestroy:function(){this.parentContainer&&(this.parentContainer.setValue(""),this.parentContainer.hasSelect=!1)}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={data:function(){return{mdVisible:!1}},mixins:[r.default],props:{mdSwipeable:Boolean,mdSwipeThreshold:{type:Number,default:15},mdSwipeDistance:{type:Number,default:100}},computed:{classes:function(){return this.mdVisible&&"md-active"}},methods:{show:function(){this.open()},open:function(){this.mdVisible=!0,this.$el.focus(),this.$emit("open")},close:function(){this.mdVisible=!1,this.$el.blur(),this.$emit("close")},toggle:function(){this.mdVisible?this.close():this.open()},isHorizontallyInside:function(t){return t>0&&t<this.mountedRect.left+this.mountedRect.width},isVerticallyInside:function(t){return t>0&&t<this.mountedRect.top+this.mountedRect.height},isFromStartWhenClosed:function(t){return!!this.mdVisible||t<this.mdSwipeThreshold},handleTouchStart:function(t){var e=t.touches[0].clientX-this.mountedRect.left,n=t.touches[0].clientY-this.mountedRect.top;this.isHorizontallyInside(e)&&this.isVerticallyInside(n)&&this.isFromStartWhenClosed(e)&&(this.initialTouchPosition=e,this.canMove=!0)},handleTouchEnd:function(){this.canMove=!1,this.initialTouchPosition=null},handleTouchMove:function(t){if(this.canMove){var e=t.touches[0].clientX,n=this.mdVisible?this.initialTouchPosition-e:e-this.initialTouchPosition,i=this.mdVisible?"close":"open";n>this.mdSwipeDistance&&this[i]()}}},mounted:function(){this.mdSwipeable&&(this.mountedRect=this.$refs.backdrop.$el.getBoundingClientRect(),this.initialTouchPosition=null,this.canMove=!1,document.addEventListener("touchstart",this.handleTouchStart),document.addEventListener("touchend",this.handleTouchEnd),document.addEventListener("touchmove",this.handleTouchMove))},beforeDestroy:function(){this.mdSwipeable&&(document.removeEventListener("touchstart",this.handleTouchStart),document.removeEventListener("touchend",this.handleTouchEnd),document.removeEventListener("touchmove",this.handleTouchMove))}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(48),r=i(o),a=n(39),s=i(a),d=n(1),l=i(d),c=n(124),u=i(c);e.default={props:{id:[String,Number],mdPosition:{type:String,default:"bottom center"},mdDuration:{type:[String,Number],default:4e3}},mixins:[l.default],data:function(){return{snackbarId:this.id||"snackbar-"+(0,r.default)(),active:!1,rootElement:{},snackbarElement:{},directionClass:null,closeTimeout:null}},computed:{classes:function(){var t={"md-active":this.active};return this.directionClass=this.mdPosition.replace(/ /g,"-"),t["md-position-"+this.directionClass]=!0,t}},watch:{active:function(t){var e="md-has-toast-"+this.directionClass,n="md-has-toast";t?(document.body.classList.add(e),document.body.classList.add(n)):(document.body.classList.remove(e),document.body.classList.remove(n))}},methods:{removeElement:function(){if(document.body.contains(this.snackbarElement)){var t=this.snackbarElement.querySelector(".md-ripple.md-active");t&&t.classList.remove("md-active"),document.body.removeChild(this.snackbarElement)}},open:function(){u.default.current&&u.default.current.close(),u.default.current=this,document.body.appendChild(this.snackbarElement),window.getComputedStyle(this.$refs.container).backgroundColor,this.active=!0,this.$emit("open"),this.closeTimeout=window.setTimeout(this.close,this.mdDuration),this.timeoutStartedAt=Date.now()},close:function(){var t=this;this.$refs.container&&!(function(){var e=function e(){t.$refs.container.removeEventListener(s.default,e),t.removeElement()};u.default.current=null,t.active=!1,t.$emit("close"),t.$refs.container.removeEventListener(s.default,e),t.$refs.container.addEventListener(s.default,e),window.clearTimeout(t.closeTimeout),t.pendingDuration=t.mdDuration})()},pauseTimeout:function(){this.pendingDuration=this.pendingDuration-(Date.now()-this.timeoutStartedAt),this.timeoutStartedAt=0,window.clearTimeout(this.closeTimeout)},resumeTimeout:function(){this.timeoutStartedAt=Date.now(),this.closeTimeout=window.setTimeout(this.close,this.pendingDuration)}},mounted:function(){var t=this;this.$nextTick((function(){t.snackbarElement=t.$el,t.snackbarElement.parentNode.removeChild(t.snackbarElement),t.timeoutStartedAt=0,t.pendingDuration=t.mdDuration}))},beforeDestroy:function(){window.clearTimeout(this.closeTimeout),this.removeElement()}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={props:{mdOpen:{type:String,default:"click"},mdMode:{type:String,default:"fling"},mdDirection:{type:String,default:"top"}},mixins:[r.default],data:function(){return{fabTrigger:null,active:!1}},computed:{classes:function t(){var t={"md-active":this.active};return t["md-mode-"+this.mdMode]=!0,t["md-direction-"+this.mdDirection]=!0,t}},methods:{closeSpeedDial:function(t){!t.target!==this.fabTrigger&&this.fabTrigger.contains(t.target)||(this.active=!1,document.body.removeEventListener("click",this.closeSpeedDial))},toggleSpeedDial:function(){var t=this;this.active=!this.active,window.setTimeout((function(){document.body.addEventListener("click",t.closeSpeedDial)}),50)}},mounted:function(){var t=this;this.$nextTick((function(){t.fabTrigger=t.$el.querySelector("[md-fab-trigger]"),"click"===t.mdOpen?t.fabTrigger.addEventListener("click",t.toggleSpeedDial):(t.$el.addEventListener("mouseenter",t.toggleSpeedDial),t.$el.addEventListener("mouseleave",t.toggleSpeedDial))}))},beforeDestroy:function(){this.fabTrigger.removeEventListener("click",this.toggleSpeedDial),document.body.removeEventListener("click",this.closeSpeedDial)}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={props:{mdSize:{type:Number,default:50},mdStroke:{type:Number,default:3.5},mdIndeterminate:Boolean,mdProgress:{type:Number,default:0}},mixins:[r.default],computed:{classes:function(){return{"md-indeterminate":this.mdIndeterminate}},styles:function(){var t=this.mdSize+"px";return{width:t,height:t}},dashProgress:function(){var t=125*this.mdProgress/100;return!this.mdIndeterminate&&(t>=125&&(t=130),t+", 200")}}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={mixins:[r.default]},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o),a=75,s="-1px";e.default={props:{name:String,value:Boolean,id:String,disabled:Boolean,type:{type:String,default:"button"}},mixins:[r.default],data:function(){return{leftPos:s,checked:this.value}},computed:{classes:function(){return{"md-checked":Boolean(this.value),"md-disabled":this.disabled}},styles:function(){return{transform:"translate3D("+this.leftPos+", -50%, 0)"}}},watch:{checked:function(){this.setPosition()},value:function(t){this.changeState(t)}},methods:{setPosition:function(){this.leftPos=this.checked?a+"%":s},changeState:function(t,e){"undefined"!=typeof e?(this.$emit("change",e),e.defaultPrevented||(this.checked=t),this.$emit("input",this.checked,e)):this.checked=t},toggle:function(t){this.disabled||this.changeState(!this.checked,t)}},mounted:function(){this.$nextTick(this.setPosition)}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(40),r=i(o),a=n(1),s=i(a),d=n(12),l=i(d);e.default={props:{mdSortType:String,mdSort:String},mixins:[s.default],data:function(){return{sortType:this.mdSortType,sortBy:this.mdSort,hasRowSelection:!1,data:[],numberOfRows:0,numberOfSelected:0,selectedRows:{}}},methods:{emitSort:function(t){this.sortBy=t,this.$emit("sort",{name:t,type:this.sortType})},emitSelection:function(){this.$emit("select",this.selectedRows)}},watch:{data:function(){this.numberOfRows=this.data.length},selectedRows:function(){this.numberOfSelected=(0,r.default)(this.selectedRows).length}},mounted:function(){this.parentCard=(0,l.default)(this.$parent,"md-table-card"),this.parentCard&&(this.parentCard.tableInstance=this)}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o),a=n(12),s=i(a);e.default={props:{mdSelectedLabel:{type:String,default:"selected"}},mixins:[r.default],data:function(){return{classes:{},tableInstance:{}}},mounted:function(){var t=this;this.parentCard=(0,s.default)(this.$parent,"md-table-card"),this.$nextTick((function(){t.tableInstance=t.parentCard.tableInstance,t.$watch("tableInstance.numberOfSelected",(function(){t.$refs.counter.textContent=t.tableInstance.numberOfSelected,t.classes={"md-active":t.tableInstance.numberOfSelected>0}}))}))}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={mixins:[r.default]},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{mdNumeric:Boolean},data:function(){return{hasAction:!1}},computed:{classes:function(){return{"md-numeric":this.mdNumeric,"md-has-action":this.hasAction}}},mounted:function(){this.$children.length>0&&(this.hasAction=!0)}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{value:[String,Number],mdLarge:Boolean,mdId:String,mdName:String,mdPlaceholder:String,mdMaxlength:[Number,String]},data:function(){return{active:!1}},computed:{triggerClasses:function(){return{"md-edited":this.value}},dialogClasses:function(){return{"md-active":this.active,"md-large":this.mdLarge}},realValue:function(){console.log(this.value)}},methods:{openDialog:function(){this.active=!0,this.$refs.input.$el.focus(),document.addEventListener("click",this.closeDialogOnOffClick)},closeDialog:function(){this.active&&(this.active=!1,this.$refs.input.$el.blur(),document.removeEventListener("click",this.closeDialogOnOffClick))},closeDialogOnOffClick:function(t){this.$refs.dialog.contains(t.target)||this.closeDialog()},confirmDialog:function(){var t=this.$refs.input.$el.value;this.closeDialog(),this.$emit("input",t),this.$emit("edited",t)}}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),r=i(o);e.default={props:{mdNumeric:Boolean,mdSortBy:String,mdTooltip:String},data:function(){return{sortType:null,sorted:!1,parentTable:{}}},computed:{classes:function(){var t=this.hasMatchSort();return t||(this.sorted=!1),{"md-numeric":this.mdNumeric,"md-sortable":this.mdSortBy,"md-sorted":t&&this.sorted,"md-sorted-descending":t&&"desc"===this.sortType}}},methods:{hasMatchSort:function(){return this.parentTable.sortBy===this.mdSortBy},changeSort:function(){this.mdSortBy&&("asc"===this.sortType&&this.sorted?this.sortType="desc":this.sortType="asc",this.sorted=!0,this.parentTable.sortType=this.sortType,this.parentTable.emitSort(this.mdSortBy))}},mounted:function(){this.parentTable=(0,r.default)(this.$parent,"md-table"),this.hasMatchSort()&&(this.sorted=!0,this.sortType=this.parentTable.sortType)}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(191),r=i(o);e.default={props:{mdSize:{type:[Number,String],default:10},mdPageOptions:[Array,Boolean],mdPage:{type:[Number,String],default:1},mdTotal:{type:[Number,String],default:"Many"},mdLabel:{type:String,default:"Rows per page"},mdSeparator:{type:String,default:"of"}},data:function(){return{subTotal:0,currentSize:parseInt(this.mdSize,10),currentPage:parseInt(this.mdPage,10),totalItems:isNaN(this.mdTotal)?r.default:parseInt(this.mdTotal,10)}},computed:{lastPage:function(){return!1}},methods:{emitPaginationEvent:function(){if(this.canFireEvents){var t=this.currentPage*this.currentSize;this.subTotal=t>this.mdTotal?this.mdTotal:t,this.$emit("pagination",{size:this.currentSize,page:this.currentPage})}},changeSize:function(){this.canFireEvents&&(this.$emit("size",this.currentSize),this.emitPaginationEvent())},previousPage:function(){this.canFireEvents&&(this.currentPage--,this.$emit("page",this.currentPage),this.emitPaginationEvent())},nextPage:function(){this.canFireEvents&&(this.currentPage++,this.$emit("page",this.currentPage),this.emitPaginationEvent())}},mounted:function(){var t=this;this.$nextTick((function(){
  743. t.subTotal=t.currentPage*t.currentSize,t.mdPageOptions=t.mdPageOptions||[10,25,50,100],t.currentSize=t.mdPageOptions[0],t.canFireEvents=!0}))}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),r=i(o),a="md-transition-off";e.default={props:{mdAutoSelect:Boolean,mdSelection:Boolean,mdItem:Object},data:function(){return{parentTable:{},headRow:!1,checkbox:!1,index:0}},computed:{isDisabled:function(){return!this.mdSelection&&!this.headRow},hasSelection:function(){return this.mdSelection||this.headRow&&this.parentTable.hasRowSelection},classes:function(){return{"md-selected":this.checkbox}}},watch:{mdItem:function(t,e){this.parentTable.data[this.index]=this.mdItem,this.handleMultipleSelection(t===e)}},methods:{setSelectedRow:function(t,e){t?(this.parentTable.selectedRows[e]=this.parentTable.data[e],++this.parentTable.numberOfSelected):(delete this.parentTable.selectedRows[e],--this.parentTable.numberOfSelected)},handleSingleSelection:function(t){this.setSelectedRow(t,this.index-1),this.parentTable.$children[0].checkbox=this.parentTable.numberOfSelected===this.parentTable.numberOfRows},handleMultipleSelection:function(t){var e=this;this.parentTable.numberOfRows>25&&this.parentTable.$el.classList.add(a),this.parentTable.$children.forEach((function(n,i){n.checkbox=t,n.headRow||e.setSelectedRow(t,i-1)})),t?this.parentTable.numberOfSelected=this.parentTable.numberOfRows:this.parentTable.numberOfSelected=0,window.setTimeout((function(){return e.parentTable.$el.classList.remove(a)}))},select:function(t){this.hasSelection&&(this.headRow?this.handleMultipleSelection(t):this.handleSingleSelection(t),this.parentTable.emitSelection())},autoSelect:function(){this.mdAutoSelect&&this.hasSelection&&(this.checkbox=!this.checkbox,this.handleSingleSelection(this.checkbox),this.parentTable.emitSelection())}},mounted:function(){this.parentTable=(0,r.default)(this.$parent,"md-table"),"thead"===this.$el.parentNode.tagName.toLowerCase()?this.headRow=!0:(this.parentTable.numberOfRows++,this.index=this.parentTable.numberOfRows,this.mdSelection&&(this.parentTable.hasRowSelection=!0),this.mdItem&&this.parentTable.data.push(this.mdItem))}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(48),r=i(o),a=n(12),s=i(a);e.default={props:{id:[String,Number],mdLabel:[String,Number],mdIcon:String,mdActive:Boolean,mdDisabled:Boolean,mdTooltip:String,mdTooltipDelay:{type:String,default:"0"},mdTooltipDirection:{type:String,default:"bottom"}},data:function(){return{mounted:!1,tabId:this.id||"tab-"+(0,r.default)(),width:"0px",left:"0px"}},watch:{mdActive:function(){this.updateTabData()},mdDisabled:function(){this.updateTabData()},mdIcon:function(){this.updateTabData()},mdLabel:function(){this.updateTabData()},mdTooltip:function(){this.updateTabData()},mdTooltipDelay:function(){this.updateTabData()},mdTooltipDirection:function(){this.updateTabData()}},computed:{styles:function(){return{width:this.width,left:this.left}}},methods:{getTabData:function(){return{id:this.tabId,label:this.mdLabel,icon:this.mdIcon,active:this.mdActive,disabled:this.mdDisabled,tooltip:this.mdTooltip,tooltipDelay:this.mdTooltipDelay,tooltipDirection:this.mdTooltipDirection,ref:this}},updateTabData:function(){this.parentTabs.updateTab(this.getTabData())}},mounted:function(){var t=this.getTabData();if(this.parentTabs=(0,s.default)(this.$parent,"md-tabs"),!this.parentTabs)throw new Error("You must wrap the md-tab in a md-tabs");this.mounted=!0,this.parentTabs.updateTab(t),this.mdActive&&this.parentTabs.setActiveTab(t)},beforeDestroy:function(){this.parentTabs.unregisterTab(this.getTabData())}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(40),r=i(o),a=n(1),s=i(a),d=n(130),l=i(d);e.default={props:{mdFixed:Boolean,mdCentered:Boolean,mdRight:Boolean,mdDynamicHeight:{type:Boolean,default:!0},mdElevation:{type:[String,Number],default:0}},mixins:[s.default],data:function(){return{tabList:{},activeTab:null,activeTabNumber:0,hasIcons:!1,hasLabel:!1,transitionControl:null,transitionOff:!1,contentHeight:"0px",contentWidth:"0px"}},computed:{tabClasses:function(){return{"md-dynamic-height":this.mdDynamicHeight,"md-transition-off":this.transitionOff}},navigationClasses:function(){return{"md-has-icon":this.hasIcons,"md-has-label":this.hasLabel,"md-fixed":this.mdFixed,"md-right":!this.mdCentered&&this.mdRight,"md-centered":this.mdCentered||this.mdFixed}},indicatorClasses:function(){var t=this.lastIndicatorNumber>this.activeTabNumber;return this.lastIndicatorNumber=this.activeTabNumber,{"md-transition-off":this.transitionOff,"md-to-right":!t,"md-to-left":t}}},methods:{getHeaderClass:function(t){return{"md-active":this.activeTab===t.id,"md-disabled":t.disabled}},registerTab:function(t){this.tabList[t.id]=t},unregisterTab:function(t){delete this.tabList[t.id]},updateTab:function(t){if(this.registerTab(t),t.active)if(t.disabled){if((0,r.default)(this.tabList).length){var e=(0,r.default)(this.tabList),n=e.indexOf(t.id)+1,i=e[n];i?this.setActiveTab(this.tabList[i]):this.setActiveTab(this.tabList[0])}}else this.setActiveTab(t)},observeElementChanges:function(){this.parentObserver=new MutationObserver((0,l.default)(this.calculateOnWatch,50)),this.parentObserver.observe(this.$refs.tabContent,{childList:!0,attributes:!0,subtree:!0})},getTabIndex:function(t){var e=(0,r.default)(this.tabList);return e.indexOf(t)},calculateIndicatorPos:function(){if(this.$refs.tabHeader&&this.$refs.tabHeader[this.activeTabNumber]){var t=this.$el.offsetWidth,e=this.$refs.tabHeader[this.activeTabNumber],n=e.offsetLeft,i=t-n-e.offsetWidth;this.$refs.indicator.style.left=n+"px",this.$refs.indicator.style.right=i+"px"}},calculateTabsWidthAndPosition:function(){var t=this.$el.offsetWidth,e=0;this.contentWidth=t*this.activeTabNumber+"px";for(var n in this.tabList){var i=this.tabList[n];i.ref.width=t+"px",i.ref.left=t*e+"px",e++}},calculateContentHeight:function(){var t=this;this.$nextTick((function(){if((0,r.default)(t.tabList).length){var e=t.tabList[t.activeTab].ref.$el.offsetHeight;t.contentHeight=e+"px"}}))},calculatePosition:function(){var t=this;window.requestAnimationFrame((function(){t.calculateIndicatorPos(),t.calculateTabsWidthAndPosition(),t.calculateContentHeight()}))},debounceTransition:function(){var t=this;window.clearTimeout(this.transitionControl),this.transitionControl=window.setTimeout((function(){t.calculatePosition(),t.transitionOff=!1}),200)},calculateOnWatch:function(){this.calculatePosition(),this.debounceTransition()},calculateOnResize:function(){this.transitionOff=!0,this.calculateOnWatch()},setActiveTab:function(t){this.hasIcons=!!t.icon,this.hasLabel=!!t.label,this.activeTab=t.id,this.activeTabNumber=this.getTabIndex(this.activeTab),this.calculatePosition(),this.$emit("change",this.activeTabNumber)}},mounted:function(){var t=this;this.$nextTick((function(){if(t.observeElementChanges(),window.addEventListener("resize",t.calculateOnResize),(0,r.default)(t.tabList).length&&!t.activeTab){var e=(0,r.default)(t.tabList)[0];t.setActiveTab(t.tabList[e])}}))},beforeDestroy:function(){this.parentObserver&&this.parentObserver.disconnect(),window.removeEventListener("resize",this.calculateOnResize)}},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o);e.default={mixins:[r.default]},t.exports=e.default}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(60),r=i(o),a=n(39),s=i(a);e.default={props:{mdDirection:{type:String,default:"bottom"},mdDelay:{type:String,default:"0"}},data:function(){return{active:!1,parentClass:null,transitionOff:!1,topPosition:!1,leftPosition:!1}},computed:{classes:function(){var t={"md-active":this.active,"md-transition-off":this.transitionOff,"md-tooltip-top":"top"===this.mdDirection,"md-tooltip-right":"right"===this.mdDirection,"md-tooltip-bottom":"bottom"===this.mdDirection,"md-tooltip-left":"left"===this.mdDirection};return this.parentClass&&(t[this.parentClass]=!0),t},style:function(){return{"transition-delay":this.mdDelay+"ms",top:this.topPosition+"px",left:this.leftPosition+"px"}}},watch:{mdDirection:function(){this.calculateTooltipPosition()}},methods:{removeTooltips:function(){this.tooltipElement.parentNode&&(this.tooltipElement.removeEventListener(s.default,this.removeTooltips),this.tooltipElement.parentNode.removeChild(this.tooltipElement))},calculateTooltipPosition:function(){var t=this.parentElement.getBoundingClientRect(),e={};switch(this.mdDirection){case"top":e.top=t.top-this.$el.offsetHeight,e.left=t.left+t.width/2;break;case"right":e.top=t.top,e.left=t.left+t.width;break;case"bottom":e.top=t.bottom,e.left=t.left+t.width/2;break;case"left":e.top=t.top,e.left=t.left-this.$el.offsetWidth;break;default:console.warn("Invalid "+this.mdDirection+" option to md-direction option")}this.topPosition=e.top,this.leftPosition=e.left},generateTooltipClasses:function(){var t=[];[].concat((0,r.default)(this.parentElement.classList)).forEach((function(e){e.indexOf("md-")>=0&&"md-active"!==e&&t.push(e+"-tooltip")})),this.parentClass=t.join(" ")},open:function(){var t=this;this.removeTooltips(),this.$nextTick((function(){document.body.appendChild(t.tooltipElement),getComputedStyle(t.tooltipElement).top,t.transitionOff=!0,t.generateTooltipClasses(),t.calculateTooltipPosition(),window.setTimeout((function(){t.transitionOff=!1,t.active=!0}),10)}))},close:function(){this.active=!1,this.tooltipElement.removeEventListener(s.default,this.removeTooltips),this.tooltipElement.addEventListener(s.default,this.removeTooltips)}},mounted:function(){var t=this;this.$nextTick((function(){t.tooltipElement=t.$el,t.parentElement=t.tooltipElement.parentNode,t.$el.parentNode.removeChild(t.$el),t.parentElement.addEventListener("mouseenter",t.open),t.parentElement.addEventListener("focus",t.open),t.parentElement.addEventListener("mouseleave",t.close),t.parentElement.addEventListener("blur",t.close)}))},beforeDestroy:function(){this.active=!1,this.removeTooltips(),this.parentElement&&(this.parentElement.removeEventListener("mouseenter",this.open),this.parentElement.removeEventListener("focus",this.open),this.parentElement.removeEventListener("mouseleave",this.close),this.parentElement.removeEventListener("blur",this.close))}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{mdElevation:{type:[String,Number],default:1},mdTag:{type:String,default:"div"}},computed:{classes:function(){var t=parseInt(this.mdElevation,10),e="md-whiteframe-";return isNaN(t)||"number"!=typeof t?this.mdElevation.indexOf("dp")>-1&&(e+=this.mdElevation):(e+=t,e+="dp"),e}},render:function(t){return t(this.mdTag,{staticClass:"md-whiteframe",class:this.classes},this.$slots.default)}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="ontouchstart"in document,o=function(t){return"start"===t?i?"touchstart":"mousedown":i?"touchend":"mouseup"},r=function(t,e,n){t.addEventListener(o(e),n)},a=function(t,e,n){t.removeEventListener(o(e),n)};e.default={props:{mdDisabled:Boolean},data:function(){return{mounted:!1,rippleElement:null,parentElement:null,parentDimensions:{width:null,height:null,top:null,left:null},awaitingComplete:!1,hasCompleted:!1,fadeOut:!1,active:!1}},computed:{classes:function(){return{"md-fadeout":this.fadeOut,"md-active":this.active}},styles:function(){return{width:this.parentDimensions.width,height:this.parentDimensions.height,top:this.parentDimensions.top,left:this.parentDimensions.left}},disabled:function(){return this.mdDisabled||!this.$material.inkRipple}},watch:{disabled:function(t){t?this.destroy():this.init()}},methods:{checkAvailablePositions:function(t){var e=["relative","absolute","fixed"];return e.indexOf(getComputedStyle(t).position)>-1},getClosestPositionedParent:function(t){var e=t&&t.parentNode;return!(!e||"body"===e.tagName.toLowerCase())&&(this.checkAvailablePositions(t)?t:this.getClosestPositionedParent(e))},getParentSize:function(){var t=this.parentElement;return Math.round(Math.max(t.offsetWidth,t.offsetHeight))+"px"},getClickPosition:function(t){if(this.$refs.ripple){var e=this.parentElement.getBoundingClientRect(),n=t.pageY,i=t.pageX;return"touchstart"===t.type&&(n=t.changedTouches[0].pageY,i=t.changedTouches[0].pageX),{top:n-e.top-this.$refs.ripple.offsetHeight/2-document.body.scrollTop+"px",left:i-e.left-this.$refs.ripple.offsetWidth/2-document.body.scrollLeft+"px"}}return!1},setDimensions:function(){var t=this.getParentSize();this.parentDimensions.width=t,this.parentDimensions.height=t},setPositions:function(t){var e=this.getClickPosition(t);e&&(this.parentDimensions.top=e.top,this.parentDimensions.left=e.left)},clearState:function(){this.active=!1,this.fadeOut=!1,this.hasCompleted=!1,this.setDimensions(),window.clearTimeout(this.awaitingComplete),a(document.body,"end",this.endRipple)},startRipple:function(t){var e=this;this.clearState(),this.awaitingComplete=window.setTimeout((function(){e.hasCompleted=!0}),400),r(document.body,"end",this.endRipple),this.$nextTick((function(){e.setPositions(t),e.active=!0}))},endRipple:function(){var t=this;this.hasCompleted?this.fadeOut=!0:this.awaitingComplete=window.setTimeout((function(){t.fadeOut=!0}),200),a(document.body,"end",this.endRipple)},registerTriggerEvent:function(){r(this.parentElement,"start",this.startRipple)},unregisterTriggerEvent:function(){this.parentElement&&a(this.parentElement,"start",this.startRipple)},init:function(){this.rippleElement=this.$el,this.parentElement=this.getClosestPositionedParent(this.$el.parentNode),this.parentElement?(this.rippleElement.parentNode.removeChild(this.rippleElement),this.parentElement.appendChild(this.rippleElement),this.registerTriggerEvent(),this.setDimensions()):this.$destroy()},destroy:function(){this.rippleElement&&this.rippleElement.parentNode&&(this.unregisterTriggerEvent(),this.rippleElement.parentNode.removeChild(this.rippleElement))}},mounted:function(){var t=this;window.setTimeout((function(){t.disabled?t.destroy():t.init(),t.$nextTick((function(){t.mounted=!0}))}),100)},beforeDestroy:function(){this.destroy()}},t.exports=e.default}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{mdTag:String,mdName:{type:String,default:"default"}},data:function(){return{name:"md-theme"}},render:function(t){return this.mdTag||this.$slots.default.length>1?t(this.mdTag||"div",{staticClass:"md-theme"},this.$slots.default):this.$slots.default[0]}},t.exports=e.default}),(function(t,e,n){t.exports={default:n(194),__esModule:!0}}),(function(t,e,n){t.exports={default:n(195),__esModule:!0}}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(192),r=i(o);e.default=r.default||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}}),(function(t,e,n){n(197),t.exports=9007199254740991}),(function(t,e,n){n(198),t.exports=n(5).Object.assign}),(function(t,e,n){"use strict";var i=n(16),o=n(46),r=n(38),a=n(23),s=n(32),d=Object.assign;t.exports=!d||n(9)((function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!=d({},t)[n]||Object.keys(d({},e)).join("")!=i}))?function(t,e){for(var n=a(t),d=arguments.length,l=1,c=o.f,u=r.f;d>l;)for(var m,f=s(arguments[l++]),p=c?i(f).concat(c(f)):i(f),h=p.length,b=0;h>b;)u.call(f,m=p[b++])&&(n[m]=f[m]);return n}:d}),(function(t,e,n){var i=n(18);i(i.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})}),(function(t,e,n){var i=n(18);i(i.S+i.F,"Object",{assign:n(196)})}),(function(t,e){Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(t){t=0===arguments.length||!!t;var e=this.parentNode,n=window.getComputedStyle(e,null),i=parseInt(n.getPropertyValue("border-top-width")),o=parseInt(n.getPropertyValue("border-left-width")),r=this.offsetTop-e.offsetTop<e.scrollTop,a=this.offsetTop-e.offsetTop+this.clientHeight-i>e.scrollTop+e.clientHeight,s=this.offsetLeft-e.offsetLeft<e.scrollLeft,d=this.offsetLeft-e.offsetLeft+this.clientWidth-o>e.scrollLeft+e.clientWidth,l=r&&!a;(r||a)&&t&&(e.scrollTop=this.offsetTop-e.offsetTop-e.clientHeight/2-i+this.clientHeight/2),(s||d)&&t&&(e.scrollLeft=this.offsetLeft-e.offsetLeft-e.clientWidth/2-o+this.clientWidth/2),(r||a||s||d)&&!t&&this.scrollIntoView(l)})}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){}),(function(t,e){t.exports=".THEME_NAME.md-avatar.md-primary.md-avatar-icon{background-color:PRIMARY-COLOR}.THEME_NAME.md-avatar.md-primary.md-avatar-icon .md-icon{color:PRIMARY-CONTRAST-0.99999}.THEME_NAME.md-avatar.md-accent.md-avatar-icon{background-color:ACCENT-COLOR}.THEME_NAME.md-avatar.md-accent.md-avatar-icon .md-icon{color:ACCENT-CONTRAST-0.99999}.THEME_NAME.md-avatar.md-warn.md-avatar-icon{background-color:WARN-COLOR}.THEME_NAME.md-avatar.md-warn.md-avatar-icon .md-icon{color:WARN-CONTRAST-0.99999}\n"}),(function(t,e){t.exports=".THEME_NAME.md-bottom-bar.md-fixed{background-color:BACKGROUND-COLOR}.THEME_NAME.md-bottom-bar.md-fixed .md-bottom-bar-item{color:BACKGROUND-CONTRAST-0.54}.THEME_NAME.md-bottom-bar.md-fixed .md-bottom-bar-item:hover:not([disabled]):not(.md-active){color:BACKGROUND-CONTRAST-0.87}.THEME_NAME.md-bottom-bar.md-fixed .md-bottom-bar-item.md-active{color:PRIMARY-COLOR}.THEME_NAME.md-bottom-bar.md-fixed.md-accent .md-bottom-bar-item.md-active{color:ACCENT-COLOR}.THEME_NAME.md-bottom-bar.md-fixed.md-warn .md-bottom-bar-item.md-active{color:WARN-COLOR}.THEME_NAME.md-bottom-bar.md-fixed.md-transparent .md-bottom-bar-item.md-active{color:BACKGROUND-CONTRAST}.THEME_NAME.md-bottom-bar.md-shift{background-color:PRIMARY-COLOR;color:PRIMARY-CONTRAST}.THEME_NAME.md-bottom-bar.md-shift .md-bottom-bar-item{color:PRIMARY-CONTRAST-0.54}.THEME_NAME.md-bottom-bar.md-shift .md-bottom-bar-item:hover:not([disabled]):not(.md-active){color:PRIMARY-CONTRAST-0.87}.THEME_NAME.md-bottom-bar.md-shift .md-bottom-bar-item.md-active{color:PRIMARY-CONTRAST}.THEME_NAME.md-bottom-bar.md-shift.md-accent{background-color:ACCENT-COLOR}.THEME_NAME.md-bottom-bar.md-shift.md-accent .md-bottom-bar-item{color:ACCENT-CONTRAST-0.54}.THEME_NAME.md-bottom-bar.md-shift.md-accent .md-bottom-bar-item:hover:not([disabled]):not(.md-active){color:ACCENT-CONTRAST-0.87}.THEME_NAME.md-bottom-bar.md-shift.md-accent .md-bottom-bar-item.md-active{color:ACCENT-CONTRAST}.THEME_NAME.md-bottom-bar.md-shift.md-warn{background-color:WARN-COLOR}.THEME_NAME.md-bottom-bar.md-shift.md-warn .md-bottom-bar-item{color:WARN-CONTRAST-0.54}.THEME_NAME.md-bottom-bar.md-shift.md-warn .md-bottom-bar-item:hover:not([disabled]):not(.md-active){color:WARN-CONTRAST-0.87}.THEME_NAME.md-bottom-bar.md-shift.md-warn .md-bottom-bar-item.md-active{color:WARN-CONTRAST}.THEME_NAME.md-bottom-bar.md-shift.md-transparent{background-color:transparent}.THEME_NAME.md-bottom-bar.md-shift.md-transparent .md-bottom-bar-item{color:BACKGROUND-CONTRAST-0.54}.THEME_NAME.md-bottom-bar.md-shift.md-transparent .md-bottom-bar-item:hover:not([disabled]):not(.md-active){color:BACKGROUND-CONTRAST-0.87}.THEME_NAME.md-bottom-bar.md-shift.md-transparent .md-bottom-bar-item.md-active{color:BACKGROUND-CONTRAST}\n"}),(function(t,e){t.exports=".THEME_NAME.md-button:not([disabled]).md-raised:not(.md-icon-button){color:BACKGROUND-CONTRAST;background-color:BACKGROUND-COLOR}.THEME_NAME.md-button:not([disabled]).md-raised:not(.md-icon-button):hover{background-color:BACKGROUND-COLOR-200}.THEME_NAME.md-button:not([disabled]).md-raised.md-icon-button:not(.md-raised){color:BACKGROUND-CONTRAST}.THEME_NAME.md-button:not([disabled]).md-fab{color:ACCENT-CONTRAST;background-color:ACCENT-COLOR}.THEME_NAME.md-button:not([disabled]).md-fab:hover{background-color:ACCENT-COLOR-600}.THEME_NAME.md-button:not([disabled]).md-fab.md-clean{color:BACKGROUND-CONTRAST;background-color:BACKGROUND-COLOR}.THEME_NAME.md-button:not([disabled]).md-fab.md-clean:hover{background-color:BACKGROUND-COLOR-200}.THEME_NAME.md-button:not([disabled]).md-primary:not(.md-icon-button){color:PRIMARY-COLOR}.THEME_NAME.md-button:not([disabled]).md-primary.md-raised,.THEME_NAME.md-button:not([disabled]).md-primary.md-fab{background-color:PRIMARY-COLOR;color:PRIMARY-CONTRAST}.THEME_NAME.md-button:not([disabled]).md-primary.md-raised:hover,.THEME_NAME.md-button:not([disabled]).md-primary.md-fab:hover{background-color:PRIMARY-COLOR-600}.THEME_NAME.md-button:not([disabled]).md-primary.md-icon-button:not(.md-raised){color:PRIMARY-COLOR}.THEME_NAME.md-button:not([disabled]).md-accent:not(.md-icon-button){color:ACCENT-COLOR}.THEME_NAME.md-button:not([disabled]).md-accent.md-raised{background-color:ACCENT-COLOR;color:ACCENT-CONTRAST}.THEME_NAME.md-button:not([disabled]).md-accent.md-raised:hover{background-color:ACCENT-COLOR-600}.THEME_NAME.md-button:not([disabled]).md-accent.md-icon-button:not(.md-raised){color:ACCENT-COLOR}.THEME_NAME.md-button:not([disabled]).md-warn:not(.md-icon-button){color:WARN-COLOR}.THEME_NAME.md-button:not([disabled]).md-warn.md-raised,.THEME_NAME.md-button:not([disabled]).md-warn.md-fab{background-color:WARN-COLOR;color:WARN-CONTRAST}.THEME_NAME.md-button:not([disabled]).md-warn.md-raised:hover,.THEME_NAME.md-button:not([disabled]).md-warn.md-fab:hover{background-color:WARN-COLOR-600}.THEME_NAME.md-button:not([disabled]).md-warn.md-icon-button:not(.md-raised){color:WARN-COLOR}\n"}),(function(t,e){t.exports='.THEME_NAME.md-button-toggle .md-button:after{width:1px;position:absolute;top:0;bottom:0;left:0;content:" "}.THEME_NAME.md-button-toggle .md-toggle{color:BACKGROUND-CONTRAST-0.54;background-color:BACKGROUND-CONTRAST-0.26}.THEME_NAME.md-button-toggle .md-toggle:hover:not([disabled]){background-color:BACKGROUND-CONTRAST-0.38}.THEME_NAME.md-button-toggle .md-toggle+.md-toggle:after{background-color:BACKGROUND-CONTRAST-0.12}.THEME_NAME.md-button-toggle.md-primary .md-toggle{color:PRIMARY-CONTRAST;background-color:PRIMARY-COLOR}.THEME_NAME.md-button-toggle.md-primary .md-toggle:hover:not([disabled]){background-color:PRIMARY-COLOR}.THEME_NAME.md-button-toggle.md-primary .md-toggle+.md-toggle:after{background-color:PRIMARY-COLOR-600}.THEME_NAME.md-button-toggle.md-accent .md-toggle{color:ACCENT-CONTRAST;background-color:ACCENT-COLOR}.THEME_NAME.md-button-toggle.md-accent .md-toggle:hover:not([disabled]){background-color:ACCENT-COLOR}.THEME_NAME.md-button-toggle.md-accent .md-toggle+.md-toggle:after{background-color:ACCENT-COLOR-600}.THEME_NAME.md-button-toggle.md-warn .md-toggle{color:WARN-CONTRAST;background-color:WARN-COLOR}.THEME_NAME.md-button-toggle.md-warn .md-toggle:hover:not([disabled]){background-color:WARN-COLOR}.THEME_NAME.md-button-toggle.md-warn .md-toggle+.md-toggle:after{background-color:WARN-COLOR-600}.THEME_NAME.md-button-toggle [disabled]{color:rgba(0,0,0,0.26)}.THEME_NAME.md-button-toggle [disabled].md-toggle{color:BACKGROUND-CONTRAST-0.2;background-color:rgba(0,0,0,0.26)}\n'}),(function(t,e){t.exports=".THEME_NAME.md-card{background-color:BACKGROUND-COLOR}.THEME_NAME.md-card.md-primary{background-color:PRIMARY-COLOR;color:PRIMARY-CONTRAST}.THEME_NAME.md-card.md-primary .md-card-header .md-icon-button:not(.md-primary):not(.md-warn):not(.md-accent) .md-icon,.THEME_NAME.md-card.md-primary .md-card-actions .md-icon-button:not(.md-primary):not(.md-warn):not(.md-accent) .md-icon{color:PRIMARY-CONTRAST-0.87}.THEME_NAME.md-card.md-primary .md-input-container.md-input-focused input,.THEME_NAME.md-card.md-primary .md-input-container.md-input-focused textarea{color:PRIMARY-CONTRAST;text-shadow:0 0 0 PRIMARY-CONTRAST}.THEME_NAME.md-card.md-primary .md-input-container.md-input-focused label,.THEME_NAME.md-card.md-primary .md-input-container.md-input-focused .md-icon:not(.md-icon-delete){color:PRIMARY-CONTRAST}.THEME_NAME.md-card.md-primary .md-input-container:after{background-color:PRIMARY-CONTRAST}.THEME_NAME.md-card.md-primary .md-input-container input,.THEME_NAME.md-card.md-primary .md-input-container textarea{color:PRIMARY-CONTRAST;text-shadow:0 0 0 PRIMARY-CONTRAST}.THEME_NAME.md-card.md-primary .md-input-container input::-webkit-input-placeholder,.THEME_NAME.md-card.md-primary .md-input-container textarea::-webkit-input-placeholder{color:PRIMARY-CONTRAST-0.54}.THEME_NAME.md-card.md-primary .md-input-container label,.THEME_NAME.md-card.md-primary .md-input-container .md-icon:not(.md-icon-delete){color:PRIMARY-CONTRAST}.THEME_NAME.md-card.md-accent{background-color:ACCENT-COLOR;color:ACCENT-CONTRAST}.THEME_NAME.md-card.md-accent .md-card-header .md-icon-button:not(.md-primary):not(.md-warn):not(.md-accent) .md-icon,.THEME_NAME.md-card.md-accent .md-card-actions .md-icon-button:not(.md-primary):not(.md-warn):not(.md-accent) .md-icon{color:ACCENT-CONTRAST-0.87}.THEME_NAME.md-card.md-accent .md-input-container.md-input-focused input,.THEME_NAME.md-card.md-accent .md-input-container.md-input-focused textarea{color:ACCENT-CONTRAST;text-shadow:0 0 0 ACCENT-CONTRAST}.THEME_NAME.md-card.md-accent .md-input-container.md-input-focused label,.THEME_NAME.md-card.md-accent .md-input-container.md-input-focused .md-icon:not(.md-icon-delete){color:ACCENT-CONTRAST}.THEME_NAME.md-card.md-accent .md-input-container:after{background-color:ACCENT-CONTRAST}.THEME_NAME.md-card.md-accent .md-input-container input,.THEME_NAME.md-card.md-accent .md-input-container textarea{color:ACCENT-CONTRAST;text-shadow:0 0 0 ACCENT-CONTRAST}.THEME_NAME.md-card.md-accent .md-input-container input::-webkit-input-placeholder,.THEME_NAME.md-card.md-accent .md-input-container textarea::-webkit-input-placeholder{color:ACCENT-CONTRAST-0.54}.THEME_NAME.md-card.md-accent .md-input-container label,.THEME_NAME.md-card.md-accent .md-input-container .md-icon:not(.md-icon-delete){color:ACCENT-CONTRAST}.THEME_NAME.md-card.md-warn{background-color:WARN-COLOR;color:WARN-CONTRAST}.THEME_NAME.md-card.md-warn .md-card-header .md-icon-button:not(.md-primary):not(.md-warn):not(.md-accent) .md-icon,.THEME_NAME.md-card.md-warn .md-card-actions .md-icon-button:not(.md-primary):not(.md-warn):not(.md-accent) .md-icon{color:WARN-CONTRAST-0.87}.THEME_NAME.md-card.md-warn .md-input-container.md-input-focused input,.THEME_NAME.md-card.md-warn .md-input-container.md-input-focused textarea{color:WARN-CONTRAST;text-shadow:0 0 0 WARN-CONTRAST}.THEME_NAME.md-card.md-warn .md-input-container.md-input-focused label,.THEME_NAME.md-card.md-warn .md-input-container.md-input-focused .md-icon:not(.md-icon-delete){color:WARN-CONTRAST}.THEME_NAME.md-card.md-warn .md-input-container:after{background-color:WARN-CONTRAST}.THEME_NAME.md-card.md-warn .md-input-container input,.THEME_NAME.md-card.md-warn .md-input-container textarea{color:WARN-CONTRAST;text-shadow:0 0 0 WARN-CONTRAST}.THEME_NAME.md-card.md-warn .md-input-container input::-webkit-input-placeholder,.THEME_NAME.md-card.md-warn .md-input-container textarea::-webkit-input-placeholder{color:WARN-CONTRAST-0.54}.THEME_NAME.md-card.md-warn .md-input-container label,.THEME_NAME.md-card.md-warn .md-input-container .md-icon:not(.md-icon-delete){color:WARN-CONTRAST}.THEME_NAME.md-card .md-card-header .md-icon-button:not(.md-primary):not(.md-warn):not(.md-accent) .md-icon,.THEME_NAME.md-card .md-card-actions .md-icon-button:not(.md-primary):not(.md-warn):not(.md-accent) .md-icon{color:BACKGROUND-CONTRAST-0.54}.THEME_NAME.md-card>.md-card-area:after{background-color:BACKGROUND-CONTRAST-0.12}.THEME_NAME.md-card .md-card-media-cover.md-text-scrim .md-backdrop{background:linear-gradient(to bottom, BACKGROUND-CONTRAST-0.0 20%, BACKGROUND-CONTRAST-0.275 66%, BACKGROUND-CONTRAST-0.55 100%)}.THEME_NAME.md-card .md-card-media-cover.md-solid .md-card-area{background-color:BACKGROUND-CONTRAST-0.4}.THEME_NAME.md-card .md-card-expand .md-card-actions{background-color:BACKGROUND-COLOR}\n"}),(function(t,e){t.exports=".THEME_NAME.md-checkbox.md-checked .md-checkbox-container{background-color:ACCENT-COLOR;border-color:ACCENT-COLOR}.THEME_NAME.md-checkbox.md-checked .md-checkbox-container:after{border-color:ACCENT-CONTRAST}.THEME_NAME.md-checkbox .md-ink-ripple{color:ACCENT-COLOR}.THEME_NAME.md-checkbox .md-ripple{opacity:.26}.THEME_NAME.md-checkbox.md-primary.md-checked .md-checkbox-container{background-color:PRIMARY-COLOR;border-color:PRIMARY-COLOR}.THEME_NAME.md-checkbox.md-primary.md-checked .md-checkbox-container:after{border-color:PRIMARY-CONTRAST}.THEME_NAME.md-checkbox.md-primary .md-ink-ripple{color:PRIMARY-COLOR}.THEME_NAME.md-checkbox.md-warn.md-checked .md-checkbox-container{background-color:WARN-COLOR;border-color:WARN-COLOR}.THEME_NAME.md-checkbox.md-warn.md-checked .md-checkbox-container:after{border-color:WARN-CONTRAST}.THEME_NAME.md-checkbox.md-warn .md-ink-ripple{color:WARN-COLOR}.THEME_NAME.md-checkbox.md-disabled.md-checked .md-checkbox-container{background-color:rgba(0,0,0,0.26);border-color:transparent}.THEME_NAME.md-checkbox.md-disabled:not(.md-checked) .md-checkbox-container{border-color:rgba(0,0,0,0.26)}\n"}),(function(t,e){t.exports=".THEME_NAME.md-chip{background-color:BACKGROUND-CONTRAST-0.12}.THEME_NAME.md-chip.md-deletable:hover,.THEME_NAME.md-chip.md-deletable:focus{background-color:BACKGROUND-CONTRAST-0.54;color:BACKGROUND-COLOR}.THEME_NAME.md-chip.md-deletable:hover .md-delete,.THEME_NAME.md-chip.md-deletable:focus .md-delete{color:BACKGROUND-COLOR}.THEME_NAME.md-chip .md-delete{color:BACKGROUND-CONTRAST-0.38}.THEME_NAME.md-chip .md-delete .md-ripple{color:BACKGROUND-COLOR}\n"}),(function(t,e){t.exports=".THEME_NAME.md-dialog-container .md-dialog{background-color:BACKGROUND-COLOR;color:BACKGROUND-CONTRAST}\n"}),(function(t,e){t.exports=""}),(function(t,e){t.exports=".THEME_NAME.md-icon.md-primary{color:PRIMARY-COLOR}.THEME_NAME.md-icon.md-accent{color:ACCENT-COLOR}.THEME_NAME.md-icon.md-warn{color:WARN-COLOR}\n"}),(function(t,e){t.exports=""}),(function(t,e){t.exports=".THEME_NAME.md-input-container.md-input-invalid:after{background-color:WARN-COLOR}.THEME_NAME.md-input-container.md-input-invalid label,.THEME_NAME.md-input-container.md-input-invalid input,.THEME_NAME.md-input-container.md-input-invalid textarea,.THEME_NAME.md-input-container.md-input-invalid .md-error,.THEME_NAME.md-input-container.md-input-invalid .md-count,.THEME_NAME.md-input-container.md-input-invalid .md-icon:not(.md-icon-delete){color:WARN-COLOR}.THEME_NAME.md-input-container.md-input-focused.md-input-inline label{color:rgba(0,0,0,0.54)}.THEME_NAME.md-input-container.md-input-focused.md-input-required label:after{color:WARN-COLOR}.THEME_NAME.md-input-container.md-input-focused:after{height:2px;background-color:PRIMARY-COLOR}.THEME_NAME.md-input-container.md-input-focused input,.THEME_NAME.md-input-container.md-input-focused textarea{color:PRIMARY-COLOR;text-shadow:0 0 0 BACKGROUND-CONTRAST;-webkit-text-fill-color:transparent}.THEME_NAME.md-input-container.md-input-focused label,.THEME_NAME.md-input-container.md-input-focused .md-icon:not(.md-icon-delete){color:PRIMARY-COLOR}.THEME_NAME.md-input-container.md-input-disabled label,.THEME_NAME.md-input-container.md-input-disabled input,.THEME_NAME.md-input-container.md-input-disabled textarea,.THEME_NAME.md-input-container.md-input-disabled .md-error,.THEME_NAME.md-input-container.md-input-disabled .md-count,.THEME_NAME.md-input-container.md-input-disabled .md-icon:not(.md-icon-delete),.THEME_NAME.md-input-container.md-input-disabled ::-webkit-input-placeholder{color:BACKGROUND-CONTRAST-0.38}.THEME_NAME.md-input-container .md-icon:not(.md-icon-delete):after{background:BACKGROUND-COLOR}\n";
  744. }),(function(t,e){t.exports=".THEME_NAME.md-list{background-color:BACKGROUND-COLOR;color:BACKGROUND-CONTRAST}.THEME_NAME.md-list.md-transparent{background-color:transparent;color:inherit}.THEME_NAME.md-list .md-list-item .router-link-active.md-list-item-container{color:PRIMARY-COLOR}.THEME_NAME.md-list .md-list-item .router-link-active.md-list-item-container>.md-icon{color:PRIMARY-COLOR}.THEME_NAME.md-list .md-list-item.md-primary .md-list-item-container{color:PRIMARY-COLOR}.THEME_NAME.md-list .md-list-item.md-primary .md-list-item-container>.md-icon{color:PRIMARY-COLOR}.THEME_NAME.md-list .md-list-item.md-accent .md-list-item-container{color:ACCENT-COLOR}.THEME_NAME.md-list .md-list-item.md-accent .md-list-item-container>.md-icon{color:ACCENT-COLOR}.THEME_NAME.md-list .md-list-item.md-warn .md-list-item-container{color:WARN-COLOR}.THEME_NAME.md-list .md-list-item.md-warn .md-list-item-container>.md-icon{color:WARN-COLOR}.THEME_NAME.md-list .md-list-item-expand .md-list-item-container{background-color:BACKGROUND-COLOR}.THEME_NAME.md-list .md-list-item-expand .md-list-item-container:hover,.THEME_NAME.md-list .md-list-item-expand .md-list-item-container:focus{background-color:rgba(153,153,153,0.2)}\n"}),(function(t,e){t.exports=".THEME_NAME.md-menu-content .md-list{background-color:BACKGROUND-COLOR;color:BACKGROUND-CONTRAST}.THEME_NAME.md-menu-content .md-list .md-menu-item:hover .md-button:not([disabled]),.THEME_NAME.md-menu-content .md-list .md-menu-item:focus .md-button:not([disabled]),.THEME_NAME.md-menu-content .md-list .md-menu-item.md-highlighted .md-button:not([disabled]){background-color:BACKGROUND-CONTRAST-0.12}.THEME_NAME.md-menu-content .md-list .md-menu-item[disabled]{color:BACKGROUND-CONTRAST-0.38}\n"}),(function(t,e){t.exports=".THEME_NAME.md-progress{background-color:PRIMARY-COLOR-0.38}.THEME_NAME.md-progress:not(.md-indeterminate) .md-progress-track{background-color:PRIMARY-COLOR}.THEME_NAME.md-progress .md-progress-track:after,.THEME_NAME.md-progress .md-progress-track:before{background-color:PRIMARY-COLOR}.THEME_NAME.md-progress.md-accent{background-color:ACCENT-COLOR-0.38}.THEME_NAME.md-progress.md-accent:not(.md-indeterminate) .md-progress-track{background-color:ACCENT-COLOR}.THEME_NAME.md-progress.md-accent .md-progress-track:after,.THEME_NAME.md-progress.md-accent .md-progress-track:before{background-color:ACCENT-COLOR}.THEME_NAME.md-progress.md-warn{background-color:WARN-COLOR-0.38}.THEME_NAME.md-progress.md-warn:not(.md-indeterminate) .md-progress-track{background-color:WARN-COLOR}.THEME_NAME.md-progress.md-warn .md-progress-track:after,.THEME_NAME.md-progress.md-warn .md-progress-track:before{background-color:WARN-COLOR}\n"}),(function(t,e){t.exports=".THEME_NAME.md-radio .md-radio-container:after{background-color:ACCENT-COLOR}.THEME_NAME.md-radio.md-checked .md-radio-container{border-color:ACCENT-COLOR}.THEME_NAME.md-radio.md-checked .md-ink-ripple{color:ACCENT-COLOR}.THEME_NAME.md-radio.md-checked .md-ripple{opacity:.38}.THEME_NAME.md-radio.md-primary .md-radio-container:after{background-color:PRIMARY-COLOR}.THEME_NAME.md-radio.md-primary.md-checked .md-radio-container{border-color:PRIMARY-COLOR}.THEME_NAME.md-radio.md-primary.md-checked .md-ink-ripple{color:PRIMARY-COLOR}.THEME_NAME.md-radio.md-warn .md-radio-container:after{background-color:WARN-COLOR}.THEME_NAME.md-radio.md-warn.md-checked .md-radio-container{border-color:WARN-COLOR}.THEME_NAME.md-radio.md-warn.md-checked .md-ink-ripple{color:WARN-COLOR}.THEME_NAME.md-radio.md-disabled .md-radio-container{border-color:rgba(0,0,0,0.26)}.THEME_NAME.md-radio.md-disabled .md-radio-container:after{background-color:rgba(0,0,0,0.26)}.THEME_NAME.md-radio.md-disabled.md-checked .md-radio-container{border-color:rgba(0,0,0,0.26)}\n"}),(function(t,e){t.exports=".THEME_NAME.md-select:after{color:BACKGROUND-CONTRAST-0.54}.THEME_NAME.md-select:after{color:BACKGROUND-CONTRAST-0.38}.THEME_NAME.md-select-content .md-menu-item.md-selected,.THEME_NAME.md-select-content .md-menu-item.md-checked{color:PRIMARY-COLOR}\n"}),(function(t,e){t.exports=".THEME_NAME.md-sidenav .md-sidenav-content{background-color:BACKGROUND-COLOR;color:BACKGROUND-CONTRAST}\n"}),(function(t,e){t.exports=".THEME_NAME .md-snackbar .md-ink-ripple,.THEME_NAME.md-snackbar .md-ink-ripple{color:#fff}\n"}),(function(t,e){t.exports=""}),(function(t,e){t.exports=".THEME_NAME.md-spinner .md-spinner-path{stroke:PRIMARY-COLOR}.THEME_NAME.md-spinner.md-accent .md-spinner-path{stroke:ACCENT-COLOR}.THEME_NAME.md-spinner.md-warn .md-spinner-path{stroke:WARN-COLOR}\n"}),(function(t,e){t.exports=".THEME_NAME.md-subheader.md-primary{color:PRIMARY-COLOR}.THEME_NAME.md-subheader.md-accent{color:ACCENT-COLOR}.THEME_NAME.md-subheader.md-warn{color:WARN-COLOR}\n"}),(function(t,e){t.exports=".THEME_NAME.md-switch.md-checked .md-switch-container{background-color:ACCENT-COLOR-500-0.5}.THEME_NAME.md-switch.md-checked .md-switch-thumb{background-color:ACCENT-COLOR}.THEME_NAME.md-switch.md-checked .md-ink-ripple{color:ACCENT-COLOR}.THEME_NAME.md-switch.md-checked .md-ripple{opacity:.38}.THEME_NAME.md-switch.md-checked.md-primary .md-switch-container{background-color:PRIMARY-COLOR-500-0.5}.THEME_NAME.md-switch.md-checked.md-primary .md-switch-thumb{background-color:PRIMARY-COLOR}.THEME_NAME.md-switch.md-checked.md-primary .md-ink-ripple{color:PRIMARY-COLOR}.THEME_NAME.md-switch.md-checked.md-warn .md-switch-container{background-color:WARN-COLOR-500-0.5}.THEME_NAME.md-switch.md-checked.md-warn .md-switch-thumb{background-color:WARN-COLOR}.THEME_NAME.md-switch.md-checked.md-warn .md-ink-ripple{color:WARN-COLOR}.THEME_NAME.md-switch.md-disabled .md-switch-container,.THEME_NAME.md-switch.md-disabled.md-checked .md-switch-container{background-color:rgba(0,0,0,0.12)}.THEME_NAME.md-switch.md-disabled .md-switch-thumb,.THEME_NAME.md-switch.md-disabled.md-checked .md-switch-thumb{background-color:#bdbdbd}\n"}),(function(t,e){t.exports=".THEME_NAME.md-table-card .md-toolbar{background-color:BACKGROUND-COLOR;color:BACKGROUND-CONTRAST}.THEME_NAME.md-table-alternate-header{background-color:BACKGROUND-COLOR}.THEME_NAME.md-table-alternate-header .md-toolbar{background-color:ACCENT-COLOR-A100-0.2;color:ACCENT-CONTRAST-A100}.THEME_NAME.md-table-alternate-header .md-counter{color:ACCENT-COLOR}\n"}),(function(t,e){t.exports=".THEME_NAME.md-tabs>.md-tabs-navigation{background-color:PRIMARY-COLOR}.THEME_NAME.md-tabs>.md-tabs-navigation .md-tab-header{color:PRIMARY-CONTRAST-0.54}.THEME_NAME.md-tabs>.md-tabs-navigation .md-tab-header.md-active,.THEME_NAME.md-tabs>.md-tabs-navigation .md-tab-header:focus{color:PRIMARY-CONTRAST}.THEME_NAME.md-tabs>.md-tabs-navigation .md-tab-header.md-disabled{color:PRIMARY-CONTRAST-0.26}.THEME_NAME.md-tabs>.md-tabs-navigation .md-tab-indicator{background-color:ACCENT-COLOR}.THEME_NAME.md-tabs.md-transparent>.md-tabs-navigation{background-color:transparent;border-bottom:1px solid BACKGROUND-CONTRAST-0.12}.THEME_NAME.md-tabs.md-transparent>.md-tabs-navigation .md-tab-header{color:BACKGROUND-CONTRAST-0.54}.THEME_NAME.md-tabs.md-transparent>.md-tabs-navigation .md-tab-header.md-active,.THEME_NAME.md-tabs.md-transparent>.md-tabs-navigation .md-tab-header:focus{color:PRIMARY-COLOR}.THEME_NAME.md-tabs.md-transparent>.md-tabs-navigation .md-tab-header.md-disabled{color:BACKGROUND-CONTRAST-0.26}.THEME_NAME.md-tabs.md-transparent>.md-tabs-navigation .md-tab-indicator{background-color:PRIMARY-COLOR}.THEME_NAME.md-tabs.md-accent>.md-tabs-navigation{background-color:ACCENT-COLOR}.THEME_NAME.md-tabs.md-accent>.md-tabs-navigation .md-tab-header{color:ACCENT-CONTRAST-0.54}.THEME_NAME.md-tabs.md-accent>.md-tabs-navigation .md-tab-header.md-active,.THEME_NAME.md-tabs.md-accent>.md-tabs-navigation .md-tab-header:focus{color:ACCENT-CONTRAST}.THEME_NAME.md-tabs.md-accent>.md-tabs-navigation .md-tab-header.md-disabled{color:ACCENT-CONTRAST-0.26}.THEME_NAME.md-tabs.md-accent>.md-tabs-navigation .md-tab-indicator{background-color:BACKGROUND-COLOR}.THEME_NAME.md-tabs.md-warn>.md-tabs-navigation{background-color:WARN-COLOR}.THEME_NAME.md-tabs.md-warn>.md-tabs-navigation .md-tab-header{color:WARN-CONTRAST-0.54}.THEME_NAME.md-tabs.md-warn>.md-tabs-navigation .md-tab-header.md-active,.THEME_NAME.md-tabs.md-warn>.md-tabs-navigation .md-tab-header:focus{color:WARN-CONTRAST}.THEME_NAME.md-tabs.md-warn>.md-tabs-navigation .md-tab-header.md-disabled{color:WARN-CONTRAST-0.26}.THEME_NAME.md-tabs.md-warn>.md-tabs-navigation .md-tab-indicator{background-color:BACKGROUND-COLOR}\n"}),(function(t,e){t.exports=".THEME_NAME.md-toolbar{background-color:PRIMARY-COLOR;color:PRIMARY-CONTRAST}.THEME_NAME.md-toolbar .md-input-container.md-input-focused input,.THEME_NAME.md-toolbar .md-input-container.md-input-focused textarea{color:PRIMARY-CONTRAST;text-shadow:0 0 0 PRIMARY-CONTRAST}.THEME_NAME.md-toolbar .md-input-container.md-input-focused label,.THEME_NAME.md-toolbar .md-input-container.md-input-focused .md-icon:not(.md-icon-delete){color:PRIMARY-CONTRAST}.THEME_NAME.md-toolbar .md-input-container:after{background-color:PRIMARY-CONTRAST}.THEME_NAME.md-toolbar .md-input-container input,.THEME_NAME.md-toolbar .md-input-container textarea{color:PRIMARY-CONTRAST;text-shadow:0 0 0 PRIMARY-CONTRAST}.THEME_NAME.md-toolbar .md-input-container input::-webkit-input-placeholder,.THEME_NAME.md-toolbar .md-input-container textarea::-webkit-input-placeholder{color:PRIMARY-CONTRAST-0.54}.THEME_NAME.md-toolbar .md-input-container label,.THEME_NAME.md-toolbar .md-input-container .md-icon:not(.md-icon-delete){color:PRIMARY-CONTRAST}.THEME_NAME.md-toolbar.md-accent{background-color:ACCENT-COLOR;color:ACCENT-CONTRAST}.THEME_NAME.md-toolbar.md-accent .md-input-container.md-input-focused input,.THEME_NAME.md-toolbar.md-accent .md-input-container.md-input-focused textarea{color:ACCENT-CONTRAST;text-shadow:0 0 0 ACCENT-CONTRAST}.THEME_NAME.md-toolbar.md-accent .md-input-container.md-input-focused label,.THEME_NAME.md-toolbar.md-accent .md-input-container.md-input-focused .md-icon:not(.md-icon-delete){color:ACCENT-CONTRAST}.THEME_NAME.md-toolbar.md-accent .md-input-container:after{background-color:ACCENT-CONTRAST}.THEME_NAME.md-toolbar.md-accent .md-input-container input,.THEME_NAME.md-toolbar.md-accent .md-input-container textarea{color:ACCENT-CONTRAST;text-shadow:0 0 0 ACCENT-CONTRAST}.THEME_NAME.md-toolbar.md-accent .md-input-container input::-webkit-input-placeholder,.THEME_NAME.md-toolbar.md-accent .md-input-container textarea::-webkit-input-placeholder{color:ACCENT-CONTRAST-0.54}.THEME_NAME.md-toolbar.md-accent .md-input-container label,.THEME_NAME.md-toolbar.md-accent .md-input-container .md-icon:not(.md-icon-delete){color:ACCENT-CONTRAST}.THEME_NAME.md-toolbar.md-warn{background-color:WARN-COLOR;color:WARN-CONTRAST}.THEME_NAME.md-toolbar.md-warn .md-input-container.md-input-focused input,.THEME_NAME.md-toolbar.md-warn .md-input-container.md-input-focused textarea{color:WARN-CONTRAST;text-shadow:0 0 0 WARN-CONTRAST}.THEME_NAME.md-toolbar.md-warn .md-input-container.md-input-focused label,.THEME_NAME.md-toolbar.md-warn .md-input-container.md-input-focused .md-icon:not(.md-icon-delete){color:WARN-CONTRAST}.THEME_NAME.md-toolbar.md-warn .md-input-container:after{background-color:WARN-CONTRAST}.THEME_NAME.md-toolbar.md-warn .md-input-container input,.THEME_NAME.md-toolbar.md-warn .md-input-container textarea{color:WARN-CONTRAST;text-shadow:0 0 0 WARN-CONTRAST}.THEME_NAME.md-toolbar.md-warn .md-input-container input::-webkit-input-placeholder,.THEME_NAME.md-toolbar.md-warn .md-input-container textarea::-webkit-input-placeholder{color:WARN-CONTRAST-0.54}.THEME_NAME.md-toolbar.md-warn .md-input-container label,.THEME_NAME.md-toolbar.md-warn .md-input-container .md-icon:not(.md-icon-delete){color:WARN-CONTRAST}.THEME_NAME.md-toolbar.md-transparent{background-color:transparent;color:BACKGROUND-CONTRAST}.THEME_NAME.md-toolbar.md-transparent .md-input-container.md-input-focused input,.THEME_NAME.md-toolbar.md-transparent .md-input-container.md-input-focused textarea{color:BACKGROUND-CONTRAST;text-shadow:0 0 0 BACKGROUND-CONTRAST}.THEME_NAME.md-toolbar.md-transparent .md-input-container.md-input-focused label,.THEME_NAME.md-toolbar.md-transparent .md-input-container.md-input-focused .md-icon:not(.md-icon-delete){color:BACKGROUND-CONTRAST}.THEME_NAME.md-toolbar.md-transparent .md-input-container:after{background-color:BACKGROUND-CONTRAST}.THEME_NAME.md-toolbar.md-transparent .md-input-container input,.THEME_NAME.md-toolbar.md-transparent .md-input-container textarea{color:BACKGROUND-CONTRAST;text-shadow:0 0 0 BACKGROUND-CONTRAST}.THEME_NAME.md-toolbar.md-transparent .md-input-container input::-webkit-input-placeholder,.THEME_NAME.md-toolbar.md-transparent .md-input-container textarea::-webkit-input-placeholder{color:BACKGROUND-CONTRAST-0.54}.THEME_NAME.md-toolbar.md-transparent .md-input-container label,.THEME_NAME.md-toolbar.md-transparent .md-input-container .md-icon:not(.md-icon-delete){color:BACKGROUND-CONTRAST}\n"}),(function(t,e){t.exports=".THEME_NAME :not(input):not(textarea)::selection{background:ACCENT-COLOR;color:ACCENT-CONTRAST}.THEME_NAME a:not(.md-button){color:ACCENT-COLOR}.THEME_NAME a:not(.md-button):hover{color:ACCENT-COLOR-800}body.THEME_NAME{background-color:BACKGROUND-COLOR;color:BACKGROUND-CONTRAST-0.87}.THEME_NAME .md-caption,.THEME_NAME .md-display-1,.THEME_NAME .md-display-2,.THEME_NAME .md-display-3,.THEME_NAME .md-display-4{color:BACKGROUND-CONTRAST-0.57}.THEME_NAME code:not(.hljs){background-color:ACCENT-COLOR-A100-0.2;color:ACCENT-COLOR-800}\n"}),(function(t,e,n){n(215);var i=n(0)(n(131),n(364),null,null);t.exports=i.exports}),(function(t,e,n){n(232);var i=n(0)(n(132),n(393),null,null);t.exports=i.exports}),(function(t,e,n){n(205);var i=n(0)(n(133),n(343),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(134),n(345),null,null);t.exports=i.exports}),(function(t,e,n){n(223);var i=n(0)(n(135),n(381),null,null);t.exports=i.exports}),(function(t,e,n){n(202);var i=n(0)(n(136),n(335),null,null);t.exports=i.exports}),(function(t,e,n){n(206);var i=n(0)(n(137),n(346),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(null,n(356),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(138),n(341),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(null,n(380),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(139),n(334),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(null,n(373),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(140),n(368),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(141),n(339),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(null,n(330),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(142),n(337),null,null);t.exports=i.exports}),(function(t,e,n){n(225);var i=n(0)(n(143),n(386),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(144),n(352),null,null);t.exports=i.exports}),(function(t,e,n){n(219);var i=n(0)(n(145),n(369),null,null);t.exports=i.exports}),(function(t,e,n){n(210);var i=n(0)(n(146),n(355),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(null,n(385),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(null,n(359),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(null,n(353),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(147),n(370),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(148),n(392),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(149),n(351),null,null);t.exports=i.exports}),(function(t,e,n){n(220);var i=n(0)(null,n(371),null,null);t.exports=i.exports}),(function(t,e,n){n(217);var i=n(0)(n(150),n(366),null,null);t.exports=i.exports}),(function(t,e,n){n(207);var i=n(0)(n(151),n(348),null,null);t.exports=i.exports}),(function(t,e,n){n(229);var i=n(0)(n(152),n(389),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(153),n(347),null,null);t.exports=i.exports}),(function(t,e,n){n(208);var i=n(0)(n(154),n(349),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(155),n(376),null,null);t.exports=i.exports}),(function(t,e,n){n(227);var i=n(0)(n(156),null,null,null);t.exports=i.exports}),(function(t,e,n){n(211);var i=n(0)(n(157),n(357),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(null,n(394),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(158),n(338),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(159),n(363),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(160),n(344),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(161),n(361),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(162),n(354),null,null);t.exports=i.exports}),(function(t,e,n){n(231);var i=n(0)(n(163),n(391),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(164),n(384),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(165),n(342),null,null);t.exports=i.exports}),(function(t,e,n){n(209);var i=n(0)(n(166),n(350),null,null);t.exports=i.exports}),(function(t,e,n){n(201);var i=n(0)(n(167),n(332),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(168),n(374),null,null);t.exports=i.exports}),(function(t,e,n){n(226);var i=n(0)(n(169),n(387),null,null);t.exports=i.exports}),(function(t,e,n){n(218);var i=n(0)(n(170),n(367),null,null);t.exports=i.exports}),(function(t,e,n){n(230);var i=n(0)(n(171),n(390),null,null);t.exports=i.exports}),(function(t,e,n){n(216);var i=n(0)(n(172),n(365),null,null);t.exports=i.exports}),(function(t,e,n){n(204);var i=n(0)(n(173),n(340),null,null);t.exports=i.exports}),(function(t,e,n){n(222);var i=n(0)(n(174),n(379),null,null);t.exports=i.exports}),(function(t,e,n){n(224);var i=n(0)(n(175),n(383),null,null);t.exports=i.exports}),(function(t,e,n){n(203);var i=n(0)(n(176),n(336),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(177),n(375),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(178),n(331),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(179),n(372),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(180),n(378),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(181),n(382),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(182),n(333),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(183),n(362),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(184),n(329),null,null);t.exports=i.exports}),(function(t,e,n){n(212);var i=n(0)(n(185),n(358),null,null);t.exports=i.exports}),(function(t,e,n){n(213);var i=n(0)(n(186),n(360),null,null);t.exports=i.exports}),(function(t,e,n){n(228);var i=n(0)(n(187),n(388),null,null);t.exports=i.exports}),(function(t,e,n){n(214);var i=n(0)(n(188),null,null,null);t.exports=i.exports}),(function(t,e,n){n(221);var i=n(0)(n(189),n(377),null,null);t.exports=i.exports}),(function(t,e,n){var i=n(0)(n(190),null,null,null);t.exports=i.exports}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-tab",style:t.styles,attrs:{id:t.tabId}},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-card-media-actions"},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("md-card",{staticClass:"md-table-card",class:[t.themeClass]},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-radio",class:[t.themeClass,t.classes]},[n("div",{staticClass:"md-radio-container",on:{click:t.toggleCheck}},[n("input",{attrs:{type:"radio",name:t.name,id:t.id,disabled:t.disabled},domProps:{value:t.value}}),t._v(" "),n("md-ink-ripple",{attrs:{"md-disabled":t.disabled}})],1),t._v(" "),t.$slots.default?n("label",{staticClass:"md-radio-label",attrs:{for:t.id||t.name}},[t._t("default")],2):t._e()])},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-table-pagination"},[n("span",{staticClass:"md-table-pagination-label"},[t._v(t._s(t.mdLabel)+":")]),t._v(" "),t.mdPageOptions?n("md-select",{directives:[{name:"model",rawName:"v-model",value:t.currentSize,expression:"currentSize"}],attrs:{"md-menu-class":"md-pagination-select"},domProps:{value:t.currentSize},on:{change:t.changeSize,input:function(e){t.currentSize=e}}},t._l(t.mdPageOptions,(function(e){return n("md-option",{attrs:{value:e}},[t._v(t._s(e))])}))):t._e(),t._v(" "),n("span",[t._v(t._s((t.currentPage-1)*t.currentSize+1)+"-"+t._s(t.subTotal)+" "+t._s(t.mdSeparator)+" "+t._s(t.mdTotal))]),t._v(" "),n("md-button",{staticClass:"md-icon-button md-table-pagination-previous",attrs:{disabled:1===t.currentPage},nativeOn:{click:function(e){t.previousPage(e)}}},[n("md-icon",[t._v("keyboard_arrow_left")])],1),t._v(" "),n("md-button",{staticClass:"md-icon-button md-table-pagination-next",attrs:{disabled:t.currentSize*t.currentPage>=t.totalItems},nativeOn:{click:function(e){t.nextPage(e)}}},[n("md-icon",[t._v("keyboard_arrow_right")])],1)],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"expand",staticClass:"md-card-expand"},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-button-toggle",class:[t.themeClass]},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-table",class:[t.themeClass]},[n("table",[t._t("default")],2)])},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-card-media-cover",class:t.classes},[t._t("default"),t._v(" "),t.mdTextScrim?n("div",{ref:"backdrop",staticClass:"md-card-backdrop",style:t.styles}):t._e()],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{staticClass:"md-list-item",class:t.classes},[n("div",{staticClass:"md-list-item-container md-button"},[t._t("default")],2),t._v(" "),n("md-button",{staticClass:"md-button-ghost",attrs:{type:"button",disabled:t.disabled}})],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-card-media",class:t.classes},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"md-spinner",appear:""}},[n("div",{staticClass:"md-spinner",class:[t.themeClass,t.classes],style:t.styles},[n("svg",{staticClass:"md-spinner-draw",attrs:{viewBox:"25 25 50 50"}},[n("circle",{staticClass:"md-spinner-path",attrs:{cx:"50",cy:"50",r:"20","stroke-width":t.mdStroke,"stroke-dasharray":t.dashProgress}})])])])},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-card-area",class:t.classes},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("md-list-item",{staticClass:"md-menu-item",class:t.classes,attrs:{href:t.href,target:t.target,disabled:t.disabled},nativeOn:{click:function(e){t.close(e)}}},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-bottom-bar",class:[t.themeClass,t.classes]},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{staticClass:"md-list-item md-list-item-expand",class:t.classes},[n("div",{staticClass:"md-list-item-container md-button"},[t._t("default"),t._v(" "),n("md-icon",{staticClass:"md-list-expand-indicator"},[t._v("keyboard_arrow_down")])],2),t._v(" "),n("md-button",{staticClass:"md-button-ghost",attrs:{type:"button",disabled:t.disabled},nativeOn:{click:function(e){t.toggleExpandList(e)}}}),t._v(" "),n("div",{ref:"expand",staticClass:"md-list-expand",class:t.expandClasses,style:t.expandStyles},[t._t("expand")],2)],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.href?n("a",{staticClass:"md-bottom-bar-item",class:t.classes,attrs:{href:t.href,disabled:t.disabled},on:{click:t.setActive}},[t.mdIcon||t.mdIconSrc||t.mdIconset?n("md-icon",{attrs:{"md-icon-src":t.mdIconSrc,"md-iconset":t.mdIconset}},[t._v(t._s(t.mdIcon))]):t._e(),t._v(" "),n("md-ink-ripple",{attrs:{"md-disabled":t.disabled}}),t._v(" "),n("span",{staticClass:"md-text"},[t._t("default")],2)],1):n("button",{staticClass:"md-bottom-bar-item",class:t.classes,attrs:{type:"button",disabled:t.disabled},on:{click:t.setActive}},[t.mdIcon||t.mdIconSrc||t.mdIconset?n("md-icon",{attrs:{"md-src":t.mdIconSrc,"md-iconset":t.mdIconset}},[t._v(t._s(t.mdIcon))]):t._e(),t._v(" "),n("md-ink-ripple",{attrs:{"md-disabled":t.disabled}}),t._v(" "),n("span",{staticClass:"md-text"},[t._t("default")],2)],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-card",class:[t.themeClass,t.classes]},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("input",{staticClass:"md-input",attrs:{type:t.type,disabled:t.disabled,required:t.required,placeholder:t.placeholder,maxlength:t.maxlength},domProps:{value:t.value},on:{focus:t.onFocus,blur:t.onBlur,input:t.onInput,keydown:[function(e){t._k(e.keyCode,"up",38)||t.onInput(e)},function(e){t._k(e.keyCode,"down",40)||t.onInput(e)}]}})},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.svgContent?n("i",{staticClass:"md-icon",class:[t.themeClass],domProps:{innerHTML:t._s(t.svgContent)}}):t.imageSrc?n("md-image",{staticClass:"md-icon",class:[t.themeClass],attrs:{"md-src":t.imageSrc}}):n("i",{staticClass:"md-icon",class:[t.themeClass,t.mdIconset],attrs:{"aria-hidden":!!t.mdIconset}},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-input-container",class:[t.themeClass,t.classes]},[t._t("default"),t._v(" "),t.enableCounter?n("span",{staticClass:"md-count"},[t._v(t._s(t.inputLength)+" / "+t._s(t.counterLength))]):t._e(),t._v(" "),t.mdHasPassword?n("md-button",{staticClass:"md-icon-button md-toggle-password",nativeOn:{click:function(e){t.togglePasswordType(e)}}},[n("md-icon",[t._v(t._s(t.showPassword?"visibility_off":"visibility"))])],1):t._e()],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"md-progress",appear:""}},[n("div",{staticClass:"md-progress",class:[t.themeClass,t.classes]},[n("div",{staticClass:"md-progress-track",style:t.styles})])])},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("md-dialog",{ref:"dialog",staticClass:"md-dialog-prompt",on:{close:function(e){t.fireCloseEvent("cancel")}}},[t.mdTitle?n("md-dialog-title",[t._v(t._s(t.mdTitle))]):t._e(),t._v(" "),t.mdContentHtml?n("md-dialog-content",{domProps:{innerHTML:t._s(t.mdContentHtml)}}):t._e(),t._v(" "),t.mdContent?n("md-dialog-content",[t._v(t._s(t.mdContent))]):t._e(),t._v(" "),n("md-dialog-content",[n("md-input-container",[n("md-input",{ref:"input",attrs:{id:t.mdInputId,name:t.mdInputName,maxlength:t.mdInputMaxlength,placeholder:t.mdInputPlaceholder,value:t.value},nativeOn:{keydown:function(e){t._k(e.keyCode,"enter",13)||t.confirmValue(e)}}})],1)],1),t._v(" "),n("md-dialog-actions",[n("md-button",{staticClass:"md-primary",nativeOn:{click:function(e){t.close("cancel")}}},[t._v(t._s(t.mdCancelText))]),t._v(" "),n("md-button",{staticClass:"md-primary",nativeOn:{click:function(e){t.confirmValue(e)}}},[t._v(t._s(t.mdOkText))])],1)],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-chip",class:[t.themeClass,t.classes],attrs:{tabindex:"0"}},[t._t("default"),t._v(" "),t.mdDeletable?n("md-button",{staticClass:"md-icon-button md-dense md-delete",attrs:{tabindex:"-1"},nativeOn:{click:function(e){!t.disabled&&t.$emit("delete")},keyup:function(e){t._k(e.keyCode,"delete",[8,46])||!t.disabled&&t.$emit("delete")}}},[n("md-icon",{staticClass:"md-icon-delete"},[t._v("cancel")])],1):t._e()],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-dialog-title md-title"},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{staticClass:"md-list-item",class:t.classes,attrs:{disabled:t.disabled}},[t._t("default"),t._v(" "),n("md-ink-ripple",{attrs:{disabled:t.disabled}})],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-dialog-container",class:[t.themeClass,t.classes],attrs:{tabindex:"0"},on:{keyup:function(e){t._k(e.keyCode,"esc",27)||(e.stopPropagation(),t.closeOnEsc(e))}}},[n("div",{ref:"dialog",staticClass:"md-dialog",class:t.dialogClasses,style:t.styles},[t._t("default")],2),t._v(" "),t.mdBackdrop?n("md-backdrop",{ref:"backdrop",staticClass:"md-dialog-backdrop",class:t.classes,on:{close:function(e){t.mdClickOutsideToClose&&t.close()}}}):t._e()],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-card-actions"},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"md-list",class:[t.themeClass]},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-tabs",class:[t.themeClass,t.tabClasses]},[n("md-whiteframe",{ref:"tabNavigation",staticClass:"md-tabs-navigation",class:t.navigationClasses,attrs:{"md-tag":"nav","md-elevation":t.mdElevation}},[t._l(t.tabList,(function(e){return n("button",{key:e.id,ref:"tabHeader",refInFor:!0,staticClass:"md-tab-header",class:t.getHeaderClass(e),attrs:{type:"button",disabled:e.disabled},on:{click:function(n){t.setActiveTab(e)}}},[n("md-ink-ripple",{attrs:{"md-disabled":e.disabled}}),t._v(" "),n("div",{staticClass:"md-tab-header-container"},[e.icon?n("md-icon",[t._v(t._s(e.icon))]):t._e(),t._v(" "),e.label?n("span",[t._v(t._s(e.label))]):t._e(),t._v(" "),e.tooltip?n("md-tooltip",{attrs:{"md-direction":e.tooltipDirection,"md-delay":e.tooltipDelay}},[t._v(t._s(e.tooltip))]):t._e()],1)],1)})),t._v(" "),n("span",{ref:"indicator",staticClass:"md-tab-indicator",class:t.indicatorClasses})],2),t._v(" "),n("div",{ref:"tabContent",staticClass:"md-tabs-content",style:{height:t.contentHeight}},[n("div",{staticClass:"md-tabs-wrapper",style:{transform:"translate3D(-"+t.contentWidth+", 0, 0)"}},[t._t("default")],2)])],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-dialog-content"},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-toolbar",class:[t.themeClass]},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{staticClass:"md-list-item",
  745. class:t.classes},[n("a",{staticClass:"md-list-item-container md-button",attrs:{href:t.href,target:t.target,disabled:t.disabled}},[t._t("default")],2),t._v(" "),n("md-ink-ripple",{attrs:{disabled:t.disabled}})],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("tr",{staticClass:"md-table-row",class:t.classes,on:{click:t.autoSelect}},[t.hasSelection?n("md-table-cell",{staticClass:"md-table-selection"},[n("md-checkbox",{directives:[{name:"model",rawName:"v-model",value:t.checkbox,expression:"checkbox"}],attrs:{disabled:t.isDisabled},domProps:{value:t.checkbox},on:{change:t.select,input:function(e){t.checkbox=e}}})],1):t._e(),t._v(" "),t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{staticClass:"md-list-item"},[n("div",{staticClass:"md-list-item-container"},[t._t("default")],2)])},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-avatar",class:[t.themeClass]},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-speed-dial",class:[t.themeClass,t.classes]},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-file",on:{click:t.openPicker}},[n("md-input",{directives:[{name:"model",rawName:"v-model",value:t.filename,expression:"filename"}],ref:"textInput",attrs:{readonly:"",required:t.required,placeholder:t.placeholder,disabled:t.disabled},domProps:{value:t.filename},on:{input:function(e){t.filename=e}}}),t._v(" "),n("md-icon",[t._v("attach_file")]),t._v(" "),n("input",{ref:"fileInput",attrs:{type:"file",id:t.id,name:t.name,disabled:t.disabled,multiple:t.multiple,accept:t.accept},on:{change:t.onFileSelected}})],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-sidenav",class:[t.themeClass,t.classes],attrs:{tabindex:"0"},on:{keyup:function(e){t._k(e.keyCode,"esc",27)||t.close(e)}}},[n("div",{staticClass:"md-sidenav-content"},[t._t("default")],2),t._v(" "),n("md-backdrop",{ref:"backdrop",staticClass:"md-sidenav-backdrop",on:{close:t.close}})],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-card-header-text"},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-chips",class:[t.themeClass,t.classes]},[n("md-input-container",{nativeOn:{click:function(e){t.applyInputFocus(e)}}},[t._l(t.selectedChips,(function(e){return n("md-chip",{attrs:{"md-deletable":!t.mdStatic,disabled:t.disabled},on:{delete:function(n){t.deleteChip(e)}}},[t._t("default",null,{value:e})],2)})),t._v(" "),n("md-input",{directives:[{name:"show",rawName:"v-show",value:!t.mdStatic,expression:"!mdStatic"},{name:"model",rawName:"v-model",value:t.currentChip,expression:"currentChip"}],ref:"input",attrs:{type:t.mdInputType,placeholder:t.mdInputPlaceholder,id:t.inputId,name:t.mdInputName,disabled:t.disabled,tabindex:"0"},domProps:{value:t.currentChip},on:{input:function(e){t.currentChip=e}},nativeOn:{keydown:[function(e){t._k(e.keyCode,"delete",[8,46])||t.deleteLastChip(e)},function(e){t._k(e.keyCode,"enter",13)||(e.preventDefault(),t.addChip(e))},function(e){186===e.keyCode&&(e.preventDefault(),t.addChip(e))}]}})],2)],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("md-dialog",{ref:"dialog",staticClass:"md-dialog-alert",on:{close:function(e){t.fireCloseEvent()}}},[t.mdTitle?n("md-dialog-title",[t._v(t._s(t.mdTitle))]):t._e(),t._v(" "),t.mdContentHtml?n("md-dialog-content",{domProps:{innerHTML:t._s(t.mdContentHtml)}}):n("md-dialog-content",[t._v(t._s(t.mdContent))]),t._v(" "),n("md-dialog-actions",[n("md-button",{staticClass:"md-primary",nativeOn:{click:function(e){t.close()}}},[t._v(t._s(t.mdOkText))])],1)],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("hr",{staticClass:"md-divider"})},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("td",{staticClass:"md-table-cell",class:t.classes},[n("div",{staticClass:"md-table-cell-container"},[t._t("default")],2)])},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-card-header"},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("md-menu-item",{staticClass:"md-option",class:t.classes,attrs:{tabindex:"-1"},nativeOn:{click:function(e){t.selectOption(e)}}},[t.parentSelect.multiple?n("md-checkbox",{directives:[{name:"model",rawName:"v-model",value:t.check,expression:"check"}],staticClass:"md-primary",domProps:{value:t.check},on:{input:function(e){t.check=e}}},[n("span",{ref:"item"},[t._t("default")],2)]):n("span",{ref:"item"},[t._t("default")],2)],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-table-alternate-header",class:[t.themeClass,t.classes]},[n("md-toolbar",[n("div",{staticClass:"md-counter"},[n("span",{ref:"counter"},[t._v(t._s(t.tableInstance.numberOfSelected))]),t._v(" "),n("span",[t._v(t._s(t.mdSelectedLabel))])]),t._v(" "),t._t("default")],2)],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("textarea",{staticClass:"md-input",attrs:{disabled:t.disabled,required:t.required,placeholder:t.placeholder,maxlength:t.maxlength},domProps:{value:t.value},on:{focus:t.onFocus,blur:t.onBlur,input:t.onInput}})},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.mounted||!t.disabled?n("div",{staticClass:"md-ink-ripple"},[n("div",{ref:"ripple",staticClass:"md-ripple",class:t.classes,style:t.styles})]):t._e()},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-table-edit",on:{keydown:function(e){t._k(e.keyCode,"esc",27)||t.closeDialog(e)}}},[n("div",{staticClass:"md-table-edit-trigger",class:t.triggerClasses,on:{click:function(e){e.stopPropagation(),t.openDialog(e)}}},[t._v("\n "+t._s(t.value||t.mdPlaceholder)+"\n ")]),t._v(" "),n("div",{ref:"dialog",staticClass:"md-table-dialog",class:t.dialogClasses},[n("md-input-container",[n("md-input",{ref:"input",attrs:{id:t.mdId,name:t.mdName,maxlength:t.mdMaxlength,value:t.value,placeholder:t.mdPlaceholder},nativeOn:{keydown:function(e){t._k(e.keyCode,"enter",13)||t.confirmDialog(e)}}})],1)],1)])},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return"md-list"===t.$parent.$options._componentTag?n("li",{staticClass:"md-subheader",class:[t.themeClass]},[t._t("default")],2):n("div",{staticClass:"md-subheader",class:[t.themeClass]},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-card-content"},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.href?n("a",{staticClass:"md-button",class:[t.themeClass],attrs:{href:t.href,disabled:t.disabled,target:t.target,rel:t.newRel}},[n("md-ink-ripple",{attrs:{"md-disabled":t.disabled}}),t._v(" "),t._t("default")],2):n("button",{staticClass:"md-button",class:[t.themeClass],attrs:{type:t.type,disabled:t.disabled}},[n("md-ink-ripple",{attrs:{"md-disabled":t.disabled}}),t._v(" "),t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("th",{staticClass:"md-table-head",class:t.classes,on:{click:t.changeSort}},[n("div",{staticClass:"md-table-head-container"},[n("div",{staticClass:"md-table-head-text md-test"},[t.mdSortBy?n("md-icon",{staticClass:"md-sortable-icon"},[t._v("arrow_downward")]):t._e(),t._v(" "),t._t("default"),t._v(" "),t.mdTooltip?n("md-tooltip",[t._v(t._s(t.mdTooltip))]):t._e()],2),t._v(" "),n("md-ink-ripple",{attrs:{"md-disabled":!t.mdSortBy}})],1)])},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-switch",class:[t.themeClass,t.classes]},[n("div",{staticClass:"md-switch-container",on:{click:function(e){t.toggle(e)}}},[n("div",{staticClass:"md-switch-thumb",style:t.styles},[n("input",{attrs:{type:"checkbox",name:t.name,id:t.id,disabled:t.disabled},domProps:{value:t.value}}),t._v(" "),n("button",{staticClass:"md-switch-holder",attrs:{type:t.type}}),t._v(" "),n("md-ink-ripple",{attrs:{"md-disabled":t.disabled}})],1)]),t._v(" "),t.$slots.default?n("label",{staticClass:"md-switch-label",attrs:{for:t.id||t.name}},[t._t("default")],2):t._e()])},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-menu-content",attrs:{tabindex:"-1"},on:{keydown:[function(e){t._k(e.keyCode,"esc",27)||(e.preventDefault(),t.close(e))},function(e){t._k(e.keyCode,"tab",9)||(e.preventDefault(),t.close(e))},function(e){t._k(e.keyCode,"up",38)||(e.preventDefault(),t.highlightItem("up"))},function(e){t._k(e.keyCode,"down",40)||(e.preventDefault(),t.highlightItem("down"))},function(e){t._k(e.keyCode,"enter",13)||(e.preventDefault(),t.fireClick(e))},function(e){t._k(e.keyCode,"space",32)||(e.preventDefault(),t.fireClick(e))}]}},[n("md-list",[t._t("default")],2)],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-dialog-actions"},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-checkbox",class:[t.themeClass,t.classes]},[n("div",{staticClass:"md-checkbox-container",attrs:{tabindex:"0"},on:{click:function(e){e.stopPropagation(),t.toggleCheck(e)}}},[n("input",{attrs:{type:"checkbox",name:t.name,id:t.id,disabled:t.disabled,tabindex:"-1"},domProps:{value:t.value,checked:t.checked}}),t._v(" "),n("md-ink-ripple",{attrs:{"md-disabled":t.disabled}})],1),t._v(" "),t.$slots.default?n("label",{staticClass:"md-checkbox-label",attrs:{for:t.id||t.name}},[t._t("default")],2):t._e()])},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-select",class:[t.themeClass,t.classes]},[n("md-menu",{attrs:{"md-close-on-select":!t.multiple},on:{opened:function(e){t.$emit("open")},closed:function(e){t.$emit("close")}}},[n("span",{ref:"value",staticClass:"md-select-value",attrs:{"md-menu-trigger":""}},[t._v(t._s(t.selectedText||t.placeholder))]),t._v(" "),n("md-menu-content",{staticClass:"md-select-content",class:[t.themeClass,t.contentClasses]},[t._t("default")],2)],1),t._v(" "),n("select",{attrs:{name:t.name,id:t.id,required:t.required,disabled:t.disabled,tabindex:"-1"}},[t.multiple?t._e():n("option",{attrs:{selected:"true"},domProps:{value:t.selectedValue}},[t._v(t._s(t.selectedText))]),t._v(" "),t._l(t.multipleOptions,(function(e){return e.value?n("option",{attrs:{selected:"true"},domProps:{value:e.value}},[t._v(t._s(e.text))]):t._e()}))],2)],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"md-tooltip",class:t.classes,style:t.style},[t._t("default")],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("img",{staticClass:"md-image",class:t.classes,attrs:{src:t.mdSrc}})},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-snackbar",class:[t.themeClass,t.classes],attrs:{id:t.snackbarId},on:{mouseenter:t.pauseTimeout,mouseleave:t.resumeTimeout}},[n("div",{ref:"container",staticClass:"md-snackbar-container"},[n("div",{staticClass:"md-snackbar-content"},[t._t("default")],2)])])},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-menu"},[t._t("default"),t._v(" "),n("md-backdrop",{ref:"backdrop",staticClass:"md-menu-backdrop md-transparent md-active",on:{close:t.close}})],2)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("md-dialog",{ref:"dialog",staticClass:"md-dialog-confirm",on:{close:function(e){t.fireCloseEvent("cancel")}}},[t.mdTitle?n("md-dialog-title",[t._v(t._s(t.mdTitle))]):t._e(),t._v(" "),t.mdContentHtml?n("md-dialog-content",{domProps:{innerHTML:t._s(t.mdContentHtml)}}):n("md-dialog-content",[t._v(t._s(t.mdContent))]),t._v(" "),n("md-dialog-actions",[n("md-button",{staticClass:"md-primary",nativeOn:{click:function(e){t.close("cancel")}}},[t._v(t._s(t.mdCancelText))]),t._v(" "),n("md-button",{staticClass:"md-primary",nativeOn:{click:function(e){t.close("ok")}}},[t._v(t._s(t.mdOkText))])],1)],1)},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-backdrop",on:{click:t.close,keyup:function(e){t._k(e.keyCode,"esc",27)||t.close(e)}}})},staticRenderFns:[]}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"md-list-expand-container"},[t._t("default")],2)},staticRenderFns:[]}}),(function(e,n){e.exports=t}),(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(121),r=i(o),a=n(90),s=i(a),d=n(91),l=i(d),c=n(92),u=i(c),m=n(93),f=i(m),p=n(94),h=i(p),b=n(95),v=i(b),E=n(96),g=i(E),_=n(97),C=i(_),M=n(98),T=i(M),A=n(99),x=i(A),O=n(100),N=i(O),y=n(101),R=i(y),S=n(102),w=i(S),k=n(103),P=i(k),H=n(104),L=i(H),$=n(105),I=i($),D=n(106),B=i(D),j=n(107),F=i(j),W=n(108),Y=i(W),G=n(109),U=i(G),z=n(110),K=i(z),V=n(111),q=i(V),X=n(112),J=i(X),Q=n(113),Z=i(Q),tt=n(114),et=i(tt),nt=n(115),it=i(nt),ot=n(116),rt=i(ot),at=n(117),st=i(at),dt=n(118),lt=i(dt),ct=n(119),ut=i(ct),mt=n(120),ft=i(mt),pt={MdCore:r.default,MdAvatar:s.default,MdBackdrop:l.default,MdBottomBar:u.default,MdButton:f.default,MdButtonToggle:h.default,MdCard:v.default,MdCheckbox:g.default,MdChips:C.default,MdDialog:T.default,MdDivider:x.default,MdFile:N.default,MdIcon:R.default,MdImage:w.default,MdInputContainer:P.default,MdLayout:L.default,MdList:I.default,MdMenu:B.default,MdProgress:F.default,MdRadio:Y.default,MdSelect:U.default,MdSidenav:K.default,MdSnackbar:q.default,MdSpeedDial:J.default,MdSpinner:Z.default,MdSubheader:et.default,MdSwitch:it.default,MdTable:rt.default,MdTabs:st.default,MdToolbar:lt.default,MdTooltip:ut.default,MdWhiteframe:ft.default};pt.install=function(t){for(var e in pt){var n=pt[e];n&&"install"!==e&&t.use(n)}},e.default=pt,t.exports=e.default}),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,(function(t,e,n){t.exports=n(396)})])}));
  746. },{"vue":10}],8:[function(require,module,exports){
  747. /*!
  748. * vue-resource v1.3.4
  749. * https://github.com/pagekit/vue-resource
  750. * Released under the MIT License.
  751. */
  752. 'use strict';
  753. /**
  754. * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis)
  755. */
  756. var RESOLVED = 0;
  757. var REJECTED = 1;
  758. var PENDING = 2;
  759. function Promise$1(executor) {
  760. this.state = PENDING;
  761. this.value = undefined;
  762. this.deferred = [];
  763. var promise = this;
  764. try {
  765. executor(function (x) {
  766. promise.resolve(x);
  767. }, function (r) {
  768. promise.reject(r);
  769. });
  770. } catch (e) {
  771. promise.reject(e);
  772. }
  773. }
  774. Promise$1.reject = function (r) {
  775. return new Promise$1(function (resolve, reject) {
  776. reject(r);
  777. });
  778. };
  779. Promise$1.resolve = function (x) {
  780. return new Promise$1(function (resolve, reject) {
  781. resolve(x);
  782. });
  783. };
  784. Promise$1.all = function all(iterable) {
  785. return new Promise$1(function (resolve, reject) {
  786. var count = 0, result = [];
  787. if (iterable.length === 0) {
  788. resolve(result);
  789. }
  790. function resolver(i) {
  791. return function (x) {
  792. result[i] = x;
  793. count += 1;
  794. if (count === iterable.length) {
  795. resolve(result);
  796. }
  797. };
  798. }
  799. for (var i = 0; i < iterable.length; i += 1) {
  800. Promise$1.resolve(iterable[i]).then(resolver(i), reject);
  801. }
  802. });
  803. };
  804. Promise$1.race = function race(iterable) {
  805. return new Promise$1(function (resolve, reject) {
  806. for (var i = 0; i < iterable.length; i += 1) {
  807. Promise$1.resolve(iterable[i]).then(resolve, reject);
  808. }
  809. });
  810. };
  811. var p$1 = Promise$1.prototype;
  812. p$1.resolve = function resolve(x) {
  813. var promise = this;
  814. if (promise.state === PENDING) {
  815. if (x === promise) {
  816. throw new TypeError('Promise settled with itself.');
  817. }
  818. var called = false;
  819. try {
  820. var then = x && x['then'];
  821. if (x !== null && typeof x === 'object' && typeof then === 'function') {
  822. then.call(x, function (x) {
  823. if (!called) {
  824. promise.resolve(x);
  825. }
  826. called = true;
  827. }, function (r) {
  828. if (!called) {
  829. promise.reject(r);
  830. }
  831. called = true;
  832. });
  833. return;
  834. }
  835. } catch (e) {
  836. if (!called) {
  837. promise.reject(e);
  838. }
  839. return;
  840. }
  841. promise.state = RESOLVED;
  842. promise.value = x;
  843. promise.notify();
  844. }
  845. };
  846. p$1.reject = function reject(reason) {
  847. var promise = this;
  848. if (promise.state === PENDING) {
  849. if (reason === promise) {
  850. throw new TypeError('Promise settled with itself.');
  851. }
  852. promise.state = REJECTED;
  853. promise.value = reason;
  854. promise.notify();
  855. }
  856. };
  857. p$1.notify = function notify() {
  858. var promise = this;
  859. nextTick(function () {
  860. if (promise.state !== PENDING) {
  861. while (promise.deferred.length) {
  862. var deferred = promise.deferred.shift(),
  863. onResolved = deferred[0],
  864. onRejected = deferred[1],
  865. resolve = deferred[2],
  866. reject = deferred[3];
  867. try {
  868. if (promise.state === RESOLVED) {
  869. if (typeof onResolved === 'function') {
  870. resolve(onResolved.call(undefined, promise.value));
  871. } else {
  872. resolve(promise.value);
  873. }
  874. } else if (promise.state === REJECTED) {
  875. if (typeof onRejected === 'function') {
  876. resolve(onRejected.call(undefined, promise.value));
  877. } else {
  878. reject(promise.value);
  879. }
  880. }
  881. } catch (e) {
  882. reject(e);
  883. }
  884. }
  885. }
  886. });
  887. };
  888. p$1.then = function then(onResolved, onRejected) {
  889. var promise = this;
  890. return new Promise$1(function (resolve, reject) {
  891. promise.deferred.push([onResolved, onRejected, resolve, reject]);
  892. promise.notify();
  893. });
  894. };
  895. p$1.catch = function (onRejected) {
  896. return this.then(undefined, onRejected);
  897. };
  898. /**
  899. * Promise adapter.
  900. */
  901. if (typeof Promise === 'undefined') {
  902. window.Promise = Promise$1;
  903. }
  904. function PromiseObj(executor, context) {
  905. if (executor instanceof Promise) {
  906. this.promise = executor;
  907. } else {
  908. this.promise = new Promise(executor.bind(context));
  909. }
  910. this.context = context;
  911. }
  912. PromiseObj.all = function (iterable, context) {
  913. return new PromiseObj(Promise.all(iterable), context);
  914. };
  915. PromiseObj.resolve = function (value, context) {
  916. return new PromiseObj(Promise.resolve(value), context);
  917. };
  918. PromiseObj.reject = function (reason, context) {
  919. return new PromiseObj(Promise.reject(reason), context);
  920. };
  921. PromiseObj.race = function (iterable, context) {
  922. return new PromiseObj(Promise.race(iterable), context);
  923. };
  924. var p = PromiseObj.prototype;
  925. p.bind = function (context) {
  926. this.context = context;
  927. return this;
  928. };
  929. p.then = function (fulfilled, rejected) {
  930. if (fulfilled && fulfilled.bind && this.context) {
  931. fulfilled = fulfilled.bind(this.context);
  932. }
  933. if (rejected && rejected.bind && this.context) {
  934. rejected = rejected.bind(this.context);
  935. }
  936. return new PromiseObj(this.promise.then(fulfilled, rejected), this.context);
  937. };
  938. p.catch = function (rejected) {
  939. if (rejected && rejected.bind && this.context) {
  940. rejected = rejected.bind(this.context);
  941. }
  942. return new PromiseObj(this.promise.catch(rejected), this.context);
  943. };
  944. p.finally = function (callback) {
  945. return this.then(function (value) {
  946. callback.call(this);
  947. return value;
  948. }, function (reason) {
  949. callback.call(this);
  950. return Promise.reject(reason);
  951. }
  952. );
  953. };
  954. /**
  955. * Utility functions.
  956. */
  957. var ref = {};
  958. var hasOwnProperty = ref.hasOwnProperty;
  959. var ref$1 = [];
  960. var slice = ref$1.slice;
  961. var debug = false;
  962. var ntick;
  963. var inBrowser = typeof window !== 'undefined';
  964. var Util = function (ref) {
  965. var config = ref.config;
  966. var nextTick = ref.nextTick;
  967. ntick = nextTick;
  968. debug = config.debug || !config.silent;
  969. };
  970. function warn(msg) {
  971. if (typeof console !== 'undefined' && debug) {
  972. console.warn('[VueResource warn]: ' + msg);
  973. }
  974. }
  975. function error(msg) {
  976. if (typeof console !== 'undefined') {
  977. console.error(msg);
  978. }
  979. }
  980. function nextTick(cb, ctx) {
  981. return ntick(cb, ctx);
  982. }
  983. function trim(str) {
  984. return str ? str.replace(/^\s*|\s*$/g, '') : '';
  985. }
  986. function trimEnd(str, chars) {
  987. if (str && chars === undefined) {
  988. return str.replace(/\s+$/, '');
  989. }
  990. if (!str || !chars) {
  991. return str;
  992. }
  993. return str.replace(new RegExp(("[" + chars + "]+$")), '');
  994. }
  995. function toLower(str) {
  996. return str ? str.toLowerCase() : '';
  997. }
  998. function toUpper(str) {
  999. return str ? str.toUpperCase() : '';
  1000. }
  1001. var isArray = Array.isArray;
  1002. function isString(val) {
  1003. return typeof val === 'string';
  1004. }
  1005. function isFunction(val) {
  1006. return typeof val === 'function';
  1007. }
  1008. function isObject(obj) {
  1009. return obj !== null && typeof obj === 'object';
  1010. }
  1011. function isPlainObject(obj) {
  1012. return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype;
  1013. }
  1014. function isBlob(obj) {
  1015. return typeof Blob !== 'undefined' && obj instanceof Blob;
  1016. }
  1017. function isFormData(obj) {
  1018. return typeof FormData !== 'undefined' && obj instanceof FormData;
  1019. }
  1020. function when(value, fulfilled, rejected) {
  1021. var promise = PromiseObj.resolve(value);
  1022. if (arguments.length < 2) {
  1023. return promise;
  1024. }
  1025. return promise.then(fulfilled, rejected);
  1026. }
  1027. function options(fn, obj, opts) {
  1028. opts = opts || {};
  1029. if (isFunction(opts)) {
  1030. opts = opts.call(obj);
  1031. }
  1032. return merge(fn.bind({$vm: obj, $options: opts}), fn, {$options: opts});
  1033. }
  1034. function each(obj, iterator) {
  1035. var i, key;
  1036. if (isArray(obj)) {
  1037. for (i = 0; i < obj.length; i++) {
  1038. iterator.call(obj[i], obj[i], i);
  1039. }
  1040. } else if (isObject(obj)) {
  1041. for (key in obj) {
  1042. if (hasOwnProperty.call(obj, key)) {
  1043. iterator.call(obj[key], obj[key], key);
  1044. }
  1045. }
  1046. }
  1047. return obj;
  1048. }
  1049. var assign = Object.assign || _assign;
  1050. function merge(target) {
  1051. var args = slice.call(arguments, 1);
  1052. args.forEach(function (source) {
  1053. _merge(target, source, true);
  1054. });
  1055. return target;
  1056. }
  1057. function defaults(target) {
  1058. var args = slice.call(arguments, 1);
  1059. args.forEach(function (source) {
  1060. for (var key in source) {
  1061. if (target[key] === undefined) {
  1062. target[key] = source[key];
  1063. }
  1064. }
  1065. });
  1066. return target;
  1067. }
  1068. function _assign(target) {
  1069. var args = slice.call(arguments, 1);
  1070. args.forEach(function (source) {
  1071. _merge(target, source);
  1072. });
  1073. return target;
  1074. }
  1075. function _merge(target, source, deep) {
  1076. for (var key in source) {
  1077. if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {
  1078. if (isPlainObject(source[key]) && !isPlainObject(target[key])) {
  1079. target[key] = {};
  1080. }
  1081. if (isArray(source[key]) && !isArray(target[key])) {
  1082. target[key] = [];
  1083. }
  1084. _merge(target[key], source[key], deep);
  1085. } else if (source[key] !== undefined) {
  1086. target[key] = source[key];
  1087. }
  1088. }
  1089. }
  1090. /**
  1091. * Root Prefix Transform.
  1092. */
  1093. var root = function (options$$1, next) {
  1094. var url = next(options$$1);
  1095. if (isString(options$$1.root) && !/^(https?:)?\//.test(url)) {
  1096. url = trimEnd(options$$1.root, '/') + '/' + url;
  1097. }
  1098. return url;
  1099. };
  1100. /**
  1101. * Query Parameter Transform.
  1102. */
  1103. var query = function (options$$1, next) {
  1104. var urlParams = Object.keys(Url.options.params), query = {}, url = next(options$$1);
  1105. each(options$$1.params, function (value, key) {
  1106. if (urlParams.indexOf(key) === -1) {
  1107. query[key] = value;
  1108. }
  1109. });
  1110. query = Url.params(query);
  1111. if (query) {
  1112. url += (url.indexOf('?') == -1 ? '?' : '&') + query;
  1113. }
  1114. return url;
  1115. };
  1116. /**
  1117. * URL Template v2.0.6 (https://github.com/bramstein/url-template)
  1118. */
  1119. function expand(url, params, variables) {
  1120. var tmpl = parse(url), expanded = tmpl.expand(params);
  1121. if (variables) {
  1122. variables.push.apply(variables, tmpl.vars);
  1123. }
  1124. return expanded;
  1125. }
  1126. function parse(template) {
  1127. var operators = ['+', '#', '.', '/', ';', '?', '&'], variables = [];
  1128. return {
  1129. vars: variables,
  1130. expand: function expand(context) {
  1131. return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) {
  1132. if (expression) {
  1133. var operator = null, values = [];
  1134. if (operators.indexOf(expression.charAt(0)) !== -1) {
  1135. operator = expression.charAt(0);
  1136. expression = expression.substr(1);
  1137. }
  1138. expression.split(/,/g).forEach(function (variable) {
  1139. var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
  1140. values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
  1141. variables.push(tmp[1]);
  1142. });
  1143. if (operator && operator !== '+') {
  1144. var separator = ',';
  1145. if (operator === '?') {
  1146. separator = '&';
  1147. } else if (operator !== '#') {
  1148. separator = operator;
  1149. }
  1150. return (values.length !== 0 ? operator : '') + values.join(separator);
  1151. } else {
  1152. return values.join(',');
  1153. }
  1154. } else {
  1155. return encodeReserved(literal);
  1156. }
  1157. });
  1158. }
  1159. };
  1160. }
  1161. function getValues(context, operator, key, modifier) {
  1162. var value = context[key], result = [];
  1163. if (isDefined(value) && value !== '') {
  1164. if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
  1165. value = value.toString();
  1166. if (modifier && modifier !== '*') {
  1167. value = value.substring(0, parseInt(modifier, 10));
  1168. }
  1169. result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));
  1170. } else {
  1171. if (modifier === '*') {
  1172. if (Array.isArray(value)) {
  1173. value.filter(isDefined).forEach(function (value) {
  1174. result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));
  1175. });
  1176. } else {
  1177. Object.keys(value).forEach(function (k) {
  1178. if (isDefined(value[k])) {
  1179. result.push(encodeValue(operator, value[k], k));
  1180. }
  1181. });
  1182. }
  1183. } else {
  1184. var tmp = [];
  1185. if (Array.isArray(value)) {
  1186. value.filter(isDefined).forEach(function (value) {
  1187. tmp.push(encodeValue(operator, value));
  1188. });
  1189. } else {
  1190. Object.keys(value).forEach(function (k) {
  1191. if (isDefined(value[k])) {
  1192. tmp.push(encodeURIComponent(k));
  1193. tmp.push(encodeValue(operator, value[k].toString()));
  1194. }
  1195. });
  1196. }
  1197. if (isKeyOperator(operator)) {
  1198. result.push(encodeURIComponent(key) + '=' + tmp.join(','));
  1199. } else if (tmp.length !== 0) {
  1200. result.push(tmp.join(','));
  1201. }
  1202. }
  1203. }
  1204. } else {
  1205. if (operator === ';') {
  1206. result.push(encodeURIComponent(key));
  1207. } else if (value === '' && (operator === '&' || operator === '?')) {
  1208. result.push(encodeURIComponent(key) + '=');
  1209. } else if (value === '') {
  1210. result.push('');
  1211. }
  1212. }
  1213. return result;
  1214. }
  1215. function isDefined(value) {
  1216. return value !== undefined && value !== null;
  1217. }
  1218. function isKeyOperator(operator) {
  1219. return operator === ';' || operator === '&' || operator === '?';
  1220. }
  1221. function encodeValue(operator, value, key) {
  1222. value = (operator === '+' || operator === '#') ? encodeReserved(value) : encodeURIComponent(value);
  1223. if (key) {
  1224. return encodeURIComponent(key) + '=' + value;
  1225. } else {
  1226. return value;
  1227. }
  1228. }
  1229. function encodeReserved(str) {
  1230. return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {
  1231. if (!/%[0-9A-Fa-f]/.test(part)) {
  1232. part = encodeURI(part);
  1233. }
  1234. return part;
  1235. }).join('');
  1236. }
  1237. /**
  1238. * URL Template (RFC 6570) Transform.
  1239. */
  1240. var template = function (options) {
  1241. var variables = [], url = expand(options.url, options.params, variables);
  1242. variables.forEach(function (key) {
  1243. delete options.params[key];
  1244. });
  1245. return url;
  1246. };
  1247. /**
  1248. * Service for URL templating.
  1249. */
  1250. function Url(url, params) {
  1251. var self = this || {}, options$$1 = url, transform;
  1252. if (isString(url)) {
  1253. options$$1 = {url: url, params: params};
  1254. }
  1255. options$$1 = merge({}, Url.options, self.$options, options$$1);
  1256. Url.transforms.forEach(function (handler) {
  1257. if (isString(handler)) {
  1258. handler = Url.transform[handler];
  1259. }
  1260. if (isFunction(handler)) {
  1261. transform = factory(handler, transform, self.$vm);
  1262. }
  1263. });
  1264. return transform(options$$1);
  1265. }
  1266. /**
  1267. * Url options.
  1268. */
  1269. Url.options = {
  1270. url: '',
  1271. root: null,
  1272. params: {}
  1273. };
  1274. /**
  1275. * Url transforms.
  1276. */
  1277. Url.transform = {template: template, query: query, root: root};
  1278. Url.transforms = ['template', 'query', 'root'];
  1279. /**
  1280. * Encodes a Url parameter string.
  1281. *
  1282. * @param {Object} obj
  1283. */
  1284. Url.params = function (obj) {
  1285. var params = [], escape = encodeURIComponent;
  1286. params.add = function (key, value) {
  1287. if (isFunction(value)) {
  1288. value = value();
  1289. }
  1290. if (value === null) {
  1291. value = '';
  1292. }
  1293. this.push(escape(key) + '=' + escape(value));
  1294. };
  1295. serialize(params, obj);
  1296. return params.join('&').replace(/%20/g, '+');
  1297. };
  1298. /**
  1299. * Parse a URL and return its components.
  1300. *
  1301. * @param {String} url
  1302. */
  1303. Url.parse = function (url) {
  1304. var el = document.createElement('a');
  1305. if (document.documentMode) {
  1306. el.href = url;
  1307. url = el.href;
  1308. }
  1309. el.href = url;
  1310. return {
  1311. href: el.href,
  1312. protocol: el.protocol ? el.protocol.replace(/:$/, '') : '',
  1313. port: el.port,
  1314. host: el.host,
  1315. hostname: el.hostname,
  1316. pathname: el.pathname.charAt(0) === '/' ? el.pathname : '/' + el.pathname,
  1317. search: el.search ? el.search.replace(/^\?/, '') : '',
  1318. hash: el.hash ? el.hash.replace(/^#/, '') : ''
  1319. };
  1320. };
  1321. function factory(handler, next, vm) {
  1322. return function (options$$1) {
  1323. return handler.call(vm, options$$1, next);
  1324. };
  1325. }
  1326. function serialize(params, obj, scope) {
  1327. var array = isArray(obj), plain = isPlainObject(obj), hash;
  1328. each(obj, function (value, key) {
  1329. hash = isObject(value) || isArray(value);
  1330. if (scope) {
  1331. key = scope + '[' + (plain || hash ? key : '') + ']';
  1332. }
  1333. if (!scope && array) {
  1334. params.add(value.name, value.value);
  1335. } else if (hash) {
  1336. serialize(params, value, key);
  1337. } else {
  1338. params.add(key, value);
  1339. }
  1340. });
  1341. }
  1342. /**
  1343. * XDomain client (Internet Explorer).
  1344. */
  1345. var xdrClient = function (request) {
  1346. return new PromiseObj(function (resolve) {
  1347. var xdr = new XDomainRequest(), handler = function (ref) {
  1348. var type = ref.type;
  1349. var status = 0;
  1350. if (type === 'load') {
  1351. status = 200;
  1352. } else if (type === 'error') {
  1353. status = 500;
  1354. }
  1355. resolve(request.respondWith(xdr.responseText, {status: status}));
  1356. };
  1357. request.abort = function () { return xdr.abort(); };
  1358. xdr.open(request.method, request.getUrl());
  1359. if (request.timeout) {
  1360. xdr.timeout = request.timeout;
  1361. }
  1362. xdr.onload = handler;
  1363. xdr.onabort = handler;
  1364. xdr.onerror = handler;
  1365. xdr.ontimeout = handler;
  1366. xdr.onprogress = function () {};
  1367. xdr.send(request.getBody());
  1368. });
  1369. };
  1370. /**
  1371. * CORS Interceptor.
  1372. */
  1373. var SUPPORTS_CORS = inBrowser && 'withCredentials' in new XMLHttpRequest();
  1374. var cors = function (request, next) {
  1375. if (inBrowser) {
  1376. var orgUrl = Url.parse(location.href);
  1377. var reqUrl = Url.parse(request.getUrl());
  1378. if (reqUrl.protocol !== orgUrl.protocol || reqUrl.host !== orgUrl.host) {
  1379. request.crossOrigin = true;
  1380. request.emulateHTTP = false;
  1381. if (!SUPPORTS_CORS) {
  1382. request.client = xdrClient;
  1383. }
  1384. }
  1385. }
  1386. next();
  1387. };
  1388. /**
  1389. * Form data Interceptor.
  1390. */
  1391. var form = function (request, next) {
  1392. if (isFormData(request.body)) {
  1393. request.headers.delete('Content-Type');
  1394. } else if (isObject(request.body) && request.emulateJSON) {
  1395. request.body = Url.params(request.body);
  1396. request.headers.set('Content-Type', 'application/x-www-form-urlencoded');
  1397. }
  1398. next();
  1399. };
  1400. /**
  1401. * JSON Interceptor.
  1402. */
  1403. var json = function (request, next) {
  1404. var type = request.headers.get('Content-Type') || '';
  1405. if (isObject(request.body) && type.indexOf('application/json') === 0) {
  1406. request.body = JSON.stringify(request.body);
  1407. }
  1408. next(function (response) {
  1409. return response.bodyText ? when(response.text(), function (text) {
  1410. type = response.headers.get('Content-Type') || '';
  1411. if (type.indexOf('application/json') === 0 || isJson(text)) {
  1412. try {
  1413. response.body = JSON.parse(text);
  1414. } catch (e) {
  1415. response.body = null;
  1416. }
  1417. } else {
  1418. response.body = text;
  1419. }
  1420. return response;
  1421. }) : response;
  1422. });
  1423. };
  1424. function isJson(str) {
  1425. var start = str.match(/^\[|^\{(?!\{)/), end = {'[': /]$/, '{': /}$/};
  1426. return start && end[start[0]].test(str);
  1427. }
  1428. /**
  1429. * JSONP client (Browser).
  1430. */
  1431. var jsonpClient = function (request) {
  1432. return new PromiseObj(function (resolve) {
  1433. var name = request.jsonp || 'callback', callback = request.jsonpCallback || '_jsonp' + Math.random().toString(36).substr(2), body = null, handler, script;
  1434. handler = function (ref) {
  1435. var type = ref.type;
  1436. var status = 0;
  1437. if (type === 'load' && body !== null) {
  1438. status = 200;
  1439. } else if (type === 'error') {
  1440. status = 500;
  1441. }
  1442. if (status && window[callback]) {
  1443. delete window[callback];
  1444. document.body.removeChild(script);
  1445. }
  1446. resolve(request.respondWith(body, {status: status}));
  1447. };
  1448. window[callback] = function (result) {
  1449. body = JSON.stringify(result);
  1450. };
  1451. request.abort = function () {
  1452. handler({type: 'abort'});
  1453. };
  1454. request.params[name] = callback;
  1455. if (request.timeout) {
  1456. setTimeout(request.abort, request.timeout);
  1457. }
  1458. script = document.createElement('script');
  1459. script.src = request.getUrl();
  1460. script.type = 'text/javascript';
  1461. script.async = true;
  1462. script.onload = handler;
  1463. script.onerror = handler;
  1464. document.body.appendChild(script);
  1465. });
  1466. };
  1467. /**
  1468. * JSONP Interceptor.
  1469. */
  1470. var jsonp = function (request, next) {
  1471. if (request.method == 'JSONP') {
  1472. request.client = jsonpClient;
  1473. }
  1474. next();
  1475. };
  1476. /**
  1477. * Before Interceptor.
  1478. */
  1479. var before = function (request, next) {
  1480. if (isFunction(request.before)) {
  1481. request.before.call(this, request);
  1482. }
  1483. next();
  1484. };
  1485. /**
  1486. * HTTP method override Interceptor.
  1487. */
  1488. var method = function (request, next) {
  1489. if (request.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(request.method)) {
  1490. request.headers.set('X-HTTP-Method-Override', request.method);
  1491. request.method = 'POST';
  1492. }
  1493. next();
  1494. };
  1495. /**
  1496. * Header Interceptor.
  1497. */
  1498. var header = function (request, next) {
  1499. var headers = assign({}, Http.headers.common,
  1500. !request.crossOrigin ? Http.headers.custom : {},
  1501. Http.headers[toLower(request.method)]
  1502. );
  1503. each(headers, function (value, name) {
  1504. if (!request.headers.has(name)) {
  1505. request.headers.set(name, value);
  1506. }
  1507. });
  1508. next();
  1509. };
  1510. /**
  1511. * XMLHttp client (Browser).
  1512. */
  1513. var xhrClient = function (request) {
  1514. return new PromiseObj(function (resolve) {
  1515. var xhr = new XMLHttpRequest(), handler = function (event) {
  1516. var response = request.respondWith(
  1517. 'response' in xhr ? xhr.response : xhr.responseText, {
  1518. status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug
  1519. statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText)
  1520. }
  1521. );
  1522. each(trim(xhr.getAllResponseHeaders()).split('\n'), function (row) {
  1523. response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1));
  1524. });
  1525. resolve(response);
  1526. };
  1527. request.abort = function () { return xhr.abort(); };
  1528. if (request.progress) {
  1529. if (request.method === 'GET') {
  1530. xhr.addEventListener('progress', request.progress);
  1531. } else if (/^(POST|PUT)$/i.test(request.method)) {
  1532. xhr.upload.addEventListener('progress', request.progress);
  1533. }
  1534. }
  1535. xhr.open(request.method, request.getUrl(), true);
  1536. if (request.timeout) {
  1537. xhr.timeout = request.timeout;
  1538. }
  1539. if (request.responseType && 'responseType' in xhr) {
  1540. xhr.responseType = request.responseType;
  1541. }
  1542. if (request.withCredentials || request.credentials) {
  1543. xhr.withCredentials = true;
  1544. }
  1545. if (!request.crossOrigin) {
  1546. request.headers.set('X-Requested-With', 'XMLHttpRequest');
  1547. }
  1548. request.headers.forEach(function (value, name) {
  1549. xhr.setRequestHeader(name, value);
  1550. });
  1551. xhr.onload = handler;
  1552. xhr.onabort = handler;
  1553. xhr.onerror = handler;
  1554. xhr.ontimeout = handler;
  1555. xhr.send(request.getBody());
  1556. });
  1557. };
  1558. /**
  1559. * Http client (Node).
  1560. */
  1561. var nodeClient = function (request) {
  1562. var client = require('got');
  1563. return new PromiseObj(function (resolve) {
  1564. var url = request.getUrl();
  1565. var body = request.getBody();
  1566. var method = request.method;
  1567. var headers = {}, handler;
  1568. request.headers.forEach(function (value, name) {
  1569. headers[name] = value;
  1570. });
  1571. client(url, {body: body, method: method, headers: headers}).then(handler = function (resp) {
  1572. var response = request.respondWith(resp.body, {
  1573. status: resp.statusCode,
  1574. statusText: trim(resp.statusMessage)
  1575. }
  1576. );
  1577. each(resp.headers, function (value, name) {
  1578. response.headers.set(name, value);
  1579. });
  1580. resolve(response);
  1581. }, function (error$$1) { return handler(error$$1.response); });
  1582. });
  1583. };
  1584. /**
  1585. * Base client.
  1586. */
  1587. var Client = function (context) {
  1588. var reqHandlers = [sendRequest], resHandlers = [], handler;
  1589. if (!isObject(context)) {
  1590. context = null;
  1591. }
  1592. function Client(request) {
  1593. return new PromiseObj(function (resolve, reject) {
  1594. function exec() {
  1595. handler = reqHandlers.pop();
  1596. if (isFunction(handler)) {
  1597. handler.call(context, request, next);
  1598. } else {
  1599. warn(("Invalid interceptor of type " + (typeof handler) + ", must be a function"));
  1600. next();
  1601. }
  1602. }
  1603. function next(response) {
  1604. if (isFunction(response)) {
  1605. resHandlers.unshift(response);
  1606. } else if (isObject(response)) {
  1607. resHandlers.forEach(function (handler) {
  1608. response = when(response, function (response) {
  1609. return handler.call(context, response) || response;
  1610. }, reject);
  1611. });
  1612. when(response, resolve, reject);
  1613. return;
  1614. }
  1615. exec();
  1616. }
  1617. exec();
  1618. }, context);
  1619. }
  1620. Client.use = function (handler) {
  1621. reqHandlers.push(handler);
  1622. };
  1623. return Client;
  1624. };
  1625. function sendRequest(request, resolve) {
  1626. var client = request.client || (inBrowser ? xhrClient : nodeClient);
  1627. resolve(client(request));
  1628. }
  1629. /**
  1630. * HTTP Headers.
  1631. */
  1632. var Headers = function Headers(headers) {
  1633. var this$1 = this;
  1634. this.map = {};
  1635. each(headers, function (value, name) { return this$1.append(name, value); });
  1636. };
  1637. Headers.prototype.has = function has (name) {
  1638. return getName(this.map, name) !== null;
  1639. };
  1640. Headers.prototype.get = function get (name) {
  1641. var list = this.map[getName(this.map, name)];
  1642. return list ? list.join() : null;
  1643. };
  1644. Headers.prototype.getAll = function getAll (name) {
  1645. return this.map[getName(this.map, name)] || [];
  1646. };
  1647. Headers.prototype.set = function set (name, value) {
  1648. this.map[normalizeName(getName(this.map, name) || name)] = [trim(value)];
  1649. };
  1650. Headers.prototype.append = function append (name, value){
  1651. var list = this.map[getName(this.map, name)];
  1652. if (list) {
  1653. list.push(trim(value));
  1654. } else {
  1655. this.set(name, value);
  1656. }
  1657. };
  1658. Headers.prototype.delete = function delete$1 (name){
  1659. delete this.map[getName(this.map, name)];
  1660. };
  1661. Headers.prototype.deleteAll = function deleteAll (){
  1662. this.map = {};
  1663. };
  1664. Headers.prototype.forEach = function forEach (callback, thisArg) {
  1665. var this$1 = this;
  1666. each(this.map, function (list, name) {
  1667. each(list, function (value) { return callback.call(thisArg, value, name, this$1); });
  1668. });
  1669. };
  1670. function getName(map, name) {
  1671. return Object.keys(map).reduce(function (prev, curr) {
  1672. return toLower(name) === toLower(curr) ? curr : prev;
  1673. }, null);
  1674. }
  1675. function normalizeName(name) {
  1676. if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
  1677. throw new TypeError('Invalid character in header field name');
  1678. }
  1679. return trim(name);
  1680. }
  1681. /**
  1682. * HTTP Response.
  1683. */
  1684. var Response = function Response(body, ref) {
  1685. var url = ref.url;
  1686. var headers = ref.headers;
  1687. var status = ref.status;
  1688. var statusText = ref.statusText;
  1689. this.url = url;
  1690. this.ok = status >= 200 && status < 300;
  1691. this.status = status || 0;
  1692. this.statusText = statusText || '';
  1693. this.headers = new Headers(headers);
  1694. this.body = body;
  1695. if (isString(body)) {
  1696. this.bodyText = body;
  1697. } else if (isBlob(body)) {
  1698. this.bodyBlob = body;
  1699. if (isBlobText(body)) {
  1700. this.bodyText = blobText(body);
  1701. }
  1702. }
  1703. };
  1704. Response.prototype.blob = function blob () {
  1705. return when(this.bodyBlob);
  1706. };
  1707. Response.prototype.text = function text () {
  1708. return when(this.bodyText);
  1709. };
  1710. Response.prototype.json = function json () {
  1711. return when(this.text(), function (text) { return JSON.parse(text); });
  1712. };
  1713. Object.defineProperty(Response.prototype, 'data', {
  1714. get: function get() {
  1715. return this.body;
  1716. },
  1717. set: function set(body) {
  1718. this.body = body;
  1719. }
  1720. });
  1721. function blobText(body) {
  1722. return new PromiseObj(function (resolve) {
  1723. var reader = new FileReader();
  1724. reader.readAsText(body);
  1725. reader.onload = function () {
  1726. resolve(reader.result);
  1727. };
  1728. });
  1729. }
  1730. function isBlobText(body) {
  1731. return body.type.indexOf('text') === 0 || body.type.indexOf('json') !== -1;
  1732. }
  1733. /**
  1734. * HTTP Request.
  1735. */
  1736. var Request = function Request(options$$1) {
  1737. this.body = null;
  1738. this.params = {};
  1739. assign(this, options$$1, {
  1740. method: toUpper(options$$1.method || 'GET')
  1741. });
  1742. if (!(this.headers instanceof Headers)) {
  1743. this.headers = new Headers(this.headers);
  1744. }
  1745. };
  1746. Request.prototype.getUrl = function getUrl (){
  1747. return Url(this);
  1748. };
  1749. Request.prototype.getBody = function getBody (){
  1750. return this.body;
  1751. };
  1752. Request.prototype.respondWith = function respondWith (body, options$$1) {
  1753. return new Response(body, assign(options$$1 || {}, {url: this.getUrl()}));
  1754. };
  1755. /**
  1756. * Service for sending network requests.
  1757. */
  1758. var COMMON_HEADERS = {'Accept': 'application/json, text/plain, */*'};
  1759. var JSON_CONTENT_TYPE = {'Content-Type': 'application/json;charset=utf-8'};
  1760. function Http(options$$1) {
  1761. var self = this || {}, client = Client(self.$vm);
  1762. defaults(options$$1 || {}, self.$options, Http.options);
  1763. Http.interceptors.forEach(function (handler) {
  1764. if (isString(handler)) {
  1765. handler = Http.interceptor[handler];
  1766. }
  1767. if (isFunction(handler)) {
  1768. client.use(handler);
  1769. }
  1770. });
  1771. return client(new Request(options$$1)).then(function (response) {
  1772. return response.ok ? response : PromiseObj.reject(response);
  1773. }, function (response) {
  1774. if (response instanceof Error) {
  1775. error(response);
  1776. }
  1777. return PromiseObj.reject(response);
  1778. });
  1779. }
  1780. Http.options = {};
  1781. Http.headers = {
  1782. put: JSON_CONTENT_TYPE,
  1783. post: JSON_CONTENT_TYPE,
  1784. patch: JSON_CONTENT_TYPE,
  1785. delete: JSON_CONTENT_TYPE,
  1786. common: COMMON_HEADERS,
  1787. custom: {}
  1788. };
  1789. Http.interceptor = {before: before, method: method, jsonp: jsonp, json: json, form: form, header: header, cors: cors};
  1790. Http.interceptors = ['before', 'method', 'jsonp', 'json', 'form', 'header', 'cors'];
  1791. ['get', 'delete', 'head', 'jsonp'].forEach(function (method$$1) {
  1792. Http[method$$1] = function (url, options$$1) {
  1793. return this(assign(options$$1 || {}, {url: url, method: method$$1}));
  1794. };
  1795. });
  1796. ['post', 'put', 'patch'].forEach(function (method$$1) {
  1797. Http[method$$1] = function (url, body, options$$1) {
  1798. return this(assign(options$$1 || {}, {url: url, method: method$$1, body: body}));
  1799. };
  1800. });
  1801. /**
  1802. * Service for interacting with RESTful services.
  1803. */
  1804. function Resource(url, params, actions, options$$1) {
  1805. var self = this || {}, resource = {};
  1806. actions = assign({},
  1807. Resource.actions,
  1808. actions
  1809. );
  1810. each(actions, function (action, name) {
  1811. action = merge({url: url, params: assign({}, params)}, options$$1, action);
  1812. resource[name] = function () {
  1813. return (self.$http || Http)(opts(action, arguments));
  1814. };
  1815. });
  1816. return resource;
  1817. }
  1818. function opts(action, args) {
  1819. var options$$1 = assign({}, action), params = {}, body;
  1820. switch (args.length) {
  1821. case 2:
  1822. params = args[0];
  1823. body = args[1];
  1824. break;
  1825. case 1:
  1826. if (/^(POST|PUT|PATCH)$/i.test(options$$1.method)) {
  1827. body = args[0];
  1828. } else {
  1829. params = args[0];
  1830. }
  1831. break;
  1832. case 0:
  1833. break;
  1834. default:
  1835. throw 'Expected up to 2 arguments [params, body], got ' + args.length + ' arguments';
  1836. }
  1837. options$$1.body = body;
  1838. options$$1.params = assign({}, options$$1.params, params);
  1839. return options$$1;
  1840. }
  1841. Resource.actions = {
  1842. get: {method: 'GET'},
  1843. save: {method: 'POST'},
  1844. query: {method: 'GET'},
  1845. update: {method: 'PUT'},
  1846. remove: {method: 'DELETE'},
  1847. delete: {method: 'DELETE'}
  1848. };
  1849. /**
  1850. * Install plugin.
  1851. */
  1852. function plugin(Vue) {
  1853. if (plugin.installed) {
  1854. return;
  1855. }
  1856. Util(Vue);
  1857. Vue.url = Url;
  1858. Vue.http = Http;
  1859. Vue.resource = Resource;
  1860. Vue.Promise = PromiseObj;
  1861. Object.defineProperties(Vue.prototype, {
  1862. $url: {
  1863. get: function get() {
  1864. return options(Vue.url, this, this.$options.url);
  1865. }
  1866. },
  1867. $http: {
  1868. get: function get() {
  1869. return options(Vue.http, this, this.$options.http);
  1870. }
  1871. },
  1872. $resource: {
  1873. get: function get() {
  1874. return Vue.resource.bind(this);
  1875. }
  1876. },
  1877. $promise: {
  1878. get: function get() {
  1879. var this$1 = this;
  1880. return function (executor) { return new Vue.Promise(executor, this$1); };
  1881. }
  1882. }
  1883. });
  1884. }
  1885. if (typeof window !== 'undefined' && window.Vue) {
  1886. window.Vue.use(plugin);
  1887. }
  1888. module.exports = plugin;
  1889. },{"got":1}],9:[function(require,module,exports){
  1890. (function (process,global){
  1891. /*!
  1892. * Vue.js v2.3.3
  1893. * (c) 2014-2017 Evan You
  1894. * Released under the MIT License.
  1895. */
  1896. 'use strict';
  1897. /* */
  1898. // these helpers produces better vm code in JS engines due to their
  1899. // explicitness and function inlining
  1900. function isUndef (v) {
  1901. return v === undefined || v === null
  1902. }
  1903. function isDef (v) {
  1904. return v !== undefined && v !== null
  1905. }
  1906. function isTrue (v) {
  1907. return v === true
  1908. }
  1909. function isFalse (v) {
  1910. return v === false
  1911. }
  1912. /**
  1913. * Check if value is primitive
  1914. */
  1915. function isPrimitive (value) {
  1916. return typeof value === 'string' || typeof value === 'number'
  1917. }
  1918. /**
  1919. * Quick object check - this is primarily used to tell
  1920. * Objects from primitive values when we know the value
  1921. * is a JSON-compliant type.
  1922. */
  1923. function isObject (obj) {
  1924. return obj !== null && typeof obj === 'object'
  1925. }
  1926. var _toString = Object.prototype.toString;
  1927. /**
  1928. * Strict object type check. Only returns true
  1929. * for plain JavaScript objects.
  1930. */
  1931. function isPlainObject (obj) {
  1932. return _toString.call(obj) === '[object Object]'
  1933. }
  1934. function isRegExp (v) {
  1935. return _toString.call(v) === '[object RegExp]'
  1936. }
  1937. /**
  1938. * Convert a value to a string that is actually rendered.
  1939. */
  1940. function toString (val) {
  1941. return val == null
  1942. ? ''
  1943. : typeof val === 'object'
  1944. ? JSON.stringify(val, null, 2)
  1945. : String(val)
  1946. }
  1947. /**
  1948. * Convert a input value to a number for persistence.
  1949. * If the conversion fails, return original string.
  1950. */
  1951. function toNumber (val) {
  1952. var n = parseFloat(val);
  1953. return isNaN(n) ? val : n
  1954. }
  1955. /**
  1956. * Make a map and return a function for checking if a key
  1957. * is in that map.
  1958. */
  1959. function makeMap (
  1960. str,
  1961. expectsLowerCase
  1962. ) {
  1963. var map = Object.create(null);
  1964. var list = str.split(',');
  1965. for (var i = 0; i < list.length; i++) {
  1966. map[list[i]] = true;
  1967. }
  1968. return expectsLowerCase
  1969. ? function (val) { return map[val.toLowerCase()]; }
  1970. : function (val) { return map[val]; }
  1971. }
  1972. /**
  1973. * Check if a tag is a built-in tag.
  1974. */
  1975. var isBuiltInTag = makeMap('slot,component', true);
  1976. /**
  1977. * Remove an item from an array
  1978. */
  1979. function remove (arr, item) {
  1980. if (arr.length) {
  1981. var index = arr.indexOf(item);
  1982. if (index > -1) {
  1983. return arr.splice(index, 1)
  1984. }
  1985. }
  1986. }
  1987. /**
  1988. * Check whether the object has the property.
  1989. */
  1990. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1991. function hasOwn (obj, key) {
  1992. return hasOwnProperty.call(obj, key)
  1993. }
  1994. /**
  1995. * Create a cached version of a pure function.
  1996. */
  1997. function cached (fn) {
  1998. var cache = Object.create(null);
  1999. return (function cachedFn (str) {
  2000. var hit = cache[str];
  2001. return hit || (cache[str] = fn(str))
  2002. })
  2003. }
  2004. /**
  2005. * Camelize a hyphen-delimited string.
  2006. */
  2007. var camelizeRE = /-(\w)/g;
  2008. var camelize = cached(function (str) {
  2009. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  2010. });
  2011. /**
  2012. * Capitalize a string.
  2013. */
  2014. var capitalize = cached(function (str) {
  2015. return str.charAt(0).toUpperCase() + str.slice(1)
  2016. });
  2017. /**
  2018. * Hyphenate a camelCase string.
  2019. */
  2020. var hyphenateRE = /([^-])([A-Z])/g;
  2021. var hyphenate = cached(function (str) {
  2022. return str
  2023. .replace(hyphenateRE, '$1-$2')
  2024. .replace(hyphenateRE, '$1-$2')
  2025. .toLowerCase()
  2026. });
  2027. /**
  2028. * Simple bind, faster than native
  2029. */
  2030. function bind (fn, ctx) {
  2031. function boundFn (a) {
  2032. var l = arguments.length;
  2033. return l
  2034. ? l > 1
  2035. ? fn.apply(ctx, arguments)
  2036. : fn.call(ctx, a)
  2037. : fn.call(ctx)
  2038. }
  2039. // record original fn length
  2040. boundFn._length = fn.length;
  2041. return boundFn
  2042. }
  2043. /**
  2044. * Convert an Array-like object to a real Array.
  2045. */
  2046. function toArray (list, start) {
  2047. start = start || 0;
  2048. var i = list.length - start;
  2049. var ret = new Array(i);
  2050. while (i--) {
  2051. ret[i] = list[i + start];
  2052. }
  2053. return ret
  2054. }
  2055. /**
  2056. * Mix properties into target object.
  2057. */
  2058. function extend (to, _from) {
  2059. for (var key in _from) {
  2060. to[key] = _from[key];
  2061. }
  2062. return to
  2063. }
  2064. /**
  2065. * Merge an Array of Objects into a single Object.
  2066. */
  2067. function toObject (arr) {
  2068. var res = {};
  2069. for (var i = 0; i < arr.length; i++) {
  2070. if (arr[i]) {
  2071. extend(res, arr[i]);
  2072. }
  2073. }
  2074. return res
  2075. }
  2076. /**
  2077. * Perform no operation.
  2078. */
  2079. function noop () {}
  2080. /**
  2081. * Always return false.
  2082. */
  2083. var no = function () { return false; };
  2084. /**
  2085. * Return same value
  2086. */
  2087. var identity = function (_) { return _; };
  2088. /**
  2089. * Generate a static keys string from compiler modules.
  2090. */
  2091. function genStaticKeys (modules) {
  2092. return modules.reduce(function (keys, m) {
  2093. return keys.concat(m.staticKeys || [])
  2094. }, []).join(',')
  2095. }
  2096. /**
  2097. * Check if two values are loosely equal - that is,
  2098. * if they are plain objects, do they have the same shape?
  2099. */
  2100. function looseEqual (a, b) {
  2101. var isObjectA = isObject(a);
  2102. var isObjectB = isObject(b);
  2103. if (isObjectA && isObjectB) {
  2104. try {
  2105. return JSON.stringify(a) === JSON.stringify(b)
  2106. } catch (e) {
  2107. // possible circular reference
  2108. return a === b
  2109. }
  2110. } else if (!isObjectA && !isObjectB) {
  2111. return String(a) === String(b)
  2112. } else {
  2113. return false
  2114. }
  2115. }
  2116. function looseIndexOf (arr, val) {
  2117. for (var i = 0; i < arr.length; i++) {
  2118. if (looseEqual(arr[i], val)) { return i }
  2119. }
  2120. return -1
  2121. }
  2122. /**
  2123. * Ensure a function is called only once.
  2124. */
  2125. function once (fn) {
  2126. var called = false;
  2127. return function () {
  2128. if (!called) {
  2129. called = true;
  2130. fn.apply(this, arguments);
  2131. }
  2132. }
  2133. }
  2134. var SSR_ATTR = 'data-server-rendered';
  2135. var ASSET_TYPES = [
  2136. 'component',
  2137. 'directive',
  2138. 'filter'
  2139. ];
  2140. var LIFECYCLE_HOOKS = [
  2141. 'beforeCreate',
  2142. 'created',
  2143. 'beforeMount',
  2144. 'mounted',
  2145. 'beforeUpdate',
  2146. 'updated',
  2147. 'beforeDestroy',
  2148. 'destroyed',
  2149. 'activated',
  2150. 'deactivated'
  2151. ];
  2152. /* */
  2153. var config = ({
  2154. /**
  2155. * Option merge strategies (used in core/util/options)
  2156. */
  2157. optionMergeStrategies: Object.create(null),
  2158. /**
  2159. * Whether to suppress warnings.
  2160. */
  2161. silent: false,
  2162. /**
  2163. * Show production mode tip message on boot?
  2164. */
  2165. productionTip: process.env.NODE_ENV !== 'production',
  2166. /**
  2167. * Whether to enable devtools
  2168. */
  2169. devtools: process.env.NODE_ENV !== 'production',
  2170. /**
  2171. * Whether to record perf
  2172. */
  2173. performance: false,
  2174. /**
  2175. * Error handler for watcher errors
  2176. */
  2177. errorHandler: null,
  2178. /**
  2179. * Ignore certain custom elements
  2180. */
  2181. ignoredElements: [],
  2182. /**
  2183. * Custom user key aliases for v-on
  2184. */
  2185. keyCodes: Object.create(null),
  2186. /**
  2187. * Check if a tag is reserved so that it cannot be registered as a
  2188. * component. This is platform-dependent and may be overwritten.
  2189. */
  2190. isReservedTag: no,
  2191. /**
  2192. * Check if an attribute is reserved so that it cannot be used as a component
  2193. * prop. This is platform-dependent and may be overwritten.
  2194. */
  2195. isReservedAttr: no,
  2196. /**
  2197. * Check if a tag is an unknown element.
  2198. * Platform-dependent.
  2199. */
  2200. isUnknownElement: no,
  2201. /**
  2202. * Get the namespace of an element
  2203. */
  2204. getTagNamespace: noop,
  2205. /**
  2206. * Parse the real tag name for the specific platform.
  2207. */
  2208. parsePlatformTagName: identity,
  2209. /**
  2210. * Check if an attribute must be bound using property, e.g. value
  2211. * Platform-dependent.
  2212. */
  2213. mustUseProp: no,
  2214. /**
  2215. * Exposed for legacy reasons
  2216. */
  2217. _lifecycleHooks: LIFECYCLE_HOOKS
  2218. });
  2219. /* */
  2220. var emptyObject = Object.freeze({});
  2221. /**
  2222. * Check if a string starts with $ or _
  2223. */
  2224. function isReserved (str) {
  2225. var c = (str + '').charCodeAt(0);
  2226. return c === 0x24 || c === 0x5F
  2227. }
  2228. /**
  2229. * Define a property.
  2230. */
  2231. function def (obj, key, val, enumerable) {
  2232. Object.defineProperty(obj, key, {
  2233. value: val,
  2234. enumerable: !!enumerable,
  2235. writable: true,
  2236. configurable: true
  2237. });
  2238. }
  2239. /**
  2240. * Parse simple path.
  2241. */
  2242. var bailRE = /[^\w.$]/;
  2243. function parsePath (path) {
  2244. if (bailRE.test(path)) {
  2245. return
  2246. }
  2247. var segments = path.split('.');
  2248. return function (obj) {
  2249. for (var i = 0; i < segments.length; i++) {
  2250. if (!obj) { return }
  2251. obj = obj[segments[i]];
  2252. }
  2253. return obj
  2254. }
  2255. }
  2256. /* */
  2257. var warn = noop;
  2258. var tip = noop;
  2259. var formatComponentName = (null); // work around flow check
  2260. if (process.env.NODE_ENV !== 'production') {
  2261. var hasConsole = typeof console !== 'undefined';
  2262. var classifyRE = /(?:^|[-_])(\w)/g;
  2263. var classify = function (str) { return str
  2264. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  2265. .replace(/[-_]/g, ''); };
  2266. warn = function (msg, vm) {
  2267. if (hasConsole && (!config.silent)) {
  2268. console.error("[Vue warn]: " + msg + (
  2269. vm ? generateComponentTrace(vm) : ''
  2270. ));
  2271. }
  2272. };
  2273. tip = function (msg, vm) {
  2274. if (hasConsole && (!config.silent)) {
  2275. console.warn("[Vue tip]: " + msg + (
  2276. vm ? generateComponentTrace(vm) : ''
  2277. ));
  2278. }
  2279. };
  2280. formatComponentName = function (vm, includeFile) {
  2281. if (vm.$root === vm) {
  2282. return '<Root>'
  2283. }
  2284. var name = typeof vm === 'string'
  2285. ? vm
  2286. : typeof vm === 'function' && vm.options
  2287. ? vm.options.name
  2288. : vm._isVue
  2289. ? vm.$options.name || vm.$options._componentTag
  2290. : vm.name;
  2291. var file = vm._isVue && vm.$options.__file;
  2292. if (!name && file) {
  2293. var match = file.match(/([^/\\]+)\.vue$/);
  2294. name = match && match[1];
  2295. }
  2296. return (
  2297. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  2298. (file && includeFile !== false ? (" at " + file) : '')
  2299. )
  2300. };
  2301. var repeat = function (str, n) {
  2302. var res = '';
  2303. while (n) {
  2304. if (n % 2 === 1) { res += str; }
  2305. if (n > 1) { str += str; }
  2306. n >>= 1;
  2307. }
  2308. return res
  2309. };
  2310. var generateComponentTrace = function (vm) {
  2311. if (vm._isVue && vm.$parent) {
  2312. var tree = [];
  2313. var currentRecursiveSequence = 0;
  2314. while (vm) {
  2315. if (tree.length > 0) {
  2316. var last = tree[tree.length - 1];
  2317. if (last.constructor === vm.constructor) {
  2318. currentRecursiveSequence++;
  2319. vm = vm.$parent;
  2320. continue
  2321. } else if (currentRecursiveSequence > 0) {
  2322. tree[tree.length - 1] = [last, currentRecursiveSequence];
  2323. currentRecursiveSequence = 0;
  2324. }
  2325. }
  2326. tree.push(vm);
  2327. vm = vm.$parent;
  2328. }
  2329. return '\n\nfound in\n\n' + tree
  2330. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  2331. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  2332. : formatComponentName(vm))); })
  2333. .join('\n')
  2334. } else {
  2335. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  2336. }
  2337. };
  2338. }
  2339. /* */
  2340. function handleError (err, vm, info) {
  2341. if (config.errorHandler) {
  2342. config.errorHandler.call(null, err, vm, info);
  2343. } else {
  2344. if (process.env.NODE_ENV !== 'production') {
  2345. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  2346. }
  2347. /* istanbul ignore else */
  2348. if (inBrowser && typeof console !== 'undefined') {
  2349. console.error(err);
  2350. } else {
  2351. throw err
  2352. }
  2353. }
  2354. }
  2355. /* */
  2356. /* globals MutationObserver */
  2357. // can we use __proto__?
  2358. var hasProto = '__proto__' in {};
  2359. // Browser environment sniffing
  2360. var inBrowser = typeof window !== 'undefined';
  2361. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  2362. var isIE = UA && /msie|trident/.test(UA);
  2363. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  2364. var isEdge = UA && UA.indexOf('edge/') > 0;
  2365. var isAndroid = UA && UA.indexOf('android') > 0;
  2366. var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);
  2367. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  2368. var supportsPassive = false;
  2369. if (inBrowser) {
  2370. try {
  2371. var opts = {};
  2372. Object.defineProperty(opts, 'passive', ({
  2373. get: function get () {
  2374. /* istanbul ignore next */
  2375. supportsPassive = true;
  2376. }
  2377. } )); // https://github.com/facebook/flow/issues/285
  2378. window.addEventListener('test-passive', null, opts);
  2379. } catch (e) {}
  2380. }
  2381. // this needs to be lazy-evaled because vue may be required before
  2382. // vue-server-renderer can set VUE_ENV
  2383. var _isServer;
  2384. var isServerRendering = function () {
  2385. if (_isServer === undefined) {
  2386. /* istanbul ignore if */
  2387. if (!inBrowser && typeof global !== 'undefined') {
  2388. // detect presence of vue-server-renderer and avoid
  2389. // Webpack shimming the process
  2390. _isServer = global['process'].env.VUE_ENV === 'server';
  2391. } else {
  2392. _isServer = false;
  2393. }
  2394. }
  2395. return _isServer
  2396. };
  2397. // detect devtools
  2398. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  2399. /* istanbul ignore next */
  2400. function isNative (Ctor) {
  2401. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  2402. }
  2403. var hasSymbol =
  2404. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  2405. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  2406. /**
  2407. * Defer a task to execute it asynchronously.
  2408. */
  2409. var nextTick = (function () {
  2410. var callbacks = [];
  2411. var pending = false;
  2412. var timerFunc;
  2413. function nextTickHandler () {
  2414. pending = false;
  2415. var copies = callbacks.slice(0);
  2416. callbacks.length = 0;
  2417. for (var i = 0; i < copies.length; i++) {
  2418. copies[i]();
  2419. }
  2420. }
  2421. // the nextTick behavior leverages the microtask queue, which can be accessed
  2422. // via either native Promise.then or MutationObserver.
  2423. // MutationObserver has wider support, however it is seriously bugged in
  2424. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  2425. // completely stops working after triggering a few times... so, if native
  2426. // Promise is available, we will use it:
  2427. /* istanbul ignore if */
  2428. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  2429. var p = Promise.resolve();
  2430. var logError = function (err) { console.error(err); };
  2431. timerFunc = function () {
  2432. p.then(nextTickHandler).catch(logError);
  2433. // in problematic UIWebViews, Promise.then doesn't completely break, but
  2434. // it can get stuck in a weird state where callbacks are pushed into the
  2435. // microtask queue but the queue isn't being flushed, until the browser
  2436. // needs to do some other work, e.g. handle a timer. Therefore we can
  2437. // "force" the microtask queue to be flushed by adding an empty timer.
  2438. if (isIOS) { setTimeout(noop); }
  2439. };
  2440. } else if (typeof MutationObserver !== 'undefined' && (
  2441. isNative(MutationObserver) ||
  2442. // PhantomJS and iOS 7.x
  2443. MutationObserver.toString() === '[object MutationObserverConstructor]'
  2444. )) {
  2445. // use MutationObserver where native Promise is not available,
  2446. // e.g. PhantomJS IE11, iOS7, Android 4.4
  2447. var counter = 1;
  2448. var observer = new MutationObserver(nextTickHandler);
  2449. var textNode = document.createTextNode(String(counter));
  2450. observer.observe(textNode, {
  2451. characterData: true
  2452. });
  2453. timerFunc = function () {
  2454. counter = (counter + 1) % 2;
  2455. textNode.data = String(counter);
  2456. };
  2457. } else {
  2458. // fallback to setTimeout
  2459. /* istanbul ignore next */
  2460. timerFunc = function () {
  2461. setTimeout(nextTickHandler, 0);
  2462. };
  2463. }
  2464. return function queueNextTick (cb, ctx) {
  2465. var _resolve;
  2466. callbacks.push(function () {
  2467. if (cb) {
  2468. try {
  2469. cb.call(ctx);
  2470. } catch (e) {
  2471. handleError(e, ctx, 'nextTick');
  2472. }
  2473. } else if (_resolve) {
  2474. _resolve(ctx);
  2475. }
  2476. });
  2477. if (!pending) {
  2478. pending = true;
  2479. timerFunc();
  2480. }
  2481. if (!cb && typeof Promise !== 'undefined') {
  2482. return new Promise(function (resolve, reject) {
  2483. _resolve = resolve;
  2484. })
  2485. }
  2486. }
  2487. })();
  2488. var _Set;
  2489. /* istanbul ignore if */
  2490. if (typeof Set !== 'undefined' && isNative(Set)) {
  2491. // use native Set when available.
  2492. _Set = Set;
  2493. } else {
  2494. // a non-standard Set polyfill that only works with primitive keys.
  2495. _Set = (function () {
  2496. function Set () {
  2497. this.set = Object.create(null);
  2498. }
  2499. Set.prototype.has = function has (key) {
  2500. return this.set[key] === true
  2501. };
  2502. Set.prototype.add = function add (key) {
  2503. this.set[key] = true;
  2504. };
  2505. Set.prototype.clear = function clear () {
  2506. this.set = Object.create(null);
  2507. };
  2508. return Set;
  2509. }());
  2510. }
  2511. /* */
  2512. var uid = 0;
  2513. /**
  2514. * A dep is an observable that can have multiple
  2515. * directives subscribing to it.
  2516. */
  2517. var Dep = function Dep () {
  2518. this.id = uid++;
  2519. this.subs = [];
  2520. };
  2521. Dep.prototype.addSub = function addSub (sub) {
  2522. this.subs.push(sub);
  2523. };
  2524. Dep.prototype.removeSub = function removeSub (sub) {
  2525. remove(this.subs, sub);
  2526. };
  2527. Dep.prototype.depend = function depend () {
  2528. if (Dep.target) {
  2529. Dep.target.addDep(this);
  2530. }
  2531. };
  2532. Dep.prototype.notify = function notify () {
  2533. // stabilize the subscriber list first
  2534. var subs = this.subs.slice();
  2535. for (var i = 0, l = subs.length; i < l; i++) {
  2536. subs[i].update();
  2537. }
  2538. };
  2539. // the current target watcher being evaluated.
  2540. // this is globally unique because there could be only one
  2541. // watcher being evaluated at any time.
  2542. Dep.target = null;
  2543. var targetStack = [];
  2544. function pushTarget (_target) {
  2545. if (Dep.target) { targetStack.push(Dep.target); }
  2546. Dep.target = _target;
  2547. }
  2548. function popTarget () {
  2549. Dep.target = targetStack.pop();
  2550. }
  2551. /*
  2552. * not type checking this file because flow doesn't play well with
  2553. * dynamically accessing methods on Array prototype
  2554. */
  2555. var arrayProto = Array.prototype;
  2556. var arrayMethods = Object.create(arrayProto);[
  2557. 'push',
  2558. 'pop',
  2559. 'shift',
  2560. 'unshift',
  2561. 'splice',
  2562. 'sort',
  2563. 'reverse'
  2564. ]
  2565. .forEach(function (method) {
  2566. // cache original method
  2567. var original = arrayProto[method];
  2568. def(arrayMethods, method, function mutator () {
  2569. var arguments$1 = arguments;
  2570. // avoid leaking arguments:
  2571. // http://jsperf.com/closure-with-arguments
  2572. var i = arguments.length;
  2573. var args = new Array(i);
  2574. while (i--) {
  2575. args[i] = arguments$1[i];
  2576. }
  2577. var result = original.apply(this, args);
  2578. var ob = this.__ob__;
  2579. var inserted;
  2580. switch (method) {
  2581. case 'push':
  2582. inserted = args;
  2583. break
  2584. case 'unshift':
  2585. inserted = args;
  2586. break
  2587. case 'splice':
  2588. inserted = args.slice(2);
  2589. break
  2590. }
  2591. if (inserted) { ob.observeArray(inserted); }
  2592. // notify change
  2593. ob.dep.notify();
  2594. return result
  2595. });
  2596. });
  2597. /* */
  2598. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  2599. /**
  2600. * By default, when a reactive property is set, the new value is
  2601. * also converted to become reactive. However when passing down props,
  2602. * we don't want to force conversion because the value may be a nested value
  2603. * under a frozen data structure. Converting it would defeat the optimization.
  2604. */
  2605. var observerState = {
  2606. shouldConvert: true,
  2607. isSettingProps: false
  2608. };
  2609. /**
  2610. * Observer class that are attached to each observed
  2611. * object. Once attached, the observer converts target
  2612. * object's property keys into getter/setters that
  2613. * collect dependencies and dispatches updates.
  2614. */
  2615. var Observer = function Observer (value) {
  2616. this.value = value;
  2617. this.dep = new Dep();
  2618. this.vmCount = 0;
  2619. def(value, '__ob__', this);
  2620. if (Array.isArray(value)) {
  2621. var augment = hasProto
  2622. ? protoAugment
  2623. : copyAugment;
  2624. augment(value, arrayMethods, arrayKeys);
  2625. this.observeArray(value);
  2626. } else {
  2627. this.walk(value);
  2628. }
  2629. };
  2630. /**
  2631. * Walk through each property and convert them into
  2632. * getter/setters. This method should only be called when
  2633. * value type is Object.
  2634. */
  2635. Observer.prototype.walk = function walk (obj) {
  2636. var keys = Object.keys(obj);
  2637. for (var i = 0; i < keys.length; i++) {
  2638. defineReactive$$1(obj, keys[i], obj[keys[i]]);
  2639. }
  2640. };
  2641. /**
  2642. * Observe a list of Array items.
  2643. */
  2644. Observer.prototype.observeArray = function observeArray (items) {
  2645. for (var i = 0, l = items.length; i < l; i++) {
  2646. observe(items[i]);
  2647. }
  2648. };
  2649. // helpers
  2650. /**
  2651. * Augment an target Object or Array by intercepting
  2652. * the prototype chain using __proto__
  2653. */
  2654. function protoAugment (target, src) {
  2655. /* eslint-disable no-proto */
  2656. target.__proto__ = src;
  2657. /* eslint-enable no-proto */
  2658. }
  2659. /**
  2660. * Augment an target Object or Array by defining
  2661. * hidden properties.
  2662. */
  2663. /* istanbul ignore next */
  2664. function copyAugment (target, src, keys) {
  2665. for (var i = 0, l = keys.length; i < l; i++) {
  2666. var key = keys[i];
  2667. def(target, key, src[key]);
  2668. }
  2669. }
  2670. /**
  2671. * Attempt to create an observer instance for a value,
  2672. * returns the new observer if successfully observed,
  2673. * or the existing observer if the value already has one.
  2674. */
  2675. function observe (value, asRootData) {
  2676. if (!isObject(value)) {
  2677. return
  2678. }
  2679. var ob;
  2680. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  2681. ob = value.__ob__;
  2682. } else if (
  2683. observerState.shouldConvert &&
  2684. !isServerRendering() &&
  2685. (Array.isArray(value) || isPlainObject(value)) &&
  2686. Object.isExtensible(value) &&
  2687. !value._isVue
  2688. ) {
  2689. ob = new Observer(value);
  2690. }
  2691. if (asRootData && ob) {
  2692. ob.vmCount++;
  2693. }
  2694. return ob
  2695. }
  2696. /**
  2697. * Define a reactive property on an Object.
  2698. */
  2699. function defineReactive$$1 (
  2700. obj,
  2701. key,
  2702. val,
  2703. customSetter
  2704. ) {
  2705. var dep = new Dep();
  2706. var property = Object.getOwnPropertyDescriptor(obj, key);
  2707. if (property && property.configurable === false) {
  2708. return
  2709. }
  2710. // cater for pre-defined getter/setters
  2711. var getter = property && property.get;
  2712. var setter = property && property.set;
  2713. var childOb = observe(val);
  2714. Object.defineProperty(obj, key, {
  2715. enumerable: true,
  2716. configurable: true,
  2717. get: function reactiveGetter () {
  2718. var value = getter ? getter.call(obj) : val;
  2719. if (Dep.target) {
  2720. dep.depend();
  2721. if (childOb) {
  2722. childOb.dep.depend();
  2723. }
  2724. if (Array.isArray(value)) {
  2725. dependArray(value);
  2726. }
  2727. }
  2728. return value
  2729. },
  2730. set: function reactiveSetter (newVal) {
  2731. var value = getter ? getter.call(obj) : val;
  2732. /* eslint-disable no-self-compare */
  2733. if (newVal === value || (newVal !== newVal && value !== value)) {
  2734. return
  2735. }
  2736. /* eslint-enable no-self-compare */
  2737. if (process.env.NODE_ENV !== 'production' && customSetter) {
  2738. customSetter();
  2739. }
  2740. if (setter) {
  2741. setter.call(obj, newVal);
  2742. } else {
  2743. val = newVal;
  2744. }
  2745. childOb = observe(newVal);
  2746. dep.notify();
  2747. }
  2748. });
  2749. }
  2750. /**
  2751. * Set a property on an object. Adds the new property and
  2752. * triggers change notification if the property doesn't
  2753. * already exist.
  2754. */
  2755. function set (target, key, val) {
  2756. if (Array.isArray(target) && typeof key === 'number') {
  2757. target.length = Math.max(target.length, key);
  2758. target.splice(key, 1, val);
  2759. return val
  2760. }
  2761. if (hasOwn(target, key)) {
  2762. target[key] = val;
  2763. return val
  2764. }
  2765. var ob = (target ).__ob__;
  2766. if (target._isVue || (ob && ob.vmCount)) {
  2767. process.env.NODE_ENV !== 'production' && warn(
  2768. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  2769. 'at runtime - declare it upfront in the data option.'
  2770. );
  2771. return val
  2772. }
  2773. if (!ob) {
  2774. target[key] = val;
  2775. return val
  2776. }
  2777. defineReactive$$1(ob.value, key, val);
  2778. ob.dep.notify();
  2779. return val
  2780. }
  2781. /**
  2782. * Delete a property and trigger change if necessary.
  2783. */
  2784. function del (target, key) {
  2785. if (Array.isArray(target) && typeof key === 'number') {
  2786. target.splice(key, 1);
  2787. return
  2788. }
  2789. var ob = (target ).__ob__;
  2790. if (target._isVue || (ob && ob.vmCount)) {
  2791. process.env.NODE_ENV !== 'production' && warn(
  2792. 'Avoid deleting properties on a Vue instance or its root $data ' +
  2793. '- just set it to null.'
  2794. );
  2795. return
  2796. }
  2797. if (!hasOwn(target, key)) {
  2798. return
  2799. }
  2800. delete target[key];
  2801. if (!ob) {
  2802. return
  2803. }
  2804. ob.dep.notify();
  2805. }
  2806. /**
  2807. * Collect dependencies on array elements when the array is touched, since
  2808. * we cannot intercept array element access like property getters.
  2809. */
  2810. function dependArray (value) {
  2811. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  2812. e = value[i];
  2813. e && e.__ob__ && e.__ob__.dep.depend();
  2814. if (Array.isArray(e)) {
  2815. dependArray(e);
  2816. }
  2817. }
  2818. }
  2819. /* */
  2820. /**
  2821. * Option overwriting strategies are functions that handle
  2822. * how to merge a parent option value and a child option
  2823. * value into the final value.
  2824. */
  2825. var strats = config.optionMergeStrategies;
  2826. /**
  2827. * Options with restrictions
  2828. */
  2829. if (process.env.NODE_ENV !== 'production') {
  2830. strats.el = strats.propsData = function (parent, child, vm, key) {
  2831. if (!vm) {
  2832. warn(
  2833. "option \"" + key + "\" can only be used during instance " +
  2834. 'creation with the `new` keyword.'
  2835. );
  2836. }
  2837. return defaultStrat(parent, child)
  2838. };
  2839. }
  2840. /**
  2841. * Helper that recursively merges two data objects together.
  2842. */
  2843. function mergeData (to, from) {
  2844. if (!from) { return to }
  2845. var key, toVal, fromVal;
  2846. var keys = Object.keys(from);
  2847. for (var i = 0; i < keys.length; i++) {
  2848. key = keys[i];
  2849. toVal = to[key];
  2850. fromVal = from[key];
  2851. if (!hasOwn(to, key)) {
  2852. set(to, key, fromVal);
  2853. } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {
  2854. mergeData(toVal, fromVal);
  2855. }
  2856. }
  2857. return to
  2858. }
  2859. /**
  2860. * Data
  2861. */
  2862. strats.data = function (
  2863. parentVal,
  2864. childVal,
  2865. vm
  2866. ) {
  2867. if (!vm) {
  2868. // in a Vue.extend merge, both should be functions
  2869. if (!childVal) {
  2870. return parentVal
  2871. }
  2872. if (typeof childVal !== 'function') {
  2873. process.env.NODE_ENV !== 'production' && warn(
  2874. 'The "data" option should be a function ' +
  2875. 'that returns a per-instance value in component ' +
  2876. 'definitions.',
  2877. vm
  2878. );
  2879. return parentVal
  2880. }
  2881. if (!parentVal) {
  2882. return childVal
  2883. }
  2884. // when parentVal & childVal are both present,
  2885. // we need to return a function that returns the
  2886. // merged result of both functions... no need to
  2887. // check if parentVal is a function here because
  2888. // it has to be a function to pass previous merges.
  2889. return function mergedDataFn () {
  2890. return mergeData(
  2891. childVal.call(this),
  2892. parentVal.call(this)
  2893. )
  2894. }
  2895. } else if (parentVal || childVal) {
  2896. return function mergedInstanceDataFn () {
  2897. // instance merge
  2898. var instanceData = typeof childVal === 'function'
  2899. ? childVal.call(vm)
  2900. : childVal;
  2901. var defaultData = typeof parentVal === 'function'
  2902. ? parentVal.call(vm)
  2903. : undefined;
  2904. if (instanceData) {
  2905. return mergeData(instanceData, defaultData)
  2906. } else {
  2907. return defaultData
  2908. }
  2909. }
  2910. }
  2911. };
  2912. /**
  2913. * Hooks and props are merged as arrays.
  2914. */
  2915. function mergeHook (
  2916. parentVal,
  2917. childVal
  2918. ) {
  2919. return childVal
  2920. ? parentVal
  2921. ? parentVal.concat(childVal)
  2922. : Array.isArray(childVal)
  2923. ? childVal
  2924. : [childVal]
  2925. : parentVal
  2926. }
  2927. LIFECYCLE_HOOKS.forEach(function (hook) {
  2928. strats[hook] = mergeHook;
  2929. });
  2930. /**
  2931. * Assets
  2932. *
  2933. * When a vm is present (instance creation), we need to do
  2934. * a three-way merge between constructor options, instance
  2935. * options and parent options.
  2936. */
  2937. function mergeAssets (parentVal, childVal) {
  2938. var res = Object.create(parentVal || null);
  2939. return childVal
  2940. ? extend(res, childVal)
  2941. : res
  2942. }
  2943. ASSET_TYPES.forEach(function (type) {
  2944. strats[type + 's'] = mergeAssets;
  2945. });
  2946. /**
  2947. * Watchers.
  2948. *
  2949. * Watchers hashes should not overwrite one
  2950. * another, so we merge them as arrays.
  2951. */
  2952. strats.watch = function (parentVal, childVal) {
  2953. /* istanbul ignore if */
  2954. if (!childVal) { return Object.create(parentVal || null) }
  2955. if (!parentVal) { return childVal }
  2956. var ret = {};
  2957. extend(ret, parentVal);
  2958. for (var key in childVal) {
  2959. var parent = ret[key];
  2960. var child = childVal[key];
  2961. if (parent && !Array.isArray(parent)) {
  2962. parent = [parent];
  2963. }
  2964. ret[key] = parent
  2965. ? parent.concat(child)
  2966. : [child];
  2967. }
  2968. return ret
  2969. };
  2970. /**
  2971. * Other object hashes.
  2972. */
  2973. strats.props =
  2974. strats.methods =
  2975. strats.computed = function (parentVal, childVal) {
  2976. if (!childVal) { return Object.create(parentVal || null) }
  2977. if (!parentVal) { return childVal }
  2978. var ret = Object.create(null);
  2979. extend(ret, parentVal);
  2980. extend(ret, childVal);
  2981. return ret
  2982. };
  2983. /**
  2984. * Default strategy.
  2985. */
  2986. var defaultStrat = function (parentVal, childVal) {
  2987. return childVal === undefined
  2988. ? parentVal
  2989. : childVal
  2990. };
  2991. /**
  2992. * Validate component names
  2993. */
  2994. function checkComponents (options) {
  2995. for (var key in options.components) {
  2996. var lower = key.toLowerCase();
  2997. if (isBuiltInTag(lower) || config.isReservedTag(lower)) {
  2998. warn(
  2999. 'Do not use built-in or reserved HTML elements as component ' +
  3000. 'id: ' + key
  3001. );
  3002. }
  3003. }
  3004. }
  3005. /**
  3006. * Ensure all props option syntax are normalized into the
  3007. * Object-based format.
  3008. */
  3009. function normalizeProps (options) {
  3010. var props = options.props;
  3011. if (!props) { return }
  3012. var res = {};
  3013. var i, val, name;
  3014. if (Array.isArray(props)) {
  3015. i = props.length;
  3016. while (i--) {
  3017. val = props[i];
  3018. if (typeof val === 'string') {
  3019. name = camelize(val);
  3020. res[name] = { type: null };
  3021. } else if (process.env.NODE_ENV !== 'production') {
  3022. warn('props must be strings when using array syntax.');
  3023. }
  3024. }
  3025. } else if (isPlainObject(props)) {
  3026. for (var key in props) {
  3027. val = props[key];
  3028. name = camelize(key);
  3029. res[name] = isPlainObject(val)
  3030. ? val
  3031. : { type: val };
  3032. }
  3033. }
  3034. options.props = res;
  3035. }
  3036. /**
  3037. * Normalize raw function directives into object format.
  3038. */
  3039. function normalizeDirectives (options) {
  3040. var dirs = options.directives;
  3041. if (dirs) {
  3042. for (var key in dirs) {
  3043. var def = dirs[key];
  3044. if (typeof def === 'function') {
  3045. dirs[key] = { bind: def, update: def };
  3046. }
  3047. }
  3048. }
  3049. }
  3050. /**
  3051. * Merge two option objects into a new one.
  3052. * Core utility used in both instantiation and inheritance.
  3053. */
  3054. function mergeOptions (
  3055. parent,
  3056. child,
  3057. vm
  3058. ) {
  3059. if (process.env.NODE_ENV !== 'production') {
  3060. checkComponents(child);
  3061. }
  3062. if (typeof child === 'function') {
  3063. child = child.options;
  3064. }
  3065. normalizeProps(child);
  3066. normalizeDirectives(child);
  3067. var extendsFrom = child.extends;
  3068. if (extendsFrom) {
  3069. parent = mergeOptions(parent, extendsFrom, vm);
  3070. }
  3071. if (child.mixins) {
  3072. for (var i = 0, l = child.mixins.length; i < l; i++) {
  3073. parent = mergeOptions(parent, child.mixins[i], vm);
  3074. }
  3075. }
  3076. var options = {};
  3077. var key;
  3078. for (key in parent) {
  3079. mergeField(key);
  3080. }
  3081. for (key in child) {
  3082. if (!hasOwn(parent, key)) {
  3083. mergeField(key);
  3084. }
  3085. }
  3086. function mergeField (key) {
  3087. var strat = strats[key] || defaultStrat;
  3088. options[key] = strat(parent[key], child[key], vm, key);
  3089. }
  3090. return options
  3091. }
  3092. /**
  3093. * Resolve an asset.
  3094. * This function is used because child instances need access
  3095. * to assets defined in its ancestor chain.
  3096. */
  3097. function resolveAsset (
  3098. options,
  3099. type,
  3100. id,
  3101. warnMissing
  3102. ) {
  3103. /* istanbul ignore if */
  3104. if (typeof id !== 'string') {
  3105. return
  3106. }
  3107. var assets = options[type];
  3108. // check local registration variations first
  3109. if (hasOwn(assets, id)) { return assets[id] }
  3110. var camelizedId = camelize(id);
  3111. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  3112. var PascalCaseId = capitalize(camelizedId);
  3113. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  3114. // fallback to prototype chain
  3115. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  3116. if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {
  3117. warn(
  3118. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  3119. options
  3120. );
  3121. }
  3122. return res
  3123. }
  3124. /* */
  3125. function validateProp (
  3126. key,
  3127. propOptions,
  3128. propsData,
  3129. vm
  3130. ) {
  3131. var prop = propOptions[key];
  3132. var absent = !hasOwn(propsData, key);
  3133. var value = propsData[key];
  3134. // handle boolean props
  3135. if (isType(Boolean, prop.type)) {
  3136. if (absent && !hasOwn(prop, 'default')) {
  3137. value = false;
  3138. } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) {
  3139. value = true;
  3140. }
  3141. }
  3142. // check default value
  3143. if (value === undefined) {
  3144. value = getPropDefaultValue(vm, prop, key);
  3145. // since the default value is a fresh copy,
  3146. // make sure to observe it.
  3147. var prevShouldConvert = observerState.shouldConvert;
  3148. observerState.shouldConvert = true;
  3149. observe(value);
  3150. observerState.shouldConvert = prevShouldConvert;
  3151. }
  3152. if (process.env.NODE_ENV !== 'production') {
  3153. assertProp(prop, key, value, vm, absent);
  3154. }
  3155. return value
  3156. }
  3157. /**
  3158. * Get the default value of a prop.
  3159. */
  3160. function getPropDefaultValue (vm, prop, key) {
  3161. // no default, return undefined
  3162. if (!hasOwn(prop, 'default')) {
  3163. return undefined
  3164. }
  3165. var def = prop.default;
  3166. // warn against non-factory defaults for Object & Array
  3167. if (process.env.NODE_ENV !== 'production' && isObject(def)) {
  3168. warn(
  3169. 'Invalid default value for prop "' + key + '": ' +
  3170. 'Props with type Object/Array must use a factory function ' +
  3171. 'to return the default value.',
  3172. vm
  3173. );
  3174. }
  3175. // the raw prop value was also undefined from previous render,
  3176. // return previous default value to avoid unnecessary watcher trigger
  3177. if (vm && vm.$options.propsData &&
  3178. vm.$options.propsData[key] === undefined &&
  3179. vm._props[key] !== undefined
  3180. ) {
  3181. return vm._props[key]
  3182. }
  3183. // call factory function for non-Function types
  3184. // a value is Function if its prototype is function even across different execution context
  3185. return typeof def === 'function' && getType(prop.type) !== 'Function'
  3186. ? def.call(vm)
  3187. : def
  3188. }
  3189. /**
  3190. * Assert whether a prop is valid.
  3191. */
  3192. function assertProp (
  3193. prop,
  3194. name,
  3195. value,
  3196. vm,
  3197. absent
  3198. ) {
  3199. if (prop.required && absent) {
  3200. warn(
  3201. 'Missing required prop: "' + name + '"',
  3202. vm
  3203. );
  3204. return
  3205. }
  3206. if (value == null && !prop.required) {
  3207. return
  3208. }
  3209. var type = prop.type;
  3210. var valid = !type || type === true;
  3211. var expectedTypes = [];
  3212. if (type) {
  3213. if (!Array.isArray(type)) {
  3214. type = [type];
  3215. }
  3216. for (var i = 0; i < type.length && !valid; i++) {
  3217. var assertedType = assertType(value, type[i]);
  3218. expectedTypes.push(assertedType.expectedType || '');
  3219. valid = assertedType.valid;
  3220. }
  3221. }
  3222. if (!valid) {
  3223. warn(
  3224. 'Invalid prop: type check failed for prop "' + name + '".' +
  3225. ' Expected ' + expectedTypes.map(capitalize).join(', ') +
  3226. ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',
  3227. vm
  3228. );
  3229. return
  3230. }
  3231. var validator = prop.validator;
  3232. if (validator) {
  3233. if (!validator(value)) {
  3234. warn(
  3235. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  3236. vm
  3237. );
  3238. }
  3239. }
  3240. }
  3241. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  3242. function assertType (value, type) {
  3243. var valid;
  3244. var expectedType = getType(type);
  3245. if (simpleCheckRE.test(expectedType)) {
  3246. valid = typeof value === expectedType.toLowerCase();
  3247. } else if (expectedType === 'Object') {
  3248. valid = isPlainObject(value);
  3249. } else if (expectedType === 'Array') {
  3250. valid = Array.isArray(value);
  3251. } else {
  3252. valid = value instanceof type;
  3253. }
  3254. return {
  3255. valid: valid,
  3256. expectedType: expectedType
  3257. }
  3258. }
  3259. /**
  3260. * Use function string name to check built-in types,
  3261. * because a simple equality check will fail when running
  3262. * across different vms / iframes.
  3263. */
  3264. function getType (fn) {
  3265. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  3266. return match ? match[1] : ''
  3267. }
  3268. function isType (type, fn) {
  3269. if (!Array.isArray(fn)) {
  3270. return getType(fn) === getType(type)
  3271. }
  3272. for (var i = 0, len = fn.length; i < len; i++) {
  3273. if (getType(fn[i]) === getType(type)) {
  3274. return true
  3275. }
  3276. }
  3277. /* istanbul ignore next */
  3278. return false
  3279. }
  3280. /* */
  3281. var mark;
  3282. var measure;
  3283. if (process.env.NODE_ENV !== 'production') {
  3284. var perf = inBrowser && window.performance;
  3285. /* istanbul ignore if */
  3286. if (
  3287. perf &&
  3288. perf.mark &&
  3289. perf.measure &&
  3290. perf.clearMarks &&
  3291. perf.clearMeasures
  3292. ) {
  3293. mark = function (tag) { return perf.mark(tag); };
  3294. measure = function (name, startTag, endTag) {
  3295. perf.measure(name, startTag, endTag);
  3296. perf.clearMarks(startTag);
  3297. perf.clearMarks(endTag);
  3298. perf.clearMeasures(name);
  3299. };
  3300. }
  3301. }
  3302. /* not type checking this file because flow doesn't play well with Proxy */
  3303. var initProxy;
  3304. if (process.env.NODE_ENV !== 'production') {
  3305. var allowedGlobals = makeMap(
  3306. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  3307. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  3308. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  3309. 'require' // for Webpack/Browserify
  3310. );
  3311. var warnNonPresent = function (target, key) {
  3312. warn(
  3313. "Property or method \"" + key + "\" is not defined on the instance but " +
  3314. "referenced during render. Make sure to declare reactive data " +
  3315. "properties in the data option.",
  3316. target
  3317. );
  3318. };
  3319. var hasProxy =
  3320. typeof Proxy !== 'undefined' &&
  3321. Proxy.toString().match(/native code/);
  3322. if (hasProxy) {
  3323. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta');
  3324. config.keyCodes = new Proxy(config.keyCodes, {
  3325. set: function set (target, key, value) {
  3326. if (isBuiltInModifier(key)) {
  3327. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  3328. return false
  3329. } else {
  3330. target[key] = value;
  3331. return true
  3332. }
  3333. }
  3334. });
  3335. }
  3336. var hasHandler = {
  3337. has: function has (target, key) {
  3338. var has = key in target;
  3339. var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';
  3340. if (!has && !isAllowed) {
  3341. warnNonPresent(target, key);
  3342. }
  3343. return has || !isAllowed
  3344. }
  3345. };
  3346. var getHandler = {
  3347. get: function get (target, key) {
  3348. if (typeof key === 'string' && !(key in target)) {
  3349. warnNonPresent(target, key);
  3350. }
  3351. return target[key]
  3352. }
  3353. };
  3354. initProxy = function initProxy (vm) {
  3355. if (hasProxy) {
  3356. // determine which proxy handler to use
  3357. var options = vm.$options;
  3358. var handlers = options.render && options.render._withStripped
  3359. ? getHandler
  3360. : hasHandler;
  3361. vm._renderProxy = new Proxy(vm, handlers);
  3362. } else {
  3363. vm._renderProxy = vm;
  3364. }
  3365. };
  3366. }
  3367. /* */
  3368. var VNode = function VNode (
  3369. tag,
  3370. data,
  3371. children,
  3372. text,
  3373. elm,
  3374. context,
  3375. componentOptions
  3376. ) {
  3377. this.tag = tag;
  3378. this.data = data;
  3379. this.children = children;
  3380. this.text = text;
  3381. this.elm = elm;
  3382. this.ns = undefined;
  3383. this.context = context;
  3384. this.functionalContext = undefined;
  3385. this.key = data && data.key;
  3386. this.componentOptions = componentOptions;
  3387. this.componentInstance = undefined;
  3388. this.parent = undefined;
  3389. this.raw = false;
  3390. this.isStatic = false;
  3391. this.isRootInsert = true;
  3392. this.isComment = false;
  3393. this.isCloned = false;
  3394. this.isOnce = false;
  3395. };
  3396. var prototypeAccessors = { child: {} };
  3397. // DEPRECATED: alias for componentInstance for backwards compat.
  3398. /* istanbul ignore next */
  3399. prototypeAccessors.child.get = function () {
  3400. return this.componentInstance
  3401. };
  3402. Object.defineProperties( VNode.prototype, prototypeAccessors );
  3403. var createEmptyVNode = function () {
  3404. var node = new VNode();
  3405. node.text = '';
  3406. node.isComment = true;
  3407. return node
  3408. };
  3409. function createTextVNode (val) {
  3410. return new VNode(undefined, undefined, undefined, String(val))
  3411. }
  3412. // optimized shallow clone
  3413. // used for static nodes and slot nodes because they may be reused across
  3414. // multiple renders, cloning them avoids errors when DOM manipulations rely
  3415. // on their elm reference.
  3416. function cloneVNode (vnode) {
  3417. var cloned = new VNode(
  3418. vnode.tag,
  3419. vnode.data,
  3420. vnode.children,
  3421. vnode.text,
  3422. vnode.elm,
  3423. vnode.context,
  3424. vnode.componentOptions
  3425. );
  3426. cloned.ns = vnode.ns;
  3427. cloned.isStatic = vnode.isStatic;
  3428. cloned.key = vnode.key;
  3429. cloned.isComment = vnode.isComment;
  3430. cloned.isCloned = true;
  3431. return cloned
  3432. }
  3433. function cloneVNodes (vnodes) {
  3434. var len = vnodes.length;
  3435. var res = new Array(len);
  3436. for (var i = 0; i < len; i++) {
  3437. res[i] = cloneVNode(vnodes[i]);
  3438. }
  3439. return res
  3440. }
  3441. /* */
  3442. var normalizeEvent = cached(function (name) {
  3443. var passive = name.charAt(0) === '&';
  3444. name = passive ? name.slice(1) : name;
  3445. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  3446. name = once$$1 ? name.slice(1) : name;
  3447. var capture = name.charAt(0) === '!';
  3448. name = capture ? name.slice(1) : name;
  3449. return {
  3450. name: name,
  3451. once: once$$1,
  3452. capture: capture,
  3453. passive: passive
  3454. }
  3455. });
  3456. function createFnInvoker (fns) {
  3457. function invoker () {
  3458. var arguments$1 = arguments;
  3459. var fns = invoker.fns;
  3460. if (Array.isArray(fns)) {
  3461. for (var i = 0; i < fns.length; i++) {
  3462. fns[i].apply(null, arguments$1);
  3463. }
  3464. } else {
  3465. // return handler return value for single handlers
  3466. return fns.apply(null, arguments)
  3467. }
  3468. }
  3469. invoker.fns = fns;
  3470. return invoker
  3471. }
  3472. function updateListeners (
  3473. on,
  3474. oldOn,
  3475. add,
  3476. remove$$1,
  3477. vm
  3478. ) {
  3479. var name, cur, old, event;
  3480. for (name in on) {
  3481. cur = on[name];
  3482. old = oldOn[name];
  3483. event = normalizeEvent(name);
  3484. if (isUndef(cur)) {
  3485. process.env.NODE_ENV !== 'production' && warn(
  3486. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  3487. vm
  3488. );
  3489. } else if (isUndef(old)) {
  3490. if (isUndef(cur.fns)) {
  3491. cur = on[name] = createFnInvoker(cur);
  3492. }
  3493. add(event.name, cur, event.once, event.capture, event.passive);
  3494. } else if (cur !== old) {
  3495. old.fns = cur;
  3496. on[name] = old;
  3497. }
  3498. }
  3499. for (name in oldOn) {
  3500. if (isUndef(on[name])) {
  3501. event = normalizeEvent(name);
  3502. remove$$1(event.name, oldOn[name], event.capture);
  3503. }
  3504. }
  3505. }
  3506. /* */
  3507. function mergeVNodeHook (def, hookKey, hook) {
  3508. var invoker;
  3509. var oldHook = def[hookKey];
  3510. function wrappedHook () {
  3511. hook.apply(this, arguments);
  3512. // important: remove merged hook to ensure it's called only once
  3513. // and prevent memory leak
  3514. remove(invoker.fns, wrappedHook);
  3515. }
  3516. if (isUndef(oldHook)) {
  3517. // no existing hook
  3518. invoker = createFnInvoker([wrappedHook]);
  3519. } else {
  3520. /* istanbul ignore if */
  3521. if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
  3522. // already a merged invoker
  3523. invoker = oldHook;
  3524. invoker.fns.push(wrappedHook);
  3525. } else {
  3526. // existing plain hook
  3527. invoker = createFnInvoker([oldHook, wrappedHook]);
  3528. }
  3529. }
  3530. invoker.merged = true;
  3531. def[hookKey] = invoker;
  3532. }
  3533. /* */
  3534. function extractPropsFromVNodeData (
  3535. data,
  3536. Ctor,
  3537. tag
  3538. ) {
  3539. // we are only extracting raw values here.
  3540. // validation and default values are handled in the child
  3541. // component itself.
  3542. var propOptions = Ctor.options.props;
  3543. if (isUndef(propOptions)) {
  3544. return
  3545. }
  3546. var res = {};
  3547. var attrs = data.attrs;
  3548. var props = data.props;
  3549. if (isDef(attrs) || isDef(props)) {
  3550. for (var key in propOptions) {
  3551. var altKey = hyphenate(key);
  3552. if (process.env.NODE_ENV !== 'production') {
  3553. var keyInLowerCase = key.toLowerCase();
  3554. if (
  3555. key !== keyInLowerCase &&
  3556. attrs && hasOwn(attrs, keyInLowerCase)
  3557. ) {
  3558. tip(
  3559. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  3560. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  3561. " \"" + key + "\". " +
  3562. "Note that HTML attributes are case-insensitive and camelCased " +
  3563. "props need to use their kebab-case equivalents when using in-DOM " +
  3564. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  3565. );
  3566. }
  3567. }
  3568. checkProp(res, props, key, altKey, true) ||
  3569. checkProp(res, attrs, key, altKey, false);
  3570. }
  3571. }
  3572. return res
  3573. }
  3574. function checkProp (
  3575. res,
  3576. hash,
  3577. key,
  3578. altKey,
  3579. preserve
  3580. ) {
  3581. if (isDef(hash)) {
  3582. if (hasOwn(hash, key)) {
  3583. res[key] = hash[key];
  3584. if (!preserve) {
  3585. delete hash[key];
  3586. }
  3587. return true
  3588. } else if (hasOwn(hash, altKey)) {
  3589. res[key] = hash[altKey];
  3590. if (!preserve) {
  3591. delete hash[altKey];
  3592. }
  3593. return true
  3594. }
  3595. }
  3596. return false
  3597. }
  3598. /* */
  3599. // The template compiler attempts to minimize the need for normalization by
  3600. // statically analyzing the template at compile time.
  3601. //
  3602. // For plain HTML markup, normalization can be completely skipped because the
  3603. // generated render function is guaranteed to return Array<VNode>. There are
  3604. // two cases where extra normalization is needed:
  3605. // 1. When the children contains components - because a functional component
  3606. // may return an Array instead of a single root. In this case, just a simple
  3607. // normalization is needed - if any child is an Array, we flatten the whole
  3608. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  3609. // because functional components already normalize their own children.
  3610. function simpleNormalizeChildren (children) {
  3611. for (var i = 0; i < children.length; i++) {
  3612. if (Array.isArray(children[i])) {
  3613. return Array.prototype.concat.apply([], children)
  3614. }
  3615. }
  3616. return children
  3617. }
  3618. // 2. When the children contains constructs that always generated nested Arrays,
  3619. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  3620. // with hand-written render functions / JSX. In such cases a full normalization
  3621. // is needed to cater to all possible types of children values.
  3622. function normalizeChildren (children) {
  3623. return isPrimitive(children)
  3624. ? [createTextVNode(children)]
  3625. : Array.isArray(children)
  3626. ? normalizeArrayChildren(children)
  3627. : undefined
  3628. }
  3629. function isTextNode (node) {
  3630. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  3631. }
  3632. function normalizeArrayChildren (children, nestedIndex) {
  3633. var res = [];
  3634. var i, c, last;
  3635. for (i = 0; i < children.length; i++) {
  3636. c = children[i];
  3637. if (isUndef(c) || typeof c === 'boolean') { continue }
  3638. last = res[res.length - 1];
  3639. // nested
  3640. if (Array.isArray(c)) {
  3641. res.push.apply(res, normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i)));
  3642. } else if (isPrimitive(c)) {
  3643. if (isTextNode(last)) {
  3644. // merge adjacent text nodes
  3645. // this is necessary for SSR hydration because text nodes are
  3646. // essentially merged when rendered to HTML strings
  3647. (last).text += String(c);
  3648. } else if (c !== '') {
  3649. // convert primitive to vnode
  3650. res.push(createTextVNode(c));
  3651. }
  3652. } else {
  3653. if (isTextNode(c) && isTextNode(last)) {
  3654. // merge adjacent text nodes
  3655. res[res.length - 1] = createTextVNode(last.text + c.text);
  3656. } else {
  3657. // default key for nested array children (likely generated by v-for)
  3658. if (isTrue(children._isVList) &&
  3659. isDef(c.tag) &&
  3660. isUndef(c.key) &&
  3661. isDef(nestedIndex)) {
  3662. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  3663. }
  3664. res.push(c);
  3665. }
  3666. }
  3667. }
  3668. return res
  3669. }
  3670. /* */
  3671. function ensureCtor (comp, base) {
  3672. return isObject(comp)
  3673. ? base.extend(comp)
  3674. : comp
  3675. }
  3676. function resolveAsyncComponent (
  3677. factory,
  3678. baseCtor,
  3679. context
  3680. ) {
  3681. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  3682. return factory.errorComp
  3683. }
  3684. if (isDef(factory.resolved)) {
  3685. return factory.resolved
  3686. }
  3687. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  3688. return factory.loadingComp
  3689. }
  3690. if (isDef(factory.contexts)) {
  3691. // already pending
  3692. factory.contexts.push(context);
  3693. } else {
  3694. var contexts = factory.contexts = [context];
  3695. var sync = true;
  3696. var forceRender = function () {
  3697. for (var i = 0, l = contexts.length; i < l; i++) {
  3698. contexts[i].$forceUpdate();
  3699. }
  3700. };
  3701. var resolve = once(function (res) {
  3702. // cache resolved
  3703. factory.resolved = ensureCtor(res, baseCtor);
  3704. // invoke callbacks only if this is not a synchronous resolve
  3705. // (async resolves are shimmed as synchronous during SSR)
  3706. if (!sync) {
  3707. forceRender();
  3708. }
  3709. });
  3710. var reject = once(function (reason) {
  3711. process.env.NODE_ENV !== 'production' && warn(
  3712. "Failed to resolve async component: " + (String(factory)) +
  3713. (reason ? ("\nReason: " + reason) : '')
  3714. );
  3715. if (isDef(factory.errorComp)) {
  3716. factory.error = true;
  3717. forceRender();
  3718. }
  3719. });
  3720. var res = factory(resolve, reject);
  3721. if (isObject(res)) {
  3722. if (typeof res.then === 'function') {
  3723. // () => Promise
  3724. if (isUndef(factory.resolved)) {
  3725. res.then(resolve, reject);
  3726. }
  3727. } else if (isDef(res.component) && typeof res.component.then === 'function') {
  3728. res.component.then(resolve, reject);
  3729. if (isDef(res.error)) {
  3730. factory.errorComp = ensureCtor(res.error, baseCtor);
  3731. }
  3732. if (isDef(res.loading)) {
  3733. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  3734. if (res.delay === 0) {
  3735. factory.loading = true;
  3736. } else {
  3737. setTimeout(function () {
  3738. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  3739. factory.loading = true;
  3740. forceRender();
  3741. }
  3742. }, res.delay || 200);
  3743. }
  3744. }
  3745. if (isDef(res.timeout)) {
  3746. setTimeout(function () {
  3747. if (isUndef(factory.resolved)) {
  3748. reject(
  3749. process.env.NODE_ENV !== 'production'
  3750. ? ("timeout (" + (res.timeout) + "ms)")
  3751. : null
  3752. );
  3753. }
  3754. }, res.timeout);
  3755. }
  3756. }
  3757. }
  3758. sync = false;
  3759. // return in case resolved synchronously
  3760. return factory.loading
  3761. ? factory.loadingComp
  3762. : factory.resolved
  3763. }
  3764. }
  3765. /* */
  3766. function getFirstComponentChild (children) {
  3767. if (Array.isArray(children)) {
  3768. for (var i = 0; i < children.length; i++) {
  3769. var c = children[i];
  3770. if (isDef(c) && isDef(c.componentOptions)) {
  3771. return c
  3772. }
  3773. }
  3774. }
  3775. }
  3776. /* */
  3777. /* */
  3778. function initEvents (vm) {
  3779. vm._events = Object.create(null);
  3780. vm._hasHookEvent = false;
  3781. // init parent attached events
  3782. var listeners = vm.$options._parentListeners;
  3783. if (listeners) {
  3784. updateComponentListeners(vm, listeners);
  3785. }
  3786. }
  3787. var target;
  3788. function add (event, fn, once$$1) {
  3789. if (once$$1) {
  3790. target.$once(event, fn);
  3791. } else {
  3792. target.$on(event, fn);
  3793. }
  3794. }
  3795. function remove$1 (event, fn) {
  3796. target.$off(event, fn);
  3797. }
  3798. function updateComponentListeners (
  3799. vm,
  3800. listeners,
  3801. oldListeners
  3802. ) {
  3803. target = vm;
  3804. updateListeners(listeners, oldListeners || {}, add, remove$1, vm);
  3805. }
  3806. function eventsMixin (Vue) {
  3807. var hookRE = /^hook:/;
  3808. Vue.prototype.$on = function (event, fn) {
  3809. var this$1 = this;
  3810. var vm = this;
  3811. if (Array.isArray(event)) {
  3812. for (var i = 0, l = event.length; i < l; i++) {
  3813. this$1.$on(event[i], fn);
  3814. }
  3815. } else {
  3816. (vm._events[event] || (vm._events[event] = [])).push(fn);
  3817. // optimize hook:event cost by using a boolean flag marked at registration
  3818. // instead of a hash lookup
  3819. if (hookRE.test(event)) {
  3820. vm._hasHookEvent = true;
  3821. }
  3822. }
  3823. return vm
  3824. };
  3825. Vue.prototype.$once = function (event, fn) {
  3826. var vm = this;
  3827. function on () {
  3828. vm.$off(event, on);
  3829. fn.apply(vm, arguments);
  3830. }
  3831. on.fn = fn;
  3832. vm.$on(event, on);
  3833. return vm
  3834. };
  3835. Vue.prototype.$off = function (event, fn) {
  3836. var this$1 = this;
  3837. var vm = this;
  3838. // all
  3839. if (!arguments.length) {
  3840. vm._events = Object.create(null);
  3841. return vm
  3842. }
  3843. // array of events
  3844. if (Array.isArray(event)) {
  3845. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  3846. this$1.$off(event[i$1], fn);
  3847. }
  3848. return vm
  3849. }
  3850. // specific event
  3851. var cbs = vm._events[event];
  3852. if (!cbs) {
  3853. return vm
  3854. }
  3855. if (arguments.length === 1) {
  3856. vm._events[event] = null;
  3857. return vm
  3858. }
  3859. // specific handler
  3860. var cb;
  3861. var i = cbs.length;
  3862. while (i--) {
  3863. cb = cbs[i];
  3864. if (cb === fn || cb.fn === fn) {
  3865. cbs.splice(i, 1);
  3866. break
  3867. }
  3868. }
  3869. return vm
  3870. };
  3871. Vue.prototype.$emit = function (event) {
  3872. var vm = this;
  3873. if (process.env.NODE_ENV !== 'production') {
  3874. var lowerCaseEvent = event.toLowerCase();
  3875. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  3876. tip(
  3877. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  3878. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  3879. "Note that HTML attributes are case-insensitive and you cannot use " +
  3880. "v-on to listen to camelCase events when using in-DOM templates. " +
  3881. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  3882. );
  3883. }
  3884. }
  3885. var cbs = vm._events[event];
  3886. if (cbs) {
  3887. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  3888. var args = toArray(arguments, 1);
  3889. for (var i = 0, l = cbs.length; i < l; i++) {
  3890. cbs[i].apply(vm, args);
  3891. }
  3892. }
  3893. return vm
  3894. };
  3895. }
  3896. /* */
  3897. /**
  3898. * Runtime helper for resolving raw children VNodes into a slot object.
  3899. */
  3900. function resolveSlots (
  3901. children,
  3902. context
  3903. ) {
  3904. var slots = {};
  3905. if (!children) {
  3906. return slots
  3907. }
  3908. var defaultSlot = [];
  3909. for (var i = 0, l = children.length; i < l; i++) {
  3910. var child = children[i];
  3911. // named slots should only be respected if the vnode was rendered in the
  3912. // same context.
  3913. if ((child.context === context || child.functionalContext === context) &&
  3914. child.data && child.data.slot != null
  3915. ) {
  3916. var name = child.data.slot;
  3917. var slot = (slots[name] || (slots[name] = []));
  3918. if (child.tag === 'template') {
  3919. slot.push.apply(slot, child.children);
  3920. } else {
  3921. slot.push(child);
  3922. }
  3923. } else {
  3924. defaultSlot.push(child);
  3925. }
  3926. }
  3927. // ignore whitespace
  3928. if (!defaultSlot.every(isWhitespace)) {
  3929. slots.default = defaultSlot;
  3930. }
  3931. return slots
  3932. }
  3933. function isWhitespace (node) {
  3934. return node.isComment || node.text === ' '
  3935. }
  3936. function resolveScopedSlots (
  3937. fns, // see flow/vnode
  3938. res
  3939. ) {
  3940. res = res || {};
  3941. for (var i = 0; i < fns.length; i++) {
  3942. if (Array.isArray(fns[i])) {
  3943. resolveScopedSlots(fns[i], res);
  3944. } else {
  3945. res[fns[i].key] = fns[i].fn;
  3946. }
  3947. }
  3948. return res
  3949. }
  3950. /* */
  3951. var activeInstance = null;
  3952. function initLifecycle (vm) {
  3953. var options = vm.$options;
  3954. // locate first non-abstract parent
  3955. var parent = options.parent;
  3956. if (parent && !options.abstract) {
  3957. while (parent.$options.abstract && parent.$parent) {
  3958. parent = parent.$parent;
  3959. }
  3960. parent.$children.push(vm);
  3961. }
  3962. vm.$parent = parent;
  3963. vm.$root = parent ? parent.$root : vm;
  3964. vm.$children = [];
  3965. vm.$refs = {};
  3966. vm._watcher = null;
  3967. vm._inactive = null;
  3968. vm._directInactive = false;
  3969. vm._isMounted = false;
  3970. vm._isDestroyed = false;
  3971. vm._isBeingDestroyed = false;
  3972. }
  3973. function lifecycleMixin (Vue) {
  3974. Vue.prototype._update = function (vnode, hydrating) {
  3975. var vm = this;
  3976. if (vm._isMounted) {
  3977. callHook(vm, 'beforeUpdate');
  3978. }
  3979. var prevEl = vm.$el;
  3980. var prevVnode = vm._vnode;
  3981. var prevActiveInstance = activeInstance;
  3982. activeInstance = vm;
  3983. vm._vnode = vnode;
  3984. // Vue.prototype.__patch__ is injected in entry points
  3985. // based on the rendering backend used.
  3986. if (!prevVnode) {
  3987. // initial render
  3988. vm.$el = vm.__patch__(
  3989. vm.$el, vnode, hydrating, false /* removeOnly */,
  3990. vm.$options._parentElm,
  3991. vm.$options._refElm
  3992. );
  3993. } else {
  3994. // updates
  3995. vm.$el = vm.__patch__(prevVnode, vnode);
  3996. }
  3997. activeInstance = prevActiveInstance;
  3998. // update __vue__ reference
  3999. if (prevEl) {
  4000. prevEl.__vue__ = null;
  4001. }
  4002. if (vm.$el) {
  4003. vm.$el.__vue__ = vm;
  4004. }
  4005. // if parent is an HOC, update its $el as well
  4006. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  4007. vm.$parent.$el = vm.$el;
  4008. }
  4009. // updated hook is called by the scheduler to ensure that children are
  4010. // updated in a parent's updated hook.
  4011. };
  4012. Vue.prototype.$forceUpdate = function () {
  4013. var vm = this;
  4014. if (vm._watcher) {
  4015. vm._watcher.update();
  4016. }
  4017. };
  4018. Vue.prototype.$destroy = function () {
  4019. var vm = this;
  4020. if (vm._isBeingDestroyed) {
  4021. return
  4022. }
  4023. callHook(vm, 'beforeDestroy');
  4024. vm._isBeingDestroyed = true;
  4025. // remove self from parent
  4026. var parent = vm.$parent;
  4027. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  4028. remove(parent.$children, vm);
  4029. }
  4030. // teardown watchers
  4031. if (vm._watcher) {
  4032. vm._watcher.teardown();
  4033. }
  4034. var i = vm._watchers.length;
  4035. while (i--) {
  4036. vm._watchers[i].teardown();
  4037. }
  4038. // remove reference from data ob
  4039. // frozen object may not have observer.
  4040. if (vm._data.__ob__) {
  4041. vm._data.__ob__.vmCount--;
  4042. }
  4043. // call the last hook...
  4044. vm._isDestroyed = true;
  4045. // invoke destroy hooks on current rendered tree
  4046. vm.__patch__(vm._vnode, null);
  4047. // fire destroyed hook
  4048. callHook(vm, 'destroyed');
  4049. // turn off all instance listeners.
  4050. vm.$off();
  4051. // remove __vue__ reference
  4052. if (vm.$el) {
  4053. vm.$el.__vue__ = null;
  4054. }
  4055. // remove reference to DOM nodes (prevents leak)
  4056. vm.$options._parentElm = vm.$options._refElm = null;
  4057. };
  4058. }
  4059. function mountComponent (
  4060. vm,
  4061. el,
  4062. hydrating
  4063. ) {
  4064. vm.$el = el;
  4065. if (!vm.$options.render) {
  4066. vm.$options.render = createEmptyVNode;
  4067. if (process.env.NODE_ENV !== 'production') {
  4068. /* istanbul ignore if */
  4069. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  4070. vm.$options.el || el) {
  4071. warn(
  4072. 'You are using the runtime-only build of Vue where the template ' +
  4073. 'compiler is not available. Either pre-compile the templates into ' +
  4074. 'render functions, or use the compiler-included build.',
  4075. vm
  4076. );
  4077. } else {
  4078. warn(
  4079. 'Failed to mount component: template or render function not defined.',
  4080. vm
  4081. );
  4082. }
  4083. }
  4084. }
  4085. callHook(vm, 'beforeMount');
  4086. var updateComponent;
  4087. /* istanbul ignore if */
  4088. if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
  4089. updateComponent = function () {
  4090. var name = vm._name;
  4091. var id = vm._uid;
  4092. var startTag = "vue-perf-start:" + id;
  4093. var endTag = "vue-perf-end:" + id;
  4094. mark(startTag);
  4095. var vnode = vm._render();
  4096. mark(endTag);
  4097. measure((name + " render"), startTag, endTag);
  4098. mark(startTag);
  4099. vm._update(vnode, hydrating);
  4100. mark(endTag);
  4101. measure((name + " patch"), startTag, endTag);
  4102. };
  4103. } else {
  4104. updateComponent = function () {
  4105. vm._update(vm._render(), hydrating);
  4106. };
  4107. }
  4108. vm._watcher = new Watcher(vm, updateComponent, noop);
  4109. hydrating = false;
  4110. // manually mounted instance, call mounted on self
  4111. // mounted is called for render-created child components in its inserted hook
  4112. if (vm.$vnode == null) {
  4113. vm._isMounted = true;
  4114. callHook(vm, 'mounted');
  4115. }
  4116. return vm
  4117. }
  4118. function updateChildComponent (
  4119. vm,
  4120. propsData,
  4121. listeners,
  4122. parentVnode,
  4123. renderChildren
  4124. ) {
  4125. // determine whether component has slot children
  4126. // we need to do this before overwriting $options._renderChildren
  4127. var hasChildren = !!(
  4128. renderChildren || // has new static slots
  4129. vm.$options._renderChildren || // has old static slots
  4130. parentVnode.data.scopedSlots || // has new scoped slots
  4131. vm.$scopedSlots !== emptyObject // has old scoped slots
  4132. );
  4133. vm.$options._parentVnode = parentVnode;
  4134. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  4135. if (vm._vnode) { // update child tree's parent
  4136. vm._vnode.parent = parentVnode;
  4137. }
  4138. vm.$options._renderChildren = renderChildren;
  4139. // update props
  4140. if (propsData && vm.$options.props) {
  4141. observerState.shouldConvert = false;
  4142. if (process.env.NODE_ENV !== 'production') {
  4143. observerState.isSettingProps = true;
  4144. }
  4145. var props = vm._props;
  4146. var propKeys = vm.$options._propKeys || [];
  4147. for (var i = 0; i < propKeys.length; i++) {
  4148. var key = propKeys[i];
  4149. props[key] = validateProp(key, vm.$options.props, propsData, vm);
  4150. }
  4151. observerState.shouldConvert = true;
  4152. if (process.env.NODE_ENV !== 'production') {
  4153. observerState.isSettingProps = false;
  4154. }
  4155. // keep a copy of raw propsData
  4156. vm.$options.propsData = propsData;
  4157. }
  4158. // update listeners
  4159. if (listeners) {
  4160. var oldListeners = vm.$options._parentListeners;
  4161. vm.$options._parentListeners = listeners;
  4162. updateComponentListeners(vm, listeners, oldListeners);
  4163. }
  4164. // resolve slots + force update if has children
  4165. if (hasChildren) {
  4166. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  4167. vm.$forceUpdate();
  4168. }
  4169. }
  4170. function isInInactiveTree (vm) {
  4171. while (vm && (vm = vm.$parent)) {
  4172. if (vm._inactive) { return true }
  4173. }
  4174. return false
  4175. }
  4176. function activateChildComponent (vm, direct) {
  4177. if (direct) {
  4178. vm._directInactive = false;
  4179. if (isInInactiveTree(vm)) {
  4180. return
  4181. }
  4182. } else if (vm._directInactive) {
  4183. return
  4184. }
  4185. if (vm._inactive || vm._inactive === null) {
  4186. vm._inactive = false;
  4187. for (var i = 0; i < vm.$children.length; i++) {
  4188. activateChildComponent(vm.$children[i]);
  4189. }
  4190. callHook(vm, 'activated');
  4191. }
  4192. }
  4193. function deactivateChildComponent (vm, direct) {
  4194. if (direct) {
  4195. vm._directInactive = true;
  4196. if (isInInactiveTree(vm)) {
  4197. return
  4198. }
  4199. }
  4200. if (!vm._inactive) {
  4201. vm._inactive = true;
  4202. for (var i = 0; i < vm.$children.length; i++) {
  4203. deactivateChildComponent(vm.$children[i]);
  4204. }
  4205. callHook(vm, 'deactivated');
  4206. }
  4207. }
  4208. function callHook (vm, hook) {
  4209. var handlers = vm.$options[hook];
  4210. if (handlers) {
  4211. for (var i = 0, j = handlers.length; i < j; i++) {
  4212. try {
  4213. handlers[i].call(vm);
  4214. } catch (e) {
  4215. handleError(e, vm, (hook + " hook"));
  4216. }
  4217. }
  4218. }
  4219. if (vm._hasHookEvent) {
  4220. vm.$emit('hook:' + hook);
  4221. }
  4222. }
  4223. /* */
  4224. var MAX_UPDATE_COUNT = 100;
  4225. var queue = [];
  4226. var activatedChildren = [];
  4227. var has = {};
  4228. var circular = {};
  4229. var waiting = false;
  4230. var flushing = false;
  4231. var index = 0;
  4232. /**
  4233. * Reset the scheduler's state.
  4234. */
  4235. function resetSchedulerState () {
  4236. index = queue.length = activatedChildren.length = 0;
  4237. has = {};
  4238. if (process.env.NODE_ENV !== 'production') {
  4239. circular = {};
  4240. }
  4241. waiting = flushing = false;
  4242. }
  4243. /**
  4244. * Flush both queues and run the watchers.
  4245. */
  4246. function flushSchedulerQueue () {
  4247. flushing = true;
  4248. var watcher, id;
  4249. // Sort queue before flush.
  4250. // This ensures that:
  4251. // 1. Components are updated from parent to child. (because parent is always
  4252. // created before the child)
  4253. // 2. A component's user watchers are run before its render watcher (because
  4254. // user watchers are created before the render watcher)
  4255. // 3. If a component is destroyed during a parent component's watcher run,
  4256. // its watchers can be skipped.
  4257. queue.sort(function (a, b) { return a.id - b.id; });
  4258. // do not cache length because more watchers might be pushed
  4259. // as we run existing watchers
  4260. for (index = 0; index < queue.length; index++) {
  4261. watcher = queue[index];
  4262. id = watcher.id;
  4263. has[id] = null;
  4264. watcher.run();
  4265. // in dev build, check and stop circular updates.
  4266. if (process.env.NODE_ENV !== 'production' && has[id] != null) {
  4267. circular[id] = (circular[id] || 0) + 1;
  4268. if (circular[id] > MAX_UPDATE_COUNT) {
  4269. warn(
  4270. 'You may have an infinite update loop ' + (
  4271. watcher.user
  4272. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  4273. : "in a component render function."
  4274. ),
  4275. watcher.vm
  4276. );
  4277. break
  4278. }
  4279. }
  4280. }
  4281. // keep copies of post queues before resetting state
  4282. var activatedQueue = activatedChildren.slice();
  4283. var updatedQueue = queue.slice();
  4284. resetSchedulerState();
  4285. // call component updated and activated hooks
  4286. callActivatedHooks(activatedQueue);
  4287. callUpdateHooks(updatedQueue);
  4288. // devtool hook
  4289. /* istanbul ignore if */
  4290. if (devtools && config.devtools) {
  4291. devtools.emit('flush');
  4292. }
  4293. }
  4294. function callUpdateHooks (queue) {
  4295. var i = queue.length;
  4296. while (i--) {
  4297. var watcher = queue[i];
  4298. var vm = watcher.vm;
  4299. if (vm._watcher === watcher && vm._isMounted) {
  4300. callHook(vm, 'updated');
  4301. }
  4302. }
  4303. }
  4304. /**
  4305. * Queue a kept-alive component that was activated during patch.
  4306. * The queue will be processed after the entire tree has been patched.
  4307. */
  4308. function queueActivatedComponent (vm) {
  4309. // setting _inactive to false here so that a render function can
  4310. // rely on checking whether it's in an inactive tree (e.g. router-view)
  4311. vm._inactive = false;
  4312. activatedChildren.push(vm);
  4313. }
  4314. function callActivatedHooks (queue) {
  4315. for (var i = 0; i < queue.length; i++) {
  4316. queue[i]._inactive = true;
  4317. activateChildComponent(queue[i], true /* true */);
  4318. }
  4319. }
  4320. /**
  4321. * Push a watcher into the watcher queue.
  4322. * Jobs with duplicate IDs will be skipped unless it's
  4323. * pushed when the queue is being flushed.
  4324. */
  4325. function queueWatcher (watcher) {
  4326. var id = watcher.id;
  4327. if (has[id] == null) {
  4328. has[id] = true;
  4329. if (!flushing) {
  4330. queue.push(watcher);
  4331. } else {
  4332. // if already flushing, splice the watcher based on its id
  4333. // if already past its id, it will be run next immediately.
  4334. var i = queue.length - 1;
  4335. while (i > index && queue[i].id > watcher.id) {
  4336. i--;
  4337. }
  4338. queue.splice(i + 1, 0, watcher);
  4339. }
  4340. // queue the flush
  4341. if (!waiting) {
  4342. waiting = true;
  4343. nextTick(flushSchedulerQueue);
  4344. }
  4345. }
  4346. }
  4347. /* */
  4348. var uid$2 = 0;
  4349. /**
  4350. * A watcher parses an expression, collects dependencies,
  4351. * and fires callback when the expression value changes.
  4352. * This is used for both the $watch() api and directives.
  4353. */
  4354. var Watcher = function Watcher (
  4355. vm,
  4356. expOrFn,
  4357. cb,
  4358. options
  4359. ) {
  4360. this.vm = vm;
  4361. vm._watchers.push(this);
  4362. // options
  4363. if (options) {
  4364. this.deep = !!options.deep;
  4365. this.user = !!options.user;
  4366. this.lazy = !!options.lazy;
  4367. this.sync = !!options.sync;
  4368. } else {
  4369. this.deep = this.user = this.lazy = this.sync = false;
  4370. }
  4371. this.cb = cb;
  4372. this.id = ++uid$2; // uid for batching
  4373. this.active = true;
  4374. this.dirty = this.lazy; // for lazy watchers
  4375. this.deps = [];
  4376. this.newDeps = [];
  4377. this.depIds = new _Set();
  4378. this.newDepIds = new _Set();
  4379. this.expression = process.env.NODE_ENV !== 'production'
  4380. ? expOrFn.toString()
  4381. : '';
  4382. // parse expression for getter
  4383. if (typeof expOrFn === 'function') {
  4384. this.getter = expOrFn;
  4385. } else {
  4386. this.getter = parsePath(expOrFn);
  4387. if (!this.getter) {
  4388. this.getter = function () {};
  4389. process.env.NODE_ENV !== 'production' && warn(
  4390. "Failed watching path: \"" + expOrFn + "\" " +
  4391. 'Watcher only accepts simple dot-delimited paths. ' +
  4392. 'For full control, use a function instead.',
  4393. vm
  4394. );
  4395. }
  4396. }
  4397. this.value = this.lazy
  4398. ? undefined
  4399. : this.get();
  4400. };
  4401. /**
  4402. * Evaluate the getter, and re-collect dependencies.
  4403. */
  4404. Watcher.prototype.get = function get () {
  4405. pushTarget(this);
  4406. var value;
  4407. var vm = this.vm;
  4408. if (this.user) {
  4409. try {
  4410. value = this.getter.call(vm, vm);
  4411. } catch (e) {
  4412. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  4413. }
  4414. } else {
  4415. value = this.getter.call(vm, vm);
  4416. }
  4417. // "touch" every property so they are all tracked as
  4418. // dependencies for deep watching
  4419. if (this.deep) {
  4420. traverse(value);
  4421. }
  4422. popTarget();
  4423. this.cleanupDeps();
  4424. return value
  4425. };
  4426. /**
  4427. * Add a dependency to this directive.
  4428. */
  4429. Watcher.prototype.addDep = function addDep (dep) {
  4430. var id = dep.id;
  4431. if (!this.newDepIds.has(id)) {
  4432. this.newDepIds.add(id);
  4433. this.newDeps.push(dep);
  4434. if (!this.depIds.has(id)) {
  4435. dep.addSub(this);
  4436. }
  4437. }
  4438. };
  4439. /**
  4440. * Clean up for dependency collection.
  4441. */
  4442. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  4443. var this$1 = this;
  4444. var i = this.deps.length;
  4445. while (i--) {
  4446. var dep = this$1.deps[i];
  4447. if (!this$1.newDepIds.has(dep.id)) {
  4448. dep.removeSub(this$1);
  4449. }
  4450. }
  4451. var tmp = this.depIds;
  4452. this.depIds = this.newDepIds;
  4453. this.newDepIds = tmp;
  4454. this.newDepIds.clear();
  4455. tmp = this.deps;
  4456. this.deps = this.newDeps;
  4457. this.newDeps = tmp;
  4458. this.newDeps.length = 0;
  4459. };
  4460. /**
  4461. * Subscriber interface.
  4462. * Will be called when a dependency changes.
  4463. */
  4464. Watcher.prototype.update = function update () {
  4465. /* istanbul ignore else */
  4466. if (this.lazy) {
  4467. this.dirty = true;
  4468. } else if (this.sync) {
  4469. this.run();
  4470. } else {
  4471. queueWatcher(this);
  4472. }
  4473. };
  4474. /**
  4475. * Scheduler job interface.
  4476. * Will be called by the scheduler.
  4477. */
  4478. Watcher.prototype.run = function run () {
  4479. if (this.active) {
  4480. var value = this.get();
  4481. if (
  4482. value !== this.value ||
  4483. // Deep watchers and watchers on Object/Arrays should fire even
  4484. // when the value is the same, because the value may
  4485. // have mutated.
  4486. isObject(value) ||
  4487. this.deep
  4488. ) {
  4489. // set new value
  4490. var oldValue = this.value;
  4491. this.value = value;
  4492. if (this.user) {
  4493. try {
  4494. this.cb.call(this.vm, value, oldValue);
  4495. } catch (e) {
  4496. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  4497. }
  4498. } else {
  4499. this.cb.call(this.vm, value, oldValue);
  4500. }
  4501. }
  4502. }
  4503. };
  4504. /**
  4505. * Evaluate the value of the watcher.
  4506. * This only gets called for lazy watchers.
  4507. */
  4508. Watcher.prototype.evaluate = function evaluate () {
  4509. this.value = this.get();
  4510. this.dirty = false;
  4511. };
  4512. /**
  4513. * Depend on all deps collected by this watcher.
  4514. */
  4515. Watcher.prototype.depend = function depend () {
  4516. var this$1 = this;
  4517. var i = this.deps.length;
  4518. while (i--) {
  4519. this$1.deps[i].depend();
  4520. }
  4521. };
  4522. /**
  4523. * Remove self from all dependencies' subscriber list.
  4524. */
  4525. Watcher.prototype.teardown = function teardown () {
  4526. var this$1 = this;
  4527. if (this.active) {
  4528. // remove self from vm's watcher list
  4529. // this is a somewhat expensive operation so we skip it
  4530. // if the vm is being destroyed.
  4531. if (!this.vm._isBeingDestroyed) {
  4532. remove(this.vm._watchers, this);
  4533. }
  4534. var i = this.deps.length;
  4535. while (i--) {
  4536. this$1.deps[i].removeSub(this$1);
  4537. }
  4538. this.active = false;
  4539. }
  4540. };
  4541. /**
  4542. * Recursively traverse an object to evoke all converted
  4543. * getters, so that every nested property inside the object
  4544. * is collected as a "deep" dependency.
  4545. */
  4546. var seenObjects = new _Set();
  4547. function traverse (val) {
  4548. seenObjects.clear();
  4549. _traverse(val, seenObjects);
  4550. }
  4551. function _traverse (val, seen) {
  4552. var i, keys;
  4553. var isA = Array.isArray(val);
  4554. if ((!isA && !isObject(val)) || !Object.isExtensible(val)) {
  4555. return
  4556. }
  4557. if (val.__ob__) {
  4558. var depId = val.__ob__.dep.id;
  4559. if (seen.has(depId)) {
  4560. return
  4561. }
  4562. seen.add(depId);
  4563. }
  4564. if (isA) {
  4565. i = val.length;
  4566. while (i--) { _traverse(val[i], seen); }
  4567. } else {
  4568. keys = Object.keys(val);
  4569. i = keys.length;
  4570. while (i--) { _traverse(val[keys[i]], seen); }
  4571. }
  4572. }
  4573. /* */
  4574. var sharedPropertyDefinition = {
  4575. enumerable: true,
  4576. configurable: true,
  4577. get: noop,
  4578. set: noop
  4579. };
  4580. function proxy (target, sourceKey, key) {
  4581. sharedPropertyDefinition.get = function proxyGetter () {
  4582. return this[sourceKey][key]
  4583. };
  4584. sharedPropertyDefinition.set = function proxySetter (val) {
  4585. this[sourceKey][key] = val;
  4586. };
  4587. Object.defineProperty(target, key, sharedPropertyDefinition);
  4588. }
  4589. function initState (vm) {
  4590. vm._watchers = [];
  4591. var opts = vm.$options;
  4592. if (opts.props) { initProps(vm, opts.props); }
  4593. if (opts.methods) { initMethods(vm, opts.methods); }
  4594. if (opts.data) {
  4595. initData(vm);
  4596. } else {
  4597. observe(vm._data = {}, true /* asRootData */);
  4598. }
  4599. if (opts.computed) { initComputed(vm, opts.computed); }
  4600. if (opts.watch) { initWatch(vm, opts.watch); }
  4601. }
  4602. var isReservedProp = {
  4603. key: 1,
  4604. ref: 1,
  4605. slot: 1
  4606. };
  4607. function initProps (vm, propsOptions) {
  4608. var propsData = vm.$options.propsData || {};
  4609. var props = vm._props = {};
  4610. // cache prop keys so that future props updates can iterate using Array
  4611. // instead of dynamic object key enumeration.
  4612. var keys = vm.$options._propKeys = [];
  4613. var isRoot = !vm.$parent;
  4614. // root instance props should be converted
  4615. observerState.shouldConvert = isRoot;
  4616. var loop = function ( key ) {
  4617. keys.push(key);
  4618. var value = validateProp(key, propsOptions, propsData, vm);
  4619. /* istanbul ignore else */
  4620. if (process.env.NODE_ENV !== 'production') {
  4621. if (isReservedProp[key] || config.isReservedAttr(key)) {
  4622. warn(
  4623. ("\"" + key + "\" is a reserved attribute and cannot be used as component prop."),
  4624. vm
  4625. );
  4626. }
  4627. defineReactive$$1(props, key, value, function () {
  4628. if (vm.$parent && !observerState.isSettingProps) {
  4629. warn(
  4630. "Avoid mutating a prop directly since the value will be " +
  4631. "overwritten whenever the parent component re-renders. " +
  4632. "Instead, use a data or computed property based on the prop's " +
  4633. "value. Prop being mutated: \"" + key + "\"",
  4634. vm
  4635. );
  4636. }
  4637. });
  4638. } else {
  4639. defineReactive$$1(props, key, value);
  4640. }
  4641. // static props are already proxied on the component's prototype
  4642. // during Vue.extend(). We only need to proxy props defined at
  4643. // instantiation here.
  4644. if (!(key in vm)) {
  4645. proxy(vm, "_props", key);
  4646. }
  4647. };
  4648. for (var key in propsOptions) loop( key );
  4649. observerState.shouldConvert = true;
  4650. }
  4651. function initData (vm) {
  4652. var data = vm.$options.data;
  4653. data = vm._data = typeof data === 'function'
  4654. ? getData(data, vm)
  4655. : data || {};
  4656. if (!isPlainObject(data)) {
  4657. data = {};
  4658. process.env.NODE_ENV !== 'production' && warn(
  4659. 'data functions should return an object:\n' +
  4660. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  4661. vm
  4662. );
  4663. }
  4664. // proxy data on instance
  4665. var keys = Object.keys(data);
  4666. var props = vm.$options.props;
  4667. var i = keys.length;
  4668. while (i--) {
  4669. if (props && hasOwn(props, keys[i])) {
  4670. process.env.NODE_ENV !== 'production' && warn(
  4671. "The data property \"" + (keys[i]) + "\" is already declared as a prop. " +
  4672. "Use prop default value instead.",
  4673. vm
  4674. );
  4675. } else if (!isReserved(keys[i])) {
  4676. proxy(vm, "_data", keys[i]);
  4677. }
  4678. }
  4679. // observe data
  4680. observe(data, true /* asRootData */);
  4681. }
  4682. function getData (data, vm) {
  4683. try {
  4684. return data.call(vm)
  4685. } catch (e) {
  4686. handleError(e, vm, "data()");
  4687. return {}
  4688. }
  4689. }
  4690. var computedWatcherOptions = { lazy: true };
  4691. function initComputed (vm, computed) {
  4692. var watchers = vm._computedWatchers = Object.create(null);
  4693. for (var key in computed) {
  4694. var userDef = computed[key];
  4695. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  4696. if (process.env.NODE_ENV !== 'production') {
  4697. if (getter === undefined) {
  4698. warn(
  4699. ("No getter function has been defined for computed property \"" + key + "\"."),
  4700. vm
  4701. );
  4702. getter = noop;
  4703. }
  4704. }
  4705. // create internal watcher for the computed property.
  4706. watchers[key] = new Watcher(vm, getter, noop, computedWatcherOptions);
  4707. // component-defined computed properties are already defined on the
  4708. // component prototype. We only need to define computed properties defined
  4709. // at instantiation here.
  4710. if (!(key in vm)) {
  4711. defineComputed(vm, key, userDef);
  4712. } else if (process.env.NODE_ENV !== 'production') {
  4713. if (key in vm.$data) {
  4714. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  4715. } else if (vm.$options.props && key in vm.$options.props) {
  4716. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  4717. }
  4718. }
  4719. }
  4720. }
  4721. function defineComputed (target, key, userDef) {
  4722. if (typeof userDef === 'function') {
  4723. sharedPropertyDefinition.get = createComputedGetter(key);
  4724. sharedPropertyDefinition.set = noop;
  4725. } else {
  4726. sharedPropertyDefinition.get = userDef.get
  4727. ? userDef.cache !== false
  4728. ? createComputedGetter(key)
  4729. : userDef.get
  4730. : noop;
  4731. sharedPropertyDefinition.set = userDef.set
  4732. ? userDef.set
  4733. : noop;
  4734. }
  4735. Object.defineProperty(target, key, sharedPropertyDefinition);
  4736. }
  4737. function createComputedGetter (key) {
  4738. return function computedGetter () {
  4739. var watcher = this._computedWatchers && this._computedWatchers[key];
  4740. if (watcher) {
  4741. if (watcher.dirty) {
  4742. watcher.evaluate();
  4743. }
  4744. if (Dep.target) {
  4745. watcher.depend();
  4746. }
  4747. return watcher.value
  4748. }
  4749. }
  4750. }
  4751. function initMethods (vm, methods) {
  4752. var props = vm.$options.props;
  4753. for (var key in methods) {
  4754. vm[key] = methods[key] == null ? noop : bind(methods[key], vm);
  4755. if (process.env.NODE_ENV !== 'production') {
  4756. if (methods[key] == null) {
  4757. warn(
  4758. "method \"" + key + "\" has an undefined value in the component definition. " +
  4759. "Did you reference the function correctly?",
  4760. vm
  4761. );
  4762. }
  4763. if (props && hasOwn(props, key)) {
  4764. warn(
  4765. ("method \"" + key + "\" has already been defined as a prop."),
  4766. vm
  4767. );
  4768. }
  4769. }
  4770. }
  4771. }
  4772. function initWatch (vm, watch) {
  4773. for (var key in watch) {
  4774. var handler = watch[key];
  4775. if (Array.isArray(handler)) {
  4776. for (var i = 0; i < handler.length; i++) {
  4777. createWatcher(vm, key, handler[i]);
  4778. }
  4779. } else {
  4780. createWatcher(vm, key, handler);
  4781. }
  4782. }
  4783. }
  4784. function createWatcher (vm, key, handler) {
  4785. var options;
  4786. if (isPlainObject(handler)) {
  4787. options = handler;
  4788. handler = handler.handler;
  4789. }
  4790. if (typeof handler === 'string') {
  4791. handler = vm[handler];
  4792. }
  4793. vm.$watch(key, handler, options);
  4794. }
  4795. function stateMixin (Vue) {
  4796. // flow somehow has problems with directly declared definition object
  4797. // when using Object.defineProperty, so we have to procedurally build up
  4798. // the object here.
  4799. var dataDef = {};
  4800. dataDef.get = function () { return this._data };
  4801. var propsDef = {};
  4802. propsDef.get = function () { return this._props };
  4803. if (process.env.NODE_ENV !== 'production') {
  4804. dataDef.set = function (newData) {
  4805. warn(
  4806. 'Avoid replacing instance root $data. ' +
  4807. 'Use nested data properties instead.',
  4808. this
  4809. );
  4810. };
  4811. propsDef.set = function () {
  4812. warn("$props is readonly.", this);
  4813. };
  4814. }
  4815. Object.defineProperty(Vue.prototype, '$data', dataDef);
  4816. Object.defineProperty(Vue.prototype, '$props', propsDef);
  4817. Vue.prototype.$set = set;
  4818. Vue.prototype.$delete = del;
  4819. Vue.prototype.$watch = function (
  4820. expOrFn,
  4821. cb,
  4822. options
  4823. ) {
  4824. var vm = this;
  4825. options = options || {};
  4826. options.user = true;
  4827. var watcher = new Watcher(vm, expOrFn, cb, options);
  4828. if (options.immediate) {
  4829. cb.call(vm, watcher.value);
  4830. }
  4831. return function unwatchFn () {
  4832. watcher.teardown();
  4833. }
  4834. };
  4835. }
  4836. /* */
  4837. function initProvide (vm) {
  4838. var provide = vm.$options.provide;
  4839. if (provide) {
  4840. vm._provided = typeof provide === 'function'
  4841. ? provide.call(vm)
  4842. : provide;
  4843. }
  4844. }
  4845. function initInjections (vm) {
  4846. var result = resolveInject(vm.$options.inject, vm);
  4847. if (result) {
  4848. Object.keys(result).forEach(function (key) {
  4849. /* istanbul ignore else */
  4850. if (process.env.NODE_ENV !== 'production') {
  4851. defineReactive$$1(vm, key, result[key], function () {
  4852. warn(
  4853. "Avoid mutating an injected value directly since the changes will be " +
  4854. "overwritten whenever the provided component re-renders. " +
  4855. "injection being mutated: \"" + key + "\"",
  4856. vm
  4857. );
  4858. });
  4859. } else {
  4860. defineReactive$$1(vm, key, result[key]);
  4861. }
  4862. });
  4863. }
  4864. }
  4865. function resolveInject (inject, vm) {
  4866. if (inject) {
  4867. // inject is :any because flow is not smart enough to figure out cached
  4868. // isArray here
  4869. var isArray = Array.isArray(inject);
  4870. var result = Object.create(null);
  4871. var keys = isArray
  4872. ? inject
  4873. : hasSymbol
  4874. ? Reflect.ownKeys(inject)
  4875. : Object.keys(inject);
  4876. for (var i = 0; i < keys.length; i++) {
  4877. var key = keys[i];
  4878. var provideKey = isArray ? key : inject[key];
  4879. var source = vm;
  4880. while (source) {
  4881. if (source._provided && provideKey in source._provided) {
  4882. result[key] = source._provided[provideKey];
  4883. break
  4884. }
  4885. source = source.$parent;
  4886. }
  4887. }
  4888. return result
  4889. }
  4890. }
  4891. /* */
  4892. function createFunctionalComponent (
  4893. Ctor,
  4894. propsData,
  4895. data,
  4896. context,
  4897. children
  4898. ) {
  4899. var props = {};
  4900. var propOptions = Ctor.options.props;
  4901. if (isDef(propOptions)) {
  4902. for (var key in propOptions) {
  4903. props[key] = validateProp(key, propOptions, propsData || {});
  4904. }
  4905. } else {
  4906. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  4907. if (isDef(data.props)) { mergeProps(props, data.props); }
  4908. }
  4909. // ensure the createElement function in functional components
  4910. // gets a unique context - this is necessary for correct named slot check
  4911. var _context = Object.create(context);
  4912. var h = function (a, b, c, d) { return createElement(_context, a, b, c, d, true); };
  4913. var vnode = Ctor.options.render.call(null, h, {
  4914. data: data,
  4915. props: props,
  4916. children: children,
  4917. parent: context,
  4918. listeners: data.on || {},
  4919. injections: resolveInject(Ctor.options.inject, context),
  4920. slots: function () { return resolveSlots(children, context); }
  4921. });
  4922. if (vnode instanceof VNode) {
  4923. vnode.functionalContext = context;
  4924. vnode.functionalOptions = Ctor.options;
  4925. if (data.slot) {
  4926. (vnode.data || (vnode.data = {})).slot = data.slot;
  4927. }
  4928. }
  4929. return vnode
  4930. }
  4931. function mergeProps (to, from) {
  4932. for (var key in from) {
  4933. to[camelize(key)] = from[key];
  4934. }
  4935. }
  4936. /* */
  4937. // hooks to be invoked on component VNodes during patch
  4938. var componentVNodeHooks = {
  4939. init: function init (
  4940. vnode,
  4941. hydrating,
  4942. parentElm,
  4943. refElm
  4944. ) {
  4945. if (!vnode.componentInstance || vnode.componentInstance._isDestroyed) {
  4946. var child = vnode.componentInstance = createComponentInstanceForVnode(
  4947. vnode,
  4948. activeInstance,
  4949. parentElm,
  4950. refElm
  4951. );
  4952. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  4953. } else if (vnode.data.keepAlive) {
  4954. // kept-alive components, treat as a patch
  4955. var mountedNode = vnode; // work around flow
  4956. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  4957. }
  4958. },
  4959. prepatch: function prepatch (oldVnode, vnode) {
  4960. var options = vnode.componentOptions;
  4961. var child = vnode.componentInstance = oldVnode.componentInstance;
  4962. updateChildComponent(
  4963. child,
  4964. options.propsData, // updated props
  4965. options.listeners, // updated listeners
  4966. vnode, // new parent vnode
  4967. options.children // new children
  4968. );
  4969. },
  4970. insert: function insert (vnode) {
  4971. var context = vnode.context;
  4972. var componentInstance = vnode.componentInstance;
  4973. if (!componentInstance._isMounted) {
  4974. componentInstance._isMounted = true;
  4975. callHook(componentInstance, 'mounted');
  4976. }
  4977. if (vnode.data.keepAlive) {
  4978. if (context._isMounted) {
  4979. // vue-router#1212
  4980. // During updates, a kept-alive component's child components may
  4981. // change, so directly walking the tree here may call activated hooks
  4982. // on incorrect children. Instead we push them into a queue which will
  4983. // be processed after the whole patch process ended.
  4984. queueActivatedComponent(componentInstance);
  4985. } else {
  4986. activateChildComponent(componentInstance, true /* direct */);
  4987. }
  4988. }
  4989. },
  4990. destroy: function destroy (vnode) {
  4991. var componentInstance = vnode.componentInstance;
  4992. if (!componentInstance._isDestroyed) {
  4993. if (!vnode.data.keepAlive) {
  4994. componentInstance.$destroy();
  4995. } else {
  4996. deactivateChildComponent(componentInstance, true /* direct */);
  4997. }
  4998. }
  4999. }
  5000. };
  5001. var hooksToMerge = Object.keys(componentVNodeHooks);
  5002. function createComponent (
  5003. Ctor,
  5004. data,
  5005. context,
  5006. children,
  5007. tag
  5008. ) {
  5009. if (isUndef(Ctor)) {
  5010. return
  5011. }
  5012. var baseCtor = context.$options._base;
  5013. // plain options object: turn it into a constructor
  5014. if (isObject(Ctor)) {
  5015. Ctor = baseCtor.extend(Ctor);
  5016. }
  5017. // if at this stage it's not a constructor or an async component factory,
  5018. // reject.
  5019. if (typeof Ctor !== 'function') {
  5020. if (process.env.NODE_ENV !== 'production') {
  5021. warn(("Invalid Component definition: " + (String(Ctor))), context);
  5022. }
  5023. return
  5024. }
  5025. // async component
  5026. if (isUndef(Ctor.cid)) {
  5027. Ctor = resolveAsyncComponent(Ctor, baseCtor, context);
  5028. if (Ctor === undefined) {
  5029. // return nothing if this is indeed an async component
  5030. // wait for the callback to trigger parent update.
  5031. return
  5032. }
  5033. }
  5034. // resolve constructor options in case global mixins are applied after
  5035. // component constructor creation
  5036. resolveConstructorOptions(Ctor);
  5037. data = data || {};
  5038. // transform component v-model data into props & events
  5039. if (isDef(data.model)) {
  5040. transformModel(Ctor.options, data);
  5041. }
  5042. // extract props
  5043. var propsData = extractPropsFromVNodeData(data, Ctor, tag);
  5044. // functional component
  5045. if (isTrue(Ctor.options.functional)) {
  5046. return createFunctionalComponent(Ctor, propsData, data, context, children)
  5047. }
  5048. // extract listeners, since these needs to be treated as
  5049. // child component listeners instead of DOM listeners
  5050. var listeners = data.on;
  5051. // replace with listeners with .native modifier
  5052. data.on = data.nativeOn;
  5053. if (isTrue(Ctor.options.abstract)) {
  5054. // abstract components do not keep anything
  5055. // other than props & listeners
  5056. data = {};
  5057. }
  5058. // merge component management hooks onto the placeholder node
  5059. mergeHooks(data);
  5060. // return a placeholder vnode
  5061. var name = Ctor.options.name || tag;
  5062. var vnode = new VNode(
  5063. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  5064. data, undefined, undefined, undefined, context,
  5065. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }
  5066. );
  5067. return vnode
  5068. }
  5069. function createComponentInstanceForVnode (
  5070. vnode, // we know it's MountedComponentVNode but flow doesn't
  5071. parent, // activeInstance in lifecycle state
  5072. parentElm,
  5073. refElm
  5074. ) {
  5075. var vnodeComponentOptions = vnode.componentOptions;
  5076. var options = {
  5077. _isComponent: true,
  5078. parent: parent,
  5079. propsData: vnodeComponentOptions.propsData,
  5080. _componentTag: vnodeComponentOptions.tag,
  5081. _parentVnode: vnode,
  5082. _parentListeners: vnodeComponentOptions.listeners,
  5083. _renderChildren: vnodeComponentOptions.children,
  5084. _parentElm: parentElm || null,
  5085. _refElm: refElm || null
  5086. };
  5087. // check inline-template render functions
  5088. var inlineTemplate = vnode.data.inlineTemplate;
  5089. if (isDef(inlineTemplate)) {
  5090. options.render = inlineTemplate.render;
  5091. options.staticRenderFns = inlineTemplate.staticRenderFns;
  5092. }
  5093. return new vnodeComponentOptions.Ctor(options)
  5094. }
  5095. function mergeHooks (data) {
  5096. if (!data.hook) {
  5097. data.hook = {};
  5098. }
  5099. for (var i = 0; i < hooksToMerge.length; i++) {
  5100. var key = hooksToMerge[i];
  5101. var fromParent = data.hook[key];
  5102. var ours = componentVNodeHooks[key];
  5103. data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;
  5104. }
  5105. }
  5106. function mergeHook$1 (one, two) {
  5107. return function (a, b, c, d) {
  5108. one(a, b, c, d);
  5109. two(a, b, c, d);
  5110. }
  5111. }
  5112. // transform component v-model info (value and callback) into
  5113. // prop and event handler respectively.
  5114. function transformModel (options, data) {
  5115. var prop = (options.model && options.model.prop) || 'value';
  5116. var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;
  5117. var on = data.on || (data.on = {});
  5118. if (isDef(on[event])) {
  5119. on[event] = [data.model.callback].concat(on[event]);
  5120. } else {
  5121. on[event] = data.model.callback;
  5122. }
  5123. }
  5124. /* */
  5125. var SIMPLE_NORMALIZE = 1;
  5126. var ALWAYS_NORMALIZE = 2;
  5127. // wrapper function for providing a more flexible interface
  5128. // without getting yelled at by flow
  5129. function createElement (
  5130. context,
  5131. tag,
  5132. data,
  5133. children,
  5134. normalizationType,
  5135. alwaysNormalize
  5136. ) {
  5137. if (Array.isArray(data) || isPrimitive(data)) {
  5138. normalizationType = children;
  5139. children = data;
  5140. data = undefined;
  5141. }
  5142. if (isTrue(alwaysNormalize)) {
  5143. normalizationType = ALWAYS_NORMALIZE;
  5144. }
  5145. return _createElement(context, tag, data, children, normalizationType)
  5146. }
  5147. function _createElement (
  5148. context,
  5149. tag,
  5150. data,
  5151. children,
  5152. normalizationType
  5153. ) {
  5154. if (isDef(data) && isDef((data).__ob__)) {
  5155. process.env.NODE_ENV !== 'production' && warn(
  5156. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  5157. 'Always create fresh vnode data objects in each render!',
  5158. context
  5159. );
  5160. return createEmptyVNode()
  5161. }
  5162. if (!tag) {
  5163. // in case of component :is set to falsy value
  5164. return createEmptyVNode()
  5165. }
  5166. // support single function children as default scoped slot
  5167. if (Array.isArray(children) &&
  5168. typeof children[0] === 'function'
  5169. ) {
  5170. data = data || {};
  5171. data.scopedSlots = { default: children[0] };
  5172. children.length = 0;
  5173. }
  5174. if (normalizationType === ALWAYS_NORMALIZE) {
  5175. children = normalizeChildren(children);
  5176. } else if (normalizationType === SIMPLE_NORMALIZE) {
  5177. children = simpleNormalizeChildren(children);
  5178. }
  5179. var vnode, ns;
  5180. if (typeof tag === 'string') {
  5181. var Ctor;
  5182. ns = config.getTagNamespace(tag);
  5183. if (config.isReservedTag(tag)) {
  5184. // platform built-in elements
  5185. vnode = new VNode(
  5186. config.parsePlatformTagName(tag), data, children,
  5187. undefined, undefined, context
  5188. );
  5189. } else if (isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  5190. // component
  5191. vnode = createComponent(Ctor, data, context, children, tag);
  5192. } else {
  5193. // unknown or unlisted namespaced elements
  5194. // check at runtime because it may get assigned a namespace when its
  5195. // parent normalizes children
  5196. vnode = new VNode(
  5197. tag, data, children,
  5198. undefined, undefined, context
  5199. );
  5200. }
  5201. } else {
  5202. // direct component options / constructor
  5203. vnode = createComponent(tag, data, context, children);
  5204. }
  5205. if (isDef(vnode)) {
  5206. if (ns) { applyNS(vnode, ns); }
  5207. return vnode
  5208. } else {
  5209. return createEmptyVNode()
  5210. }
  5211. }
  5212. function applyNS (vnode, ns) {
  5213. vnode.ns = ns;
  5214. if (vnode.tag === 'foreignObject') {
  5215. // use default namespace inside foreignObject
  5216. return
  5217. }
  5218. if (isDef(vnode.children)) {
  5219. for (var i = 0, l = vnode.children.length; i < l; i++) {
  5220. var child = vnode.children[i];
  5221. if (isDef(child.tag) && isUndef(child.ns)) {
  5222. applyNS(child, ns);
  5223. }
  5224. }
  5225. }
  5226. }
  5227. /* */
  5228. /**
  5229. * Runtime helper for rendering v-for lists.
  5230. */
  5231. function renderList (
  5232. val,
  5233. render
  5234. ) {
  5235. var ret, i, l, keys, key;
  5236. if (Array.isArray(val) || typeof val === 'string') {
  5237. ret = new Array(val.length);
  5238. for (i = 0, l = val.length; i < l; i++) {
  5239. ret[i] = render(val[i], i);
  5240. }
  5241. } else if (typeof val === 'number') {
  5242. ret = new Array(val);
  5243. for (i = 0; i < val; i++) {
  5244. ret[i] = render(i + 1, i);
  5245. }
  5246. } else if (isObject(val)) {
  5247. keys = Object.keys(val);
  5248. ret = new Array(keys.length);
  5249. for (i = 0, l = keys.length; i < l; i++) {
  5250. key = keys[i];
  5251. ret[i] = render(val[key], key, i);
  5252. }
  5253. }
  5254. if (isDef(ret)) {
  5255. (ret)._isVList = true;
  5256. }
  5257. return ret
  5258. }
  5259. /* */
  5260. /**
  5261. * Runtime helper for rendering <slot>
  5262. */
  5263. function renderSlot (
  5264. name,
  5265. fallback,
  5266. props,
  5267. bindObject
  5268. ) {
  5269. var scopedSlotFn = this.$scopedSlots[name];
  5270. if (scopedSlotFn) { // scoped slot
  5271. props = props || {};
  5272. if (bindObject) {
  5273. extend(props, bindObject);
  5274. }
  5275. return scopedSlotFn(props) || fallback
  5276. } else {
  5277. var slotNodes = this.$slots[name];
  5278. // warn duplicate slot usage
  5279. if (slotNodes && process.env.NODE_ENV !== 'production') {
  5280. slotNodes._rendered && warn(
  5281. "Duplicate presence of slot \"" + name + "\" found in the same render tree " +
  5282. "- this will likely cause render errors.",
  5283. this
  5284. );
  5285. slotNodes._rendered = true;
  5286. }
  5287. return slotNodes || fallback
  5288. }
  5289. }
  5290. /* */
  5291. /**
  5292. * Runtime helper for resolving filters
  5293. */
  5294. function resolveFilter (id) {
  5295. return resolveAsset(this.$options, 'filters', id, true) || identity
  5296. }
  5297. /* */
  5298. /**
  5299. * Runtime helper for checking keyCodes from config.
  5300. */
  5301. function checkKeyCodes (
  5302. eventKeyCode,
  5303. key,
  5304. builtInAlias
  5305. ) {
  5306. var keyCodes = config.keyCodes[key] || builtInAlias;
  5307. if (Array.isArray(keyCodes)) {
  5308. return keyCodes.indexOf(eventKeyCode) === -1
  5309. } else {
  5310. return keyCodes !== eventKeyCode
  5311. }
  5312. }
  5313. /* */
  5314. /**
  5315. * Runtime helper for merging v-bind="object" into a VNode's data.
  5316. */
  5317. function bindObjectProps (
  5318. data,
  5319. tag,
  5320. value,
  5321. asProp
  5322. ) {
  5323. if (value) {
  5324. if (!isObject(value)) {
  5325. process.env.NODE_ENV !== 'production' && warn(
  5326. 'v-bind without argument expects an Object or Array value',
  5327. this
  5328. );
  5329. } else {
  5330. if (Array.isArray(value)) {
  5331. value = toObject(value);
  5332. }
  5333. var hash;
  5334. for (var key in value) {
  5335. if (key === 'class' || key === 'style') {
  5336. hash = data;
  5337. } else {
  5338. var type = data.attrs && data.attrs.type;
  5339. hash = asProp || config.mustUseProp(tag, type, key)
  5340. ? data.domProps || (data.domProps = {})
  5341. : data.attrs || (data.attrs = {});
  5342. }
  5343. if (!(key in hash)) {
  5344. hash[key] = value[key];
  5345. }
  5346. }
  5347. }
  5348. }
  5349. return data
  5350. }
  5351. /* */
  5352. /**
  5353. * Runtime helper for rendering static trees.
  5354. */
  5355. function renderStatic (
  5356. index,
  5357. isInFor
  5358. ) {
  5359. var tree = this._staticTrees[index];
  5360. // if has already-rendered static tree and not inside v-for,
  5361. // we can reuse the same tree by doing a shallow clone.
  5362. if (tree && !isInFor) {
  5363. return Array.isArray(tree)
  5364. ? cloneVNodes(tree)
  5365. : cloneVNode(tree)
  5366. }
  5367. // otherwise, render a fresh tree.
  5368. tree = this._staticTrees[index] =
  5369. this.$options.staticRenderFns[index].call(this._renderProxy);
  5370. markStatic(tree, ("__static__" + index), false);
  5371. return tree
  5372. }
  5373. /**
  5374. * Runtime helper for v-once.
  5375. * Effectively it means marking the node as static with a unique key.
  5376. */
  5377. function markOnce (
  5378. tree,
  5379. index,
  5380. key
  5381. ) {
  5382. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  5383. return tree
  5384. }
  5385. function markStatic (
  5386. tree,
  5387. key,
  5388. isOnce
  5389. ) {
  5390. if (Array.isArray(tree)) {
  5391. for (var i = 0; i < tree.length; i++) {
  5392. if (tree[i] && typeof tree[i] !== 'string') {
  5393. markStaticNode(tree[i], (key + "_" + i), isOnce);
  5394. }
  5395. }
  5396. } else {
  5397. markStaticNode(tree, key, isOnce);
  5398. }
  5399. }
  5400. function markStaticNode (node, key, isOnce) {
  5401. node.isStatic = true;
  5402. node.key = key;
  5403. node.isOnce = isOnce;
  5404. }
  5405. /* */
  5406. function initRender (vm) {
  5407. vm._vnode = null; // the root of the child tree
  5408. vm._staticTrees = null;
  5409. var parentVnode = vm.$vnode = vm.$options._parentVnode; // the placeholder node in parent tree
  5410. var renderContext = parentVnode && parentVnode.context;
  5411. vm.$slots = resolveSlots(vm.$options._renderChildren, renderContext);
  5412. vm.$scopedSlots = emptyObject;
  5413. // bind the createElement fn to this instance
  5414. // so that we get proper render context inside it.
  5415. // args order: tag, data, children, normalizationType, alwaysNormalize
  5416. // internal version is used by render functions compiled from templates
  5417. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  5418. // normalization is always applied for the public version, used in
  5419. // user-written render functions.
  5420. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  5421. }
  5422. function renderMixin (Vue) {
  5423. Vue.prototype.$nextTick = function (fn) {
  5424. return nextTick(fn, this)
  5425. };
  5426. Vue.prototype._render = function () {
  5427. var vm = this;
  5428. var ref = vm.$options;
  5429. var render = ref.render;
  5430. var staticRenderFns = ref.staticRenderFns;
  5431. var _parentVnode = ref._parentVnode;
  5432. if (vm._isMounted) {
  5433. // clone slot nodes on re-renders
  5434. for (var key in vm.$slots) {
  5435. vm.$slots[key] = cloneVNodes(vm.$slots[key]);
  5436. }
  5437. }
  5438. vm.$scopedSlots = (_parentVnode && _parentVnode.data.scopedSlots) || emptyObject;
  5439. if (staticRenderFns && !vm._staticTrees) {
  5440. vm._staticTrees = [];
  5441. }
  5442. // set parent vnode. this allows render functions to have access
  5443. // to the data on the placeholder node.
  5444. vm.$vnode = _parentVnode;
  5445. // render self
  5446. var vnode;
  5447. try {
  5448. vnode = render.call(vm._renderProxy, vm.$createElement);
  5449. } catch (e) {
  5450. handleError(e, vm, "render function");
  5451. // return error render result,
  5452. // or previous vnode to prevent render error causing blank component
  5453. /* istanbul ignore else */
  5454. if (process.env.NODE_ENV !== 'production') {
  5455. vnode = vm.$options.renderError
  5456. ? vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e)
  5457. : vm._vnode;
  5458. } else {
  5459. vnode = vm._vnode;
  5460. }
  5461. }
  5462. // return empty vnode in case the render function errored out
  5463. if (!(vnode instanceof VNode)) {
  5464. if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) {
  5465. warn(
  5466. 'Multiple root nodes returned from render function. Render function ' +
  5467. 'should return a single root node.',
  5468. vm
  5469. );
  5470. }
  5471. vnode = createEmptyVNode();
  5472. }
  5473. // set parent
  5474. vnode.parent = _parentVnode;
  5475. return vnode
  5476. };
  5477. // internal render helpers.
  5478. // these are exposed on the instance prototype to reduce generated render
  5479. // code size.
  5480. Vue.prototype._o = markOnce;
  5481. Vue.prototype._n = toNumber;
  5482. Vue.prototype._s = toString;
  5483. Vue.prototype._l = renderList;
  5484. Vue.prototype._t = renderSlot;
  5485. Vue.prototype._q = looseEqual;
  5486. Vue.prototype._i = looseIndexOf;
  5487. Vue.prototype._m = renderStatic;
  5488. Vue.prototype._f = resolveFilter;
  5489. Vue.prototype._k = checkKeyCodes;
  5490. Vue.prototype._b = bindObjectProps;
  5491. Vue.prototype._v = createTextVNode;
  5492. Vue.prototype._e = createEmptyVNode;
  5493. Vue.prototype._u = resolveScopedSlots;
  5494. }
  5495. /* */
  5496. var uid$1 = 0;
  5497. function initMixin (Vue) {
  5498. Vue.prototype._init = function (options) {
  5499. var vm = this;
  5500. // a uid
  5501. vm._uid = uid$1++;
  5502. var startTag, endTag;
  5503. /* istanbul ignore if */
  5504. if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
  5505. startTag = "vue-perf-init:" + (vm._uid);
  5506. endTag = "vue-perf-end:" + (vm._uid);
  5507. mark(startTag);
  5508. }
  5509. // a flag to avoid this being observed
  5510. vm._isVue = true;
  5511. // merge options
  5512. if (options && options._isComponent) {
  5513. // optimize internal component instantiation
  5514. // since dynamic options merging is pretty slow, and none of the
  5515. // internal component options needs special treatment.
  5516. initInternalComponent(vm, options);
  5517. } else {
  5518. vm.$options = mergeOptions(
  5519. resolveConstructorOptions(vm.constructor),
  5520. options || {},
  5521. vm
  5522. );
  5523. }
  5524. /* istanbul ignore else */
  5525. if (process.env.NODE_ENV !== 'production') {
  5526. initProxy(vm);
  5527. } else {
  5528. vm._renderProxy = vm;
  5529. }
  5530. // expose real self
  5531. vm._self = vm;
  5532. initLifecycle(vm);
  5533. initEvents(vm);
  5534. initRender(vm);
  5535. callHook(vm, 'beforeCreate');
  5536. initInjections(vm); // resolve injections before data/props
  5537. initState(vm);
  5538. initProvide(vm); // resolve provide after data/props
  5539. callHook(vm, 'created');
  5540. /* istanbul ignore if */
  5541. if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
  5542. vm._name = formatComponentName(vm, false);
  5543. mark(endTag);
  5544. measure(((vm._name) + " init"), startTag, endTag);
  5545. }
  5546. if (vm.$options.el) {
  5547. vm.$mount(vm.$options.el);
  5548. }
  5549. };
  5550. }
  5551. function initInternalComponent (vm, options) {
  5552. var opts = vm.$options = Object.create(vm.constructor.options);
  5553. // doing this because it's faster than dynamic enumeration.
  5554. opts.parent = options.parent;
  5555. opts.propsData = options.propsData;
  5556. opts._parentVnode = options._parentVnode;
  5557. opts._parentListeners = options._parentListeners;
  5558. opts._renderChildren = options._renderChildren;
  5559. opts._componentTag = options._componentTag;
  5560. opts._parentElm = options._parentElm;
  5561. opts._refElm = options._refElm;
  5562. if (options.render) {
  5563. opts.render = options.render;
  5564. opts.staticRenderFns = options.staticRenderFns;
  5565. }
  5566. }
  5567. function resolveConstructorOptions (Ctor) {
  5568. var options = Ctor.options;
  5569. if (Ctor.super) {
  5570. var superOptions = resolveConstructorOptions(Ctor.super);
  5571. var cachedSuperOptions = Ctor.superOptions;
  5572. if (superOptions !== cachedSuperOptions) {
  5573. // super option changed,
  5574. // need to resolve new options.
  5575. Ctor.superOptions = superOptions;
  5576. // check if there are any late-modified/attached options (#4976)
  5577. var modifiedOptions = resolveModifiedOptions(Ctor);
  5578. // update base extend options
  5579. if (modifiedOptions) {
  5580. extend(Ctor.extendOptions, modifiedOptions);
  5581. }
  5582. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  5583. if (options.name) {
  5584. options.components[options.name] = Ctor;
  5585. }
  5586. }
  5587. }
  5588. return options
  5589. }
  5590. function resolveModifiedOptions (Ctor) {
  5591. var modified;
  5592. var latest = Ctor.options;
  5593. var extended = Ctor.extendOptions;
  5594. var sealed = Ctor.sealedOptions;
  5595. for (var key in latest) {
  5596. if (latest[key] !== sealed[key]) {
  5597. if (!modified) { modified = {}; }
  5598. modified[key] = dedupe(latest[key], extended[key], sealed[key]);
  5599. }
  5600. }
  5601. return modified
  5602. }
  5603. function dedupe (latest, extended, sealed) {
  5604. // compare latest and sealed to ensure lifecycle hooks won't be duplicated
  5605. // between merges
  5606. if (Array.isArray(latest)) {
  5607. var res = [];
  5608. sealed = Array.isArray(sealed) ? sealed : [sealed];
  5609. extended = Array.isArray(extended) ? extended : [extended];
  5610. for (var i = 0; i < latest.length; i++) {
  5611. // push original options and not sealed options to exclude duplicated options
  5612. if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) {
  5613. res.push(latest[i]);
  5614. }
  5615. }
  5616. return res
  5617. } else {
  5618. return latest
  5619. }
  5620. }
  5621. function Vue$3 (options) {
  5622. if (process.env.NODE_ENV !== 'production' &&
  5623. !(this instanceof Vue$3)
  5624. ) {
  5625. warn('Vue is a constructor and should be called with the `new` keyword');
  5626. }
  5627. this._init(options);
  5628. }
  5629. initMixin(Vue$3);
  5630. stateMixin(Vue$3);
  5631. eventsMixin(Vue$3);
  5632. lifecycleMixin(Vue$3);
  5633. renderMixin(Vue$3);
  5634. /* */
  5635. function initUse (Vue) {
  5636. Vue.use = function (plugin) {
  5637. /* istanbul ignore if */
  5638. if (plugin.installed) {
  5639. return this
  5640. }
  5641. // additional parameters
  5642. var args = toArray(arguments, 1);
  5643. args.unshift(this);
  5644. if (typeof plugin.install === 'function') {
  5645. plugin.install.apply(plugin, args);
  5646. } else if (typeof plugin === 'function') {
  5647. plugin.apply(null, args);
  5648. }
  5649. plugin.installed = true;
  5650. return this
  5651. };
  5652. }
  5653. /* */
  5654. function initMixin$1 (Vue) {
  5655. Vue.mixin = function (mixin) {
  5656. this.options = mergeOptions(this.options, mixin);
  5657. return this
  5658. };
  5659. }
  5660. /* */
  5661. function initExtend (Vue) {
  5662. /**
  5663. * Each instance constructor, including Vue, has a unique
  5664. * cid. This enables us to create wrapped "child
  5665. * constructors" for prototypal inheritance and cache them.
  5666. */
  5667. Vue.cid = 0;
  5668. var cid = 1;
  5669. /**
  5670. * Class inheritance
  5671. */
  5672. Vue.extend = function (extendOptions) {
  5673. extendOptions = extendOptions || {};
  5674. var Super = this;
  5675. var SuperId = Super.cid;
  5676. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  5677. if (cachedCtors[SuperId]) {
  5678. return cachedCtors[SuperId]
  5679. }
  5680. var name = extendOptions.name || Super.options.name;
  5681. if (process.env.NODE_ENV !== 'production') {
  5682. if (!/^[a-zA-Z][\w-]*$/.test(name)) {
  5683. warn(
  5684. 'Invalid component name: "' + name + '". Component names ' +
  5685. 'can only contain alphanumeric characters and the hyphen, ' +
  5686. 'and must start with a letter.'
  5687. );
  5688. }
  5689. }
  5690. var Sub = function VueComponent (options) {
  5691. this._init(options);
  5692. };
  5693. Sub.prototype = Object.create(Super.prototype);
  5694. Sub.prototype.constructor = Sub;
  5695. Sub.cid = cid++;
  5696. Sub.options = mergeOptions(
  5697. Super.options,
  5698. extendOptions
  5699. );
  5700. Sub['super'] = Super;
  5701. // For props and computed properties, we define the proxy getters on
  5702. // the Vue instances at extension time, on the extended prototype. This
  5703. // avoids Object.defineProperty calls for each instance created.
  5704. if (Sub.options.props) {
  5705. initProps$1(Sub);
  5706. }
  5707. if (Sub.options.computed) {
  5708. initComputed$1(Sub);
  5709. }
  5710. // allow further extension/mixin/plugin usage
  5711. Sub.extend = Super.extend;
  5712. Sub.mixin = Super.mixin;
  5713. Sub.use = Super.use;
  5714. // create asset registers, so extended classes
  5715. // can have their private assets too.
  5716. ASSET_TYPES.forEach(function (type) {
  5717. Sub[type] = Super[type];
  5718. });
  5719. // enable recursive self-lookup
  5720. if (name) {
  5721. Sub.options.components[name] = Sub;
  5722. }
  5723. // keep a reference to the super options at extension time.
  5724. // later at instantiation we can check if Super's options have
  5725. // been updated.
  5726. Sub.superOptions = Super.options;
  5727. Sub.extendOptions = extendOptions;
  5728. Sub.sealedOptions = extend({}, Sub.options);
  5729. // cache constructor
  5730. cachedCtors[SuperId] = Sub;
  5731. return Sub
  5732. };
  5733. }
  5734. function initProps$1 (Comp) {
  5735. var props = Comp.options.props;
  5736. for (var key in props) {
  5737. proxy(Comp.prototype, "_props", key);
  5738. }
  5739. }
  5740. function initComputed$1 (Comp) {
  5741. var computed = Comp.options.computed;
  5742. for (var key in computed) {
  5743. defineComputed(Comp.prototype, key, computed[key]);
  5744. }
  5745. }
  5746. /* */
  5747. function initAssetRegisters (Vue) {
  5748. /**
  5749. * Create asset registration methods.
  5750. */
  5751. ASSET_TYPES.forEach(function (type) {
  5752. Vue[type] = function (
  5753. id,
  5754. definition
  5755. ) {
  5756. if (!definition) {
  5757. return this.options[type + 's'][id]
  5758. } else {
  5759. /* istanbul ignore if */
  5760. if (process.env.NODE_ENV !== 'production') {
  5761. if (type === 'component' && config.isReservedTag(id)) {
  5762. warn(
  5763. 'Do not use built-in or reserved HTML elements as component ' +
  5764. 'id: ' + id
  5765. );
  5766. }
  5767. }
  5768. if (type === 'component' && isPlainObject(definition)) {
  5769. definition.name = definition.name || id;
  5770. definition = this.options._base.extend(definition);
  5771. }
  5772. if (type === 'directive' && typeof definition === 'function') {
  5773. definition = { bind: definition, update: definition };
  5774. }
  5775. this.options[type + 's'][id] = definition;
  5776. return definition
  5777. }
  5778. };
  5779. });
  5780. }
  5781. /* */
  5782. var patternTypes = [String, RegExp];
  5783. function getComponentName (opts) {
  5784. return opts && (opts.Ctor.options.name || opts.tag)
  5785. }
  5786. function matches (pattern, name) {
  5787. if (typeof pattern === 'string') {
  5788. return pattern.split(',').indexOf(name) > -1
  5789. } else if (isRegExp(pattern)) {
  5790. return pattern.test(name)
  5791. }
  5792. /* istanbul ignore next */
  5793. return false
  5794. }
  5795. function pruneCache (cache, current, filter) {
  5796. for (var key in cache) {
  5797. var cachedNode = cache[key];
  5798. if (cachedNode) {
  5799. var name = getComponentName(cachedNode.componentOptions);
  5800. if (name && !filter(name)) {
  5801. if (cachedNode !== current) {
  5802. pruneCacheEntry(cachedNode);
  5803. }
  5804. cache[key] = null;
  5805. }
  5806. }
  5807. }
  5808. }
  5809. function pruneCacheEntry (vnode) {
  5810. if (vnode) {
  5811. vnode.componentInstance.$destroy();
  5812. }
  5813. }
  5814. var KeepAlive = {
  5815. name: 'keep-alive',
  5816. abstract: true,
  5817. props: {
  5818. include: patternTypes,
  5819. exclude: patternTypes
  5820. },
  5821. created: function created () {
  5822. this.cache = Object.create(null);
  5823. },
  5824. destroyed: function destroyed () {
  5825. var this$1 = this;
  5826. for (var key in this$1.cache) {
  5827. pruneCacheEntry(this$1.cache[key]);
  5828. }
  5829. },
  5830. watch: {
  5831. include: function include (val) {
  5832. pruneCache(this.cache, this._vnode, function (name) { return matches(val, name); });
  5833. },
  5834. exclude: function exclude (val) {
  5835. pruneCache(this.cache, this._vnode, function (name) { return !matches(val, name); });
  5836. }
  5837. },
  5838. render: function render () {
  5839. var vnode = getFirstComponentChild(this.$slots.default);
  5840. var componentOptions = vnode && vnode.componentOptions;
  5841. if (componentOptions) {
  5842. // check pattern
  5843. var name = getComponentName(componentOptions);
  5844. if (name && (
  5845. (this.include && !matches(this.include, name)) ||
  5846. (this.exclude && matches(this.exclude, name))
  5847. )) {
  5848. return vnode
  5849. }
  5850. var key = vnode.key == null
  5851. // same constructor may get registered as different local components
  5852. // so cid alone is not enough (#3269)
  5853. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  5854. : vnode.key;
  5855. if (this.cache[key]) {
  5856. vnode.componentInstance = this.cache[key].componentInstance;
  5857. } else {
  5858. this.cache[key] = vnode;
  5859. }
  5860. vnode.data.keepAlive = true;
  5861. }
  5862. return vnode
  5863. }
  5864. };
  5865. var builtInComponents = {
  5866. KeepAlive: KeepAlive
  5867. };
  5868. /* */
  5869. function initGlobalAPI (Vue) {
  5870. // config
  5871. var configDef = {};
  5872. configDef.get = function () { return config; };
  5873. if (process.env.NODE_ENV !== 'production') {
  5874. configDef.set = function () {
  5875. warn(
  5876. 'Do not replace the Vue.config object, set individual fields instead.'
  5877. );
  5878. };
  5879. }
  5880. Object.defineProperty(Vue, 'config', configDef);
  5881. // exposed util methods.
  5882. // NOTE: these are not considered part of the public API - avoid relying on
  5883. // them unless you are aware of the risk.
  5884. Vue.util = {
  5885. warn: warn,
  5886. extend: extend,
  5887. mergeOptions: mergeOptions,
  5888. defineReactive: defineReactive$$1
  5889. };
  5890. Vue.set = set;
  5891. Vue.delete = del;
  5892. Vue.nextTick = nextTick;
  5893. Vue.options = Object.create(null);
  5894. ASSET_TYPES.forEach(function (type) {
  5895. Vue.options[type + 's'] = Object.create(null);
  5896. });
  5897. // this is used to identify the "base" constructor to extend all plain-object
  5898. // components with in Weex's multi-instance scenarios.
  5899. Vue.options._base = Vue;
  5900. extend(Vue.options.components, builtInComponents);
  5901. initUse(Vue);
  5902. initMixin$1(Vue);
  5903. initExtend(Vue);
  5904. initAssetRegisters(Vue);
  5905. }
  5906. initGlobalAPI(Vue$3);
  5907. Object.defineProperty(Vue$3.prototype, '$isServer', {
  5908. get: isServerRendering
  5909. });
  5910. Object.defineProperty(Vue$3.prototype, '$ssrContext', {
  5911. get: function get () {
  5912. /* istanbul ignore next */
  5913. return this.$vnode.ssrContext
  5914. }
  5915. });
  5916. Vue$3.version = '2.3.3';
  5917. /* */
  5918. // these are reserved for web because they are directly compiled away
  5919. // during template compilation
  5920. var isReservedAttr = makeMap('style,class');
  5921. // attributes that should be using props for binding
  5922. var acceptValue = makeMap('input,textarea,option,select');
  5923. var mustUseProp = function (tag, type, attr) {
  5924. return (
  5925. (attr === 'value' && acceptValue(tag)) && type !== 'button' ||
  5926. (attr === 'selected' && tag === 'option') ||
  5927. (attr === 'checked' && tag === 'input') ||
  5928. (attr === 'muted' && tag === 'video')
  5929. )
  5930. };
  5931. var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
  5932. var isBooleanAttr = makeMap(
  5933. 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
  5934. 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
  5935. 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
  5936. 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
  5937. 'required,reversed,scoped,seamless,selected,sortable,translate,' +
  5938. 'truespeed,typemustmatch,visible'
  5939. );
  5940. var xlinkNS = 'http://www.w3.org/1999/xlink';
  5941. var isXlink = function (name) {
  5942. return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'
  5943. };
  5944. var getXlinkProp = function (name) {
  5945. return isXlink(name) ? name.slice(6, name.length) : ''
  5946. };
  5947. var isFalsyAttrValue = function (val) {
  5948. return val == null || val === false
  5949. };
  5950. /* */
  5951. function genClassForVnode (vnode) {
  5952. var data = vnode.data;
  5953. var parentNode = vnode;
  5954. var childNode = vnode;
  5955. while (isDef(childNode.componentInstance)) {
  5956. childNode = childNode.componentInstance._vnode;
  5957. if (childNode.data) {
  5958. data = mergeClassData(childNode.data, data);
  5959. }
  5960. }
  5961. while (isDef(parentNode = parentNode.parent)) {
  5962. if (parentNode.data) {
  5963. data = mergeClassData(data, parentNode.data);
  5964. }
  5965. }
  5966. return genClassFromData(data)
  5967. }
  5968. function mergeClassData (child, parent) {
  5969. return {
  5970. staticClass: concat(child.staticClass, parent.staticClass),
  5971. class: isDef(child.class)
  5972. ? [child.class, parent.class]
  5973. : parent.class
  5974. }
  5975. }
  5976. function genClassFromData (data) {
  5977. var dynamicClass = data.class;
  5978. var staticClass = data.staticClass;
  5979. if (isDef(staticClass) || isDef(dynamicClass)) {
  5980. return concat(staticClass, stringifyClass(dynamicClass))
  5981. }
  5982. /* istanbul ignore next */
  5983. return ''
  5984. }
  5985. function concat (a, b) {
  5986. return a ? b ? (a + ' ' + b) : a : (b || '')
  5987. }
  5988. function stringifyClass (value) {
  5989. if (isUndef(value)) {
  5990. return ''
  5991. }
  5992. if (typeof value === 'string') {
  5993. return value
  5994. }
  5995. var res = '';
  5996. if (Array.isArray(value)) {
  5997. var stringified;
  5998. for (var i = 0, l = value.length; i < l; i++) {
  5999. if (isDef(value[i])) {
  6000. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  6001. res += stringified + ' ';
  6002. }
  6003. }
  6004. }
  6005. return res.slice(0, -1)
  6006. }
  6007. if (isObject(value)) {
  6008. for (var key in value) {
  6009. if (value[key]) { res += key + ' '; }
  6010. }
  6011. return res.slice(0, -1)
  6012. }
  6013. /* istanbul ignore next */
  6014. return res
  6015. }
  6016. /* */
  6017. var namespaceMap = {
  6018. svg: 'http://www.w3.org/2000/svg',
  6019. math: 'http://www.w3.org/1998/Math/MathML'
  6020. };
  6021. var isHTMLTag = makeMap(
  6022. 'html,body,base,head,link,meta,style,title,' +
  6023. 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
  6024. 'div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,' +
  6025. 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
  6026. 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
  6027. 'embed,object,param,source,canvas,script,noscript,del,ins,' +
  6028. 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
  6029. 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
  6030. 'output,progress,select,textarea,' +
  6031. 'details,dialog,menu,menuitem,summary,' +
  6032. 'content,element,shadow,template'
  6033. );
  6034. // this map is intentionally selective, only covering SVG elements that may
  6035. // contain child elements.
  6036. var isSVG = makeMap(
  6037. 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
  6038. 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
  6039. 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
  6040. true
  6041. );
  6042. var isPreTag = function (tag) { return tag === 'pre'; };
  6043. var isReservedTag = function (tag) {
  6044. return isHTMLTag(tag) || isSVG(tag)
  6045. };
  6046. function getTagNamespace (tag) {
  6047. if (isSVG(tag)) {
  6048. return 'svg'
  6049. }
  6050. // basic support for MathML
  6051. // note it doesn't support other MathML elements being component roots
  6052. if (tag === 'math') {
  6053. return 'math'
  6054. }
  6055. }
  6056. var unknownElementCache = Object.create(null);
  6057. function isUnknownElement (tag) {
  6058. /* istanbul ignore if */
  6059. if (!inBrowser) {
  6060. return true
  6061. }
  6062. if (isReservedTag(tag)) {
  6063. return false
  6064. }
  6065. tag = tag.toLowerCase();
  6066. /* istanbul ignore if */
  6067. if (unknownElementCache[tag] != null) {
  6068. return unknownElementCache[tag]
  6069. }
  6070. var el = document.createElement(tag);
  6071. if (tag.indexOf('-') > -1) {
  6072. // http://stackoverflow.com/a/28210364/1070244
  6073. return (unknownElementCache[tag] = (
  6074. el.constructor === window.HTMLUnknownElement ||
  6075. el.constructor === window.HTMLElement
  6076. ))
  6077. } else {
  6078. return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))
  6079. }
  6080. }
  6081. /* */
  6082. /**
  6083. * Query an element selector if it's not an element already.
  6084. */
  6085. function query (el) {
  6086. if (typeof el === 'string') {
  6087. var selected = document.querySelector(el);
  6088. if (!selected) {
  6089. process.env.NODE_ENV !== 'production' && warn(
  6090. 'Cannot find element: ' + el
  6091. );
  6092. return document.createElement('div')
  6093. }
  6094. return selected
  6095. } else {
  6096. return el
  6097. }
  6098. }
  6099. /* */
  6100. function createElement$1 (tagName, vnode) {
  6101. var elm = document.createElement(tagName);
  6102. if (tagName !== 'select') {
  6103. return elm
  6104. }
  6105. // false or null will remove the attribute but undefined will not
  6106. if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {
  6107. elm.setAttribute('multiple', 'multiple');
  6108. }
  6109. return elm
  6110. }
  6111. function createElementNS (namespace, tagName) {
  6112. return document.createElementNS(namespaceMap[namespace], tagName)
  6113. }
  6114. function createTextNode (text) {
  6115. return document.createTextNode(text)
  6116. }
  6117. function createComment (text) {
  6118. return document.createComment(text)
  6119. }
  6120. function insertBefore (parentNode, newNode, referenceNode) {
  6121. parentNode.insertBefore(newNode, referenceNode);
  6122. }
  6123. function removeChild (node, child) {
  6124. node.removeChild(child);
  6125. }
  6126. function appendChild (node, child) {
  6127. node.appendChild(child);
  6128. }
  6129. function parentNode (node) {
  6130. return node.parentNode
  6131. }
  6132. function nextSibling (node) {
  6133. return node.nextSibling
  6134. }
  6135. function tagName (node) {
  6136. return node.tagName
  6137. }
  6138. function setTextContent (node, text) {
  6139. node.textContent = text;
  6140. }
  6141. function setAttribute (node, key, val) {
  6142. node.setAttribute(key, val);
  6143. }
  6144. var nodeOps = Object.freeze({
  6145. createElement: createElement$1,
  6146. createElementNS: createElementNS,
  6147. createTextNode: createTextNode,
  6148. createComment: createComment,
  6149. insertBefore: insertBefore,
  6150. removeChild: removeChild,
  6151. appendChild: appendChild,
  6152. parentNode: parentNode,
  6153. nextSibling: nextSibling,
  6154. tagName: tagName,
  6155. setTextContent: setTextContent,
  6156. setAttribute: setAttribute
  6157. });
  6158. /* */
  6159. var ref = {
  6160. create: function create (_, vnode) {
  6161. registerRef(vnode);
  6162. },
  6163. update: function update (oldVnode, vnode) {
  6164. if (oldVnode.data.ref !== vnode.data.ref) {
  6165. registerRef(oldVnode, true);
  6166. registerRef(vnode);
  6167. }
  6168. },
  6169. destroy: function destroy (vnode) {
  6170. registerRef(vnode, true);
  6171. }
  6172. };
  6173. function registerRef (vnode, isRemoval) {
  6174. var key = vnode.data.ref;
  6175. if (!key) { return }
  6176. var vm = vnode.context;
  6177. var ref = vnode.componentInstance || vnode.elm;
  6178. var refs = vm.$refs;
  6179. if (isRemoval) {
  6180. if (Array.isArray(refs[key])) {
  6181. remove(refs[key], ref);
  6182. } else if (refs[key] === ref) {
  6183. refs[key] = undefined;
  6184. }
  6185. } else {
  6186. if (vnode.data.refInFor) {
  6187. if (Array.isArray(refs[key]) && refs[key].indexOf(ref) < 0) {
  6188. refs[key].push(ref);
  6189. } else {
  6190. refs[key] = [ref];
  6191. }
  6192. } else {
  6193. refs[key] = ref;
  6194. }
  6195. }
  6196. }
  6197. /**
  6198. * Virtual DOM patching algorithm based on Snabbdom by
  6199. * Simon Friis Vindum (@paldepind)
  6200. * Licensed under the MIT License
  6201. * https://github.com/paldepind/snabbdom/blob/master/LICENSE
  6202. *
  6203. * modified by Evan You (@yyx990803)
  6204. *
  6205. /*
  6206. * Not type-checking this because this file is perf-critical and the cost
  6207. * of making flow understand it is not worth it.
  6208. */
  6209. var emptyNode = new VNode('', {}, []);
  6210. var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
  6211. function sameVnode (a, b) {
  6212. return (
  6213. a.key === b.key &&
  6214. a.tag === b.tag &&
  6215. a.isComment === b.isComment &&
  6216. isDef(a.data) === isDef(b.data) &&
  6217. sameInputType(a, b)
  6218. )
  6219. }
  6220. // Some browsers do not support dynamically changing type for <input>
  6221. // so they need to be treated as different nodes
  6222. function sameInputType (a, b) {
  6223. if (a.tag !== 'input') { return true }
  6224. var i;
  6225. var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;
  6226. var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;
  6227. return typeA === typeB
  6228. }
  6229. function createKeyToOldIdx (children, beginIdx, endIdx) {
  6230. var i, key;
  6231. var map = {};
  6232. for (i = beginIdx; i <= endIdx; ++i) {
  6233. key = children[i].key;
  6234. if (isDef(key)) { map[key] = i; }
  6235. }
  6236. return map
  6237. }
  6238. function createPatchFunction (backend) {
  6239. var i, j;
  6240. var cbs = {};
  6241. var modules = backend.modules;
  6242. var nodeOps = backend.nodeOps;
  6243. for (i = 0; i < hooks.length; ++i) {
  6244. cbs[hooks[i]] = [];
  6245. for (j = 0; j < modules.length; ++j) {
  6246. if (isDef(modules[j][hooks[i]])) {
  6247. cbs[hooks[i]].push(modules[j][hooks[i]]);
  6248. }
  6249. }
  6250. }
  6251. function emptyNodeAt (elm) {
  6252. return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
  6253. }
  6254. function createRmCb (childElm, listeners) {
  6255. function remove$$1 () {
  6256. if (--remove$$1.listeners === 0) {
  6257. removeNode(childElm);
  6258. }
  6259. }
  6260. remove$$1.listeners = listeners;
  6261. return remove$$1
  6262. }
  6263. function removeNode (el) {
  6264. var parent = nodeOps.parentNode(el);
  6265. // element may have already been removed due to v-html / v-text
  6266. if (isDef(parent)) {
  6267. nodeOps.removeChild(parent, el);
  6268. }
  6269. }
  6270. var inPre = 0;
  6271. function createElm (vnode, insertedVnodeQueue, parentElm, refElm, nested) {
  6272. vnode.isRootInsert = !nested; // for transition enter check
  6273. if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
  6274. return
  6275. }
  6276. var data = vnode.data;
  6277. var children = vnode.children;
  6278. var tag = vnode.tag;
  6279. if (isDef(tag)) {
  6280. if (process.env.NODE_ENV !== 'production') {
  6281. if (data && data.pre) {
  6282. inPre++;
  6283. }
  6284. if (
  6285. !inPre &&
  6286. !vnode.ns &&
  6287. !(config.ignoredElements.length && config.ignoredElements.indexOf(tag) > -1) &&
  6288. config.isUnknownElement(tag)
  6289. ) {
  6290. warn(
  6291. 'Unknown custom element: <' + tag + '> - did you ' +
  6292. 'register the component correctly? For recursive components, ' +
  6293. 'make sure to provide the "name" option.',
  6294. vnode.context
  6295. );
  6296. }
  6297. }
  6298. vnode.elm = vnode.ns
  6299. ? nodeOps.createElementNS(vnode.ns, tag)
  6300. : nodeOps.createElement(tag, vnode);
  6301. setScope(vnode);
  6302. /* istanbul ignore if */
  6303. {
  6304. createChildren(vnode, children, insertedVnodeQueue);
  6305. if (isDef(data)) {
  6306. invokeCreateHooks(vnode, insertedVnodeQueue);
  6307. }
  6308. insert(parentElm, vnode.elm, refElm);
  6309. }
  6310. if (process.env.NODE_ENV !== 'production' && data && data.pre) {
  6311. inPre--;
  6312. }
  6313. } else if (isTrue(vnode.isComment)) {
  6314. vnode.elm = nodeOps.createComment(vnode.text);
  6315. insert(parentElm, vnode.elm, refElm);
  6316. } else {
  6317. vnode.elm = nodeOps.createTextNode(vnode.text);
  6318. insert(parentElm, vnode.elm, refElm);
  6319. }
  6320. }
  6321. function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
  6322. var i = vnode.data;
  6323. if (isDef(i)) {
  6324. var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;
  6325. if (isDef(i = i.hook) && isDef(i = i.init)) {
  6326. i(vnode, false /* hydrating */, parentElm, refElm);
  6327. }
  6328. // after calling the init hook, if the vnode is a child component
  6329. // it should've created a child instance and mounted it. the child
  6330. // component also has set the placeholder vnode's elm.
  6331. // in that case we can just return the element and be done.
  6332. if (isDef(vnode.componentInstance)) {
  6333. initComponent(vnode, insertedVnodeQueue);
  6334. if (isTrue(isReactivated)) {
  6335. reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
  6336. }
  6337. return true
  6338. }
  6339. }
  6340. }
  6341. function initComponent (vnode, insertedVnodeQueue) {
  6342. if (isDef(vnode.data.pendingInsert)) {
  6343. insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);
  6344. }
  6345. vnode.elm = vnode.componentInstance.$el;
  6346. if (isPatchable(vnode)) {
  6347. invokeCreateHooks(vnode, insertedVnodeQueue);
  6348. setScope(vnode);
  6349. } else {
  6350. // empty component root.
  6351. // skip all element-related modules except for ref (#3455)
  6352. registerRef(vnode);
  6353. // make sure to invoke the insert hook
  6354. insertedVnodeQueue.push(vnode);
  6355. }
  6356. }
  6357. function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
  6358. var i;
  6359. // hack for #4339: a reactivated component with inner transition
  6360. // does not trigger because the inner node's created hooks are not called
  6361. // again. It's not ideal to involve module-specific logic in here but
  6362. // there doesn't seem to be a better way to do it.
  6363. var innerNode = vnode;
  6364. while (innerNode.componentInstance) {
  6365. innerNode = innerNode.componentInstance._vnode;
  6366. if (isDef(i = innerNode.data) && isDef(i = i.transition)) {
  6367. for (i = 0; i < cbs.activate.length; ++i) {
  6368. cbs.activate[i](emptyNode, innerNode);
  6369. }
  6370. insertedVnodeQueue.push(innerNode);
  6371. break
  6372. }
  6373. }
  6374. // unlike a newly created component,
  6375. // a reactivated keep-alive component doesn't insert itself
  6376. insert(parentElm, vnode.elm, refElm);
  6377. }
  6378. function insert (parent, elm, ref) {
  6379. if (isDef(parent)) {
  6380. if (isDef(ref)) {
  6381. if (ref.parentNode === parent) {
  6382. nodeOps.insertBefore(parent, elm, ref);
  6383. }
  6384. } else {
  6385. nodeOps.appendChild(parent, elm);
  6386. }
  6387. }
  6388. }
  6389. function createChildren (vnode, children, insertedVnodeQueue) {
  6390. if (Array.isArray(children)) {
  6391. for (var i = 0; i < children.length; ++i) {
  6392. createElm(children[i], insertedVnodeQueue, vnode.elm, null, true);
  6393. }
  6394. } else if (isPrimitive(vnode.text)) {
  6395. nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(vnode.text));
  6396. }
  6397. }
  6398. function isPatchable (vnode) {
  6399. while (vnode.componentInstance) {
  6400. vnode = vnode.componentInstance._vnode;
  6401. }
  6402. return isDef(vnode.tag)
  6403. }
  6404. function invokeCreateHooks (vnode, insertedVnodeQueue) {
  6405. for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
  6406. cbs.create[i$1](emptyNode, vnode);
  6407. }
  6408. i = vnode.data.hook; // Reuse variable
  6409. if (isDef(i)) {
  6410. if (isDef(i.create)) { i.create(emptyNode, vnode); }
  6411. if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }
  6412. }
  6413. }
  6414. // set scope id attribute for scoped CSS.
  6415. // this is implemented as a special case to avoid the overhead
  6416. // of going through the normal attribute patching process.
  6417. function setScope (vnode) {
  6418. var i;
  6419. var ancestor = vnode;
  6420. while (ancestor) {
  6421. if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {
  6422. nodeOps.setAttribute(vnode.elm, i, '');
  6423. }
  6424. ancestor = ancestor.parent;
  6425. }
  6426. // for slot content they should also get the scopeId from the host instance.
  6427. if (isDef(i = activeInstance) &&
  6428. i !== vnode.context &&
  6429. isDef(i = i.$options._scopeId)
  6430. ) {
  6431. nodeOps.setAttribute(vnode.elm, i, '');
  6432. }
  6433. }
  6434. function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
  6435. for (; startIdx <= endIdx; ++startIdx) {
  6436. createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm);
  6437. }
  6438. }
  6439. function invokeDestroyHook (vnode) {
  6440. var i, j;
  6441. var data = vnode.data;
  6442. if (isDef(data)) {
  6443. if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }
  6444. for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }
  6445. }
  6446. if (isDef(i = vnode.children)) {
  6447. for (j = 0; j < vnode.children.length; ++j) {
  6448. invokeDestroyHook(vnode.children[j]);
  6449. }
  6450. }
  6451. }
  6452. function removeVnodes (parentElm, vnodes, startIdx, endIdx) {
  6453. for (; startIdx <= endIdx; ++startIdx) {
  6454. var ch = vnodes[startIdx];
  6455. if (isDef(ch)) {
  6456. if (isDef(ch.tag)) {
  6457. removeAndInvokeRemoveHook(ch);
  6458. invokeDestroyHook(ch);
  6459. } else { // Text node
  6460. removeNode(ch.elm);
  6461. }
  6462. }
  6463. }
  6464. }
  6465. function removeAndInvokeRemoveHook (vnode, rm) {
  6466. if (isDef(rm) || isDef(vnode.data)) {
  6467. var i;
  6468. var listeners = cbs.remove.length + 1;
  6469. if (isDef(rm)) {
  6470. // we have a recursively passed down rm callback
  6471. // increase the listeners count
  6472. rm.listeners += listeners;
  6473. } else {
  6474. // directly removing
  6475. rm = createRmCb(vnode.elm, listeners);
  6476. }
  6477. // recursively invoke hooks on child component root node
  6478. if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {
  6479. removeAndInvokeRemoveHook(i, rm);
  6480. }
  6481. for (i = 0; i < cbs.remove.length; ++i) {
  6482. cbs.remove[i](vnode, rm);
  6483. }
  6484. if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {
  6485. i(vnode, rm);
  6486. } else {
  6487. rm();
  6488. }
  6489. } else {
  6490. removeNode(vnode.elm);
  6491. }
  6492. }
  6493. function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
  6494. var oldStartIdx = 0;
  6495. var newStartIdx = 0;
  6496. var oldEndIdx = oldCh.length - 1;
  6497. var oldStartVnode = oldCh[0];
  6498. var oldEndVnode = oldCh[oldEndIdx];
  6499. var newEndIdx = newCh.length - 1;
  6500. var newStartVnode = newCh[0];
  6501. var newEndVnode = newCh[newEndIdx];
  6502. var oldKeyToIdx, idxInOld, elmToMove, refElm;
  6503. // removeOnly is a special flag used only by <transition-group>
  6504. // to ensure removed elements stay in correct relative positions
  6505. // during leaving transitions
  6506. var canMove = !removeOnly;
  6507. while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
  6508. if (isUndef(oldStartVnode)) {
  6509. oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left
  6510. } else if (isUndef(oldEndVnode)) {
  6511. oldEndVnode = oldCh[--oldEndIdx];
  6512. } else if (sameVnode(oldStartVnode, newStartVnode)) {
  6513. patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);
  6514. oldStartVnode = oldCh[++oldStartIdx];
  6515. newStartVnode = newCh[++newStartIdx];
  6516. } else if (sameVnode(oldEndVnode, newEndVnode)) {
  6517. patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);
  6518. oldEndVnode = oldCh[--oldEndIdx];
  6519. newEndVnode = newCh[--newEndIdx];
  6520. } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right
  6521. patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);
  6522. canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
  6523. oldStartVnode = oldCh[++oldStartIdx];
  6524. newEndVnode = newCh[--newEndIdx];
  6525. } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left
  6526. patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);
  6527. canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
  6528. oldEndVnode = oldCh[--oldEndIdx];
  6529. newStartVnode = newCh[++newStartIdx];
  6530. } else {
  6531. if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }
  6532. idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : null;
  6533. if (isUndef(idxInOld)) { // New element
  6534. createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);
  6535. newStartVnode = newCh[++newStartIdx];
  6536. } else {
  6537. elmToMove = oldCh[idxInOld];
  6538. /* istanbul ignore if */
  6539. if (process.env.NODE_ENV !== 'production' && !elmToMove) {
  6540. warn(
  6541. 'It seems there are duplicate keys that is causing an update error. ' +
  6542. 'Make sure each v-for item has a unique key.'
  6543. );
  6544. }
  6545. if (sameVnode(elmToMove, newStartVnode)) {
  6546. patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);
  6547. oldCh[idxInOld] = undefined;
  6548. canMove && nodeOps.insertBefore(parentElm, newStartVnode.elm, oldStartVnode.elm);
  6549. newStartVnode = newCh[++newStartIdx];
  6550. } else {
  6551. // same key but different element. treat as new element
  6552. createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);
  6553. newStartVnode = newCh[++newStartIdx];
  6554. }
  6555. }
  6556. }
  6557. }
  6558. if (oldStartIdx > oldEndIdx) {
  6559. refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
  6560. addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
  6561. } else if (newStartIdx > newEndIdx) {
  6562. removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
  6563. }
  6564. }
  6565. function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {
  6566. if (oldVnode === vnode) {
  6567. return
  6568. }
  6569. // reuse element for static trees.
  6570. // note we only do this if the vnode is cloned -
  6571. // if the new node is not cloned it means the render functions have been
  6572. // reset by the hot-reload-api and we need to do a proper re-render.
  6573. if (isTrue(vnode.isStatic) &&
  6574. isTrue(oldVnode.isStatic) &&
  6575. vnode.key === oldVnode.key &&
  6576. (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))
  6577. ) {
  6578. vnode.elm = oldVnode.elm;
  6579. vnode.componentInstance = oldVnode.componentInstance;
  6580. return
  6581. }
  6582. var i;
  6583. var data = vnode.data;
  6584. if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {
  6585. i(oldVnode, vnode);
  6586. }
  6587. var elm = vnode.elm = oldVnode.elm;
  6588. var oldCh = oldVnode.children;
  6589. var ch = vnode.children;
  6590. if (isDef(data) && isPatchable(vnode)) {
  6591. for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }
  6592. if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }
  6593. }
  6594. if (isUndef(vnode.text)) {
  6595. if (isDef(oldCh) && isDef(ch)) {
  6596. if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }
  6597. } else if (isDef(ch)) {
  6598. if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
  6599. addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
  6600. } else if (isDef(oldCh)) {
  6601. removeVnodes(elm, oldCh, 0, oldCh.length - 1);
  6602. } else if (isDef(oldVnode.text)) {
  6603. nodeOps.setTextContent(elm, '');
  6604. }
  6605. } else if (oldVnode.text !== vnode.text) {
  6606. nodeOps.setTextContent(elm, vnode.text);
  6607. }
  6608. if (isDef(data)) {
  6609. if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }
  6610. }
  6611. }
  6612. function invokeInsertHook (vnode, queue, initial) {
  6613. // delay insert hooks for component root nodes, invoke them after the
  6614. // element is really inserted
  6615. if (isTrue(initial) && isDef(vnode.parent)) {
  6616. vnode.parent.data.pendingInsert = queue;
  6617. } else {
  6618. for (var i = 0; i < queue.length; ++i) {
  6619. queue[i].data.hook.insert(queue[i]);
  6620. }
  6621. }
  6622. }
  6623. var bailed = false;
  6624. // list of modules that can skip create hook during hydration because they
  6625. // are already rendered on the client or has no need for initialization
  6626. var isRenderedModule = makeMap('attrs,style,class,staticClass,staticStyle,key');
  6627. // Note: this is a browser-only function so we can assume elms are DOM nodes.
  6628. function hydrate (elm, vnode, insertedVnodeQueue) {
  6629. if (process.env.NODE_ENV !== 'production') {
  6630. if (!assertNodeMatch(elm, vnode)) {
  6631. return false
  6632. }
  6633. }
  6634. vnode.elm = elm;
  6635. var tag = vnode.tag;
  6636. var data = vnode.data;
  6637. var children = vnode.children;
  6638. if (isDef(data)) {
  6639. if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }
  6640. if (isDef(i = vnode.componentInstance)) {
  6641. // child component. it should have hydrated its own tree.
  6642. initComponent(vnode, insertedVnodeQueue);
  6643. return true
  6644. }
  6645. }
  6646. if (isDef(tag)) {
  6647. if (isDef(children)) {
  6648. // empty element, allow client to pick up and populate children
  6649. if (!elm.hasChildNodes()) {
  6650. createChildren(vnode, children, insertedVnodeQueue);
  6651. } else {
  6652. var childrenMatch = true;
  6653. var childNode = elm.firstChild;
  6654. for (var i$1 = 0; i$1 < children.length; i$1++) {
  6655. if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue)) {
  6656. childrenMatch = false;
  6657. break
  6658. }
  6659. childNode = childNode.nextSibling;
  6660. }
  6661. // if childNode is not null, it means the actual childNodes list is
  6662. // longer than the virtual children list.
  6663. if (!childrenMatch || childNode) {
  6664. if (process.env.NODE_ENV !== 'production' &&
  6665. typeof console !== 'undefined' &&
  6666. !bailed
  6667. ) {
  6668. bailed = true;
  6669. console.warn('Parent: ', elm);
  6670. console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
  6671. }
  6672. return false
  6673. }
  6674. }
  6675. }
  6676. if (isDef(data)) {
  6677. for (var key in data) {
  6678. if (!isRenderedModule(key)) {
  6679. invokeCreateHooks(vnode, insertedVnodeQueue);
  6680. break
  6681. }
  6682. }
  6683. }
  6684. } else if (elm.data !== vnode.text) {
  6685. elm.data = vnode.text;
  6686. }
  6687. return true
  6688. }
  6689. function assertNodeMatch (node, vnode) {
  6690. if (isDef(vnode.tag)) {
  6691. return (
  6692. vnode.tag.indexOf('vue-component') === 0 ||
  6693. vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())
  6694. )
  6695. } else {
  6696. return node.nodeType === (vnode.isComment ? 8 : 3)
  6697. }
  6698. }
  6699. return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) {
  6700. if (isUndef(vnode)) {
  6701. if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }
  6702. return
  6703. }
  6704. var isInitialPatch = false;
  6705. var insertedVnodeQueue = [];
  6706. if (isUndef(oldVnode)) {
  6707. // empty mount (likely as component), create new root element
  6708. isInitialPatch = true;
  6709. createElm(vnode, insertedVnodeQueue, parentElm, refElm);
  6710. } else {
  6711. var isRealElement = isDef(oldVnode.nodeType);
  6712. if (!isRealElement && sameVnode(oldVnode, vnode)) {
  6713. // patch existing root node
  6714. patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly);
  6715. } else {
  6716. if (isRealElement) {
  6717. // mounting to a real element
  6718. // check if this is server-rendered content and if we can perform
  6719. // a successful hydration.
  6720. if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {
  6721. oldVnode.removeAttribute(SSR_ATTR);
  6722. hydrating = true;
  6723. }
  6724. if (isTrue(hydrating)) {
  6725. if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
  6726. invokeInsertHook(vnode, insertedVnodeQueue, true);
  6727. return oldVnode
  6728. } else if (process.env.NODE_ENV !== 'production') {
  6729. warn(
  6730. 'The client-side rendered virtual DOM tree is not matching ' +
  6731. 'server-rendered content. This is likely caused by incorrect ' +
  6732. 'HTML markup, for example nesting block-level elements inside ' +
  6733. '<p>, or missing <tbody>. Bailing hydration and performing ' +
  6734. 'full client-side render.'
  6735. );
  6736. }
  6737. }
  6738. // either not server-rendered, or hydration failed.
  6739. // create an empty node and replace it
  6740. oldVnode = emptyNodeAt(oldVnode);
  6741. }
  6742. // replacing existing element
  6743. var oldElm = oldVnode.elm;
  6744. var parentElm$1 = nodeOps.parentNode(oldElm);
  6745. createElm(
  6746. vnode,
  6747. insertedVnodeQueue,
  6748. // extremely rare edge case: do not insert if old element is in a
  6749. // leaving transition. Only happens when combining transition +
  6750. // keep-alive + HOCs. (#4590)
  6751. oldElm._leaveCb ? null : parentElm$1,
  6752. nodeOps.nextSibling(oldElm)
  6753. );
  6754. if (isDef(vnode.parent)) {
  6755. // component root element replaced.
  6756. // update parent placeholder node element, recursively
  6757. var ancestor = vnode.parent;
  6758. while (ancestor) {
  6759. ancestor.elm = vnode.elm;
  6760. ancestor = ancestor.parent;
  6761. }
  6762. if (isPatchable(vnode)) {
  6763. for (var i = 0; i < cbs.create.length; ++i) {
  6764. cbs.create[i](emptyNode, vnode.parent);
  6765. }
  6766. }
  6767. }
  6768. if (isDef(parentElm$1)) {
  6769. removeVnodes(parentElm$1, [oldVnode], 0, 0);
  6770. } else if (isDef(oldVnode.tag)) {
  6771. invokeDestroyHook(oldVnode);
  6772. }
  6773. }
  6774. }
  6775. invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
  6776. return vnode.elm
  6777. }
  6778. }
  6779. /* */
  6780. var directives = {
  6781. create: updateDirectives,
  6782. update: updateDirectives,
  6783. destroy: function unbindDirectives (vnode) {
  6784. updateDirectives(vnode, emptyNode);
  6785. }
  6786. };
  6787. function updateDirectives (oldVnode, vnode) {
  6788. if (oldVnode.data.directives || vnode.data.directives) {
  6789. _update(oldVnode, vnode);
  6790. }
  6791. }
  6792. function _update (oldVnode, vnode) {
  6793. var isCreate = oldVnode === emptyNode;
  6794. var isDestroy = vnode === emptyNode;
  6795. var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);
  6796. var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);
  6797. var dirsWithInsert = [];
  6798. var dirsWithPostpatch = [];
  6799. var key, oldDir, dir;
  6800. for (key in newDirs) {
  6801. oldDir = oldDirs[key];
  6802. dir = newDirs[key];
  6803. if (!oldDir) {
  6804. // new directive, bind
  6805. callHook$1(dir, 'bind', vnode, oldVnode);
  6806. if (dir.def && dir.def.inserted) {
  6807. dirsWithInsert.push(dir);
  6808. }
  6809. } else {
  6810. // existing directive, update
  6811. dir.oldValue = oldDir.value;
  6812. callHook$1(dir, 'update', vnode, oldVnode);
  6813. if (dir.def && dir.def.componentUpdated) {
  6814. dirsWithPostpatch.push(dir);
  6815. }
  6816. }
  6817. }
  6818. if (dirsWithInsert.length) {
  6819. var callInsert = function () {
  6820. for (var i = 0; i < dirsWithInsert.length; i++) {
  6821. callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);
  6822. }
  6823. };
  6824. if (isCreate) {
  6825. mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', callInsert);
  6826. } else {
  6827. callInsert();
  6828. }
  6829. }
  6830. if (dirsWithPostpatch.length) {
  6831. mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'postpatch', function () {
  6832. for (var i = 0; i < dirsWithPostpatch.length; i++) {
  6833. callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
  6834. }
  6835. });
  6836. }
  6837. if (!isCreate) {
  6838. for (key in oldDirs) {
  6839. if (!newDirs[key]) {
  6840. // no longer present, unbind
  6841. callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);
  6842. }
  6843. }
  6844. }
  6845. }
  6846. var emptyModifiers = Object.create(null);
  6847. function normalizeDirectives$1 (
  6848. dirs,
  6849. vm
  6850. ) {
  6851. var res = Object.create(null);
  6852. if (!dirs) {
  6853. return res
  6854. }
  6855. var i, dir;
  6856. for (i = 0; i < dirs.length; i++) {
  6857. dir = dirs[i];
  6858. if (!dir.modifiers) {
  6859. dir.modifiers = emptyModifiers;
  6860. }
  6861. res[getRawDirName(dir)] = dir;
  6862. dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);
  6863. }
  6864. return res
  6865. }
  6866. function getRawDirName (dir) {
  6867. return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.')))
  6868. }
  6869. function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {
  6870. var fn = dir.def && dir.def[hook];
  6871. if (fn) {
  6872. try {
  6873. fn(vnode.elm, dir, vnode, oldVnode, isDestroy);
  6874. } catch (e) {
  6875. handleError(e, vnode.context, ("directive " + (dir.name) + " " + hook + " hook"));
  6876. }
  6877. }
  6878. }
  6879. var baseModules = [
  6880. ref,
  6881. directives
  6882. ];
  6883. /* */
  6884. function updateAttrs (oldVnode, vnode) {
  6885. if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
  6886. return
  6887. }
  6888. var key, cur, old;
  6889. var elm = vnode.elm;
  6890. var oldAttrs = oldVnode.data.attrs || {};
  6891. var attrs = vnode.data.attrs || {};
  6892. // clone observed objects, as the user probably wants to mutate it
  6893. if (isDef(attrs.__ob__)) {
  6894. attrs = vnode.data.attrs = extend({}, attrs);
  6895. }
  6896. for (key in attrs) {
  6897. cur = attrs[key];
  6898. old = oldAttrs[key];
  6899. if (old !== cur) {
  6900. setAttr(elm, key, cur);
  6901. }
  6902. }
  6903. // #4391: in IE9, setting type can reset value for input[type=radio]
  6904. /* istanbul ignore if */
  6905. if (isIE9 && attrs.value !== oldAttrs.value) {
  6906. setAttr(elm, 'value', attrs.value);
  6907. }
  6908. for (key in oldAttrs) {
  6909. if (isUndef(attrs[key])) {
  6910. if (isXlink(key)) {
  6911. elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
  6912. } else if (!isEnumeratedAttr(key)) {
  6913. elm.removeAttribute(key);
  6914. }
  6915. }
  6916. }
  6917. }
  6918. function setAttr (el, key, value) {
  6919. if (isBooleanAttr(key)) {
  6920. // set attribute for blank value
  6921. // e.g. <option disabled>Select one</option>
  6922. if (isFalsyAttrValue(value)) {
  6923. el.removeAttribute(key);
  6924. } else {
  6925. el.setAttribute(key, key);
  6926. }
  6927. } else if (isEnumeratedAttr(key)) {
  6928. el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');
  6929. } else if (isXlink(key)) {
  6930. if (isFalsyAttrValue(value)) {
  6931. el.removeAttributeNS(xlinkNS, getXlinkProp(key));
  6932. } else {
  6933. el.setAttributeNS(xlinkNS, key, value);
  6934. }
  6935. } else {
  6936. if (isFalsyAttrValue(value)) {
  6937. el.removeAttribute(key);
  6938. } else {
  6939. el.setAttribute(key, value);
  6940. }
  6941. }
  6942. }
  6943. var attrs = {
  6944. create: updateAttrs,
  6945. update: updateAttrs
  6946. };
  6947. /* */
  6948. function updateClass (oldVnode, vnode) {
  6949. var el = vnode.elm;
  6950. var data = vnode.data;
  6951. var oldData = oldVnode.data;
  6952. if (
  6953. isUndef(data.staticClass) &&
  6954. isUndef(data.class) && (
  6955. isUndef(oldData) || (
  6956. isUndef(oldData.staticClass) &&
  6957. isUndef(oldData.class)
  6958. )
  6959. )
  6960. ) {
  6961. return
  6962. }
  6963. var cls = genClassForVnode(vnode);
  6964. // handle transition classes
  6965. var transitionClass = el._transitionClasses;
  6966. if (isDef(transitionClass)) {
  6967. cls = concat(cls, stringifyClass(transitionClass));
  6968. }
  6969. // set the class
  6970. if (cls !== el._prevClass) {
  6971. el.setAttribute('class', cls);
  6972. el._prevClass = cls;
  6973. }
  6974. }
  6975. var klass = {
  6976. create: updateClass,
  6977. update: updateClass
  6978. };
  6979. /* */
  6980. var validDivisionCharRE = /[\w).+\-_$\]]/;
  6981. function parseFilters (exp) {
  6982. var inSingle = false;
  6983. var inDouble = false;
  6984. var inTemplateString = false;
  6985. var inRegex = false;
  6986. var curly = 0;
  6987. var square = 0;
  6988. var paren = 0;
  6989. var lastFilterIndex = 0;
  6990. var c, prev, i, expression, filters;
  6991. for (i = 0; i < exp.length; i++) {
  6992. prev = c;
  6993. c = exp.charCodeAt(i);
  6994. if (inSingle) {
  6995. if (c === 0x27 && prev !== 0x5C) { inSingle = false; }
  6996. } else if (inDouble) {
  6997. if (c === 0x22 && prev !== 0x5C) { inDouble = false; }
  6998. } else if (inTemplateString) {
  6999. if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }
  7000. } else if (inRegex) {
  7001. if (c === 0x2f && prev !== 0x5C) { inRegex = false; }
  7002. } else if (
  7003. c === 0x7C && // pipe
  7004. exp.charCodeAt(i + 1) !== 0x7C &&
  7005. exp.charCodeAt(i - 1) !== 0x7C &&
  7006. !curly && !square && !paren
  7007. ) {
  7008. if (expression === undefined) {
  7009. // first filter, end of expression
  7010. lastFilterIndex = i + 1;
  7011. expression = exp.slice(0, i).trim();
  7012. } else {
  7013. pushFilter();
  7014. }
  7015. } else {
  7016. switch (c) {
  7017. case 0x22: inDouble = true; break // "
  7018. case 0x27: inSingle = true; break // '
  7019. case 0x60: inTemplateString = true; break // `
  7020. case 0x28: paren++; break // (
  7021. case 0x29: paren--; break // )
  7022. case 0x5B: square++; break // [
  7023. case 0x5D: square--; break // ]
  7024. case 0x7B: curly++; break // {
  7025. case 0x7D: curly--; break // }
  7026. }
  7027. if (c === 0x2f) { // /
  7028. var j = i - 1;
  7029. var p = (void 0);
  7030. // find first non-whitespace prev char
  7031. for (; j >= 0; j--) {
  7032. p = exp.charAt(j);
  7033. if (p !== ' ') { break }
  7034. }
  7035. if (!p || !validDivisionCharRE.test(p)) {
  7036. inRegex = true;
  7037. }
  7038. }
  7039. }
  7040. }
  7041. if (expression === undefined) {
  7042. expression = exp.slice(0, i).trim();
  7043. } else if (lastFilterIndex !== 0) {
  7044. pushFilter();
  7045. }
  7046. function pushFilter () {
  7047. (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());
  7048. lastFilterIndex = i + 1;
  7049. }
  7050. if (filters) {
  7051. for (i = 0; i < filters.length; i++) {
  7052. expression = wrapFilter(expression, filters[i]);
  7053. }
  7054. }
  7055. return expression
  7056. }
  7057. function wrapFilter (exp, filter) {
  7058. var i = filter.indexOf('(');
  7059. if (i < 0) {
  7060. // _f: resolveFilter
  7061. return ("_f(\"" + filter + "\")(" + exp + ")")
  7062. } else {
  7063. var name = filter.slice(0, i);
  7064. var args = filter.slice(i + 1);
  7065. return ("_f(\"" + name + "\")(" + exp + "," + args)
  7066. }
  7067. }
  7068. /* */
  7069. function baseWarn (msg) {
  7070. console.error(("[Vue compiler]: " + msg));
  7071. }
  7072. function pluckModuleFunction (
  7073. modules,
  7074. key
  7075. ) {
  7076. return modules
  7077. ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })
  7078. : []
  7079. }
  7080. function addProp (el, name, value) {
  7081. (el.props || (el.props = [])).push({ name: name, value: value });
  7082. }
  7083. function addAttr (el, name, value) {
  7084. (el.attrs || (el.attrs = [])).push({ name: name, value: value });
  7085. }
  7086. function addDirective (
  7087. el,
  7088. name,
  7089. rawName,
  7090. value,
  7091. arg,
  7092. modifiers
  7093. ) {
  7094. (el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers });
  7095. }
  7096. function addHandler (
  7097. el,
  7098. name,
  7099. value,
  7100. modifiers,
  7101. important,
  7102. warn
  7103. ) {
  7104. // warn prevent and passive modifier
  7105. /* istanbul ignore if */
  7106. if (
  7107. process.env.NODE_ENV !== 'production' && warn &&
  7108. modifiers && modifiers.prevent && modifiers.passive
  7109. ) {
  7110. warn(
  7111. 'passive and prevent can\'t be used together. ' +
  7112. 'Passive handler can\'t prevent default event.'
  7113. );
  7114. }
  7115. // check capture modifier
  7116. if (modifiers && modifiers.capture) {
  7117. delete modifiers.capture;
  7118. name = '!' + name; // mark the event as captured
  7119. }
  7120. if (modifiers && modifiers.once) {
  7121. delete modifiers.once;
  7122. name = '~' + name; // mark the event as once
  7123. }
  7124. /* istanbul ignore if */
  7125. if (modifiers && modifiers.passive) {
  7126. delete modifiers.passive;
  7127. name = '&' + name; // mark the event as passive
  7128. }
  7129. var events;
  7130. if (modifiers && modifiers.native) {
  7131. delete modifiers.native;
  7132. events = el.nativeEvents || (el.nativeEvents = {});
  7133. } else {
  7134. events = el.events || (el.events = {});
  7135. }
  7136. var newHandler = { value: value, modifiers: modifiers };
  7137. var handlers = events[name];
  7138. /* istanbul ignore if */
  7139. if (Array.isArray(handlers)) {
  7140. important ? handlers.unshift(newHandler) : handlers.push(newHandler);
  7141. } else if (handlers) {
  7142. events[name] = important ? [newHandler, handlers] : [handlers, newHandler];
  7143. } else {
  7144. events[name] = newHandler;
  7145. }
  7146. }
  7147. function getBindingAttr (
  7148. el,
  7149. name,
  7150. getStatic
  7151. ) {
  7152. var dynamicValue =
  7153. getAndRemoveAttr(el, ':' + name) ||
  7154. getAndRemoveAttr(el, 'v-bind:' + name);
  7155. if (dynamicValue != null) {
  7156. return parseFilters(dynamicValue)
  7157. } else if (getStatic !== false) {
  7158. var staticValue = getAndRemoveAttr(el, name);
  7159. if (staticValue != null) {
  7160. return JSON.stringify(staticValue)
  7161. }
  7162. }
  7163. }
  7164. function getAndRemoveAttr (el, name) {
  7165. var val;
  7166. if ((val = el.attrsMap[name]) != null) {
  7167. var list = el.attrsList;
  7168. for (var i = 0, l = list.length; i < l; i++) {
  7169. if (list[i].name === name) {
  7170. list.splice(i, 1);
  7171. break
  7172. }
  7173. }
  7174. }
  7175. return val
  7176. }
  7177. /* */
  7178. /**
  7179. * Cross-platform code generation for component v-model
  7180. */
  7181. function genComponentModel (
  7182. el,
  7183. value,
  7184. modifiers
  7185. ) {
  7186. var ref = modifiers || {};
  7187. var number = ref.number;
  7188. var trim = ref.trim;
  7189. var baseValueExpression = '$$v';
  7190. var valueExpression = baseValueExpression;
  7191. if (trim) {
  7192. valueExpression =
  7193. "(typeof " + baseValueExpression + " === 'string'" +
  7194. "? " + baseValueExpression + ".trim()" +
  7195. ": " + baseValueExpression + ")";
  7196. }
  7197. if (number) {
  7198. valueExpression = "_n(" + valueExpression + ")";
  7199. }
  7200. var assignment = genAssignmentCode(value, valueExpression);
  7201. el.model = {
  7202. value: ("(" + value + ")"),
  7203. expression: ("\"" + value + "\""),
  7204. callback: ("function (" + baseValueExpression + ") {" + assignment + "}")
  7205. };
  7206. }
  7207. /**
  7208. * Cross-platform codegen helper for generating v-model value assignment code.
  7209. */
  7210. function genAssignmentCode (
  7211. value,
  7212. assignment
  7213. ) {
  7214. var modelRs = parseModel(value);
  7215. if (modelRs.idx === null) {
  7216. return (value + "=" + assignment)
  7217. } else {
  7218. return "var $$exp = " + (modelRs.exp) + ", $$idx = " + (modelRs.idx) + ";" +
  7219. "if (!Array.isArray($$exp)){" +
  7220. value + "=" + assignment + "}" +
  7221. "else{$$exp.splice($$idx, 1, " + assignment + ")}"
  7222. }
  7223. }
  7224. /**
  7225. * parse directive model to do the array update transform. a[idx] = val => $$a.splice($$idx, 1, val)
  7226. *
  7227. * for loop possible cases:
  7228. *
  7229. * - test
  7230. * - test[idx]
  7231. * - test[test1[idx]]
  7232. * - test["a"][idx]
  7233. * - xxx.test[a[a].test1[idx]]
  7234. * - test.xxx.a["asa"][test1[idx]]
  7235. *
  7236. */
  7237. var len;
  7238. var str;
  7239. var chr;
  7240. var index$1;
  7241. var expressionPos;
  7242. var expressionEndPos;
  7243. function parseModel (val) {
  7244. str = val;
  7245. len = str.length;
  7246. index$1 = expressionPos = expressionEndPos = 0;
  7247. if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
  7248. return {
  7249. exp: val,
  7250. idx: null
  7251. }
  7252. }
  7253. while (!eof()) {
  7254. chr = next();
  7255. /* istanbul ignore if */
  7256. if (isStringStart(chr)) {
  7257. parseString(chr);
  7258. } else if (chr === 0x5B) {
  7259. parseBracket(chr);
  7260. }
  7261. }
  7262. return {
  7263. exp: val.substring(0, expressionPos),
  7264. idx: val.substring(expressionPos + 1, expressionEndPos)
  7265. }
  7266. }
  7267. function next () {
  7268. return str.charCodeAt(++index$1)
  7269. }
  7270. function eof () {
  7271. return index$1 >= len
  7272. }
  7273. function isStringStart (chr) {
  7274. return chr === 0x22 || chr === 0x27
  7275. }
  7276. function parseBracket (chr) {
  7277. var inBracket = 1;
  7278. expressionPos = index$1;
  7279. while (!eof()) {
  7280. chr = next();
  7281. if (isStringStart(chr)) {
  7282. parseString(chr);
  7283. continue
  7284. }
  7285. if (chr === 0x5B) { inBracket++; }
  7286. if (chr === 0x5D) { inBracket--; }
  7287. if (inBracket === 0) {
  7288. expressionEndPos = index$1;
  7289. break
  7290. }
  7291. }
  7292. }
  7293. function parseString (chr) {
  7294. var stringQuote = chr;
  7295. while (!eof()) {
  7296. chr = next();
  7297. if (chr === stringQuote) {
  7298. break
  7299. }
  7300. }
  7301. }
  7302. /* */
  7303. var warn$1;
  7304. // in some cases, the event used has to be determined at runtime
  7305. // so we used some reserved tokens during compile.
  7306. var RANGE_TOKEN = '__r';
  7307. var CHECKBOX_RADIO_TOKEN = '__c';
  7308. function model (
  7309. el,
  7310. dir,
  7311. _warn
  7312. ) {
  7313. warn$1 = _warn;
  7314. var value = dir.value;
  7315. var modifiers = dir.modifiers;
  7316. var tag = el.tag;
  7317. var type = el.attrsMap.type;
  7318. if (process.env.NODE_ENV !== 'production') {
  7319. var dynamicType = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];
  7320. if (tag === 'input' && dynamicType) {
  7321. warn$1(
  7322. "<input :type=\"" + dynamicType + "\" v-model=\"" + value + "\">:\n" +
  7323. "v-model does not support dynamic input types. Use v-if branches instead."
  7324. );
  7325. }
  7326. // inputs with type="file" are read only and setting the input's
  7327. // value will throw an error.
  7328. if (tag === 'input' && type === 'file') {
  7329. warn$1(
  7330. "<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" +
  7331. "File inputs are read only. Use a v-on:change listener instead."
  7332. );
  7333. }
  7334. }
  7335. if (tag === 'select') {
  7336. genSelect(el, value, modifiers);
  7337. } else if (tag === 'input' && type === 'checkbox') {
  7338. genCheckboxModel(el, value, modifiers);
  7339. } else if (tag === 'input' && type === 'radio') {
  7340. genRadioModel(el, value, modifiers);
  7341. } else if (tag === 'input' || tag === 'textarea') {
  7342. genDefaultModel(el, value, modifiers);
  7343. } else if (!config.isReservedTag(tag)) {
  7344. genComponentModel(el, value, modifiers);
  7345. // component v-model doesn't need extra runtime
  7346. return false
  7347. } else if (process.env.NODE_ENV !== 'production') {
  7348. warn$1(
  7349. "<" + (el.tag) + " v-model=\"" + value + "\">: " +
  7350. "v-model is not supported on this element type. " +
  7351. 'If you are working with contenteditable, it\'s recommended to ' +
  7352. 'wrap a library dedicated for that purpose inside a custom component.'
  7353. );
  7354. }
  7355. // ensure runtime directive metadata
  7356. return true
  7357. }
  7358. function genCheckboxModel (
  7359. el,
  7360. value,
  7361. modifiers
  7362. ) {
  7363. var number = modifiers && modifiers.number;
  7364. var valueBinding = getBindingAttr(el, 'value') || 'null';
  7365. var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
  7366. var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
  7367. addProp(el, 'checked',
  7368. "Array.isArray(" + value + ")" +
  7369. "?_i(" + value + "," + valueBinding + ")>-1" + (
  7370. trueValueBinding === 'true'
  7371. ? (":(" + value + ")")
  7372. : (":_q(" + value + "," + trueValueBinding + ")")
  7373. )
  7374. );
  7375. addHandler(el, CHECKBOX_RADIO_TOKEN,
  7376. "var $$a=" + value + "," +
  7377. '$$el=$event.target,' +
  7378. "$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" +
  7379. 'if(Array.isArray($$a)){' +
  7380. "var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," +
  7381. '$$i=_i($$a,$$v);' +
  7382. "if($$c){$$i<0&&(" + value + "=$$a.concat($$v))}" +
  7383. "else{$$i>-1&&(" + value + "=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}" +
  7384. "}else{" + (genAssignmentCode(value, '$$c')) + "}",
  7385. null, true
  7386. );
  7387. }
  7388. function genRadioModel (
  7389. el,
  7390. value,
  7391. modifiers
  7392. ) {
  7393. var number = modifiers && modifiers.number;
  7394. var valueBinding = getBindingAttr(el, 'value') || 'null';
  7395. valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding;
  7396. addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")"));
  7397. addHandler(el, CHECKBOX_RADIO_TOKEN, genAssignmentCode(value, valueBinding), null, true);
  7398. }
  7399. function genSelect (
  7400. el,
  7401. value,
  7402. modifiers
  7403. ) {
  7404. var number = modifiers && modifiers.number;
  7405. var selectedVal = "Array.prototype.filter" +
  7406. ".call($event.target.options,function(o){return o.selected})" +
  7407. ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
  7408. "return " + (number ? '_n(val)' : 'val') + "})";
  7409. var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
  7410. var code = "var $$selectedVal = " + selectedVal + ";";
  7411. code = code + " " + (genAssignmentCode(value, assignment));
  7412. addHandler(el, 'change', code, null, true);
  7413. }
  7414. function genDefaultModel (
  7415. el,
  7416. value,
  7417. modifiers
  7418. ) {
  7419. var type = el.attrsMap.type;
  7420. var ref = modifiers || {};
  7421. var lazy = ref.lazy;
  7422. var number = ref.number;
  7423. var trim = ref.trim;
  7424. var needCompositionGuard = !lazy && type !== 'range';
  7425. var event = lazy
  7426. ? 'change'
  7427. : type === 'range'
  7428. ? RANGE_TOKEN
  7429. : 'input';
  7430. var valueExpression = '$event.target.value';
  7431. if (trim) {
  7432. valueExpression = "$event.target.value.trim()";
  7433. }
  7434. if (number) {
  7435. valueExpression = "_n(" + valueExpression + ")";
  7436. }
  7437. var code = genAssignmentCode(value, valueExpression);
  7438. if (needCompositionGuard) {
  7439. code = "if($event.target.composing)return;" + code;
  7440. }
  7441. addProp(el, 'value', ("(" + value + ")"));
  7442. addHandler(el, event, code, null, true);
  7443. if (trim || number || type === 'number') {
  7444. addHandler(el, 'blur', '$forceUpdate()');
  7445. }
  7446. }
  7447. /* */
  7448. // normalize v-model event tokens that can only be determined at runtime.
  7449. // it's important to place the event as the first in the array because
  7450. // the whole point is ensuring the v-model callback gets called before
  7451. // user-attached handlers.
  7452. function normalizeEvents (on) {
  7453. var event;
  7454. /* istanbul ignore if */
  7455. if (isDef(on[RANGE_TOKEN])) {
  7456. // IE input[type=range] only supports `change` event
  7457. event = isIE ? 'change' : 'input';
  7458. on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);
  7459. delete on[RANGE_TOKEN];
  7460. }
  7461. if (isDef(on[CHECKBOX_RADIO_TOKEN])) {
  7462. // Chrome fires microtasks in between click/change, leads to #4521
  7463. event = isChrome ? 'click' : 'change';
  7464. on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);
  7465. delete on[CHECKBOX_RADIO_TOKEN];
  7466. }
  7467. }
  7468. var target$1;
  7469. function add$1 (
  7470. event,
  7471. handler,
  7472. once$$1,
  7473. capture,
  7474. passive
  7475. ) {
  7476. if (once$$1) {
  7477. var oldHandler = handler;
  7478. var _target = target$1; // save current target element in closure
  7479. handler = function (ev) {
  7480. var res = arguments.length === 1
  7481. ? oldHandler(ev)
  7482. : oldHandler.apply(null, arguments);
  7483. if (res !== null) {
  7484. remove$2(event, handler, capture, _target);
  7485. }
  7486. };
  7487. }
  7488. target$1.addEventListener(
  7489. event,
  7490. handler,
  7491. supportsPassive
  7492. ? { capture: capture, passive: passive }
  7493. : capture
  7494. );
  7495. }
  7496. function remove$2 (
  7497. event,
  7498. handler,
  7499. capture,
  7500. _target
  7501. ) {
  7502. (_target || target$1).removeEventListener(event, handler, capture);
  7503. }
  7504. function updateDOMListeners (oldVnode, vnode) {
  7505. if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
  7506. return
  7507. }
  7508. var on = vnode.data.on || {};
  7509. var oldOn = oldVnode.data.on || {};
  7510. target$1 = vnode.elm;
  7511. normalizeEvents(on);
  7512. updateListeners(on, oldOn, add$1, remove$2, vnode.context);
  7513. }
  7514. var events = {
  7515. create: updateDOMListeners,
  7516. update: updateDOMListeners
  7517. };
  7518. /* */
  7519. function updateDOMProps (oldVnode, vnode) {
  7520. if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
  7521. return
  7522. }
  7523. var key, cur;
  7524. var elm = vnode.elm;
  7525. var oldProps = oldVnode.data.domProps || {};
  7526. var props = vnode.data.domProps || {};
  7527. // clone observed objects, as the user probably wants to mutate it
  7528. if (isDef(props.__ob__)) {
  7529. props = vnode.data.domProps = extend({}, props);
  7530. }
  7531. for (key in oldProps) {
  7532. if (isUndef(props[key])) {
  7533. elm[key] = '';
  7534. }
  7535. }
  7536. for (key in props) {
  7537. cur = props[key];
  7538. // ignore children if the node has textContent or innerHTML,
  7539. // as these will throw away existing DOM nodes and cause removal errors
  7540. // on subsequent patches (#3360)
  7541. if (key === 'textContent' || key === 'innerHTML') {
  7542. if (vnode.children) { vnode.children.length = 0; }
  7543. if (cur === oldProps[key]) { continue }
  7544. }
  7545. if (key === 'value') {
  7546. // store value as _value as well since
  7547. // non-string values will be stringified
  7548. elm._value = cur;
  7549. // avoid resetting cursor position when value is the same
  7550. var strCur = isUndef(cur) ? '' : String(cur);
  7551. if (shouldUpdateValue(elm, vnode, strCur)) {
  7552. elm.value = strCur;
  7553. }
  7554. } else {
  7555. elm[key] = cur;
  7556. }
  7557. }
  7558. }
  7559. // check platforms/web/util/attrs.js acceptValue
  7560. function shouldUpdateValue (
  7561. elm,
  7562. vnode,
  7563. checkVal
  7564. ) {
  7565. return (!elm.composing && (
  7566. vnode.tag === 'option' ||
  7567. isDirty(elm, checkVal) ||
  7568. isInputChanged(elm, checkVal)
  7569. ))
  7570. }
  7571. function isDirty (elm, checkVal) {
  7572. // return true when textbox (.number and .trim) loses focus and its value is not equal to the updated value
  7573. return document.activeElement !== elm && elm.value !== checkVal
  7574. }
  7575. function isInputChanged (elm, newVal) {
  7576. var value = elm.value;
  7577. var modifiers = elm._vModifiers; // injected by v-model runtime
  7578. if ((isDef(modifiers) && modifiers.number) || elm.type === 'number') {
  7579. return toNumber(value) !== toNumber(newVal)
  7580. }
  7581. if (isDef(modifiers) && modifiers.trim) {
  7582. return value.trim() !== newVal.trim()
  7583. }
  7584. return value !== newVal
  7585. }
  7586. var domProps = {
  7587. create: updateDOMProps,
  7588. update: updateDOMProps
  7589. };
  7590. /* */
  7591. var parseStyleText = cached(function (cssText) {
  7592. var res = {};
  7593. var listDelimiter = /;(?![^(]*\))/g;
  7594. var propertyDelimiter = /:(.+)/;
  7595. cssText.split(listDelimiter).forEach(function (item) {
  7596. if (item) {
  7597. var tmp = item.split(propertyDelimiter);
  7598. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  7599. }
  7600. });
  7601. return res
  7602. });
  7603. // merge static and dynamic style data on the same vnode
  7604. function normalizeStyleData (data) {
  7605. var style = normalizeStyleBinding(data.style);
  7606. // static style is pre-processed into an object during compilation
  7607. // and is always a fresh object, so it's safe to merge into it
  7608. return data.staticStyle
  7609. ? extend(data.staticStyle, style)
  7610. : style
  7611. }
  7612. // normalize possible array / string values into Object
  7613. function normalizeStyleBinding (bindingStyle) {
  7614. if (Array.isArray(bindingStyle)) {
  7615. return toObject(bindingStyle)
  7616. }
  7617. if (typeof bindingStyle === 'string') {
  7618. return parseStyleText(bindingStyle)
  7619. }
  7620. return bindingStyle
  7621. }
  7622. /**
  7623. * parent component style should be after child's
  7624. * so that parent component's style could override it
  7625. */
  7626. function getStyle (vnode, checkChild) {
  7627. var res = {};
  7628. var styleData;
  7629. if (checkChild) {
  7630. var childNode = vnode;
  7631. while (childNode.componentInstance) {
  7632. childNode = childNode.componentInstance._vnode;
  7633. if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {
  7634. extend(res, styleData);
  7635. }
  7636. }
  7637. }
  7638. if ((styleData = normalizeStyleData(vnode.data))) {
  7639. extend(res, styleData);
  7640. }
  7641. var parentNode = vnode;
  7642. while ((parentNode = parentNode.parent)) {
  7643. if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
  7644. extend(res, styleData);
  7645. }
  7646. }
  7647. return res
  7648. }
  7649. /* */
  7650. var cssVarRE = /^--/;
  7651. var importantRE = /\s*!important$/;
  7652. var setProp = function (el, name, val) {
  7653. /* istanbul ignore if */
  7654. if (cssVarRE.test(name)) {
  7655. el.style.setProperty(name, val);
  7656. } else if (importantRE.test(val)) {
  7657. el.style.setProperty(name, val.replace(importantRE, ''), 'important');
  7658. } else {
  7659. var normalizedName = normalize(name);
  7660. if (Array.isArray(val)) {
  7661. // Support values array created by autoprefixer, e.g.
  7662. // {display: ["-webkit-box", "-ms-flexbox", "flex"]}
  7663. // Set them one by one, and the browser will only set those it can recognize
  7664. for (var i = 0, len = val.length; i < len; i++) {
  7665. el.style[normalizedName] = val[i];
  7666. }
  7667. } else {
  7668. el.style[normalizedName] = val;
  7669. }
  7670. }
  7671. };
  7672. var prefixes = ['Webkit', 'Moz', 'ms'];
  7673. var testEl;
  7674. var normalize = cached(function (prop) {
  7675. testEl = testEl || document.createElement('div');
  7676. prop = camelize(prop);
  7677. if (prop !== 'filter' && (prop in testEl.style)) {
  7678. return prop
  7679. }
  7680. var upper = prop.charAt(0).toUpperCase() + prop.slice(1);
  7681. for (var i = 0; i < prefixes.length; i++) {
  7682. var prefixed = prefixes[i] + upper;
  7683. if (prefixed in testEl.style) {
  7684. return prefixed
  7685. }
  7686. }
  7687. });
  7688. function updateStyle (oldVnode, vnode) {
  7689. var data = vnode.data;
  7690. var oldData = oldVnode.data;
  7691. if (isUndef(data.staticStyle) && isUndef(data.style) &&
  7692. isUndef(oldData.staticStyle) && isUndef(oldData.style)
  7693. ) {
  7694. return
  7695. }
  7696. var cur, name;
  7697. var el = vnode.elm;
  7698. var oldStaticStyle = oldData.staticStyle;
  7699. var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};
  7700. // if static style exists, stylebinding already merged into it when doing normalizeStyleData
  7701. var oldStyle = oldStaticStyle || oldStyleBinding;
  7702. var style = normalizeStyleBinding(vnode.data.style) || {};
  7703. // store normalized style under a different key for next diff
  7704. // make sure to clone it if it's reactive, since the user likley wants
  7705. // to mutate it.
  7706. vnode.data.normalizedStyle = isDef(style.__ob__)
  7707. ? extend({}, style)
  7708. : style;
  7709. var newStyle = getStyle(vnode, true);
  7710. for (name in oldStyle) {
  7711. if (isUndef(newStyle[name])) {
  7712. setProp(el, name, '');
  7713. }
  7714. }
  7715. for (name in newStyle) {
  7716. cur = newStyle[name];
  7717. if (cur !== oldStyle[name]) {
  7718. // ie9 setting to null has no effect, must use empty string
  7719. setProp(el, name, cur == null ? '' : cur);
  7720. }
  7721. }
  7722. }
  7723. var style = {
  7724. create: updateStyle,
  7725. update: updateStyle
  7726. };
  7727. /* */
  7728. /**
  7729. * Add class with compatibility for SVG since classList is not supported on
  7730. * SVG elements in IE
  7731. */
  7732. function addClass (el, cls) {
  7733. /* istanbul ignore if */
  7734. if (!cls || !(cls = cls.trim())) {
  7735. return
  7736. }
  7737. /* istanbul ignore else */
  7738. if (el.classList) {
  7739. if (cls.indexOf(' ') > -1) {
  7740. cls.split(/\s+/).forEach(function (c) { return el.classList.add(c); });
  7741. } else {
  7742. el.classList.add(cls);
  7743. }
  7744. } else {
  7745. var cur = " " + (el.getAttribute('class') || '') + " ";
  7746. if (cur.indexOf(' ' + cls + ' ') < 0) {
  7747. el.setAttribute('class', (cur + cls).trim());
  7748. }
  7749. }
  7750. }
  7751. /**
  7752. * Remove class with compatibility for SVG since classList is not supported on
  7753. * SVG elements in IE
  7754. */
  7755. function removeClass (el, cls) {
  7756. /* istanbul ignore if */
  7757. if (!cls || !(cls = cls.trim())) {
  7758. return
  7759. }
  7760. /* istanbul ignore else */
  7761. if (el.classList) {
  7762. if (cls.indexOf(' ') > -1) {
  7763. cls.split(/\s+/).forEach(function (c) { return el.classList.remove(c); });
  7764. } else {
  7765. el.classList.remove(cls);
  7766. }
  7767. } else {
  7768. var cur = " " + (el.getAttribute('class') || '') + " ";
  7769. var tar = ' ' + cls + ' ';
  7770. while (cur.indexOf(tar) >= 0) {
  7771. cur = cur.replace(tar, ' ');
  7772. }
  7773. el.setAttribute('class', cur.trim());
  7774. }
  7775. }
  7776. /* */
  7777. function resolveTransition (def$$1) {
  7778. if (!def$$1) {
  7779. return
  7780. }
  7781. /* istanbul ignore else */
  7782. if (typeof def$$1 === 'object') {
  7783. var res = {};
  7784. if (def$$1.css !== false) {
  7785. extend(res, autoCssTransition(def$$1.name || 'v'));
  7786. }
  7787. extend(res, def$$1);
  7788. return res
  7789. } else if (typeof def$$1 === 'string') {
  7790. return autoCssTransition(def$$1)
  7791. }
  7792. }
  7793. var autoCssTransition = cached(function (name) {
  7794. return {
  7795. enterClass: (name + "-enter"),
  7796. enterToClass: (name + "-enter-to"),
  7797. enterActiveClass: (name + "-enter-active"),
  7798. leaveClass: (name + "-leave"),
  7799. leaveToClass: (name + "-leave-to"),
  7800. leaveActiveClass: (name + "-leave-active")
  7801. }
  7802. });
  7803. var hasTransition = inBrowser && !isIE9;
  7804. var TRANSITION = 'transition';
  7805. var ANIMATION = 'animation';
  7806. // Transition property/event sniffing
  7807. var transitionProp = 'transition';
  7808. var transitionEndEvent = 'transitionend';
  7809. var animationProp = 'animation';
  7810. var animationEndEvent = 'animationend';
  7811. if (hasTransition) {
  7812. /* istanbul ignore if */
  7813. if (window.ontransitionend === undefined &&
  7814. window.onwebkittransitionend !== undefined
  7815. ) {
  7816. transitionProp = 'WebkitTransition';
  7817. transitionEndEvent = 'webkitTransitionEnd';
  7818. }
  7819. if (window.onanimationend === undefined &&
  7820. window.onwebkitanimationend !== undefined
  7821. ) {
  7822. animationProp = 'WebkitAnimation';
  7823. animationEndEvent = 'webkitAnimationEnd';
  7824. }
  7825. }
  7826. // binding to window is necessary to make hot reload work in IE in strict mode
  7827. var raf = inBrowser && window.requestAnimationFrame
  7828. ? window.requestAnimationFrame.bind(window)
  7829. : setTimeout;
  7830. function nextFrame (fn) {
  7831. raf(function () {
  7832. raf(fn);
  7833. });
  7834. }
  7835. function addTransitionClass (el, cls) {
  7836. (el._transitionClasses || (el._transitionClasses = [])).push(cls);
  7837. addClass(el, cls);
  7838. }
  7839. function removeTransitionClass (el, cls) {
  7840. if (el._transitionClasses) {
  7841. remove(el._transitionClasses, cls);
  7842. }
  7843. removeClass(el, cls);
  7844. }
  7845. function whenTransitionEnds (
  7846. el,
  7847. expectedType,
  7848. cb
  7849. ) {
  7850. var ref = getTransitionInfo(el, expectedType);
  7851. var type = ref.type;
  7852. var timeout = ref.timeout;
  7853. var propCount = ref.propCount;
  7854. if (!type) { return cb() }
  7855. var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
  7856. var ended = 0;
  7857. var end = function () {
  7858. el.removeEventListener(event, onEnd);
  7859. cb();
  7860. };
  7861. var onEnd = function (e) {
  7862. if (e.target === el) {
  7863. if (++ended >= propCount) {
  7864. end();
  7865. }
  7866. }
  7867. };
  7868. setTimeout(function () {
  7869. if (ended < propCount) {
  7870. end();
  7871. }
  7872. }, timeout + 1);
  7873. el.addEventListener(event, onEnd);
  7874. }
  7875. var transformRE = /\b(transform|all)(,|$)/;
  7876. function getTransitionInfo (el, expectedType) {
  7877. var styles = window.getComputedStyle(el);
  7878. var transitionDelays = styles[transitionProp + 'Delay'].split(', ');
  7879. var transitionDurations = styles[transitionProp + 'Duration'].split(', ');
  7880. var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  7881. var animationDelays = styles[animationProp + 'Delay'].split(', ');
  7882. var animationDurations = styles[animationProp + 'Duration'].split(', ');
  7883. var animationTimeout = getTimeout(animationDelays, animationDurations);
  7884. var type;
  7885. var timeout = 0;
  7886. var propCount = 0;
  7887. /* istanbul ignore if */
  7888. if (expectedType === TRANSITION) {
  7889. if (transitionTimeout > 0) {
  7890. type = TRANSITION;
  7891. timeout = transitionTimeout;
  7892. propCount = transitionDurations.length;
  7893. }
  7894. } else if (expectedType === ANIMATION) {
  7895. if (animationTimeout > 0) {
  7896. type = ANIMATION;
  7897. timeout = animationTimeout;
  7898. propCount = animationDurations.length;
  7899. }
  7900. } else {
  7901. timeout = Math.max(transitionTimeout, animationTimeout);
  7902. type = timeout > 0
  7903. ? transitionTimeout > animationTimeout
  7904. ? TRANSITION
  7905. : ANIMATION
  7906. : null;
  7907. propCount = type
  7908. ? type === TRANSITION
  7909. ? transitionDurations.length
  7910. : animationDurations.length
  7911. : 0;
  7912. }
  7913. var hasTransform =
  7914. type === TRANSITION &&
  7915. transformRE.test(styles[transitionProp + 'Property']);
  7916. return {
  7917. type: type,
  7918. timeout: timeout,
  7919. propCount: propCount,
  7920. hasTransform: hasTransform
  7921. }
  7922. }
  7923. function getTimeout (delays, durations) {
  7924. /* istanbul ignore next */
  7925. while (delays.length < durations.length) {
  7926. delays = delays.concat(delays);
  7927. }
  7928. return Math.max.apply(null, durations.map(function (d, i) {
  7929. return toMs(d) + toMs(delays[i])
  7930. }))
  7931. }
  7932. function toMs (s) {
  7933. return Number(s.slice(0, -1)) * 1000
  7934. }
  7935. /* */
  7936. function enter (vnode, toggleDisplay) {
  7937. var el = vnode.elm;
  7938. // call leave callback now
  7939. if (isDef(el._leaveCb)) {
  7940. el._leaveCb.cancelled = true;
  7941. el._leaveCb();
  7942. }
  7943. var data = resolveTransition(vnode.data.transition);
  7944. if (isUndef(data)) {
  7945. return
  7946. }
  7947. /* istanbul ignore if */
  7948. if (isDef(el._enterCb) || el.nodeType !== 1) {
  7949. return
  7950. }
  7951. var css = data.css;
  7952. var type = data.type;
  7953. var enterClass = data.enterClass;
  7954. var enterToClass = data.enterToClass;
  7955. var enterActiveClass = data.enterActiveClass;
  7956. var appearClass = data.appearClass;
  7957. var appearToClass = data.appearToClass;
  7958. var appearActiveClass = data.appearActiveClass;
  7959. var beforeEnter = data.beforeEnter;
  7960. var enter = data.enter;
  7961. var afterEnter = data.afterEnter;
  7962. var enterCancelled = data.enterCancelled;
  7963. var beforeAppear = data.beforeAppear;
  7964. var appear = data.appear;
  7965. var afterAppear = data.afterAppear;
  7966. var appearCancelled = data.appearCancelled;
  7967. var duration = data.duration;
  7968. // activeInstance will always be the <transition> component managing this
  7969. // transition. One edge case to check is when the <transition> is placed
  7970. // as the root node of a child component. In that case we need to check
  7971. // <transition>'s parent for appear check.
  7972. var context = activeInstance;
  7973. var transitionNode = activeInstance.$vnode;
  7974. while (transitionNode && transitionNode.parent) {
  7975. transitionNode = transitionNode.parent;
  7976. context = transitionNode.context;
  7977. }
  7978. var isAppear = !context._isMounted || !vnode.isRootInsert;
  7979. if (isAppear && !appear && appear !== '') {
  7980. return
  7981. }
  7982. var startClass = isAppear && appearClass
  7983. ? appearClass
  7984. : enterClass;
  7985. var activeClass = isAppear && appearActiveClass
  7986. ? appearActiveClass
  7987. : enterActiveClass;
  7988. var toClass = isAppear && appearToClass
  7989. ? appearToClass
  7990. : enterToClass;
  7991. var beforeEnterHook = isAppear
  7992. ? (beforeAppear || beforeEnter)
  7993. : beforeEnter;
  7994. var enterHook = isAppear
  7995. ? (typeof appear === 'function' ? appear : enter)
  7996. : enter;
  7997. var afterEnterHook = isAppear
  7998. ? (afterAppear || afterEnter)
  7999. : afterEnter;
  8000. var enterCancelledHook = isAppear
  8001. ? (appearCancelled || enterCancelled)
  8002. : enterCancelled;
  8003. var explicitEnterDuration = toNumber(
  8004. isObject(duration)
  8005. ? duration.enter
  8006. : duration
  8007. );
  8008. if (process.env.NODE_ENV !== 'production' && explicitEnterDuration != null) {
  8009. checkDuration(explicitEnterDuration, 'enter', vnode);
  8010. }
  8011. var expectsCSS = css !== false && !isIE9;
  8012. var userWantsControl = getHookArgumentsLength(enterHook);
  8013. var cb = el._enterCb = once(function () {
  8014. if (expectsCSS) {
  8015. removeTransitionClass(el, toClass);
  8016. removeTransitionClass(el, activeClass);
  8017. }
  8018. if (cb.cancelled) {
  8019. if (expectsCSS) {
  8020. removeTransitionClass(el, startClass);
  8021. }
  8022. enterCancelledHook && enterCancelledHook(el);
  8023. } else {
  8024. afterEnterHook && afterEnterHook(el);
  8025. }
  8026. el._enterCb = null;
  8027. });
  8028. if (!vnode.data.show) {
  8029. // remove pending leave element on enter by injecting an insert hook
  8030. mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', function () {
  8031. var parent = el.parentNode;
  8032. var pendingNode = parent && parent._pending && parent._pending[vnode.key];
  8033. if (pendingNode &&
  8034. pendingNode.tag === vnode.tag &&
  8035. pendingNode.elm._leaveCb
  8036. ) {
  8037. pendingNode.elm._leaveCb();
  8038. }
  8039. enterHook && enterHook(el, cb);
  8040. });
  8041. }
  8042. // start enter transition
  8043. beforeEnterHook && beforeEnterHook(el);
  8044. if (expectsCSS) {
  8045. addTransitionClass(el, startClass);
  8046. addTransitionClass(el, activeClass);
  8047. nextFrame(function () {
  8048. addTransitionClass(el, toClass);
  8049. removeTransitionClass(el, startClass);
  8050. if (!cb.cancelled && !userWantsControl) {
  8051. if (isValidDuration(explicitEnterDuration)) {
  8052. setTimeout(cb, explicitEnterDuration);
  8053. } else {
  8054. whenTransitionEnds(el, type, cb);
  8055. }
  8056. }
  8057. });
  8058. }
  8059. if (vnode.data.show) {
  8060. toggleDisplay && toggleDisplay();
  8061. enterHook && enterHook(el, cb);
  8062. }
  8063. if (!expectsCSS && !userWantsControl) {
  8064. cb();
  8065. }
  8066. }
  8067. function leave (vnode, rm) {
  8068. var el = vnode.elm;
  8069. // call enter callback now
  8070. if (isDef(el._enterCb)) {
  8071. el._enterCb.cancelled = true;
  8072. el._enterCb();
  8073. }
  8074. var data = resolveTransition(vnode.data.transition);
  8075. if (isUndef(data)) {
  8076. return rm()
  8077. }
  8078. /* istanbul ignore if */
  8079. if (isDef(el._leaveCb) || el.nodeType !== 1) {
  8080. return
  8081. }
  8082. var css = data.css;
  8083. var type = data.type;
  8084. var leaveClass = data.leaveClass;
  8085. var leaveToClass = data.leaveToClass;
  8086. var leaveActiveClass = data.leaveActiveClass;
  8087. var beforeLeave = data.beforeLeave;
  8088. var leave = data.leave;
  8089. var afterLeave = data.afterLeave;
  8090. var leaveCancelled = data.leaveCancelled;
  8091. var delayLeave = data.delayLeave;
  8092. var duration = data.duration;
  8093. var expectsCSS = css !== false && !isIE9;
  8094. var userWantsControl = getHookArgumentsLength(leave);
  8095. var explicitLeaveDuration = toNumber(
  8096. isObject(duration)
  8097. ? duration.leave
  8098. : duration
  8099. );
  8100. if (process.env.NODE_ENV !== 'production' && isDef(explicitLeaveDuration)) {
  8101. checkDuration(explicitLeaveDuration, 'leave', vnode);
  8102. }
  8103. var cb = el._leaveCb = once(function () {
  8104. if (el.parentNode && el.parentNode._pending) {
  8105. el.parentNode._pending[vnode.key] = null;
  8106. }
  8107. if (expectsCSS) {
  8108. removeTransitionClass(el, leaveToClass);
  8109. removeTransitionClass(el, leaveActiveClass);
  8110. }
  8111. if (cb.cancelled) {
  8112. if (expectsCSS) {
  8113. removeTransitionClass(el, leaveClass);
  8114. }
  8115. leaveCancelled && leaveCancelled(el);
  8116. } else {
  8117. rm();
  8118. afterLeave && afterLeave(el);
  8119. }
  8120. el._leaveCb = null;
  8121. });
  8122. if (delayLeave) {
  8123. delayLeave(performLeave);
  8124. } else {
  8125. performLeave();
  8126. }
  8127. function performLeave () {
  8128. // the delayed leave may have already been cancelled
  8129. if (cb.cancelled) {
  8130. return
  8131. }
  8132. // record leaving element
  8133. if (!vnode.data.show) {
  8134. (el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode;
  8135. }
  8136. beforeLeave && beforeLeave(el);
  8137. if (expectsCSS) {
  8138. addTransitionClass(el, leaveClass);
  8139. addTransitionClass(el, leaveActiveClass);
  8140. nextFrame(function () {
  8141. addTransitionClass(el, leaveToClass);
  8142. removeTransitionClass(el, leaveClass);
  8143. if (!cb.cancelled && !userWantsControl) {
  8144. if (isValidDuration(explicitLeaveDuration)) {
  8145. setTimeout(cb, explicitLeaveDuration);
  8146. } else {
  8147. whenTransitionEnds(el, type, cb);
  8148. }
  8149. }
  8150. });
  8151. }
  8152. leave && leave(el, cb);
  8153. if (!expectsCSS && !userWantsControl) {
  8154. cb();
  8155. }
  8156. }
  8157. }
  8158. // only used in dev mode
  8159. function checkDuration (val, name, vnode) {
  8160. if (typeof val !== 'number') {
  8161. warn(
  8162. "<transition> explicit " + name + " duration is not a valid number - " +
  8163. "got " + (JSON.stringify(val)) + ".",
  8164. vnode.context
  8165. );
  8166. } else if (isNaN(val)) {
  8167. warn(
  8168. "<transition> explicit " + name + " duration is NaN - " +
  8169. 'the duration expression might be incorrect.',
  8170. vnode.context
  8171. );
  8172. }
  8173. }
  8174. function isValidDuration (val) {
  8175. return typeof val === 'number' && !isNaN(val)
  8176. }
  8177. /**
  8178. * Normalize a transition hook's argument length. The hook may be:
  8179. * - a merged hook (invoker) with the original in .fns
  8180. * - a wrapped component method (check ._length)
  8181. * - a plain function (.length)
  8182. */
  8183. function getHookArgumentsLength (fn) {
  8184. if (isUndef(fn)) {
  8185. return false
  8186. }
  8187. var invokerFns = fn.fns;
  8188. if (isDef(invokerFns)) {
  8189. // invoker
  8190. return getHookArgumentsLength(
  8191. Array.isArray(invokerFns)
  8192. ? invokerFns[0]
  8193. : invokerFns
  8194. )
  8195. } else {
  8196. return (fn._length || fn.length) > 1
  8197. }
  8198. }
  8199. function _enter (_, vnode) {
  8200. if (vnode.data.show !== true) {
  8201. enter(vnode);
  8202. }
  8203. }
  8204. var transition = inBrowser ? {
  8205. create: _enter,
  8206. activate: _enter,
  8207. remove: function remove$$1 (vnode, rm) {
  8208. /* istanbul ignore else */
  8209. if (vnode.data.show !== true) {
  8210. leave(vnode, rm);
  8211. } else {
  8212. rm();
  8213. }
  8214. }
  8215. } : {};
  8216. var platformModules = [
  8217. attrs,
  8218. klass,
  8219. events,
  8220. domProps,
  8221. style,
  8222. transition
  8223. ];
  8224. /* */
  8225. // the directive module should be applied last, after all
  8226. // built-in modules have been applied.
  8227. var modules = platformModules.concat(baseModules);
  8228. var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });
  8229. /**
  8230. * Not type checking this file because flow doesn't like attaching
  8231. * properties to Elements.
  8232. */
  8233. /* istanbul ignore if */
  8234. if (isIE9) {
  8235. // http://www.matts411.com/post/internet-explorer-9-oninput/
  8236. document.addEventListener('selectionchange', function () {
  8237. var el = document.activeElement;
  8238. if (el && el.vmodel) {
  8239. trigger(el, 'input');
  8240. }
  8241. });
  8242. }
  8243. var model$1 = {
  8244. inserted: function inserted (el, binding, vnode) {
  8245. if (vnode.tag === 'select') {
  8246. var cb = function () {
  8247. setSelected(el, binding, vnode.context);
  8248. };
  8249. cb();
  8250. /* istanbul ignore if */
  8251. if (isIE || isEdge) {
  8252. setTimeout(cb, 0);
  8253. }
  8254. } else if (vnode.tag === 'textarea' || el.type === 'text' || el.type === 'password') {
  8255. el._vModifiers = binding.modifiers;
  8256. if (!binding.modifiers.lazy) {
  8257. // Safari < 10.2 & UIWebView doesn't fire compositionend when
  8258. // switching focus before confirming composition choice
  8259. // this also fixes the issue where some browsers e.g. iOS Chrome
  8260. // fires "change" instead of "input" on autocomplete.
  8261. el.addEventListener('change', onCompositionEnd);
  8262. if (!isAndroid) {
  8263. el.addEventListener('compositionstart', onCompositionStart);
  8264. el.addEventListener('compositionend', onCompositionEnd);
  8265. }
  8266. /* istanbul ignore if */
  8267. if (isIE9) {
  8268. el.vmodel = true;
  8269. }
  8270. }
  8271. }
  8272. },
  8273. componentUpdated: function componentUpdated (el, binding, vnode) {
  8274. if (vnode.tag === 'select') {
  8275. setSelected(el, binding, vnode.context);
  8276. // in case the options rendered by v-for have changed,
  8277. // it's possible that the value is out-of-sync with the rendered options.
  8278. // detect such cases and filter out values that no longer has a matching
  8279. // option in the DOM.
  8280. var needReset = el.multiple
  8281. ? binding.value.some(function (v) { return hasNoMatchingOption(v, el.options); })
  8282. : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, el.options);
  8283. if (needReset) {
  8284. trigger(el, 'change');
  8285. }
  8286. }
  8287. }
  8288. };
  8289. function setSelected (el, binding, vm) {
  8290. var value = binding.value;
  8291. var isMultiple = el.multiple;
  8292. if (isMultiple && !Array.isArray(value)) {
  8293. process.env.NODE_ENV !== 'production' && warn(
  8294. "<select multiple v-model=\"" + (binding.expression) + "\"> " +
  8295. "expects an Array value for its binding, but got " + (Object.prototype.toString.call(value).slice(8, -1)),
  8296. vm
  8297. );
  8298. return
  8299. }
  8300. var selected, option;
  8301. for (var i = 0, l = el.options.length; i < l; i++) {
  8302. option = el.options[i];
  8303. if (isMultiple) {
  8304. selected = looseIndexOf(value, getValue(option)) > -1;
  8305. if (option.selected !== selected) {
  8306. option.selected = selected;
  8307. }
  8308. } else {
  8309. if (looseEqual(getValue(option), value)) {
  8310. if (el.selectedIndex !== i) {
  8311. el.selectedIndex = i;
  8312. }
  8313. return
  8314. }
  8315. }
  8316. }
  8317. if (!isMultiple) {
  8318. el.selectedIndex = -1;
  8319. }
  8320. }
  8321. function hasNoMatchingOption (value, options) {
  8322. for (var i = 0, l = options.length; i < l; i++) {
  8323. if (looseEqual(getValue(options[i]), value)) {
  8324. return false
  8325. }
  8326. }
  8327. return true
  8328. }
  8329. function getValue (option) {
  8330. return '_value' in option
  8331. ? option._value
  8332. : option.value
  8333. }
  8334. function onCompositionStart (e) {
  8335. e.target.composing = true;
  8336. }
  8337. function onCompositionEnd (e) {
  8338. // prevent triggering an input event for no reason
  8339. if (!e.target.composing) { return }
  8340. e.target.composing = false;
  8341. trigger(e.target, 'input');
  8342. }
  8343. function trigger (el, type) {
  8344. var e = document.createEvent('HTMLEvents');
  8345. e.initEvent(type, true, true);
  8346. el.dispatchEvent(e);
  8347. }
  8348. /* */
  8349. // recursively search for possible transition defined inside the component root
  8350. function locateNode (vnode) {
  8351. return vnode.componentInstance && (!vnode.data || !vnode.data.transition)
  8352. ? locateNode(vnode.componentInstance._vnode)
  8353. : vnode
  8354. }
  8355. var show = {
  8356. bind: function bind (el, ref, vnode) {
  8357. var value = ref.value;
  8358. vnode = locateNode(vnode);
  8359. var transition = vnode.data && vnode.data.transition;
  8360. var originalDisplay = el.__vOriginalDisplay =
  8361. el.style.display === 'none' ? '' : el.style.display;
  8362. if (value && transition && !isIE9) {
  8363. vnode.data.show = true;
  8364. enter(vnode, function () {
  8365. el.style.display = originalDisplay;
  8366. });
  8367. } else {
  8368. el.style.display = value ? originalDisplay : 'none';
  8369. }
  8370. },
  8371. update: function update (el, ref, vnode) {
  8372. var value = ref.value;
  8373. var oldValue = ref.oldValue;
  8374. /* istanbul ignore if */
  8375. if (value === oldValue) { return }
  8376. vnode = locateNode(vnode);
  8377. var transition = vnode.data && vnode.data.transition;
  8378. if (transition && !isIE9) {
  8379. vnode.data.show = true;
  8380. if (value) {
  8381. enter(vnode, function () {
  8382. el.style.display = el.__vOriginalDisplay;
  8383. });
  8384. } else {
  8385. leave(vnode, function () {
  8386. el.style.display = 'none';
  8387. });
  8388. }
  8389. } else {
  8390. el.style.display = value ? el.__vOriginalDisplay : 'none';
  8391. }
  8392. },
  8393. unbind: function unbind (
  8394. el,
  8395. binding,
  8396. vnode,
  8397. oldVnode,
  8398. isDestroy
  8399. ) {
  8400. if (!isDestroy) {
  8401. el.style.display = el.__vOriginalDisplay;
  8402. }
  8403. }
  8404. };
  8405. var platformDirectives = {
  8406. model: model$1,
  8407. show: show
  8408. };
  8409. /* */
  8410. // Provides transition support for a single element/component.
  8411. // supports transition mode (out-in / in-out)
  8412. var transitionProps = {
  8413. name: String,
  8414. appear: Boolean,
  8415. css: Boolean,
  8416. mode: String,
  8417. type: String,
  8418. enterClass: String,
  8419. leaveClass: String,
  8420. enterToClass: String,
  8421. leaveToClass: String,
  8422. enterActiveClass: String,
  8423. leaveActiveClass: String,
  8424. appearClass: String,
  8425. appearActiveClass: String,
  8426. appearToClass: String,
  8427. duration: [Number, String, Object]
  8428. };
  8429. // in case the child is also an abstract component, e.g. <keep-alive>
  8430. // we want to recursively retrieve the real component to be rendered
  8431. function getRealChild (vnode) {
  8432. var compOptions = vnode && vnode.componentOptions;
  8433. if (compOptions && compOptions.Ctor.options.abstract) {
  8434. return getRealChild(getFirstComponentChild(compOptions.children))
  8435. } else {
  8436. return vnode
  8437. }
  8438. }
  8439. function extractTransitionData (comp) {
  8440. var data = {};
  8441. var options = comp.$options;
  8442. // props
  8443. for (var key in options.propsData) {
  8444. data[key] = comp[key];
  8445. }
  8446. // events.
  8447. // extract listeners and pass them directly to the transition methods
  8448. var listeners = options._parentListeners;
  8449. for (var key$1 in listeners) {
  8450. data[camelize(key$1)] = listeners[key$1];
  8451. }
  8452. return data
  8453. }
  8454. function placeholder (h, rawChild) {
  8455. if (/\d-keep-alive$/.test(rawChild.tag)) {
  8456. return h('keep-alive', {
  8457. props: rawChild.componentOptions.propsData
  8458. })
  8459. }
  8460. }
  8461. function hasParentTransition (vnode) {
  8462. while ((vnode = vnode.parent)) {
  8463. if (vnode.data.transition) {
  8464. return true
  8465. }
  8466. }
  8467. }
  8468. function isSameChild (child, oldChild) {
  8469. return oldChild.key === child.key && oldChild.tag === child.tag
  8470. }
  8471. var Transition = {
  8472. name: 'transition',
  8473. props: transitionProps,
  8474. abstract: true,
  8475. render: function render (h) {
  8476. var this$1 = this;
  8477. var children = this.$slots.default;
  8478. if (!children) {
  8479. return
  8480. }
  8481. // filter out text nodes (possible whitespaces)
  8482. children = children.filter(function (c) { return c.tag; });
  8483. /* istanbul ignore if */
  8484. if (!children.length) {
  8485. return
  8486. }
  8487. // warn multiple elements
  8488. if (process.env.NODE_ENV !== 'production' && children.length > 1) {
  8489. warn(
  8490. '<transition> can only be used on a single element. Use ' +
  8491. '<transition-group> for lists.',
  8492. this.$parent
  8493. );
  8494. }
  8495. var mode = this.mode;
  8496. // warn invalid mode
  8497. if (process.env.NODE_ENV !== 'production' &&
  8498. mode && mode !== 'in-out' && mode !== 'out-in'
  8499. ) {
  8500. warn(
  8501. 'invalid <transition> mode: ' + mode,
  8502. this.$parent
  8503. );
  8504. }
  8505. var rawChild = children[0];
  8506. // if this is a component root node and the component's
  8507. // parent container node also has transition, skip.
  8508. if (hasParentTransition(this.$vnode)) {
  8509. return rawChild
  8510. }
  8511. // apply transition data to child
  8512. // use getRealChild() to ignore abstract components e.g. keep-alive
  8513. var child = getRealChild(rawChild);
  8514. /* istanbul ignore if */
  8515. if (!child) {
  8516. return rawChild
  8517. }
  8518. if (this._leaving) {
  8519. return placeholder(h, rawChild)
  8520. }
  8521. // ensure a key that is unique to the vnode type and to this transition
  8522. // component instance. This key will be used to remove pending leaving nodes
  8523. // during entering.
  8524. var id = "__transition-" + (this._uid) + "-";
  8525. child.key = child.key == null
  8526. ? id + child.tag
  8527. : isPrimitive(child.key)
  8528. ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)
  8529. : child.key;
  8530. var data = (child.data || (child.data = {})).transition = extractTransitionData(this);
  8531. var oldRawChild = this._vnode;
  8532. var oldChild = getRealChild(oldRawChild);
  8533. // mark v-show
  8534. // so that the transition module can hand over the control to the directive
  8535. if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) {
  8536. child.data.show = true;
  8537. }
  8538. if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {
  8539. // replace old child transition data with fresh one
  8540. // important for dynamic transitions!
  8541. var oldData = oldChild && (oldChild.data.transition = extend({}, data));
  8542. // handle transition mode
  8543. if (mode === 'out-in') {
  8544. // return placeholder node and queue update when leave finishes
  8545. this._leaving = true;
  8546. mergeVNodeHook(oldData, 'afterLeave', function () {
  8547. this$1._leaving = false;
  8548. this$1.$forceUpdate();
  8549. });
  8550. return placeholder(h, rawChild)
  8551. } else if (mode === 'in-out') {
  8552. var delayedLeave;
  8553. var performLeave = function () { delayedLeave(); };
  8554. mergeVNodeHook(data, 'afterEnter', performLeave);
  8555. mergeVNodeHook(data, 'enterCancelled', performLeave);
  8556. mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });
  8557. }
  8558. }
  8559. return rawChild
  8560. }
  8561. };
  8562. /* */
  8563. // Provides transition support for list items.
  8564. // supports move transitions using the FLIP technique.
  8565. // Because the vdom's children update algorithm is "unstable" - i.e.
  8566. // it doesn't guarantee the relative positioning of removed elements,
  8567. // we force transition-group to update its children into two passes:
  8568. // in the first pass, we remove all nodes that need to be removed,
  8569. // triggering their leaving transition; in the second pass, we insert/move
  8570. // into the final desired state. This way in the second pass removed
  8571. // nodes will remain where they should be.
  8572. var props = extend({
  8573. tag: String,
  8574. moveClass: String
  8575. }, transitionProps);
  8576. delete props.mode;
  8577. var TransitionGroup = {
  8578. props: props,
  8579. render: function render (h) {
  8580. var tag = this.tag || this.$vnode.data.tag || 'span';
  8581. var map = Object.create(null);
  8582. var prevChildren = this.prevChildren = this.children;
  8583. var rawChildren = this.$slots.default || [];
  8584. var children = this.children = [];
  8585. var transitionData = extractTransitionData(this);
  8586. for (var i = 0; i < rawChildren.length; i++) {
  8587. var c = rawChildren[i];
  8588. if (c.tag) {
  8589. if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
  8590. children.push(c);
  8591. map[c.key] = c
  8592. ;(c.data || (c.data = {})).transition = transitionData;
  8593. } else if (process.env.NODE_ENV !== 'production') {
  8594. var opts = c.componentOptions;
  8595. var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;
  8596. warn(("<transition-group> children must be keyed: <" + name + ">"));
  8597. }
  8598. }
  8599. }
  8600. if (prevChildren) {
  8601. var kept = [];
  8602. var removed = [];
  8603. for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {
  8604. var c$1 = prevChildren[i$1];
  8605. c$1.data.transition = transitionData;
  8606. c$1.data.pos = c$1.elm.getBoundingClientRect();
  8607. if (map[c$1.key]) {
  8608. kept.push(c$1);
  8609. } else {
  8610. removed.push(c$1);
  8611. }
  8612. }
  8613. this.kept = h(tag, null, kept);
  8614. this.removed = removed;
  8615. }
  8616. return h(tag, null, children)
  8617. },
  8618. beforeUpdate: function beforeUpdate () {
  8619. // force removing pass
  8620. this.__patch__(
  8621. this._vnode,
  8622. this.kept,
  8623. false, // hydrating
  8624. true // removeOnly (!important, avoids unnecessary moves)
  8625. );
  8626. this._vnode = this.kept;
  8627. },
  8628. updated: function updated () {
  8629. var children = this.prevChildren;
  8630. var moveClass = this.moveClass || ((this.name || 'v') + '-move');
  8631. if (!children.length || !this.hasMove(children[0].elm, moveClass)) {
  8632. return
  8633. }
  8634. // we divide the work into three loops to avoid mixing DOM reads and writes
  8635. // in each iteration - which helps prevent layout thrashing.
  8636. children.forEach(callPendingCbs);
  8637. children.forEach(recordPosition);
  8638. children.forEach(applyTranslation);
  8639. // force reflow to put everything in position
  8640. var body = document.body;
  8641. var f = body.offsetHeight; // eslint-disable-line
  8642. children.forEach(function (c) {
  8643. if (c.data.moved) {
  8644. var el = c.elm;
  8645. var s = el.style;
  8646. addTransitionClass(el, moveClass);
  8647. s.transform = s.WebkitTransform = s.transitionDuration = '';
  8648. el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {
  8649. if (!e || /transform$/.test(e.propertyName)) {
  8650. el.removeEventListener(transitionEndEvent, cb);
  8651. el._moveCb = null;
  8652. removeTransitionClass(el, moveClass);
  8653. }
  8654. });
  8655. }
  8656. });
  8657. },
  8658. methods: {
  8659. hasMove: function hasMove (el, moveClass) {
  8660. /* istanbul ignore if */
  8661. if (!hasTransition) {
  8662. return false
  8663. }
  8664. if (this._hasMove != null) {
  8665. return this._hasMove
  8666. }
  8667. // Detect whether an element with the move class applied has
  8668. // CSS transitions. Since the element may be inside an entering
  8669. // transition at this very moment, we make a clone of it and remove
  8670. // all other transition classes applied to ensure only the move class
  8671. // is applied.
  8672. var clone = el.cloneNode();
  8673. if (el._transitionClasses) {
  8674. el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });
  8675. }
  8676. addClass(clone, moveClass);
  8677. clone.style.display = 'none';
  8678. this.$el.appendChild(clone);
  8679. var info = getTransitionInfo(clone);
  8680. this.$el.removeChild(clone);
  8681. return (this._hasMove = info.hasTransform)
  8682. }
  8683. }
  8684. };
  8685. function callPendingCbs (c) {
  8686. /* istanbul ignore if */
  8687. if (c.elm._moveCb) {
  8688. c.elm._moveCb();
  8689. }
  8690. /* istanbul ignore if */
  8691. if (c.elm._enterCb) {
  8692. c.elm._enterCb();
  8693. }
  8694. }
  8695. function recordPosition (c) {
  8696. c.data.newPos = c.elm.getBoundingClientRect();
  8697. }
  8698. function applyTranslation (c) {
  8699. var oldPos = c.data.pos;
  8700. var newPos = c.data.newPos;
  8701. var dx = oldPos.left - newPos.left;
  8702. var dy = oldPos.top - newPos.top;
  8703. if (dx || dy) {
  8704. c.data.moved = true;
  8705. var s = c.elm.style;
  8706. s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)";
  8707. s.transitionDuration = '0s';
  8708. }
  8709. }
  8710. var platformComponents = {
  8711. Transition: Transition,
  8712. TransitionGroup: TransitionGroup
  8713. };
  8714. /* */
  8715. // install platform specific utils
  8716. Vue$3.config.mustUseProp = mustUseProp;
  8717. Vue$3.config.isReservedTag = isReservedTag;
  8718. Vue$3.config.isReservedAttr = isReservedAttr;
  8719. Vue$3.config.getTagNamespace = getTagNamespace;
  8720. Vue$3.config.isUnknownElement = isUnknownElement;
  8721. // install platform runtime directives & components
  8722. extend(Vue$3.options.directives, platformDirectives);
  8723. extend(Vue$3.options.components, platformComponents);
  8724. // install platform patch function
  8725. Vue$3.prototype.__patch__ = inBrowser ? patch : noop;
  8726. // public mount method
  8727. Vue$3.prototype.$mount = function (
  8728. el,
  8729. hydrating
  8730. ) {
  8731. el = el && inBrowser ? query(el) : undefined;
  8732. return mountComponent(this, el, hydrating)
  8733. };
  8734. // devtools global hook
  8735. /* istanbul ignore next */
  8736. setTimeout(function () {
  8737. if (config.devtools) {
  8738. if (devtools) {
  8739. devtools.emit('init', Vue$3);
  8740. } else if (process.env.NODE_ENV !== 'production' && isChrome) {
  8741. console[console.info ? 'info' : 'log'](
  8742. 'Download the Vue Devtools extension for a better development experience:\n' +
  8743. 'https://github.com/vuejs/vue-devtools'
  8744. );
  8745. }
  8746. }
  8747. if (process.env.NODE_ENV !== 'production' &&
  8748. config.productionTip !== false &&
  8749. inBrowser && typeof console !== 'undefined'
  8750. ) {
  8751. console[console.info ? 'info' : 'log'](
  8752. "You are running Vue in development mode.\n" +
  8753. "Make sure to turn on production mode when deploying for production.\n" +
  8754. "See more tips at https://vuejs.org/guide/deployment.html"
  8755. );
  8756. }
  8757. }, 0);
  8758. /* */
  8759. // check whether current browser encodes a char inside attribute values
  8760. function shouldDecode (content, encoded) {
  8761. var div = document.createElement('div');
  8762. div.innerHTML = "<div a=\"" + content + "\">";
  8763. return div.innerHTML.indexOf(encoded) > 0
  8764. }
  8765. // #3663
  8766. // IE encodes newlines inside attribute values while other browsers don't
  8767. var shouldDecodeNewlines = inBrowser ? shouldDecode('\n', '&#10;') : false;
  8768. /* */
  8769. var isUnaryTag = makeMap(
  8770. 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
  8771. 'link,meta,param,source,track,wbr'
  8772. );
  8773. // Elements that you can, intentionally, leave open
  8774. // (and which close themselves)
  8775. var canBeLeftOpenTag = makeMap(
  8776. 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
  8777. );
  8778. // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
  8779. // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
  8780. var isNonPhrasingTag = makeMap(
  8781. 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
  8782. 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
  8783. 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
  8784. 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
  8785. 'title,tr,track'
  8786. );
  8787. /* */
  8788. var decoder;
  8789. function decode (html) {
  8790. decoder = decoder || document.createElement('div');
  8791. decoder.innerHTML = html;
  8792. return decoder.textContent
  8793. }
  8794. /**
  8795. * Not type-checking this file because it's mostly vendor code.
  8796. */
  8797. /*!
  8798. * HTML Parser By John Resig (ejohn.org)
  8799. * Modified by Juriy "kangax" Zaytsev
  8800. * Original code by Erik Arvidsson, Mozilla Public License
  8801. * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
  8802. */
  8803. // Regular Expressions for parsing tags and attributes
  8804. var singleAttrIdentifier = /([^\s"'<>/=]+)/;
  8805. var singleAttrAssign = /(?:=)/;
  8806. var singleAttrValues = [
  8807. // attr value double quotes
  8808. /"([^"]*)"+/.source,
  8809. // attr value, single quotes
  8810. /'([^']*)'+/.source,
  8811. // attr value, no quotes
  8812. /([^\s"'=<>`]+)/.source
  8813. ];
  8814. var attribute = new RegExp(
  8815. '^\\s*' + singleAttrIdentifier.source +
  8816. '(?:\\s*(' + singleAttrAssign.source + ')' +
  8817. '\\s*(?:' + singleAttrValues.join('|') + '))?'
  8818. );
  8819. // could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName
  8820. // but for Vue templates we can enforce a simple charset
  8821. var ncname = '[a-zA-Z_][\\w\\-\\.]*';
  8822. var qnameCapture = '((?:' + ncname + '\\:)?' + ncname + ')';
  8823. var startTagOpen = new RegExp('^<' + qnameCapture);
  8824. var startTagClose = /^\s*(\/?)>/;
  8825. var endTag = new RegExp('^<\\/' + qnameCapture + '[^>]*>');
  8826. var doctype = /^<!DOCTYPE [^>]+>/i;
  8827. var comment = /^<!--/;
  8828. var conditionalComment = /^<!\[/;
  8829. var IS_REGEX_CAPTURING_BROKEN = false;
  8830. 'x'.replace(/x(.)?/g, function (m, g) {
  8831. IS_REGEX_CAPTURING_BROKEN = g === '';
  8832. });
  8833. // Special Elements (can contain anything)
  8834. var isPlainTextElement = makeMap('script,style,textarea', true);
  8835. var reCache = {};
  8836. var decodingMap = {
  8837. '&lt;': '<',
  8838. '&gt;': '>',
  8839. '&quot;': '"',
  8840. '&amp;': '&',
  8841. '&#10;': '\n'
  8842. };
  8843. var encodedAttr = /&(?:lt|gt|quot|amp);/g;
  8844. var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10);/g;
  8845. function decodeAttr (value, shouldDecodeNewlines) {
  8846. var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
  8847. return value.replace(re, function (match) { return decodingMap[match]; })
  8848. }
  8849. function parseHTML (html, options) {
  8850. var stack = [];
  8851. var expectHTML = options.expectHTML;
  8852. var isUnaryTag$$1 = options.isUnaryTag || no;
  8853. var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
  8854. var index = 0;
  8855. var last, lastTag;
  8856. while (html) {
  8857. last = html;
  8858. // Make sure we're not in a plaintext content element like script/style
  8859. if (!lastTag || !isPlainTextElement(lastTag)) {
  8860. var textEnd = html.indexOf('<');
  8861. if (textEnd === 0) {
  8862. // Comment:
  8863. if (comment.test(html)) {
  8864. var commentEnd = html.indexOf('-->');
  8865. if (commentEnd >= 0) {
  8866. advance(commentEnd + 3);
  8867. continue
  8868. }
  8869. }
  8870. // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
  8871. if (conditionalComment.test(html)) {
  8872. var conditionalEnd = html.indexOf(']>');
  8873. if (conditionalEnd >= 0) {
  8874. advance(conditionalEnd + 2);
  8875. continue
  8876. }
  8877. }
  8878. // Doctype:
  8879. var doctypeMatch = html.match(doctype);
  8880. if (doctypeMatch) {
  8881. advance(doctypeMatch[0].length);
  8882. continue
  8883. }
  8884. // End tag:
  8885. var endTagMatch = html.match(endTag);
  8886. if (endTagMatch) {
  8887. var curIndex = index;
  8888. advance(endTagMatch[0].length);
  8889. parseEndTag(endTagMatch[1], curIndex, index);
  8890. continue
  8891. }
  8892. // Start tag:
  8893. var startTagMatch = parseStartTag();
  8894. if (startTagMatch) {
  8895. handleStartTag(startTagMatch);
  8896. continue
  8897. }
  8898. }
  8899. var text = (void 0), rest$1 = (void 0), next = (void 0);
  8900. if (textEnd >= 0) {
  8901. rest$1 = html.slice(textEnd);
  8902. while (
  8903. !endTag.test(rest$1) &&
  8904. !startTagOpen.test(rest$1) &&
  8905. !comment.test(rest$1) &&
  8906. !conditionalComment.test(rest$1)
  8907. ) {
  8908. // < in plain text, be forgiving and treat it as text
  8909. next = rest$1.indexOf('<', 1);
  8910. if (next < 0) { break }
  8911. textEnd += next;
  8912. rest$1 = html.slice(textEnd);
  8913. }
  8914. text = html.substring(0, textEnd);
  8915. advance(textEnd);
  8916. }
  8917. if (textEnd < 0) {
  8918. text = html;
  8919. html = '';
  8920. }
  8921. if (options.chars && text) {
  8922. options.chars(text);
  8923. }
  8924. } else {
  8925. var stackedTag = lastTag.toLowerCase();
  8926. var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));
  8927. var endTagLength = 0;
  8928. var rest = html.replace(reStackedTag, function (all, text, endTag) {
  8929. endTagLength = endTag.length;
  8930. if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {
  8931. text = text
  8932. .replace(/<!--([\s\S]*?)-->/g, '$1')
  8933. .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
  8934. }
  8935. if (options.chars) {
  8936. options.chars(text);
  8937. }
  8938. return ''
  8939. });
  8940. index += html.length - rest.length;
  8941. html = rest;
  8942. parseEndTag(stackedTag, index - endTagLength, index);
  8943. }
  8944. if (html === last) {
  8945. options.chars && options.chars(html);
  8946. if (process.env.NODE_ENV !== 'production' && !stack.length && options.warn) {
  8947. options.warn(("Mal-formatted tag at end of template: \"" + html + "\""));
  8948. }
  8949. break
  8950. }
  8951. }
  8952. // Clean up any remaining tags
  8953. parseEndTag();
  8954. function advance (n) {
  8955. index += n;
  8956. html = html.substring(n);
  8957. }
  8958. function parseStartTag () {
  8959. var start = html.match(startTagOpen);
  8960. if (start) {
  8961. var match = {
  8962. tagName: start[1],
  8963. attrs: [],
  8964. start: index
  8965. };
  8966. advance(start[0].length);
  8967. var end, attr;
  8968. while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {
  8969. advance(attr[0].length);
  8970. match.attrs.push(attr);
  8971. }
  8972. if (end) {
  8973. match.unarySlash = end[1];
  8974. advance(end[0].length);
  8975. match.end = index;
  8976. return match
  8977. }
  8978. }
  8979. }
  8980. function handleStartTag (match) {
  8981. var tagName = match.tagName;
  8982. var unarySlash = match.unarySlash;
  8983. if (expectHTML) {
  8984. if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
  8985. parseEndTag(lastTag);
  8986. }
  8987. if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {
  8988. parseEndTag(tagName);
  8989. }
  8990. }
  8991. var unary = isUnaryTag$$1(tagName) || tagName === 'html' && lastTag === 'head' || !!unarySlash;
  8992. var l = match.attrs.length;
  8993. var attrs = new Array(l);
  8994. for (var i = 0; i < l; i++) {
  8995. var args = match.attrs[i];
  8996. // hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778
  8997. if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('""') === -1) {
  8998. if (args[3] === '') { delete args[3]; }
  8999. if (args[4] === '') { delete args[4]; }
  9000. if (args[5] === '') { delete args[5]; }
  9001. }
  9002. var value = args[3] || args[4] || args[5] || '';
  9003. attrs[i] = {
  9004. name: args[1],
  9005. value: decodeAttr(
  9006. value,
  9007. options.shouldDecodeNewlines
  9008. )
  9009. };
  9010. }
  9011. if (!unary) {
  9012. stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs });
  9013. lastTag = tagName;
  9014. }
  9015. if (options.start) {
  9016. options.start(tagName, attrs, unary, match.start, match.end);
  9017. }
  9018. }
  9019. function parseEndTag (tagName, start, end) {
  9020. var pos, lowerCasedTagName;
  9021. if (start == null) { start = index; }
  9022. if (end == null) { end = index; }
  9023. if (tagName) {
  9024. lowerCasedTagName = tagName.toLowerCase();
  9025. }
  9026. // Find the closest opened tag of the same type
  9027. if (tagName) {
  9028. for (pos = stack.length - 1; pos >= 0; pos--) {
  9029. if (stack[pos].lowerCasedTag === lowerCasedTagName) {
  9030. break
  9031. }
  9032. }
  9033. } else {
  9034. // If no tag name is provided, clean shop
  9035. pos = 0;
  9036. }
  9037. if (pos >= 0) {
  9038. // Close all the open elements, up the stack
  9039. for (var i = stack.length - 1; i >= pos; i--) {
  9040. if (process.env.NODE_ENV !== 'production' &&
  9041. (i > pos || !tagName) &&
  9042. options.warn
  9043. ) {
  9044. options.warn(
  9045. ("tag <" + (stack[i].tag) + "> has no matching end tag.")
  9046. );
  9047. }
  9048. if (options.end) {
  9049. options.end(stack[i].tag, start, end);
  9050. }
  9051. }
  9052. // Remove the open elements from the stack
  9053. stack.length = pos;
  9054. lastTag = pos && stack[pos - 1].tag;
  9055. } else if (lowerCasedTagName === 'br') {
  9056. if (options.start) {
  9057. options.start(tagName, [], true, start, end);
  9058. }
  9059. } else if (lowerCasedTagName === 'p') {
  9060. if (options.start) {
  9061. options.start(tagName, [], false, start, end);
  9062. }
  9063. if (options.end) {
  9064. options.end(tagName, start, end);
  9065. }
  9066. }
  9067. }
  9068. }
  9069. /* */
  9070. var defaultTagRE = /\{\{((?:.|\n)+?)\}\}/g;
  9071. var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
  9072. var buildRegex = cached(function (delimiters) {
  9073. var open = delimiters[0].replace(regexEscapeRE, '\\$&');
  9074. var close = delimiters[1].replace(regexEscapeRE, '\\$&');
  9075. return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
  9076. });
  9077. function parseText (
  9078. text,
  9079. delimiters
  9080. ) {
  9081. var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
  9082. if (!tagRE.test(text)) {
  9083. return
  9084. }
  9085. var tokens = [];
  9086. var lastIndex = tagRE.lastIndex = 0;
  9087. var match, index;
  9088. while ((match = tagRE.exec(text))) {
  9089. index = match.index;
  9090. // push text token
  9091. if (index > lastIndex) {
  9092. tokens.push(JSON.stringify(text.slice(lastIndex, index)));
  9093. }
  9094. // tag token
  9095. var exp = parseFilters(match[1].trim());
  9096. tokens.push(("_s(" + exp + ")"));
  9097. lastIndex = index + match[0].length;
  9098. }
  9099. if (lastIndex < text.length) {
  9100. tokens.push(JSON.stringify(text.slice(lastIndex)));
  9101. }
  9102. return tokens.join('+')
  9103. }
  9104. /* */
  9105. var onRE = /^@|^v-on:/;
  9106. var dirRE = /^v-|^@|^:/;
  9107. var forAliasRE = /(.*?)\s+(?:in|of)\s+(.*)/;
  9108. var forIteratorRE = /\((\{[^}]*\}|[^,]*),([^,]*)(?:,([^,]*))?\)/;
  9109. var argRE = /:(.*)$/;
  9110. var bindRE = /^:|^v-bind:/;
  9111. var modifierRE = /\.[^.]+/g;
  9112. var decodeHTMLCached = cached(decode);
  9113. // configurable state
  9114. var warn$2;
  9115. var delimiters;
  9116. var transforms;
  9117. var preTransforms;
  9118. var postTransforms;
  9119. var platformIsPreTag;
  9120. var platformMustUseProp;
  9121. var platformGetTagNamespace;
  9122. /**
  9123. * Convert HTML string to AST.
  9124. */
  9125. function parse (
  9126. template,
  9127. options
  9128. ) {
  9129. warn$2 = options.warn || baseWarn;
  9130. platformGetTagNamespace = options.getTagNamespace || no;
  9131. platformMustUseProp = options.mustUseProp || no;
  9132. platformIsPreTag = options.isPreTag || no;
  9133. preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
  9134. transforms = pluckModuleFunction(options.modules, 'transformNode');
  9135. postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
  9136. delimiters = options.delimiters;
  9137. var stack = [];
  9138. var preserveWhitespace = options.preserveWhitespace !== false;
  9139. var root;
  9140. var currentParent;
  9141. var inVPre = false;
  9142. var inPre = false;
  9143. var warned = false;
  9144. function warnOnce (msg) {
  9145. if (!warned) {
  9146. warned = true;
  9147. warn$2(msg);
  9148. }
  9149. }
  9150. function endPre (element) {
  9151. // check pre state
  9152. if (element.pre) {
  9153. inVPre = false;
  9154. }
  9155. if (platformIsPreTag(element.tag)) {
  9156. inPre = false;
  9157. }
  9158. }
  9159. parseHTML(template, {
  9160. warn: warn$2,
  9161. expectHTML: options.expectHTML,
  9162. isUnaryTag: options.isUnaryTag,
  9163. canBeLeftOpenTag: options.canBeLeftOpenTag,
  9164. shouldDecodeNewlines: options.shouldDecodeNewlines,
  9165. start: function start (tag, attrs, unary) {
  9166. // check namespace.
  9167. // inherit parent ns if there is one
  9168. var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
  9169. // handle IE svg bug
  9170. /* istanbul ignore if */
  9171. if (isIE && ns === 'svg') {
  9172. attrs = guardIESVGBug(attrs);
  9173. }
  9174. var element = {
  9175. type: 1,
  9176. tag: tag,
  9177. attrsList: attrs,
  9178. attrsMap: makeAttrsMap(attrs),
  9179. parent: currentParent,
  9180. children: []
  9181. };
  9182. if (ns) {
  9183. element.ns = ns;
  9184. }
  9185. if (isForbiddenTag(element) && !isServerRendering()) {
  9186. element.forbidden = true;
  9187. process.env.NODE_ENV !== 'production' && warn$2(
  9188. 'Templates should only be responsible for mapping the state to the ' +
  9189. 'UI. Avoid placing tags with side-effects in your templates, such as ' +
  9190. "<" + tag + ">" + ', as they will not be parsed.'
  9191. );
  9192. }
  9193. // apply pre-transforms
  9194. for (var i = 0; i < preTransforms.length; i++) {
  9195. preTransforms[i](element, options);
  9196. }
  9197. if (!inVPre) {
  9198. processPre(element);
  9199. if (element.pre) {
  9200. inVPre = true;
  9201. }
  9202. }
  9203. if (platformIsPreTag(element.tag)) {
  9204. inPre = true;
  9205. }
  9206. if (inVPre) {
  9207. processRawAttrs(element);
  9208. } else {
  9209. processFor(element);
  9210. processIf(element);
  9211. processOnce(element);
  9212. processKey(element);
  9213. // determine whether this is a plain element after
  9214. // removing structural attributes
  9215. element.plain = !element.key && !attrs.length;
  9216. processRef(element);
  9217. processSlot(element);
  9218. processComponent(element);
  9219. for (var i$1 = 0; i$1 < transforms.length; i$1++) {
  9220. transforms[i$1](element, options);
  9221. }
  9222. processAttrs(element);
  9223. }
  9224. function checkRootConstraints (el) {
  9225. if (process.env.NODE_ENV !== 'production') {
  9226. if (el.tag === 'slot' || el.tag === 'template') {
  9227. warnOnce(
  9228. "Cannot use <" + (el.tag) + "> as component root element because it may " +
  9229. 'contain multiple nodes.'
  9230. );
  9231. }
  9232. if (el.attrsMap.hasOwnProperty('v-for')) {
  9233. warnOnce(
  9234. 'Cannot use v-for on stateful component root element because ' +
  9235. 'it renders multiple elements.'
  9236. );
  9237. }
  9238. }
  9239. }
  9240. // tree management
  9241. if (!root) {
  9242. root = element;
  9243. checkRootConstraints(root);
  9244. } else if (!stack.length) {
  9245. // allow root elements with v-if, v-else-if and v-else
  9246. if (root.if && (element.elseif || element.else)) {
  9247. checkRootConstraints(element);
  9248. addIfCondition(root, {
  9249. exp: element.elseif,
  9250. block: element
  9251. });
  9252. } else if (process.env.NODE_ENV !== 'production') {
  9253. warnOnce(
  9254. "Component template should contain exactly one root element. " +
  9255. "If you are using v-if on multiple elements, " +
  9256. "use v-else-if to chain them instead."
  9257. );
  9258. }
  9259. }
  9260. if (currentParent && !element.forbidden) {
  9261. if (element.elseif || element.else) {
  9262. processIfConditions(element, currentParent);
  9263. } else if (element.slotScope) { // scoped slot
  9264. currentParent.plain = false;
  9265. var name = element.slotTarget || '"default"';(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;
  9266. } else {
  9267. currentParent.children.push(element);
  9268. element.parent = currentParent;
  9269. }
  9270. }
  9271. if (!unary) {
  9272. currentParent = element;
  9273. stack.push(element);
  9274. } else {
  9275. endPre(element);
  9276. }
  9277. // apply post-transforms
  9278. for (var i$2 = 0; i$2 < postTransforms.length; i$2++) {
  9279. postTransforms[i$2](element, options);
  9280. }
  9281. },
  9282. end: function end () {
  9283. // remove trailing whitespace
  9284. var element = stack[stack.length - 1];
  9285. var lastNode = element.children[element.children.length - 1];
  9286. if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) {
  9287. element.children.pop();
  9288. }
  9289. // pop stack
  9290. stack.length -= 1;
  9291. currentParent = stack[stack.length - 1];
  9292. endPre(element);
  9293. },
  9294. chars: function chars (text) {
  9295. if (!currentParent) {
  9296. if (process.env.NODE_ENV !== 'production') {
  9297. if (text === template) {
  9298. warnOnce(
  9299. 'Component template requires a root element, rather than just text.'
  9300. );
  9301. } else if ((text = text.trim())) {
  9302. warnOnce(
  9303. ("text \"" + text + "\" outside root element will be ignored.")
  9304. );
  9305. }
  9306. }
  9307. return
  9308. }
  9309. // IE textarea placeholder bug
  9310. /* istanbul ignore if */
  9311. if (isIE &&
  9312. currentParent.tag === 'textarea' &&
  9313. currentParent.attrsMap.placeholder === text
  9314. ) {
  9315. return
  9316. }
  9317. var children = currentParent.children;
  9318. text = inPre || text.trim()
  9319. ? isTextTag(currentParent) ? text : decodeHTMLCached(text)
  9320. // only preserve whitespace if its not right after a starting tag
  9321. : preserveWhitespace && children.length ? ' ' : '';
  9322. if (text) {
  9323. var expression;
  9324. if (!inVPre && text !== ' ' && (expression = parseText(text, delimiters))) {
  9325. children.push({
  9326. type: 2,
  9327. expression: expression,
  9328. text: text
  9329. });
  9330. } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {
  9331. children.push({
  9332. type: 3,
  9333. text: text
  9334. });
  9335. }
  9336. }
  9337. }
  9338. });
  9339. return root
  9340. }
  9341. function processPre (el) {
  9342. if (getAndRemoveAttr(el, 'v-pre') != null) {
  9343. el.pre = true;
  9344. }
  9345. }
  9346. function processRawAttrs (el) {
  9347. var l = el.attrsList.length;
  9348. if (l) {
  9349. var attrs = el.attrs = new Array(l);
  9350. for (var i = 0; i < l; i++) {
  9351. attrs[i] = {
  9352. name: el.attrsList[i].name,
  9353. value: JSON.stringify(el.attrsList[i].value)
  9354. };
  9355. }
  9356. } else if (!el.pre) {
  9357. // non root node in pre blocks with no attributes
  9358. el.plain = true;
  9359. }
  9360. }
  9361. function processKey (el) {
  9362. var exp = getBindingAttr(el, 'key');
  9363. if (exp) {
  9364. if (process.env.NODE_ENV !== 'production' && el.tag === 'template') {
  9365. warn$2("<template> cannot be keyed. Place the key on real elements instead.");
  9366. }
  9367. el.key = exp;
  9368. }
  9369. }
  9370. function processRef (el) {
  9371. var ref = getBindingAttr(el, 'ref');
  9372. if (ref) {
  9373. el.ref = ref;
  9374. el.refInFor = checkInFor(el);
  9375. }
  9376. }
  9377. function processFor (el) {
  9378. var exp;
  9379. if ((exp = getAndRemoveAttr(el, 'v-for'))) {
  9380. var inMatch = exp.match(forAliasRE);
  9381. if (!inMatch) {
  9382. process.env.NODE_ENV !== 'production' && warn$2(
  9383. ("Invalid v-for expression: " + exp)
  9384. );
  9385. return
  9386. }
  9387. el.for = inMatch[2].trim();
  9388. var alias = inMatch[1].trim();
  9389. var iteratorMatch = alias.match(forIteratorRE);
  9390. if (iteratorMatch) {
  9391. el.alias = iteratorMatch[1].trim();
  9392. el.iterator1 = iteratorMatch[2].trim();
  9393. if (iteratorMatch[3]) {
  9394. el.iterator2 = iteratorMatch[3].trim();
  9395. }
  9396. } else {
  9397. el.alias = alias;
  9398. }
  9399. }
  9400. }
  9401. function processIf (el) {
  9402. var exp = getAndRemoveAttr(el, 'v-if');
  9403. if (exp) {
  9404. el.if = exp;
  9405. addIfCondition(el, {
  9406. exp: exp,
  9407. block: el
  9408. });
  9409. } else {
  9410. if (getAndRemoveAttr(el, 'v-else') != null) {
  9411. el.else = true;
  9412. }
  9413. var elseif = getAndRemoveAttr(el, 'v-else-if');
  9414. if (elseif) {
  9415. el.elseif = elseif;
  9416. }
  9417. }
  9418. }
  9419. function processIfConditions (el, parent) {
  9420. var prev = findPrevElement(parent.children);
  9421. if (prev && prev.if) {
  9422. addIfCondition(prev, {
  9423. exp: el.elseif,
  9424. block: el
  9425. });
  9426. } else if (process.env.NODE_ENV !== 'production') {
  9427. warn$2(
  9428. "v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " +
  9429. "used on element <" + (el.tag) + "> without corresponding v-if."
  9430. );
  9431. }
  9432. }
  9433. function findPrevElement (children) {
  9434. var i = children.length;
  9435. while (i--) {
  9436. if (children[i].type === 1) {
  9437. return children[i]
  9438. } else {
  9439. if (process.env.NODE_ENV !== 'production' && children[i].text !== ' ') {
  9440. warn$2(
  9441. "text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " +
  9442. "will be ignored."
  9443. );
  9444. }
  9445. children.pop();
  9446. }
  9447. }
  9448. }
  9449. function addIfCondition (el, condition) {
  9450. if (!el.ifConditions) {
  9451. el.ifConditions = [];
  9452. }
  9453. el.ifConditions.push(condition);
  9454. }
  9455. function processOnce (el) {
  9456. var once$$1 = getAndRemoveAttr(el, 'v-once');
  9457. if (once$$1 != null) {
  9458. el.once = true;
  9459. }
  9460. }
  9461. function processSlot (el) {
  9462. if (el.tag === 'slot') {
  9463. el.slotName = getBindingAttr(el, 'name');
  9464. if (process.env.NODE_ENV !== 'production' && el.key) {
  9465. warn$2(
  9466. "`key` does not work on <slot> because slots are abstract outlets " +
  9467. "and can possibly expand into multiple elements. " +
  9468. "Use the key on a wrapping element instead."
  9469. );
  9470. }
  9471. } else {
  9472. var slotTarget = getBindingAttr(el, 'slot');
  9473. if (slotTarget) {
  9474. el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
  9475. }
  9476. if (el.tag === 'template') {
  9477. el.slotScope = getAndRemoveAttr(el, 'scope');
  9478. }
  9479. }
  9480. }
  9481. function processComponent (el) {
  9482. var binding;
  9483. if ((binding = getBindingAttr(el, 'is'))) {
  9484. el.component = binding;
  9485. }
  9486. if (getAndRemoveAttr(el, 'inline-template') != null) {
  9487. el.inlineTemplate = true;
  9488. }
  9489. }
  9490. function processAttrs (el) {
  9491. var list = el.attrsList;
  9492. var i, l, name, rawName, value, modifiers, isProp;
  9493. for (i = 0, l = list.length; i < l; i++) {
  9494. name = rawName = list[i].name;
  9495. value = list[i].value;
  9496. if (dirRE.test(name)) {
  9497. // mark element as dynamic
  9498. el.hasBindings = true;
  9499. // modifiers
  9500. modifiers = parseModifiers(name);
  9501. if (modifiers) {
  9502. name = name.replace(modifierRE, '');
  9503. }
  9504. if (bindRE.test(name)) { // v-bind
  9505. name = name.replace(bindRE, '');
  9506. value = parseFilters(value);
  9507. isProp = false;
  9508. if (modifiers) {
  9509. if (modifiers.prop) {
  9510. isProp = true;
  9511. name = camelize(name);
  9512. if (name === 'innerHtml') { name = 'innerHTML'; }
  9513. }
  9514. if (modifiers.camel) {
  9515. name = camelize(name);
  9516. }
  9517. if (modifiers.sync) {
  9518. addHandler(
  9519. el,
  9520. ("update:" + (camelize(name))),
  9521. genAssignmentCode(value, "$event")
  9522. );
  9523. }
  9524. }
  9525. if (isProp || platformMustUseProp(el.tag, el.attrsMap.type, name)) {
  9526. addProp(el, name, value);
  9527. } else {
  9528. addAttr(el, name, value);
  9529. }
  9530. } else if (onRE.test(name)) { // v-on
  9531. name = name.replace(onRE, '');
  9532. addHandler(el, name, value, modifiers, false, warn$2);
  9533. } else { // normal directives
  9534. name = name.replace(dirRE, '');
  9535. // parse arg
  9536. var argMatch = name.match(argRE);
  9537. var arg = argMatch && argMatch[1];
  9538. if (arg) {
  9539. name = name.slice(0, -(arg.length + 1));
  9540. }
  9541. addDirective(el, name, rawName, value, arg, modifiers);
  9542. if (process.env.NODE_ENV !== 'production' && name === 'model') {
  9543. checkForAliasModel(el, value);
  9544. }
  9545. }
  9546. } else {
  9547. // literal attribute
  9548. if (process.env.NODE_ENV !== 'production') {
  9549. var expression = parseText(value, delimiters);
  9550. if (expression) {
  9551. warn$2(
  9552. name + "=\"" + value + "\": " +
  9553. 'Interpolation inside attributes has been removed. ' +
  9554. 'Use v-bind or the colon shorthand instead. For example, ' +
  9555. 'instead of <div id="{{ val }}">, use <div :id="val">.'
  9556. );
  9557. }
  9558. }
  9559. addAttr(el, name, JSON.stringify(value));
  9560. }
  9561. }
  9562. }
  9563. function checkInFor (el) {
  9564. var parent = el;
  9565. while (parent) {
  9566. if (parent.for !== undefined) {
  9567. return true
  9568. }
  9569. parent = parent.parent;
  9570. }
  9571. return false
  9572. }
  9573. function parseModifiers (name) {
  9574. var match = name.match(modifierRE);
  9575. if (match) {
  9576. var ret = {};
  9577. match.forEach(function (m) { ret[m.slice(1)] = true; });
  9578. return ret
  9579. }
  9580. }
  9581. function makeAttrsMap (attrs) {
  9582. var map = {};
  9583. for (var i = 0, l = attrs.length; i < l; i++) {
  9584. if (
  9585. process.env.NODE_ENV !== 'production' &&
  9586. map[attrs[i].name] && !isIE && !isEdge
  9587. ) {
  9588. warn$2('duplicate attribute: ' + attrs[i].name);
  9589. }
  9590. map[attrs[i].name] = attrs[i].value;
  9591. }
  9592. return map
  9593. }
  9594. // for script (e.g. type="x/template") or style, do not decode content
  9595. function isTextTag (el) {
  9596. return el.tag === 'script' || el.tag === 'style'
  9597. }
  9598. function isForbiddenTag (el) {
  9599. return (
  9600. el.tag === 'style' ||
  9601. (el.tag === 'script' && (
  9602. !el.attrsMap.type ||
  9603. el.attrsMap.type === 'text/javascript'
  9604. ))
  9605. )
  9606. }
  9607. var ieNSBug = /^xmlns:NS\d+/;
  9608. var ieNSPrefix = /^NS\d+:/;
  9609. /* istanbul ignore next */
  9610. function guardIESVGBug (attrs) {
  9611. var res = [];
  9612. for (var i = 0; i < attrs.length; i++) {
  9613. var attr = attrs[i];
  9614. if (!ieNSBug.test(attr.name)) {
  9615. attr.name = attr.name.replace(ieNSPrefix, '');
  9616. res.push(attr);
  9617. }
  9618. }
  9619. return res
  9620. }
  9621. function checkForAliasModel (el, value) {
  9622. var _el = el;
  9623. while (_el) {
  9624. if (_el.for && _el.alias === value) {
  9625. warn$2(
  9626. "<" + (el.tag) + " v-model=\"" + value + "\">: " +
  9627. "You are binding v-model directly to a v-for iteration alias. " +
  9628. "This will not be able to modify the v-for source array because " +
  9629. "writing to the alias is like modifying a function local variable. " +
  9630. "Consider using an array of objects and use v-model on an object property instead."
  9631. );
  9632. }
  9633. _el = _el.parent;
  9634. }
  9635. }
  9636. /* */
  9637. var isStaticKey;
  9638. var isPlatformReservedTag;
  9639. var genStaticKeysCached = cached(genStaticKeys$1);
  9640. /**
  9641. * Goal of the optimizer: walk the generated template AST tree
  9642. * and detect sub-trees that are purely static, i.e. parts of
  9643. * the DOM that never needs to change.
  9644. *
  9645. * Once we detect these sub-trees, we can:
  9646. *
  9647. * 1. Hoist them into constants, so that we no longer need to
  9648. * create fresh nodes for them on each re-render;
  9649. * 2. Completely skip them in the patching process.
  9650. */
  9651. function optimize (root, options) {
  9652. if (!root) { return }
  9653. isStaticKey = genStaticKeysCached(options.staticKeys || '');
  9654. isPlatformReservedTag = options.isReservedTag || no;
  9655. // first pass: mark all non-static nodes.
  9656. markStatic$1(root);
  9657. // second pass: mark static roots.
  9658. markStaticRoots(root, false);
  9659. }
  9660. function genStaticKeys$1 (keys) {
  9661. return makeMap(
  9662. 'type,tag,attrsList,attrsMap,plain,parent,children,attrs' +
  9663. (keys ? ',' + keys : '')
  9664. )
  9665. }
  9666. function markStatic$1 (node) {
  9667. node.static = isStatic(node);
  9668. if (node.type === 1) {
  9669. // do not make component slot content static. this avoids
  9670. // 1. components not able to mutate slot nodes
  9671. // 2. static slot content fails for hot-reloading
  9672. if (
  9673. !isPlatformReservedTag(node.tag) &&
  9674. node.tag !== 'slot' &&
  9675. node.attrsMap['inline-template'] == null
  9676. ) {
  9677. return
  9678. }
  9679. for (var i = 0, l = node.children.length; i < l; i++) {
  9680. var child = node.children[i];
  9681. markStatic$1(child);
  9682. if (!child.static) {
  9683. node.static = false;
  9684. }
  9685. }
  9686. }
  9687. }
  9688. function markStaticRoots (node, isInFor) {
  9689. if (node.type === 1) {
  9690. if (node.static || node.once) {
  9691. node.staticInFor = isInFor;
  9692. }
  9693. // For a node to qualify as a static root, it should have children that
  9694. // are not just static text. Otherwise the cost of hoisting out will
  9695. // outweigh the benefits and it's better off to just always render it fresh.
  9696. if (node.static && node.children.length && !(
  9697. node.children.length === 1 &&
  9698. node.children[0].type === 3
  9699. )) {
  9700. node.staticRoot = true;
  9701. return
  9702. } else {
  9703. node.staticRoot = false;
  9704. }
  9705. if (node.children) {
  9706. for (var i = 0, l = node.children.length; i < l; i++) {
  9707. markStaticRoots(node.children[i], isInFor || !!node.for);
  9708. }
  9709. }
  9710. if (node.ifConditions) {
  9711. walkThroughConditionsBlocks(node.ifConditions, isInFor);
  9712. }
  9713. }
  9714. }
  9715. function walkThroughConditionsBlocks (conditionBlocks, isInFor) {
  9716. for (var i = 1, len = conditionBlocks.length; i < len; i++) {
  9717. markStaticRoots(conditionBlocks[i].block, isInFor);
  9718. }
  9719. }
  9720. function isStatic (node) {
  9721. if (node.type === 2) { // expression
  9722. return false
  9723. }
  9724. if (node.type === 3) { // text
  9725. return true
  9726. }
  9727. return !!(node.pre || (
  9728. !node.hasBindings && // no dynamic bindings
  9729. !node.if && !node.for && // not v-if or v-for or v-else
  9730. !isBuiltInTag(node.tag) && // not a built-in
  9731. isPlatformReservedTag(node.tag) && // not a component
  9732. !isDirectChildOfTemplateFor(node) &&
  9733. Object.keys(node).every(isStaticKey)
  9734. ))
  9735. }
  9736. function isDirectChildOfTemplateFor (node) {
  9737. while (node.parent) {
  9738. node = node.parent;
  9739. if (node.tag !== 'template') {
  9740. return false
  9741. }
  9742. if (node.for) {
  9743. return true
  9744. }
  9745. }
  9746. return false
  9747. }
  9748. /* */
  9749. var fnExpRE = /^\s*([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/;
  9750. var simplePathRE = /^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/;
  9751. // keyCode aliases
  9752. var keyCodes = {
  9753. esc: 27,
  9754. tab: 9,
  9755. enter: 13,
  9756. space: 32,
  9757. up: 38,
  9758. left: 37,
  9759. right: 39,
  9760. down: 40,
  9761. 'delete': [8, 46]
  9762. };
  9763. // #4868: modifiers that prevent the execution of the listener
  9764. // need to explicitly return null so that we can determine whether to remove
  9765. // the listener for .once
  9766. var genGuard = function (condition) { return ("if(" + condition + ")return null;"); };
  9767. var modifierCode = {
  9768. stop: '$event.stopPropagation();',
  9769. prevent: '$event.preventDefault();',
  9770. self: genGuard("$event.target !== $event.currentTarget"),
  9771. ctrl: genGuard("!$event.ctrlKey"),
  9772. shift: genGuard("!$event.shiftKey"),
  9773. alt: genGuard("!$event.altKey"),
  9774. meta: genGuard("!$event.metaKey"),
  9775. left: genGuard("'button' in $event && $event.button !== 0"),
  9776. middle: genGuard("'button' in $event && $event.button !== 1"),
  9777. right: genGuard("'button' in $event && $event.button !== 2")
  9778. };
  9779. function genHandlers (
  9780. events,
  9781. isNative,
  9782. warn
  9783. ) {
  9784. var res = isNative ? 'nativeOn:{' : 'on:{';
  9785. for (var name in events) {
  9786. var handler = events[name];
  9787. // #5330: warn click.right, since right clicks do not actually fire click events.
  9788. if (process.env.NODE_ENV !== 'production' &&
  9789. name === 'click' &&
  9790. handler && handler.modifiers && handler.modifiers.right
  9791. ) {
  9792. warn(
  9793. "Use \"contextmenu\" instead of \"click.right\" since right clicks " +
  9794. "do not actually fire \"click\" events."
  9795. );
  9796. }
  9797. res += "\"" + name + "\":" + (genHandler(name, handler)) + ",";
  9798. }
  9799. return res.slice(0, -1) + '}'
  9800. }
  9801. function genHandler (
  9802. name,
  9803. handler
  9804. ) {
  9805. if (!handler) {
  9806. return 'function(){}'
  9807. }
  9808. if (Array.isArray(handler)) {
  9809. return ("[" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + "]")
  9810. }
  9811. var isMethodPath = simplePathRE.test(handler.value);
  9812. var isFunctionExpression = fnExpRE.test(handler.value);
  9813. if (!handler.modifiers) {
  9814. return isMethodPath || isFunctionExpression
  9815. ? handler.value
  9816. : ("function($event){" + (handler.value) + "}") // inline statement
  9817. } else {
  9818. var code = '';
  9819. var genModifierCode = '';
  9820. var keys = [];
  9821. for (var key in handler.modifiers) {
  9822. if (modifierCode[key]) {
  9823. genModifierCode += modifierCode[key];
  9824. // left/right
  9825. if (keyCodes[key]) {
  9826. keys.push(key);
  9827. }
  9828. } else {
  9829. keys.push(key);
  9830. }
  9831. }
  9832. if (keys.length) {
  9833. code += genKeyFilter(keys);
  9834. }
  9835. // Make sure modifiers like prevent and stop get executed after key filtering
  9836. if (genModifierCode) {
  9837. code += genModifierCode;
  9838. }
  9839. var handlerCode = isMethodPath
  9840. ? handler.value + '($event)'
  9841. : isFunctionExpression
  9842. ? ("(" + (handler.value) + ")($event)")
  9843. : handler.value;
  9844. return ("function($event){" + code + handlerCode + "}")
  9845. }
  9846. }
  9847. function genKeyFilter (keys) {
  9848. return ("if(!('button' in $event)&&" + (keys.map(genFilterCode).join('&&')) + ")return null;")
  9849. }
  9850. function genFilterCode (key) {
  9851. var keyVal = parseInt(key, 10);
  9852. if (keyVal) {
  9853. return ("$event.keyCode!==" + keyVal)
  9854. }
  9855. var alias = keyCodes[key];
  9856. return ("_k($event.keyCode," + (JSON.stringify(key)) + (alias ? ',' + JSON.stringify(alias) : '') + ")")
  9857. }
  9858. /* */
  9859. function bind$1 (el, dir) {
  9860. el.wrapData = function (code) {
  9861. return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + (dir.modifiers && dir.modifiers.prop ? ',true' : '') + ")")
  9862. };
  9863. }
  9864. /* */
  9865. var baseDirectives = {
  9866. bind: bind$1,
  9867. cloak: noop
  9868. };
  9869. /* */
  9870. // configurable state
  9871. var warn$3;
  9872. var transforms$1;
  9873. var dataGenFns;
  9874. var platformDirectives$1;
  9875. var isPlatformReservedTag$1;
  9876. var staticRenderFns;
  9877. var onceCount;
  9878. var currentOptions;
  9879. function generate (
  9880. ast,
  9881. options
  9882. ) {
  9883. // save previous staticRenderFns so generate calls can be nested
  9884. var prevStaticRenderFns = staticRenderFns;
  9885. var currentStaticRenderFns = staticRenderFns = [];
  9886. var prevOnceCount = onceCount;
  9887. onceCount = 0;
  9888. currentOptions = options;
  9889. warn$3 = options.warn || baseWarn;
  9890. transforms$1 = pluckModuleFunction(options.modules, 'transformCode');
  9891. dataGenFns = pluckModuleFunction(options.modules, 'genData');
  9892. platformDirectives$1 = options.directives || {};
  9893. isPlatformReservedTag$1 = options.isReservedTag || no;
  9894. var code = ast ? genElement(ast) : '_c("div")';
  9895. staticRenderFns = prevStaticRenderFns;
  9896. onceCount = prevOnceCount;
  9897. return {
  9898. render: ("with(this){return " + code + "}"),
  9899. staticRenderFns: currentStaticRenderFns
  9900. }
  9901. }
  9902. function genElement (el) {
  9903. if (el.staticRoot && !el.staticProcessed) {
  9904. return genStatic(el)
  9905. } else if (el.once && !el.onceProcessed) {
  9906. return genOnce(el)
  9907. } else if (el.for && !el.forProcessed) {
  9908. return genFor(el)
  9909. } else if (el.if && !el.ifProcessed) {
  9910. return genIf(el)
  9911. } else if (el.tag === 'template' && !el.slotTarget) {
  9912. return genChildren(el) || 'void 0'
  9913. } else if (el.tag === 'slot') {
  9914. return genSlot(el)
  9915. } else {
  9916. // component or element
  9917. var code;
  9918. if (el.component) {
  9919. code = genComponent(el.component, el);
  9920. } else {
  9921. var data = el.plain ? undefined : genData(el);
  9922. var children = el.inlineTemplate ? null : genChildren(el, true);
  9923. code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")";
  9924. }
  9925. // module transforms
  9926. for (var i = 0; i < transforms$1.length; i++) {
  9927. code = transforms$1[i](el, code);
  9928. }
  9929. return code
  9930. }
  9931. }
  9932. // hoist static sub-trees out
  9933. function genStatic (el) {
  9934. el.staticProcessed = true;
  9935. staticRenderFns.push(("with(this){return " + (genElement(el)) + "}"));
  9936. return ("_m(" + (staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")")
  9937. }
  9938. // v-once
  9939. function genOnce (el) {
  9940. el.onceProcessed = true;
  9941. if (el.if && !el.ifProcessed) {
  9942. return genIf(el)
  9943. } else if (el.staticInFor) {
  9944. var key = '';
  9945. var parent = el.parent;
  9946. while (parent) {
  9947. if (parent.for) {
  9948. key = parent.key;
  9949. break
  9950. }
  9951. parent = parent.parent;
  9952. }
  9953. if (!key) {
  9954. process.env.NODE_ENV !== 'production' && warn$3(
  9955. "v-once can only be used inside v-for that is keyed. "
  9956. );
  9957. return genElement(el)
  9958. }
  9959. return ("_o(" + (genElement(el)) + "," + (onceCount++) + (key ? ("," + key) : "") + ")")
  9960. } else {
  9961. return genStatic(el)
  9962. }
  9963. }
  9964. function genIf (el) {
  9965. el.ifProcessed = true; // avoid recursion
  9966. return genIfConditions(el.ifConditions.slice())
  9967. }
  9968. function genIfConditions (conditions) {
  9969. if (!conditions.length) {
  9970. return '_e()'
  9971. }
  9972. var condition = conditions.shift();
  9973. if (condition.exp) {
  9974. return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions)))
  9975. } else {
  9976. return ("" + (genTernaryExp(condition.block)))
  9977. }
  9978. // v-if with v-once should generate code like (a)?_m(0):_m(1)
  9979. function genTernaryExp (el) {
  9980. return el.once ? genOnce(el) : genElement(el)
  9981. }
  9982. }
  9983. function genFor (el) {
  9984. var exp = el.for;
  9985. var alias = el.alias;
  9986. var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
  9987. var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
  9988. if (
  9989. process.env.NODE_ENV !== 'production' &&
  9990. maybeComponent(el) && el.tag !== 'slot' && el.tag !== 'template' && !el.key
  9991. ) {
  9992. warn$3(
  9993. "<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
  9994. "v-for should have explicit keys. " +
  9995. "See https://vuejs.org/guide/list.html#key for more info.",
  9996. true /* tip */
  9997. );
  9998. }
  9999. el.forProcessed = true; // avoid recursion
  10000. return "_l((" + exp + ")," +
  10001. "function(" + alias + iterator1 + iterator2 + "){" +
  10002. "return " + (genElement(el)) +
  10003. '})'
  10004. }
  10005. function genData (el) {
  10006. var data = '{';
  10007. // directives first.
  10008. // directives may mutate the el's other properties before they are generated.
  10009. var dirs = genDirectives(el);
  10010. if (dirs) { data += dirs + ','; }
  10011. // key
  10012. if (el.key) {
  10013. data += "key:" + (el.key) + ",";
  10014. }
  10015. // ref
  10016. if (el.ref) {
  10017. data += "ref:" + (el.ref) + ",";
  10018. }
  10019. if (el.refInFor) {
  10020. data += "refInFor:true,";
  10021. }
  10022. // pre
  10023. if (el.pre) {
  10024. data += "pre:true,";
  10025. }
  10026. // record original tag name for components using "is" attribute
  10027. if (el.component) {
  10028. data += "tag:\"" + (el.tag) + "\",";
  10029. }
  10030. // module data generation functions
  10031. for (var i = 0; i < dataGenFns.length; i++) {
  10032. data += dataGenFns[i](el);
  10033. }
  10034. // attributes
  10035. if (el.attrs) {
  10036. data += "attrs:{" + (genProps(el.attrs)) + "},";
  10037. }
  10038. // DOM props
  10039. if (el.props) {
  10040. data += "domProps:{" + (genProps(el.props)) + "},";
  10041. }
  10042. // event handlers
  10043. if (el.events) {
  10044. data += (genHandlers(el.events, false, warn$3)) + ",";
  10045. }
  10046. if (el.nativeEvents) {
  10047. data += (genHandlers(el.nativeEvents, true, warn$3)) + ",";
  10048. }
  10049. // slot target
  10050. if (el.slotTarget) {
  10051. data += "slot:" + (el.slotTarget) + ",";
  10052. }
  10053. // scoped slots
  10054. if (el.scopedSlots) {
  10055. data += (genScopedSlots(el.scopedSlots)) + ",";
  10056. }
  10057. // component v-model
  10058. if (el.model) {
  10059. data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},";
  10060. }
  10061. // inline-template
  10062. if (el.inlineTemplate) {
  10063. var inlineTemplate = genInlineTemplate(el);
  10064. if (inlineTemplate) {
  10065. data += inlineTemplate + ",";
  10066. }
  10067. }
  10068. data = data.replace(/,$/, '') + '}';
  10069. // v-bind data wrap
  10070. if (el.wrapData) {
  10071. data = el.wrapData(data);
  10072. }
  10073. return data
  10074. }
  10075. function genDirectives (el) {
  10076. var dirs = el.directives;
  10077. if (!dirs) { return }
  10078. var res = 'directives:[';
  10079. var hasRuntime = false;
  10080. var i, l, dir, needRuntime;
  10081. for (i = 0, l = dirs.length; i < l; i++) {
  10082. dir = dirs[i];
  10083. needRuntime = true;
  10084. var gen = platformDirectives$1[dir.name] || baseDirectives[dir.name];
  10085. if (gen) {
  10086. // compile-time directive that manipulates AST.
  10087. // returns true if it also needs a runtime counterpart.
  10088. needRuntime = !!gen(el, dir, warn$3);
  10089. }
  10090. if (needRuntime) {
  10091. hasRuntime = true;
  10092. res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:\"" + (dir.arg) + "\"") : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},";
  10093. }
  10094. }
  10095. if (hasRuntime) {
  10096. return res.slice(0, -1) + ']'
  10097. }
  10098. }
  10099. function genInlineTemplate (el) {
  10100. var ast = el.children[0];
  10101. if (process.env.NODE_ENV !== 'production' && (
  10102. el.children.length > 1 || ast.type !== 1
  10103. )) {
  10104. warn$3('Inline-template components must have exactly one child element.');
  10105. }
  10106. if (ast.type === 1) {
  10107. var inlineRenderFns = generate(ast, currentOptions);
  10108. return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}")
  10109. }
  10110. }
  10111. function genScopedSlots (slots) {
  10112. return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) { return genScopedSlot(key, slots[key]); }).join(',')) + "])")
  10113. }
  10114. function genScopedSlot (key, el) {
  10115. if (el.for && !el.forProcessed) {
  10116. return genForScopedSlot(key, el)
  10117. }
  10118. return "{key:" + key + ",fn:function(" + (String(el.attrsMap.scope)) + "){" +
  10119. "return " + (el.tag === 'template'
  10120. ? genChildren(el) || 'void 0'
  10121. : genElement(el)) + "}}"
  10122. }
  10123. function genForScopedSlot (key, el) {
  10124. var exp = el.for;
  10125. var alias = el.alias;
  10126. var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
  10127. var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
  10128. el.forProcessed = true; // avoid recursion
  10129. return "_l((" + exp + ")," +
  10130. "function(" + alias + iterator1 + iterator2 + "){" +
  10131. "return " + (genScopedSlot(key, el)) +
  10132. '})'
  10133. }
  10134. function genChildren (el, checkSkip) {
  10135. var children = el.children;
  10136. if (children.length) {
  10137. var el$1 = children[0];
  10138. // optimize single v-for
  10139. if (children.length === 1 &&
  10140. el$1.for &&
  10141. el$1.tag !== 'template' &&
  10142. el$1.tag !== 'slot'
  10143. ) {
  10144. return genElement(el$1)
  10145. }
  10146. var normalizationType = checkSkip ? getNormalizationType(children) : 0;
  10147. return ("[" + (children.map(genNode).join(',')) + "]" + (normalizationType ? ("," + normalizationType) : ''))
  10148. }
  10149. }
  10150. // determine the normalization needed for the children array.
  10151. // 0: no normalization needed
  10152. // 1: simple normalization needed (possible 1-level deep nested array)
  10153. // 2: full normalization needed
  10154. function getNormalizationType (children) {
  10155. var res = 0;
  10156. for (var i = 0; i < children.length; i++) {
  10157. var el = children[i];
  10158. if (el.type !== 1) {
  10159. continue
  10160. }
  10161. if (needsNormalization(el) ||
  10162. (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
  10163. res = 2;
  10164. break
  10165. }
  10166. if (maybeComponent(el) ||
  10167. (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
  10168. res = 1;
  10169. }
  10170. }
  10171. return res
  10172. }
  10173. function needsNormalization (el) {
  10174. return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'
  10175. }
  10176. function maybeComponent (el) {
  10177. return !isPlatformReservedTag$1(el.tag)
  10178. }
  10179. function genNode (node) {
  10180. if (node.type === 1) {
  10181. return genElement(node)
  10182. } else {
  10183. return genText(node)
  10184. }
  10185. }
  10186. function genText (text) {
  10187. return ("_v(" + (text.type === 2
  10188. ? text.expression // no need for () because already wrapped in _s()
  10189. : transformSpecialNewlines(JSON.stringify(text.text))) + ")")
  10190. }
  10191. function genSlot (el) {
  10192. var slotName = el.slotName || '"default"';
  10193. var children = genChildren(el);
  10194. var res = "_t(" + slotName + (children ? ("," + children) : '');
  10195. var attrs = el.attrs && ("{" + (el.attrs.map(function (a) { return ((camelize(a.name)) + ":" + (a.value)); }).join(',')) + "}");
  10196. var bind$$1 = el.attrsMap['v-bind'];
  10197. if ((attrs || bind$$1) && !children) {
  10198. res += ",null";
  10199. }
  10200. if (attrs) {
  10201. res += "," + attrs;
  10202. }
  10203. if (bind$$1) {
  10204. res += (attrs ? '' : ',null') + "," + bind$$1;
  10205. }
  10206. return res + ')'
  10207. }
  10208. // componentName is el.component, take it as argument to shun flow's pessimistic refinement
  10209. function genComponent (componentName, el) {
  10210. var children = el.inlineTemplate ? null : genChildren(el, true);
  10211. return ("_c(" + componentName + "," + (genData(el)) + (children ? ("," + children) : '') + ")")
  10212. }
  10213. function genProps (props) {
  10214. var res = '';
  10215. for (var i = 0; i < props.length; i++) {
  10216. var prop = props[i];
  10217. res += "\"" + (prop.name) + "\":" + (transformSpecialNewlines(prop.value)) + ",";
  10218. }
  10219. return res.slice(0, -1)
  10220. }
  10221. // #3895, #4268
  10222. function transformSpecialNewlines (text) {
  10223. return text
  10224. .replace(/\u2028/g, '\\u2028')
  10225. .replace(/\u2029/g, '\\u2029')
  10226. }
  10227. /* */
  10228. // these keywords should not appear inside expressions, but operators like
  10229. // typeof, instanceof and in are allowed
  10230. var prohibitedKeywordRE = new RegExp('\\b' + (
  10231. 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
  10232. 'super,throw,while,yield,delete,export,import,return,switch,default,' +
  10233. 'extends,finally,continue,debugger,function,arguments'
  10234. ).split(',').join('\\b|\\b') + '\\b');
  10235. // these unary operators should not be used as property/method names
  10236. var unaryOperatorsRE = new RegExp('\\b' + (
  10237. 'delete,typeof,void'
  10238. ).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)');
  10239. // check valid identifier for v-for
  10240. var identRE = /[A-Za-z_$][\w$]*/;
  10241. // strip strings in expressions
  10242. var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
  10243. // detect problematic expressions in a template
  10244. function detectErrors (ast) {
  10245. var errors = [];
  10246. if (ast) {
  10247. checkNode(ast, errors);
  10248. }
  10249. return errors
  10250. }
  10251. function checkNode (node, errors) {
  10252. if (node.type === 1) {
  10253. for (var name in node.attrsMap) {
  10254. if (dirRE.test(name)) {
  10255. var value = node.attrsMap[name];
  10256. if (value) {
  10257. if (name === 'v-for') {
  10258. checkFor(node, ("v-for=\"" + value + "\""), errors);
  10259. } else if (onRE.test(name)) {
  10260. checkEvent(value, (name + "=\"" + value + "\""), errors);
  10261. } else {
  10262. checkExpression(value, (name + "=\"" + value + "\""), errors);
  10263. }
  10264. }
  10265. }
  10266. }
  10267. if (node.children) {
  10268. for (var i = 0; i < node.children.length; i++) {
  10269. checkNode(node.children[i], errors);
  10270. }
  10271. }
  10272. } else if (node.type === 2) {
  10273. checkExpression(node.expression, node.text, errors);
  10274. }
  10275. }
  10276. function checkEvent (exp, text, errors) {
  10277. var stipped = exp.replace(stripStringRE, '');
  10278. var keywordMatch = stipped.match(unaryOperatorsRE);
  10279. if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') {
  10280. errors.push(
  10281. "avoid using JavaScript unary operator as property name: " +
  10282. "\"" + (keywordMatch[0]) + "\" in expression " + (text.trim())
  10283. );
  10284. }
  10285. checkExpression(exp, text, errors);
  10286. }
  10287. function checkFor (node, text, errors) {
  10288. checkExpression(node.for || '', text, errors);
  10289. checkIdentifier(node.alias, 'v-for alias', text, errors);
  10290. checkIdentifier(node.iterator1, 'v-for iterator', text, errors);
  10291. checkIdentifier(node.iterator2, 'v-for iterator', text, errors);
  10292. }
  10293. function checkIdentifier (ident, type, text, errors) {
  10294. if (typeof ident === 'string' && !identRE.test(ident)) {
  10295. errors.push(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim())));
  10296. }
  10297. }
  10298. function checkExpression (exp, text, errors) {
  10299. try {
  10300. new Function(("return " + exp));
  10301. } catch (e) {
  10302. var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);
  10303. if (keywordMatch) {
  10304. errors.push(
  10305. "avoid using JavaScript keyword as property name: " +
  10306. "\"" + (keywordMatch[0]) + "\" in expression " + (text.trim())
  10307. );
  10308. } else {
  10309. errors.push(("invalid expression: " + (text.trim())));
  10310. }
  10311. }
  10312. }
  10313. /* */
  10314. function baseCompile (
  10315. template,
  10316. options
  10317. ) {
  10318. var ast = parse(template.trim(), options);
  10319. optimize(ast, options);
  10320. var code = generate(ast, options);
  10321. return {
  10322. ast: ast,
  10323. render: code.render,
  10324. staticRenderFns: code.staticRenderFns
  10325. }
  10326. }
  10327. function makeFunction (code, errors) {
  10328. try {
  10329. return new Function(code)
  10330. } catch (err) {
  10331. errors.push({ err: err, code: code });
  10332. return noop
  10333. }
  10334. }
  10335. function createCompiler (baseOptions) {
  10336. var functionCompileCache = Object.create(null);
  10337. function compile (
  10338. template,
  10339. options
  10340. ) {
  10341. var finalOptions = Object.create(baseOptions);
  10342. var errors = [];
  10343. var tips = [];
  10344. finalOptions.warn = function (msg, tip$$1) {
  10345. (tip$$1 ? tips : errors).push(msg);
  10346. };
  10347. if (options) {
  10348. // merge custom modules
  10349. if (options.modules) {
  10350. finalOptions.modules = (baseOptions.modules || []).concat(options.modules);
  10351. }
  10352. // merge custom directives
  10353. if (options.directives) {
  10354. finalOptions.directives = extend(
  10355. Object.create(baseOptions.directives),
  10356. options.directives
  10357. );
  10358. }
  10359. // copy other options
  10360. for (var key in options) {
  10361. if (key !== 'modules' && key !== 'directives') {
  10362. finalOptions[key] = options[key];
  10363. }
  10364. }
  10365. }
  10366. var compiled = baseCompile(template, finalOptions);
  10367. if (process.env.NODE_ENV !== 'production') {
  10368. errors.push.apply(errors, detectErrors(compiled.ast));
  10369. }
  10370. compiled.errors = errors;
  10371. compiled.tips = tips;
  10372. return compiled
  10373. }
  10374. function compileToFunctions (
  10375. template,
  10376. options,
  10377. vm
  10378. ) {
  10379. options = options || {};
  10380. /* istanbul ignore if */
  10381. if (process.env.NODE_ENV !== 'production') {
  10382. // detect possible CSP restriction
  10383. try {
  10384. new Function('return 1');
  10385. } catch (e) {
  10386. if (e.toString().match(/unsafe-eval|CSP/)) {
  10387. warn(
  10388. 'It seems you are using the standalone build of Vue.js in an ' +
  10389. 'environment with Content Security Policy that prohibits unsafe-eval. ' +
  10390. 'The template compiler cannot work in this environment. Consider ' +
  10391. 'relaxing the policy to allow unsafe-eval or pre-compiling your ' +
  10392. 'templates into render functions.'
  10393. );
  10394. }
  10395. }
  10396. }
  10397. // check cache
  10398. var key = options.delimiters
  10399. ? String(options.delimiters) + template
  10400. : template;
  10401. if (functionCompileCache[key]) {
  10402. return functionCompileCache[key]
  10403. }
  10404. // compile
  10405. var compiled = compile(template, options);
  10406. // check compilation errors/tips
  10407. if (process.env.NODE_ENV !== 'production') {
  10408. if (compiled.errors && compiled.errors.length) {
  10409. warn(
  10410. "Error compiling template:\n\n" + template + "\n\n" +
  10411. compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n',
  10412. vm
  10413. );
  10414. }
  10415. if (compiled.tips && compiled.tips.length) {
  10416. compiled.tips.forEach(function (msg) { return tip(msg, vm); });
  10417. }
  10418. }
  10419. // turn code into functions
  10420. var res = {};
  10421. var fnGenErrors = [];
  10422. res.render = makeFunction(compiled.render, fnGenErrors);
  10423. var l = compiled.staticRenderFns.length;
  10424. res.staticRenderFns = new Array(l);
  10425. for (var i = 0; i < l; i++) {
  10426. res.staticRenderFns[i] = makeFunction(compiled.staticRenderFns[i], fnGenErrors);
  10427. }
  10428. // check function generation errors.
  10429. // this should only happen if there is a bug in the compiler itself.
  10430. // mostly for codegen development use
  10431. /* istanbul ignore if */
  10432. if (process.env.NODE_ENV !== 'production') {
  10433. if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
  10434. warn(
  10435. "Failed to generate render function:\n\n" +
  10436. fnGenErrors.map(function (ref) {
  10437. var err = ref.err;
  10438. var code = ref.code;
  10439. return ((err.toString()) + " in\n\n" + code + "\n");
  10440. }).join('\n'),
  10441. vm
  10442. );
  10443. }
  10444. }
  10445. return (functionCompileCache[key] = res)
  10446. }
  10447. return {
  10448. compile: compile,
  10449. compileToFunctions: compileToFunctions
  10450. }
  10451. }
  10452. /* */
  10453. function transformNode (el, options) {
  10454. var warn = options.warn || baseWarn;
  10455. var staticClass = getAndRemoveAttr(el, 'class');
  10456. if (process.env.NODE_ENV !== 'production' && staticClass) {
  10457. var expression = parseText(staticClass, options.delimiters);
  10458. if (expression) {
  10459. warn(
  10460. "class=\"" + staticClass + "\": " +
  10461. 'Interpolation inside attributes has been removed. ' +
  10462. 'Use v-bind or the colon shorthand instead. For example, ' +
  10463. 'instead of <div class="{{ val }}">, use <div :class="val">.'
  10464. );
  10465. }
  10466. }
  10467. if (staticClass) {
  10468. el.staticClass = JSON.stringify(staticClass);
  10469. }
  10470. var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
  10471. if (classBinding) {
  10472. el.classBinding = classBinding;
  10473. }
  10474. }
  10475. function genData$1 (el) {
  10476. var data = '';
  10477. if (el.staticClass) {
  10478. data += "staticClass:" + (el.staticClass) + ",";
  10479. }
  10480. if (el.classBinding) {
  10481. data += "class:" + (el.classBinding) + ",";
  10482. }
  10483. return data
  10484. }
  10485. var klass$1 = {
  10486. staticKeys: ['staticClass'],
  10487. transformNode: transformNode,
  10488. genData: genData$1
  10489. };
  10490. /* */
  10491. function transformNode$1 (el, options) {
  10492. var warn = options.warn || baseWarn;
  10493. var staticStyle = getAndRemoveAttr(el, 'style');
  10494. if (staticStyle) {
  10495. /* istanbul ignore if */
  10496. if (process.env.NODE_ENV !== 'production') {
  10497. var expression = parseText(staticStyle, options.delimiters);
  10498. if (expression) {
  10499. warn(
  10500. "style=\"" + staticStyle + "\": " +
  10501. 'Interpolation inside attributes has been removed. ' +
  10502. 'Use v-bind or the colon shorthand instead. For example, ' +
  10503. 'instead of <div style="{{ val }}">, use <div :style="val">.'
  10504. );
  10505. }
  10506. }
  10507. el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
  10508. }
  10509. var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
  10510. if (styleBinding) {
  10511. el.styleBinding = styleBinding;
  10512. }
  10513. }
  10514. function genData$2 (el) {
  10515. var data = '';
  10516. if (el.staticStyle) {
  10517. data += "staticStyle:" + (el.staticStyle) + ",";
  10518. }
  10519. if (el.styleBinding) {
  10520. data += "style:(" + (el.styleBinding) + "),";
  10521. }
  10522. return data
  10523. }
  10524. var style$1 = {
  10525. staticKeys: ['staticStyle'],
  10526. transformNode: transformNode$1,
  10527. genData: genData$2
  10528. };
  10529. var modules$1 = [
  10530. klass$1,
  10531. style$1
  10532. ];
  10533. /* */
  10534. function text (el, dir) {
  10535. if (dir.value) {
  10536. addProp(el, 'textContent', ("_s(" + (dir.value) + ")"));
  10537. }
  10538. }
  10539. /* */
  10540. function html (el, dir) {
  10541. if (dir.value) {
  10542. addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"));
  10543. }
  10544. }
  10545. var directives$1 = {
  10546. model: model,
  10547. text: text,
  10548. html: html
  10549. };
  10550. /* */
  10551. var baseOptions = {
  10552. expectHTML: true,
  10553. modules: modules$1,
  10554. directives: directives$1,
  10555. isPreTag: isPreTag,
  10556. isUnaryTag: isUnaryTag,
  10557. mustUseProp: mustUseProp,
  10558. canBeLeftOpenTag: canBeLeftOpenTag,
  10559. isReservedTag: isReservedTag,
  10560. getTagNamespace: getTagNamespace,
  10561. staticKeys: genStaticKeys(modules$1)
  10562. };
  10563. var ref$1 = createCompiler(baseOptions);
  10564. var compileToFunctions = ref$1.compileToFunctions;
  10565. /* */
  10566. var idToTemplate = cached(function (id) {
  10567. var el = query(id);
  10568. return el && el.innerHTML
  10569. });
  10570. var mount = Vue$3.prototype.$mount;
  10571. Vue$3.prototype.$mount = function (
  10572. el,
  10573. hydrating
  10574. ) {
  10575. el = el && query(el);
  10576. /* istanbul ignore if */
  10577. if (el === document.body || el === document.documentElement) {
  10578. process.env.NODE_ENV !== 'production' && warn(
  10579. "Do not mount Vue to <html> or <body> - mount to normal elements instead."
  10580. );
  10581. return this
  10582. }
  10583. var options = this.$options;
  10584. // resolve template/el and convert to render function
  10585. if (!options.render) {
  10586. var template = options.template;
  10587. if (template) {
  10588. if (typeof template === 'string') {
  10589. if (template.charAt(0) === '#') {
  10590. template = idToTemplate(template);
  10591. /* istanbul ignore if */
  10592. if (process.env.NODE_ENV !== 'production' && !template) {
  10593. warn(
  10594. ("Template element not found or is empty: " + (options.template)),
  10595. this
  10596. );
  10597. }
  10598. }
  10599. } else if (template.nodeType) {
  10600. template = template.innerHTML;
  10601. } else {
  10602. if (process.env.NODE_ENV !== 'production') {
  10603. warn('invalid template option:' + template, this);
  10604. }
  10605. return this
  10606. }
  10607. } else if (el) {
  10608. template = getOuterHTML(el);
  10609. }
  10610. if (template) {
  10611. /* istanbul ignore if */
  10612. if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
  10613. mark('compile');
  10614. }
  10615. var ref = compileToFunctions(template, {
  10616. shouldDecodeNewlines: shouldDecodeNewlines,
  10617. delimiters: options.delimiters
  10618. }, this);
  10619. var render = ref.render;
  10620. var staticRenderFns = ref.staticRenderFns;
  10621. options.render = render;
  10622. options.staticRenderFns = staticRenderFns;
  10623. /* istanbul ignore if */
  10624. if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
  10625. mark('compile end');
  10626. measure(((this._name) + " compile"), 'compile', 'compile end');
  10627. }
  10628. }
  10629. }
  10630. return mount.call(this, el, hydrating)
  10631. };
  10632. /**
  10633. * Get outerHTML of elements, taking care
  10634. * of SVG elements in IE as well.
  10635. */
  10636. function getOuterHTML (el) {
  10637. if (el.outerHTML) {
  10638. return el.outerHTML
  10639. } else {
  10640. var container = document.createElement('div');
  10641. container.appendChild(el.cloneNode(true));
  10642. return container.innerHTML
  10643. }
  10644. }
  10645. Vue$3.compile = compileToFunctions;
  10646. module.exports = Vue$3;
  10647. }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
  10648. },{"_process":2}],10:[function(require,module,exports){
  10649. (function (process,global){
  10650. /*!
  10651. * Vue.js v2.3.3
  10652. * (c) 2014-2017 Evan You
  10653. * Released under the MIT License.
  10654. */
  10655. 'use strict';
  10656. /* */
  10657. // these helpers produces better vm code in JS engines due to their
  10658. // explicitness and function inlining
  10659. function isUndef (v) {
  10660. return v === undefined || v === null
  10661. }
  10662. function isDef (v) {
  10663. return v !== undefined && v !== null
  10664. }
  10665. function isTrue (v) {
  10666. return v === true
  10667. }
  10668. function isFalse (v) {
  10669. return v === false
  10670. }
  10671. /**
  10672. * Check if value is primitive
  10673. */
  10674. function isPrimitive (value) {
  10675. return typeof value === 'string' || typeof value === 'number'
  10676. }
  10677. /**
  10678. * Quick object check - this is primarily used to tell
  10679. * Objects from primitive values when we know the value
  10680. * is a JSON-compliant type.
  10681. */
  10682. function isObject (obj) {
  10683. return obj !== null && typeof obj === 'object'
  10684. }
  10685. var _toString = Object.prototype.toString;
  10686. /**
  10687. * Strict object type check. Only returns true
  10688. * for plain JavaScript objects.
  10689. */
  10690. function isPlainObject (obj) {
  10691. return _toString.call(obj) === '[object Object]'
  10692. }
  10693. function isRegExp (v) {
  10694. return _toString.call(v) === '[object RegExp]'
  10695. }
  10696. /**
  10697. * Convert a value to a string that is actually rendered.
  10698. */
  10699. function toString (val) {
  10700. return val == null
  10701. ? ''
  10702. : typeof val === 'object'
  10703. ? JSON.stringify(val, null, 2)
  10704. : String(val)
  10705. }
  10706. /**
  10707. * Convert a input value to a number for persistence.
  10708. * If the conversion fails, return original string.
  10709. */
  10710. function toNumber (val) {
  10711. var n = parseFloat(val);
  10712. return isNaN(n) ? val : n
  10713. }
  10714. /**
  10715. * Make a map and return a function for checking if a key
  10716. * is in that map.
  10717. */
  10718. function makeMap (
  10719. str,
  10720. expectsLowerCase
  10721. ) {
  10722. var map = Object.create(null);
  10723. var list = str.split(',');
  10724. for (var i = 0; i < list.length; i++) {
  10725. map[list[i]] = true;
  10726. }
  10727. return expectsLowerCase
  10728. ? function (val) { return map[val.toLowerCase()]; }
  10729. : function (val) { return map[val]; }
  10730. }
  10731. /**
  10732. * Check if a tag is a built-in tag.
  10733. */
  10734. var isBuiltInTag = makeMap('slot,component', true);
  10735. /**
  10736. * Remove an item from an array
  10737. */
  10738. function remove (arr, item) {
  10739. if (arr.length) {
  10740. var index = arr.indexOf(item);
  10741. if (index > -1) {
  10742. return arr.splice(index, 1)
  10743. }
  10744. }
  10745. }
  10746. /**
  10747. * Check whether the object has the property.
  10748. */
  10749. var hasOwnProperty = Object.prototype.hasOwnProperty;
  10750. function hasOwn (obj, key) {
  10751. return hasOwnProperty.call(obj, key)
  10752. }
  10753. /**
  10754. * Create a cached version of a pure function.
  10755. */
  10756. function cached (fn) {
  10757. var cache = Object.create(null);
  10758. return (function cachedFn (str) {
  10759. var hit = cache[str];
  10760. return hit || (cache[str] = fn(str))
  10761. })
  10762. }
  10763. /**
  10764. * Camelize a hyphen-delimited string.
  10765. */
  10766. var camelizeRE = /-(\w)/g;
  10767. var camelize = cached(function (str) {
  10768. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  10769. });
  10770. /**
  10771. * Capitalize a string.
  10772. */
  10773. var capitalize = cached(function (str) {
  10774. return str.charAt(0).toUpperCase() + str.slice(1)
  10775. });
  10776. /**
  10777. * Hyphenate a camelCase string.
  10778. */
  10779. var hyphenateRE = /([^-])([A-Z])/g;
  10780. var hyphenate = cached(function (str) {
  10781. return str
  10782. .replace(hyphenateRE, '$1-$2')
  10783. .replace(hyphenateRE, '$1-$2')
  10784. .toLowerCase()
  10785. });
  10786. /**
  10787. * Simple bind, faster than native
  10788. */
  10789. function bind (fn, ctx) {
  10790. function boundFn (a) {
  10791. var l = arguments.length;
  10792. return l
  10793. ? l > 1
  10794. ? fn.apply(ctx, arguments)
  10795. : fn.call(ctx, a)
  10796. : fn.call(ctx)
  10797. }
  10798. // record original fn length
  10799. boundFn._length = fn.length;
  10800. return boundFn
  10801. }
  10802. /**
  10803. * Convert an Array-like object to a real Array.
  10804. */
  10805. function toArray (list, start) {
  10806. start = start || 0;
  10807. var i = list.length - start;
  10808. var ret = new Array(i);
  10809. while (i--) {
  10810. ret[i] = list[i + start];
  10811. }
  10812. return ret
  10813. }
  10814. /**
  10815. * Mix properties into target object.
  10816. */
  10817. function extend (to, _from) {
  10818. for (var key in _from) {
  10819. to[key] = _from[key];
  10820. }
  10821. return to
  10822. }
  10823. /**
  10824. * Merge an Array of Objects into a single Object.
  10825. */
  10826. function toObject (arr) {
  10827. var res = {};
  10828. for (var i = 0; i < arr.length; i++) {
  10829. if (arr[i]) {
  10830. extend(res, arr[i]);
  10831. }
  10832. }
  10833. return res
  10834. }
  10835. /**
  10836. * Perform no operation.
  10837. */
  10838. function noop () {}
  10839. /**
  10840. * Always return false.
  10841. */
  10842. var no = function () { return false; };
  10843. /**
  10844. * Return same value
  10845. */
  10846. var identity = function (_) { return _; };
  10847. /**
  10848. * Generate a static keys string from compiler modules.
  10849. */
  10850. /**
  10851. * Check if two values are loosely equal - that is,
  10852. * if they are plain objects, do they have the same shape?
  10853. */
  10854. function looseEqual (a, b) {
  10855. var isObjectA = isObject(a);
  10856. var isObjectB = isObject(b);
  10857. if (isObjectA && isObjectB) {
  10858. try {
  10859. return JSON.stringify(a) === JSON.stringify(b)
  10860. } catch (e) {
  10861. // possible circular reference
  10862. return a === b
  10863. }
  10864. } else if (!isObjectA && !isObjectB) {
  10865. return String(a) === String(b)
  10866. } else {
  10867. return false
  10868. }
  10869. }
  10870. function looseIndexOf (arr, val) {
  10871. for (var i = 0; i < arr.length; i++) {
  10872. if (looseEqual(arr[i], val)) { return i }
  10873. }
  10874. return -1
  10875. }
  10876. /**
  10877. * Ensure a function is called only once.
  10878. */
  10879. function once (fn) {
  10880. var called = false;
  10881. return function () {
  10882. if (!called) {
  10883. called = true;
  10884. fn.apply(this, arguments);
  10885. }
  10886. }
  10887. }
  10888. var SSR_ATTR = 'data-server-rendered';
  10889. var ASSET_TYPES = [
  10890. 'component',
  10891. 'directive',
  10892. 'filter'
  10893. ];
  10894. var LIFECYCLE_HOOKS = [
  10895. 'beforeCreate',
  10896. 'created',
  10897. 'beforeMount',
  10898. 'mounted',
  10899. 'beforeUpdate',
  10900. 'updated',
  10901. 'beforeDestroy',
  10902. 'destroyed',
  10903. 'activated',
  10904. 'deactivated'
  10905. ];
  10906. /* */
  10907. var config = ({
  10908. /**
  10909. * Option merge strategies (used in core/util/options)
  10910. */
  10911. optionMergeStrategies: Object.create(null),
  10912. /**
  10913. * Whether to suppress warnings.
  10914. */
  10915. silent: false,
  10916. /**
  10917. * Show production mode tip message on boot?
  10918. */
  10919. productionTip: process.env.NODE_ENV !== 'production',
  10920. /**
  10921. * Whether to enable devtools
  10922. */
  10923. devtools: process.env.NODE_ENV !== 'production',
  10924. /**
  10925. * Whether to record perf
  10926. */
  10927. performance: false,
  10928. /**
  10929. * Error handler for watcher errors
  10930. */
  10931. errorHandler: null,
  10932. /**
  10933. * Ignore certain custom elements
  10934. */
  10935. ignoredElements: [],
  10936. /**
  10937. * Custom user key aliases for v-on
  10938. */
  10939. keyCodes: Object.create(null),
  10940. /**
  10941. * Check if a tag is reserved so that it cannot be registered as a
  10942. * component. This is platform-dependent and may be overwritten.
  10943. */
  10944. isReservedTag: no,
  10945. /**
  10946. * Check if an attribute is reserved so that it cannot be used as a component
  10947. * prop. This is platform-dependent and may be overwritten.
  10948. */
  10949. isReservedAttr: no,
  10950. /**
  10951. * Check if a tag is an unknown element.
  10952. * Platform-dependent.
  10953. */
  10954. isUnknownElement: no,
  10955. /**
  10956. * Get the namespace of an element
  10957. */
  10958. getTagNamespace: noop,
  10959. /**
  10960. * Parse the real tag name for the specific platform.
  10961. */
  10962. parsePlatformTagName: identity,
  10963. /**
  10964. * Check if an attribute must be bound using property, e.g. value
  10965. * Platform-dependent.
  10966. */
  10967. mustUseProp: no,
  10968. /**
  10969. * Exposed for legacy reasons
  10970. */
  10971. _lifecycleHooks: LIFECYCLE_HOOKS
  10972. });
  10973. /* */
  10974. var emptyObject = Object.freeze({});
  10975. /**
  10976. * Check if a string starts with $ or _
  10977. */
  10978. function isReserved (str) {
  10979. var c = (str + '').charCodeAt(0);
  10980. return c === 0x24 || c === 0x5F
  10981. }
  10982. /**
  10983. * Define a property.
  10984. */
  10985. function def (obj, key, val, enumerable) {
  10986. Object.defineProperty(obj, key, {
  10987. value: val,
  10988. enumerable: !!enumerable,
  10989. writable: true,
  10990. configurable: true
  10991. });
  10992. }
  10993. /**
  10994. * Parse simple path.
  10995. */
  10996. var bailRE = /[^\w.$]/;
  10997. function parsePath (path) {
  10998. if (bailRE.test(path)) {
  10999. return
  11000. }
  11001. var segments = path.split('.');
  11002. return function (obj) {
  11003. for (var i = 0; i < segments.length; i++) {
  11004. if (!obj) { return }
  11005. obj = obj[segments[i]];
  11006. }
  11007. return obj
  11008. }
  11009. }
  11010. /* */
  11011. var warn = noop;
  11012. var tip = noop;
  11013. var formatComponentName = (null); // work around flow check
  11014. if (process.env.NODE_ENV !== 'production') {
  11015. var hasConsole = typeof console !== 'undefined';
  11016. var classifyRE = /(?:^|[-_])(\w)/g;
  11017. var classify = function (str) { return str
  11018. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  11019. .replace(/[-_]/g, ''); };
  11020. warn = function (msg, vm) {
  11021. if (hasConsole && (!config.silent)) {
  11022. console.error("[Vue warn]: " + msg + (
  11023. vm ? generateComponentTrace(vm) : ''
  11024. ));
  11025. }
  11026. };
  11027. tip = function (msg, vm) {
  11028. if (hasConsole && (!config.silent)) {
  11029. console.warn("[Vue tip]: " + msg + (
  11030. vm ? generateComponentTrace(vm) : ''
  11031. ));
  11032. }
  11033. };
  11034. formatComponentName = function (vm, includeFile) {
  11035. if (vm.$root === vm) {
  11036. return '<Root>'
  11037. }
  11038. var name = typeof vm === 'string'
  11039. ? vm
  11040. : typeof vm === 'function' && vm.options
  11041. ? vm.options.name
  11042. : vm._isVue
  11043. ? vm.$options.name || vm.$options._componentTag
  11044. : vm.name;
  11045. var file = vm._isVue && vm.$options.__file;
  11046. if (!name && file) {
  11047. var match = file.match(/([^/\\]+)\.vue$/);
  11048. name = match && match[1];
  11049. }
  11050. return (
  11051. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  11052. (file && includeFile !== false ? (" at " + file) : '')
  11053. )
  11054. };
  11055. var repeat = function (str, n) {
  11056. var res = '';
  11057. while (n) {
  11058. if (n % 2 === 1) { res += str; }
  11059. if (n > 1) { str += str; }
  11060. n >>= 1;
  11061. }
  11062. return res
  11063. };
  11064. var generateComponentTrace = function (vm) {
  11065. if (vm._isVue && vm.$parent) {
  11066. var tree = [];
  11067. var currentRecursiveSequence = 0;
  11068. while (vm) {
  11069. if (tree.length > 0) {
  11070. var last = tree[tree.length - 1];
  11071. if (last.constructor === vm.constructor) {
  11072. currentRecursiveSequence++;
  11073. vm = vm.$parent;
  11074. continue
  11075. } else if (currentRecursiveSequence > 0) {
  11076. tree[tree.length - 1] = [last, currentRecursiveSequence];
  11077. currentRecursiveSequence = 0;
  11078. }
  11079. }
  11080. tree.push(vm);
  11081. vm = vm.$parent;
  11082. }
  11083. return '\n\nfound in\n\n' + tree
  11084. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  11085. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  11086. : formatComponentName(vm))); })
  11087. .join('\n')
  11088. } else {
  11089. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  11090. }
  11091. };
  11092. }
  11093. /* */
  11094. function handleError (err, vm, info) {
  11095. if (config.errorHandler) {
  11096. config.errorHandler.call(null, err, vm, info);
  11097. } else {
  11098. if (process.env.NODE_ENV !== 'production') {
  11099. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  11100. }
  11101. /* istanbul ignore else */
  11102. if (inBrowser && typeof console !== 'undefined') {
  11103. console.error(err);
  11104. } else {
  11105. throw err
  11106. }
  11107. }
  11108. }
  11109. /* */
  11110. /* globals MutationObserver */
  11111. // can we use __proto__?
  11112. var hasProto = '__proto__' in {};
  11113. // Browser environment sniffing
  11114. var inBrowser = typeof window !== 'undefined';
  11115. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  11116. var isIE = UA && /msie|trident/.test(UA);
  11117. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  11118. var isEdge = UA && UA.indexOf('edge/') > 0;
  11119. var isAndroid = UA && UA.indexOf('android') > 0;
  11120. var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);
  11121. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  11122. var supportsPassive = false;
  11123. if (inBrowser) {
  11124. try {
  11125. var opts = {};
  11126. Object.defineProperty(opts, 'passive', ({
  11127. get: function get () {
  11128. /* istanbul ignore next */
  11129. supportsPassive = true;
  11130. }
  11131. } )); // https://github.com/facebook/flow/issues/285
  11132. window.addEventListener('test-passive', null, opts);
  11133. } catch (e) {}
  11134. }
  11135. // this needs to be lazy-evaled because vue may be required before
  11136. // vue-server-renderer can set VUE_ENV
  11137. var _isServer;
  11138. var isServerRendering = function () {
  11139. if (_isServer === undefined) {
  11140. /* istanbul ignore if */
  11141. if (!inBrowser && typeof global !== 'undefined') {
  11142. // detect presence of vue-server-renderer and avoid
  11143. // Webpack shimming the process
  11144. _isServer = global['process'].env.VUE_ENV === 'server';
  11145. } else {
  11146. _isServer = false;
  11147. }
  11148. }
  11149. return _isServer
  11150. };
  11151. // detect devtools
  11152. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  11153. /* istanbul ignore next */
  11154. function isNative (Ctor) {
  11155. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  11156. }
  11157. var hasSymbol =
  11158. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  11159. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  11160. /**
  11161. * Defer a task to execute it asynchronously.
  11162. */
  11163. var nextTick = (function () {
  11164. var callbacks = [];
  11165. var pending = false;
  11166. var timerFunc;
  11167. function nextTickHandler () {
  11168. pending = false;
  11169. var copies = callbacks.slice(0);
  11170. callbacks.length = 0;
  11171. for (var i = 0; i < copies.length; i++) {
  11172. copies[i]();
  11173. }
  11174. }
  11175. // the nextTick behavior leverages the microtask queue, which can be accessed
  11176. // via either native Promise.then or MutationObserver.
  11177. // MutationObserver has wider support, however it is seriously bugged in
  11178. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  11179. // completely stops working after triggering a few times... so, if native
  11180. // Promise is available, we will use it:
  11181. /* istanbul ignore if */
  11182. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  11183. var p = Promise.resolve();
  11184. var logError = function (err) { console.error(err); };
  11185. timerFunc = function () {
  11186. p.then(nextTickHandler).catch(logError);
  11187. // in problematic UIWebViews, Promise.then doesn't completely break, but
  11188. // it can get stuck in a weird state where callbacks are pushed into the
  11189. // microtask queue but the queue isn't being flushed, until the browser
  11190. // needs to do some other work, e.g. handle a timer. Therefore we can
  11191. // "force" the microtask queue to be flushed by adding an empty timer.
  11192. if (isIOS) { setTimeout(noop); }
  11193. };
  11194. } else if (typeof MutationObserver !== 'undefined' && (
  11195. isNative(MutationObserver) ||
  11196. // PhantomJS and iOS 7.x
  11197. MutationObserver.toString() === '[object MutationObserverConstructor]'
  11198. )) {
  11199. // use MutationObserver where native Promise is not available,
  11200. // e.g. PhantomJS IE11, iOS7, Android 4.4
  11201. var counter = 1;
  11202. var observer = new MutationObserver(nextTickHandler);
  11203. var textNode = document.createTextNode(String(counter));
  11204. observer.observe(textNode, {
  11205. characterData: true
  11206. });
  11207. timerFunc = function () {
  11208. counter = (counter + 1) % 2;
  11209. textNode.data = String(counter);
  11210. };
  11211. } else {
  11212. // fallback to setTimeout
  11213. /* istanbul ignore next */
  11214. timerFunc = function () {
  11215. setTimeout(nextTickHandler, 0);
  11216. };
  11217. }
  11218. return function queueNextTick (cb, ctx) {
  11219. var _resolve;
  11220. callbacks.push(function () {
  11221. if (cb) {
  11222. try {
  11223. cb.call(ctx);
  11224. } catch (e) {
  11225. handleError(e, ctx, 'nextTick');
  11226. }
  11227. } else if (_resolve) {
  11228. _resolve(ctx);
  11229. }
  11230. });
  11231. if (!pending) {
  11232. pending = true;
  11233. timerFunc();
  11234. }
  11235. if (!cb && typeof Promise !== 'undefined') {
  11236. return new Promise(function (resolve, reject) {
  11237. _resolve = resolve;
  11238. })
  11239. }
  11240. }
  11241. })();
  11242. var _Set;
  11243. /* istanbul ignore if */
  11244. if (typeof Set !== 'undefined' && isNative(Set)) {
  11245. // use native Set when available.
  11246. _Set = Set;
  11247. } else {
  11248. // a non-standard Set polyfill that only works with primitive keys.
  11249. _Set = (function () {
  11250. function Set () {
  11251. this.set = Object.create(null);
  11252. }
  11253. Set.prototype.has = function has (key) {
  11254. return this.set[key] === true
  11255. };
  11256. Set.prototype.add = function add (key) {
  11257. this.set[key] = true;
  11258. };
  11259. Set.prototype.clear = function clear () {
  11260. this.set = Object.create(null);
  11261. };
  11262. return Set;
  11263. }());
  11264. }
  11265. /* */
  11266. var uid$1 = 0;
  11267. /**
  11268. * A dep is an observable that can have multiple
  11269. * directives subscribing to it.
  11270. */
  11271. var Dep = function Dep () {
  11272. this.id = uid$1++;
  11273. this.subs = [];
  11274. };
  11275. Dep.prototype.addSub = function addSub (sub) {
  11276. this.subs.push(sub);
  11277. };
  11278. Dep.prototype.removeSub = function removeSub (sub) {
  11279. remove(this.subs, sub);
  11280. };
  11281. Dep.prototype.depend = function depend () {
  11282. if (Dep.target) {
  11283. Dep.target.addDep(this);
  11284. }
  11285. };
  11286. Dep.prototype.notify = function notify () {
  11287. // stabilize the subscriber list first
  11288. var subs = this.subs.slice();
  11289. for (var i = 0, l = subs.length; i < l; i++) {
  11290. subs[i].update();
  11291. }
  11292. };
  11293. // the current target watcher being evaluated.
  11294. // this is globally unique because there could be only one
  11295. // watcher being evaluated at any time.
  11296. Dep.target = null;
  11297. var targetStack = [];
  11298. function pushTarget (_target) {
  11299. if (Dep.target) { targetStack.push(Dep.target); }
  11300. Dep.target = _target;
  11301. }
  11302. function popTarget () {
  11303. Dep.target = targetStack.pop();
  11304. }
  11305. /*
  11306. * not type checking this file because flow doesn't play well with
  11307. * dynamically accessing methods on Array prototype
  11308. */
  11309. var arrayProto = Array.prototype;
  11310. var arrayMethods = Object.create(arrayProto);[
  11311. 'push',
  11312. 'pop',
  11313. 'shift',
  11314. 'unshift',
  11315. 'splice',
  11316. 'sort',
  11317. 'reverse'
  11318. ]
  11319. .forEach(function (method) {
  11320. // cache original method
  11321. var original = arrayProto[method];
  11322. def(arrayMethods, method, function mutator () {
  11323. var arguments$1 = arguments;
  11324. // avoid leaking arguments:
  11325. // http://jsperf.com/closure-with-arguments
  11326. var i = arguments.length;
  11327. var args = new Array(i);
  11328. while (i--) {
  11329. args[i] = arguments$1[i];
  11330. }
  11331. var result = original.apply(this, args);
  11332. var ob = this.__ob__;
  11333. var inserted;
  11334. switch (method) {
  11335. case 'push':
  11336. inserted = args;
  11337. break
  11338. case 'unshift':
  11339. inserted = args;
  11340. break
  11341. case 'splice':
  11342. inserted = args.slice(2);
  11343. break
  11344. }
  11345. if (inserted) { ob.observeArray(inserted); }
  11346. // notify change
  11347. ob.dep.notify();
  11348. return result
  11349. });
  11350. });
  11351. /* */
  11352. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  11353. /**
  11354. * By default, when a reactive property is set, the new value is
  11355. * also converted to become reactive. However when passing down props,
  11356. * we don't want to force conversion because the value may be a nested value
  11357. * under a frozen data structure. Converting it would defeat the optimization.
  11358. */
  11359. var observerState = {
  11360. shouldConvert: true,
  11361. isSettingProps: false
  11362. };
  11363. /**
  11364. * Observer class that are attached to each observed
  11365. * object. Once attached, the observer converts target
  11366. * object's property keys into getter/setters that
  11367. * collect dependencies and dispatches updates.
  11368. */
  11369. var Observer = function Observer (value) {
  11370. this.value = value;
  11371. this.dep = new Dep();
  11372. this.vmCount = 0;
  11373. def(value, '__ob__', this);
  11374. if (Array.isArray(value)) {
  11375. var augment = hasProto
  11376. ? protoAugment
  11377. : copyAugment;
  11378. augment(value, arrayMethods, arrayKeys);
  11379. this.observeArray(value);
  11380. } else {
  11381. this.walk(value);
  11382. }
  11383. };
  11384. /**
  11385. * Walk through each property and convert them into
  11386. * getter/setters. This method should only be called when
  11387. * value type is Object.
  11388. */
  11389. Observer.prototype.walk = function walk (obj) {
  11390. var keys = Object.keys(obj);
  11391. for (var i = 0; i < keys.length; i++) {
  11392. defineReactive$$1(obj, keys[i], obj[keys[i]]);
  11393. }
  11394. };
  11395. /**
  11396. * Observe a list of Array items.
  11397. */
  11398. Observer.prototype.observeArray = function observeArray (items) {
  11399. for (var i = 0, l = items.length; i < l; i++) {
  11400. observe(items[i]);
  11401. }
  11402. };
  11403. // helpers
  11404. /**
  11405. * Augment an target Object or Array by intercepting
  11406. * the prototype chain using __proto__
  11407. */
  11408. function protoAugment (target, src) {
  11409. /* eslint-disable no-proto */
  11410. target.__proto__ = src;
  11411. /* eslint-enable no-proto */
  11412. }
  11413. /**
  11414. * Augment an target Object or Array by defining
  11415. * hidden properties.
  11416. */
  11417. /* istanbul ignore next */
  11418. function copyAugment (target, src, keys) {
  11419. for (var i = 0, l = keys.length; i < l; i++) {
  11420. var key = keys[i];
  11421. def(target, key, src[key]);
  11422. }
  11423. }
  11424. /**
  11425. * Attempt to create an observer instance for a value,
  11426. * returns the new observer if successfully observed,
  11427. * or the existing observer if the value already has one.
  11428. */
  11429. function observe (value, asRootData) {
  11430. if (!isObject(value)) {
  11431. return
  11432. }
  11433. var ob;
  11434. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  11435. ob = value.__ob__;
  11436. } else if (
  11437. observerState.shouldConvert &&
  11438. !isServerRendering() &&
  11439. (Array.isArray(value) || isPlainObject(value)) &&
  11440. Object.isExtensible(value) &&
  11441. !value._isVue
  11442. ) {
  11443. ob = new Observer(value);
  11444. }
  11445. if (asRootData && ob) {
  11446. ob.vmCount++;
  11447. }
  11448. return ob
  11449. }
  11450. /**
  11451. * Define a reactive property on an Object.
  11452. */
  11453. function defineReactive$$1 (
  11454. obj,
  11455. key,
  11456. val,
  11457. customSetter
  11458. ) {
  11459. var dep = new Dep();
  11460. var property = Object.getOwnPropertyDescriptor(obj, key);
  11461. if (property && property.configurable === false) {
  11462. return
  11463. }
  11464. // cater for pre-defined getter/setters
  11465. var getter = property && property.get;
  11466. var setter = property && property.set;
  11467. var childOb = observe(val);
  11468. Object.defineProperty(obj, key, {
  11469. enumerable: true,
  11470. configurable: true,
  11471. get: function reactiveGetter () {
  11472. var value = getter ? getter.call(obj) : val;
  11473. if (Dep.target) {
  11474. dep.depend();
  11475. if (childOb) {
  11476. childOb.dep.depend();
  11477. }
  11478. if (Array.isArray(value)) {
  11479. dependArray(value);
  11480. }
  11481. }
  11482. return value
  11483. },
  11484. set: function reactiveSetter (newVal) {
  11485. var value = getter ? getter.call(obj) : val;
  11486. /* eslint-disable no-self-compare */
  11487. if (newVal === value || (newVal !== newVal && value !== value)) {
  11488. return
  11489. }
  11490. /* eslint-enable no-self-compare */
  11491. if (process.env.NODE_ENV !== 'production' && customSetter) {
  11492. customSetter();
  11493. }
  11494. if (setter) {
  11495. setter.call(obj, newVal);
  11496. } else {
  11497. val = newVal;
  11498. }
  11499. childOb = observe(newVal);
  11500. dep.notify();
  11501. }
  11502. });
  11503. }
  11504. /**
  11505. * Set a property on an object. Adds the new property and
  11506. * triggers change notification if the property doesn't
  11507. * already exist.
  11508. */
  11509. function set (target, key, val) {
  11510. if (Array.isArray(target) && typeof key === 'number') {
  11511. target.length = Math.max(target.length, key);
  11512. target.splice(key, 1, val);
  11513. return val
  11514. }
  11515. if (hasOwn(target, key)) {
  11516. target[key] = val;
  11517. return val
  11518. }
  11519. var ob = (target ).__ob__;
  11520. if (target._isVue || (ob && ob.vmCount)) {
  11521. process.env.NODE_ENV !== 'production' && warn(
  11522. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  11523. 'at runtime - declare it upfront in the data option.'
  11524. );
  11525. return val
  11526. }
  11527. if (!ob) {
  11528. target[key] = val;
  11529. return val
  11530. }
  11531. defineReactive$$1(ob.value, key, val);
  11532. ob.dep.notify();
  11533. return val
  11534. }
  11535. /**
  11536. * Delete a property and trigger change if necessary.
  11537. */
  11538. function del (target, key) {
  11539. if (Array.isArray(target) && typeof key === 'number') {
  11540. target.splice(key, 1);
  11541. return
  11542. }
  11543. var ob = (target ).__ob__;
  11544. if (target._isVue || (ob && ob.vmCount)) {
  11545. process.env.NODE_ENV !== 'production' && warn(
  11546. 'Avoid deleting properties on a Vue instance or its root $data ' +
  11547. '- just set it to null.'
  11548. );
  11549. return
  11550. }
  11551. if (!hasOwn(target, key)) {
  11552. return
  11553. }
  11554. delete target[key];
  11555. if (!ob) {
  11556. return
  11557. }
  11558. ob.dep.notify();
  11559. }
  11560. /**
  11561. * Collect dependencies on array elements when the array is touched, since
  11562. * we cannot intercept array element access like property getters.
  11563. */
  11564. function dependArray (value) {
  11565. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  11566. e = value[i];
  11567. e && e.__ob__ && e.__ob__.dep.depend();
  11568. if (Array.isArray(e)) {
  11569. dependArray(e);
  11570. }
  11571. }
  11572. }
  11573. /* */
  11574. /**
  11575. * Option overwriting strategies are functions that handle
  11576. * how to merge a parent option value and a child option
  11577. * value into the final value.
  11578. */
  11579. var strats = config.optionMergeStrategies;
  11580. /**
  11581. * Options with restrictions
  11582. */
  11583. if (process.env.NODE_ENV !== 'production') {
  11584. strats.el = strats.propsData = function (parent, child, vm, key) {
  11585. if (!vm) {
  11586. warn(
  11587. "option \"" + key + "\" can only be used during instance " +
  11588. 'creation with the `new` keyword.'
  11589. );
  11590. }
  11591. return defaultStrat(parent, child)
  11592. };
  11593. }
  11594. /**
  11595. * Helper that recursively merges two data objects together.
  11596. */
  11597. function mergeData (to, from) {
  11598. if (!from) { return to }
  11599. var key, toVal, fromVal;
  11600. var keys = Object.keys(from);
  11601. for (var i = 0; i < keys.length; i++) {
  11602. key = keys[i];
  11603. toVal = to[key];
  11604. fromVal = from[key];
  11605. if (!hasOwn(to, key)) {
  11606. set(to, key, fromVal);
  11607. } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {
  11608. mergeData(toVal, fromVal);
  11609. }
  11610. }
  11611. return to
  11612. }
  11613. /**
  11614. * Data
  11615. */
  11616. strats.data = function (
  11617. parentVal,
  11618. childVal,
  11619. vm
  11620. ) {
  11621. if (!vm) {
  11622. // in a Vue.extend merge, both should be functions
  11623. if (!childVal) {
  11624. return parentVal
  11625. }
  11626. if (typeof childVal !== 'function') {
  11627. process.env.NODE_ENV !== 'production' && warn(
  11628. 'The "data" option should be a function ' +
  11629. 'that returns a per-instance value in component ' +
  11630. 'definitions.',
  11631. vm
  11632. );
  11633. return parentVal
  11634. }
  11635. if (!parentVal) {
  11636. return childVal
  11637. }
  11638. // when parentVal & childVal are both present,
  11639. // we need to return a function that returns the
  11640. // merged result of both functions... no need to
  11641. // check if parentVal is a function here because
  11642. // it has to be a function to pass previous merges.
  11643. return function mergedDataFn () {
  11644. return mergeData(
  11645. childVal.call(this),
  11646. parentVal.call(this)
  11647. )
  11648. }
  11649. } else if (parentVal || childVal) {
  11650. return function mergedInstanceDataFn () {
  11651. // instance merge
  11652. var instanceData = typeof childVal === 'function'
  11653. ? childVal.call(vm)
  11654. : childVal;
  11655. var defaultData = typeof parentVal === 'function'
  11656. ? parentVal.call(vm)
  11657. : undefined;
  11658. if (instanceData) {
  11659. return mergeData(instanceData, defaultData)
  11660. } else {
  11661. return defaultData
  11662. }
  11663. }
  11664. }
  11665. };
  11666. /**
  11667. * Hooks and props are merged as arrays.
  11668. */
  11669. function mergeHook (
  11670. parentVal,
  11671. childVal
  11672. ) {
  11673. return childVal
  11674. ? parentVal
  11675. ? parentVal.concat(childVal)
  11676. : Array.isArray(childVal)
  11677. ? childVal
  11678. : [childVal]
  11679. : parentVal
  11680. }
  11681. LIFECYCLE_HOOKS.forEach(function (hook) {
  11682. strats[hook] = mergeHook;
  11683. });
  11684. /**
  11685. * Assets
  11686. *
  11687. * When a vm is present (instance creation), we need to do
  11688. * a three-way merge between constructor options, instance
  11689. * options and parent options.
  11690. */
  11691. function mergeAssets (parentVal, childVal) {
  11692. var res = Object.create(parentVal || null);
  11693. return childVal
  11694. ? extend(res, childVal)
  11695. : res
  11696. }
  11697. ASSET_TYPES.forEach(function (type) {
  11698. strats[type + 's'] = mergeAssets;
  11699. });
  11700. /**
  11701. * Watchers.
  11702. *
  11703. * Watchers hashes should not overwrite one
  11704. * another, so we merge them as arrays.
  11705. */
  11706. strats.watch = function (parentVal, childVal) {
  11707. /* istanbul ignore if */
  11708. if (!childVal) { return Object.create(parentVal || null) }
  11709. if (!parentVal) { return childVal }
  11710. var ret = {};
  11711. extend(ret, parentVal);
  11712. for (var key in childVal) {
  11713. var parent = ret[key];
  11714. var child = childVal[key];
  11715. if (parent && !Array.isArray(parent)) {
  11716. parent = [parent];
  11717. }
  11718. ret[key] = parent
  11719. ? parent.concat(child)
  11720. : [child];
  11721. }
  11722. return ret
  11723. };
  11724. /**
  11725. * Other object hashes.
  11726. */
  11727. strats.props =
  11728. strats.methods =
  11729. strats.computed = function (parentVal, childVal) {
  11730. if (!childVal) { return Object.create(parentVal || null) }
  11731. if (!parentVal) { return childVal }
  11732. var ret = Object.create(null);
  11733. extend(ret, parentVal);
  11734. extend(ret, childVal);
  11735. return ret
  11736. };
  11737. /**
  11738. * Default strategy.
  11739. */
  11740. var defaultStrat = function (parentVal, childVal) {
  11741. return childVal === undefined
  11742. ? parentVal
  11743. : childVal
  11744. };
  11745. /**
  11746. * Validate component names
  11747. */
  11748. function checkComponents (options) {
  11749. for (var key in options.components) {
  11750. var lower = key.toLowerCase();
  11751. if (isBuiltInTag(lower) || config.isReservedTag(lower)) {
  11752. warn(
  11753. 'Do not use built-in or reserved HTML elements as component ' +
  11754. 'id: ' + key
  11755. );
  11756. }
  11757. }
  11758. }
  11759. /**
  11760. * Ensure all props option syntax are normalized into the
  11761. * Object-based format.
  11762. */
  11763. function normalizeProps (options) {
  11764. var props = options.props;
  11765. if (!props) { return }
  11766. var res = {};
  11767. var i, val, name;
  11768. if (Array.isArray(props)) {
  11769. i = props.length;
  11770. while (i--) {
  11771. val = props[i];
  11772. if (typeof val === 'string') {
  11773. name = camelize(val);
  11774. res[name] = { type: null };
  11775. } else if (process.env.NODE_ENV !== 'production') {
  11776. warn('props must be strings when using array syntax.');
  11777. }
  11778. }
  11779. } else if (isPlainObject(props)) {
  11780. for (var key in props) {
  11781. val = props[key];
  11782. name = camelize(key);
  11783. res[name] = isPlainObject(val)
  11784. ? val
  11785. : { type: val };
  11786. }
  11787. }
  11788. options.props = res;
  11789. }
  11790. /**
  11791. * Normalize raw function directives into object format.
  11792. */
  11793. function normalizeDirectives (options) {
  11794. var dirs = options.directives;
  11795. if (dirs) {
  11796. for (var key in dirs) {
  11797. var def = dirs[key];
  11798. if (typeof def === 'function') {
  11799. dirs[key] = { bind: def, update: def };
  11800. }
  11801. }
  11802. }
  11803. }
  11804. /**
  11805. * Merge two option objects into a new one.
  11806. * Core utility used in both instantiation and inheritance.
  11807. */
  11808. function mergeOptions (
  11809. parent,
  11810. child,
  11811. vm
  11812. ) {
  11813. if (process.env.NODE_ENV !== 'production') {
  11814. checkComponents(child);
  11815. }
  11816. if (typeof child === 'function') {
  11817. child = child.options;
  11818. }
  11819. normalizeProps(child);
  11820. normalizeDirectives(child);
  11821. var extendsFrom = child.extends;
  11822. if (extendsFrom) {
  11823. parent = mergeOptions(parent, extendsFrom, vm);
  11824. }
  11825. if (child.mixins) {
  11826. for (var i = 0, l = child.mixins.length; i < l; i++) {
  11827. parent = mergeOptions(parent, child.mixins[i], vm);
  11828. }
  11829. }
  11830. var options = {};
  11831. var key;
  11832. for (key in parent) {
  11833. mergeField(key);
  11834. }
  11835. for (key in child) {
  11836. if (!hasOwn(parent, key)) {
  11837. mergeField(key);
  11838. }
  11839. }
  11840. function mergeField (key) {
  11841. var strat = strats[key] || defaultStrat;
  11842. options[key] = strat(parent[key], child[key], vm, key);
  11843. }
  11844. return options
  11845. }
  11846. /**
  11847. * Resolve an asset.
  11848. * This function is used because child instances need access
  11849. * to assets defined in its ancestor chain.
  11850. */
  11851. function resolveAsset (
  11852. options,
  11853. type,
  11854. id,
  11855. warnMissing
  11856. ) {
  11857. /* istanbul ignore if */
  11858. if (typeof id !== 'string') {
  11859. return
  11860. }
  11861. var assets = options[type];
  11862. // check local registration variations first
  11863. if (hasOwn(assets, id)) { return assets[id] }
  11864. var camelizedId = camelize(id);
  11865. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  11866. var PascalCaseId = capitalize(camelizedId);
  11867. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  11868. // fallback to prototype chain
  11869. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  11870. if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {
  11871. warn(
  11872. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  11873. options
  11874. );
  11875. }
  11876. return res
  11877. }
  11878. /* */
  11879. function validateProp (
  11880. key,
  11881. propOptions,
  11882. propsData,
  11883. vm
  11884. ) {
  11885. var prop = propOptions[key];
  11886. var absent = !hasOwn(propsData, key);
  11887. var value = propsData[key];
  11888. // handle boolean props
  11889. if (isType(Boolean, prop.type)) {
  11890. if (absent && !hasOwn(prop, 'default')) {
  11891. value = false;
  11892. } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) {
  11893. value = true;
  11894. }
  11895. }
  11896. // check default value
  11897. if (value === undefined) {
  11898. value = getPropDefaultValue(vm, prop, key);
  11899. // since the default value is a fresh copy,
  11900. // make sure to observe it.
  11901. var prevShouldConvert = observerState.shouldConvert;
  11902. observerState.shouldConvert = true;
  11903. observe(value);
  11904. observerState.shouldConvert = prevShouldConvert;
  11905. }
  11906. if (process.env.NODE_ENV !== 'production') {
  11907. assertProp(prop, key, value, vm, absent);
  11908. }
  11909. return value
  11910. }
  11911. /**
  11912. * Get the default value of a prop.
  11913. */
  11914. function getPropDefaultValue (vm, prop, key) {
  11915. // no default, return undefined
  11916. if (!hasOwn(prop, 'default')) {
  11917. return undefined
  11918. }
  11919. var def = prop.default;
  11920. // warn against non-factory defaults for Object & Array
  11921. if (process.env.NODE_ENV !== 'production' && isObject(def)) {
  11922. warn(
  11923. 'Invalid default value for prop "' + key + '": ' +
  11924. 'Props with type Object/Array must use a factory function ' +
  11925. 'to return the default value.',
  11926. vm
  11927. );
  11928. }
  11929. // the raw prop value was also undefined from previous render,
  11930. // return previous default value to avoid unnecessary watcher trigger
  11931. if (vm && vm.$options.propsData &&
  11932. vm.$options.propsData[key] === undefined &&
  11933. vm._props[key] !== undefined
  11934. ) {
  11935. return vm._props[key]
  11936. }
  11937. // call factory function for non-Function types
  11938. // a value is Function if its prototype is function even across different execution context
  11939. return typeof def === 'function' && getType(prop.type) !== 'Function'
  11940. ? def.call(vm)
  11941. : def
  11942. }
  11943. /**
  11944. * Assert whether a prop is valid.
  11945. */
  11946. function assertProp (
  11947. prop,
  11948. name,
  11949. value,
  11950. vm,
  11951. absent
  11952. ) {
  11953. if (prop.required && absent) {
  11954. warn(
  11955. 'Missing required prop: "' + name + '"',
  11956. vm
  11957. );
  11958. return
  11959. }
  11960. if (value == null && !prop.required) {
  11961. return
  11962. }
  11963. var type = prop.type;
  11964. var valid = !type || type === true;
  11965. var expectedTypes = [];
  11966. if (type) {
  11967. if (!Array.isArray(type)) {
  11968. type = [type];
  11969. }
  11970. for (var i = 0; i < type.length && !valid; i++) {
  11971. var assertedType = assertType(value, type[i]);
  11972. expectedTypes.push(assertedType.expectedType || '');
  11973. valid = assertedType.valid;
  11974. }
  11975. }
  11976. if (!valid) {
  11977. warn(
  11978. 'Invalid prop: type check failed for prop "' + name + '".' +
  11979. ' Expected ' + expectedTypes.map(capitalize).join(', ') +
  11980. ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',
  11981. vm
  11982. );
  11983. return
  11984. }
  11985. var validator = prop.validator;
  11986. if (validator) {
  11987. if (!validator(value)) {
  11988. warn(
  11989. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  11990. vm
  11991. );
  11992. }
  11993. }
  11994. }
  11995. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  11996. function assertType (value, type) {
  11997. var valid;
  11998. var expectedType = getType(type);
  11999. if (simpleCheckRE.test(expectedType)) {
  12000. valid = typeof value === expectedType.toLowerCase();
  12001. } else if (expectedType === 'Object') {
  12002. valid = isPlainObject(value);
  12003. } else if (expectedType === 'Array') {
  12004. valid = Array.isArray(value);
  12005. } else {
  12006. valid = value instanceof type;
  12007. }
  12008. return {
  12009. valid: valid,
  12010. expectedType: expectedType
  12011. }
  12012. }
  12013. /**
  12014. * Use function string name to check built-in types,
  12015. * because a simple equality check will fail when running
  12016. * across different vms / iframes.
  12017. */
  12018. function getType (fn) {
  12019. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  12020. return match ? match[1] : ''
  12021. }
  12022. function isType (type, fn) {
  12023. if (!Array.isArray(fn)) {
  12024. return getType(fn) === getType(type)
  12025. }
  12026. for (var i = 0, len = fn.length; i < len; i++) {
  12027. if (getType(fn[i]) === getType(type)) {
  12028. return true
  12029. }
  12030. }
  12031. /* istanbul ignore next */
  12032. return false
  12033. }
  12034. /* */
  12035. /* not type checking this file because flow doesn't play well with Proxy */
  12036. var initProxy;
  12037. if (process.env.NODE_ENV !== 'production') {
  12038. var allowedGlobals = makeMap(
  12039. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  12040. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  12041. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  12042. 'require' // for Webpack/Browserify
  12043. );
  12044. var warnNonPresent = function (target, key) {
  12045. warn(
  12046. "Property or method \"" + key + "\" is not defined on the instance but " +
  12047. "referenced during render. Make sure to declare reactive data " +
  12048. "properties in the data option.",
  12049. target
  12050. );
  12051. };
  12052. var hasProxy =
  12053. typeof Proxy !== 'undefined' &&
  12054. Proxy.toString().match(/native code/);
  12055. if (hasProxy) {
  12056. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta');
  12057. config.keyCodes = new Proxy(config.keyCodes, {
  12058. set: function set (target, key, value) {
  12059. if (isBuiltInModifier(key)) {
  12060. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  12061. return false
  12062. } else {
  12063. target[key] = value;
  12064. return true
  12065. }
  12066. }
  12067. });
  12068. }
  12069. var hasHandler = {
  12070. has: function has (target, key) {
  12071. var has = key in target;
  12072. var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';
  12073. if (!has && !isAllowed) {
  12074. warnNonPresent(target, key);
  12075. }
  12076. return has || !isAllowed
  12077. }
  12078. };
  12079. var getHandler = {
  12080. get: function get (target, key) {
  12081. if (typeof key === 'string' && !(key in target)) {
  12082. warnNonPresent(target, key);
  12083. }
  12084. return target[key]
  12085. }
  12086. };
  12087. initProxy = function initProxy (vm) {
  12088. if (hasProxy) {
  12089. // determine which proxy handler to use
  12090. var options = vm.$options;
  12091. var handlers = options.render && options.render._withStripped
  12092. ? getHandler
  12093. : hasHandler;
  12094. vm._renderProxy = new Proxy(vm, handlers);
  12095. } else {
  12096. vm._renderProxy = vm;
  12097. }
  12098. };
  12099. }
  12100. var mark;
  12101. var measure;
  12102. if (process.env.NODE_ENV !== 'production') {
  12103. var perf = inBrowser && window.performance;
  12104. /* istanbul ignore if */
  12105. if (
  12106. perf &&
  12107. perf.mark &&
  12108. perf.measure &&
  12109. perf.clearMarks &&
  12110. perf.clearMeasures
  12111. ) {
  12112. mark = function (tag) { return perf.mark(tag); };
  12113. measure = function (name, startTag, endTag) {
  12114. perf.measure(name, startTag, endTag);
  12115. perf.clearMarks(startTag);
  12116. perf.clearMarks(endTag);
  12117. perf.clearMeasures(name);
  12118. };
  12119. }
  12120. }
  12121. /* */
  12122. var VNode = function VNode (
  12123. tag,
  12124. data,
  12125. children,
  12126. text,
  12127. elm,
  12128. context,
  12129. componentOptions
  12130. ) {
  12131. this.tag = tag;
  12132. this.data = data;
  12133. this.children = children;
  12134. this.text = text;
  12135. this.elm = elm;
  12136. this.ns = undefined;
  12137. this.context = context;
  12138. this.functionalContext = undefined;
  12139. this.key = data && data.key;
  12140. this.componentOptions = componentOptions;
  12141. this.componentInstance = undefined;
  12142. this.parent = undefined;
  12143. this.raw = false;
  12144. this.isStatic = false;
  12145. this.isRootInsert = true;
  12146. this.isComment = false;
  12147. this.isCloned = false;
  12148. this.isOnce = false;
  12149. };
  12150. var prototypeAccessors = { child: {} };
  12151. // DEPRECATED: alias for componentInstance for backwards compat.
  12152. /* istanbul ignore next */
  12153. prototypeAccessors.child.get = function () {
  12154. return this.componentInstance
  12155. };
  12156. Object.defineProperties( VNode.prototype, prototypeAccessors );
  12157. var createEmptyVNode = function () {
  12158. var node = new VNode();
  12159. node.text = '';
  12160. node.isComment = true;
  12161. return node
  12162. };
  12163. function createTextVNode (val) {
  12164. return new VNode(undefined, undefined, undefined, String(val))
  12165. }
  12166. // optimized shallow clone
  12167. // used for static nodes and slot nodes because they may be reused across
  12168. // multiple renders, cloning them avoids errors when DOM manipulations rely
  12169. // on their elm reference.
  12170. function cloneVNode (vnode) {
  12171. var cloned = new VNode(
  12172. vnode.tag,
  12173. vnode.data,
  12174. vnode.children,
  12175. vnode.text,
  12176. vnode.elm,
  12177. vnode.context,
  12178. vnode.componentOptions
  12179. );
  12180. cloned.ns = vnode.ns;
  12181. cloned.isStatic = vnode.isStatic;
  12182. cloned.key = vnode.key;
  12183. cloned.isComment = vnode.isComment;
  12184. cloned.isCloned = true;
  12185. return cloned
  12186. }
  12187. function cloneVNodes (vnodes) {
  12188. var len = vnodes.length;
  12189. var res = new Array(len);
  12190. for (var i = 0; i < len; i++) {
  12191. res[i] = cloneVNode(vnodes[i]);
  12192. }
  12193. return res
  12194. }
  12195. /* */
  12196. var normalizeEvent = cached(function (name) {
  12197. var passive = name.charAt(0) === '&';
  12198. name = passive ? name.slice(1) : name;
  12199. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  12200. name = once$$1 ? name.slice(1) : name;
  12201. var capture = name.charAt(0) === '!';
  12202. name = capture ? name.slice(1) : name;
  12203. return {
  12204. name: name,
  12205. once: once$$1,
  12206. capture: capture,
  12207. passive: passive
  12208. }
  12209. });
  12210. function createFnInvoker (fns) {
  12211. function invoker () {
  12212. var arguments$1 = arguments;
  12213. var fns = invoker.fns;
  12214. if (Array.isArray(fns)) {
  12215. for (var i = 0; i < fns.length; i++) {
  12216. fns[i].apply(null, arguments$1);
  12217. }
  12218. } else {
  12219. // return handler return value for single handlers
  12220. return fns.apply(null, arguments)
  12221. }
  12222. }
  12223. invoker.fns = fns;
  12224. return invoker
  12225. }
  12226. function updateListeners (
  12227. on,
  12228. oldOn,
  12229. add,
  12230. remove$$1,
  12231. vm
  12232. ) {
  12233. var name, cur, old, event;
  12234. for (name in on) {
  12235. cur = on[name];
  12236. old = oldOn[name];
  12237. event = normalizeEvent(name);
  12238. if (isUndef(cur)) {
  12239. process.env.NODE_ENV !== 'production' && warn(
  12240. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  12241. vm
  12242. );
  12243. } else if (isUndef(old)) {
  12244. if (isUndef(cur.fns)) {
  12245. cur = on[name] = createFnInvoker(cur);
  12246. }
  12247. add(event.name, cur, event.once, event.capture, event.passive);
  12248. } else if (cur !== old) {
  12249. old.fns = cur;
  12250. on[name] = old;
  12251. }
  12252. }
  12253. for (name in oldOn) {
  12254. if (isUndef(on[name])) {
  12255. event = normalizeEvent(name);
  12256. remove$$1(event.name, oldOn[name], event.capture);
  12257. }
  12258. }
  12259. }
  12260. /* */
  12261. function mergeVNodeHook (def, hookKey, hook) {
  12262. var invoker;
  12263. var oldHook = def[hookKey];
  12264. function wrappedHook () {
  12265. hook.apply(this, arguments);
  12266. // important: remove merged hook to ensure it's called only once
  12267. // and prevent memory leak
  12268. remove(invoker.fns, wrappedHook);
  12269. }
  12270. if (isUndef(oldHook)) {
  12271. // no existing hook
  12272. invoker = createFnInvoker([wrappedHook]);
  12273. } else {
  12274. /* istanbul ignore if */
  12275. if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
  12276. // already a merged invoker
  12277. invoker = oldHook;
  12278. invoker.fns.push(wrappedHook);
  12279. } else {
  12280. // existing plain hook
  12281. invoker = createFnInvoker([oldHook, wrappedHook]);
  12282. }
  12283. }
  12284. invoker.merged = true;
  12285. def[hookKey] = invoker;
  12286. }
  12287. /* */
  12288. function extractPropsFromVNodeData (
  12289. data,
  12290. Ctor,
  12291. tag
  12292. ) {
  12293. // we are only extracting raw values here.
  12294. // validation and default values are handled in the child
  12295. // component itself.
  12296. var propOptions = Ctor.options.props;
  12297. if (isUndef(propOptions)) {
  12298. return
  12299. }
  12300. var res = {};
  12301. var attrs = data.attrs;
  12302. var props = data.props;
  12303. if (isDef(attrs) || isDef(props)) {
  12304. for (var key in propOptions) {
  12305. var altKey = hyphenate(key);
  12306. if (process.env.NODE_ENV !== 'production') {
  12307. var keyInLowerCase = key.toLowerCase();
  12308. if (
  12309. key !== keyInLowerCase &&
  12310. attrs && hasOwn(attrs, keyInLowerCase)
  12311. ) {
  12312. tip(
  12313. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  12314. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  12315. " \"" + key + "\". " +
  12316. "Note that HTML attributes are case-insensitive and camelCased " +
  12317. "props need to use their kebab-case equivalents when using in-DOM " +
  12318. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  12319. );
  12320. }
  12321. }
  12322. checkProp(res, props, key, altKey, true) ||
  12323. checkProp(res, attrs, key, altKey, false);
  12324. }
  12325. }
  12326. return res
  12327. }
  12328. function checkProp (
  12329. res,
  12330. hash,
  12331. key,
  12332. altKey,
  12333. preserve
  12334. ) {
  12335. if (isDef(hash)) {
  12336. if (hasOwn(hash, key)) {
  12337. res[key] = hash[key];
  12338. if (!preserve) {
  12339. delete hash[key];
  12340. }
  12341. return true
  12342. } else if (hasOwn(hash, altKey)) {
  12343. res[key] = hash[altKey];
  12344. if (!preserve) {
  12345. delete hash[altKey];
  12346. }
  12347. return true
  12348. }
  12349. }
  12350. return false
  12351. }
  12352. /* */
  12353. // The template compiler attempts to minimize the need for normalization by
  12354. // statically analyzing the template at compile time.
  12355. //
  12356. // For plain HTML markup, normalization can be completely skipped because the
  12357. // generated render function is guaranteed to return Array<VNode>. There are
  12358. // two cases where extra normalization is needed:
  12359. // 1. When the children contains components - because a functional component
  12360. // may return an Array instead of a single root. In this case, just a simple
  12361. // normalization is needed - if any child is an Array, we flatten the whole
  12362. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  12363. // because functional components already normalize their own children.
  12364. function simpleNormalizeChildren (children) {
  12365. for (var i = 0; i < children.length; i++) {
  12366. if (Array.isArray(children[i])) {
  12367. return Array.prototype.concat.apply([], children)
  12368. }
  12369. }
  12370. return children
  12371. }
  12372. // 2. When the children contains constructs that always generated nested Arrays,
  12373. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  12374. // with hand-written render functions / JSX. In such cases a full normalization
  12375. // is needed to cater to all possible types of children values.
  12376. function normalizeChildren (children) {
  12377. return isPrimitive(children)
  12378. ? [createTextVNode(children)]
  12379. : Array.isArray(children)
  12380. ? normalizeArrayChildren(children)
  12381. : undefined
  12382. }
  12383. function isTextNode (node) {
  12384. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  12385. }
  12386. function normalizeArrayChildren (children, nestedIndex) {
  12387. var res = [];
  12388. var i, c, last;
  12389. for (i = 0; i < children.length; i++) {
  12390. c = children[i];
  12391. if (isUndef(c) || typeof c === 'boolean') { continue }
  12392. last = res[res.length - 1];
  12393. // nested
  12394. if (Array.isArray(c)) {
  12395. res.push.apply(res, normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i)));
  12396. } else if (isPrimitive(c)) {
  12397. if (isTextNode(last)) {
  12398. // merge adjacent text nodes
  12399. // this is necessary for SSR hydration because text nodes are
  12400. // essentially merged when rendered to HTML strings
  12401. (last).text += String(c);
  12402. } else if (c !== '') {
  12403. // convert primitive to vnode
  12404. res.push(createTextVNode(c));
  12405. }
  12406. } else {
  12407. if (isTextNode(c) && isTextNode(last)) {
  12408. // merge adjacent text nodes
  12409. res[res.length - 1] = createTextVNode(last.text + c.text);
  12410. } else {
  12411. // default key for nested array children (likely generated by v-for)
  12412. if (isTrue(children._isVList) &&
  12413. isDef(c.tag) &&
  12414. isUndef(c.key) &&
  12415. isDef(nestedIndex)) {
  12416. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  12417. }
  12418. res.push(c);
  12419. }
  12420. }
  12421. }
  12422. return res
  12423. }
  12424. /* */
  12425. function ensureCtor (comp, base) {
  12426. return isObject(comp)
  12427. ? base.extend(comp)
  12428. : comp
  12429. }
  12430. function resolveAsyncComponent (
  12431. factory,
  12432. baseCtor,
  12433. context
  12434. ) {
  12435. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  12436. return factory.errorComp
  12437. }
  12438. if (isDef(factory.resolved)) {
  12439. return factory.resolved
  12440. }
  12441. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  12442. return factory.loadingComp
  12443. }
  12444. if (isDef(factory.contexts)) {
  12445. // already pending
  12446. factory.contexts.push(context);
  12447. } else {
  12448. var contexts = factory.contexts = [context];
  12449. var sync = true;
  12450. var forceRender = function () {
  12451. for (var i = 0, l = contexts.length; i < l; i++) {
  12452. contexts[i].$forceUpdate();
  12453. }
  12454. };
  12455. var resolve = once(function (res) {
  12456. // cache resolved
  12457. factory.resolved = ensureCtor(res, baseCtor);
  12458. // invoke callbacks only if this is not a synchronous resolve
  12459. // (async resolves are shimmed as synchronous during SSR)
  12460. if (!sync) {
  12461. forceRender();
  12462. }
  12463. });
  12464. var reject = once(function (reason) {
  12465. process.env.NODE_ENV !== 'production' && warn(
  12466. "Failed to resolve async component: " + (String(factory)) +
  12467. (reason ? ("\nReason: " + reason) : '')
  12468. );
  12469. if (isDef(factory.errorComp)) {
  12470. factory.error = true;
  12471. forceRender();
  12472. }
  12473. });
  12474. var res = factory(resolve, reject);
  12475. if (isObject(res)) {
  12476. if (typeof res.then === 'function') {
  12477. // () => Promise
  12478. if (isUndef(factory.resolved)) {
  12479. res.then(resolve, reject);
  12480. }
  12481. } else if (isDef(res.component) && typeof res.component.then === 'function') {
  12482. res.component.then(resolve, reject);
  12483. if (isDef(res.error)) {
  12484. factory.errorComp = ensureCtor(res.error, baseCtor);
  12485. }
  12486. if (isDef(res.loading)) {
  12487. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  12488. if (res.delay === 0) {
  12489. factory.loading = true;
  12490. } else {
  12491. setTimeout(function () {
  12492. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  12493. factory.loading = true;
  12494. forceRender();
  12495. }
  12496. }, res.delay || 200);
  12497. }
  12498. }
  12499. if (isDef(res.timeout)) {
  12500. setTimeout(function () {
  12501. if (isUndef(factory.resolved)) {
  12502. reject(
  12503. process.env.NODE_ENV !== 'production'
  12504. ? ("timeout (" + (res.timeout) + "ms)")
  12505. : null
  12506. );
  12507. }
  12508. }, res.timeout);
  12509. }
  12510. }
  12511. }
  12512. sync = false;
  12513. // return in case resolved synchronously
  12514. return factory.loading
  12515. ? factory.loadingComp
  12516. : factory.resolved
  12517. }
  12518. }
  12519. /* */
  12520. function getFirstComponentChild (children) {
  12521. if (Array.isArray(children)) {
  12522. for (var i = 0; i < children.length; i++) {
  12523. var c = children[i];
  12524. if (isDef(c) && isDef(c.componentOptions)) {
  12525. return c
  12526. }
  12527. }
  12528. }
  12529. }
  12530. /* */
  12531. /* */
  12532. function initEvents (vm) {
  12533. vm._events = Object.create(null);
  12534. vm._hasHookEvent = false;
  12535. // init parent attached events
  12536. var listeners = vm.$options._parentListeners;
  12537. if (listeners) {
  12538. updateComponentListeners(vm, listeners);
  12539. }
  12540. }
  12541. var target;
  12542. function add (event, fn, once$$1) {
  12543. if (once$$1) {
  12544. target.$once(event, fn);
  12545. } else {
  12546. target.$on(event, fn);
  12547. }
  12548. }
  12549. function remove$1 (event, fn) {
  12550. target.$off(event, fn);
  12551. }
  12552. function updateComponentListeners (
  12553. vm,
  12554. listeners,
  12555. oldListeners
  12556. ) {
  12557. target = vm;
  12558. updateListeners(listeners, oldListeners || {}, add, remove$1, vm);
  12559. }
  12560. function eventsMixin (Vue) {
  12561. var hookRE = /^hook:/;
  12562. Vue.prototype.$on = function (event, fn) {
  12563. var this$1 = this;
  12564. var vm = this;
  12565. if (Array.isArray(event)) {
  12566. for (var i = 0, l = event.length; i < l; i++) {
  12567. this$1.$on(event[i], fn);
  12568. }
  12569. } else {
  12570. (vm._events[event] || (vm._events[event] = [])).push(fn);
  12571. // optimize hook:event cost by using a boolean flag marked at registration
  12572. // instead of a hash lookup
  12573. if (hookRE.test(event)) {
  12574. vm._hasHookEvent = true;
  12575. }
  12576. }
  12577. return vm
  12578. };
  12579. Vue.prototype.$once = function (event, fn) {
  12580. var vm = this;
  12581. function on () {
  12582. vm.$off(event, on);
  12583. fn.apply(vm, arguments);
  12584. }
  12585. on.fn = fn;
  12586. vm.$on(event, on);
  12587. return vm
  12588. };
  12589. Vue.prototype.$off = function (event, fn) {
  12590. var this$1 = this;
  12591. var vm = this;
  12592. // all
  12593. if (!arguments.length) {
  12594. vm._events = Object.create(null);
  12595. return vm
  12596. }
  12597. // array of events
  12598. if (Array.isArray(event)) {
  12599. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  12600. this$1.$off(event[i$1], fn);
  12601. }
  12602. return vm
  12603. }
  12604. // specific event
  12605. var cbs = vm._events[event];
  12606. if (!cbs) {
  12607. return vm
  12608. }
  12609. if (arguments.length === 1) {
  12610. vm._events[event] = null;
  12611. return vm
  12612. }
  12613. // specific handler
  12614. var cb;
  12615. var i = cbs.length;
  12616. while (i--) {
  12617. cb = cbs[i];
  12618. if (cb === fn || cb.fn === fn) {
  12619. cbs.splice(i, 1);
  12620. break
  12621. }
  12622. }
  12623. return vm
  12624. };
  12625. Vue.prototype.$emit = function (event) {
  12626. var vm = this;
  12627. if (process.env.NODE_ENV !== 'production') {
  12628. var lowerCaseEvent = event.toLowerCase();
  12629. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  12630. tip(
  12631. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  12632. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  12633. "Note that HTML attributes are case-insensitive and you cannot use " +
  12634. "v-on to listen to camelCase events when using in-DOM templates. " +
  12635. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  12636. );
  12637. }
  12638. }
  12639. var cbs = vm._events[event];
  12640. if (cbs) {
  12641. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  12642. var args = toArray(arguments, 1);
  12643. for (var i = 0, l = cbs.length; i < l; i++) {
  12644. cbs[i].apply(vm, args);
  12645. }
  12646. }
  12647. return vm
  12648. };
  12649. }
  12650. /* */
  12651. /**
  12652. * Runtime helper for resolving raw children VNodes into a slot object.
  12653. */
  12654. function resolveSlots (
  12655. children,
  12656. context
  12657. ) {
  12658. var slots = {};
  12659. if (!children) {
  12660. return slots
  12661. }
  12662. var defaultSlot = [];
  12663. for (var i = 0, l = children.length; i < l; i++) {
  12664. var child = children[i];
  12665. // named slots should only be respected if the vnode was rendered in the
  12666. // same context.
  12667. if ((child.context === context || child.functionalContext === context) &&
  12668. child.data && child.data.slot != null
  12669. ) {
  12670. var name = child.data.slot;
  12671. var slot = (slots[name] || (slots[name] = []));
  12672. if (child.tag === 'template') {
  12673. slot.push.apply(slot, child.children);
  12674. } else {
  12675. slot.push(child);
  12676. }
  12677. } else {
  12678. defaultSlot.push(child);
  12679. }
  12680. }
  12681. // ignore whitespace
  12682. if (!defaultSlot.every(isWhitespace)) {
  12683. slots.default = defaultSlot;
  12684. }
  12685. return slots
  12686. }
  12687. function isWhitespace (node) {
  12688. return node.isComment || node.text === ' '
  12689. }
  12690. function resolveScopedSlots (
  12691. fns, // see flow/vnode
  12692. res
  12693. ) {
  12694. res = res || {};
  12695. for (var i = 0; i < fns.length; i++) {
  12696. if (Array.isArray(fns[i])) {
  12697. resolveScopedSlots(fns[i], res);
  12698. } else {
  12699. res[fns[i].key] = fns[i].fn;
  12700. }
  12701. }
  12702. return res
  12703. }
  12704. /* */
  12705. var activeInstance = null;
  12706. function initLifecycle (vm) {
  12707. var options = vm.$options;
  12708. // locate first non-abstract parent
  12709. var parent = options.parent;
  12710. if (parent && !options.abstract) {
  12711. while (parent.$options.abstract && parent.$parent) {
  12712. parent = parent.$parent;
  12713. }
  12714. parent.$children.push(vm);
  12715. }
  12716. vm.$parent = parent;
  12717. vm.$root = parent ? parent.$root : vm;
  12718. vm.$children = [];
  12719. vm.$refs = {};
  12720. vm._watcher = null;
  12721. vm._inactive = null;
  12722. vm._directInactive = false;
  12723. vm._isMounted = false;
  12724. vm._isDestroyed = false;
  12725. vm._isBeingDestroyed = false;
  12726. }
  12727. function lifecycleMixin (Vue) {
  12728. Vue.prototype._update = function (vnode, hydrating) {
  12729. var vm = this;
  12730. if (vm._isMounted) {
  12731. callHook(vm, 'beforeUpdate');
  12732. }
  12733. var prevEl = vm.$el;
  12734. var prevVnode = vm._vnode;
  12735. var prevActiveInstance = activeInstance;
  12736. activeInstance = vm;
  12737. vm._vnode = vnode;
  12738. // Vue.prototype.__patch__ is injected in entry points
  12739. // based on the rendering backend used.
  12740. if (!prevVnode) {
  12741. // initial render
  12742. vm.$el = vm.__patch__(
  12743. vm.$el, vnode, hydrating, false /* removeOnly */,
  12744. vm.$options._parentElm,
  12745. vm.$options._refElm
  12746. );
  12747. } else {
  12748. // updates
  12749. vm.$el = vm.__patch__(prevVnode, vnode);
  12750. }
  12751. activeInstance = prevActiveInstance;
  12752. // update __vue__ reference
  12753. if (prevEl) {
  12754. prevEl.__vue__ = null;
  12755. }
  12756. if (vm.$el) {
  12757. vm.$el.__vue__ = vm;
  12758. }
  12759. // if parent is an HOC, update its $el as well
  12760. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  12761. vm.$parent.$el = vm.$el;
  12762. }
  12763. // updated hook is called by the scheduler to ensure that children are
  12764. // updated in a parent's updated hook.
  12765. };
  12766. Vue.prototype.$forceUpdate = function () {
  12767. var vm = this;
  12768. if (vm._watcher) {
  12769. vm._watcher.update();
  12770. }
  12771. };
  12772. Vue.prototype.$destroy = function () {
  12773. var vm = this;
  12774. if (vm._isBeingDestroyed) {
  12775. return
  12776. }
  12777. callHook(vm, 'beforeDestroy');
  12778. vm._isBeingDestroyed = true;
  12779. // remove self from parent
  12780. var parent = vm.$parent;
  12781. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  12782. remove(parent.$children, vm);
  12783. }
  12784. // teardown watchers
  12785. if (vm._watcher) {
  12786. vm._watcher.teardown();
  12787. }
  12788. var i = vm._watchers.length;
  12789. while (i--) {
  12790. vm._watchers[i].teardown();
  12791. }
  12792. // remove reference from data ob
  12793. // frozen object may not have observer.
  12794. if (vm._data.__ob__) {
  12795. vm._data.__ob__.vmCount--;
  12796. }
  12797. // call the last hook...
  12798. vm._isDestroyed = true;
  12799. // invoke destroy hooks on current rendered tree
  12800. vm.__patch__(vm._vnode, null);
  12801. // fire destroyed hook
  12802. callHook(vm, 'destroyed');
  12803. // turn off all instance listeners.
  12804. vm.$off();
  12805. // remove __vue__ reference
  12806. if (vm.$el) {
  12807. vm.$el.__vue__ = null;
  12808. }
  12809. // remove reference to DOM nodes (prevents leak)
  12810. vm.$options._parentElm = vm.$options._refElm = null;
  12811. };
  12812. }
  12813. function mountComponent (
  12814. vm,
  12815. el,
  12816. hydrating
  12817. ) {
  12818. vm.$el = el;
  12819. if (!vm.$options.render) {
  12820. vm.$options.render = createEmptyVNode;
  12821. if (process.env.NODE_ENV !== 'production') {
  12822. /* istanbul ignore if */
  12823. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  12824. vm.$options.el || el) {
  12825. warn(
  12826. 'You are using the runtime-only build of Vue where the template ' +
  12827. 'compiler is not available. Either pre-compile the templates into ' +
  12828. 'render functions, or use the compiler-included build.',
  12829. vm
  12830. );
  12831. } else {
  12832. warn(
  12833. 'Failed to mount component: template or render function not defined.',
  12834. vm
  12835. );
  12836. }
  12837. }
  12838. }
  12839. callHook(vm, 'beforeMount');
  12840. var updateComponent;
  12841. /* istanbul ignore if */
  12842. if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
  12843. updateComponent = function () {
  12844. var name = vm._name;
  12845. var id = vm._uid;
  12846. var startTag = "vue-perf-start:" + id;
  12847. var endTag = "vue-perf-end:" + id;
  12848. mark(startTag);
  12849. var vnode = vm._render();
  12850. mark(endTag);
  12851. measure((name + " render"), startTag, endTag);
  12852. mark(startTag);
  12853. vm._update(vnode, hydrating);
  12854. mark(endTag);
  12855. measure((name + " patch"), startTag, endTag);
  12856. };
  12857. } else {
  12858. updateComponent = function () {
  12859. vm._update(vm._render(), hydrating);
  12860. };
  12861. }
  12862. vm._watcher = new Watcher(vm, updateComponent, noop);
  12863. hydrating = false;
  12864. // manually mounted instance, call mounted on self
  12865. // mounted is called for render-created child components in its inserted hook
  12866. if (vm.$vnode == null) {
  12867. vm._isMounted = true;
  12868. callHook(vm, 'mounted');
  12869. }
  12870. return vm
  12871. }
  12872. function updateChildComponent (
  12873. vm,
  12874. propsData,
  12875. listeners,
  12876. parentVnode,
  12877. renderChildren
  12878. ) {
  12879. // determine whether component has slot children
  12880. // we need to do this before overwriting $options._renderChildren
  12881. var hasChildren = !!(
  12882. renderChildren || // has new static slots
  12883. vm.$options._renderChildren || // has old static slots
  12884. parentVnode.data.scopedSlots || // has new scoped slots
  12885. vm.$scopedSlots !== emptyObject // has old scoped slots
  12886. );
  12887. vm.$options._parentVnode = parentVnode;
  12888. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  12889. if (vm._vnode) { // update child tree's parent
  12890. vm._vnode.parent = parentVnode;
  12891. }
  12892. vm.$options._renderChildren = renderChildren;
  12893. // update props
  12894. if (propsData && vm.$options.props) {
  12895. observerState.shouldConvert = false;
  12896. if (process.env.NODE_ENV !== 'production') {
  12897. observerState.isSettingProps = true;
  12898. }
  12899. var props = vm._props;
  12900. var propKeys = vm.$options._propKeys || [];
  12901. for (var i = 0; i < propKeys.length; i++) {
  12902. var key = propKeys[i];
  12903. props[key] = validateProp(key, vm.$options.props, propsData, vm);
  12904. }
  12905. observerState.shouldConvert = true;
  12906. if (process.env.NODE_ENV !== 'production') {
  12907. observerState.isSettingProps = false;
  12908. }
  12909. // keep a copy of raw propsData
  12910. vm.$options.propsData = propsData;
  12911. }
  12912. // update listeners
  12913. if (listeners) {
  12914. var oldListeners = vm.$options._parentListeners;
  12915. vm.$options._parentListeners = listeners;
  12916. updateComponentListeners(vm, listeners, oldListeners);
  12917. }
  12918. // resolve slots + force update if has children
  12919. if (hasChildren) {
  12920. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  12921. vm.$forceUpdate();
  12922. }
  12923. }
  12924. function isInInactiveTree (vm) {
  12925. while (vm && (vm = vm.$parent)) {
  12926. if (vm._inactive) { return true }
  12927. }
  12928. return false
  12929. }
  12930. function activateChildComponent (vm, direct) {
  12931. if (direct) {
  12932. vm._directInactive = false;
  12933. if (isInInactiveTree(vm)) {
  12934. return
  12935. }
  12936. } else if (vm._directInactive) {
  12937. return
  12938. }
  12939. if (vm._inactive || vm._inactive === null) {
  12940. vm._inactive = false;
  12941. for (var i = 0; i < vm.$children.length; i++) {
  12942. activateChildComponent(vm.$children[i]);
  12943. }
  12944. callHook(vm, 'activated');
  12945. }
  12946. }
  12947. function deactivateChildComponent (vm, direct) {
  12948. if (direct) {
  12949. vm._directInactive = true;
  12950. if (isInInactiveTree(vm)) {
  12951. return
  12952. }
  12953. }
  12954. if (!vm._inactive) {
  12955. vm._inactive = true;
  12956. for (var i = 0; i < vm.$children.length; i++) {
  12957. deactivateChildComponent(vm.$children[i]);
  12958. }
  12959. callHook(vm, 'deactivated');
  12960. }
  12961. }
  12962. function callHook (vm, hook) {
  12963. var handlers = vm.$options[hook];
  12964. if (handlers) {
  12965. for (var i = 0, j = handlers.length; i < j; i++) {
  12966. try {
  12967. handlers[i].call(vm);
  12968. } catch (e) {
  12969. handleError(e, vm, (hook + " hook"));
  12970. }
  12971. }
  12972. }
  12973. if (vm._hasHookEvent) {
  12974. vm.$emit('hook:' + hook);
  12975. }
  12976. }
  12977. /* */
  12978. var MAX_UPDATE_COUNT = 100;
  12979. var queue = [];
  12980. var activatedChildren = [];
  12981. var has = {};
  12982. var circular = {};
  12983. var waiting = false;
  12984. var flushing = false;
  12985. var index = 0;
  12986. /**
  12987. * Reset the scheduler's state.
  12988. */
  12989. function resetSchedulerState () {
  12990. index = queue.length = activatedChildren.length = 0;
  12991. has = {};
  12992. if (process.env.NODE_ENV !== 'production') {
  12993. circular = {};
  12994. }
  12995. waiting = flushing = false;
  12996. }
  12997. /**
  12998. * Flush both queues and run the watchers.
  12999. */
  13000. function flushSchedulerQueue () {
  13001. flushing = true;
  13002. var watcher, id;
  13003. // Sort queue before flush.
  13004. // This ensures that:
  13005. // 1. Components are updated from parent to child. (because parent is always
  13006. // created before the child)
  13007. // 2. A component's user watchers are run before its render watcher (because
  13008. // user watchers are created before the render watcher)
  13009. // 3. If a component is destroyed during a parent component's watcher run,
  13010. // its watchers can be skipped.
  13011. queue.sort(function (a, b) { return a.id - b.id; });
  13012. // do not cache length because more watchers might be pushed
  13013. // as we run existing watchers
  13014. for (index = 0; index < queue.length; index++) {
  13015. watcher = queue[index];
  13016. id = watcher.id;
  13017. has[id] = null;
  13018. watcher.run();
  13019. // in dev build, check and stop circular updates.
  13020. if (process.env.NODE_ENV !== 'production' && has[id] != null) {
  13021. circular[id] = (circular[id] || 0) + 1;
  13022. if (circular[id] > MAX_UPDATE_COUNT) {
  13023. warn(
  13024. 'You may have an infinite update loop ' + (
  13025. watcher.user
  13026. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  13027. : "in a component render function."
  13028. ),
  13029. watcher.vm
  13030. );
  13031. break
  13032. }
  13033. }
  13034. }
  13035. // keep copies of post queues before resetting state
  13036. var activatedQueue = activatedChildren.slice();
  13037. var updatedQueue = queue.slice();
  13038. resetSchedulerState();
  13039. // call component updated and activated hooks
  13040. callActivatedHooks(activatedQueue);
  13041. callUpdateHooks(updatedQueue);
  13042. // devtool hook
  13043. /* istanbul ignore if */
  13044. if (devtools && config.devtools) {
  13045. devtools.emit('flush');
  13046. }
  13047. }
  13048. function callUpdateHooks (queue) {
  13049. var i = queue.length;
  13050. while (i--) {
  13051. var watcher = queue[i];
  13052. var vm = watcher.vm;
  13053. if (vm._watcher === watcher && vm._isMounted) {
  13054. callHook(vm, 'updated');
  13055. }
  13056. }
  13057. }
  13058. /**
  13059. * Queue a kept-alive component that was activated during patch.
  13060. * The queue will be processed after the entire tree has been patched.
  13061. */
  13062. function queueActivatedComponent (vm) {
  13063. // setting _inactive to false here so that a render function can
  13064. // rely on checking whether it's in an inactive tree (e.g. router-view)
  13065. vm._inactive = false;
  13066. activatedChildren.push(vm);
  13067. }
  13068. function callActivatedHooks (queue) {
  13069. for (var i = 0; i < queue.length; i++) {
  13070. queue[i]._inactive = true;
  13071. activateChildComponent(queue[i], true /* true */);
  13072. }
  13073. }
  13074. /**
  13075. * Push a watcher into the watcher queue.
  13076. * Jobs with duplicate IDs will be skipped unless it's
  13077. * pushed when the queue is being flushed.
  13078. */
  13079. function queueWatcher (watcher) {
  13080. var id = watcher.id;
  13081. if (has[id] == null) {
  13082. has[id] = true;
  13083. if (!flushing) {
  13084. queue.push(watcher);
  13085. } else {
  13086. // if already flushing, splice the watcher based on its id
  13087. // if already past its id, it will be run next immediately.
  13088. var i = queue.length - 1;
  13089. while (i > index && queue[i].id > watcher.id) {
  13090. i--;
  13091. }
  13092. queue.splice(i + 1, 0, watcher);
  13093. }
  13094. // queue the flush
  13095. if (!waiting) {
  13096. waiting = true;
  13097. nextTick(flushSchedulerQueue);
  13098. }
  13099. }
  13100. }
  13101. /* */
  13102. var uid$2 = 0;
  13103. /**
  13104. * A watcher parses an expression, collects dependencies,
  13105. * and fires callback when the expression value changes.
  13106. * This is used for both the $watch() api and directives.
  13107. */
  13108. var Watcher = function Watcher (
  13109. vm,
  13110. expOrFn,
  13111. cb,
  13112. options
  13113. ) {
  13114. this.vm = vm;
  13115. vm._watchers.push(this);
  13116. // options
  13117. if (options) {
  13118. this.deep = !!options.deep;
  13119. this.user = !!options.user;
  13120. this.lazy = !!options.lazy;
  13121. this.sync = !!options.sync;
  13122. } else {
  13123. this.deep = this.user = this.lazy = this.sync = false;
  13124. }
  13125. this.cb = cb;
  13126. this.id = ++uid$2; // uid for batching
  13127. this.active = true;
  13128. this.dirty = this.lazy; // for lazy watchers
  13129. this.deps = [];
  13130. this.newDeps = [];
  13131. this.depIds = new _Set();
  13132. this.newDepIds = new _Set();
  13133. this.expression = process.env.NODE_ENV !== 'production'
  13134. ? expOrFn.toString()
  13135. : '';
  13136. // parse expression for getter
  13137. if (typeof expOrFn === 'function') {
  13138. this.getter = expOrFn;
  13139. } else {
  13140. this.getter = parsePath(expOrFn);
  13141. if (!this.getter) {
  13142. this.getter = function () {};
  13143. process.env.NODE_ENV !== 'production' && warn(
  13144. "Failed watching path: \"" + expOrFn + "\" " +
  13145. 'Watcher only accepts simple dot-delimited paths. ' +
  13146. 'For full control, use a function instead.',
  13147. vm
  13148. );
  13149. }
  13150. }
  13151. this.value = this.lazy
  13152. ? undefined
  13153. : this.get();
  13154. };
  13155. /**
  13156. * Evaluate the getter, and re-collect dependencies.
  13157. */
  13158. Watcher.prototype.get = function get () {
  13159. pushTarget(this);
  13160. var value;
  13161. var vm = this.vm;
  13162. if (this.user) {
  13163. try {
  13164. value = this.getter.call(vm, vm);
  13165. } catch (e) {
  13166. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  13167. }
  13168. } else {
  13169. value = this.getter.call(vm, vm);
  13170. }
  13171. // "touch" every property so they are all tracked as
  13172. // dependencies for deep watching
  13173. if (this.deep) {
  13174. traverse(value);
  13175. }
  13176. popTarget();
  13177. this.cleanupDeps();
  13178. return value
  13179. };
  13180. /**
  13181. * Add a dependency to this directive.
  13182. */
  13183. Watcher.prototype.addDep = function addDep (dep) {
  13184. var id = dep.id;
  13185. if (!this.newDepIds.has(id)) {
  13186. this.newDepIds.add(id);
  13187. this.newDeps.push(dep);
  13188. if (!this.depIds.has(id)) {
  13189. dep.addSub(this);
  13190. }
  13191. }
  13192. };
  13193. /**
  13194. * Clean up for dependency collection.
  13195. */
  13196. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  13197. var this$1 = this;
  13198. var i = this.deps.length;
  13199. while (i--) {
  13200. var dep = this$1.deps[i];
  13201. if (!this$1.newDepIds.has(dep.id)) {
  13202. dep.removeSub(this$1);
  13203. }
  13204. }
  13205. var tmp = this.depIds;
  13206. this.depIds = this.newDepIds;
  13207. this.newDepIds = tmp;
  13208. this.newDepIds.clear();
  13209. tmp = this.deps;
  13210. this.deps = this.newDeps;
  13211. this.newDeps = tmp;
  13212. this.newDeps.length = 0;
  13213. };
  13214. /**
  13215. * Subscriber interface.
  13216. * Will be called when a dependency changes.
  13217. */
  13218. Watcher.prototype.update = function update () {
  13219. /* istanbul ignore else */
  13220. if (this.lazy) {
  13221. this.dirty = true;
  13222. } else if (this.sync) {
  13223. this.run();
  13224. } else {
  13225. queueWatcher(this);
  13226. }
  13227. };
  13228. /**
  13229. * Scheduler job interface.
  13230. * Will be called by the scheduler.
  13231. */
  13232. Watcher.prototype.run = function run () {
  13233. if (this.active) {
  13234. var value = this.get();
  13235. if (
  13236. value !== this.value ||
  13237. // Deep watchers and watchers on Object/Arrays should fire even
  13238. // when the value is the same, because the value may
  13239. // have mutated.
  13240. isObject(value) ||
  13241. this.deep
  13242. ) {
  13243. // set new value
  13244. var oldValue = this.value;
  13245. this.value = value;
  13246. if (this.user) {
  13247. try {
  13248. this.cb.call(this.vm, value, oldValue);
  13249. } catch (e) {
  13250. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  13251. }
  13252. } else {
  13253. this.cb.call(this.vm, value, oldValue);
  13254. }
  13255. }
  13256. }
  13257. };
  13258. /**
  13259. * Evaluate the value of the watcher.
  13260. * This only gets called for lazy watchers.
  13261. */
  13262. Watcher.prototype.evaluate = function evaluate () {
  13263. this.value = this.get();
  13264. this.dirty = false;
  13265. };
  13266. /**
  13267. * Depend on all deps collected by this watcher.
  13268. */
  13269. Watcher.prototype.depend = function depend () {
  13270. var this$1 = this;
  13271. var i = this.deps.length;
  13272. while (i--) {
  13273. this$1.deps[i].depend();
  13274. }
  13275. };
  13276. /**
  13277. * Remove self from all dependencies' subscriber list.
  13278. */
  13279. Watcher.prototype.teardown = function teardown () {
  13280. var this$1 = this;
  13281. if (this.active) {
  13282. // remove self from vm's watcher list
  13283. // this is a somewhat expensive operation so we skip it
  13284. // if the vm is being destroyed.
  13285. if (!this.vm._isBeingDestroyed) {
  13286. remove(this.vm._watchers, this);
  13287. }
  13288. var i = this.deps.length;
  13289. while (i--) {
  13290. this$1.deps[i].removeSub(this$1);
  13291. }
  13292. this.active = false;
  13293. }
  13294. };
  13295. /**
  13296. * Recursively traverse an object to evoke all converted
  13297. * getters, so that every nested property inside the object
  13298. * is collected as a "deep" dependency.
  13299. */
  13300. var seenObjects = new _Set();
  13301. function traverse (val) {
  13302. seenObjects.clear();
  13303. _traverse(val, seenObjects);
  13304. }
  13305. function _traverse (val, seen) {
  13306. var i, keys;
  13307. var isA = Array.isArray(val);
  13308. if ((!isA && !isObject(val)) || !Object.isExtensible(val)) {
  13309. return
  13310. }
  13311. if (val.__ob__) {
  13312. var depId = val.__ob__.dep.id;
  13313. if (seen.has(depId)) {
  13314. return
  13315. }
  13316. seen.add(depId);
  13317. }
  13318. if (isA) {
  13319. i = val.length;
  13320. while (i--) { _traverse(val[i], seen); }
  13321. } else {
  13322. keys = Object.keys(val);
  13323. i = keys.length;
  13324. while (i--) { _traverse(val[keys[i]], seen); }
  13325. }
  13326. }
  13327. /* */
  13328. var sharedPropertyDefinition = {
  13329. enumerable: true,
  13330. configurable: true,
  13331. get: noop,
  13332. set: noop
  13333. };
  13334. function proxy (target, sourceKey, key) {
  13335. sharedPropertyDefinition.get = function proxyGetter () {
  13336. return this[sourceKey][key]
  13337. };
  13338. sharedPropertyDefinition.set = function proxySetter (val) {
  13339. this[sourceKey][key] = val;
  13340. };
  13341. Object.defineProperty(target, key, sharedPropertyDefinition);
  13342. }
  13343. function initState (vm) {
  13344. vm._watchers = [];
  13345. var opts = vm.$options;
  13346. if (opts.props) { initProps(vm, opts.props); }
  13347. if (opts.methods) { initMethods(vm, opts.methods); }
  13348. if (opts.data) {
  13349. initData(vm);
  13350. } else {
  13351. observe(vm._data = {}, true /* asRootData */);
  13352. }
  13353. if (opts.computed) { initComputed(vm, opts.computed); }
  13354. if (opts.watch) { initWatch(vm, opts.watch); }
  13355. }
  13356. var isReservedProp = {
  13357. key: 1,
  13358. ref: 1,
  13359. slot: 1
  13360. };
  13361. function initProps (vm, propsOptions) {
  13362. var propsData = vm.$options.propsData || {};
  13363. var props = vm._props = {};
  13364. // cache prop keys so that future props updates can iterate using Array
  13365. // instead of dynamic object key enumeration.
  13366. var keys = vm.$options._propKeys = [];
  13367. var isRoot = !vm.$parent;
  13368. // root instance props should be converted
  13369. observerState.shouldConvert = isRoot;
  13370. var loop = function ( key ) {
  13371. keys.push(key);
  13372. var value = validateProp(key, propsOptions, propsData, vm);
  13373. /* istanbul ignore else */
  13374. if (process.env.NODE_ENV !== 'production') {
  13375. if (isReservedProp[key] || config.isReservedAttr(key)) {
  13376. warn(
  13377. ("\"" + key + "\" is a reserved attribute and cannot be used as component prop."),
  13378. vm
  13379. );
  13380. }
  13381. defineReactive$$1(props, key, value, function () {
  13382. if (vm.$parent && !observerState.isSettingProps) {
  13383. warn(
  13384. "Avoid mutating a prop directly since the value will be " +
  13385. "overwritten whenever the parent component re-renders. " +
  13386. "Instead, use a data or computed property based on the prop's " +
  13387. "value. Prop being mutated: \"" + key + "\"",
  13388. vm
  13389. );
  13390. }
  13391. });
  13392. } else {
  13393. defineReactive$$1(props, key, value);
  13394. }
  13395. // static props are already proxied on the component's prototype
  13396. // during Vue.extend(). We only need to proxy props defined at
  13397. // instantiation here.
  13398. if (!(key in vm)) {
  13399. proxy(vm, "_props", key);
  13400. }
  13401. };
  13402. for (var key in propsOptions) loop( key );
  13403. observerState.shouldConvert = true;
  13404. }
  13405. function initData (vm) {
  13406. var data = vm.$options.data;
  13407. data = vm._data = typeof data === 'function'
  13408. ? getData(data, vm)
  13409. : data || {};
  13410. if (!isPlainObject(data)) {
  13411. data = {};
  13412. process.env.NODE_ENV !== 'production' && warn(
  13413. 'data functions should return an object:\n' +
  13414. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  13415. vm
  13416. );
  13417. }
  13418. // proxy data on instance
  13419. var keys = Object.keys(data);
  13420. var props = vm.$options.props;
  13421. var i = keys.length;
  13422. while (i--) {
  13423. if (props && hasOwn(props, keys[i])) {
  13424. process.env.NODE_ENV !== 'production' && warn(
  13425. "The data property \"" + (keys[i]) + "\" is already declared as a prop. " +
  13426. "Use prop default value instead.",
  13427. vm
  13428. );
  13429. } else if (!isReserved(keys[i])) {
  13430. proxy(vm, "_data", keys[i]);
  13431. }
  13432. }
  13433. // observe data
  13434. observe(data, true /* asRootData */);
  13435. }
  13436. function getData (data, vm) {
  13437. try {
  13438. return data.call(vm)
  13439. } catch (e) {
  13440. handleError(e, vm, "data()");
  13441. return {}
  13442. }
  13443. }
  13444. var computedWatcherOptions = { lazy: true };
  13445. function initComputed (vm, computed) {
  13446. var watchers = vm._computedWatchers = Object.create(null);
  13447. for (var key in computed) {
  13448. var userDef = computed[key];
  13449. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  13450. if (process.env.NODE_ENV !== 'production') {
  13451. if (getter === undefined) {
  13452. warn(
  13453. ("No getter function has been defined for computed property \"" + key + "\"."),
  13454. vm
  13455. );
  13456. getter = noop;
  13457. }
  13458. }
  13459. // create internal watcher for the computed property.
  13460. watchers[key] = new Watcher(vm, getter, noop, computedWatcherOptions);
  13461. // component-defined computed properties are already defined on the
  13462. // component prototype. We only need to define computed properties defined
  13463. // at instantiation here.
  13464. if (!(key in vm)) {
  13465. defineComputed(vm, key, userDef);
  13466. } else if (process.env.NODE_ENV !== 'production') {
  13467. if (key in vm.$data) {
  13468. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  13469. } else if (vm.$options.props && key in vm.$options.props) {
  13470. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  13471. }
  13472. }
  13473. }
  13474. }
  13475. function defineComputed (target, key, userDef) {
  13476. if (typeof userDef === 'function') {
  13477. sharedPropertyDefinition.get = createComputedGetter(key);
  13478. sharedPropertyDefinition.set = noop;
  13479. } else {
  13480. sharedPropertyDefinition.get = userDef.get
  13481. ? userDef.cache !== false
  13482. ? createComputedGetter(key)
  13483. : userDef.get
  13484. : noop;
  13485. sharedPropertyDefinition.set = userDef.set
  13486. ? userDef.set
  13487. : noop;
  13488. }
  13489. Object.defineProperty(target, key, sharedPropertyDefinition);
  13490. }
  13491. function createComputedGetter (key) {
  13492. return function computedGetter () {
  13493. var watcher = this._computedWatchers && this._computedWatchers[key];
  13494. if (watcher) {
  13495. if (watcher.dirty) {
  13496. watcher.evaluate();
  13497. }
  13498. if (Dep.target) {
  13499. watcher.depend();
  13500. }
  13501. return watcher.value
  13502. }
  13503. }
  13504. }
  13505. function initMethods (vm, methods) {
  13506. var props = vm.$options.props;
  13507. for (var key in methods) {
  13508. vm[key] = methods[key] == null ? noop : bind(methods[key], vm);
  13509. if (process.env.NODE_ENV !== 'production') {
  13510. if (methods[key] == null) {
  13511. warn(
  13512. "method \"" + key + "\" has an undefined value in the component definition. " +
  13513. "Did you reference the function correctly?",
  13514. vm
  13515. );
  13516. }
  13517. if (props && hasOwn(props, key)) {
  13518. warn(
  13519. ("method \"" + key + "\" has already been defined as a prop."),
  13520. vm
  13521. );
  13522. }
  13523. }
  13524. }
  13525. }
  13526. function initWatch (vm, watch) {
  13527. for (var key in watch) {
  13528. var handler = watch[key];
  13529. if (Array.isArray(handler)) {
  13530. for (var i = 0; i < handler.length; i++) {
  13531. createWatcher(vm, key, handler[i]);
  13532. }
  13533. } else {
  13534. createWatcher(vm, key, handler);
  13535. }
  13536. }
  13537. }
  13538. function createWatcher (vm, key, handler) {
  13539. var options;
  13540. if (isPlainObject(handler)) {
  13541. options = handler;
  13542. handler = handler.handler;
  13543. }
  13544. if (typeof handler === 'string') {
  13545. handler = vm[handler];
  13546. }
  13547. vm.$watch(key, handler, options);
  13548. }
  13549. function stateMixin (Vue) {
  13550. // flow somehow has problems with directly declared definition object
  13551. // when using Object.defineProperty, so we have to procedurally build up
  13552. // the object here.
  13553. var dataDef = {};
  13554. dataDef.get = function () { return this._data };
  13555. var propsDef = {};
  13556. propsDef.get = function () { return this._props };
  13557. if (process.env.NODE_ENV !== 'production') {
  13558. dataDef.set = function (newData) {
  13559. warn(
  13560. 'Avoid replacing instance root $data. ' +
  13561. 'Use nested data properties instead.',
  13562. this
  13563. );
  13564. };
  13565. propsDef.set = function () {
  13566. warn("$props is readonly.", this);
  13567. };
  13568. }
  13569. Object.defineProperty(Vue.prototype, '$data', dataDef);
  13570. Object.defineProperty(Vue.prototype, '$props', propsDef);
  13571. Vue.prototype.$set = set;
  13572. Vue.prototype.$delete = del;
  13573. Vue.prototype.$watch = function (
  13574. expOrFn,
  13575. cb,
  13576. options
  13577. ) {
  13578. var vm = this;
  13579. options = options || {};
  13580. options.user = true;
  13581. var watcher = new Watcher(vm, expOrFn, cb, options);
  13582. if (options.immediate) {
  13583. cb.call(vm, watcher.value);
  13584. }
  13585. return function unwatchFn () {
  13586. watcher.teardown();
  13587. }
  13588. };
  13589. }
  13590. /* */
  13591. function initProvide (vm) {
  13592. var provide = vm.$options.provide;
  13593. if (provide) {
  13594. vm._provided = typeof provide === 'function'
  13595. ? provide.call(vm)
  13596. : provide;
  13597. }
  13598. }
  13599. function initInjections (vm) {
  13600. var result = resolveInject(vm.$options.inject, vm);
  13601. if (result) {
  13602. Object.keys(result).forEach(function (key) {
  13603. /* istanbul ignore else */
  13604. if (process.env.NODE_ENV !== 'production') {
  13605. defineReactive$$1(vm, key, result[key], function () {
  13606. warn(
  13607. "Avoid mutating an injected value directly since the changes will be " +
  13608. "overwritten whenever the provided component re-renders. " +
  13609. "injection being mutated: \"" + key + "\"",
  13610. vm
  13611. );
  13612. });
  13613. } else {
  13614. defineReactive$$1(vm, key, result[key]);
  13615. }
  13616. });
  13617. }
  13618. }
  13619. function resolveInject (inject, vm) {
  13620. if (inject) {
  13621. // inject is :any because flow is not smart enough to figure out cached
  13622. // isArray here
  13623. var isArray = Array.isArray(inject);
  13624. var result = Object.create(null);
  13625. var keys = isArray
  13626. ? inject
  13627. : hasSymbol
  13628. ? Reflect.ownKeys(inject)
  13629. : Object.keys(inject);
  13630. for (var i = 0; i < keys.length; i++) {
  13631. var key = keys[i];
  13632. var provideKey = isArray ? key : inject[key];
  13633. var source = vm;
  13634. while (source) {
  13635. if (source._provided && provideKey in source._provided) {
  13636. result[key] = source._provided[provideKey];
  13637. break
  13638. }
  13639. source = source.$parent;
  13640. }
  13641. }
  13642. return result
  13643. }
  13644. }
  13645. /* */
  13646. function createFunctionalComponent (
  13647. Ctor,
  13648. propsData,
  13649. data,
  13650. context,
  13651. children
  13652. ) {
  13653. var props = {};
  13654. var propOptions = Ctor.options.props;
  13655. if (isDef(propOptions)) {
  13656. for (var key in propOptions) {
  13657. props[key] = validateProp(key, propOptions, propsData || {});
  13658. }
  13659. } else {
  13660. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  13661. if (isDef(data.props)) { mergeProps(props, data.props); }
  13662. }
  13663. // ensure the createElement function in functional components
  13664. // gets a unique context - this is necessary for correct named slot check
  13665. var _context = Object.create(context);
  13666. var h = function (a, b, c, d) { return createElement(_context, a, b, c, d, true); };
  13667. var vnode = Ctor.options.render.call(null, h, {
  13668. data: data,
  13669. props: props,
  13670. children: children,
  13671. parent: context,
  13672. listeners: data.on || {},
  13673. injections: resolveInject(Ctor.options.inject, context),
  13674. slots: function () { return resolveSlots(children, context); }
  13675. });
  13676. if (vnode instanceof VNode) {
  13677. vnode.functionalContext = context;
  13678. vnode.functionalOptions = Ctor.options;
  13679. if (data.slot) {
  13680. (vnode.data || (vnode.data = {})).slot = data.slot;
  13681. }
  13682. }
  13683. return vnode
  13684. }
  13685. function mergeProps (to, from) {
  13686. for (var key in from) {
  13687. to[camelize(key)] = from[key];
  13688. }
  13689. }
  13690. /* */
  13691. // hooks to be invoked on component VNodes during patch
  13692. var componentVNodeHooks = {
  13693. init: function init (
  13694. vnode,
  13695. hydrating,
  13696. parentElm,
  13697. refElm
  13698. ) {
  13699. if (!vnode.componentInstance || vnode.componentInstance._isDestroyed) {
  13700. var child = vnode.componentInstance = createComponentInstanceForVnode(
  13701. vnode,
  13702. activeInstance,
  13703. parentElm,
  13704. refElm
  13705. );
  13706. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  13707. } else if (vnode.data.keepAlive) {
  13708. // kept-alive components, treat as a patch
  13709. var mountedNode = vnode; // work around flow
  13710. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  13711. }
  13712. },
  13713. prepatch: function prepatch (oldVnode, vnode) {
  13714. var options = vnode.componentOptions;
  13715. var child = vnode.componentInstance = oldVnode.componentInstance;
  13716. updateChildComponent(
  13717. child,
  13718. options.propsData, // updated props
  13719. options.listeners, // updated listeners
  13720. vnode, // new parent vnode
  13721. options.children // new children
  13722. );
  13723. },
  13724. insert: function insert (vnode) {
  13725. var context = vnode.context;
  13726. var componentInstance = vnode.componentInstance;
  13727. if (!componentInstance._isMounted) {
  13728. componentInstance._isMounted = true;
  13729. callHook(componentInstance, 'mounted');
  13730. }
  13731. if (vnode.data.keepAlive) {
  13732. if (context._isMounted) {
  13733. // vue-router#1212
  13734. // During updates, a kept-alive component's child components may
  13735. // change, so directly walking the tree here may call activated hooks
  13736. // on incorrect children. Instead we push them into a queue which will
  13737. // be processed after the whole patch process ended.
  13738. queueActivatedComponent(componentInstance);
  13739. } else {
  13740. activateChildComponent(componentInstance, true /* direct */);
  13741. }
  13742. }
  13743. },
  13744. destroy: function destroy (vnode) {
  13745. var componentInstance = vnode.componentInstance;
  13746. if (!componentInstance._isDestroyed) {
  13747. if (!vnode.data.keepAlive) {
  13748. componentInstance.$destroy();
  13749. } else {
  13750. deactivateChildComponent(componentInstance, true /* direct */);
  13751. }
  13752. }
  13753. }
  13754. };
  13755. var hooksToMerge = Object.keys(componentVNodeHooks);
  13756. function createComponent (
  13757. Ctor,
  13758. data,
  13759. context,
  13760. children,
  13761. tag
  13762. ) {
  13763. if (isUndef(Ctor)) {
  13764. return
  13765. }
  13766. var baseCtor = context.$options._base;
  13767. // plain options object: turn it into a constructor
  13768. if (isObject(Ctor)) {
  13769. Ctor = baseCtor.extend(Ctor);
  13770. }
  13771. // if at this stage it's not a constructor or an async component factory,
  13772. // reject.
  13773. if (typeof Ctor !== 'function') {
  13774. if (process.env.NODE_ENV !== 'production') {
  13775. warn(("Invalid Component definition: " + (String(Ctor))), context);
  13776. }
  13777. return
  13778. }
  13779. // async component
  13780. if (isUndef(Ctor.cid)) {
  13781. Ctor = resolveAsyncComponent(Ctor, baseCtor, context);
  13782. if (Ctor === undefined) {
  13783. // return nothing if this is indeed an async component
  13784. // wait for the callback to trigger parent update.
  13785. return
  13786. }
  13787. }
  13788. // resolve constructor options in case global mixins are applied after
  13789. // component constructor creation
  13790. resolveConstructorOptions(Ctor);
  13791. data = data || {};
  13792. // transform component v-model data into props & events
  13793. if (isDef(data.model)) {
  13794. transformModel(Ctor.options, data);
  13795. }
  13796. // extract props
  13797. var propsData = extractPropsFromVNodeData(data, Ctor, tag);
  13798. // functional component
  13799. if (isTrue(Ctor.options.functional)) {
  13800. return createFunctionalComponent(Ctor, propsData, data, context, children)
  13801. }
  13802. // extract listeners, since these needs to be treated as
  13803. // child component listeners instead of DOM listeners
  13804. var listeners = data.on;
  13805. // replace with listeners with .native modifier
  13806. data.on = data.nativeOn;
  13807. if (isTrue(Ctor.options.abstract)) {
  13808. // abstract components do not keep anything
  13809. // other than props & listeners
  13810. data = {};
  13811. }
  13812. // merge component management hooks onto the placeholder node
  13813. mergeHooks(data);
  13814. // return a placeholder vnode
  13815. var name = Ctor.options.name || tag;
  13816. var vnode = new VNode(
  13817. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  13818. data, undefined, undefined, undefined, context,
  13819. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }
  13820. );
  13821. return vnode
  13822. }
  13823. function createComponentInstanceForVnode (
  13824. vnode, // we know it's MountedComponentVNode but flow doesn't
  13825. parent, // activeInstance in lifecycle state
  13826. parentElm,
  13827. refElm
  13828. ) {
  13829. var vnodeComponentOptions = vnode.componentOptions;
  13830. var options = {
  13831. _isComponent: true,
  13832. parent: parent,
  13833. propsData: vnodeComponentOptions.propsData,
  13834. _componentTag: vnodeComponentOptions.tag,
  13835. _parentVnode: vnode,
  13836. _parentListeners: vnodeComponentOptions.listeners,
  13837. _renderChildren: vnodeComponentOptions.children,
  13838. _parentElm: parentElm || null,
  13839. _refElm: refElm || null
  13840. };
  13841. // check inline-template render functions
  13842. var inlineTemplate = vnode.data.inlineTemplate;
  13843. if (isDef(inlineTemplate)) {
  13844. options.render = inlineTemplate.render;
  13845. options.staticRenderFns = inlineTemplate.staticRenderFns;
  13846. }
  13847. return new vnodeComponentOptions.Ctor(options)
  13848. }
  13849. function mergeHooks (data) {
  13850. if (!data.hook) {
  13851. data.hook = {};
  13852. }
  13853. for (var i = 0; i < hooksToMerge.length; i++) {
  13854. var key = hooksToMerge[i];
  13855. var fromParent = data.hook[key];
  13856. var ours = componentVNodeHooks[key];
  13857. data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;
  13858. }
  13859. }
  13860. function mergeHook$1 (one, two) {
  13861. return function (a, b, c, d) {
  13862. one(a, b, c, d);
  13863. two(a, b, c, d);
  13864. }
  13865. }
  13866. // transform component v-model info (value and callback) into
  13867. // prop and event handler respectively.
  13868. function transformModel (options, data) {
  13869. var prop = (options.model && options.model.prop) || 'value';
  13870. var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;
  13871. var on = data.on || (data.on = {});
  13872. if (isDef(on[event])) {
  13873. on[event] = [data.model.callback].concat(on[event]);
  13874. } else {
  13875. on[event] = data.model.callback;
  13876. }
  13877. }
  13878. /* */
  13879. var SIMPLE_NORMALIZE = 1;
  13880. var ALWAYS_NORMALIZE = 2;
  13881. // wrapper function for providing a more flexible interface
  13882. // without getting yelled at by flow
  13883. function createElement (
  13884. context,
  13885. tag,
  13886. data,
  13887. children,
  13888. normalizationType,
  13889. alwaysNormalize
  13890. ) {
  13891. if (Array.isArray(data) || isPrimitive(data)) {
  13892. normalizationType = children;
  13893. children = data;
  13894. data = undefined;
  13895. }
  13896. if (isTrue(alwaysNormalize)) {
  13897. normalizationType = ALWAYS_NORMALIZE;
  13898. }
  13899. return _createElement(context, tag, data, children, normalizationType)
  13900. }
  13901. function _createElement (
  13902. context,
  13903. tag,
  13904. data,
  13905. children,
  13906. normalizationType
  13907. ) {
  13908. if (isDef(data) && isDef((data).__ob__)) {
  13909. process.env.NODE_ENV !== 'production' && warn(
  13910. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  13911. 'Always create fresh vnode data objects in each render!',
  13912. context
  13913. );
  13914. return createEmptyVNode()
  13915. }
  13916. if (!tag) {
  13917. // in case of component :is set to falsy value
  13918. return createEmptyVNode()
  13919. }
  13920. // support single function children as default scoped slot
  13921. if (Array.isArray(children) &&
  13922. typeof children[0] === 'function'
  13923. ) {
  13924. data = data || {};
  13925. data.scopedSlots = { default: children[0] };
  13926. children.length = 0;
  13927. }
  13928. if (normalizationType === ALWAYS_NORMALIZE) {
  13929. children = normalizeChildren(children);
  13930. } else if (normalizationType === SIMPLE_NORMALIZE) {
  13931. children = simpleNormalizeChildren(children);
  13932. }
  13933. var vnode, ns;
  13934. if (typeof tag === 'string') {
  13935. var Ctor;
  13936. ns = config.getTagNamespace(tag);
  13937. if (config.isReservedTag(tag)) {
  13938. // platform built-in elements
  13939. vnode = new VNode(
  13940. config.parsePlatformTagName(tag), data, children,
  13941. undefined, undefined, context
  13942. );
  13943. } else if (isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  13944. // component
  13945. vnode = createComponent(Ctor, data, context, children, tag);
  13946. } else {
  13947. // unknown or unlisted namespaced elements
  13948. // check at runtime because it may get assigned a namespace when its
  13949. // parent normalizes children
  13950. vnode = new VNode(
  13951. tag, data, children,
  13952. undefined, undefined, context
  13953. );
  13954. }
  13955. } else {
  13956. // direct component options / constructor
  13957. vnode = createComponent(tag, data, context, children);
  13958. }
  13959. if (isDef(vnode)) {
  13960. if (ns) { applyNS(vnode, ns); }
  13961. return vnode
  13962. } else {
  13963. return createEmptyVNode()
  13964. }
  13965. }
  13966. function applyNS (vnode, ns) {
  13967. vnode.ns = ns;
  13968. if (vnode.tag === 'foreignObject') {
  13969. // use default namespace inside foreignObject
  13970. return
  13971. }
  13972. if (isDef(vnode.children)) {
  13973. for (var i = 0, l = vnode.children.length; i < l; i++) {
  13974. var child = vnode.children[i];
  13975. if (isDef(child.tag) && isUndef(child.ns)) {
  13976. applyNS(child, ns);
  13977. }
  13978. }
  13979. }
  13980. }
  13981. /* */
  13982. /**
  13983. * Runtime helper for rendering v-for lists.
  13984. */
  13985. function renderList (
  13986. val,
  13987. render
  13988. ) {
  13989. var ret, i, l, keys, key;
  13990. if (Array.isArray(val) || typeof val === 'string') {
  13991. ret = new Array(val.length);
  13992. for (i = 0, l = val.length; i < l; i++) {
  13993. ret[i] = render(val[i], i);
  13994. }
  13995. } else if (typeof val === 'number') {
  13996. ret = new Array(val);
  13997. for (i = 0; i < val; i++) {
  13998. ret[i] = render(i + 1, i);
  13999. }
  14000. } else if (isObject(val)) {
  14001. keys = Object.keys(val);
  14002. ret = new Array(keys.length);
  14003. for (i = 0, l = keys.length; i < l; i++) {
  14004. key = keys[i];
  14005. ret[i] = render(val[key], key, i);
  14006. }
  14007. }
  14008. if (isDef(ret)) {
  14009. (ret)._isVList = true;
  14010. }
  14011. return ret
  14012. }
  14013. /* */
  14014. /**
  14015. * Runtime helper for rendering <slot>
  14016. */
  14017. function renderSlot (
  14018. name,
  14019. fallback,
  14020. props,
  14021. bindObject
  14022. ) {
  14023. var scopedSlotFn = this.$scopedSlots[name];
  14024. if (scopedSlotFn) { // scoped slot
  14025. props = props || {};
  14026. if (bindObject) {
  14027. extend(props, bindObject);
  14028. }
  14029. return scopedSlotFn(props) || fallback
  14030. } else {
  14031. var slotNodes = this.$slots[name];
  14032. // warn duplicate slot usage
  14033. if (slotNodes && process.env.NODE_ENV !== 'production') {
  14034. slotNodes._rendered && warn(
  14035. "Duplicate presence of slot \"" + name + "\" found in the same render tree " +
  14036. "- this will likely cause render errors.",
  14037. this
  14038. );
  14039. slotNodes._rendered = true;
  14040. }
  14041. return slotNodes || fallback
  14042. }
  14043. }
  14044. /* */
  14045. /**
  14046. * Runtime helper for resolving filters
  14047. */
  14048. function resolveFilter (id) {
  14049. return resolveAsset(this.$options, 'filters', id, true) || identity
  14050. }
  14051. /* */
  14052. /**
  14053. * Runtime helper for checking keyCodes from config.
  14054. */
  14055. function checkKeyCodes (
  14056. eventKeyCode,
  14057. key,
  14058. builtInAlias
  14059. ) {
  14060. var keyCodes = config.keyCodes[key] || builtInAlias;
  14061. if (Array.isArray(keyCodes)) {
  14062. return keyCodes.indexOf(eventKeyCode) === -1
  14063. } else {
  14064. return keyCodes !== eventKeyCode
  14065. }
  14066. }
  14067. /* */
  14068. /**
  14069. * Runtime helper for merging v-bind="object" into a VNode's data.
  14070. */
  14071. function bindObjectProps (
  14072. data,
  14073. tag,
  14074. value,
  14075. asProp
  14076. ) {
  14077. if (value) {
  14078. if (!isObject(value)) {
  14079. process.env.NODE_ENV !== 'production' && warn(
  14080. 'v-bind without argument expects an Object or Array value',
  14081. this
  14082. );
  14083. } else {
  14084. if (Array.isArray(value)) {
  14085. value = toObject(value);
  14086. }
  14087. var hash;
  14088. for (var key in value) {
  14089. if (key === 'class' || key === 'style') {
  14090. hash = data;
  14091. } else {
  14092. var type = data.attrs && data.attrs.type;
  14093. hash = asProp || config.mustUseProp(tag, type, key)
  14094. ? data.domProps || (data.domProps = {})
  14095. : data.attrs || (data.attrs = {});
  14096. }
  14097. if (!(key in hash)) {
  14098. hash[key] = value[key];
  14099. }
  14100. }
  14101. }
  14102. }
  14103. return data
  14104. }
  14105. /* */
  14106. /**
  14107. * Runtime helper for rendering static trees.
  14108. */
  14109. function renderStatic (
  14110. index,
  14111. isInFor
  14112. ) {
  14113. var tree = this._staticTrees[index];
  14114. // if has already-rendered static tree and not inside v-for,
  14115. // we can reuse the same tree by doing a shallow clone.
  14116. if (tree && !isInFor) {
  14117. return Array.isArray(tree)
  14118. ? cloneVNodes(tree)
  14119. : cloneVNode(tree)
  14120. }
  14121. // otherwise, render a fresh tree.
  14122. tree = this._staticTrees[index] =
  14123. this.$options.staticRenderFns[index].call(this._renderProxy);
  14124. markStatic(tree, ("__static__" + index), false);
  14125. return tree
  14126. }
  14127. /**
  14128. * Runtime helper for v-once.
  14129. * Effectively it means marking the node as static with a unique key.
  14130. */
  14131. function markOnce (
  14132. tree,
  14133. index,
  14134. key
  14135. ) {
  14136. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  14137. return tree
  14138. }
  14139. function markStatic (
  14140. tree,
  14141. key,
  14142. isOnce
  14143. ) {
  14144. if (Array.isArray(tree)) {
  14145. for (var i = 0; i < tree.length; i++) {
  14146. if (tree[i] && typeof tree[i] !== 'string') {
  14147. markStaticNode(tree[i], (key + "_" + i), isOnce);
  14148. }
  14149. }
  14150. } else {
  14151. markStaticNode(tree, key, isOnce);
  14152. }
  14153. }
  14154. function markStaticNode (node, key, isOnce) {
  14155. node.isStatic = true;
  14156. node.key = key;
  14157. node.isOnce = isOnce;
  14158. }
  14159. /* */
  14160. function initRender (vm) {
  14161. vm._vnode = null; // the root of the child tree
  14162. vm._staticTrees = null;
  14163. var parentVnode = vm.$vnode = vm.$options._parentVnode; // the placeholder node in parent tree
  14164. var renderContext = parentVnode && parentVnode.context;
  14165. vm.$slots = resolveSlots(vm.$options._renderChildren, renderContext);
  14166. vm.$scopedSlots = emptyObject;
  14167. // bind the createElement fn to this instance
  14168. // so that we get proper render context inside it.
  14169. // args order: tag, data, children, normalizationType, alwaysNormalize
  14170. // internal version is used by render functions compiled from templates
  14171. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  14172. // normalization is always applied for the public version, used in
  14173. // user-written render functions.
  14174. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  14175. }
  14176. function renderMixin (Vue) {
  14177. Vue.prototype.$nextTick = function (fn) {
  14178. return nextTick(fn, this)
  14179. };
  14180. Vue.prototype._render = function () {
  14181. var vm = this;
  14182. var ref = vm.$options;
  14183. var render = ref.render;
  14184. var staticRenderFns = ref.staticRenderFns;
  14185. var _parentVnode = ref._parentVnode;
  14186. if (vm._isMounted) {
  14187. // clone slot nodes on re-renders
  14188. for (var key in vm.$slots) {
  14189. vm.$slots[key] = cloneVNodes(vm.$slots[key]);
  14190. }
  14191. }
  14192. vm.$scopedSlots = (_parentVnode && _parentVnode.data.scopedSlots) || emptyObject;
  14193. if (staticRenderFns && !vm._staticTrees) {
  14194. vm._staticTrees = [];
  14195. }
  14196. // set parent vnode. this allows render functions to have access
  14197. // to the data on the placeholder node.
  14198. vm.$vnode = _parentVnode;
  14199. // render self
  14200. var vnode;
  14201. try {
  14202. vnode = render.call(vm._renderProxy, vm.$createElement);
  14203. } catch (e) {
  14204. handleError(e, vm, "render function");
  14205. // return error render result,
  14206. // or previous vnode to prevent render error causing blank component
  14207. /* istanbul ignore else */
  14208. if (process.env.NODE_ENV !== 'production') {
  14209. vnode = vm.$options.renderError
  14210. ? vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e)
  14211. : vm._vnode;
  14212. } else {
  14213. vnode = vm._vnode;
  14214. }
  14215. }
  14216. // return empty vnode in case the render function errored out
  14217. if (!(vnode instanceof VNode)) {
  14218. if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) {
  14219. warn(
  14220. 'Multiple root nodes returned from render function. Render function ' +
  14221. 'should return a single root node.',
  14222. vm
  14223. );
  14224. }
  14225. vnode = createEmptyVNode();
  14226. }
  14227. // set parent
  14228. vnode.parent = _parentVnode;
  14229. return vnode
  14230. };
  14231. // internal render helpers.
  14232. // these are exposed on the instance prototype to reduce generated render
  14233. // code size.
  14234. Vue.prototype._o = markOnce;
  14235. Vue.prototype._n = toNumber;
  14236. Vue.prototype._s = toString;
  14237. Vue.prototype._l = renderList;
  14238. Vue.prototype._t = renderSlot;
  14239. Vue.prototype._q = looseEqual;
  14240. Vue.prototype._i = looseIndexOf;
  14241. Vue.prototype._m = renderStatic;
  14242. Vue.prototype._f = resolveFilter;
  14243. Vue.prototype._k = checkKeyCodes;
  14244. Vue.prototype._b = bindObjectProps;
  14245. Vue.prototype._v = createTextVNode;
  14246. Vue.prototype._e = createEmptyVNode;
  14247. Vue.prototype._u = resolveScopedSlots;
  14248. }
  14249. /* */
  14250. var uid = 0;
  14251. function initMixin (Vue) {
  14252. Vue.prototype._init = function (options) {
  14253. var vm = this;
  14254. // a uid
  14255. vm._uid = uid++;
  14256. var startTag, endTag;
  14257. /* istanbul ignore if */
  14258. if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
  14259. startTag = "vue-perf-init:" + (vm._uid);
  14260. endTag = "vue-perf-end:" + (vm._uid);
  14261. mark(startTag);
  14262. }
  14263. // a flag to avoid this being observed
  14264. vm._isVue = true;
  14265. // merge options
  14266. if (options && options._isComponent) {
  14267. // optimize internal component instantiation
  14268. // since dynamic options merging is pretty slow, and none of the
  14269. // internal component options needs special treatment.
  14270. initInternalComponent(vm, options);
  14271. } else {
  14272. vm.$options = mergeOptions(
  14273. resolveConstructorOptions(vm.constructor),
  14274. options || {},
  14275. vm
  14276. );
  14277. }
  14278. /* istanbul ignore else */
  14279. if (process.env.NODE_ENV !== 'production') {
  14280. initProxy(vm);
  14281. } else {
  14282. vm._renderProxy = vm;
  14283. }
  14284. // expose real self
  14285. vm._self = vm;
  14286. initLifecycle(vm);
  14287. initEvents(vm);
  14288. initRender(vm);
  14289. callHook(vm, 'beforeCreate');
  14290. initInjections(vm); // resolve injections before data/props
  14291. initState(vm);
  14292. initProvide(vm); // resolve provide after data/props
  14293. callHook(vm, 'created');
  14294. /* istanbul ignore if */
  14295. if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
  14296. vm._name = formatComponentName(vm, false);
  14297. mark(endTag);
  14298. measure(((vm._name) + " init"), startTag, endTag);
  14299. }
  14300. if (vm.$options.el) {
  14301. vm.$mount(vm.$options.el);
  14302. }
  14303. };
  14304. }
  14305. function initInternalComponent (vm, options) {
  14306. var opts = vm.$options = Object.create(vm.constructor.options);
  14307. // doing this because it's faster than dynamic enumeration.
  14308. opts.parent = options.parent;
  14309. opts.propsData = options.propsData;
  14310. opts._parentVnode = options._parentVnode;
  14311. opts._parentListeners = options._parentListeners;
  14312. opts._renderChildren = options._renderChildren;
  14313. opts._componentTag = options._componentTag;
  14314. opts._parentElm = options._parentElm;
  14315. opts._refElm = options._refElm;
  14316. if (options.render) {
  14317. opts.render = options.render;
  14318. opts.staticRenderFns = options.staticRenderFns;
  14319. }
  14320. }
  14321. function resolveConstructorOptions (Ctor) {
  14322. var options = Ctor.options;
  14323. if (Ctor.super) {
  14324. var superOptions = resolveConstructorOptions(Ctor.super);
  14325. var cachedSuperOptions = Ctor.superOptions;
  14326. if (superOptions !== cachedSuperOptions) {
  14327. // super option changed,
  14328. // need to resolve new options.
  14329. Ctor.superOptions = superOptions;
  14330. // check if there are any late-modified/attached options (#4976)
  14331. var modifiedOptions = resolveModifiedOptions(Ctor);
  14332. // update base extend options
  14333. if (modifiedOptions) {
  14334. extend(Ctor.extendOptions, modifiedOptions);
  14335. }
  14336. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  14337. if (options.name) {
  14338. options.components[options.name] = Ctor;
  14339. }
  14340. }
  14341. }
  14342. return options
  14343. }
  14344. function resolveModifiedOptions (Ctor) {
  14345. var modified;
  14346. var latest = Ctor.options;
  14347. var extended = Ctor.extendOptions;
  14348. var sealed = Ctor.sealedOptions;
  14349. for (var key in latest) {
  14350. if (latest[key] !== sealed[key]) {
  14351. if (!modified) { modified = {}; }
  14352. modified[key] = dedupe(latest[key], extended[key], sealed[key]);
  14353. }
  14354. }
  14355. return modified
  14356. }
  14357. function dedupe (latest, extended, sealed) {
  14358. // compare latest and sealed to ensure lifecycle hooks won't be duplicated
  14359. // between merges
  14360. if (Array.isArray(latest)) {
  14361. var res = [];
  14362. sealed = Array.isArray(sealed) ? sealed : [sealed];
  14363. extended = Array.isArray(extended) ? extended : [extended];
  14364. for (var i = 0; i < latest.length; i++) {
  14365. // push original options and not sealed options to exclude duplicated options
  14366. if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) {
  14367. res.push(latest[i]);
  14368. }
  14369. }
  14370. return res
  14371. } else {
  14372. return latest
  14373. }
  14374. }
  14375. function Vue$3 (options) {
  14376. if (process.env.NODE_ENV !== 'production' &&
  14377. !(this instanceof Vue$3)
  14378. ) {
  14379. warn('Vue is a constructor and should be called with the `new` keyword');
  14380. }
  14381. this._init(options);
  14382. }
  14383. initMixin(Vue$3);
  14384. stateMixin(Vue$3);
  14385. eventsMixin(Vue$3);
  14386. lifecycleMixin(Vue$3);
  14387. renderMixin(Vue$3);
  14388. /* */
  14389. function initUse (Vue) {
  14390. Vue.use = function (plugin) {
  14391. /* istanbul ignore if */
  14392. if (plugin.installed) {
  14393. return this
  14394. }
  14395. // additional parameters
  14396. var args = toArray(arguments, 1);
  14397. args.unshift(this);
  14398. if (typeof plugin.install === 'function') {
  14399. plugin.install.apply(plugin, args);
  14400. } else if (typeof plugin === 'function') {
  14401. plugin.apply(null, args);
  14402. }
  14403. plugin.installed = true;
  14404. return this
  14405. };
  14406. }
  14407. /* */
  14408. function initMixin$1 (Vue) {
  14409. Vue.mixin = function (mixin) {
  14410. this.options = mergeOptions(this.options, mixin);
  14411. return this
  14412. };
  14413. }
  14414. /* */
  14415. function initExtend (Vue) {
  14416. /**
  14417. * Each instance constructor, including Vue, has a unique
  14418. * cid. This enables us to create wrapped "child
  14419. * constructors" for prototypal inheritance and cache them.
  14420. */
  14421. Vue.cid = 0;
  14422. var cid = 1;
  14423. /**
  14424. * Class inheritance
  14425. */
  14426. Vue.extend = function (extendOptions) {
  14427. extendOptions = extendOptions || {};
  14428. var Super = this;
  14429. var SuperId = Super.cid;
  14430. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  14431. if (cachedCtors[SuperId]) {
  14432. return cachedCtors[SuperId]
  14433. }
  14434. var name = extendOptions.name || Super.options.name;
  14435. if (process.env.NODE_ENV !== 'production') {
  14436. if (!/^[a-zA-Z][\w-]*$/.test(name)) {
  14437. warn(
  14438. 'Invalid component name: "' + name + '". Component names ' +
  14439. 'can only contain alphanumeric characters and the hyphen, ' +
  14440. 'and must start with a letter.'
  14441. );
  14442. }
  14443. }
  14444. var Sub = function VueComponent (options) {
  14445. this._init(options);
  14446. };
  14447. Sub.prototype = Object.create(Super.prototype);
  14448. Sub.prototype.constructor = Sub;
  14449. Sub.cid = cid++;
  14450. Sub.options = mergeOptions(
  14451. Super.options,
  14452. extendOptions
  14453. );
  14454. Sub['super'] = Super;
  14455. // For props and computed properties, we define the proxy getters on
  14456. // the Vue instances at extension time, on the extended prototype. This
  14457. // avoids Object.defineProperty calls for each instance created.
  14458. if (Sub.options.props) {
  14459. initProps$1(Sub);
  14460. }
  14461. if (Sub.options.computed) {
  14462. initComputed$1(Sub);
  14463. }
  14464. // allow further extension/mixin/plugin usage
  14465. Sub.extend = Super.extend;
  14466. Sub.mixin = Super.mixin;
  14467. Sub.use = Super.use;
  14468. // create asset registers, so extended classes
  14469. // can have their private assets too.
  14470. ASSET_TYPES.forEach(function (type) {
  14471. Sub[type] = Super[type];
  14472. });
  14473. // enable recursive self-lookup
  14474. if (name) {
  14475. Sub.options.components[name] = Sub;
  14476. }
  14477. // keep a reference to the super options at extension time.
  14478. // later at instantiation we can check if Super's options have
  14479. // been updated.
  14480. Sub.superOptions = Super.options;
  14481. Sub.extendOptions = extendOptions;
  14482. Sub.sealedOptions = extend({}, Sub.options);
  14483. // cache constructor
  14484. cachedCtors[SuperId] = Sub;
  14485. return Sub
  14486. };
  14487. }
  14488. function initProps$1 (Comp) {
  14489. var props = Comp.options.props;
  14490. for (var key in props) {
  14491. proxy(Comp.prototype, "_props", key);
  14492. }
  14493. }
  14494. function initComputed$1 (Comp) {
  14495. var computed = Comp.options.computed;
  14496. for (var key in computed) {
  14497. defineComputed(Comp.prototype, key, computed[key]);
  14498. }
  14499. }
  14500. /* */
  14501. function initAssetRegisters (Vue) {
  14502. /**
  14503. * Create asset registration methods.
  14504. */
  14505. ASSET_TYPES.forEach(function (type) {
  14506. Vue[type] = function (
  14507. id,
  14508. definition
  14509. ) {
  14510. if (!definition) {
  14511. return this.options[type + 's'][id]
  14512. } else {
  14513. /* istanbul ignore if */
  14514. if (process.env.NODE_ENV !== 'production') {
  14515. if (type === 'component' && config.isReservedTag(id)) {
  14516. warn(
  14517. 'Do not use built-in or reserved HTML elements as component ' +
  14518. 'id: ' + id
  14519. );
  14520. }
  14521. }
  14522. if (type === 'component' && isPlainObject(definition)) {
  14523. definition.name = definition.name || id;
  14524. definition = this.options._base.extend(definition);
  14525. }
  14526. if (type === 'directive' && typeof definition === 'function') {
  14527. definition = { bind: definition, update: definition };
  14528. }
  14529. this.options[type + 's'][id] = definition;
  14530. return definition
  14531. }
  14532. };
  14533. });
  14534. }
  14535. /* */
  14536. var patternTypes = [String, RegExp];
  14537. function getComponentName (opts) {
  14538. return opts && (opts.Ctor.options.name || opts.tag)
  14539. }
  14540. function matches (pattern, name) {
  14541. if (typeof pattern === 'string') {
  14542. return pattern.split(',').indexOf(name) > -1
  14543. } else if (isRegExp(pattern)) {
  14544. return pattern.test(name)
  14545. }
  14546. /* istanbul ignore next */
  14547. return false
  14548. }
  14549. function pruneCache (cache, current, filter) {
  14550. for (var key in cache) {
  14551. var cachedNode = cache[key];
  14552. if (cachedNode) {
  14553. var name = getComponentName(cachedNode.componentOptions);
  14554. if (name && !filter(name)) {
  14555. if (cachedNode !== current) {
  14556. pruneCacheEntry(cachedNode);
  14557. }
  14558. cache[key] = null;
  14559. }
  14560. }
  14561. }
  14562. }
  14563. function pruneCacheEntry (vnode) {
  14564. if (vnode) {
  14565. vnode.componentInstance.$destroy();
  14566. }
  14567. }
  14568. var KeepAlive = {
  14569. name: 'keep-alive',
  14570. abstract: true,
  14571. props: {
  14572. include: patternTypes,
  14573. exclude: patternTypes
  14574. },
  14575. created: function created () {
  14576. this.cache = Object.create(null);
  14577. },
  14578. destroyed: function destroyed () {
  14579. var this$1 = this;
  14580. for (var key in this$1.cache) {
  14581. pruneCacheEntry(this$1.cache[key]);
  14582. }
  14583. },
  14584. watch: {
  14585. include: function include (val) {
  14586. pruneCache(this.cache, this._vnode, function (name) { return matches(val, name); });
  14587. },
  14588. exclude: function exclude (val) {
  14589. pruneCache(this.cache, this._vnode, function (name) { return !matches(val, name); });
  14590. }
  14591. },
  14592. render: function render () {
  14593. var vnode = getFirstComponentChild(this.$slots.default);
  14594. var componentOptions = vnode && vnode.componentOptions;
  14595. if (componentOptions) {
  14596. // check pattern
  14597. var name = getComponentName(componentOptions);
  14598. if (name && (
  14599. (this.include && !matches(this.include, name)) ||
  14600. (this.exclude && matches(this.exclude, name))
  14601. )) {
  14602. return vnode
  14603. }
  14604. var key = vnode.key == null
  14605. // same constructor may get registered as different local components
  14606. // so cid alone is not enough (#3269)
  14607. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  14608. : vnode.key;
  14609. if (this.cache[key]) {
  14610. vnode.componentInstance = this.cache[key].componentInstance;
  14611. } else {
  14612. this.cache[key] = vnode;
  14613. }
  14614. vnode.data.keepAlive = true;
  14615. }
  14616. return vnode
  14617. }
  14618. };
  14619. var builtInComponents = {
  14620. KeepAlive: KeepAlive
  14621. };
  14622. /* */
  14623. function initGlobalAPI (Vue) {
  14624. // config
  14625. var configDef = {};
  14626. configDef.get = function () { return config; };
  14627. if (process.env.NODE_ENV !== 'production') {
  14628. configDef.set = function () {
  14629. warn(
  14630. 'Do not replace the Vue.config object, set individual fields instead.'
  14631. );
  14632. };
  14633. }
  14634. Object.defineProperty(Vue, 'config', configDef);
  14635. // exposed util methods.
  14636. // NOTE: these are not considered part of the public API - avoid relying on
  14637. // them unless you are aware of the risk.
  14638. Vue.util = {
  14639. warn: warn,
  14640. extend: extend,
  14641. mergeOptions: mergeOptions,
  14642. defineReactive: defineReactive$$1
  14643. };
  14644. Vue.set = set;
  14645. Vue.delete = del;
  14646. Vue.nextTick = nextTick;
  14647. Vue.options = Object.create(null);
  14648. ASSET_TYPES.forEach(function (type) {
  14649. Vue.options[type + 's'] = Object.create(null);
  14650. });
  14651. // this is used to identify the "base" constructor to extend all plain-object
  14652. // components with in Weex's multi-instance scenarios.
  14653. Vue.options._base = Vue;
  14654. extend(Vue.options.components, builtInComponents);
  14655. initUse(Vue);
  14656. initMixin$1(Vue);
  14657. initExtend(Vue);
  14658. initAssetRegisters(Vue);
  14659. }
  14660. initGlobalAPI(Vue$3);
  14661. Object.defineProperty(Vue$3.prototype, '$isServer', {
  14662. get: isServerRendering
  14663. });
  14664. Object.defineProperty(Vue$3.prototype, '$ssrContext', {
  14665. get: function get () {
  14666. /* istanbul ignore next */
  14667. return this.$vnode.ssrContext
  14668. }
  14669. });
  14670. Vue$3.version = '2.3.3';
  14671. /* */
  14672. // these are reserved for web because they are directly compiled away
  14673. // during template compilation
  14674. var isReservedAttr = makeMap('style,class');
  14675. // attributes that should be using props for binding
  14676. var acceptValue = makeMap('input,textarea,option,select');
  14677. var mustUseProp = function (tag, type, attr) {
  14678. return (
  14679. (attr === 'value' && acceptValue(tag)) && type !== 'button' ||
  14680. (attr === 'selected' && tag === 'option') ||
  14681. (attr === 'checked' && tag === 'input') ||
  14682. (attr === 'muted' && tag === 'video')
  14683. )
  14684. };
  14685. var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
  14686. var isBooleanAttr = makeMap(
  14687. 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
  14688. 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
  14689. 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
  14690. 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
  14691. 'required,reversed,scoped,seamless,selected,sortable,translate,' +
  14692. 'truespeed,typemustmatch,visible'
  14693. );
  14694. var xlinkNS = 'http://www.w3.org/1999/xlink';
  14695. var isXlink = function (name) {
  14696. return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'
  14697. };
  14698. var getXlinkProp = function (name) {
  14699. return isXlink(name) ? name.slice(6, name.length) : ''
  14700. };
  14701. var isFalsyAttrValue = function (val) {
  14702. return val == null || val === false
  14703. };
  14704. /* */
  14705. function genClassForVnode (vnode) {
  14706. var data = vnode.data;
  14707. var parentNode = vnode;
  14708. var childNode = vnode;
  14709. while (isDef(childNode.componentInstance)) {
  14710. childNode = childNode.componentInstance._vnode;
  14711. if (childNode.data) {
  14712. data = mergeClassData(childNode.data, data);
  14713. }
  14714. }
  14715. while (isDef(parentNode = parentNode.parent)) {
  14716. if (parentNode.data) {
  14717. data = mergeClassData(data, parentNode.data);
  14718. }
  14719. }
  14720. return genClassFromData(data)
  14721. }
  14722. function mergeClassData (child, parent) {
  14723. return {
  14724. staticClass: concat(child.staticClass, parent.staticClass),
  14725. class: isDef(child.class)
  14726. ? [child.class, parent.class]
  14727. : parent.class
  14728. }
  14729. }
  14730. function genClassFromData (data) {
  14731. var dynamicClass = data.class;
  14732. var staticClass = data.staticClass;
  14733. if (isDef(staticClass) || isDef(dynamicClass)) {
  14734. return concat(staticClass, stringifyClass(dynamicClass))
  14735. }
  14736. /* istanbul ignore next */
  14737. return ''
  14738. }
  14739. function concat (a, b) {
  14740. return a ? b ? (a + ' ' + b) : a : (b || '')
  14741. }
  14742. function stringifyClass (value) {
  14743. if (isUndef(value)) {
  14744. return ''
  14745. }
  14746. if (typeof value === 'string') {
  14747. return value
  14748. }
  14749. var res = '';
  14750. if (Array.isArray(value)) {
  14751. var stringified;
  14752. for (var i = 0, l = value.length; i < l; i++) {
  14753. if (isDef(value[i])) {
  14754. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  14755. res += stringified + ' ';
  14756. }
  14757. }
  14758. }
  14759. return res.slice(0, -1)
  14760. }
  14761. if (isObject(value)) {
  14762. for (var key in value) {
  14763. if (value[key]) { res += key + ' '; }
  14764. }
  14765. return res.slice(0, -1)
  14766. }
  14767. /* istanbul ignore next */
  14768. return res
  14769. }
  14770. /* */
  14771. var namespaceMap = {
  14772. svg: 'http://www.w3.org/2000/svg',
  14773. math: 'http://www.w3.org/1998/Math/MathML'
  14774. };
  14775. var isHTMLTag = makeMap(
  14776. 'html,body,base,head,link,meta,style,title,' +
  14777. 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
  14778. 'div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,' +
  14779. 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
  14780. 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
  14781. 'embed,object,param,source,canvas,script,noscript,del,ins,' +
  14782. 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
  14783. 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
  14784. 'output,progress,select,textarea,' +
  14785. 'details,dialog,menu,menuitem,summary,' +
  14786. 'content,element,shadow,template'
  14787. );
  14788. // this map is intentionally selective, only covering SVG elements that may
  14789. // contain child elements.
  14790. var isSVG = makeMap(
  14791. 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
  14792. 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
  14793. 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
  14794. true
  14795. );
  14796. var isReservedTag = function (tag) {
  14797. return isHTMLTag(tag) || isSVG(tag)
  14798. };
  14799. function getTagNamespace (tag) {
  14800. if (isSVG(tag)) {
  14801. return 'svg'
  14802. }
  14803. // basic support for MathML
  14804. // note it doesn't support other MathML elements being component roots
  14805. if (tag === 'math') {
  14806. return 'math'
  14807. }
  14808. }
  14809. var unknownElementCache = Object.create(null);
  14810. function isUnknownElement (tag) {
  14811. /* istanbul ignore if */
  14812. if (!inBrowser) {
  14813. return true
  14814. }
  14815. if (isReservedTag(tag)) {
  14816. return false
  14817. }
  14818. tag = tag.toLowerCase();
  14819. /* istanbul ignore if */
  14820. if (unknownElementCache[tag] != null) {
  14821. return unknownElementCache[tag]
  14822. }
  14823. var el = document.createElement(tag);
  14824. if (tag.indexOf('-') > -1) {
  14825. // http://stackoverflow.com/a/28210364/1070244
  14826. return (unknownElementCache[tag] = (
  14827. el.constructor === window.HTMLUnknownElement ||
  14828. el.constructor === window.HTMLElement
  14829. ))
  14830. } else {
  14831. return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))
  14832. }
  14833. }
  14834. /* */
  14835. /**
  14836. * Query an element selector if it's not an element already.
  14837. */
  14838. function query (el) {
  14839. if (typeof el === 'string') {
  14840. var selected = document.querySelector(el);
  14841. if (!selected) {
  14842. process.env.NODE_ENV !== 'production' && warn(
  14843. 'Cannot find element: ' + el
  14844. );
  14845. return document.createElement('div')
  14846. }
  14847. return selected
  14848. } else {
  14849. return el
  14850. }
  14851. }
  14852. /* */
  14853. function createElement$1 (tagName, vnode) {
  14854. var elm = document.createElement(tagName);
  14855. if (tagName !== 'select') {
  14856. return elm
  14857. }
  14858. // false or null will remove the attribute but undefined will not
  14859. if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {
  14860. elm.setAttribute('multiple', 'multiple');
  14861. }
  14862. return elm
  14863. }
  14864. function createElementNS (namespace, tagName) {
  14865. return document.createElementNS(namespaceMap[namespace], tagName)
  14866. }
  14867. function createTextNode (text) {
  14868. return document.createTextNode(text)
  14869. }
  14870. function createComment (text) {
  14871. return document.createComment(text)
  14872. }
  14873. function insertBefore (parentNode, newNode, referenceNode) {
  14874. parentNode.insertBefore(newNode, referenceNode);
  14875. }
  14876. function removeChild (node, child) {
  14877. node.removeChild(child);
  14878. }
  14879. function appendChild (node, child) {
  14880. node.appendChild(child);
  14881. }
  14882. function parentNode (node) {
  14883. return node.parentNode
  14884. }
  14885. function nextSibling (node) {
  14886. return node.nextSibling
  14887. }
  14888. function tagName (node) {
  14889. return node.tagName
  14890. }
  14891. function setTextContent (node, text) {
  14892. node.textContent = text;
  14893. }
  14894. function setAttribute (node, key, val) {
  14895. node.setAttribute(key, val);
  14896. }
  14897. var nodeOps = Object.freeze({
  14898. createElement: createElement$1,
  14899. createElementNS: createElementNS,
  14900. createTextNode: createTextNode,
  14901. createComment: createComment,
  14902. insertBefore: insertBefore,
  14903. removeChild: removeChild,
  14904. appendChild: appendChild,
  14905. parentNode: parentNode,
  14906. nextSibling: nextSibling,
  14907. tagName: tagName,
  14908. setTextContent: setTextContent,
  14909. setAttribute: setAttribute
  14910. });
  14911. /* */
  14912. var ref = {
  14913. create: function create (_, vnode) {
  14914. registerRef(vnode);
  14915. },
  14916. update: function update (oldVnode, vnode) {
  14917. if (oldVnode.data.ref !== vnode.data.ref) {
  14918. registerRef(oldVnode, true);
  14919. registerRef(vnode);
  14920. }
  14921. },
  14922. destroy: function destroy (vnode) {
  14923. registerRef(vnode, true);
  14924. }
  14925. };
  14926. function registerRef (vnode, isRemoval) {
  14927. var key = vnode.data.ref;
  14928. if (!key) { return }
  14929. var vm = vnode.context;
  14930. var ref = vnode.componentInstance || vnode.elm;
  14931. var refs = vm.$refs;
  14932. if (isRemoval) {
  14933. if (Array.isArray(refs[key])) {
  14934. remove(refs[key], ref);
  14935. } else if (refs[key] === ref) {
  14936. refs[key] = undefined;
  14937. }
  14938. } else {
  14939. if (vnode.data.refInFor) {
  14940. if (Array.isArray(refs[key]) && refs[key].indexOf(ref) < 0) {
  14941. refs[key].push(ref);
  14942. } else {
  14943. refs[key] = [ref];
  14944. }
  14945. } else {
  14946. refs[key] = ref;
  14947. }
  14948. }
  14949. }
  14950. /**
  14951. * Virtual DOM patching algorithm based on Snabbdom by
  14952. * Simon Friis Vindum (@paldepind)
  14953. * Licensed under the MIT License
  14954. * https://github.com/paldepind/snabbdom/blob/master/LICENSE
  14955. *
  14956. * modified by Evan You (@yyx990803)
  14957. *
  14958. /*
  14959. * Not type-checking this because this file is perf-critical and the cost
  14960. * of making flow understand it is not worth it.
  14961. */
  14962. var emptyNode = new VNode('', {}, []);
  14963. var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
  14964. function sameVnode (a, b) {
  14965. return (
  14966. a.key === b.key &&
  14967. a.tag === b.tag &&
  14968. a.isComment === b.isComment &&
  14969. isDef(a.data) === isDef(b.data) &&
  14970. sameInputType(a, b)
  14971. )
  14972. }
  14973. // Some browsers do not support dynamically changing type for <input>
  14974. // so they need to be treated as different nodes
  14975. function sameInputType (a, b) {
  14976. if (a.tag !== 'input') { return true }
  14977. var i;
  14978. var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;
  14979. var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;
  14980. return typeA === typeB
  14981. }
  14982. function createKeyToOldIdx (children, beginIdx, endIdx) {
  14983. var i, key;
  14984. var map = {};
  14985. for (i = beginIdx; i <= endIdx; ++i) {
  14986. key = children[i].key;
  14987. if (isDef(key)) { map[key] = i; }
  14988. }
  14989. return map
  14990. }
  14991. function createPatchFunction (backend) {
  14992. var i, j;
  14993. var cbs = {};
  14994. var modules = backend.modules;
  14995. var nodeOps = backend.nodeOps;
  14996. for (i = 0; i < hooks.length; ++i) {
  14997. cbs[hooks[i]] = [];
  14998. for (j = 0; j < modules.length; ++j) {
  14999. if (isDef(modules[j][hooks[i]])) {
  15000. cbs[hooks[i]].push(modules[j][hooks[i]]);
  15001. }
  15002. }
  15003. }
  15004. function emptyNodeAt (elm) {
  15005. return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
  15006. }
  15007. function createRmCb (childElm, listeners) {
  15008. function remove$$1 () {
  15009. if (--remove$$1.listeners === 0) {
  15010. removeNode(childElm);
  15011. }
  15012. }
  15013. remove$$1.listeners = listeners;
  15014. return remove$$1
  15015. }
  15016. function removeNode (el) {
  15017. var parent = nodeOps.parentNode(el);
  15018. // element may have already been removed due to v-html / v-text
  15019. if (isDef(parent)) {
  15020. nodeOps.removeChild(parent, el);
  15021. }
  15022. }
  15023. var inPre = 0;
  15024. function createElm (vnode, insertedVnodeQueue, parentElm, refElm, nested) {
  15025. vnode.isRootInsert = !nested; // for transition enter check
  15026. if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
  15027. return
  15028. }
  15029. var data = vnode.data;
  15030. var children = vnode.children;
  15031. var tag = vnode.tag;
  15032. if (isDef(tag)) {
  15033. if (process.env.NODE_ENV !== 'production') {
  15034. if (data && data.pre) {
  15035. inPre++;
  15036. }
  15037. if (
  15038. !inPre &&
  15039. !vnode.ns &&
  15040. !(config.ignoredElements.length && config.ignoredElements.indexOf(tag) > -1) &&
  15041. config.isUnknownElement(tag)
  15042. ) {
  15043. warn(
  15044. 'Unknown custom element: <' + tag + '> - did you ' +
  15045. 'register the component correctly? For recursive components, ' +
  15046. 'make sure to provide the "name" option.',
  15047. vnode.context
  15048. );
  15049. }
  15050. }
  15051. vnode.elm = vnode.ns
  15052. ? nodeOps.createElementNS(vnode.ns, tag)
  15053. : nodeOps.createElement(tag, vnode);
  15054. setScope(vnode);
  15055. /* istanbul ignore if */
  15056. {
  15057. createChildren(vnode, children, insertedVnodeQueue);
  15058. if (isDef(data)) {
  15059. invokeCreateHooks(vnode, insertedVnodeQueue);
  15060. }
  15061. insert(parentElm, vnode.elm, refElm);
  15062. }
  15063. if (process.env.NODE_ENV !== 'production' && data && data.pre) {
  15064. inPre--;
  15065. }
  15066. } else if (isTrue(vnode.isComment)) {
  15067. vnode.elm = nodeOps.createComment(vnode.text);
  15068. insert(parentElm, vnode.elm, refElm);
  15069. } else {
  15070. vnode.elm = nodeOps.createTextNode(vnode.text);
  15071. insert(parentElm, vnode.elm, refElm);
  15072. }
  15073. }
  15074. function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
  15075. var i = vnode.data;
  15076. if (isDef(i)) {
  15077. var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;
  15078. if (isDef(i = i.hook) && isDef(i = i.init)) {
  15079. i(vnode, false /* hydrating */, parentElm, refElm);
  15080. }
  15081. // after calling the init hook, if the vnode is a child component
  15082. // it should've created a child instance and mounted it. the child
  15083. // component also has set the placeholder vnode's elm.
  15084. // in that case we can just return the element and be done.
  15085. if (isDef(vnode.componentInstance)) {
  15086. initComponent(vnode, insertedVnodeQueue);
  15087. if (isTrue(isReactivated)) {
  15088. reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
  15089. }
  15090. return true
  15091. }
  15092. }
  15093. }
  15094. function initComponent (vnode, insertedVnodeQueue) {
  15095. if (isDef(vnode.data.pendingInsert)) {
  15096. insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);
  15097. }
  15098. vnode.elm = vnode.componentInstance.$el;
  15099. if (isPatchable(vnode)) {
  15100. invokeCreateHooks(vnode, insertedVnodeQueue);
  15101. setScope(vnode);
  15102. } else {
  15103. // empty component root.
  15104. // skip all element-related modules except for ref (#3455)
  15105. registerRef(vnode);
  15106. // make sure to invoke the insert hook
  15107. insertedVnodeQueue.push(vnode);
  15108. }
  15109. }
  15110. function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
  15111. var i;
  15112. // hack for #4339: a reactivated component with inner transition
  15113. // does not trigger because the inner node's created hooks are not called
  15114. // again. It's not ideal to involve module-specific logic in here but
  15115. // there doesn't seem to be a better way to do it.
  15116. var innerNode = vnode;
  15117. while (innerNode.componentInstance) {
  15118. innerNode = innerNode.componentInstance._vnode;
  15119. if (isDef(i = innerNode.data) && isDef(i = i.transition)) {
  15120. for (i = 0; i < cbs.activate.length; ++i) {
  15121. cbs.activate[i](emptyNode, innerNode);
  15122. }
  15123. insertedVnodeQueue.push(innerNode);
  15124. break
  15125. }
  15126. }
  15127. // unlike a newly created component,
  15128. // a reactivated keep-alive component doesn't insert itself
  15129. insert(parentElm, vnode.elm, refElm);
  15130. }
  15131. function insert (parent, elm, ref) {
  15132. if (isDef(parent)) {
  15133. if (isDef(ref)) {
  15134. if (ref.parentNode === parent) {
  15135. nodeOps.insertBefore(parent, elm, ref);
  15136. }
  15137. } else {
  15138. nodeOps.appendChild(parent, elm);
  15139. }
  15140. }
  15141. }
  15142. function createChildren (vnode, children, insertedVnodeQueue) {
  15143. if (Array.isArray(children)) {
  15144. for (var i = 0; i < children.length; ++i) {
  15145. createElm(children[i], insertedVnodeQueue, vnode.elm, null, true);
  15146. }
  15147. } else if (isPrimitive(vnode.text)) {
  15148. nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(vnode.text));
  15149. }
  15150. }
  15151. function isPatchable (vnode) {
  15152. while (vnode.componentInstance) {
  15153. vnode = vnode.componentInstance._vnode;
  15154. }
  15155. return isDef(vnode.tag)
  15156. }
  15157. function invokeCreateHooks (vnode, insertedVnodeQueue) {
  15158. for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
  15159. cbs.create[i$1](emptyNode, vnode);
  15160. }
  15161. i = vnode.data.hook; // Reuse variable
  15162. if (isDef(i)) {
  15163. if (isDef(i.create)) { i.create(emptyNode, vnode); }
  15164. if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }
  15165. }
  15166. }
  15167. // set scope id attribute for scoped CSS.
  15168. // this is implemented as a special case to avoid the overhead
  15169. // of going through the normal attribute patching process.
  15170. function setScope (vnode) {
  15171. var i;
  15172. var ancestor = vnode;
  15173. while (ancestor) {
  15174. if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {
  15175. nodeOps.setAttribute(vnode.elm, i, '');
  15176. }
  15177. ancestor = ancestor.parent;
  15178. }
  15179. // for slot content they should also get the scopeId from the host instance.
  15180. if (isDef(i = activeInstance) &&
  15181. i !== vnode.context &&
  15182. isDef(i = i.$options._scopeId)
  15183. ) {
  15184. nodeOps.setAttribute(vnode.elm, i, '');
  15185. }
  15186. }
  15187. function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
  15188. for (; startIdx <= endIdx; ++startIdx) {
  15189. createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm);
  15190. }
  15191. }
  15192. function invokeDestroyHook (vnode) {
  15193. var i, j;
  15194. var data = vnode.data;
  15195. if (isDef(data)) {
  15196. if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }
  15197. for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }
  15198. }
  15199. if (isDef(i = vnode.children)) {
  15200. for (j = 0; j < vnode.children.length; ++j) {
  15201. invokeDestroyHook(vnode.children[j]);
  15202. }
  15203. }
  15204. }
  15205. function removeVnodes (parentElm, vnodes, startIdx, endIdx) {
  15206. for (; startIdx <= endIdx; ++startIdx) {
  15207. var ch = vnodes[startIdx];
  15208. if (isDef(ch)) {
  15209. if (isDef(ch.tag)) {
  15210. removeAndInvokeRemoveHook(ch);
  15211. invokeDestroyHook(ch);
  15212. } else { // Text node
  15213. removeNode(ch.elm);
  15214. }
  15215. }
  15216. }
  15217. }
  15218. function removeAndInvokeRemoveHook (vnode, rm) {
  15219. if (isDef(rm) || isDef(vnode.data)) {
  15220. var i;
  15221. var listeners = cbs.remove.length + 1;
  15222. if (isDef(rm)) {
  15223. // we have a recursively passed down rm callback
  15224. // increase the listeners count
  15225. rm.listeners += listeners;
  15226. } else {
  15227. // directly removing
  15228. rm = createRmCb(vnode.elm, listeners);
  15229. }
  15230. // recursively invoke hooks on child component root node
  15231. if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {
  15232. removeAndInvokeRemoveHook(i, rm);
  15233. }
  15234. for (i = 0; i < cbs.remove.length; ++i) {
  15235. cbs.remove[i](vnode, rm);
  15236. }
  15237. if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {
  15238. i(vnode, rm);
  15239. } else {
  15240. rm();
  15241. }
  15242. } else {
  15243. removeNode(vnode.elm);
  15244. }
  15245. }
  15246. function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
  15247. var oldStartIdx = 0;
  15248. var newStartIdx = 0;
  15249. var oldEndIdx = oldCh.length - 1;
  15250. var oldStartVnode = oldCh[0];
  15251. var oldEndVnode = oldCh[oldEndIdx];
  15252. var newEndIdx = newCh.length - 1;
  15253. var newStartVnode = newCh[0];
  15254. var newEndVnode = newCh[newEndIdx];
  15255. var oldKeyToIdx, idxInOld, elmToMove, refElm;
  15256. // removeOnly is a special flag used only by <transition-group>
  15257. // to ensure removed elements stay in correct relative positions
  15258. // during leaving transitions
  15259. var canMove = !removeOnly;
  15260. while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
  15261. if (isUndef(oldStartVnode)) {
  15262. oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left
  15263. } else if (isUndef(oldEndVnode)) {
  15264. oldEndVnode = oldCh[--oldEndIdx];
  15265. } else if (sameVnode(oldStartVnode, newStartVnode)) {
  15266. patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);
  15267. oldStartVnode = oldCh[++oldStartIdx];
  15268. newStartVnode = newCh[++newStartIdx];
  15269. } else if (sameVnode(oldEndVnode, newEndVnode)) {
  15270. patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);
  15271. oldEndVnode = oldCh[--oldEndIdx];
  15272. newEndVnode = newCh[--newEndIdx];
  15273. } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right
  15274. patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);
  15275. canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
  15276. oldStartVnode = oldCh[++oldStartIdx];
  15277. newEndVnode = newCh[--newEndIdx];
  15278. } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left
  15279. patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);
  15280. canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
  15281. oldEndVnode = oldCh[--oldEndIdx];
  15282. newStartVnode = newCh[++newStartIdx];
  15283. } else {
  15284. if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }
  15285. idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : null;
  15286. if (isUndef(idxInOld)) { // New element
  15287. createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);
  15288. newStartVnode = newCh[++newStartIdx];
  15289. } else {
  15290. elmToMove = oldCh[idxInOld];
  15291. /* istanbul ignore if */
  15292. if (process.env.NODE_ENV !== 'production' && !elmToMove) {
  15293. warn(
  15294. 'It seems there are duplicate keys that is causing an update error. ' +
  15295. 'Make sure each v-for item has a unique key.'
  15296. );
  15297. }
  15298. if (sameVnode(elmToMove, newStartVnode)) {
  15299. patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);
  15300. oldCh[idxInOld] = undefined;
  15301. canMove && nodeOps.insertBefore(parentElm, newStartVnode.elm, oldStartVnode.elm);
  15302. newStartVnode = newCh[++newStartIdx];
  15303. } else {
  15304. // same key but different element. treat as new element
  15305. createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);
  15306. newStartVnode = newCh[++newStartIdx];
  15307. }
  15308. }
  15309. }
  15310. }
  15311. if (oldStartIdx > oldEndIdx) {
  15312. refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
  15313. addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
  15314. } else if (newStartIdx > newEndIdx) {
  15315. removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
  15316. }
  15317. }
  15318. function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {
  15319. if (oldVnode === vnode) {
  15320. return
  15321. }
  15322. // reuse element for static trees.
  15323. // note we only do this if the vnode is cloned -
  15324. // if the new node is not cloned it means the render functions have been
  15325. // reset by the hot-reload-api and we need to do a proper re-render.
  15326. if (isTrue(vnode.isStatic) &&
  15327. isTrue(oldVnode.isStatic) &&
  15328. vnode.key === oldVnode.key &&
  15329. (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))
  15330. ) {
  15331. vnode.elm = oldVnode.elm;
  15332. vnode.componentInstance = oldVnode.componentInstance;
  15333. return
  15334. }
  15335. var i;
  15336. var data = vnode.data;
  15337. if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {
  15338. i(oldVnode, vnode);
  15339. }
  15340. var elm = vnode.elm = oldVnode.elm;
  15341. var oldCh = oldVnode.children;
  15342. var ch = vnode.children;
  15343. if (isDef(data) && isPatchable(vnode)) {
  15344. for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }
  15345. if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }
  15346. }
  15347. if (isUndef(vnode.text)) {
  15348. if (isDef(oldCh) && isDef(ch)) {
  15349. if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }
  15350. } else if (isDef(ch)) {
  15351. if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
  15352. addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
  15353. } else if (isDef(oldCh)) {
  15354. removeVnodes(elm, oldCh, 0, oldCh.length - 1);
  15355. } else if (isDef(oldVnode.text)) {
  15356. nodeOps.setTextContent(elm, '');
  15357. }
  15358. } else if (oldVnode.text !== vnode.text) {
  15359. nodeOps.setTextContent(elm, vnode.text);
  15360. }
  15361. if (isDef(data)) {
  15362. if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }
  15363. }
  15364. }
  15365. function invokeInsertHook (vnode, queue, initial) {
  15366. // delay insert hooks for component root nodes, invoke them after the
  15367. // element is really inserted
  15368. if (isTrue(initial) && isDef(vnode.parent)) {
  15369. vnode.parent.data.pendingInsert = queue;
  15370. } else {
  15371. for (var i = 0; i < queue.length; ++i) {
  15372. queue[i].data.hook.insert(queue[i]);
  15373. }
  15374. }
  15375. }
  15376. var bailed = false;
  15377. // list of modules that can skip create hook during hydration because they
  15378. // are already rendered on the client or has no need for initialization
  15379. var isRenderedModule = makeMap('attrs,style,class,staticClass,staticStyle,key');
  15380. // Note: this is a browser-only function so we can assume elms are DOM nodes.
  15381. function hydrate (elm, vnode, insertedVnodeQueue) {
  15382. if (process.env.NODE_ENV !== 'production') {
  15383. if (!assertNodeMatch(elm, vnode)) {
  15384. return false
  15385. }
  15386. }
  15387. vnode.elm = elm;
  15388. var tag = vnode.tag;
  15389. var data = vnode.data;
  15390. var children = vnode.children;
  15391. if (isDef(data)) {
  15392. if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }
  15393. if (isDef(i = vnode.componentInstance)) {
  15394. // child component. it should have hydrated its own tree.
  15395. initComponent(vnode, insertedVnodeQueue);
  15396. return true
  15397. }
  15398. }
  15399. if (isDef(tag)) {
  15400. if (isDef(children)) {
  15401. // empty element, allow client to pick up and populate children
  15402. if (!elm.hasChildNodes()) {
  15403. createChildren(vnode, children, insertedVnodeQueue);
  15404. } else {
  15405. var childrenMatch = true;
  15406. var childNode = elm.firstChild;
  15407. for (var i$1 = 0; i$1 < children.length; i$1++) {
  15408. if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue)) {
  15409. childrenMatch = false;
  15410. break
  15411. }
  15412. childNode = childNode.nextSibling;
  15413. }
  15414. // if childNode is not null, it means the actual childNodes list is
  15415. // longer than the virtual children list.
  15416. if (!childrenMatch || childNode) {
  15417. if (process.env.NODE_ENV !== 'production' &&
  15418. typeof console !== 'undefined' &&
  15419. !bailed
  15420. ) {
  15421. bailed = true;
  15422. console.warn('Parent: ', elm);
  15423. console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
  15424. }
  15425. return false
  15426. }
  15427. }
  15428. }
  15429. if (isDef(data)) {
  15430. for (var key in data) {
  15431. if (!isRenderedModule(key)) {
  15432. invokeCreateHooks(vnode, insertedVnodeQueue);
  15433. break
  15434. }
  15435. }
  15436. }
  15437. } else if (elm.data !== vnode.text) {
  15438. elm.data = vnode.text;
  15439. }
  15440. return true
  15441. }
  15442. function assertNodeMatch (node, vnode) {
  15443. if (isDef(vnode.tag)) {
  15444. return (
  15445. vnode.tag.indexOf('vue-component') === 0 ||
  15446. vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())
  15447. )
  15448. } else {
  15449. return node.nodeType === (vnode.isComment ? 8 : 3)
  15450. }
  15451. }
  15452. return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) {
  15453. if (isUndef(vnode)) {
  15454. if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }
  15455. return
  15456. }
  15457. var isInitialPatch = false;
  15458. var insertedVnodeQueue = [];
  15459. if (isUndef(oldVnode)) {
  15460. // empty mount (likely as component), create new root element
  15461. isInitialPatch = true;
  15462. createElm(vnode, insertedVnodeQueue, parentElm, refElm);
  15463. } else {
  15464. var isRealElement = isDef(oldVnode.nodeType);
  15465. if (!isRealElement && sameVnode(oldVnode, vnode)) {
  15466. // patch existing root node
  15467. patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly);
  15468. } else {
  15469. if (isRealElement) {
  15470. // mounting to a real element
  15471. // check if this is server-rendered content and if we can perform
  15472. // a successful hydration.
  15473. if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {
  15474. oldVnode.removeAttribute(SSR_ATTR);
  15475. hydrating = true;
  15476. }
  15477. if (isTrue(hydrating)) {
  15478. if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
  15479. invokeInsertHook(vnode, insertedVnodeQueue, true);
  15480. return oldVnode
  15481. } else if (process.env.NODE_ENV !== 'production') {
  15482. warn(
  15483. 'The client-side rendered virtual DOM tree is not matching ' +
  15484. 'server-rendered content. This is likely caused by incorrect ' +
  15485. 'HTML markup, for example nesting block-level elements inside ' +
  15486. '<p>, or missing <tbody>. Bailing hydration and performing ' +
  15487. 'full client-side render.'
  15488. );
  15489. }
  15490. }
  15491. // either not server-rendered, or hydration failed.
  15492. // create an empty node and replace it
  15493. oldVnode = emptyNodeAt(oldVnode);
  15494. }
  15495. // replacing existing element
  15496. var oldElm = oldVnode.elm;
  15497. var parentElm$1 = nodeOps.parentNode(oldElm);
  15498. createElm(
  15499. vnode,
  15500. insertedVnodeQueue,
  15501. // extremely rare edge case: do not insert if old element is in a
  15502. // leaving transition. Only happens when combining transition +
  15503. // keep-alive + HOCs. (#4590)
  15504. oldElm._leaveCb ? null : parentElm$1,
  15505. nodeOps.nextSibling(oldElm)
  15506. );
  15507. if (isDef(vnode.parent)) {
  15508. // component root element replaced.
  15509. // update parent placeholder node element, recursively
  15510. var ancestor = vnode.parent;
  15511. while (ancestor) {
  15512. ancestor.elm = vnode.elm;
  15513. ancestor = ancestor.parent;
  15514. }
  15515. if (isPatchable(vnode)) {
  15516. for (var i = 0; i < cbs.create.length; ++i) {
  15517. cbs.create[i](emptyNode, vnode.parent);
  15518. }
  15519. }
  15520. }
  15521. if (isDef(parentElm$1)) {
  15522. removeVnodes(parentElm$1, [oldVnode], 0, 0);
  15523. } else if (isDef(oldVnode.tag)) {
  15524. invokeDestroyHook(oldVnode);
  15525. }
  15526. }
  15527. }
  15528. invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
  15529. return vnode.elm
  15530. }
  15531. }
  15532. /* */
  15533. var directives = {
  15534. create: updateDirectives,
  15535. update: updateDirectives,
  15536. destroy: function unbindDirectives (vnode) {
  15537. updateDirectives(vnode, emptyNode);
  15538. }
  15539. };
  15540. function updateDirectives (oldVnode, vnode) {
  15541. if (oldVnode.data.directives || vnode.data.directives) {
  15542. _update(oldVnode, vnode);
  15543. }
  15544. }
  15545. function _update (oldVnode, vnode) {
  15546. var isCreate = oldVnode === emptyNode;
  15547. var isDestroy = vnode === emptyNode;
  15548. var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);
  15549. var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);
  15550. var dirsWithInsert = [];
  15551. var dirsWithPostpatch = [];
  15552. var key, oldDir, dir;
  15553. for (key in newDirs) {
  15554. oldDir = oldDirs[key];
  15555. dir = newDirs[key];
  15556. if (!oldDir) {
  15557. // new directive, bind
  15558. callHook$1(dir, 'bind', vnode, oldVnode);
  15559. if (dir.def && dir.def.inserted) {
  15560. dirsWithInsert.push(dir);
  15561. }
  15562. } else {
  15563. // existing directive, update
  15564. dir.oldValue = oldDir.value;
  15565. callHook$1(dir, 'update', vnode, oldVnode);
  15566. if (dir.def && dir.def.componentUpdated) {
  15567. dirsWithPostpatch.push(dir);
  15568. }
  15569. }
  15570. }
  15571. if (dirsWithInsert.length) {
  15572. var callInsert = function () {
  15573. for (var i = 0; i < dirsWithInsert.length; i++) {
  15574. callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);
  15575. }
  15576. };
  15577. if (isCreate) {
  15578. mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', callInsert);
  15579. } else {
  15580. callInsert();
  15581. }
  15582. }
  15583. if (dirsWithPostpatch.length) {
  15584. mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'postpatch', function () {
  15585. for (var i = 0; i < dirsWithPostpatch.length; i++) {
  15586. callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
  15587. }
  15588. });
  15589. }
  15590. if (!isCreate) {
  15591. for (key in oldDirs) {
  15592. if (!newDirs[key]) {
  15593. // no longer present, unbind
  15594. callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);
  15595. }
  15596. }
  15597. }
  15598. }
  15599. var emptyModifiers = Object.create(null);
  15600. function normalizeDirectives$1 (
  15601. dirs,
  15602. vm
  15603. ) {
  15604. var res = Object.create(null);
  15605. if (!dirs) {
  15606. return res
  15607. }
  15608. var i, dir;
  15609. for (i = 0; i < dirs.length; i++) {
  15610. dir = dirs[i];
  15611. if (!dir.modifiers) {
  15612. dir.modifiers = emptyModifiers;
  15613. }
  15614. res[getRawDirName(dir)] = dir;
  15615. dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);
  15616. }
  15617. return res
  15618. }
  15619. function getRawDirName (dir) {
  15620. return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.')))
  15621. }
  15622. function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {
  15623. var fn = dir.def && dir.def[hook];
  15624. if (fn) {
  15625. try {
  15626. fn(vnode.elm, dir, vnode, oldVnode, isDestroy);
  15627. } catch (e) {
  15628. handleError(e, vnode.context, ("directive " + (dir.name) + " " + hook + " hook"));
  15629. }
  15630. }
  15631. }
  15632. var baseModules = [
  15633. ref,
  15634. directives
  15635. ];
  15636. /* */
  15637. function updateAttrs (oldVnode, vnode) {
  15638. if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
  15639. return
  15640. }
  15641. var key, cur, old;
  15642. var elm = vnode.elm;
  15643. var oldAttrs = oldVnode.data.attrs || {};
  15644. var attrs = vnode.data.attrs || {};
  15645. // clone observed objects, as the user probably wants to mutate it
  15646. if (isDef(attrs.__ob__)) {
  15647. attrs = vnode.data.attrs = extend({}, attrs);
  15648. }
  15649. for (key in attrs) {
  15650. cur = attrs[key];
  15651. old = oldAttrs[key];
  15652. if (old !== cur) {
  15653. setAttr(elm, key, cur);
  15654. }
  15655. }
  15656. // #4391: in IE9, setting type can reset value for input[type=radio]
  15657. /* istanbul ignore if */
  15658. if (isIE9 && attrs.value !== oldAttrs.value) {
  15659. setAttr(elm, 'value', attrs.value);
  15660. }
  15661. for (key in oldAttrs) {
  15662. if (isUndef(attrs[key])) {
  15663. if (isXlink(key)) {
  15664. elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
  15665. } else if (!isEnumeratedAttr(key)) {
  15666. elm.removeAttribute(key);
  15667. }
  15668. }
  15669. }
  15670. }
  15671. function setAttr (el, key, value) {
  15672. if (isBooleanAttr(key)) {
  15673. // set attribute for blank value
  15674. // e.g. <option disabled>Select one</option>
  15675. if (isFalsyAttrValue(value)) {
  15676. el.removeAttribute(key);
  15677. } else {
  15678. el.setAttribute(key, key);
  15679. }
  15680. } else if (isEnumeratedAttr(key)) {
  15681. el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');
  15682. } else if (isXlink(key)) {
  15683. if (isFalsyAttrValue(value)) {
  15684. el.removeAttributeNS(xlinkNS, getXlinkProp(key));
  15685. } else {
  15686. el.setAttributeNS(xlinkNS, key, value);
  15687. }
  15688. } else {
  15689. if (isFalsyAttrValue(value)) {
  15690. el.removeAttribute(key);
  15691. } else {
  15692. el.setAttribute(key, value);
  15693. }
  15694. }
  15695. }
  15696. var attrs = {
  15697. create: updateAttrs,
  15698. update: updateAttrs
  15699. };
  15700. /* */
  15701. function updateClass (oldVnode, vnode) {
  15702. var el = vnode.elm;
  15703. var data = vnode.data;
  15704. var oldData = oldVnode.data;
  15705. if (
  15706. isUndef(data.staticClass) &&
  15707. isUndef(data.class) && (
  15708. isUndef(oldData) || (
  15709. isUndef(oldData.staticClass) &&
  15710. isUndef(oldData.class)
  15711. )
  15712. )
  15713. ) {
  15714. return
  15715. }
  15716. var cls = genClassForVnode(vnode);
  15717. // handle transition classes
  15718. var transitionClass = el._transitionClasses;
  15719. if (isDef(transitionClass)) {
  15720. cls = concat(cls, stringifyClass(transitionClass));
  15721. }
  15722. // set the class
  15723. if (cls !== el._prevClass) {
  15724. el.setAttribute('class', cls);
  15725. el._prevClass = cls;
  15726. }
  15727. }
  15728. var klass = {
  15729. create: updateClass,
  15730. update: updateClass
  15731. };
  15732. /* */
  15733. var validDivisionCharRE = /[\w).+\-_$\]]/;
  15734. function wrapFilter (exp, filter) {
  15735. var i = filter.indexOf('(');
  15736. if (i < 0) {
  15737. // _f: resolveFilter
  15738. return ("_f(\"" + filter + "\")(" + exp + ")")
  15739. } else {
  15740. var name = filter.slice(0, i);
  15741. var args = filter.slice(i + 1);
  15742. return ("_f(\"" + name + "\")(" + exp + "," + args)
  15743. }
  15744. }
  15745. /* */
  15746. /* */
  15747. /**
  15748. * Cross-platform code generation for component v-model
  15749. */
  15750. /**
  15751. * Cross-platform codegen helper for generating v-model value assignment code.
  15752. */
  15753. /**
  15754. * parse directive model to do the array update transform. a[idx] = val => $$a.splice($$idx, 1, val)
  15755. *
  15756. * for loop possible cases:
  15757. *
  15758. * - test
  15759. * - test[idx]
  15760. * - test[test1[idx]]
  15761. * - test["a"][idx]
  15762. * - xxx.test[a[a].test1[idx]]
  15763. * - test.xxx.a["asa"][test1[idx]]
  15764. *
  15765. */
  15766. var str;
  15767. var index$1;
  15768. /* */
  15769. // in some cases, the event used has to be determined at runtime
  15770. // so we used some reserved tokens during compile.
  15771. var RANGE_TOKEN = '__r';
  15772. var CHECKBOX_RADIO_TOKEN = '__c';
  15773. /* */
  15774. // normalize v-model event tokens that can only be determined at runtime.
  15775. // it's important to place the event as the first in the array because
  15776. // the whole point is ensuring the v-model callback gets called before
  15777. // user-attached handlers.
  15778. function normalizeEvents (on) {
  15779. var event;
  15780. /* istanbul ignore if */
  15781. if (isDef(on[RANGE_TOKEN])) {
  15782. // IE input[type=range] only supports `change` event
  15783. event = isIE ? 'change' : 'input';
  15784. on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);
  15785. delete on[RANGE_TOKEN];
  15786. }
  15787. if (isDef(on[CHECKBOX_RADIO_TOKEN])) {
  15788. // Chrome fires microtasks in between click/change, leads to #4521
  15789. event = isChrome ? 'click' : 'change';
  15790. on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);
  15791. delete on[CHECKBOX_RADIO_TOKEN];
  15792. }
  15793. }
  15794. var target$1;
  15795. function add$1 (
  15796. event,
  15797. handler,
  15798. once$$1,
  15799. capture,
  15800. passive
  15801. ) {
  15802. if (once$$1) {
  15803. var oldHandler = handler;
  15804. var _target = target$1; // save current target element in closure
  15805. handler = function (ev) {
  15806. var res = arguments.length === 1
  15807. ? oldHandler(ev)
  15808. : oldHandler.apply(null, arguments);
  15809. if (res !== null) {
  15810. remove$2(event, handler, capture, _target);
  15811. }
  15812. };
  15813. }
  15814. target$1.addEventListener(
  15815. event,
  15816. handler,
  15817. supportsPassive
  15818. ? { capture: capture, passive: passive }
  15819. : capture
  15820. );
  15821. }
  15822. function remove$2 (
  15823. event,
  15824. handler,
  15825. capture,
  15826. _target
  15827. ) {
  15828. (_target || target$1).removeEventListener(event, handler, capture);
  15829. }
  15830. function updateDOMListeners (oldVnode, vnode) {
  15831. if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
  15832. return
  15833. }
  15834. var on = vnode.data.on || {};
  15835. var oldOn = oldVnode.data.on || {};
  15836. target$1 = vnode.elm;
  15837. normalizeEvents(on);
  15838. updateListeners(on, oldOn, add$1, remove$2, vnode.context);
  15839. }
  15840. var events = {
  15841. create: updateDOMListeners,
  15842. update: updateDOMListeners
  15843. };
  15844. /* */
  15845. function updateDOMProps (oldVnode, vnode) {
  15846. if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
  15847. return
  15848. }
  15849. var key, cur;
  15850. var elm = vnode.elm;
  15851. var oldProps = oldVnode.data.domProps || {};
  15852. var props = vnode.data.domProps || {};
  15853. // clone observed objects, as the user probably wants to mutate it
  15854. if (isDef(props.__ob__)) {
  15855. props = vnode.data.domProps = extend({}, props);
  15856. }
  15857. for (key in oldProps) {
  15858. if (isUndef(props[key])) {
  15859. elm[key] = '';
  15860. }
  15861. }
  15862. for (key in props) {
  15863. cur = props[key];
  15864. // ignore children if the node has textContent or innerHTML,
  15865. // as these will throw away existing DOM nodes and cause removal errors
  15866. // on subsequent patches (#3360)
  15867. if (key === 'textContent' || key === 'innerHTML') {
  15868. if (vnode.children) { vnode.children.length = 0; }
  15869. if (cur === oldProps[key]) { continue }
  15870. }
  15871. if (key === 'value') {
  15872. // store value as _value as well since
  15873. // non-string values will be stringified
  15874. elm._value = cur;
  15875. // avoid resetting cursor position when value is the same
  15876. var strCur = isUndef(cur) ? '' : String(cur);
  15877. if (shouldUpdateValue(elm, vnode, strCur)) {
  15878. elm.value = strCur;
  15879. }
  15880. } else {
  15881. elm[key] = cur;
  15882. }
  15883. }
  15884. }
  15885. // check platforms/web/util/attrs.js acceptValue
  15886. function shouldUpdateValue (
  15887. elm,
  15888. vnode,
  15889. checkVal
  15890. ) {
  15891. return (!elm.composing && (
  15892. vnode.tag === 'option' ||
  15893. isDirty(elm, checkVal) ||
  15894. isInputChanged(elm, checkVal)
  15895. ))
  15896. }
  15897. function isDirty (elm, checkVal) {
  15898. // return true when textbox (.number and .trim) loses focus and its value is not equal to the updated value
  15899. return document.activeElement !== elm && elm.value !== checkVal
  15900. }
  15901. function isInputChanged (elm, newVal) {
  15902. var value = elm.value;
  15903. var modifiers = elm._vModifiers; // injected by v-model runtime
  15904. if ((isDef(modifiers) && modifiers.number) || elm.type === 'number') {
  15905. return toNumber(value) !== toNumber(newVal)
  15906. }
  15907. if (isDef(modifiers) && modifiers.trim) {
  15908. return value.trim() !== newVal.trim()
  15909. }
  15910. return value !== newVal
  15911. }
  15912. var domProps = {
  15913. create: updateDOMProps,
  15914. update: updateDOMProps
  15915. };
  15916. /* */
  15917. var parseStyleText = cached(function (cssText) {
  15918. var res = {};
  15919. var listDelimiter = /;(?![^(]*\))/g;
  15920. var propertyDelimiter = /:(.+)/;
  15921. cssText.split(listDelimiter).forEach(function (item) {
  15922. if (item) {
  15923. var tmp = item.split(propertyDelimiter);
  15924. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  15925. }
  15926. });
  15927. return res
  15928. });
  15929. // merge static and dynamic style data on the same vnode
  15930. function normalizeStyleData (data) {
  15931. var style = normalizeStyleBinding(data.style);
  15932. // static style is pre-processed into an object during compilation
  15933. // and is always a fresh object, so it's safe to merge into it
  15934. return data.staticStyle
  15935. ? extend(data.staticStyle, style)
  15936. : style
  15937. }
  15938. // normalize possible array / string values into Object
  15939. function normalizeStyleBinding (bindingStyle) {
  15940. if (Array.isArray(bindingStyle)) {
  15941. return toObject(bindingStyle)
  15942. }
  15943. if (typeof bindingStyle === 'string') {
  15944. return parseStyleText(bindingStyle)
  15945. }
  15946. return bindingStyle
  15947. }
  15948. /**
  15949. * parent component style should be after child's
  15950. * so that parent component's style could override it
  15951. */
  15952. function getStyle (vnode, checkChild) {
  15953. var res = {};
  15954. var styleData;
  15955. if (checkChild) {
  15956. var childNode = vnode;
  15957. while (childNode.componentInstance) {
  15958. childNode = childNode.componentInstance._vnode;
  15959. if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {
  15960. extend(res, styleData);
  15961. }
  15962. }
  15963. }
  15964. if ((styleData = normalizeStyleData(vnode.data))) {
  15965. extend(res, styleData);
  15966. }
  15967. var parentNode = vnode;
  15968. while ((parentNode = parentNode.parent)) {
  15969. if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
  15970. extend(res, styleData);
  15971. }
  15972. }
  15973. return res
  15974. }
  15975. /* */
  15976. var cssVarRE = /^--/;
  15977. var importantRE = /\s*!important$/;
  15978. var setProp = function (el, name, val) {
  15979. /* istanbul ignore if */
  15980. if (cssVarRE.test(name)) {
  15981. el.style.setProperty(name, val);
  15982. } else if (importantRE.test(val)) {
  15983. el.style.setProperty(name, val.replace(importantRE, ''), 'important');
  15984. } else {
  15985. var normalizedName = normalize(name);
  15986. if (Array.isArray(val)) {
  15987. // Support values array created by autoprefixer, e.g.
  15988. // {display: ["-webkit-box", "-ms-flexbox", "flex"]}
  15989. // Set them one by one, and the browser will only set those it can recognize
  15990. for (var i = 0, len = val.length; i < len; i++) {
  15991. el.style[normalizedName] = val[i];
  15992. }
  15993. } else {
  15994. el.style[normalizedName] = val;
  15995. }
  15996. }
  15997. };
  15998. var prefixes = ['Webkit', 'Moz', 'ms'];
  15999. var testEl;
  16000. var normalize = cached(function (prop) {
  16001. testEl = testEl || document.createElement('div');
  16002. prop = camelize(prop);
  16003. if (prop !== 'filter' && (prop in testEl.style)) {
  16004. return prop
  16005. }
  16006. var upper = prop.charAt(0).toUpperCase() + prop.slice(1);
  16007. for (var i = 0; i < prefixes.length; i++) {
  16008. var prefixed = prefixes[i] + upper;
  16009. if (prefixed in testEl.style) {
  16010. return prefixed
  16011. }
  16012. }
  16013. });
  16014. function updateStyle (oldVnode, vnode) {
  16015. var data = vnode.data;
  16016. var oldData = oldVnode.data;
  16017. if (isUndef(data.staticStyle) && isUndef(data.style) &&
  16018. isUndef(oldData.staticStyle) && isUndef(oldData.style)
  16019. ) {
  16020. return
  16021. }
  16022. var cur, name;
  16023. var el = vnode.elm;
  16024. var oldStaticStyle = oldData.staticStyle;
  16025. var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};
  16026. // if static style exists, stylebinding already merged into it when doing normalizeStyleData
  16027. var oldStyle = oldStaticStyle || oldStyleBinding;
  16028. var style = normalizeStyleBinding(vnode.data.style) || {};
  16029. // store normalized style under a different key for next diff
  16030. // make sure to clone it if it's reactive, since the user likley wants
  16031. // to mutate it.
  16032. vnode.data.normalizedStyle = isDef(style.__ob__)
  16033. ? extend({}, style)
  16034. : style;
  16035. var newStyle = getStyle(vnode, true);
  16036. for (name in oldStyle) {
  16037. if (isUndef(newStyle[name])) {
  16038. setProp(el, name, '');
  16039. }
  16040. }
  16041. for (name in newStyle) {
  16042. cur = newStyle[name];
  16043. if (cur !== oldStyle[name]) {
  16044. // ie9 setting to null has no effect, must use empty string
  16045. setProp(el, name, cur == null ? '' : cur);
  16046. }
  16047. }
  16048. }
  16049. var style = {
  16050. create: updateStyle,
  16051. update: updateStyle
  16052. };
  16053. /* */
  16054. /**
  16055. * Add class with compatibility for SVG since classList is not supported on
  16056. * SVG elements in IE
  16057. */
  16058. function addClass (el, cls) {
  16059. /* istanbul ignore if */
  16060. if (!cls || !(cls = cls.trim())) {
  16061. return
  16062. }
  16063. /* istanbul ignore else */
  16064. if (el.classList) {
  16065. if (cls.indexOf(' ') > -1) {
  16066. cls.split(/\s+/).forEach(function (c) { return el.classList.add(c); });
  16067. } else {
  16068. el.classList.add(cls);
  16069. }
  16070. } else {
  16071. var cur = " " + (el.getAttribute('class') || '') + " ";
  16072. if (cur.indexOf(' ' + cls + ' ') < 0) {
  16073. el.setAttribute('class', (cur + cls).trim());
  16074. }
  16075. }
  16076. }
  16077. /**
  16078. * Remove class with compatibility for SVG since classList is not supported on
  16079. * SVG elements in IE
  16080. */
  16081. function removeClass (el, cls) {
  16082. /* istanbul ignore if */
  16083. if (!cls || !(cls = cls.trim())) {
  16084. return
  16085. }
  16086. /* istanbul ignore else */
  16087. if (el.classList) {
  16088. if (cls.indexOf(' ') > -1) {
  16089. cls.split(/\s+/).forEach(function (c) { return el.classList.remove(c); });
  16090. } else {
  16091. el.classList.remove(cls);
  16092. }
  16093. } else {
  16094. var cur = " " + (el.getAttribute('class') || '') + " ";
  16095. var tar = ' ' + cls + ' ';
  16096. while (cur.indexOf(tar) >= 0) {
  16097. cur = cur.replace(tar, ' ');
  16098. }
  16099. el.setAttribute('class', cur.trim());
  16100. }
  16101. }
  16102. /* */
  16103. function resolveTransition (def$$1) {
  16104. if (!def$$1) {
  16105. return
  16106. }
  16107. /* istanbul ignore else */
  16108. if (typeof def$$1 === 'object') {
  16109. var res = {};
  16110. if (def$$1.css !== false) {
  16111. extend(res, autoCssTransition(def$$1.name || 'v'));
  16112. }
  16113. extend(res, def$$1);
  16114. return res
  16115. } else if (typeof def$$1 === 'string') {
  16116. return autoCssTransition(def$$1)
  16117. }
  16118. }
  16119. var autoCssTransition = cached(function (name) {
  16120. return {
  16121. enterClass: (name + "-enter"),
  16122. enterToClass: (name + "-enter-to"),
  16123. enterActiveClass: (name + "-enter-active"),
  16124. leaveClass: (name + "-leave"),
  16125. leaveToClass: (name + "-leave-to"),
  16126. leaveActiveClass: (name + "-leave-active")
  16127. }
  16128. });
  16129. var hasTransition = inBrowser && !isIE9;
  16130. var TRANSITION = 'transition';
  16131. var ANIMATION = 'animation';
  16132. // Transition property/event sniffing
  16133. var transitionProp = 'transition';
  16134. var transitionEndEvent = 'transitionend';
  16135. var animationProp = 'animation';
  16136. var animationEndEvent = 'animationend';
  16137. if (hasTransition) {
  16138. /* istanbul ignore if */
  16139. if (window.ontransitionend === undefined &&
  16140. window.onwebkittransitionend !== undefined
  16141. ) {
  16142. transitionProp = 'WebkitTransition';
  16143. transitionEndEvent = 'webkitTransitionEnd';
  16144. }
  16145. if (window.onanimationend === undefined &&
  16146. window.onwebkitanimationend !== undefined
  16147. ) {
  16148. animationProp = 'WebkitAnimation';
  16149. animationEndEvent = 'webkitAnimationEnd';
  16150. }
  16151. }
  16152. // binding to window is necessary to make hot reload work in IE in strict mode
  16153. var raf = inBrowser && window.requestAnimationFrame
  16154. ? window.requestAnimationFrame.bind(window)
  16155. : setTimeout;
  16156. function nextFrame (fn) {
  16157. raf(function () {
  16158. raf(fn);
  16159. });
  16160. }
  16161. function addTransitionClass (el, cls) {
  16162. (el._transitionClasses || (el._transitionClasses = [])).push(cls);
  16163. addClass(el, cls);
  16164. }
  16165. function removeTransitionClass (el, cls) {
  16166. if (el._transitionClasses) {
  16167. remove(el._transitionClasses, cls);
  16168. }
  16169. removeClass(el, cls);
  16170. }
  16171. function whenTransitionEnds (
  16172. el,
  16173. expectedType,
  16174. cb
  16175. ) {
  16176. var ref = getTransitionInfo(el, expectedType);
  16177. var type = ref.type;
  16178. var timeout = ref.timeout;
  16179. var propCount = ref.propCount;
  16180. if (!type) { return cb() }
  16181. var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
  16182. var ended = 0;
  16183. var end = function () {
  16184. el.removeEventListener(event, onEnd);
  16185. cb();
  16186. };
  16187. var onEnd = function (e) {
  16188. if (e.target === el) {
  16189. if (++ended >= propCount) {
  16190. end();
  16191. }
  16192. }
  16193. };
  16194. setTimeout(function () {
  16195. if (ended < propCount) {
  16196. end();
  16197. }
  16198. }, timeout + 1);
  16199. el.addEventListener(event, onEnd);
  16200. }
  16201. var transformRE = /\b(transform|all)(,|$)/;
  16202. function getTransitionInfo (el, expectedType) {
  16203. var styles = window.getComputedStyle(el);
  16204. var transitionDelays = styles[transitionProp + 'Delay'].split(', ');
  16205. var transitionDurations = styles[transitionProp + 'Duration'].split(', ');
  16206. var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  16207. var animationDelays = styles[animationProp + 'Delay'].split(', ');
  16208. var animationDurations = styles[animationProp + 'Duration'].split(', ');
  16209. var animationTimeout = getTimeout(animationDelays, animationDurations);
  16210. var type;
  16211. var timeout = 0;
  16212. var propCount = 0;
  16213. /* istanbul ignore if */
  16214. if (expectedType === TRANSITION) {
  16215. if (transitionTimeout > 0) {
  16216. type = TRANSITION;
  16217. timeout = transitionTimeout;
  16218. propCount = transitionDurations.length;
  16219. }
  16220. } else if (expectedType === ANIMATION) {
  16221. if (animationTimeout > 0) {
  16222. type = ANIMATION;
  16223. timeout = animationTimeout;
  16224. propCount = animationDurations.length;
  16225. }
  16226. } else {
  16227. timeout = Math.max(transitionTimeout, animationTimeout);
  16228. type = timeout > 0
  16229. ? transitionTimeout > animationTimeout
  16230. ? TRANSITION
  16231. : ANIMATION
  16232. : null;
  16233. propCount = type
  16234. ? type === TRANSITION
  16235. ? transitionDurations.length
  16236. : animationDurations.length
  16237. : 0;
  16238. }
  16239. var hasTransform =
  16240. type === TRANSITION &&
  16241. transformRE.test(styles[transitionProp + 'Property']);
  16242. return {
  16243. type: type,
  16244. timeout: timeout,
  16245. propCount: propCount,
  16246. hasTransform: hasTransform
  16247. }
  16248. }
  16249. function getTimeout (delays, durations) {
  16250. /* istanbul ignore next */
  16251. while (delays.length < durations.length) {
  16252. delays = delays.concat(delays);
  16253. }
  16254. return Math.max.apply(null, durations.map(function (d, i) {
  16255. return toMs(d) + toMs(delays[i])
  16256. }))
  16257. }
  16258. function toMs (s) {
  16259. return Number(s.slice(0, -1)) * 1000
  16260. }
  16261. /* */
  16262. function enter (vnode, toggleDisplay) {
  16263. var el = vnode.elm;
  16264. // call leave callback now
  16265. if (isDef(el._leaveCb)) {
  16266. el._leaveCb.cancelled = true;
  16267. el._leaveCb();
  16268. }
  16269. var data = resolveTransition(vnode.data.transition);
  16270. if (isUndef(data)) {
  16271. return
  16272. }
  16273. /* istanbul ignore if */
  16274. if (isDef(el._enterCb) || el.nodeType !== 1) {
  16275. return
  16276. }
  16277. var css = data.css;
  16278. var type = data.type;
  16279. var enterClass = data.enterClass;
  16280. var enterToClass = data.enterToClass;
  16281. var enterActiveClass = data.enterActiveClass;
  16282. var appearClass = data.appearClass;
  16283. var appearToClass = data.appearToClass;
  16284. var appearActiveClass = data.appearActiveClass;
  16285. var beforeEnter = data.beforeEnter;
  16286. var enter = data.enter;
  16287. var afterEnter = data.afterEnter;
  16288. var enterCancelled = data.enterCancelled;
  16289. var beforeAppear = data.beforeAppear;
  16290. var appear = data.appear;
  16291. var afterAppear = data.afterAppear;
  16292. var appearCancelled = data.appearCancelled;
  16293. var duration = data.duration;
  16294. // activeInstance will always be the <transition> component managing this
  16295. // transition. One edge case to check is when the <transition> is placed
  16296. // as the root node of a child component. In that case we need to check
  16297. // <transition>'s parent for appear check.
  16298. var context = activeInstance;
  16299. var transitionNode = activeInstance.$vnode;
  16300. while (transitionNode && transitionNode.parent) {
  16301. transitionNode = transitionNode.parent;
  16302. context = transitionNode.context;
  16303. }
  16304. var isAppear = !context._isMounted || !vnode.isRootInsert;
  16305. if (isAppear && !appear && appear !== '') {
  16306. return
  16307. }
  16308. var startClass = isAppear && appearClass
  16309. ? appearClass
  16310. : enterClass;
  16311. var activeClass = isAppear && appearActiveClass
  16312. ? appearActiveClass
  16313. : enterActiveClass;
  16314. var toClass = isAppear && appearToClass
  16315. ? appearToClass
  16316. : enterToClass;
  16317. var beforeEnterHook = isAppear
  16318. ? (beforeAppear || beforeEnter)
  16319. : beforeEnter;
  16320. var enterHook = isAppear
  16321. ? (typeof appear === 'function' ? appear : enter)
  16322. : enter;
  16323. var afterEnterHook = isAppear
  16324. ? (afterAppear || afterEnter)
  16325. : afterEnter;
  16326. var enterCancelledHook = isAppear
  16327. ? (appearCancelled || enterCancelled)
  16328. : enterCancelled;
  16329. var explicitEnterDuration = toNumber(
  16330. isObject(duration)
  16331. ? duration.enter
  16332. : duration
  16333. );
  16334. if (process.env.NODE_ENV !== 'production' && explicitEnterDuration != null) {
  16335. checkDuration(explicitEnterDuration, 'enter', vnode);
  16336. }
  16337. var expectsCSS = css !== false && !isIE9;
  16338. var userWantsControl = getHookArgumentsLength(enterHook);
  16339. var cb = el._enterCb = once(function () {
  16340. if (expectsCSS) {
  16341. removeTransitionClass(el, toClass);
  16342. removeTransitionClass(el, activeClass);
  16343. }
  16344. if (cb.cancelled) {
  16345. if (expectsCSS) {
  16346. removeTransitionClass(el, startClass);
  16347. }
  16348. enterCancelledHook && enterCancelledHook(el);
  16349. } else {
  16350. afterEnterHook && afterEnterHook(el);
  16351. }
  16352. el._enterCb = null;
  16353. });
  16354. if (!vnode.data.show) {
  16355. // remove pending leave element on enter by injecting an insert hook
  16356. mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', function () {
  16357. var parent = el.parentNode;
  16358. var pendingNode = parent && parent._pending && parent._pending[vnode.key];
  16359. if (pendingNode &&
  16360. pendingNode.tag === vnode.tag &&
  16361. pendingNode.elm._leaveCb
  16362. ) {
  16363. pendingNode.elm._leaveCb();
  16364. }
  16365. enterHook && enterHook(el, cb);
  16366. });
  16367. }
  16368. // start enter transition
  16369. beforeEnterHook && beforeEnterHook(el);
  16370. if (expectsCSS) {
  16371. addTransitionClass(el, startClass);
  16372. addTransitionClass(el, activeClass);
  16373. nextFrame(function () {
  16374. addTransitionClass(el, toClass);
  16375. removeTransitionClass(el, startClass);
  16376. if (!cb.cancelled && !userWantsControl) {
  16377. if (isValidDuration(explicitEnterDuration)) {
  16378. setTimeout(cb, explicitEnterDuration);
  16379. } else {
  16380. whenTransitionEnds(el, type, cb);
  16381. }
  16382. }
  16383. });
  16384. }
  16385. if (vnode.data.show) {
  16386. toggleDisplay && toggleDisplay();
  16387. enterHook && enterHook(el, cb);
  16388. }
  16389. if (!expectsCSS && !userWantsControl) {
  16390. cb();
  16391. }
  16392. }
  16393. function leave (vnode, rm) {
  16394. var el = vnode.elm;
  16395. // call enter callback now
  16396. if (isDef(el._enterCb)) {
  16397. el._enterCb.cancelled = true;
  16398. el._enterCb();
  16399. }
  16400. var data = resolveTransition(vnode.data.transition);
  16401. if (isUndef(data)) {
  16402. return rm()
  16403. }
  16404. /* istanbul ignore if */
  16405. if (isDef(el._leaveCb) || el.nodeType !== 1) {
  16406. return
  16407. }
  16408. var css = data.css;
  16409. var type = data.type;
  16410. var leaveClass = data.leaveClass;
  16411. var leaveToClass = data.leaveToClass;
  16412. var leaveActiveClass = data.leaveActiveClass;
  16413. var beforeLeave = data.beforeLeave;
  16414. var leave = data.leave;
  16415. var afterLeave = data.afterLeave;
  16416. var leaveCancelled = data.leaveCancelled;
  16417. var delayLeave = data.delayLeave;
  16418. var duration = data.duration;
  16419. var expectsCSS = css !== false && !isIE9;
  16420. var userWantsControl = getHookArgumentsLength(leave);
  16421. var explicitLeaveDuration = toNumber(
  16422. isObject(duration)
  16423. ? duration.leave
  16424. : duration
  16425. );
  16426. if (process.env.NODE_ENV !== 'production' && isDef(explicitLeaveDuration)) {
  16427. checkDuration(explicitLeaveDuration, 'leave', vnode);
  16428. }
  16429. var cb = el._leaveCb = once(function () {
  16430. if (el.parentNode && el.parentNode._pending) {
  16431. el.parentNode._pending[vnode.key] = null;
  16432. }
  16433. if (expectsCSS) {
  16434. removeTransitionClass(el, leaveToClass);
  16435. removeTransitionClass(el, leaveActiveClass);
  16436. }
  16437. if (cb.cancelled) {
  16438. if (expectsCSS) {
  16439. removeTransitionClass(el, leaveClass);
  16440. }
  16441. leaveCancelled && leaveCancelled(el);
  16442. } else {
  16443. rm();
  16444. afterLeave && afterLeave(el);
  16445. }
  16446. el._leaveCb = null;
  16447. });
  16448. if (delayLeave) {
  16449. delayLeave(performLeave);
  16450. } else {
  16451. performLeave();
  16452. }
  16453. function performLeave () {
  16454. // the delayed leave may have already been cancelled
  16455. if (cb.cancelled) {
  16456. return
  16457. }
  16458. // record leaving element
  16459. if (!vnode.data.show) {
  16460. (el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode;
  16461. }
  16462. beforeLeave && beforeLeave(el);
  16463. if (expectsCSS) {
  16464. addTransitionClass(el, leaveClass);
  16465. addTransitionClass(el, leaveActiveClass);
  16466. nextFrame(function () {
  16467. addTransitionClass(el, leaveToClass);
  16468. removeTransitionClass(el, leaveClass);
  16469. if (!cb.cancelled && !userWantsControl) {
  16470. if (isValidDuration(explicitLeaveDuration)) {
  16471. setTimeout(cb, explicitLeaveDuration);
  16472. } else {
  16473. whenTransitionEnds(el, type, cb);
  16474. }
  16475. }
  16476. });
  16477. }
  16478. leave && leave(el, cb);
  16479. if (!expectsCSS && !userWantsControl) {
  16480. cb();
  16481. }
  16482. }
  16483. }
  16484. // only used in dev mode
  16485. function checkDuration (val, name, vnode) {
  16486. if (typeof val !== 'number') {
  16487. warn(
  16488. "<transition> explicit " + name + " duration is not a valid number - " +
  16489. "got " + (JSON.stringify(val)) + ".",
  16490. vnode.context
  16491. );
  16492. } else if (isNaN(val)) {
  16493. warn(
  16494. "<transition> explicit " + name + " duration is NaN - " +
  16495. 'the duration expression might be incorrect.',
  16496. vnode.context
  16497. );
  16498. }
  16499. }
  16500. function isValidDuration (val) {
  16501. return typeof val === 'number' && !isNaN(val)
  16502. }
  16503. /**
  16504. * Normalize a transition hook's argument length. The hook may be:
  16505. * - a merged hook (invoker) with the original in .fns
  16506. * - a wrapped component method (check ._length)
  16507. * - a plain function (.length)
  16508. */
  16509. function getHookArgumentsLength (fn) {
  16510. if (isUndef(fn)) {
  16511. return false
  16512. }
  16513. var invokerFns = fn.fns;
  16514. if (isDef(invokerFns)) {
  16515. // invoker
  16516. return getHookArgumentsLength(
  16517. Array.isArray(invokerFns)
  16518. ? invokerFns[0]
  16519. : invokerFns
  16520. )
  16521. } else {
  16522. return (fn._length || fn.length) > 1
  16523. }
  16524. }
  16525. function _enter (_, vnode) {
  16526. if (vnode.data.show !== true) {
  16527. enter(vnode);
  16528. }
  16529. }
  16530. var transition = inBrowser ? {
  16531. create: _enter,
  16532. activate: _enter,
  16533. remove: function remove$$1 (vnode, rm) {
  16534. /* istanbul ignore else */
  16535. if (vnode.data.show !== true) {
  16536. leave(vnode, rm);
  16537. } else {
  16538. rm();
  16539. }
  16540. }
  16541. } : {};
  16542. var platformModules = [
  16543. attrs,
  16544. klass,
  16545. events,
  16546. domProps,
  16547. style,
  16548. transition
  16549. ];
  16550. /* */
  16551. // the directive module should be applied last, after all
  16552. // built-in modules have been applied.
  16553. var modules = platformModules.concat(baseModules);
  16554. var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });
  16555. /**
  16556. * Not type checking this file because flow doesn't like attaching
  16557. * properties to Elements.
  16558. */
  16559. /* istanbul ignore if */
  16560. if (isIE9) {
  16561. // http://www.matts411.com/post/internet-explorer-9-oninput/
  16562. document.addEventListener('selectionchange', function () {
  16563. var el = document.activeElement;
  16564. if (el && el.vmodel) {
  16565. trigger(el, 'input');
  16566. }
  16567. });
  16568. }
  16569. var model$1 = {
  16570. inserted: function inserted (el, binding, vnode) {
  16571. if (vnode.tag === 'select') {
  16572. var cb = function () {
  16573. setSelected(el, binding, vnode.context);
  16574. };
  16575. cb();
  16576. /* istanbul ignore if */
  16577. if (isIE || isEdge) {
  16578. setTimeout(cb, 0);
  16579. }
  16580. } else if (vnode.tag === 'textarea' || el.type === 'text' || el.type === 'password') {
  16581. el._vModifiers = binding.modifiers;
  16582. if (!binding.modifiers.lazy) {
  16583. // Safari < 10.2 & UIWebView doesn't fire compositionend when
  16584. // switching focus before confirming composition choice
  16585. // this also fixes the issue where some browsers e.g. iOS Chrome
  16586. // fires "change" instead of "input" on autocomplete.
  16587. el.addEventListener('change', onCompositionEnd);
  16588. if (!isAndroid) {
  16589. el.addEventListener('compositionstart', onCompositionStart);
  16590. el.addEventListener('compositionend', onCompositionEnd);
  16591. }
  16592. /* istanbul ignore if */
  16593. if (isIE9) {
  16594. el.vmodel = true;
  16595. }
  16596. }
  16597. }
  16598. },
  16599. componentUpdated: function componentUpdated (el, binding, vnode) {
  16600. if (vnode.tag === 'select') {
  16601. setSelected(el, binding, vnode.context);
  16602. // in case the options rendered by v-for have changed,
  16603. // it's possible that the value is out-of-sync with the rendered options.
  16604. // detect such cases and filter out values that no longer has a matching
  16605. // option in the DOM.
  16606. var needReset = el.multiple
  16607. ? binding.value.some(function (v) { return hasNoMatchingOption(v, el.options); })
  16608. : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, el.options);
  16609. if (needReset) {
  16610. trigger(el, 'change');
  16611. }
  16612. }
  16613. }
  16614. };
  16615. function setSelected (el, binding, vm) {
  16616. var value = binding.value;
  16617. var isMultiple = el.multiple;
  16618. if (isMultiple && !Array.isArray(value)) {
  16619. process.env.NODE_ENV !== 'production' && warn(
  16620. "<select multiple v-model=\"" + (binding.expression) + "\"> " +
  16621. "expects an Array value for its binding, but got " + (Object.prototype.toString.call(value).slice(8, -1)),
  16622. vm
  16623. );
  16624. return
  16625. }
  16626. var selected, option;
  16627. for (var i = 0, l = el.options.length; i < l; i++) {
  16628. option = el.options[i];
  16629. if (isMultiple) {
  16630. selected = looseIndexOf(value, getValue(option)) > -1;
  16631. if (option.selected !== selected) {
  16632. option.selected = selected;
  16633. }
  16634. } else {
  16635. if (looseEqual(getValue(option), value)) {
  16636. if (el.selectedIndex !== i) {
  16637. el.selectedIndex = i;
  16638. }
  16639. return
  16640. }
  16641. }
  16642. }
  16643. if (!isMultiple) {
  16644. el.selectedIndex = -1;
  16645. }
  16646. }
  16647. function hasNoMatchingOption (value, options) {
  16648. for (var i = 0, l = options.length; i < l; i++) {
  16649. if (looseEqual(getValue(options[i]), value)) {
  16650. return false
  16651. }
  16652. }
  16653. return true
  16654. }
  16655. function getValue (option) {
  16656. return '_value' in option
  16657. ? option._value
  16658. : option.value
  16659. }
  16660. function onCompositionStart (e) {
  16661. e.target.composing = true;
  16662. }
  16663. function onCompositionEnd (e) {
  16664. // prevent triggering an input event for no reason
  16665. if (!e.target.composing) { return }
  16666. e.target.composing = false;
  16667. trigger(e.target, 'input');
  16668. }
  16669. function trigger (el, type) {
  16670. var e = document.createEvent('HTMLEvents');
  16671. e.initEvent(type, true, true);
  16672. el.dispatchEvent(e);
  16673. }
  16674. /* */
  16675. // recursively search for possible transition defined inside the component root
  16676. function locateNode (vnode) {
  16677. return vnode.componentInstance && (!vnode.data || !vnode.data.transition)
  16678. ? locateNode(vnode.componentInstance._vnode)
  16679. : vnode
  16680. }
  16681. var show = {
  16682. bind: function bind (el, ref, vnode) {
  16683. var value = ref.value;
  16684. vnode = locateNode(vnode);
  16685. var transition = vnode.data && vnode.data.transition;
  16686. var originalDisplay = el.__vOriginalDisplay =
  16687. el.style.display === 'none' ? '' : el.style.display;
  16688. if (value && transition && !isIE9) {
  16689. vnode.data.show = true;
  16690. enter(vnode, function () {
  16691. el.style.display = originalDisplay;
  16692. });
  16693. } else {
  16694. el.style.display = value ? originalDisplay : 'none';
  16695. }
  16696. },
  16697. update: function update (el, ref, vnode) {
  16698. var value = ref.value;
  16699. var oldValue = ref.oldValue;
  16700. /* istanbul ignore if */
  16701. if (value === oldValue) { return }
  16702. vnode = locateNode(vnode);
  16703. var transition = vnode.data && vnode.data.transition;
  16704. if (transition && !isIE9) {
  16705. vnode.data.show = true;
  16706. if (value) {
  16707. enter(vnode, function () {
  16708. el.style.display = el.__vOriginalDisplay;
  16709. });
  16710. } else {
  16711. leave(vnode, function () {
  16712. el.style.display = 'none';
  16713. });
  16714. }
  16715. } else {
  16716. el.style.display = value ? el.__vOriginalDisplay : 'none';
  16717. }
  16718. },
  16719. unbind: function unbind (
  16720. el,
  16721. binding,
  16722. vnode,
  16723. oldVnode,
  16724. isDestroy
  16725. ) {
  16726. if (!isDestroy) {
  16727. el.style.display = el.__vOriginalDisplay;
  16728. }
  16729. }
  16730. };
  16731. var platformDirectives = {
  16732. model: model$1,
  16733. show: show
  16734. };
  16735. /* */
  16736. // Provides transition support for a single element/component.
  16737. // supports transition mode (out-in / in-out)
  16738. var transitionProps = {
  16739. name: String,
  16740. appear: Boolean,
  16741. css: Boolean,
  16742. mode: String,
  16743. type: String,
  16744. enterClass: String,
  16745. leaveClass: String,
  16746. enterToClass: String,
  16747. leaveToClass: String,
  16748. enterActiveClass: String,
  16749. leaveActiveClass: String,
  16750. appearClass: String,
  16751. appearActiveClass: String,
  16752. appearToClass: String,
  16753. duration: [Number, String, Object]
  16754. };
  16755. // in case the child is also an abstract component, e.g. <keep-alive>
  16756. // we want to recursively retrieve the real component to be rendered
  16757. function getRealChild (vnode) {
  16758. var compOptions = vnode && vnode.componentOptions;
  16759. if (compOptions && compOptions.Ctor.options.abstract) {
  16760. return getRealChild(getFirstComponentChild(compOptions.children))
  16761. } else {
  16762. return vnode
  16763. }
  16764. }
  16765. function extractTransitionData (comp) {
  16766. var data = {};
  16767. var options = comp.$options;
  16768. // props
  16769. for (var key in options.propsData) {
  16770. data[key] = comp[key];
  16771. }
  16772. // events.
  16773. // extract listeners and pass them directly to the transition methods
  16774. var listeners = options._parentListeners;
  16775. for (var key$1 in listeners) {
  16776. data[camelize(key$1)] = listeners[key$1];
  16777. }
  16778. return data
  16779. }
  16780. function placeholder (h, rawChild) {
  16781. if (/\d-keep-alive$/.test(rawChild.tag)) {
  16782. return h('keep-alive', {
  16783. props: rawChild.componentOptions.propsData
  16784. })
  16785. }
  16786. }
  16787. function hasParentTransition (vnode) {
  16788. while ((vnode = vnode.parent)) {
  16789. if (vnode.data.transition) {
  16790. return true
  16791. }
  16792. }
  16793. }
  16794. function isSameChild (child, oldChild) {
  16795. return oldChild.key === child.key && oldChild.tag === child.tag
  16796. }
  16797. var Transition = {
  16798. name: 'transition',
  16799. props: transitionProps,
  16800. abstract: true,
  16801. render: function render (h) {
  16802. var this$1 = this;
  16803. var children = this.$slots.default;
  16804. if (!children) {
  16805. return
  16806. }
  16807. // filter out text nodes (possible whitespaces)
  16808. children = children.filter(function (c) { return c.tag; });
  16809. /* istanbul ignore if */
  16810. if (!children.length) {
  16811. return
  16812. }
  16813. // warn multiple elements
  16814. if (process.env.NODE_ENV !== 'production' && children.length > 1) {
  16815. warn(
  16816. '<transition> can only be used on a single element. Use ' +
  16817. '<transition-group> for lists.',
  16818. this.$parent
  16819. );
  16820. }
  16821. var mode = this.mode;
  16822. // warn invalid mode
  16823. if (process.env.NODE_ENV !== 'production' &&
  16824. mode && mode !== 'in-out' && mode !== 'out-in'
  16825. ) {
  16826. warn(
  16827. 'invalid <transition> mode: ' + mode,
  16828. this.$parent
  16829. );
  16830. }
  16831. var rawChild = children[0];
  16832. // if this is a component root node and the component's
  16833. // parent container node also has transition, skip.
  16834. if (hasParentTransition(this.$vnode)) {
  16835. return rawChild
  16836. }
  16837. // apply transition data to child
  16838. // use getRealChild() to ignore abstract components e.g. keep-alive
  16839. var child = getRealChild(rawChild);
  16840. /* istanbul ignore if */
  16841. if (!child) {
  16842. return rawChild
  16843. }
  16844. if (this._leaving) {
  16845. return placeholder(h, rawChild)
  16846. }
  16847. // ensure a key that is unique to the vnode type and to this transition
  16848. // component instance. This key will be used to remove pending leaving nodes
  16849. // during entering.
  16850. var id = "__transition-" + (this._uid) + "-";
  16851. child.key = child.key == null
  16852. ? id + child.tag
  16853. : isPrimitive(child.key)
  16854. ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)
  16855. : child.key;
  16856. var data = (child.data || (child.data = {})).transition = extractTransitionData(this);
  16857. var oldRawChild = this._vnode;
  16858. var oldChild = getRealChild(oldRawChild);
  16859. // mark v-show
  16860. // so that the transition module can hand over the control to the directive
  16861. if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) {
  16862. child.data.show = true;
  16863. }
  16864. if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {
  16865. // replace old child transition data with fresh one
  16866. // important for dynamic transitions!
  16867. var oldData = oldChild && (oldChild.data.transition = extend({}, data));
  16868. // handle transition mode
  16869. if (mode === 'out-in') {
  16870. // return placeholder node and queue update when leave finishes
  16871. this._leaving = true;
  16872. mergeVNodeHook(oldData, 'afterLeave', function () {
  16873. this$1._leaving = false;
  16874. this$1.$forceUpdate();
  16875. });
  16876. return placeholder(h, rawChild)
  16877. } else if (mode === 'in-out') {
  16878. var delayedLeave;
  16879. var performLeave = function () { delayedLeave(); };
  16880. mergeVNodeHook(data, 'afterEnter', performLeave);
  16881. mergeVNodeHook(data, 'enterCancelled', performLeave);
  16882. mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });
  16883. }
  16884. }
  16885. return rawChild
  16886. }
  16887. };
  16888. /* */
  16889. // Provides transition support for list items.
  16890. // supports move transitions using the FLIP technique.
  16891. // Because the vdom's children update algorithm is "unstable" - i.e.
  16892. // it doesn't guarantee the relative positioning of removed elements,
  16893. // we force transition-group to update its children into two passes:
  16894. // in the first pass, we remove all nodes that need to be removed,
  16895. // triggering their leaving transition; in the second pass, we insert/move
  16896. // into the final desired state. This way in the second pass removed
  16897. // nodes will remain where they should be.
  16898. var props = extend({
  16899. tag: String,
  16900. moveClass: String
  16901. }, transitionProps);
  16902. delete props.mode;
  16903. var TransitionGroup = {
  16904. props: props,
  16905. render: function render (h) {
  16906. var tag = this.tag || this.$vnode.data.tag || 'span';
  16907. var map = Object.create(null);
  16908. var prevChildren = this.prevChildren = this.children;
  16909. var rawChildren = this.$slots.default || [];
  16910. var children = this.children = [];
  16911. var transitionData = extractTransitionData(this);
  16912. for (var i = 0; i < rawChildren.length; i++) {
  16913. var c = rawChildren[i];
  16914. if (c.tag) {
  16915. if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
  16916. children.push(c);
  16917. map[c.key] = c
  16918. ;(c.data || (c.data = {})).transition = transitionData;
  16919. } else if (process.env.NODE_ENV !== 'production') {
  16920. var opts = c.componentOptions;
  16921. var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;
  16922. warn(("<transition-group> children must be keyed: <" + name + ">"));
  16923. }
  16924. }
  16925. }
  16926. if (prevChildren) {
  16927. var kept = [];
  16928. var removed = [];
  16929. for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {
  16930. var c$1 = prevChildren[i$1];
  16931. c$1.data.transition = transitionData;
  16932. c$1.data.pos = c$1.elm.getBoundingClientRect();
  16933. if (map[c$1.key]) {
  16934. kept.push(c$1);
  16935. } else {
  16936. removed.push(c$1);
  16937. }
  16938. }
  16939. this.kept = h(tag, null, kept);
  16940. this.removed = removed;
  16941. }
  16942. return h(tag, null, children)
  16943. },
  16944. beforeUpdate: function beforeUpdate () {
  16945. // force removing pass
  16946. this.__patch__(
  16947. this._vnode,
  16948. this.kept,
  16949. false, // hydrating
  16950. true // removeOnly (!important, avoids unnecessary moves)
  16951. );
  16952. this._vnode = this.kept;
  16953. },
  16954. updated: function updated () {
  16955. var children = this.prevChildren;
  16956. var moveClass = this.moveClass || ((this.name || 'v') + '-move');
  16957. if (!children.length || !this.hasMove(children[0].elm, moveClass)) {
  16958. return
  16959. }
  16960. // we divide the work into three loops to avoid mixing DOM reads and writes
  16961. // in each iteration - which helps prevent layout thrashing.
  16962. children.forEach(callPendingCbs);
  16963. children.forEach(recordPosition);
  16964. children.forEach(applyTranslation);
  16965. // force reflow to put everything in position
  16966. var body = document.body;
  16967. var f = body.offsetHeight; // eslint-disable-line
  16968. children.forEach(function (c) {
  16969. if (c.data.moved) {
  16970. var el = c.elm;
  16971. var s = el.style;
  16972. addTransitionClass(el, moveClass);
  16973. s.transform = s.WebkitTransform = s.transitionDuration = '';
  16974. el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {
  16975. if (!e || /transform$/.test(e.propertyName)) {
  16976. el.removeEventListener(transitionEndEvent, cb);
  16977. el._moveCb = null;
  16978. removeTransitionClass(el, moveClass);
  16979. }
  16980. });
  16981. }
  16982. });
  16983. },
  16984. methods: {
  16985. hasMove: function hasMove (el, moveClass) {
  16986. /* istanbul ignore if */
  16987. if (!hasTransition) {
  16988. return false
  16989. }
  16990. if (this._hasMove != null) {
  16991. return this._hasMove
  16992. }
  16993. // Detect whether an element with the move class applied has
  16994. // CSS transitions. Since the element may be inside an entering
  16995. // transition at this very moment, we make a clone of it and remove
  16996. // all other transition classes applied to ensure only the move class
  16997. // is applied.
  16998. var clone = el.cloneNode();
  16999. if (el._transitionClasses) {
  17000. el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });
  17001. }
  17002. addClass(clone, moveClass);
  17003. clone.style.display = 'none';
  17004. this.$el.appendChild(clone);
  17005. var info = getTransitionInfo(clone);
  17006. this.$el.removeChild(clone);
  17007. return (this._hasMove = info.hasTransform)
  17008. }
  17009. }
  17010. };
  17011. function callPendingCbs (c) {
  17012. /* istanbul ignore if */
  17013. if (c.elm._moveCb) {
  17014. c.elm._moveCb();
  17015. }
  17016. /* istanbul ignore if */
  17017. if (c.elm._enterCb) {
  17018. c.elm._enterCb();
  17019. }
  17020. }
  17021. function recordPosition (c) {
  17022. c.data.newPos = c.elm.getBoundingClientRect();
  17023. }
  17024. function applyTranslation (c) {
  17025. var oldPos = c.data.pos;
  17026. var newPos = c.data.newPos;
  17027. var dx = oldPos.left - newPos.left;
  17028. var dy = oldPos.top - newPos.top;
  17029. if (dx || dy) {
  17030. c.data.moved = true;
  17031. var s = c.elm.style;
  17032. s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)";
  17033. s.transitionDuration = '0s';
  17034. }
  17035. }
  17036. var platformComponents = {
  17037. Transition: Transition,
  17038. TransitionGroup: TransitionGroup
  17039. };
  17040. /* */
  17041. // install platform specific utils
  17042. Vue$3.config.mustUseProp = mustUseProp;
  17043. Vue$3.config.isReservedTag = isReservedTag;
  17044. Vue$3.config.isReservedAttr = isReservedAttr;
  17045. Vue$3.config.getTagNamespace = getTagNamespace;
  17046. Vue$3.config.isUnknownElement = isUnknownElement;
  17047. // install platform runtime directives & components
  17048. extend(Vue$3.options.directives, platformDirectives);
  17049. extend(Vue$3.options.components, platformComponents);
  17050. // install platform patch function
  17051. Vue$3.prototype.__patch__ = inBrowser ? patch : noop;
  17052. // public mount method
  17053. Vue$3.prototype.$mount = function (
  17054. el,
  17055. hydrating
  17056. ) {
  17057. el = el && inBrowser ? query(el) : undefined;
  17058. return mountComponent(this, el, hydrating)
  17059. };
  17060. // devtools global hook
  17061. /* istanbul ignore next */
  17062. setTimeout(function () {
  17063. if (config.devtools) {
  17064. if (devtools) {
  17065. devtools.emit('init', Vue$3);
  17066. } else if (process.env.NODE_ENV !== 'production' && isChrome) {
  17067. console[console.info ? 'info' : 'log'](
  17068. 'Download the Vue Devtools extension for a better development experience:\n' +
  17069. 'https://github.com/vuejs/vue-devtools'
  17070. );
  17071. }
  17072. }
  17073. if (process.env.NODE_ENV !== 'production' &&
  17074. config.productionTip !== false &&
  17075. inBrowser && typeof console !== 'undefined'
  17076. ) {
  17077. console[console.info ? 'info' : 'log'](
  17078. "You are running Vue in development mode.\n" +
  17079. "Make sure to turn on production mode when deploying for production.\n" +
  17080. "See more tips at https://vuejs.org/guide/deployment.html"
  17081. );
  17082. }
  17083. }, 0);
  17084. /* */
  17085. module.exports = Vue$3;
  17086. }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
  17087. },{"_process":2}]},{},[6]);