足力健前端,vue版本

view.umd.js 813KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory();
  4. else if(typeof define === 'function' && define.amd)
  5. define([], factory);
  6. else if(typeof exports === 'object')
  7. exports["uni"] = factory();
  8. else
  9. root["uni"] = factory();
  10. })((typeof self !== 'undefined' ? self : this), function() {
  11. return /******/ (function(modules) { // webpackBootstrap
  12. /******/ // The module cache
  13. /******/ var installedModules = {};
  14. /******/
  15. /******/ // The require function
  16. /******/ function __webpack_require__(moduleId) {
  17. /******/
  18. /******/ // Check if module is in cache
  19. /******/ if(installedModules[moduleId]) {
  20. /******/ return installedModules[moduleId].exports;
  21. /******/ }
  22. /******/ // Create a new module (and put it into the cache)
  23. /******/ var module = installedModules[moduleId] = {
  24. /******/ i: moduleId,
  25. /******/ l: false,
  26. /******/ exports: {}
  27. /******/ };
  28. /******/
  29. /******/ // Execute the module function
  30. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  31. /******/
  32. /******/ // Flag the module as loaded
  33. /******/ module.l = true;
  34. /******/
  35. /******/ // Return the exports of the module
  36. /******/ return module.exports;
  37. /******/ }
  38. /******/
  39. /******/
  40. /******/ // expose the modules object (__webpack_modules__)
  41. /******/ __webpack_require__.m = modules;
  42. /******/
  43. /******/ // expose the module cache
  44. /******/ __webpack_require__.c = installedModules;
  45. /******/
  46. /******/ // define getter function for harmony exports
  47. /******/ __webpack_require__.d = function(exports, name, getter) {
  48. /******/ if(!__webpack_require__.o(exports, name)) {
  49. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  50. /******/ }
  51. /******/ };
  52. /******/
  53. /******/ // define __esModule on exports
  54. /******/ __webpack_require__.r = function(exports) {
  55. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  56. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  57. /******/ }
  58. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  59. /******/ };
  60. /******/
  61. /******/ // create a fake namespace object
  62. /******/ // mode & 1: value is a module id, require it
  63. /******/ // mode & 2: merge all properties of value into the ns
  64. /******/ // mode & 4: return value when already ns object
  65. /******/ // mode & 8|1: behave like require
  66. /******/ __webpack_require__.t = function(value, mode) {
  67. /******/ if(mode & 1) value = __webpack_require__(value);
  68. /******/ if(mode & 8) return value;
  69. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  70. /******/ var ns = Object.create(null);
  71. /******/ __webpack_require__.r(ns);
  72. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  73. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  74. /******/ return ns;
  75. /******/ };
  76. /******/
  77. /******/ // getDefaultExport function for compatibility with non-harmony modules
  78. /******/ __webpack_require__.n = function(module) {
  79. /******/ var getter = module && module.__esModule ?
  80. /******/ function getDefault() { return module['default']; } :
  81. /******/ function getModuleExports() { return module; };
  82. /******/ __webpack_require__.d(getter, 'a', getter);
  83. /******/ return getter;
  84. /******/ };
  85. /******/
  86. /******/ // Object.prototype.hasOwnProperty.call
  87. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  88. /******/
  89. /******/ // __webpack_public_path__
  90. /******/ __webpack_require__.p = "";
  91. /******/
  92. /******/
  93. /******/ // Load entry module and return exports
  94. /******/ return __webpack_require__(__webpack_require__.s = 161);
  95. /******/ })
  96. /************************************************************************/
  97. /******/ ([
  98. /* 0 */
  99. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100. "use strict";
  101. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  102. /* globals __VUE_SSR_CONTEXT__ */
  103. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  104. // This module is a runtime utility for cleaner component module output and will
  105. // be included in the final webpack user bundle.
  106. function normalizeComponent (
  107. scriptExports,
  108. render,
  109. staticRenderFns,
  110. functionalTemplate,
  111. injectStyles,
  112. scopeId,
  113. moduleIdentifier, /* server only */
  114. shadowMode /* vue-cli only */
  115. ) {
  116. // Vue.extend constructor export interop
  117. var options = typeof scriptExports === 'function'
  118. ? scriptExports.options
  119. : scriptExports
  120. // render functions
  121. if (render) {
  122. options.render = render
  123. options.staticRenderFns = staticRenderFns
  124. options._compiled = true
  125. }
  126. // functional template
  127. if (functionalTemplate) {
  128. options.functional = true
  129. }
  130. // scopedId
  131. if (scopeId) {
  132. options._scopeId = 'data-v-' + scopeId
  133. }
  134. var hook
  135. if (moduleIdentifier) { // server build
  136. hook = function (context) {
  137. // 2.3 injection
  138. context =
  139. context || // cached call
  140. (this.$vnode && this.$vnode.ssrContext) || // stateful
  141. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  142. // 2.2 with runInNewContext: true
  143. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  144. context = __VUE_SSR_CONTEXT__
  145. }
  146. // inject component styles
  147. if (injectStyles) {
  148. injectStyles.call(this, context)
  149. }
  150. // register component module identifier for async chunk inferrence
  151. if (context && context._registeredComponents) {
  152. context._registeredComponents.add(moduleIdentifier)
  153. }
  154. }
  155. // used by ssr in case component is cached and beforeCreate
  156. // never gets called
  157. options._ssrRegister = hook
  158. } else if (injectStyles) {
  159. hook = shadowMode
  160. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  161. : injectStyles
  162. }
  163. if (hook) {
  164. if (options.functional) {
  165. // for template-only hot-reload because in that case the render fn doesn't
  166. // go through the normalizer
  167. options._injectStyles = hook
  168. // register for functional component in vue file
  169. var originalRender = options.render
  170. options.render = function renderWithStyleInjection (h, context) {
  171. hook.call(context)
  172. return originalRender(h, context)
  173. }
  174. } else {
  175. // inject component registration as beforeCreate hook
  176. var existing = options.beforeCreate
  177. options.beforeCreate = existing
  178. ? [].concat(existing, hook)
  179. : [hook]
  180. }
  181. }
  182. return {
  183. exports: scriptExports,
  184. options: options
  185. }
  186. }
  187. /***/ }),
  188. /* 1 */
  189. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  190. "use strict";
  191. // EXPORTS
  192. __webpack_require__.d(__webpack_exports__, "h", function() { return /* reexport */ supportsPassive; });
  193. __webpack_require__.d(__webpack_exports__, "d", function() { return /* reexport */ isFn; });
  194. __webpack_require__.d(__webpack_exports__, "e", function() { return /* reexport */ isPlainObject; });
  195. __webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ hasOwn; });
  196. __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ cached; });
  197. __webpack_require__.d(__webpack_exports__, "f", function() { return /* reexport */ kebabCase; });
  198. __webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ disableScrollBounce; });
  199. __webpack_require__.d(__webpack_exports__, "g", function() { return /* reexport */ plusReady; });
  200. // UNUSED EXPORTS: isStr, isObject, noop, toRawType, camelize, setProperties, getLen, formatDateTime, updateElementStyle, guid, debounce, looseEqual, hexToRgba, parseQuery, stringifyQuery, callback
  201. // CONCATENATED MODULE: ./src/shared/env.js
  202. var supportsPassive = false;
  203. try {
  204. var opts = {};
  205. Object.defineProperty(opts, 'passive', {
  206. get: function get() {
  207. /* istanbul ignore next */
  208. supportsPassive = true;
  209. }
  210. }); // https://github.com/facebook/flow/issues/285
  211. window.addEventListener('test-passive', null, opts);
  212. } catch (e) {}
  213. // CONCATENATED MODULE: ./src/shared/util.js
  214. function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  215. var _toString = Object.prototype.toString;
  216. var util_hasOwnProperty = Object.prototype.hasOwnProperty;
  217. var _completeValue = function _completeValue(value) {
  218. return value > 9 ? value : '0' + value;
  219. };
  220. function isFn(fn) {
  221. return typeof fn === 'function';
  222. }
  223. function isStr(str) {
  224. return typeof str === 'string';
  225. }
  226. function isObject(obj) {
  227. return obj !== null && _typeof(obj) === 'object';
  228. }
  229. function isPlainObject(obj) {
  230. return _toString.call(obj) === '[object Object]';
  231. }
  232. function hasOwn(obj, key) {
  233. return util_hasOwnProperty.call(obj, key);
  234. }
  235. function noop() {}
  236. function toRawType(val) {
  237. return _toString.call(val).slice(8, -1);
  238. }
  239. /**
  240. * Create a cached version of a pure function.
  241. */
  242. function cached(fn) {
  243. var cache = Object.create(null);
  244. return function cachedFn(str) {
  245. var hit = cache[str];
  246. return hit || (cache[str] = fn(str));
  247. };
  248. }
  249. /**
  250. * Camelize a hyphen-delimited string.
  251. */
  252. var camelizeRE = /-(\w)/g;
  253. var camelize = cached(function (str) {
  254. return str.replace(camelizeRE, function (_, c) {
  255. return c ? c.toUpperCase() : '';
  256. });
  257. });
  258. function setProperties(item, props, propsData) {
  259. props.forEach(function (name) {
  260. if (hasOwn(propsData, name)) {
  261. item[name] = propsData[name];
  262. }
  263. });
  264. }
  265. function getLen() {
  266. var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  267. /* eslint-disable no-control-regex */
  268. return ('' + str).replace(/[^\x00-\xff]/g, '**').length;
  269. }
  270. function formatDateTime(_ref) {
  271. var _ref$date = _ref.date,
  272. date = _ref$date === void 0 ? new Date() : _ref$date,
  273. _ref$mode = _ref.mode,
  274. mode = _ref$mode === void 0 ? 'date' : _ref$mode;
  275. if (mode === 'time') {
  276. return _completeValue(date.getHours()) + ':' + _completeValue(date.getMinutes());
  277. } else {
  278. return date.getFullYear() + '-' + _completeValue(date.getMonth() + 1) + '-' + _completeValue(date.getDate());
  279. }
  280. }
  281. function updateElementStyle(element, styles) {
  282. for (var attrName in styles) {
  283. element.style[attrName] = styles[attrName];
  284. }
  285. }
  286. function guid() {
  287. return Math.floor(4294967296 * (1 + Math.random())).toString(16).slice(1);
  288. }
  289. function debounce(fn, delay) {
  290. var timeout;
  291. return function () {
  292. var _arguments = arguments,
  293. _this = this;
  294. clearTimeout(timeout);
  295. var timerFn = function timerFn() {
  296. return fn.apply(_this, _arguments);
  297. };
  298. timeout = setTimeout(timerFn, delay);
  299. };
  300. }
  301. function kebabCase(string) {
  302. return string.replace(/[A-Z]/g, function (str) {
  303. return '-' + str.toLowerCase();
  304. });
  305. }
  306. /**
  307. * Check if two values are loosely equal - that is,
  308. * if they are plain objects, do they have the same shape?
  309. */
  310. function looseEqual(a, b) {
  311. if (a === b) return true;
  312. var isObjectA = isObject(a);
  313. var isObjectB = isObject(b);
  314. if (isObjectA && isObjectB) {
  315. try {
  316. var isArrayA = Array.isArray(a);
  317. var isArrayB = Array.isArray(b);
  318. if (isArrayA && isArrayB) {
  319. return a.length === b.length && a.every(function (e, i) {
  320. return looseEqual(e, b[i]);
  321. });
  322. } else if (a instanceof Date && b instanceof Date) {
  323. return a.getTime() === b.getTime();
  324. } else if (!isArrayA && !isArrayB) {
  325. var keysA = Object.keys(a);
  326. var keysB = Object.keys(b);
  327. return keysA.length === keysB.length && keysA.every(function (key) {
  328. return looseEqual(a[key], b[key]);
  329. });
  330. } else {
  331. /* istanbul ignore next */
  332. return false;
  333. }
  334. } catch (e) {
  335. /* istanbul ignore next */
  336. return false;
  337. }
  338. } else if (!isObjectA && !isObjectB) {
  339. return String(a) === String(b);
  340. } else {
  341. return false;
  342. }
  343. }
  344. // CONCATENATED MODULE: ./src/shared/color.js
  345. function hexToRgba(hex) {
  346. var r;
  347. var g;
  348. var b;
  349. hex = hex.replace('#', '');
  350. if (hex.length === 6) {
  351. r = hex.substring(0, 2);
  352. g = hex.substring(2, 4);
  353. b = hex.substring(4, 6);
  354. } else if (hex.length === 3) {
  355. r = hex.substring(0, 1);
  356. g = hex.substring(1, 2);
  357. b = hex.substring(2, 3);
  358. } else {
  359. return false;
  360. }
  361. if (r.length === 1) {
  362. r += r;
  363. }
  364. if (g.length === 1) {
  365. g += g;
  366. }
  367. if (b.length === 1) {
  368. b += b;
  369. }
  370. r = parseInt(r, 16);
  371. g = parseInt(g, 16);
  372. b = parseInt(b, 16);
  373. return {
  374. r: r,
  375. g: g,
  376. b: b
  377. };
  378. }
  379. // CONCATENATED MODULE: ./src/shared/query.js
  380. var encodeReserveRE = /[!'()*]/g;
  381. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  382. return '%' + c.charCodeAt(0).toString(16);
  383. };
  384. var commaRE = /%2C/g; // fixed encodeURIComponent which is more conformant to RFC3986:
  385. // - escapes [!'()*]
  386. // - preserve commas
  387. var encode = function encode(str) {
  388. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  389. };
  390. var decode = decodeURIComponent;
  391. function parseQuery(query) {
  392. var res = {};
  393. query = query.trim().replace(/^(\?|#|&)/, '');
  394. if (!query) {
  395. return res;
  396. }
  397. query.split('&').forEach(function (param) {
  398. var parts = param.replace(/\+/g, ' ').split('=');
  399. var key = decode(parts.shift());
  400. var val = parts.length > 0 ? decode(parts.join('=')) : null;
  401. if (res[key] === undefined) {
  402. res[key] = val;
  403. } else if (Array.isArray(res[key])) {
  404. res[key].push(val);
  405. } else {
  406. res[key] = [res[key], val];
  407. }
  408. });
  409. return res;
  410. }
  411. function stringifyQuery(obj) {
  412. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  413. var res = obj ? Object.keys(obj).map(function (key) {
  414. var val = obj[key];
  415. if (val === undefined) {
  416. return '';
  417. }
  418. if (val === null) {
  419. return encodeStr(key);
  420. }
  421. if (Array.isArray(val)) {
  422. var result = [];
  423. val.forEach(function (val2) {
  424. if (val2 === undefined) {
  425. return;
  426. }
  427. if (val2 === null) {
  428. result.push(encodeStr(key));
  429. } else {
  430. result.push(encodeStr(key) + '=' + encodeStr(val2));
  431. }
  432. });
  433. return result.join('&');
  434. }
  435. return encodeStr(key) + '=' + encodeStr(val);
  436. }).filter(function (x) {
  437. return x.length > 0;
  438. }).join('&') : null;
  439. return res ? "?".concat(res) : '';
  440. }
  441. // CONCATENATED MODULE: ./src/shared/platform.js
  442. function plusReady(callback) {
  443. if (typeof callback !== 'function') {
  444. return;
  445. }
  446. if (window.plus) {
  447. return callback();
  448. }
  449. document.addEventListener('plusready', callback);
  450. }
  451. // CONCATENATED MODULE: ./src/shared/scroll.js
  452. var view;
  453. var pullToRefreshStyle;
  454. var disabled;
  455. var lastAction = {};
  456. function disableScrollBounce(_ref) {
  457. var disable = _ref.disable;
  458. function exec() {
  459. if (!view) {
  460. view = plus.webview.currentWebview();
  461. }
  462. if (!disabled) {
  463. pullToRefreshStyle = (view.getStyle() || {}).pullToRefresh || {};
  464. }
  465. disabled = disable;
  466. if (pullToRefreshStyle.support) {
  467. view.setPullToRefresh(Object.assign({}, pullToRefreshStyle, {
  468. support: !disable
  469. }));
  470. }
  471. }
  472. var time = Date.now();
  473. if (disable === lastAction.disable && time - lastAction.time < 20) {
  474. return;
  475. }
  476. lastAction.disable = disable;
  477. lastAction.time = time;
  478. plusReady(function () {
  479. if (plus.os.name === 'iOS') {
  480. // 延迟执行避免iOS13触摸卡死
  481. setTimeout(exec, 20);
  482. } else {
  483. exec();
  484. }
  485. });
  486. }
  487. // CONCATENATED MODULE: ./src/shared/callback.js
  488. var id = 0;
  489. var callbacks = {};
  490. function warp(fn) {
  491. return function () {
  492. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  493. var callbackId = String(id++);
  494. callbacks[callbackId] = {
  495. success: options.success,
  496. fail: options.fail,
  497. complete: options.complete
  498. };
  499. var data = Object.assign({}, options); // TODO 下版重构 nvue h5 callback
  500. // delete data.success
  501. // delete data.fail
  502. // delete data.complete
  503. var res = fn.bind(this)(data, callbackId);
  504. if (res) {
  505. invoke(callbackId, res);
  506. }
  507. };
  508. }
  509. function invoke(callbackId, res) {
  510. var callback = callbacks[callbackId] || {};
  511. delete callbacks[callbackId];
  512. var errMsg = res.errMsg || '';
  513. if (new RegExp('\\:\\s*fail').test(errMsg)) {
  514. callback.fail && callback.fail(res);
  515. } else {
  516. callback.success && callback.success(res);
  517. }
  518. callback.complete && callback.complete(res);
  519. }
  520. var callback = {
  521. warp: warp,
  522. invoke: invoke
  523. };
  524. // CONCATENATED MODULE: ./src/shared/index.js
  525. /***/ }),
  526. /* 2 */
  527. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  528. "use strict";
  529. // EXPORTS
  530. __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ emitter; });
  531. __webpack_require__.d(__webpack_exports__, "d", function() { return /* reexport */ listeners["a" /* default */]; });
  532. __webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ hover["a" /* default */]; });
  533. __webpack_require__.d(__webpack_exports__, "e", function() { return /* reexport */ subscriber["a" /* default */]; });
  534. __webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ keyboard["a" /* default */]; });
  535. // UNUSED EXPORTS: interact
  536. // CONCATENATED MODULE: ./src/core/view/mixins/emitter.js
  537. // 暂不提供通知所有
  538. // function broadcast (componentName, eventName, ...params) {
  539. // this.$children.forEach(child => {
  540. // const name = child.$options.name && child.$options.name.substr(1)
  541. // if (~componentName.indexOf(name)) {
  542. // child.$emit.apply(child, [eventName].concat(params))
  543. // } else {
  544. // broadcast.apply(child, [componentName, eventName].concat([params]))
  545. // }
  546. // })
  547. // }
  548. function broadcast(componentName, eventName) {
  549. var children = this.$children;
  550. var len = children.length;
  551. for (var _len = arguments.length, params = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
  552. params[_key - 2] = arguments[_key];
  553. }
  554. for (var i = 0; i < len; i++) {
  555. var child = children[i];
  556. var name = child.$options.name && child.$options.name.substr(4);
  557. if (~componentName.indexOf(name)) {
  558. child.$emit.apply(child, [eventName].concat(params));
  559. return false;
  560. } else {
  561. if (broadcast.apply(child, [componentName, eventName].concat([params])) === false) {
  562. return false;
  563. }
  564. }
  565. }
  566. }
  567. /* harmony default export */ var emitter = ({
  568. methods: {
  569. $dispatch: function $dispatch(componentName, eventName) {
  570. if (typeof componentName === 'string') {
  571. componentName = [componentName];
  572. }
  573. var parent = this.$parent || this.$root;
  574. var name = parent.$options.name && parent.$options.name.substr(4);
  575. while (parent && (!name || !~componentName.indexOf(name))) {
  576. parent = parent.$parent;
  577. if (parent) {
  578. name = parent.$options.name && parent.$options.name.substr(4);
  579. }
  580. }
  581. if (parent) {
  582. for (var _len2 = arguments.length, params = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
  583. params[_key2 - 2] = arguments[_key2];
  584. }
  585. parent.$emit.apply(parent, [eventName].concat(params));
  586. }
  587. },
  588. $broadcast: function $broadcast(componentName, eventName) {
  589. if (typeof componentName === 'string') {
  590. componentName = [componentName];
  591. }
  592. for (var _len3 = arguments.length, params = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
  593. params[_key3 - 2] = arguments[_key3];
  594. }
  595. broadcast.apply(this, [componentName, eventName].concat(params));
  596. }
  597. }
  598. });
  599. // EXTERNAL MODULE: ./src/core/view/mixins/listeners.js
  600. var listeners = __webpack_require__(69);
  601. // EXTERNAL MODULE: ./src/core/view/mixins/hover.js
  602. var hover = __webpack_require__(17);
  603. // EXTERNAL MODULE: ./src/core/view/mixins/subscriber.js
  604. var subscriber = __webpack_require__(70);
  605. // EXTERNAL MODULE: ./src/core/view/mixins/keyboard.js
  606. var keyboard = __webpack_require__(71);
  607. // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
  608. var shared = __webpack_require__(1);
  609. // CONCATENATED MODULE: ./src/core/view/mixins/interact.js
  610. var passiveOptions = shared["h" /* supportsPassive */] ? {
  611. passive: true,
  612. capture: true
  613. } : true;
  614. var vms = [];
  615. var userInteract = 0;
  616. var inited;
  617. function addInteractListener(vm) {
  618. if (!inited) {
  619. var eventNames = ['touchstart', 'touchmove', 'touchend', 'mousedown', 'mouseup'];
  620. eventNames.forEach(function (eventName) {
  621. document.addEventListener(eventName, function () {
  622. vms.forEach(function (vm) {
  623. vm.userInteract = true;
  624. userInteract++;
  625. setTimeout(function () {
  626. userInteract--;
  627. if (!userInteract) {
  628. vm.userInteract = false;
  629. }
  630. }, 0);
  631. });
  632. }, passiveOptions);
  633. });
  634. }
  635. vms.push(vm);
  636. }
  637. function removeInteractListener(vm) {
  638. var index = vms.indexOf(vm);
  639. if (index >= 0) {
  640. vms.splice(index, 1);
  641. }
  642. }
  643. /* harmony default export */ var interact = ({
  644. data: function data() {
  645. return {
  646. /**
  647. * 是否用户交互行为
  648. */
  649. userInteract: false
  650. };
  651. },
  652. mounted: function mounted() {
  653. addInteractListener(this);
  654. },
  655. beforeDestroy: function beforeDestroy() {
  656. removeInteractListener(this);
  657. }
  658. });
  659. // CONCATENATED MODULE: ./src/core/view/mixins/index.js
  660. /***/ }),
  661. /* 3 */
  662. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  663. "use strict";
  664. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return PAGE_CREATE; });
  665. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return MOUNTED_DATA; });
  666. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return UPDATED_DATA; });
  667. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return PAGE_CREATED; });
  668. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return UI_EVENT; });
  669. /* unused harmony export LAYOUT_READY */
  670. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return VD_SYNC; });
  671. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return APP_SERVICE_ID; });
  672. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return WEBVIEW_READY; });
  673. /* unused harmony export WEBVIEW_UI_EVENT */
  674. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return VD_SYNC_CALLBACK; });
  675. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return INVOKE_API; });
  676. /* unused harmony export WEB_INVOKE_APPSERVICE */
  677. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return WEBVIEW_INSERTED; });
  678. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return WEBVIEW_REMOVED; });
  679. var PAGE_CREATE = 2;
  680. var MOUNTED_DATA = 4;
  681. var UPDATED_DATA = 6;
  682. var PAGE_CREATED = 10;
  683. var UI_EVENT = 20;
  684. var LAYOUT_READY = 30;
  685. var VD_SYNC = 'vdSync';
  686. var APP_SERVICE_ID = '__uniapp__service';
  687. var WEBVIEW_READY = 'webviewReady';
  688. var WEBVIEW_UI_EVENT = 'webviewUIEvent';
  689. var VD_SYNC_CALLBACK = 'vdSyncCallback';
  690. var INVOKE_API = 'invokeApi';
  691. var WEB_INVOKE_APPSERVICE = 'WEB_INVOKE_APPSERVICE';
  692. var WEBVIEW_INSERTED = 'webviewInserted';
  693. var WEBVIEW_REMOVED = 'webviewRemoved';
  694. /***/ }),
  695. /* 4 */
  696. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  697. "use strict";
  698. // ESM COMPAT FLAG
  699. __webpack_require__.r(__webpack_exports__);
  700. // EXPORTS
  701. __webpack_require__.d(__webpack_exports__, "on", function() { return /* binding */ on; });
  702. __webpack_require__.d(__webpack_exports__, "off", function() { return /* binding */ off; });
  703. __webpack_require__.d(__webpack_exports__, "once", function() { return /* binding */ once; });
  704. __webpack_require__.d(__webpack_exports__, "emit", function() { return /* binding */ emit; });
  705. __webpack_require__.d(__webpack_exports__, "subscribe", function() { return /* binding */ view_bridge_subscribe; });
  706. __webpack_require__.d(__webpack_exports__, "unsubscribe", function() { return /* binding */ unsubscribe; });
  707. __webpack_require__.d(__webpack_exports__, "subscribeHandler", function() { return /* binding */ subscribeHandler; });
  708. __webpack_require__.d(__webpack_exports__, "publishHandler", function() { return /* reexport */ bridge["a" /* publishHandler */]; });
  709. // EXTERNAL MODULE: ./packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.esm.js
  710. var vue_runtime_esm = __webpack_require__(8);
  711. // CONCATENATED MODULE: ./src/core/view/bridge/subscribe/api/set-page-meta.js
  712. function setPageMeta(_ref) {
  713. var pageStyle = _ref.pageStyle,
  714. rootFontSize = _ref.rootFontSize;
  715. var pageElm = document.querySelector('uni-page-body') || document.body;
  716. pageElm.setAttribute('style', pageStyle);
  717. if (rootFontSize && document.documentElement.style.fontSize !== rootFontSize) {
  718. document.documentElement.style.fontSize = rootFontSize;
  719. }
  720. }
  721. // EXTERNAL MODULE: ./src/core/view/bridge/subscribe/api/request-component-info.js
  722. var request_component_info = __webpack_require__(75);
  723. // EXTERNAL MODULE: ./src/core/view/bridge/subscribe/api/request-component-observer.js
  724. var request_component_observer = __webpack_require__(66);
  725. // CONCATENATED MODULE: ./src/core/view/bridge/subscribe/api/index.js
  726. /* harmony default export */ var api = ({
  727. setPageMeta: setPageMeta,
  728. requestComponentInfo: request_component_info["a" /* requestComponentInfo */],
  729. requestComponentObserver: request_component_observer["b" /* requestComponentObserver */],
  730. destroyComponentObserver: request_component_observer["a" /* destroyComponentObserver */]
  731. });
  732. // EXTERNAL MODULE: ./src/core/view/bridge/subscribe/scroll.js
  733. var subscribe_scroll = __webpack_require__(13);
  734. // EXTERNAL MODULE: ./src/core/view/bridge/subscribe/font.js
  735. var font = __webpack_require__(76);
  736. // EXTERNAL MODULE: ./src/platforms/app-plus/view/bridge/subscribe/index.js
  737. var bridge_subscribe = __webpack_require__(77);
  738. // CONCATENATED MODULE: ./src/core/view/bridge/subscribe/index.js
  739. function initSubscribe(subscribe) {
  740. Object.keys(api).forEach(function (name) {
  741. subscribe(name, api[name]);
  742. });
  743. subscribe('pageScrollTo', subscribe_scroll["c" /* pageScrollTo */]);
  744. subscribe('loadFontFace', font["a" /* loadFontFace */]);
  745. Object(bridge_subscribe["a" /* default */])(subscribe);
  746. }
  747. // EXTERNAL MODULE: ./src/platforms/app-plus/view/bridge.js
  748. var bridge = __webpack_require__(12);
  749. // CONCATENATED MODULE: ./src/core/view/bridge/index.js
  750. var Emitter = new vue_runtime_esm["a" /* default */]();
  751. var on = Emitter.$on.bind(Emitter);
  752. var off = Emitter.$off.bind(Emitter);
  753. var once = Emitter.$once.bind(Emitter);
  754. var emit = Emitter.$emit.bind(Emitter);
  755. function view_bridge_subscribe(event, callback) {
  756. return on('service.' + event, callback);
  757. }
  758. function unsubscribe(event, callback) {
  759. return off('service.' + event, callback);
  760. }
  761. function subscribeHandler(event, args, pageId) {
  762. if (true) {
  763. console.log("[subscribeHandler][".concat(Date.now(), "]:").concat(event, ", ").concat(JSON.stringify(args), ", ").concat(pageId));
  764. }
  765. emit('service.' + event, args, pageId);
  766. }
  767. initSubscribe(view_bridge_subscribe);
  768. /***/ }),
  769. /* 5 */
  770. /***/ (function(module, exports, __webpack_require__) {
  771. "use strict";
  772. var attrs = ['top', 'left', 'right', 'bottom'];
  773. var inited;
  774. var elementComputedStyle = {};
  775. var support;
  776. function getSupport() {
  777. if (!('CSS' in window) || typeof CSS.supports != 'function') {
  778. support = '';
  779. }
  780. else if (CSS.supports('top: env(safe-area-inset-top)')) {
  781. support = 'env';
  782. }
  783. else if (CSS.supports('top: constant(safe-area-inset-top)')) {
  784. support = 'constant';
  785. }
  786. else {
  787. support = '';
  788. }
  789. return support;
  790. }
  791. function init() {
  792. support = typeof support === 'string' ? support : getSupport();
  793. if (!support) {
  794. attrs.forEach(function (attr) {
  795. elementComputedStyle[attr] = 0;
  796. });
  797. return;
  798. }
  799. function setStyle(el, style) {
  800. var elStyle = el.style;
  801. Object.keys(style).forEach(function (key) {
  802. var val = style[key];
  803. elStyle[key] = val;
  804. });
  805. }
  806. var cbs = [];
  807. function parentReady(callback) {
  808. if (callback) {
  809. cbs.push(callback);
  810. }
  811. else {
  812. cbs.forEach(function (cb) {
  813. cb();
  814. });
  815. }
  816. }
  817. var passiveEvents = false;
  818. try {
  819. var opts = Object.defineProperty({}, 'passive', {
  820. get: function () {
  821. passiveEvents = { passive: true };
  822. }
  823. });
  824. window.addEventListener('test', null, opts);
  825. }
  826. catch (e) {
  827. }
  828. function addChild(parent, attr) {
  829. var a1 = document.createElement('div');
  830. var a2 = document.createElement('div');
  831. var a1Children = document.createElement('div');
  832. var a2Children = document.createElement('div');
  833. var W = 100;
  834. var MAX = 10000;
  835. var aStyle = {
  836. position: 'absolute',
  837. width: W + 'px',
  838. height: '200px',
  839. boxSizing: 'border-box',
  840. overflow: 'hidden',
  841. paddingBottom: support + "(safe-area-inset-" + attr + ")"
  842. };
  843. setStyle(a1, aStyle);
  844. setStyle(a2, aStyle);
  845. setStyle(a1Children, {
  846. transition: '0s',
  847. animation: 'none',
  848. width: '400px',
  849. height: '400px'
  850. });
  851. setStyle(a2Children, {
  852. transition: '0s',
  853. animation: 'none',
  854. width: '250%',
  855. height: '250%'
  856. });
  857. a1.appendChild(a1Children);
  858. a2.appendChild(a2Children);
  859. parent.appendChild(a1);
  860. parent.appendChild(a2);
  861. parentReady(function () {
  862. a1.scrollTop = a2.scrollTop = MAX;
  863. var a1LastScrollTop = a1.scrollTop;
  864. var a2LastScrollTop = a2.scrollTop;
  865. function onScroll() {
  866. if (this.scrollTop === (this === a1 ? a1LastScrollTop : a2LastScrollTop)) {
  867. return;
  868. }
  869. a1.scrollTop = a2.scrollTop = MAX;
  870. a1LastScrollTop = a1.scrollTop;
  871. a2LastScrollTop = a2.scrollTop;
  872. attrChange(attr);
  873. }
  874. a1.addEventListener('scroll', onScroll, passiveEvents);
  875. a2.addEventListener('scroll', onScroll, passiveEvents);
  876. });
  877. var computedStyle = getComputedStyle(a1);
  878. Object.defineProperty(elementComputedStyle, attr, {
  879. configurable: true,
  880. get: function () {
  881. return parseFloat(computedStyle.paddingBottom);
  882. }
  883. });
  884. }
  885. var parentDiv = document.createElement('div');
  886. setStyle(parentDiv, {
  887. position: 'absolute',
  888. left: '0',
  889. top: '0',
  890. width: '0',
  891. height: '0',
  892. zIndex: '-1',
  893. overflow: 'hidden',
  894. visibility: 'hidden',
  895. });
  896. attrs.forEach(function (key) {
  897. addChild(parentDiv, key);
  898. });
  899. document.body.appendChild(parentDiv);
  900. parentReady();
  901. inited = true;
  902. }
  903. function getAttr(attr) {
  904. if (!inited) {
  905. init();
  906. }
  907. return elementComputedStyle[attr];
  908. }
  909. var changeAttrs = [];
  910. function attrChange(attr) {
  911. if (!changeAttrs.length) {
  912. setTimeout(function () {
  913. var style = {};
  914. changeAttrs.forEach(function (attr) {
  915. style[attr] = elementComputedStyle[attr];
  916. });
  917. changeAttrs.length = 0;
  918. callbacks.forEach(function (callback) {
  919. callback(style);
  920. });
  921. }, 0);
  922. }
  923. changeAttrs.push(attr);
  924. }
  925. var callbacks = [];
  926. function onChange(callback) {
  927. if (!getSupport()) {
  928. return;
  929. }
  930. if (!inited) {
  931. init();
  932. }
  933. if (typeof callback === 'function') {
  934. callbacks.push(callback);
  935. }
  936. }
  937. function offChange(callback) {
  938. var index = callbacks.indexOf(callback);
  939. if (index >= 0) {
  940. callbacks.splice(index, 1);
  941. }
  942. }
  943. var safeAreaInsets = {
  944. get support() {
  945. return (typeof support === 'string' ? support : getSupport()).length != 0;
  946. },
  947. get top() {
  948. return getAttr('top');
  949. },
  950. get left() {
  951. return getAttr('left');
  952. },
  953. get right() {
  954. return getAttr('right');
  955. },
  956. get bottom() {
  957. return getAttr('bottom');
  958. },
  959. onChange: onChange,
  960. offChange: offChange
  961. };
  962. module.exports = safeAreaInsets;
  963. //# sourceMappingURL=index.js.map
  964. /***/ }),
  965. /* 6 */
  966. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  967. "use strict";
  968. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isPage; });
  969. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hasLifecycleHook; });
  970. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return normalizeDataset; });
  971. /* unused harmony export upx2px */
  972. var components = ['SystemAsyncLoading', 'SystemAsyncError'];
  973. function isPage(vm) {
  974. if (vm.$parent && vm.$parent.$options.name === 'PageBody') {
  975. if (components.indexOf(vm.$options.name) !== -1) {
  976. return false;
  977. }
  978. return true;
  979. }
  980. return false;
  981. }
  982. function hasLifecycleHook() {
  983. var vueOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  984. var hook = arguments.length > 1 ? arguments[1] : undefined;
  985. return Array.isArray(vueOptions[hook]) && vueOptions[hook].length;
  986. }
  987. function normalizeDataset() {
  988. var dataset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  989. // ios8.x,9.x Object.assign({},dataset) 始终返回 {}
  990. // http://ask.dcloud.net.cn/question/70246
  991. var result = JSON.parse(JSON.stringify(dataset));
  992. if (false) { var _len, key, i, len, keys; }
  993. return result;
  994. }
  995. function upx2px(str) {
  996. str = str + '';
  997. if (str.indexOf('upx') !== -1) {
  998. // upx转换
  999. return uni.upx2px(parseInt(str) || 0);
  1000. }
  1001. return parseInt(str) || 0;
  1002. }
  1003. /***/ }),
  1004. /* 7 */
  1005. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1006. "use strict";
  1007. var TITLEBAR_HEIGHT = 44;
  1008. function getStatusbarHeight() {
  1009. // 横屏时 iOS 获取的状态栏高度错误,进行纠正
  1010. return plus.navigator.isImmersedStatusbar() ? Math.round(plus.os.name === 'iOS' ? plus.navigator.getSafeAreaInsets().top : plus.navigator.getStatusbarHeight()) : 0;
  1011. }
  1012. function getNavigationBarHeight() {
  1013. var webview = plus.webview.currentWebview();
  1014. var style = webview.getStyle();
  1015. style = style && style.titleNView;
  1016. if (style && style.type === 'default') {
  1017. return TITLEBAR_HEIGHT + getStatusbarHeight();
  1018. }
  1019. return 0;
  1020. }
  1021. function getFixed($el) {
  1022. var fixed;
  1023. while ($el) {
  1024. var style = getComputedStyle($el);
  1025. var transform = style.transform || style.webkitTransform;
  1026. fixed = transform && transform !== 'none' ? false : fixed;
  1027. fixed = style.position === 'fixed' ? true : fixed;
  1028. $el = $el.parentElement;
  1029. }
  1030. return fixed;
  1031. }
  1032. /* harmony default export */ __webpack_exports__["a"] = ({
  1033. name: 'Native',
  1034. data: function data() {
  1035. return {
  1036. position: {
  1037. top: '0px',
  1038. left: '0px',
  1039. width: '0px',
  1040. height: '0px',
  1041. position: 'static'
  1042. },
  1043. hidden: false
  1044. };
  1045. },
  1046. created: function created() {
  1047. this.isNative = true;
  1048. this.onCanInsertCallbacks = [];
  1049. },
  1050. mounted: function mounted() {
  1051. var _this = this;
  1052. this._updatePosition();
  1053. this.$nextTick(function () {
  1054. _this.onCanInsertCallbacks.forEach(function (callback) {
  1055. return callback();
  1056. });
  1057. });
  1058. this.$on('uni-view-update', this._requestPositionUpdate);
  1059. },
  1060. methods: {
  1061. _updatePosition: function _updatePosition() {
  1062. var rect = (this.$refs.container || this.$el).getBoundingClientRect();
  1063. this.hidden = rect.width === 0 || rect.height === 0;
  1064. if (!this.hidden) {
  1065. var position = this.position;
  1066. position.position = getFixed(this.$el) ? 'absolute' : 'static';
  1067. var keys = ['top', 'left', 'width', 'height'];
  1068. keys.forEach(function (key) {
  1069. var val = rect[key];
  1070. val = key === 'top' ? val + (position.position === 'static' ? document.documentElement.scrollTop || document.body.scrollTop || 0 : getNavigationBarHeight()) : val;
  1071. position[key] = val + 'px';
  1072. });
  1073. }
  1074. },
  1075. _requestPositionUpdate: function _requestPositionUpdate() {
  1076. var _this2 = this;
  1077. if (this._positionUpdateRequest) {
  1078. cancelAnimationFrame(this._positionUpdateRequest);
  1079. }
  1080. this._positionUpdateRequest = requestAnimationFrame(function () {
  1081. delete _this2._positionUpdateRequest;
  1082. _this2._updatePosition();
  1083. });
  1084. }
  1085. }
  1086. });
  1087. /***/ }),
  1088. /* 8 */
  1089. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1090. "use strict";
  1091. /* WEBPACK VAR INJECTION */(function(global) {function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  1092. /*!
  1093. * Vue.js v2.6.11
  1094. * (c) 2014-2020 Evan You
  1095. * Released under the MIT License.
  1096. */
  1097. /* */
  1098. var emptyObject = Object.freeze({}); // These helpers produce better VM code in JS engines due to their
  1099. // explicitness and function inlining.
  1100. function isUndef(v) {
  1101. return v === undefined || v === null;
  1102. }
  1103. function isDef(v) {
  1104. return v !== undefined && v !== null;
  1105. }
  1106. function isTrue(v) {
  1107. return v === true;
  1108. }
  1109. function isFalse(v) {
  1110. return v === false;
  1111. }
  1112. /**
  1113. * Check if value is primitive.
  1114. */
  1115. function isPrimitive(value) {
  1116. return typeof value === 'string' || typeof value === 'number' || // $flow-disable-line
  1117. _typeof(value) === 'symbol' || typeof value === 'boolean';
  1118. }
  1119. /**
  1120. * Quick object check - this is primarily used to tell
  1121. * Objects from primitive values when we know the value
  1122. * is a JSON-compliant type.
  1123. */
  1124. function isObject(obj) {
  1125. return obj !== null && _typeof(obj) === 'object';
  1126. }
  1127. /**
  1128. * Get the raw type string of a value, e.g., [object Object].
  1129. */
  1130. var _toString = Object.prototype.toString;
  1131. function toRawType(value) {
  1132. return _toString.call(value).slice(8, -1);
  1133. }
  1134. /**
  1135. * Strict object type check. Only returns true
  1136. * for plain JavaScript objects.
  1137. */
  1138. function isPlainObject(obj) {
  1139. return _toString.call(obj) === '[object Object]';
  1140. }
  1141. function isRegExp(v) {
  1142. return _toString.call(v) === '[object RegExp]';
  1143. }
  1144. /**
  1145. * Check if val is a valid array index.
  1146. */
  1147. function isValidArrayIndex(val) {
  1148. var n = parseFloat(String(val));
  1149. return n >= 0 && Math.floor(n) === n && isFinite(val);
  1150. }
  1151. function isPromise(val) {
  1152. return isDef(val) && typeof val.then === 'function' && typeof val.catch === 'function';
  1153. }
  1154. /**
  1155. * Convert a value to a string that is actually rendered.
  1156. */
  1157. function toString(val) {
  1158. return val == null ? '' : Array.isArray(val) || isPlainObject(val) && val.toString === _toString ? JSON.stringify(val, null, 2) : String(val);
  1159. }
  1160. /**
  1161. * Convert an input value to a number for persistence.
  1162. * If the conversion fails, return original string.
  1163. */
  1164. function toNumber(val) {
  1165. var n = parseFloat(val);
  1166. return isNaN(n) ? val : n;
  1167. }
  1168. /**
  1169. * Make a map and return a function for checking if a key
  1170. * is in that map.
  1171. */
  1172. function makeMap(str, expectsLowerCase) {
  1173. var map = Object.create(null);
  1174. var list = str.split(',');
  1175. for (var i = 0; i < list.length; i++) {
  1176. map[list[i]] = true;
  1177. }
  1178. return expectsLowerCase ? function (val) {
  1179. return map[val.toLowerCase()];
  1180. } : function (val) {
  1181. return map[val];
  1182. };
  1183. }
  1184. /**
  1185. * Check if a tag is a built-in tag.
  1186. */
  1187. var isBuiltInTag = makeMap('slot,component', true);
  1188. /**
  1189. * Check if an attribute is a reserved attribute.
  1190. */
  1191. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  1192. /**
  1193. * Remove an item from an array.
  1194. */
  1195. function remove(arr, item) {
  1196. if (arr.length) {
  1197. var index = arr.indexOf(item);
  1198. if (index > -1) {
  1199. return arr.splice(index, 1);
  1200. }
  1201. }
  1202. }
  1203. /**
  1204. * Check whether an object has the property.
  1205. */
  1206. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1207. function hasOwn(obj, key) {
  1208. return hasOwnProperty.call(obj, key);
  1209. }
  1210. /**
  1211. * Create a cached version of a pure function.
  1212. */
  1213. function cached(fn) {
  1214. var cache = Object.create(null);
  1215. return function cachedFn(str) {
  1216. var hit = cache[str];
  1217. return hit || (cache[str] = fn(str));
  1218. };
  1219. }
  1220. /**
  1221. * Camelize a hyphen-delimited string.
  1222. */
  1223. var camelizeRE = /-(\w)/g;
  1224. var camelize = cached(function (str) {
  1225. return str.replace(camelizeRE, function (_, c) {
  1226. return c ? c.toUpperCase() : '';
  1227. });
  1228. });
  1229. /**
  1230. * Capitalize a string.
  1231. */
  1232. var capitalize = cached(function (str) {
  1233. return str.charAt(0).toUpperCase() + str.slice(1);
  1234. });
  1235. /**
  1236. * Hyphenate a camelCase string.
  1237. */
  1238. var hyphenateRE = /\B([A-Z])/g;
  1239. var hyphenate = cached(function (str) {
  1240. return str.replace(hyphenateRE, '-$1').toLowerCase();
  1241. });
  1242. /**
  1243. * Simple bind polyfill for environments that do not support it,
  1244. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  1245. * since native bind is now performant enough in most browsers.
  1246. * But removing it would mean breaking code that was able to run in
  1247. * PhantomJS 1.x, so this must be kept for backward compatibility.
  1248. */
  1249. /* istanbul ignore next */
  1250. function polyfillBind(fn, ctx) {
  1251. function boundFn(a) {
  1252. var l = arguments.length;
  1253. return l ? l > 1 ? fn.apply(ctx, arguments) : fn.call(ctx, a) : fn.call(ctx);
  1254. }
  1255. boundFn._length = fn.length;
  1256. return boundFn;
  1257. }
  1258. function nativeBind(fn, ctx) {
  1259. return fn.bind(ctx);
  1260. }
  1261. var bind = Function.prototype.bind ? nativeBind : polyfillBind;
  1262. /**
  1263. * Convert an Array-like object to a real Array.
  1264. */
  1265. function toArray(list, start) {
  1266. start = start || 0;
  1267. var i = list.length - start;
  1268. var ret = new Array(i);
  1269. while (i--) {
  1270. ret[i] = list[i + start];
  1271. }
  1272. return ret;
  1273. }
  1274. /**
  1275. * Mix properties into target object.
  1276. */
  1277. function extend(to, _from) {
  1278. for (var key in _from) {
  1279. to[key] = _from[key];
  1280. }
  1281. return to;
  1282. }
  1283. /**
  1284. * Merge an Array of Objects into a single Object.
  1285. */
  1286. function toObject(arr) {
  1287. var res = {};
  1288. for (var i = 0; i < arr.length; i++) {
  1289. if (arr[i]) {
  1290. extend(res, arr[i]);
  1291. }
  1292. }
  1293. return res;
  1294. }
  1295. /* eslint-disable no-unused-vars */
  1296. /**
  1297. * Perform no operation.
  1298. * Stubbing args to make Flow happy without leaving useless transpiled code
  1299. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  1300. */
  1301. function noop(a, b, c) {}
  1302. /**
  1303. * Always return false.
  1304. */
  1305. var no = function no(a, b, c) {
  1306. return false;
  1307. };
  1308. /* eslint-enable no-unused-vars */
  1309. /**
  1310. * Return the same value.
  1311. */
  1312. var identity = function identity(_) {
  1313. return _;
  1314. };
  1315. /**
  1316. * Check if two values are loosely equal - that is,
  1317. * if they are plain objects, do they have the same shape?
  1318. */
  1319. function looseEqual(a, b) {
  1320. if (a === b) {
  1321. return true;
  1322. }
  1323. var isObjectA = isObject(a);
  1324. var isObjectB = isObject(b);
  1325. if (isObjectA && isObjectB) {
  1326. try {
  1327. var isArrayA = Array.isArray(a);
  1328. var isArrayB = Array.isArray(b);
  1329. if (isArrayA && isArrayB) {
  1330. return a.length === b.length && a.every(function (e, i) {
  1331. return looseEqual(e, b[i]);
  1332. });
  1333. } else if (a instanceof Date && b instanceof Date) {
  1334. return a.getTime() === b.getTime();
  1335. } else if (!isArrayA && !isArrayB) {
  1336. var keysA = Object.keys(a);
  1337. var keysB = Object.keys(b);
  1338. return keysA.length === keysB.length && keysA.every(function (key) {
  1339. return looseEqual(a[key], b[key]);
  1340. });
  1341. } else {
  1342. /* istanbul ignore next */
  1343. return false;
  1344. }
  1345. } catch (e) {
  1346. /* istanbul ignore next */
  1347. return false;
  1348. }
  1349. } else if (!isObjectA && !isObjectB) {
  1350. return String(a) === String(b);
  1351. } else {
  1352. return false;
  1353. }
  1354. }
  1355. /**
  1356. * Return the first index at which a loosely equal value can be
  1357. * found in the array (if value is a plain object, the array must
  1358. * contain an object of the same shape), or -1 if it is not present.
  1359. */
  1360. function looseIndexOf(arr, val) {
  1361. for (var i = 0; i < arr.length; i++) {
  1362. if (looseEqual(arr[i], val)) {
  1363. return i;
  1364. }
  1365. }
  1366. return -1;
  1367. }
  1368. /**
  1369. * Ensure a function is called only once.
  1370. */
  1371. function once(fn) {
  1372. var called = false;
  1373. return function () {
  1374. if (!called) {
  1375. called = true;
  1376. fn.apply(this, arguments);
  1377. }
  1378. };
  1379. }
  1380. var SSR_ATTR = 'data-server-rendered';
  1381. var ASSET_TYPES = ['component', 'directive', 'filter'];
  1382. var LIFECYCLE_HOOKS = ['beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUpdate', 'updated', 'beforeDestroy', 'destroyed', 'activated', 'deactivated', 'errorCaptured', 'serverPrefetch'];
  1383. /* */
  1384. var config = {
  1385. /**
  1386. * Option merge strategies (used in core/util/options)
  1387. */
  1388. // $flow-disable-line
  1389. optionMergeStrategies: Object.create(null),
  1390. /**
  1391. * Whether to suppress warnings.
  1392. */
  1393. silent: false,
  1394. /**
  1395. * Show production mode tip message on boot?
  1396. */
  1397. productionTip: "development" !== 'production',
  1398. /**
  1399. * Whether to enable devtools
  1400. */
  1401. devtools: "development" !== 'production',
  1402. /**
  1403. * Whether to record perf
  1404. */
  1405. performance: false,
  1406. /**
  1407. * Error handler for watcher errors
  1408. */
  1409. errorHandler: null,
  1410. /**
  1411. * Warn handler for watcher warns
  1412. */
  1413. warnHandler: null,
  1414. /**
  1415. * Ignore certain custom elements
  1416. */
  1417. ignoredElements: [],
  1418. /**
  1419. * Custom user key aliases for v-on
  1420. */
  1421. // $flow-disable-line
  1422. keyCodes: Object.create(null),
  1423. /**
  1424. * Check if a tag is reserved so that it cannot be registered as a
  1425. * component. This is platform-dependent and may be overwritten.
  1426. */
  1427. isReservedTag: no,
  1428. /**
  1429. * Check if an attribute is reserved so that it cannot be used as a component
  1430. * prop. This is platform-dependent and may be overwritten.
  1431. */
  1432. isReservedAttr: no,
  1433. /**
  1434. * Check if a tag is an unknown element.
  1435. * Platform-dependent.
  1436. */
  1437. isUnknownElement: no,
  1438. /**
  1439. * Get the namespace of an element
  1440. */
  1441. getTagNamespace: noop,
  1442. /**
  1443. * Parse the real tag name for the specific platform.
  1444. */
  1445. parsePlatformTagName: identity,
  1446. /**
  1447. * Check if an attribute must be bound using property, e.g. value
  1448. * Platform-dependent.
  1449. */
  1450. mustUseProp: no,
  1451. /**
  1452. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  1453. * This will significantly reduce performance if set to false.
  1454. */
  1455. async: true,
  1456. /**
  1457. * Exposed for legacy reasons
  1458. */
  1459. _lifecycleHooks: LIFECYCLE_HOOKS
  1460. };
  1461. /* */
  1462. /**
  1463. * unicode letters used for parsing html tags, component names and property paths.
  1464. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  1465. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  1466. */
  1467. var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
  1468. /**
  1469. * Check if a string starts with $ or _
  1470. */
  1471. function isReserved(str) {
  1472. var c = (str + '').charCodeAt(0);
  1473. return c === 0x24 || c === 0x5F;
  1474. }
  1475. /**
  1476. * Define a property.
  1477. */
  1478. function def(obj, key, val, enumerable) {
  1479. Object.defineProperty(obj, key, {
  1480. value: val,
  1481. enumerable: !!enumerable,
  1482. writable: true,
  1483. configurable: true
  1484. });
  1485. }
  1486. /**
  1487. * Parse simple path.
  1488. */
  1489. var bailRE = new RegExp("[^" + unicodeRegExp.source + ".$_\\d]");
  1490. function parsePath(path) {
  1491. if (bailRE.test(path)) {
  1492. return;
  1493. }
  1494. var segments = path.split('.');
  1495. return function (obj) {
  1496. for (var i = 0; i < segments.length; i++) {
  1497. if (!obj) {
  1498. return;
  1499. }
  1500. obj = obj[segments[i]];
  1501. }
  1502. return obj;
  1503. };
  1504. }
  1505. /* */
  1506. // can we use __proto__?
  1507. var hasProto = ('__proto__' in {}); // Browser environment sniffing
  1508. var inBrowser = typeof window !== 'undefined';
  1509. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  1510. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  1511. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  1512. var isIE = UA && /msie|trident/.test(UA);
  1513. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  1514. var isEdge = UA && UA.indexOf('edge/') > 0;
  1515. var isAndroid = UA && UA.indexOf('android') > 0 || weexPlatform === 'android';
  1516. var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA) || weexPlatform === 'ios';
  1517. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  1518. var isPhantomJS = UA && /phantomjs/.test(UA);
  1519. var isFF = UA && UA.match(/firefox\/(\d+)/); // Firefox has a "watch" function on Object.prototype...
  1520. var nativeWatch = {}.watch;
  1521. var supportsPassive = false;
  1522. if (inBrowser) {
  1523. try {
  1524. var opts = {};
  1525. Object.defineProperty(opts, 'passive', {
  1526. get: function get() {
  1527. /* istanbul ignore next */
  1528. supportsPassive = true;
  1529. }
  1530. }); // https://github.com/facebook/flow/issues/285
  1531. window.addEventListener('test-passive', null, opts);
  1532. } catch (e) {}
  1533. } // this needs to be lazy-evaled because vue may be required before
  1534. // vue-server-renderer can set VUE_ENV
  1535. var _isServer;
  1536. var isServerRendering = function isServerRendering() {
  1537. if (_isServer === undefined) {
  1538. /* istanbul ignore if */
  1539. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  1540. // detect presence of vue-server-renderer and avoid
  1541. // Webpack shimming the process
  1542. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  1543. } else {
  1544. _isServer = false;
  1545. }
  1546. }
  1547. return _isServer;
  1548. }; // detect devtools
  1549. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  1550. /* istanbul ignore next */
  1551. function isNative(Ctor) {
  1552. return typeof Ctor === 'function' && /native code/.test(Ctor.toString());
  1553. }
  1554. var hasSymbol = typeof Symbol !== 'undefined' && isNative(Symbol) && typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  1555. var _Set;
  1556. /* istanbul ignore if */
  1557. // $flow-disable-line
  1558. if (typeof Set !== 'undefined' && isNative(Set)) {
  1559. // use native Set when available.
  1560. _Set = Set;
  1561. } else {
  1562. // a non-standard Set polyfill that only works with primitive keys.
  1563. _Set = /*@__PURE__*/function () {
  1564. function Set() {
  1565. this.set = Object.create(null);
  1566. }
  1567. Set.prototype.has = function has(key) {
  1568. return this.set[key] === true;
  1569. };
  1570. Set.prototype.add = function add(key) {
  1571. this.set[key] = true;
  1572. };
  1573. Set.prototype.clear = function clear() {
  1574. this.set = Object.create(null);
  1575. };
  1576. return Set;
  1577. }();
  1578. }
  1579. /* */
  1580. var warn = noop;
  1581. var tip = noop;
  1582. var generateComponentTrace = noop; // work around flow check
  1583. var formatComponentName = noop;
  1584. if (true) {
  1585. var hasConsole = typeof console !== 'undefined';
  1586. var classifyRE = /(?:^|[-_])(\w)/g;
  1587. var classify = function classify(str) {
  1588. return str.replace(classifyRE, function (c) {
  1589. return c.toUpperCase();
  1590. }).replace(/[-_]/g, '');
  1591. };
  1592. warn = function warn(msg, vm) {
  1593. var trace = vm ? generateComponentTrace(vm) : '';
  1594. if (config.warnHandler) {
  1595. config.warnHandler.call(null, msg, vm, trace);
  1596. } else if (hasConsole && !config.silent) {
  1597. console.error("[Vue warn]: " + msg + trace);
  1598. }
  1599. };
  1600. tip = function tip(msg, vm) {
  1601. if (hasConsole && !config.silent) {
  1602. console.warn("[Vue tip]: " + msg + (vm ? generateComponentTrace(vm) : ''));
  1603. }
  1604. };
  1605. formatComponentName = function formatComponentName(vm, includeFile) {
  1606. if (vm.$root === vm) {
  1607. return '<Root>';
  1608. }
  1609. var options = typeof vm === 'function' && vm.cid != null ? vm.options : vm._isVue ? vm.$options || vm.constructor.options : vm;
  1610. var name = options.name || options._componentTag;
  1611. var file = options.__file;
  1612. if (!name && file) {
  1613. var match = file.match(/([^/\\]+)\.vue$/);
  1614. name = match && match[1];
  1615. }
  1616. return (name ? "<" + classify(name) + ">" : "<Anonymous>") + (file && includeFile !== false ? " at " + file : '');
  1617. };
  1618. var repeat = function repeat(str, n) {
  1619. var res = '';
  1620. while (n) {
  1621. if (n % 2 === 1) {
  1622. res += str;
  1623. }
  1624. if (n > 1) {
  1625. str += str;
  1626. }
  1627. n >>= 1;
  1628. }
  1629. return res;
  1630. };
  1631. generateComponentTrace = function generateComponentTrace(vm) {
  1632. if (vm._isVue && vm.$parent) {
  1633. var tree = [];
  1634. var currentRecursiveSequence = 0;
  1635. while (vm) {
  1636. if (tree.length > 0) {
  1637. var last = tree[tree.length - 1];
  1638. if (last.constructor === vm.constructor) {
  1639. currentRecursiveSequence++;
  1640. vm = vm.$parent;
  1641. continue;
  1642. } else if (currentRecursiveSequence > 0) {
  1643. tree[tree.length - 1] = [last, currentRecursiveSequence];
  1644. currentRecursiveSequence = 0;
  1645. }
  1646. }
  1647. tree.push(vm);
  1648. vm = vm.$parent;
  1649. }
  1650. return '\n\nfound in\n\n' + tree.map(function (vm, i) {
  1651. return "" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm) ? formatComponentName(vm[0]) + "... (" + vm[1] + " recursive calls)" : formatComponentName(vm));
  1652. }).join('\n');
  1653. } else {
  1654. return "\n\n(found in " + formatComponentName(vm) + ")";
  1655. }
  1656. };
  1657. }
  1658. /* */
  1659. var uid = 0;
  1660. /**
  1661. * A dep is an observable that can have multiple
  1662. * directives subscribing to it.
  1663. */
  1664. var Dep = function Dep() {
  1665. // fixed by xxxxxx (nvue vuex)
  1666. /* eslint-disable no-undef */
  1667. if (typeof SharedObject !== 'undefined') {
  1668. this.id = SharedObject.uid++;
  1669. } else {
  1670. this.id = uid++;
  1671. }
  1672. this.subs = [];
  1673. };
  1674. Dep.prototype.addSub = function addSub(sub) {
  1675. this.subs.push(sub);
  1676. };
  1677. Dep.prototype.removeSub = function removeSub(sub) {
  1678. remove(this.subs, sub);
  1679. };
  1680. Dep.prototype.depend = function depend() {
  1681. if (Dep.SharedObject.target) {
  1682. Dep.SharedObject.target.addDep(this);
  1683. }
  1684. };
  1685. Dep.prototype.notify = function notify() {
  1686. // stabilize the subscriber list first
  1687. var subs = this.subs.slice();
  1688. if ( true && !config.async) {
  1689. // subs aren't sorted in scheduler if not running async
  1690. // we need to sort them now to make sure they fire in correct
  1691. // order
  1692. subs.sort(function (a, b) {
  1693. return a.id - b.id;
  1694. });
  1695. }
  1696. for (var i = 0, l = subs.length; i < l; i++) {
  1697. subs[i].update();
  1698. }
  1699. }; // The current target watcher being evaluated.
  1700. // This is globally unique because only one watcher
  1701. // can be evaluated at a time.
  1702. // fixed by xxxxxx (nvue shared vuex)
  1703. /* eslint-disable no-undef */
  1704. Dep.SharedObject = typeof SharedObject !== 'undefined' ? SharedObject : {};
  1705. Dep.SharedObject.target = null;
  1706. Dep.SharedObject.targetStack = [];
  1707. function pushTarget(target) {
  1708. Dep.SharedObject.targetStack.push(target);
  1709. Dep.SharedObject.target = target;
  1710. }
  1711. function popTarget() {
  1712. Dep.SharedObject.targetStack.pop();
  1713. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  1714. }
  1715. /* */
  1716. var VNode = function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) {
  1717. this.tag = tag;
  1718. this.data = data;
  1719. this.children = children;
  1720. this.text = text;
  1721. this.elm = elm;
  1722. this.ns = undefined;
  1723. this.context = context;
  1724. this.fnContext = undefined;
  1725. this.fnOptions = undefined;
  1726. this.fnScopeId = undefined;
  1727. this.key = data && data.key;
  1728. this.componentOptions = componentOptions;
  1729. this.componentInstance = undefined;
  1730. this.parent = undefined;
  1731. this.raw = false;
  1732. this.isStatic = false;
  1733. this.isRootInsert = true;
  1734. this.isComment = false;
  1735. this.isCloned = false;
  1736. this.isOnce = false;
  1737. this.asyncFactory = asyncFactory;
  1738. this.asyncMeta = undefined;
  1739. this.isAsyncPlaceholder = false;
  1740. };
  1741. var prototypeAccessors = {
  1742. child: {
  1743. configurable: true
  1744. }
  1745. }; // DEPRECATED: alias for componentInstance for backwards compat.
  1746. /* istanbul ignore next */
  1747. prototypeAccessors.child.get = function () {
  1748. return this.componentInstance;
  1749. };
  1750. Object.defineProperties(VNode.prototype, prototypeAccessors);
  1751. var createEmptyVNode = function createEmptyVNode(text) {
  1752. if (text === void 0) text = '';
  1753. var node = new VNode();
  1754. node.text = text;
  1755. node.isComment = true;
  1756. return node;
  1757. };
  1758. function createTextVNode(val) {
  1759. return new VNode(undefined, undefined, undefined, String(val));
  1760. } // optimized shallow clone
  1761. // used for static nodes and slot nodes because they may be reused across
  1762. // multiple renders, cloning them avoids errors when DOM manipulations rely
  1763. // on their elm reference.
  1764. function cloneVNode(vnode) {
  1765. var cloned = new VNode(vnode.tag, vnode.data, // #7975
  1766. // clone children array to avoid mutating original in case of cloning
  1767. // a child.
  1768. vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);
  1769. cloned.ns = vnode.ns;
  1770. cloned.isStatic = vnode.isStatic;
  1771. cloned.key = vnode.key;
  1772. cloned.isComment = vnode.isComment;
  1773. cloned.fnContext = vnode.fnContext;
  1774. cloned.fnOptions = vnode.fnOptions;
  1775. cloned.fnScopeId = vnode.fnScopeId;
  1776. cloned.asyncMeta = vnode.asyncMeta;
  1777. cloned.isCloned = true;
  1778. return cloned;
  1779. }
  1780. /*
  1781. * not type checking this file because flow doesn't play well with
  1782. * dynamically accessing methods on Array prototype
  1783. */
  1784. var arrayProto = Array.prototype;
  1785. var arrayMethods = Object.create(arrayProto);
  1786. var methodsToPatch = ['push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse'];
  1787. /**
  1788. * Intercept mutating methods and emit events
  1789. */
  1790. methodsToPatch.forEach(function (method) {
  1791. // cache original method
  1792. var original = arrayProto[method];
  1793. def(arrayMethods, method, function mutator() {
  1794. var args = [],
  1795. len = arguments.length;
  1796. while (len--) {
  1797. args[len] = arguments[len];
  1798. }
  1799. var result = original.apply(this, args);
  1800. var ob = this.__ob__;
  1801. var inserted;
  1802. switch (method) {
  1803. case 'push':
  1804. case 'unshift':
  1805. inserted = args;
  1806. break;
  1807. case 'splice':
  1808. inserted = args.slice(2);
  1809. break;
  1810. }
  1811. if (inserted) {
  1812. ob.observeArray(inserted);
  1813. } // notify change
  1814. ob.dep.notify();
  1815. return result;
  1816. });
  1817. });
  1818. /* */
  1819. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  1820. /**
  1821. * In some cases we may want to disable observation inside a component's
  1822. * update computation.
  1823. */
  1824. var shouldObserve = true;
  1825. function toggleObserving(value) {
  1826. shouldObserve = value;
  1827. }
  1828. /**
  1829. * Observer class that is attached to each observed
  1830. * object. Once attached, the observer converts the target
  1831. * object's property keys into getter/setters that
  1832. * collect dependencies and dispatch updates.
  1833. */
  1834. var Observer = function Observer(value) {
  1835. this.value = value;
  1836. this.dep = new Dep();
  1837. this.vmCount = 0;
  1838. def(value, '__ob__', this);
  1839. if (Array.isArray(value)) {
  1840. if (hasProto) {
  1841. {
  1842. protoAugment(value, arrayMethods);
  1843. }
  1844. } else {
  1845. copyAugment(value, arrayMethods, arrayKeys);
  1846. }
  1847. this.observeArray(value);
  1848. } else {
  1849. this.walk(value);
  1850. }
  1851. };
  1852. /**
  1853. * Walk through all properties and convert them into
  1854. * getter/setters. This method should only be called when
  1855. * value type is Object.
  1856. */
  1857. Observer.prototype.walk = function walk(obj) {
  1858. var keys = Object.keys(obj);
  1859. for (var i = 0; i < keys.length; i++) {
  1860. defineReactive$$1(obj, keys[i]);
  1861. }
  1862. };
  1863. /**
  1864. * Observe a list of Array items.
  1865. */
  1866. Observer.prototype.observeArray = function observeArray(items) {
  1867. for (var i = 0, l = items.length; i < l; i++) {
  1868. observe(items[i]);
  1869. }
  1870. }; // helpers
  1871. /**
  1872. * Augment a target Object or Array by intercepting
  1873. * the prototype chain using __proto__
  1874. */
  1875. function protoAugment(target, src) {
  1876. /* eslint-disable no-proto */
  1877. target.__proto__ = src;
  1878. /* eslint-enable no-proto */
  1879. }
  1880. /**
  1881. * Augment a target Object or Array by defining
  1882. * hidden properties.
  1883. */
  1884. /* istanbul ignore next */
  1885. function copyAugment(target, src, keys) {
  1886. for (var i = 0, l = keys.length; i < l; i++) {
  1887. var key = keys[i];
  1888. def(target, key, src[key]);
  1889. }
  1890. }
  1891. /**
  1892. * Attempt to create an observer instance for a value,
  1893. * returns the new observer if successfully observed,
  1894. * or the existing observer if the value already has one.
  1895. */
  1896. function observe(value, asRootData) {
  1897. if (!isObject(value) || value instanceof VNode) {
  1898. return;
  1899. }
  1900. var ob;
  1901. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  1902. ob = value.__ob__;
  1903. } else if (shouldObserve && !isServerRendering() && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue) {
  1904. ob = new Observer(value);
  1905. }
  1906. if (asRootData && ob) {
  1907. ob.vmCount++;
  1908. }
  1909. return ob;
  1910. }
  1911. /**
  1912. * Define a reactive property on an Object.
  1913. */
  1914. function defineReactive$$1(obj, key, val, customSetter, shallow) {
  1915. var dep = new Dep();
  1916. var property = Object.getOwnPropertyDescriptor(obj, key);
  1917. if (property && property.configurable === false) {
  1918. return;
  1919. } // cater for pre-defined getter/setters
  1920. var getter = property && property.get;
  1921. var setter = property && property.set;
  1922. if ((!getter || setter) && arguments.length === 2) {
  1923. val = obj[key];
  1924. }
  1925. var childOb = !shallow && observe(val);
  1926. Object.defineProperty(obj, key, {
  1927. enumerable: true,
  1928. configurable: true,
  1929. get: function reactiveGetter() {
  1930. var value = getter ? getter.call(obj) : val;
  1931. if (Dep.SharedObject.target) {
  1932. // fixed by xxxxxx
  1933. dep.depend();
  1934. if (childOb) {
  1935. childOb.dep.depend();
  1936. if (Array.isArray(value)) {
  1937. dependArray(value);
  1938. }
  1939. }
  1940. }
  1941. return value;
  1942. },
  1943. set: function reactiveSetter(newVal) {
  1944. var value = getter ? getter.call(obj) : val;
  1945. /* eslint-disable no-self-compare */
  1946. if (newVal === value || newVal !== newVal && value !== value) {
  1947. return;
  1948. }
  1949. /* eslint-enable no-self-compare */
  1950. if ( true && customSetter) {
  1951. customSetter();
  1952. } // #7981: for accessor properties without setter
  1953. if (getter && !setter) {
  1954. return;
  1955. }
  1956. if (setter) {
  1957. setter.call(obj, newVal);
  1958. } else {
  1959. val = newVal;
  1960. }
  1961. childOb = !shallow && observe(newVal);
  1962. dep.notify();
  1963. }
  1964. });
  1965. }
  1966. /**
  1967. * Set a property on an object. Adds the new property and
  1968. * triggers change notification if the property doesn't
  1969. * already exist.
  1970. */
  1971. function set(target, key, val) {
  1972. if ( true && (isUndef(target) || isPrimitive(target))) {
  1973. warn("Cannot set reactive property on undefined, null, or primitive value: " + target);
  1974. }
  1975. if (Array.isArray(target) && isValidArrayIndex(key)) {
  1976. target.length = Math.max(target.length, key);
  1977. target.splice(key, 1, val);
  1978. return val;
  1979. }
  1980. if (key in target && !(key in Object.prototype)) {
  1981. target[key] = val;
  1982. return val;
  1983. }
  1984. var ob = target.__ob__;
  1985. if (target._isVue || ob && ob.vmCount) {
  1986. true && warn('Avoid adding reactive properties to a Vue instance or its root $data ' + 'at runtime - declare it upfront in the data option.');
  1987. return val;
  1988. }
  1989. if (!ob) {
  1990. target[key] = val;
  1991. return val;
  1992. }
  1993. defineReactive$$1(ob.value, key, val);
  1994. ob.dep.notify();
  1995. return val;
  1996. }
  1997. /**
  1998. * Delete a property and trigger change if necessary.
  1999. */
  2000. function del(target, key) {
  2001. if ( true && (isUndef(target) || isPrimitive(target))) {
  2002. warn("Cannot delete reactive property on undefined, null, or primitive value: " + target);
  2003. }
  2004. if (Array.isArray(target) && isValidArrayIndex(key)) {
  2005. target.splice(key, 1);
  2006. return;
  2007. }
  2008. var ob = target.__ob__;
  2009. if (target._isVue || ob && ob.vmCount) {
  2010. true && warn('Avoid deleting properties on a Vue instance or its root $data ' + '- just set it to null.');
  2011. return;
  2012. }
  2013. if (!hasOwn(target, key)) {
  2014. return;
  2015. }
  2016. delete target[key];
  2017. if (!ob) {
  2018. return;
  2019. }
  2020. ob.dep.notify();
  2021. }
  2022. /**
  2023. * Collect dependencies on array elements when the array is touched, since
  2024. * we cannot intercept array element access like property getters.
  2025. */
  2026. function dependArray(value) {
  2027. for (var e = void 0, i = 0, l = value.length; i < l; i++) {
  2028. e = value[i];
  2029. e && e.__ob__ && e.__ob__.dep.depend();
  2030. if (Array.isArray(e)) {
  2031. dependArray(e);
  2032. }
  2033. }
  2034. }
  2035. /* */
  2036. /**
  2037. * Option overwriting strategies are functions that handle
  2038. * how to merge a parent option value and a child option
  2039. * value into the final value.
  2040. */
  2041. var strats = config.optionMergeStrategies;
  2042. /**
  2043. * Options with restrictions
  2044. */
  2045. if (true) {
  2046. strats.el = strats.propsData = function (parent, child, vm, key) {
  2047. if (!vm) {
  2048. warn("option \"" + key + "\" can only be used during instance " + 'creation with the `new` keyword.');
  2049. }
  2050. return defaultStrat(parent, child);
  2051. };
  2052. }
  2053. /**
  2054. * Helper that recursively merges two data objects together.
  2055. */
  2056. function mergeData(to, from) {
  2057. if (!from) {
  2058. return to;
  2059. }
  2060. var key, toVal, fromVal;
  2061. var keys = hasSymbol ? Reflect.ownKeys(from) : Object.keys(from);
  2062. for (var i = 0; i < keys.length; i++) {
  2063. key = keys[i]; // in case the object is already observed...
  2064. if (key === '__ob__') {
  2065. continue;
  2066. }
  2067. toVal = to[key];
  2068. fromVal = from[key];
  2069. if (!hasOwn(to, key)) {
  2070. set(to, key, fromVal);
  2071. } else if (toVal !== fromVal && isPlainObject(toVal) && isPlainObject(fromVal)) {
  2072. mergeData(toVal, fromVal);
  2073. }
  2074. }
  2075. return to;
  2076. }
  2077. /**
  2078. * Data
  2079. */
  2080. function mergeDataOrFn(parentVal, childVal, vm) {
  2081. if (!vm) {
  2082. // in a Vue.extend merge, both should be functions
  2083. if (!childVal) {
  2084. return parentVal;
  2085. }
  2086. if (!parentVal) {
  2087. return childVal;
  2088. } // when parentVal & childVal are both present,
  2089. // we need to return a function that returns the
  2090. // merged result of both functions... no need to
  2091. // check if parentVal is a function here because
  2092. // it has to be a function to pass previous merges.
  2093. return function mergedDataFn() {
  2094. return mergeData(typeof childVal === 'function' ? childVal.call(this, this) : childVal, typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal);
  2095. };
  2096. } else {
  2097. return function mergedInstanceDataFn() {
  2098. // instance merge
  2099. var instanceData = typeof childVal === 'function' ? childVal.call(vm, vm) : childVal;
  2100. var defaultData = typeof parentVal === 'function' ? parentVal.call(vm, vm) : parentVal;
  2101. if (instanceData) {
  2102. return mergeData(instanceData, defaultData);
  2103. } else {
  2104. return defaultData;
  2105. }
  2106. };
  2107. }
  2108. }
  2109. strats.data = function (parentVal, childVal, vm) {
  2110. if (!vm) {
  2111. if (childVal && typeof childVal !== 'function') {
  2112. true && warn('The "data" option should be a function ' + 'that returns a per-instance value in component ' + 'definitions.', vm);
  2113. return parentVal;
  2114. }
  2115. return mergeDataOrFn(parentVal, childVal);
  2116. }
  2117. return mergeDataOrFn(parentVal, childVal, vm);
  2118. };
  2119. /**
  2120. * Hooks and props are merged as arrays.
  2121. */
  2122. function mergeHook(parentVal, childVal) {
  2123. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  2124. return res ? dedupeHooks(res) : res;
  2125. }
  2126. function dedupeHooks(hooks) {
  2127. var res = [];
  2128. for (var i = 0; i < hooks.length; i++) {
  2129. if (res.indexOf(hooks[i]) === -1) {
  2130. res.push(hooks[i]);
  2131. }
  2132. }
  2133. return res;
  2134. }
  2135. LIFECYCLE_HOOKS.forEach(function (hook) {
  2136. strats[hook] = mergeHook;
  2137. });
  2138. /**
  2139. * Assets
  2140. *
  2141. * When a vm is present (instance creation), we need to do
  2142. * a three-way merge between constructor options, instance
  2143. * options and parent options.
  2144. */
  2145. function mergeAssets(parentVal, childVal, vm, key) {
  2146. var res = Object.create(parentVal || null);
  2147. if (childVal) {
  2148. true && assertObjectType(key, childVal, vm);
  2149. return extend(res, childVal);
  2150. } else {
  2151. return res;
  2152. }
  2153. }
  2154. ASSET_TYPES.forEach(function (type) {
  2155. strats[type + 's'] = mergeAssets;
  2156. });
  2157. /**
  2158. * Watchers.
  2159. *
  2160. * Watchers hashes should not overwrite one
  2161. * another, so we merge them as arrays.
  2162. */
  2163. strats.watch = function (parentVal, childVal, vm, key) {
  2164. // work around Firefox's Object.prototype.watch...
  2165. if (parentVal === nativeWatch) {
  2166. parentVal = undefined;
  2167. }
  2168. if (childVal === nativeWatch) {
  2169. childVal = undefined;
  2170. }
  2171. /* istanbul ignore if */
  2172. if (!childVal) {
  2173. return Object.create(parentVal || null);
  2174. }
  2175. if (true) {
  2176. assertObjectType(key, childVal, vm);
  2177. }
  2178. if (!parentVal) {
  2179. return childVal;
  2180. }
  2181. var ret = {};
  2182. extend(ret, parentVal);
  2183. for (var key$1 in childVal) {
  2184. var parent = ret[key$1];
  2185. var child = childVal[key$1];
  2186. if (parent && !Array.isArray(parent)) {
  2187. parent = [parent];
  2188. }
  2189. ret[key$1] = parent ? parent.concat(child) : Array.isArray(child) ? child : [child];
  2190. }
  2191. return ret;
  2192. };
  2193. /**
  2194. * Other object hashes.
  2195. */
  2196. strats.props = strats.methods = strats.inject = strats.computed = function (parentVal, childVal, vm, key) {
  2197. if (childVal && "development" !== 'production') {
  2198. assertObjectType(key, childVal, vm);
  2199. }
  2200. if (!parentVal) {
  2201. return childVal;
  2202. }
  2203. var ret = Object.create(null);
  2204. extend(ret, parentVal);
  2205. if (childVal) {
  2206. extend(ret, childVal);
  2207. }
  2208. return ret;
  2209. };
  2210. strats.provide = mergeDataOrFn;
  2211. /**
  2212. * Default strategy.
  2213. */
  2214. var defaultStrat = function defaultStrat(parentVal, childVal) {
  2215. return childVal === undefined ? parentVal : childVal;
  2216. };
  2217. /**
  2218. * Validate component names
  2219. */
  2220. function checkComponents(options) {
  2221. for (var key in options.components) {
  2222. validateComponentName(key);
  2223. }
  2224. }
  2225. function validateComponentName(name) {
  2226. if (!new RegExp("^[a-zA-Z][\\-\\.0-9_" + unicodeRegExp.source + "]*$").test(name)) {
  2227. warn('Invalid component name: "' + name + '". Component names ' + 'should conform to valid custom element name in html5 specification.');
  2228. }
  2229. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  2230. warn('Do not use built-in or reserved HTML elements as component ' + 'id: ' + name);
  2231. }
  2232. }
  2233. /**
  2234. * Ensure all props option syntax are normalized into the
  2235. * Object-based format.
  2236. */
  2237. function normalizeProps(options, vm) {
  2238. var props = options.props;
  2239. if (!props) {
  2240. return;
  2241. }
  2242. var res = {};
  2243. var i, val, name;
  2244. if (Array.isArray(props)) {
  2245. i = props.length;
  2246. while (i--) {
  2247. val = props[i];
  2248. if (typeof val === 'string') {
  2249. name = camelize(val);
  2250. res[name] = {
  2251. type: null
  2252. };
  2253. } else if (true) {
  2254. warn('props must be strings when using array syntax.');
  2255. }
  2256. }
  2257. } else if (isPlainObject(props)) {
  2258. for (var key in props) {
  2259. val = props[key];
  2260. name = camelize(key);
  2261. res[name] = isPlainObject(val) ? val : {
  2262. type: val
  2263. };
  2264. }
  2265. } else if (true) {
  2266. warn("Invalid value for option \"props\": expected an Array or an Object, " + "but got " + toRawType(props) + ".", vm);
  2267. }
  2268. options.props = res;
  2269. }
  2270. /**
  2271. * Normalize all injections into Object-based format
  2272. */
  2273. function normalizeInject(options, vm) {
  2274. var inject = options.inject;
  2275. if (!inject) {
  2276. return;
  2277. }
  2278. var normalized = options.inject = {};
  2279. if (Array.isArray(inject)) {
  2280. for (var i = 0; i < inject.length; i++) {
  2281. normalized[inject[i]] = {
  2282. from: inject[i]
  2283. };
  2284. }
  2285. } else if (isPlainObject(inject)) {
  2286. for (var key in inject) {
  2287. var val = inject[key];
  2288. normalized[key] = isPlainObject(val) ? extend({
  2289. from: key
  2290. }, val) : {
  2291. from: val
  2292. };
  2293. }
  2294. } else if (true) {
  2295. warn("Invalid value for option \"inject\": expected an Array or an Object, " + "but got " + toRawType(inject) + ".", vm);
  2296. }
  2297. }
  2298. /**
  2299. * Normalize raw function directives into object format.
  2300. */
  2301. function normalizeDirectives(options) {
  2302. var dirs = options.directives;
  2303. if (dirs) {
  2304. for (var key in dirs) {
  2305. var def$$1 = dirs[key];
  2306. if (typeof def$$1 === 'function') {
  2307. dirs[key] = {
  2308. bind: def$$1,
  2309. update: def$$1
  2310. };
  2311. }
  2312. }
  2313. }
  2314. }
  2315. function assertObjectType(name, value, vm) {
  2316. if (!isPlainObject(value)) {
  2317. warn("Invalid value for option \"" + name + "\": expected an Object, " + "but got " + toRawType(value) + ".", vm);
  2318. }
  2319. }
  2320. /**
  2321. * Merge two option objects into a new one.
  2322. * Core utility used in both instantiation and inheritance.
  2323. */
  2324. function mergeOptions(parent, child, vm) {
  2325. if (true) {
  2326. checkComponents(child);
  2327. }
  2328. if (typeof child === 'function') {
  2329. child = child.options;
  2330. }
  2331. normalizeProps(child, vm);
  2332. normalizeInject(child, vm);
  2333. normalizeDirectives(child); // Apply extends and mixins on the child options,
  2334. // but only if it is a raw options object that isn't
  2335. // the result of another mergeOptions call.
  2336. // Only merged options has the _base property.
  2337. if (!child._base) {
  2338. if (child.extends) {
  2339. parent = mergeOptions(parent, child.extends, vm);
  2340. }
  2341. if (child.mixins) {
  2342. for (var i = 0, l = child.mixins.length; i < l; i++) {
  2343. parent = mergeOptions(parent, child.mixins[i], vm);
  2344. }
  2345. }
  2346. }
  2347. var options = {};
  2348. var key;
  2349. for (key in parent) {
  2350. mergeField(key);
  2351. }
  2352. for (key in child) {
  2353. if (!hasOwn(parent, key)) {
  2354. mergeField(key);
  2355. }
  2356. }
  2357. function mergeField(key) {
  2358. var strat = strats[key] || defaultStrat;
  2359. options[key] = strat(parent[key], child[key], vm, key);
  2360. }
  2361. return options;
  2362. }
  2363. /**
  2364. * Resolve an asset.
  2365. * This function is used because child instances need access
  2366. * to assets defined in its ancestor chain.
  2367. */
  2368. function resolveAsset(options, type, id, warnMissing) {
  2369. /* istanbul ignore if */
  2370. if (typeof id !== 'string') {
  2371. return;
  2372. }
  2373. var assets = options[type]; // check local registration variations first
  2374. if (hasOwn(assets, id)) {
  2375. return assets[id];
  2376. }
  2377. var camelizedId = camelize(id);
  2378. if (hasOwn(assets, camelizedId)) {
  2379. return assets[camelizedId];
  2380. }
  2381. var PascalCaseId = capitalize(camelizedId);
  2382. if (hasOwn(assets, PascalCaseId)) {
  2383. return assets[PascalCaseId];
  2384. } // fallback to prototype chain
  2385. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  2386. if ( true && warnMissing && !res) {
  2387. warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);
  2388. }
  2389. return res;
  2390. }
  2391. /* */
  2392. function validateProp(key, propOptions, propsData, vm) {
  2393. var prop = propOptions[key];
  2394. var absent = !hasOwn(propsData, key);
  2395. var value = propsData[key]; // boolean casting
  2396. var booleanIndex = getTypeIndex(Boolean, prop.type);
  2397. if (booleanIndex > -1) {
  2398. if (absent && !hasOwn(prop, 'default')) {
  2399. value = false;
  2400. } else if (value === '' || value === hyphenate(key)) {
  2401. // only cast empty string / same name to boolean if
  2402. // boolean has higher priority
  2403. var stringIndex = getTypeIndex(String, prop.type);
  2404. if (stringIndex < 0 || booleanIndex < stringIndex) {
  2405. value = true;
  2406. }
  2407. }
  2408. } // check default value
  2409. if (value === undefined) {
  2410. value = getPropDefaultValue(vm, prop, key); // since the default value is a fresh copy,
  2411. // make sure to observe it.
  2412. var prevShouldObserve = shouldObserve;
  2413. toggleObserving(true);
  2414. observe(value);
  2415. toggleObserving(prevShouldObserve);
  2416. }
  2417. if (true) {
  2418. assertProp(prop, key, value, vm, absent);
  2419. }
  2420. return value;
  2421. }
  2422. /**
  2423. * Get the default value of a prop.
  2424. */
  2425. function getPropDefaultValue(vm, prop, key) {
  2426. // no default, return undefined
  2427. if (!hasOwn(prop, 'default')) {
  2428. return undefined;
  2429. }
  2430. var def = prop.default; // warn against non-factory defaults for Object & Array
  2431. if ( true && isObject(def)) {
  2432. warn('Invalid default value for prop "' + key + '": ' + 'Props with type Object/Array must use a factory function ' + 'to return the default value.', vm);
  2433. } // the raw prop value was also undefined from previous render,
  2434. // return previous default value to avoid unnecessary watcher trigger
  2435. if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && vm._props[key] !== undefined) {
  2436. return vm._props[key];
  2437. } // call factory function for non-Function types
  2438. // a value is Function if its prototype is function even across different execution context
  2439. return typeof def === 'function' && getType(prop.type) !== 'Function' ? def.call(vm) : def;
  2440. }
  2441. /**
  2442. * Assert whether a prop is valid.
  2443. */
  2444. function assertProp(prop, name, value, vm, absent) {
  2445. if (prop.required && absent) {
  2446. warn('Missing required prop: "' + name + '"', vm);
  2447. return;
  2448. }
  2449. if (value == null && !prop.required) {
  2450. return;
  2451. }
  2452. var type = prop.type;
  2453. var valid = !type || type === true;
  2454. var expectedTypes = [];
  2455. if (type) {
  2456. if (!Array.isArray(type)) {
  2457. type = [type];
  2458. }
  2459. for (var i = 0; i < type.length && !valid; i++) {
  2460. var assertedType = assertType(value, type[i]);
  2461. expectedTypes.push(assertedType.expectedType || '');
  2462. valid = assertedType.valid;
  2463. }
  2464. }
  2465. if (!valid) {
  2466. warn(getInvalidTypeMessage(name, value, expectedTypes), vm);
  2467. return;
  2468. }
  2469. var validator = prop.validator;
  2470. if (validator) {
  2471. if (!validator(value)) {
  2472. warn('Invalid prop: custom validator check failed for prop "' + name + '".', vm);
  2473. }
  2474. }
  2475. }
  2476. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  2477. function assertType(value, type) {
  2478. var valid;
  2479. var expectedType = getType(type);
  2480. if (simpleCheckRE.test(expectedType)) {
  2481. var t = _typeof(value);
  2482. valid = t === expectedType.toLowerCase(); // for primitive wrapper objects
  2483. if (!valid && t === 'object') {
  2484. valid = value instanceof type;
  2485. }
  2486. } else if (expectedType === 'Object') {
  2487. valid = isPlainObject(value);
  2488. } else if (expectedType === 'Array') {
  2489. valid = Array.isArray(value);
  2490. } else {
  2491. valid = value instanceof type;
  2492. }
  2493. return {
  2494. valid: valid,
  2495. expectedType: expectedType
  2496. };
  2497. }
  2498. /**
  2499. * Use function string name to check built-in types,
  2500. * because a simple equality check will fail when running
  2501. * across different vms / iframes.
  2502. */
  2503. function getType(fn) {
  2504. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  2505. return match ? match[1] : '';
  2506. }
  2507. function isSameType(a, b) {
  2508. return getType(a) === getType(b);
  2509. }
  2510. function getTypeIndex(type, expectedTypes) {
  2511. if (!Array.isArray(expectedTypes)) {
  2512. return isSameType(expectedTypes, type) ? 0 : -1;
  2513. }
  2514. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  2515. if (isSameType(expectedTypes[i], type)) {
  2516. return i;
  2517. }
  2518. }
  2519. return -1;
  2520. }
  2521. function getInvalidTypeMessage(name, value, expectedTypes) {
  2522. var message = "Invalid prop: type check failed for prop \"" + name + "\"." + " Expected " + expectedTypes.map(capitalize).join(', ');
  2523. var expectedType = expectedTypes[0];
  2524. var receivedType = toRawType(value);
  2525. var expectedValue = styleValue(value, expectedType);
  2526. var receivedValue = styleValue(value, receivedType); // check if we need to specify expected value
  2527. if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
  2528. message += " with value " + expectedValue;
  2529. }
  2530. message += ", got " + receivedType + " "; // check if we need to specify received value
  2531. if (isExplicable(receivedType)) {
  2532. message += "with value " + receivedValue + ".";
  2533. }
  2534. return message;
  2535. }
  2536. function styleValue(value, type) {
  2537. if (type === 'String') {
  2538. return "\"" + value + "\"";
  2539. } else if (type === 'Number') {
  2540. return "" + Number(value);
  2541. } else {
  2542. return "" + value;
  2543. }
  2544. }
  2545. function isExplicable(value) {
  2546. var explicitTypes = ['string', 'number', 'boolean'];
  2547. return explicitTypes.some(function (elem) {
  2548. return value.toLowerCase() === elem;
  2549. });
  2550. }
  2551. function isBoolean() {
  2552. var args = [],
  2553. len = arguments.length;
  2554. while (len--) {
  2555. args[len] = arguments[len];
  2556. }
  2557. return args.some(function (elem) {
  2558. return elem.toLowerCase() === 'boolean';
  2559. });
  2560. }
  2561. /* */
  2562. function handleError(err, vm, info) {
  2563. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  2564. // See: https://github.com/vuejs/vuex/issues/1505
  2565. pushTarget();
  2566. try {
  2567. if (vm) {
  2568. var cur = vm;
  2569. while (cur = cur.$parent) {
  2570. var hooks = cur.$options.errorCaptured;
  2571. if (hooks) {
  2572. for (var i = 0; i < hooks.length; i++) {
  2573. try {
  2574. var capture = hooks[i].call(cur, err, vm, info) === false;
  2575. if (capture) {
  2576. return;
  2577. }
  2578. } catch (e) {
  2579. globalHandleError(e, cur, 'errorCaptured hook');
  2580. }
  2581. }
  2582. }
  2583. }
  2584. }
  2585. globalHandleError(err, vm, info);
  2586. } finally {
  2587. popTarget();
  2588. }
  2589. }
  2590. function invokeWithErrorHandling(handler, context, args, vm, info) {
  2591. var res;
  2592. try {
  2593. res = args ? handler.apply(context, args) : handler.call(context);
  2594. if (res && !res._isVue && isPromise(res) && !res._handled) {
  2595. res.catch(function (e) {
  2596. return handleError(e, vm, info + " (Promise/async)");
  2597. }); // issue #9511
  2598. // avoid catch triggering multiple times when nested calls
  2599. res._handled = true;
  2600. }
  2601. } catch (e) {
  2602. handleError(e, vm, info);
  2603. }
  2604. return res;
  2605. }
  2606. function globalHandleError(err, vm, info) {
  2607. if (config.errorHandler) {
  2608. try {
  2609. return config.errorHandler.call(null, err, vm, info);
  2610. } catch (e) {
  2611. // if the user intentionally throws the original error in the handler,
  2612. // do not log it twice
  2613. if (e !== err) {
  2614. logError(e, null, 'config.errorHandler');
  2615. }
  2616. }
  2617. }
  2618. logError(err, vm, info);
  2619. }
  2620. function logError(err, vm, info) {
  2621. if (true) {
  2622. warn("Error in " + info + ": \"" + err.toString() + "\"", vm);
  2623. }
  2624. /* istanbul ignore else */
  2625. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  2626. console.error(err);
  2627. } else {
  2628. throw err;
  2629. }
  2630. }
  2631. /* */
  2632. var isUsingMicroTask = false;
  2633. var callbacks = [];
  2634. var pending = false;
  2635. function flushCallbacks() {
  2636. pending = false;
  2637. var copies = callbacks.slice(0);
  2638. callbacks.length = 0;
  2639. for (var i = 0; i < copies.length; i++) {
  2640. copies[i]();
  2641. }
  2642. } // Here we have async deferring wrappers using microtasks.
  2643. // In 2.5 we used (macro) tasks (in combination with microtasks).
  2644. // However, it has subtle problems when state is changed right before repaint
  2645. // (e.g. #6813, out-in transitions).
  2646. // Also, using (macro) tasks in event handler would cause some weird behaviors
  2647. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  2648. // So we now use microtasks everywhere, again.
  2649. // A major drawback of this tradeoff is that there are some scenarios
  2650. // where microtasks have too high a priority and fire in between supposedly
  2651. // sequential events (e.g. #4521, #6690, which have workarounds)
  2652. // or even between bubbling of the same event (#6566).
  2653. var timerFunc; // The nextTick behavior leverages the microtask queue, which can be accessed
  2654. // via either native Promise.then or MutationObserver.
  2655. // MutationObserver has wider support, however it is seriously bugged in
  2656. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  2657. // completely stops working after triggering a few times... so, if native
  2658. // Promise is available, we will use it:
  2659. /* istanbul ignore next, $flow-disable-line */
  2660. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  2661. var p = Promise.resolve();
  2662. timerFunc = function timerFunc() {
  2663. p.then(flushCallbacks); // In problematic UIWebViews, Promise.then doesn't completely break, but
  2664. // it can get stuck in a weird state where callbacks are pushed into the
  2665. // microtask queue but the queue isn't being flushed, until the browser
  2666. // needs to do some other work, e.g. handle a timer. Therefore we can
  2667. // "force" the microtask queue to be flushed by adding an empty timer.
  2668. if (isIOS) {
  2669. setTimeout(noop);
  2670. }
  2671. };
  2672. isUsingMicroTask = true;
  2673. } else if (!isIE && typeof MutationObserver !== 'undefined' && (isNative(MutationObserver) || // PhantomJS and iOS 7.x
  2674. MutationObserver.toString() === '[object MutationObserverConstructor]')) {
  2675. // Use MutationObserver where native Promise is not available,
  2676. // e.g. PhantomJS, iOS7, Android 4.4
  2677. // (#6466 MutationObserver is unreliable in IE11)
  2678. var counter = 1;
  2679. var observer = new MutationObserver(flushCallbacks);
  2680. var textNode = document.createTextNode(String(counter));
  2681. observer.observe(textNode, {
  2682. characterData: true
  2683. });
  2684. timerFunc = function timerFunc() {
  2685. counter = (counter + 1) % 2;
  2686. textNode.data = String(counter);
  2687. };
  2688. isUsingMicroTask = true;
  2689. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  2690. // Fallback to setImmediate.
  2691. // Technically it leverages the (macro) task queue,
  2692. // but it is still a better choice than setTimeout.
  2693. timerFunc = function timerFunc() {
  2694. setImmediate(flushCallbacks);
  2695. };
  2696. } else {
  2697. // Fallback to setTimeout.
  2698. timerFunc = function timerFunc() {
  2699. setTimeout(flushCallbacks, 0);
  2700. };
  2701. }
  2702. function nextTick(cb, ctx) {
  2703. var _resolve;
  2704. callbacks.push(function () {
  2705. if (cb) {
  2706. try {
  2707. cb.call(ctx);
  2708. } catch (e) {
  2709. handleError(e, ctx, 'nextTick');
  2710. }
  2711. } else if (_resolve) {
  2712. _resolve(ctx);
  2713. }
  2714. });
  2715. if (!pending) {
  2716. pending = true;
  2717. timerFunc();
  2718. } // $flow-disable-line
  2719. if (!cb && typeof Promise !== 'undefined') {
  2720. return new Promise(function (resolve) {
  2721. _resolve = resolve;
  2722. });
  2723. }
  2724. }
  2725. /* */
  2726. /* not type checking this file because flow doesn't play well with Proxy */
  2727. var initProxy;
  2728. if (true) {
  2729. var allowedGlobals = makeMap('Infinity,undefined,NaN,isFinite,isNaN,' + 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' + 'require' // for Webpack/Browserify
  2730. );
  2731. var warnNonPresent = function warnNonPresent(target, key) {
  2732. warn("Property or method \"" + key + "\" is not defined on the instance but " + 'referenced during render. Make sure that this property is reactive, ' + 'either in the data option, or for class-based components, by ' + 'initializing the property. ' + 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target);
  2733. };
  2734. var warnReservedPrefix = function warnReservedPrefix(target, key) {
  2735. warn("Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " + 'properties starting with "$" or "_" are not proxied in the Vue instance to ' + 'prevent conflicts with Vue internals. ' + 'See: https://vuejs.org/v2/api/#data', target);
  2736. };
  2737. var hasProxy = typeof Proxy !== 'undefined' && isNative(Proxy);
  2738. if (hasProxy) {
  2739. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  2740. config.keyCodes = new Proxy(config.keyCodes, {
  2741. set: function set(target, key, value) {
  2742. if (isBuiltInModifier(key)) {
  2743. warn("Avoid overwriting built-in modifier in config.keyCodes: ." + key);
  2744. return false;
  2745. } else {
  2746. target[key] = value;
  2747. return true;
  2748. }
  2749. }
  2750. });
  2751. }
  2752. var hasHandler = {
  2753. has: function has(target, key) {
  2754. var has = (key in target);
  2755. var isAllowed = allowedGlobals(key) || typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data);
  2756. if (!has && !isAllowed) {
  2757. if (key in target.$data) {
  2758. warnReservedPrefix(target, key);
  2759. } else {
  2760. warnNonPresent(target, key);
  2761. }
  2762. }
  2763. return has || !isAllowed;
  2764. }
  2765. };
  2766. var getHandler = {
  2767. get: function get(target, key) {
  2768. if (typeof key === 'string' && !(key in target)) {
  2769. if (key in target.$data) {
  2770. warnReservedPrefix(target, key);
  2771. } else {
  2772. warnNonPresent(target, key);
  2773. }
  2774. }
  2775. return target[key];
  2776. }
  2777. };
  2778. initProxy = function initProxy(vm) {
  2779. if (hasProxy) {
  2780. // determine which proxy handler to use
  2781. var options = vm.$options;
  2782. var handlers = options.render && options.render._withStripped ? getHandler : hasHandler;
  2783. vm._renderProxy = new Proxy(vm, handlers);
  2784. } else {
  2785. vm._renderProxy = vm;
  2786. }
  2787. };
  2788. }
  2789. /* */
  2790. var seenObjects = new _Set();
  2791. /**
  2792. * Recursively traverse an object to evoke all converted
  2793. * getters, so that every nested property inside the object
  2794. * is collected as a "deep" dependency.
  2795. */
  2796. function traverse(val) {
  2797. _traverse(val, seenObjects);
  2798. seenObjects.clear();
  2799. }
  2800. function _traverse(val, seen) {
  2801. var i, keys;
  2802. var isA = Array.isArray(val);
  2803. if (!isA && !isObject(val) || Object.isFrozen(val) || val instanceof VNode) {
  2804. return;
  2805. }
  2806. if (val.__ob__) {
  2807. var depId = val.__ob__.dep.id;
  2808. if (seen.has(depId)) {
  2809. return;
  2810. }
  2811. seen.add(depId);
  2812. }
  2813. if (isA) {
  2814. i = val.length;
  2815. while (i--) {
  2816. _traverse(val[i], seen);
  2817. }
  2818. } else {
  2819. keys = Object.keys(val);
  2820. i = keys.length;
  2821. while (i--) {
  2822. _traverse(val[keys[i]], seen);
  2823. }
  2824. }
  2825. }
  2826. var mark;
  2827. var measure;
  2828. if (true) {
  2829. var perf = inBrowser && window.performance;
  2830. /* istanbul ignore if */
  2831. if (perf && perf.mark && perf.measure && perf.clearMarks && perf.clearMeasures) {
  2832. mark = function mark(tag) {
  2833. return perf.mark(tag);
  2834. };
  2835. measure = function measure(name, startTag, endTag) {
  2836. perf.measure(name, startTag, endTag);
  2837. perf.clearMarks(startTag);
  2838. perf.clearMarks(endTag); // perf.clearMeasures(name)
  2839. };
  2840. }
  2841. }
  2842. /* */
  2843. var normalizeEvent = cached(function (name) {
  2844. var passive = name.charAt(0) === '&';
  2845. name = passive ? name.slice(1) : name;
  2846. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  2847. name = once$$1 ? name.slice(1) : name;
  2848. var capture = name.charAt(0) === '!';
  2849. name = capture ? name.slice(1) : name;
  2850. return {
  2851. name: name,
  2852. once: once$$1,
  2853. capture: capture,
  2854. passive: passive
  2855. };
  2856. });
  2857. function createFnInvoker(fns, vm) {
  2858. function invoker() {
  2859. var arguments$1 = arguments;
  2860. var fns = invoker.fns;
  2861. if (Array.isArray(fns)) {
  2862. var cloned = fns.slice();
  2863. for (var i = 0; i < cloned.length; i++) {
  2864. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  2865. }
  2866. } else {
  2867. // return handler return value for single handlers
  2868. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler");
  2869. }
  2870. }
  2871. invoker.fns = fns;
  2872. return invoker;
  2873. }
  2874. function updateListeners(on, oldOn, add, remove$$1, createOnceHandler, vm) {
  2875. var name, def$$1, cur, old, event;
  2876. for (name in on) {
  2877. def$$1 = cur = on[name];
  2878. old = oldOn[name];
  2879. event = normalizeEvent(name);
  2880. if (isUndef(cur)) {
  2881. true && warn("Invalid handler for event \"" + event.name + "\": got " + String(cur), vm);
  2882. } else if (isUndef(old)) {
  2883. if (isUndef(cur.fns)) {
  2884. cur = on[name] = createFnInvoker(cur, vm);
  2885. }
  2886. if (isTrue(event.once)) {
  2887. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  2888. }
  2889. add(event.name, cur, event.capture, event.passive, event.params);
  2890. } else if (cur !== old) {
  2891. old.fns = cur;
  2892. on[name] = old;
  2893. }
  2894. }
  2895. for (name in oldOn) {
  2896. if (isUndef(on[name])) {
  2897. event = normalizeEvent(name);
  2898. remove$$1(event.name, oldOn[name], event.capture);
  2899. }
  2900. }
  2901. }
  2902. /* */
  2903. function mergeVNodeHook(def, hookKey, hook) {
  2904. if (def instanceof VNode) {
  2905. def = def.data.hook || (def.data.hook = {});
  2906. }
  2907. var invoker;
  2908. var oldHook = def[hookKey];
  2909. function wrappedHook() {
  2910. hook.apply(this, arguments); // important: remove merged hook to ensure it's called only once
  2911. // and prevent memory leak
  2912. remove(invoker.fns, wrappedHook);
  2913. }
  2914. if (isUndef(oldHook)) {
  2915. // no existing hook
  2916. invoker = createFnInvoker([wrappedHook]);
  2917. } else {
  2918. /* istanbul ignore if */
  2919. if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
  2920. // already a merged invoker
  2921. invoker = oldHook;
  2922. invoker.fns.push(wrappedHook);
  2923. } else {
  2924. // existing plain hook
  2925. invoker = createFnInvoker([oldHook, wrappedHook]);
  2926. }
  2927. }
  2928. invoker.merged = true;
  2929. def[hookKey] = invoker;
  2930. }
  2931. /* */
  2932. // fixed by xxxxxx (mp properties)
  2933. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  2934. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  2935. if (isUndef(propOptions)) {
  2936. return res;
  2937. }
  2938. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  2939. var attrs = data.attrs;
  2940. var props = data.props;
  2941. if (isDef(attrs) || isDef(props)) {
  2942. for (var key in propOptions) {
  2943. var altKey = hyphenate(key);
  2944. var result = checkProp(res, props, key, altKey, true) || checkProp(res, attrs, key, altKey, false); // externalClass
  2945. if (result && res[key] && externalClasses.indexOf(altKey) !== -1 && context[camelize(res[key])]) {
  2946. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  2947. res[key] = context[camelize(res[key])];
  2948. }
  2949. }
  2950. }
  2951. return res;
  2952. }
  2953. function extractPropsFromVNodeData(data, Ctor, tag, context // fixed by xxxxxx
  2954. ) {
  2955. // we are only extracting raw values here.
  2956. // validation and default values are handled in the child
  2957. // component itself.
  2958. var propOptions = Ctor.options.props;
  2959. if (isUndef(propOptions)) {
  2960. // fixed by xxxxxx
  2961. return extractPropertiesFromVNodeData(data, Ctor, {}, context);
  2962. }
  2963. var res = {};
  2964. var attrs = data.attrs;
  2965. var props = data.props;
  2966. if (isDef(attrs) || isDef(props)) {
  2967. for (var key in propOptions) {
  2968. var altKey = hyphenate(key);
  2969. if (true) {
  2970. var keyInLowerCase = key.toLowerCase();
  2971. if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {
  2972. tip("Prop \"" + keyInLowerCase + "\" is passed to component " + formatComponentName(tag || Ctor) + ", but the declared prop name is" + " \"" + key + "\". " + "Note that HTML attributes are case-insensitive and camelCased " + "props need to use their kebab-case equivalents when using in-DOM " + "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\".");
  2973. }
  2974. }
  2975. checkProp(res, props, key, altKey, true) || checkProp(res, attrs, key, altKey, false);
  2976. }
  2977. } // fixed by xxxxxx
  2978. return extractPropertiesFromVNodeData(data, Ctor, res, context);
  2979. }
  2980. function checkProp(res, hash, key, altKey, preserve) {
  2981. if (isDef(hash)) {
  2982. if (hasOwn(hash, key)) {
  2983. res[key] = hash[key];
  2984. if (!preserve) {
  2985. delete hash[key];
  2986. }
  2987. return true;
  2988. } else if (hasOwn(hash, altKey)) {
  2989. res[key] = hash[altKey];
  2990. if (!preserve) {
  2991. delete hash[altKey];
  2992. }
  2993. return true;
  2994. }
  2995. }
  2996. return false;
  2997. }
  2998. /* */
  2999. // The template compiler attempts to minimize the need for normalization by
  3000. // statically analyzing the template at compile time.
  3001. //
  3002. // For plain HTML markup, normalization can be completely skipped because the
  3003. // generated render function is guaranteed to return Array<VNode>. There are
  3004. // two cases where extra normalization is needed:
  3005. // 1. When the children contains components - because a functional component
  3006. // may return an Array instead of a single root. In this case, just a simple
  3007. // normalization is needed - if any child is an Array, we flatten the whole
  3008. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  3009. // because functional components already normalize their own children.
  3010. function simpleNormalizeChildren(children) {
  3011. for (var i = 0; i < children.length; i++) {
  3012. if (Array.isArray(children[i])) {
  3013. return Array.prototype.concat.apply([], children);
  3014. }
  3015. }
  3016. return children;
  3017. } // 2. When the children contains constructs that always generated nested Arrays,
  3018. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  3019. // with hand-written render functions / JSX. In such cases a full normalization
  3020. // is needed to cater to all possible types of children values.
  3021. function normalizeChildren(children) {
  3022. return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;
  3023. }
  3024. function isTextNode(node) {
  3025. return isDef(node) && isDef(node.text) && isFalse(node.isComment);
  3026. }
  3027. function normalizeArrayChildren(children, nestedIndex) {
  3028. var res = [];
  3029. var i, c, lastIndex, last;
  3030. for (i = 0; i < children.length; i++) {
  3031. c = children[i];
  3032. if (isUndef(c) || typeof c === 'boolean') {
  3033. continue;
  3034. }
  3035. lastIndex = res.length - 1;
  3036. last = res[lastIndex]; // nested
  3037. if (Array.isArray(c)) {
  3038. if (c.length > 0) {
  3039. c = normalizeArrayChildren(c, (nestedIndex || '') + "_" + i); // merge adjacent text nodes
  3040. if (isTextNode(c[0]) && isTextNode(last)) {
  3041. res[lastIndex] = createTextVNode(last.text + c[0].text);
  3042. c.shift();
  3043. }
  3044. res.push.apply(res, c);
  3045. }
  3046. } else if (isPrimitive(c)) {
  3047. if (isTextNode(last)) {
  3048. // merge adjacent text nodes
  3049. // this is necessary for SSR hydration because text nodes are
  3050. // essentially merged when rendered to HTML strings
  3051. res[lastIndex] = createTextVNode(last.text + c);
  3052. } else if (c !== '') {
  3053. // convert primitive to vnode
  3054. res.push(createTextVNode(c));
  3055. }
  3056. } else {
  3057. if (isTextNode(c) && isTextNode(last)) {
  3058. // merge adjacent text nodes
  3059. res[lastIndex] = createTextVNode(last.text + c.text);
  3060. } else {
  3061. // default key for nested array children (likely generated by v-for)
  3062. if (isTrue(children._isVList) && isDef(c.tag) && isUndef(c.key) && isDef(nestedIndex)) {
  3063. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  3064. }
  3065. res.push(c);
  3066. }
  3067. }
  3068. }
  3069. return res;
  3070. }
  3071. /* */
  3072. function initProvide(vm) {
  3073. var provide = vm.$options.provide;
  3074. if (provide) {
  3075. vm._provided = typeof provide === 'function' ? provide.call(vm) : provide;
  3076. }
  3077. }
  3078. function initInjections(vm) {
  3079. var result = resolveInject(vm.$options.inject, vm);
  3080. if (result) {
  3081. toggleObserving(false);
  3082. Object.keys(result).forEach(function (key) {
  3083. /* istanbul ignore else */
  3084. if (true) {
  3085. defineReactive$$1(vm, key, result[key], function () {
  3086. warn("Avoid mutating an injected value directly since the changes will be " + "overwritten whenever the provided component re-renders. " + "injection being mutated: \"" + key + "\"", vm);
  3087. });
  3088. } else {}
  3089. });
  3090. toggleObserving(true);
  3091. }
  3092. }
  3093. function resolveInject(inject, vm) {
  3094. if (inject) {
  3095. // inject is :any because flow is not smart enough to figure out cached
  3096. var result = Object.create(null);
  3097. var keys = hasSymbol ? Reflect.ownKeys(inject) : Object.keys(inject);
  3098. for (var i = 0; i < keys.length; i++) {
  3099. var key = keys[i]; // #6574 in case the inject object is observed...
  3100. if (key === '__ob__') {
  3101. continue;
  3102. }
  3103. var provideKey = inject[key].from;
  3104. var source = vm;
  3105. while (source) {
  3106. if (source._provided && hasOwn(source._provided, provideKey)) {
  3107. result[key] = source._provided[provideKey];
  3108. break;
  3109. }
  3110. source = source.$parent;
  3111. }
  3112. if (!source) {
  3113. if ('default' in inject[key]) {
  3114. var provideDefault = inject[key].default;
  3115. result[key] = typeof provideDefault === 'function' ? provideDefault.call(vm) : provideDefault;
  3116. } else if (true) {
  3117. warn("Injection \"" + key + "\" not found", vm);
  3118. }
  3119. }
  3120. }
  3121. return result;
  3122. }
  3123. }
  3124. /* */
  3125. /**
  3126. * Runtime helper for resolving raw children VNodes into a slot object.
  3127. */
  3128. function resolveSlots(children, context) {
  3129. if (!children || !children.length) {
  3130. return {};
  3131. }
  3132. var slots = {};
  3133. for (var i = 0, l = children.length; i < l; i++) {
  3134. var child = children[i];
  3135. var data = child.data; // remove slot attribute if the node is resolved as a Vue slot node
  3136. if (data && data.attrs && data.attrs.slot) {
  3137. delete data.attrs.slot;
  3138. } // named slots should only be respected if the vnode was rendered in the
  3139. // same context.
  3140. if ((child.context === context || child.fnContext === context) && data && data.slot != null) {
  3141. var name = data.slot;
  3142. var slot = slots[name] || (slots[name] = []);
  3143. if (child.tag === 'template') {
  3144. slot.push.apply(slot, child.children || []);
  3145. } else {
  3146. slot.push(child);
  3147. }
  3148. } else {
  3149. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  3150. if (child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page') {
  3151. (slots['page'] || (slots['page'] = [])).push(child);
  3152. } else {
  3153. (slots.default || (slots.default = [])).push(child);
  3154. }
  3155. }
  3156. } // ignore slots that contains only whitespace
  3157. for (var name$1 in slots) {
  3158. if (slots[name$1].every(isWhitespace)) {
  3159. delete slots[name$1];
  3160. }
  3161. }
  3162. return slots;
  3163. }
  3164. function isWhitespace(node) {
  3165. return node.isComment && !node.asyncFactory || node.text === ' ';
  3166. }
  3167. /* */
  3168. function normalizeScopedSlots(slots, normalSlots, prevSlots) {
  3169. var res;
  3170. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  3171. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  3172. var key = slots && slots.$key;
  3173. if (!slots) {
  3174. res = {};
  3175. } else if (slots._normalized) {
  3176. // fast path 1: child component re-render only, parent did not change
  3177. return slots._normalized;
  3178. } else if (isStable && prevSlots && prevSlots !== emptyObject && key === prevSlots.$key && !hasNormalSlots && !prevSlots.$hasNormal) {
  3179. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  3180. // only need to normalize once
  3181. return prevSlots;
  3182. } else {
  3183. res = {};
  3184. for (var key$1 in slots) {
  3185. if (slots[key$1] && key$1[0] !== '$') {
  3186. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  3187. }
  3188. }
  3189. } // expose normal slots on scopedSlots
  3190. for (var key$2 in normalSlots) {
  3191. if (!(key$2 in res)) {
  3192. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  3193. }
  3194. } // avoriaz seems to mock a non-extensible $scopedSlots object
  3195. // and when that is passed down this would cause an error
  3196. if (slots && Object.isExtensible(slots)) {
  3197. slots._normalized = res;
  3198. }
  3199. def(res, '$stable', isStable);
  3200. def(res, '$key', key);
  3201. def(res, '$hasNormal', hasNormalSlots);
  3202. return res;
  3203. }
  3204. function normalizeScopedSlot(normalSlots, key, fn) {
  3205. var normalized = function normalized() {
  3206. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  3207. res = res && _typeof(res) === 'object' && !Array.isArray(res) ? [res] // single vnode
  3208. : normalizeChildren(res);
  3209. return res && (res.length === 0 || res.length === 1 && res[0].isComment // #9658
  3210. ) ? undefined : res;
  3211. }; // this is a slot using the new v-slot syntax without scope. although it is
  3212. // compiled as a scoped slot, render fn users would expect it to be present
  3213. // on this.$slots because the usage is semantically a normal slot.
  3214. if (fn.proxy) {
  3215. Object.defineProperty(normalSlots, key, {
  3216. get: normalized,
  3217. enumerable: true,
  3218. configurable: true
  3219. });
  3220. }
  3221. return normalized;
  3222. }
  3223. function proxyNormalSlot(slots, key) {
  3224. return function () {
  3225. return slots[key];
  3226. };
  3227. }
  3228. /* */
  3229. /**
  3230. * Runtime helper for rendering v-for lists.
  3231. */
  3232. function renderList(val, render) {
  3233. var ret, i, l, keys, key;
  3234. if (Array.isArray(val) || typeof val === 'string') {
  3235. ret = new Array(val.length);
  3236. for (i = 0, l = val.length; i < l; i++) {
  3237. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  3238. }
  3239. } else if (typeof val === 'number') {
  3240. ret = new Array(val);
  3241. for (i = 0; i < val; i++) {
  3242. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  3243. }
  3244. } else if (isObject(val)) {
  3245. if (hasSymbol && val[Symbol.iterator]) {
  3246. ret = [];
  3247. var iterator = val[Symbol.iterator]();
  3248. var result = iterator.next();
  3249. while (!result.done) {
  3250. ret.push(render(result.value, ret.length, i++, i)); // fixed by xxxxxx
  3251. result = iterator.next();
  3252. }
  3253. } else {
  3254. keys = Object.keys(val);
  3255. ret = new Array(keys.length);
  3256. for (i = 0, l = keys.length; i < l; i++) {
  3257. key = keys[i];
  3258. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  3259. }
  3260. }
  3261. }
  3262. if (!isDef(ret)) {
  3263. ret = [];
  3264. }
  3265. ret._isVList = true;
  3266. return ret;
  3267. }
  3268. /* */
  3269. /**
  3270. * Runtime helper for rendering <slot>
  3271. */
  3272. function renderSlot(name, fallback, props, bindObject) {
  3273. var scopedSlotFn = this.$scopedSlots[name];
  3274. var nodes;
  3275. if (scopedSlotFn) {
  3276. // scoped slot
  3277. props = props || {};
  3278. if (bindObject) {
  3279. if ( true && !isObject(bindObject)) {
  3280. warn('slot v-bind without argument expects an Object', this);
  3281. }
  3282. props = extend(extend({}, bindObject), props);
  3283. } // fixed by xxxxxx app-plus scopedSlot
  3284. nodes = scopedSlotFn(props, this, props._i) || fallback;
  3285. } else {
  3286. nodes = this.$slots[name] || fallback;
  3287. }
  3288. var target = props && props.slot;
  3289. if (target) {
  3290. return this.$createElement('template', {
  3291. slot: target
  3292. }, nodes);
  3293. } else {
  3294. return nodes;
  3295. }
  3296. }
  3297. /* */
  3298. /**
  3299. * Runtime helper for resolving filters
  3300. */
  3301. function resolveFilter(id) {
  3302. return resolveAsset(this.$options, 'filters', id, true) || identity;
  3303. }
  3304. /* */
  3305. function isKeyNotMatch(expect, actual) {
  3306. if (Array.isArray(expect)) {
  3307. return expect.indexOf(actual) === -1;
  3308. } else {
  3309. return expect !== actual;
  3310. }
  3311. }
  3312. /**
  3313. * Runtime helper for checking keyCodes from config.
  3314. * exposed as Vue.prototype._k
  3315. * passing in eventKeyName as last argument separately for backwards compat
  3316. */
  3317. function checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {
  3318. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  3319. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  3320. return isKeyNotMatch(builtInKeyName, eventKeyName);
  3321. } else if (mappedKeyCode) {
  3322. return isKeyNotMatch(mappedKeyCode, eventKeyCode);
  3323. } else if (eventKeyName) {
  3324. return hyphenate(eventKeyName) !== key;
  3325. }
  3326. }
  3327. /* */
  3328. /**
  3329. * Runtime helper for merging v-bind="object" into a VNode's data.
  3330. */
  3331. function bindObjectProps(data, tag, value, asProp, isSync) {
  3332. if (value) {
  3333. if (!isObject(value)) {
  3334. true && warn('v-bind without argument expects an Object or Array value', this);
  3335. } else {
  3336. if (Array.isArray(value)) {
  3337. value = toObject(value);
  3338. }
  3339. var hash;
  3340. var loop = function loop(key) {
  3341. if (key === 'class' || key === 'style' || isReservedAttribute(key)) {
  3342. hash = data;
  3343. } else {
  3344. var type = data.attrs && data.attrs.type;
  3345. hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});
  3346. }
  3347. var camelizedKey = camelize(key);
  3348. var hyphenatedKey = hyphenate(key);
  3349. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  3350. hash[key] = value[key];
  3351. if (isSync) {
  3352. var on = data.on || (data.on = {});
  3353. on["update:" + key] = function ($event) {
  3354. value[key] = $event;
  3355. };
  3356. }
  3357. }
  3358. };
  3359. for (var key in value) {
  3360. loop(key);
  3361. }
  3362. }
  3363. }
  3364. return data;
  3365. }
  3366. /* */
  3367. /**
  3368. * Runtime helper for rendering static trees.
  3369. */
  3370. function renderStatic(index, isInFor) {
  3371. var cached = this._staticTrees || (this._staticTrees = []);
  3372. var tree = cached[index]; // if has already-rendered static tree and not inside v-for,
  3373. // we can reuse the same tree.
  3374. if (tree && !isInFor) {
  3375. return tree;
  3376. } // otherwise, render a fresh tree.
  3377. tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, null, this // for render fns generated for functional component templates
  3378. );
  3379. markStatic(tree, "__static__" + index, false);
  3380. return tree;
  3381. }
  3382. /**
  3383. * Runtime helper for v-once.
  3384. * Effectively it means marking the node as static with a unique key.
  3385. */
  3386. function markOnce(tree, index, key) {
  3387. markStatic(tree, "__once__" + index + (key ? "_" + key : ""), true);
  3388. return tree;
  3389. }
  3390. function markStatic(tree, key, isOnce) {
  3391. if (Array.isArray(tree)) {
  3392. for (var i = 0; i < tree.length; i++) {
  3393. if (tree[i] && typeof tree[i] !== 'string') {
  3394. markStaticNode(tree[i], key + "_" + i, isOnce);
  3395. }
  3396. }
  3397. } else {
  3398. markStaticNode(tree, key, isOnce);
  3399. }
  3400. }
  3401. function markStaticNode(node, key, isOnce) {
  3402. node.isStatic = true;
  3403. node.key = key;
  3404. node.isOnce = isOnce;
  3405. }
  3406. /* */
  3407. function bindObjectListeners(data, value) {
  3408. if (value) {
  3409. if (!isPlainObject(value)) {
  3410. true && warn('v-on without argument expects an Object value', this);
  3411. } else {
  3412. var on = data.on = data.on ? extend({}, data.on) : {};
  3413. for (var key in value) {
  3414. var existing = on[key];
  3415. var ours = value[key];
  3416. on[key] = existing ? [].concat(existing, ours) : ours;
  3417. }
  3418. }
  3419. }
  3420. return data;
  3421. }
  3422. /* */
  3423. function resolveScopedSlots(fns, // see flow/vnode
  3424. res, // the following are added in 2.6
  3425. hasDynamicKeys, contentHashKey) {
  3426. res = res || {
  3427. $stable: !hasDynamicKeys
  3428. };
  3429. for (var i = 0; i < fns.length; i++) {
  3430. var slot = fns[i];
  3431. if (Array.isArray(slot)) {
  3432. resolveScopedSlots(slot, res, hasDynamicKeys);
  3433. } else if (slot) {
  3434. // marker for reverse proxying v-slot without scope on this.$slots
  3435. if (slot.proxy) {
  3436. slot.fn.proxy = true;
  3437. }
  3438. res[slot.key] = slot.fn;
  3439. }
  3440. }
  3441. if (contentHashKey) {
  3442. res.$key = contentHashKey;
  3443. }
  3444. return res;
  3445. }
  3446. /* */
  3447. function bindDynamicKeys(baseObj, values) {
  3448. for (var i = 0; i < values.length; i += 2) {
  3449. var key = values[i];
  3450. if (typeof key === 'string' && key) {
  3451. baseObj[values[i]] = values[i + 1];
  3452. } else if ( true && key !== '' && key !== null) {
  3453. // null is a special value for explicitly removing a binding
  3454. warn("Invalid value for dynamic directive argument (expected string or null): " + key, this);
  3455. }
  3456. }
  3457. return baseObj;
  3458. } // helper to dynamically append modifier runtime markers to event names.
  3459. // ensure only append when value is already string, otherwise it will be cast
  3460. // to string and cause the type check to miss.
  3461. function prependModifier(value, symbol) {
  3462. return typeof value === 'string' ? symbol + value : value;
  3463. }
  3464. /* */
  3465. function installRenderHelpers(target) {
  3466. target._o = markOnce;
  3467. target._n = toNumber;
  3468. target._s = toString;
  3469. target._l = renderList;
  3470. target._t = renderSlot;
  3471. target._q = looseEqual;
  3472. target._i = looseIndexOf;
  3473. target._m = renderStatic;
  3474. target._f = resolveFilter;
  3475. target._k = checkKeyCodes;
  3476. target._b = bindObjectProps;
  3477. target._v = createTextVNode;
  3478. target._e = createEmptyVNode;
  3479. target._u = resolveScopedSlots;
  3480. target._g = bindObjectListeners;
  3481. target._d = bindDynamicKeys;
  3482. target._p = prependModifier;
  3483. }
  3484. /* */
  3485. function FunctionalRenderContext(data, props, children, parent, Ctor) {
  3486. var this$1 = this;
  3487. var options = Ctor.options; // ensure the createElement function in functional components
  3488. // gets a unique context - this is necessary for correct named slot check
  3489. var contextVm;
  3490. if (hasOwn(parent, '_uid')) {
  3491. contextVm = Object.create(parent); // $flow-disable-line
  3492. contextVm._original = parent;
  3493. } else {
  3494. // the context vm passed in is a functional context as well.
  3495. // in this case we want to make sure we are able to get a hold to the
  3496. // real context instance.
  3497. contextVm = parent; // $flow-disable-line
  3498. parent = parent._original;
  3499. }
  3500. var isCompiled = isTrue(options._compiled);
  3501. var needNormalization = !isCompiled;
  3502. this.data = data;
  3503. this.props = props;
  3504. this.children = children;
  3505. this.parent = parent;
  3506. this.listeners = data.on || emptyObject;
  3507. this.injections = resolveInject(options.inject, parent);
  3508. this.slots = function () {
  3509. if (!this$1.$slots) {
  3510. normalizeScopedSlots(data.scopedSlots, this$1.$slots = resolveSlots(children, parent));
  3511. }
  3512. return this$1.$slots;
  3513. };
  3514. Object.defineProperty(this, 'scopedSlots', {
  3515. enumerable: true,
  3516. get: function get() {
  3517. return normalizeScopedSlots(data.scopedSlots, this.slots());
  3518. }
  3519. }); // support for compiled functional template
  3520. if (isCompiled) {
  3521. // exposing $options for renderStatic()
  3522. this.$options = options; // pre-resolve slots for renderSlot()
  3523. this.$slots = this.slots();
  3524. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  3525. }
  3526. if (options._scopeId) {
  3527. this._c = function (a, b, c, d) {
  3528. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  3529. if (vnode && !Array.isArray(vnode)) {
  3530. vnode.fnScopeId = options._scopeId;
  3531. vnode.fnContext = parent;
  3532. }
  3533. return vnode;
  3534. };
  3535. } else {
  3536. this._c = function (a, b, c, d) {
  3537. return createElement(contextVm, a, b, c, d, needNormalization);
  3538. };
  3539. }
  3540. }
  3541. installRenderHelpers(FunctionalRenderContext.prototype);
  3542. function createFunctionalComponent(Ctor, propsData, data, contextVm, children) {
  3543. var options = Ctor.options;
  3544. var props = {};
  3545. var propOptions = options.props;
  3546. if (isDef(propOptions)) {
  3547. for (var key in propOptions) {
  3548. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  3549. }
  3550. } else {
  3551. if (isDef(data.attrs)) {
  3552. mergeProps(props, data.attrs);
  3553. }
  3554. if (isDef(data.props)) {
  3555. mergeProps(props, data.props);
  3556. }
  3557. }
  3558. var renderContext = new FunctionalRenderContext(data, props, children, contextVm, Ctor);
  3559. var vnode = options.render.call(null, renderContext._c, renderContext);
  3560. if (vnode instanceof VNode) {
  3561. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext);
  3562. } else if (Array.isArray(vnode)) {
  3563. var vnodes = normalizeChildren(vnode) || [];
  3564. var res = new Array(vnodes.length);
  3565. for (var i = 0; i < vnodes.length; i++) {
  3566. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  3567. }
  3568. return res;
  3569. }
  3570. }
  3571. function cloneAndMarkFunctionalResult(vnode, data, contextVm, options, renderContext) {
  3572. // #7817 clone node before setting fnContext, otherwise if the node is reused
  3573. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  3574. // that should not be matched to match.
  3575. var clone = cloneVNode(vnode);
  3576. clone.fnContext = contextVm;
  3577. clone.fnOptions = options;
  3578. if (true) {
  3579. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  3580. }
  3581. if (data.slot) {
  3582. (clone.data || (clone.data = {})).slot = data.slot;
  3583. }
  3584. return clone;
  3585. }
  3586. function mergeProps(to, from) {
  3587. for (var key in from) {
  3588. to[camelize(key)] = from[key];
  3589. }
  3590. }
  3591. /* */
  3592. /* */
  3593. /* */
  3594. /* */
  3595. // inline hooks to be invoked on component VNodes during patch
  3596. var componentVNodeHooks = {
  3597. init: function init(vnode, hydrating) {
  3598. if (vnode.componentInstance && !vnode.componentInstance._isDestroyed && vnode.data.keepAlive) {
  3599. // kept-alive components, treat as a patch
  3600. var mountedNode = vnode; // work around flow
  3601. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  3602. } else {
  3603. var child = vnode.componentInstance = createComponentInstanceForVnode(vnode, activeInstance);
  3604. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  3605. }
  3606. },
  3607. prepatch: function prepatch(oldVnode, vnode) {
  3608. var options = vnode.componentOptions;
  3609. var child = vnode.componentInstance = oldVnode.componentInstance;
  3610. updateChildComponent(child, options.propsData, // updated props
  3611. options.listeners, // updated listeners
  3612. vnode, // new parent vnode
  3613. options.children // new children
  3614. );
  3615. },
  3616. insert: function insert(vnode) {
  3617. var context = vnode.context;
  3618. var componentInstance = vnode.componentInstance;
  3619. if (!componentInstance._isMounted) {
  3620. callHook(componentInstance, 'onServiceCreated');
  3621. callHook(componentInstance, 'onServiceAttached');
  3622. componentInstance._isMounted = true;
  3623. callHook(componentInstance, 'mounted');
  3624. }
  3625. if (vnode.data.keepAlive) {
  3626. if (context._isMounted) {
  3627. // vue-router#1212
  3628. // During updates, a kept-alive component's child components may
  3629. // change, so directly walking the tree here may call activated hooks
  3630. // on incorrect children. Instead we push them into a queue which will
  3631. // be processed after the whole patch process ended.
  3632. queueActivatedComponent(componentInstance);
  3633. } else {
  3634. activateChildComponent(componentInstance, true
  3635. /* direct */
  3636. );
  3637. }
  3638. }
  3639. },
  3640. destroy: function destroy(vnode) {
  3641. var componentInstance = vnode.componentInstance;
  3642. if (!componentInstance._isDestroyed) {
  3643. if (!vnode.data.keepAlive) {
  3644. componentInstance.$destroy();
  3645. } else {
  3646. deactivateChildComponent(componentInstance, true
  3647. /* direct */
  3648. );
  3649. }
  3650. }
  3651. }
  3652. };
  3653. var hooksToMerge = Object.keys(componentVNodeHooks);
  3654. function createComponent(Ctor, data, context, children, tag) {
  3655. if (isUndef(Ctor)) {
  3656. return;
  3657. }
  3658. var baseCtor = context.$options._base; // plain options object: turn it into a constructor
  3659. if (isObject(Ctor)) {
  3660. Ctor = baseCtor.extend(Ctor);
  3661. } // if at this stage it's not a constructor or an async component factory,
  3662. // reject.
  3663. if (typeof Ctor !== 'function') {
  3664. if (true) {
  3665. warn("Invalid Component definition: " + String(Ctor), context);
  3666. }
  3667. return;
  3668. } // async component
  3669. var asyncFactory;
  3670. if (isUndef(Ctor.cid)) {
  3671. asyncFactory = Ctor;
  3672. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  3673. if (Ctor === undefined) {
  3674. // return a placeholder node for async component, which is rendered
  3675. // as a comment node but preserves all the raw information for the node.
  3676. // the information will be used for async server-rendering and hydration.
  3677. return createAsyncPlaceholder(asyncFactory, data, context, children, tag);
  3678. }
  3679. }
  3680. data = data || {}; // resolve constructor options in case global mixins are applied after
  3681. // component constructor creation
  3682. resolveConstructorOptions(Ctor); // transform component v-model data into props & events
  3683. if (isDef(data.model)) {
  3684. transformModel(Ctor.options, data);
  3685. } // extract props
  3686. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  3687. // functional component
  3688. if (isTrue(Ctor.options.functional)) {
  3689. return createFunctionalComponent(Ctor, propsData, data, context, children);
  3690. } // extract listeners, since these needs to be treated as
  3691. // child component listeners instead of DOM listeners
  3692. var listeners = data.on; // replace with listeners with .native modifier
  3693. // so it gets processed during parent component patch.
  3694. data.on = data.nativeOn;
  3695. if (isTrue(Ctor.options.abstract)) {
  3696. // abstract components do not keep anything
  3697. // other than props & listeners & slot
  3698. // work around flow
  3699. var slot = data.slot;
  3700. data = {};
  3701. if (slot) {
  3702. data.slot = slot;
  3703. }
  3704. } // install component management hooks onto the placeholder node
  3705. installComponentHooks(data); // return a placeholder vnode
  3706. var name = Ctor.options.name || tag;
  3707. var vnode = new VNode("vue-component-" + Ctor.cid + (name ? "-" + name : ''), data, undefined, undefined, undefined, context, {
  3708. Ctor: Ctor,
  3709. propsData: propsData,
  3710. listeners: listeners,
  3711. tag: tag,
  3712. children: children
  3713. }, asyncFactory);
  3714. return vnode;
  3715. }
  3716. function createComponentInstanceForVnode(vnode, // we know it's MountedComponentVNode but flow doesn't
  3717. parent // activeInstance in lifecycle state
  3718. ) {
  3719. var options = {
  3720. _isComponent: true,
  3721. _parentVnode: vnode,
  3722. parent: parent
  3723. }; // check inline-template render functions
  3724. var inlineTemplate = vnode.data.inlineTemplate;
  3725. if (isDef(inlineTemplate)) {
  3726. options.render = inlineTemplate.render;
  3727. options.staticRenderFns = inlineTemplate.staticRenderFns;
  3728. }
  3729. return new vnode.componentOptions.Ctor(options);
  3730. }
  3731. function installComponentHooks(data) {
  3732. var hooks = data.hook || (data.hook = {});
  3733. for (var i = 0; i < hooksToMerge.length; i++) {
  3734. var key = hooksToMerge[i];
  3735. var existing = hooks[key];
  3736. var toMerge = componentVNodeHooks[key];
  3737. if (existing !== toMerge && !(existing && existing._merged)) {
  3738. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  3739. }
  3740. }
  3741. }
  3742. function mergeHook$1(f1, f2) {
  3743. var merged = function merged(a, b) {
  3744. // flow complains about extra args which is why we use any
  3745. f1(a, b);
  3746. f2(a, b);
  3747. };
  3748. merged._merged = true;
  3749. return merged;
  3750. } // transform component v-model info (value and callback) into
  3751. // prop and event handler respectively.
  3752. function transformModel(options, data) {
  3753. var prop = options.model && options.model.prop || 'value';
  3754. var event = options.model && options.model.event || 'input';
  3755. (data.attrs || (data.attrs = {}))[prop] = data.model.value;
  3756. var on = data.on || (data.on = {});
  3757. var existing = on[event];
  3758. var callback = data.model.callback;
  3759. if (isDef(existing)) {
  3760. if (Array.isArray(existing) ? existing.indexOf(callback) === -1 : existing !== callback) {
  3761. on[event] = [callback].concat(existing);
  3762. }
  3763. } else {
  3764. on[event] = callback;
  3765. }
  3766. }
  3767. /* */
  3768. var SIMPLE_NORMALIZE = 1;
  3769. var ALWAYS_NORMALIZE = 2; // wrapper function for providing a more flexible interface
  3770. // without getting yelled at by flow
  3771. function createElement(context, tag, data, children, normalizationType, alwaysNormalize) {
  3772. if (Array.isArray(data) || isPrimitive(data)) {
  3773. normalizationType = children;
  3774. children = data;
  3775. data = undefined;
  3776. }
  3777. if (isTrue(alwaysNormalize)) {
  3778. normalizationType = ALWAYS_NORMALIZE;
  3779. }
  3780. return _createElement(context, tag, data, children, normalizationType);
  3781. }
  3782. function _createElement(context, tag, data, children, normalizationType) {
  3783. if (isDef(data) && isDef(data.__ob__)) {
  3784. true && warn("Avoid using observed data object as vnode data: " + JSON.stringify(data) + "\n" + 'Always create fresh vnode data objects in each render!', context);
  3785. return createEmptyVNode();
  3786. } // object syntax in v-bind
  3787. if (isDef(data) && isDef(data.is)) {
  3788. tag = data.is;
  3789. }
  3790. if (!tag) {
  3791. // in case of component :is set to falsy value
  3792. return createEmptyVNode();
  3793. } // warn against non-primitive key
  3794. if ( true && isDef(data) && isDef(data.key) && !isPrimitive(data.key)) {
  3795. {
  3796. warn('Avoid using non-primitive value as key, ' + 'use string/number value instead.', context);
  3797. }
  3798. } // support single function children as default scoped slot
  3799. if (Array.isArray(children) && typeof children[0] === 'function') {
  3800. data = data || {};
  3801. data.scopedSlots = {
  3802. default: children[0]
  3803. };
  3804. children.length = 0;
  3805. }
  3806. if (normalizationType === ALWAYS_NORMALIZE) {
  3807. children = normalizeChildren(children);
  3808. } else if (normalizationType === SIMPLE_NORMALIZE) {
  3809. children = simpleNormalizeChildren(children);
  3810. }
  3811. var vnode, ns;
  3812. if (typeof tag === 'string') {
  3813. var Ctor;
  3814. ns = context.$vnode && context.$vnode.ns || config.getTagNamespace(tag);
  3815. if (config.isReservedTag(tag)) {
  3816. // platform built-in elements
  3817. if ( true && isDef(data) && isDef(data.nativeOn)) {
  3818. warn("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">.", context);
  3819. }
  3820. vnode = new VNode(config.parsePlatformTagName(tag), data, children, undefined, undefined, context);
  3821. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  3822. // component
  3823. vnode = createComponent(Ctor, data, context, children, tag);
  3824. } else {
  3825. // unknown or unlisted namespaced elements
  3826. // check at runtime because it may get assigned a namespace when its
  3827. // parent normalizes children
  3828. vnode = new VNode(tag, data, children, undefined, undefined, context);
  3829. }
  3830. } else {
  3831. // direct component options / constructor
  3832. vnode = createComponent(tag, data, context, children);
  3833. }
  3834. if (Array.isArray(vnode)) {
  3835. return vnode;
  3836. } else if (isDef(vnode)) {
  3837. if (isDef(ns)) {
  3838. applyNS(vnode, ns);
  3839. }
  3840. if (isDef(data)) {
  3841. registerDeepBindings(data);
  3842. }
  3843. return vnode;
  3844. } else {
  3845. return createEmptyVNode();
  3846. }
  3847. }
  3848. function applyNS(vnode, ns, force) {
  3849. vnode.ns = ns;
  3850. if (vnode.tag === 'foreignObject') {
  3851. // use default namespace inside foreignObject
  3852. ns = undefined;
  3853. force = true;
  3854. }
  3855. if (isDef(vnode.children)) {
  3856. for (var i = 0, l = vnode.children.length; i < l; i++) {
  3857. var child = vnode.children[i];
  3858. if (isDef(child.tag) && (isUndef(child.ns) || isTrue(force) && child.tag !== 'svg')) {
  3859. applyNS(child, ns, force);
  3860. }
  3861. }
  3862. }
  3863. } // ref #5318
  3864. // necessary to ensure parent re-render when deep bindings like :style and
  3865. // :class are used on slot nodes
  3866. function registerDeepBindings(data) {
  3867. if (isObject(data.style)) {
  3868. traverse(data.style);
  3869. }
  3870. if (isObject(data.class)) {
  3871. traverse(data.class);
  3872. }
  3873. }
  3874. /* */
  3875. function initRender(vm) {
  3876. vm._vnode = null; // the root of the child tree
  3877. vm._staticTrees = null; // v-once cached trees
  3878. var options = vm.$options;
  3879. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  3880. var renderContext = parentVnode && parentVnode.context;
  3881. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  3882. vm.$scopedSlots = emptyObject; // bind the createElement fn to this instance
  3883. // so that we get proper render context inside it.
  3884. // args order: tag, data, children, normalizationType, alwaysNormalize
  3885. // internal version is used by render functions compiled from templates
  3886. vm._c = function (a, b, c, d) {
  3887. return createElement(vm, a, b, c, d, false);
  3888. }; // normalization is always applied for the public version, used in
  3889. // user-written render functions.
  3890. vm.$createElement = function (a, b, c, d) {
  3891. return createElement(vm, a, b, c, d, true);
  3892. }; // $attrs & $listeners are exposed for easier HOC creation.
  3893. // they need to be reactive so that HOCs using them are always updated
  3894. var parentData = parentVnode && parentVnode.data;
  3895. /* istanbul ignore else */
  3896. if (true) {
  3897. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  3898. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  3899. }, true);
  3900. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  3901. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  3902. }, true);
  3903. } else {}
  3904. }
  3905. var currentRenderingInstance = null;
  3906. function renderMixin(Vue) {
  3907. // install runtime convenience helpers
  3908. installRenderHelpers(Vue.prototype);
  3909. Vue.prototype.$nextTick = function (fn) {
  3910. return nextTick(fn, this);
  3911. };
  3912. Vue.prototype._render = function () {
  3913. var vm = this;
  3914. var ref = vm.$options;
  3915. var render = ref.render;
  3916. var _parentVnode = ref._parentVnode;
  3917. if (_parentVnode) {
  3918. vm.$scopedSlots = normalizeScopedSlots(_parentVnode.data.scopedSlots, vm.$slots, vm.$scopedSlots);
  3919. } // set parent vnode. this allows render functions to have access
  3920. // to the data on the placeholder node.
  3921. vm.$vnode = _parentVnode; // render self
  3922. var vnode;
  3923. try {
  3924. // There's no need to maintain a stack because all render fns are called
  3925. // separately from one another. Nested component's render fns are called
  3926. // when parent component is patched.
  3927. currentRenderingInstance = vm;
  3928. vnode = render.call(vm._renderProxy, vm.$createElement);
  3929. } catch (e) {
  3930. handleError(e, vm, "render"); // return error render result,
  3931. // or previous vnode to prevent render error causing blank component
  3932. /* istanbul ignore else */
  3933. if ( true && vm.$options.renderError) {
  3934. try {
  3935. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  3936. } catch (e) {
  3937. handleError(e, vm, "renderError");
  3938. vnode = vm._vnode;
  3939. }
  3940. } else {
  3941. vnode = vm._vnode;
  3942. }
  3943. } finally {
  3944. currentRenderingInstance = null;
  3945. } // if the returned array contains only a single node, allow it
  3946. if (Array.isArray(vnode) && vnode.length === 1) {
  3947. vnode = vnode[0];
  3948. } // return empty vnode in case the render function errored out
  3949. if (!(vnode instanceof VNode)) {
  3950. if ( true && Array.isArray(vnode)) {
  3951. warn('Multiple root nodes returned from render function. Render function ' + 'should return a single root node.', vm);
  3952. }
  3953. vnode = createEmptyVNode();
  3954. } // set parent
  3955. vnode.parent = _parentVnode;
  3956. return vnode;
  3957. };
  3958. }
  3959. /* */
  3960. function ensureCtor(comp, base) {
  3961. if (comp.__esModule || hasSymbol && comp[Symbol.toStringTag] === 'Module') {
  3962. comp = comp.default;
  3963. }
  3964. return isObject(comp) ? base.extend(comp) : comp;
  3965. }
  3966. function createAsyncPlaceholder(factory, data, context, children, tag) {
  3967. var node = createEmptyVNode();
  3968. node.asyncFactory = factory;
  3969. node.asyncMeta = {
  3970. data: data,
  3971. context: context,
  3972. children: children,
  3973. tag: tag
  3974. };
  3975. return node;
  3976. }
  3977. function resolveAsyncComponent(factory, baseCtor) {
  3978. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  3979. return factory.errorComp;
  3980. }
  3981. if (isDef(factory.resolved)) {
  3982. return factory.resolved;
  3983. }
  3984. var owner = currentRenderingInstance;
  3985. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  3986. // already pending
  3987. factory.owners.push(owner);
  3988. }
  3989. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  3990. return factory.loadingComp;
  3991. }
  3992. if (owner && !isDef(factory.owners)) {
  3993. var owners = factory.owners = [owner];
  3994. var sync = true;
  3995. var timerLoading = null;
  3996. var timerTimeout = null;
  3997. owner.$on('hook:destroyed', function () {
  3998. return remove(owners, owner);
  3999. });
  4000. var forceRender = function forceRender(renderCompleted) {
  4001. for (var i = 0, l = owners.length; i < l; i++) {
  4002. owners[i].$forceUpdate();
  4003. }
  4004. if (renderCompleted) {
  4005. owners.length = 0;
  4006. if (timerLoading !== null) {
  4007. clearTimeout(timerLoading);
  4008. timerLoading = null;
  4009. }
  4010. if (timerTimeout !== null) {
  4011. clearTimeout(timerTimeout);
  4012. timerTimeout = null;
  4013. }
  4014. }
  4015. };
  4016. var resolve = once(function (res) {
  4017. // cache resolved
  4018. factory.resolved = ensureCtor(res, baseCtor); // invoke callbacks only if this is not a synchronous resolve
  4019. // (async resolves are shimmed as synchronous during SSR)
  4020. if (!sync) {
  4021. forceRender(true);
  4022. } else {
  4023. owners.length = 0;
  4024. }
  4025. });
  4026. var reject = once(function (reason) {
  4027. true && warn("Failed to resolve async component: " + String(factory) + (reason ? "\nReason: " + reason : ''));
  4028. if (isDef(factory.errorComp)) {
  4029. factory.error = true;
  4030. forceRender(true);
  4031. }
  4032. });
  4033. var res = factory(resolve, reject);
  4034. if (isObject(res)) {
  4035. if (isPromise(res)) {
  4036. // () => Promise
  4037. if (isUndef(factory.resolved)) {
  4038. res.then(resolve, reject);
  4039. }
  4040. } else if (isPromise(res.component)) {
  4041. res.component.then(resolve, reject);
  4042. if (isDef(res.error)) {
  4043. factory.errorComp = ensureCtor(res.error, baseCtor);
  4044. }
  4045. if (isDef(res.loading)) {
  4046. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  4047. if (res.delay === 0) {
  4048. factory.loading = true;
  4049. } else {
  4050. timerLoading = setTimeout(function () {
  4051. timerLoading = null;
  4052. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  4053. factory.loading = true;
  4054. forceRender(false);
  4055. }
  4056. }, res.delay || 200);
  4057. }
  4058. }
  4059. if (isDef(res.timeout)) {
  4060. timerTimeout = setTimeout(function () {
  4061. timerTimeout = null;
  4062. if (isUndef(factory.resolved)) {
  4063. reject( true ? "timeout (" + res.timeout + "ms)" : undefined);
  4064. }
  4065. }, res.timeout);
  4066. }
  4067. }
  4068. }
  4069. sync = false; // return in case resolved synchronously
  4070. return factory.loading ? factory.loadingComp : factory.resolved;
  4071. }
  4072. }
  4073. /* */
  4074. function isAsyncPlaceholder(node) {
  4075. return node.isComment && node.asyncFactory;
  4076. }
  4077. /* */
  4078. function getFirstComponentChild(children) {
  4079. if (Array.isArray(children)) {
  4080. for (var i = 0; i < children.length; i++) {
  4081. var c = children[i];
  4082. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  4083. return c;
  4084. }
  4085. }
  4086. }
  4087. }
  4088. /* */
  4089. /* */
  4090. function initEvents(vm) {
  4091. vm._events = Object.create(null);
  4092. vm._hasHookEvent = false; // init parent attached events
  4093. var listeners = vm.$options._parentListeners;
  4094. if (listeners) {
  4095. updateComponentListeners(vm, listeners);
  4096. }
  4097. }
  4098. var target;
  4099. function add(event, fn) {
  4100. target.$on(event, fn);
  4101. }
  4102. function remove$1(event, fn) {
  4103. target.$off(event, fn);
  4104. }
  4105. function createOnceHandler(event, fn) {
  4106. var _target = target;
  4107. return function onceHandler() {
  4108. var res = fn.apply(null, arguments);
  4109. if (res !== null) {
  4110. _target.$off(event, onceHandler);
  4111. }
  4112. };
  4113. }
  4114. function updateComponentListeners(vm, listeners, oldListeners) {
  4115. target = vm;
  4116. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  4117. target = undefined;
  4118. }
  4119. function eventsMixin(Vue) {
  4120. var hookRE = /^hook:/;
  4121. Vue.prototype.$on = function (event, fn) {
  4122. var vm = this;
  4123. if (Array.isArray(event)) {
  4124. for (var i = 0, l = event.length; i < l; i++) {
  4125. vm.$on(event[i], fn);
  4126. }
  4127. } else {
  4128. (vm._events[event] || (vm._events[event] = [])).push(fn); // optimize hook:event cost by using a boolean flag marked at registration
  4129. // instead of a hash lookup
  4130. if (hookRE.test(event)) {
  4131. vm._hasHookEvent = true;
  4132. }
  4133. }
  4134. return vm;
  4135. };
  4136. Vue.prototype.$once = function (event, fn) {
  4137. var vm = this;
  4138. function on() {
  4139. vm.$off(event, on);
  4140. fn.apply(vm, arguments);
  4141. }
  4142. on.fn = fn;
  4143. vm.$on(event, on);
  4144. return vm;
  4145. };
  4146. Vue.prototype.$off = function (event, fn) {
  4147. var vm = this; // all
  4148. if (!arguments.length) {
  4149. vm._events = Object.create(null);
  4150. return vm;
  4151. } // array of events
  4152. if (Array.isArray(event)) {
  4153. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  4154. vm.$off(event[i$1], fn);
  4155. }
  4156. return vm;
  4157. } // specific event
  4158. var cbs = vm._events[event];
  4159. if (!cbs) {
  4160. return vm;
  4161. }
  4162. if (!fn) {
  4163. vm._events[event] = null;
  4164. return vm;
  4165. } // specific handler
  4166. var cb;
  4167. var i = cbs.length;
  4168. while (i--) {
  4169. cb = cbs[i];
  4170. if (cb === fn || cb.fn === fn) {
  4171. cbs.splice(i, 1);
  4172. break;
  4173. }
  4174. }
  4175. return vm;
  4176. };
  4177. Vue.prototype.$emit = function (event) {
  4178. var vm = this;
  4179. if (true) {
  4180. var lowerCaseEvent = event.toLowerCase();
  4181. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  4182. tip("Event \"" + lowerCaseEvent + "\" is emitted in component " + formatComponentName(vm) + " but the handler is registered for \"" + event + "\". " + "Note that HTML attributes are case-insensitive and you cannot use " + "v-on to listen to camelCase events when using in-DOM templates. " + "You should probably use \"" + hyphenate(event) + "\" instead of \"" + event + "\".");
  4183. }
  4184. }
  4185. var cbs = vm._events[event];
  4186. if (cbs) {
  4187. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  4188. var args = toArray(arguments, 1);
  4189. var info = "event handler for \"" + event + "\"";
  4190. for (var i = 0, l = cbs.length; i < l; i++) {
  4191. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  4192. }
  4193. }
  4194. return vm;
  4195. };
  4196. }
  4197. /* */
  4198. var activeInstance = null;
  4199. var isUpdatingChildComponent = false;
  4200. function setActiveInstance(vm) {
  4201. var prevActiveInstance = activeInstance;
  4202. activeInstance = vm;
  4203. return function () {
  4204. activeInstance = prevActiveInstance;
  4205. };
  4206. }
  4207. function initLifecycle(vm) {
  4208. var options = vm.$options; // locate first non-abstract parent
  4209. var parent = options.parent;
  4210. if (parent && !options.abstract) {
  4211. while (parent.$options.abstract && parent.$parent) {
  4212. parent = parent.$parent;
  4213. }
  4214. parent.$children.push(vm);
  4215. }
  4216. vm.$parent = parent;
  4217. vm.$root = parent ? parent.$root : vm;
  4218. vm.$children = [];
  4219. vm.$refs = {};
  4220. vm._watcher = null;
  4221. vm._inactive = null;
  4222. vm._directInactive = false;
  4223. vm._isMounted = false;
  4224. vm._isDestroyed = false;
  4225. vm._isBeingDestroyed = false;
  4226. }
  4227. function lifecycleMixin(Vue) {
  4228. Vue.prototype._update = function (vnode, hydrating) {
  4229. var vm = this;
  4230. var prevEl = vm.$el;
  4231. var prevVnode = vm._vnode;
  4232. var restoreActiveInstance = setActiveInstance(vm);
  4233. vm._vnode = vnode; // Vue.prototype.__patch__ is injected in entry points
  4234. // based on the rendering backend used.
  4235. if (!prevVnode) {
  4236. // initial render
  4237. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false
  4238. /* removeOnly */
  4239. );
  4240. } else {
  4241. // updates
  4242. vm.$el = vm.__patch__(prevVnode, vnode);
  4243. }
  4244. restoreActiveInstance(); // update __vue__ reference
  4245. if (prevEl) {
  4246. prevEl.__vue__ = null;
  4247. }
  4248. if (vm.$el) {
  4249. vm.$el.__vue__ = vm;
  4250. } // if parent is an HOC, update its $el as well
  4251. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  4252. vm.$parent.$el = vm.$el;
  4253. } // updated hook is called by the scheduler to ensure that children are
  4254. // updated in a parent's updated hook.
  4255. };
  4256. Vue.prototype.$forceUpdate = function () {
  4257. var vm = this;
  4258. if (vm._watcher) {
  4259. vm._watcher.update();
  4260. }
  4261. };
  4262. Vue.prototype.$destroy = function () {
  4263. var vm = this;
  4264. if (vm._isBeingDestroyed) {
  4265. return;
  4266. }
  4267. callHook(vm, 'beforeDestroy');
  4268. vm._isBeingDestroyed = true; // remove self from parent
  4269. var parent = vm.$parent;
  4270. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  4271. remove(parent.$children, vm);
  4272. } // teardown watchers
  4273. if (vm._watcher) {
  4274. vm._watcher.teardown();
  4275. }
  4276. var i = vm._watchers.length;
  4277. while (i--) {
  4278. vm._watchers[i].teardown();
  4279. } // remove reference from data ob
  4280. // frozen object may not have observer.
  4281. if (vm._data.__ob__) {
  4282. vm._data.__ob__.vmCount--;
  4283. } // call the last hook...
  4284. vm._isDestroyed = true; // invoke destroy hooks on current rendered tree
  4285. vm.__patch__(vm._vnode, null); // fire destroyed hook
  4286. callHook(vm, 'destroyed'); // turn off all instance listeners.
  4287. vm.$off(); // remove __vue__ reference
  4288. if (vm.$el) {
  4289. vm.$el.__vue__ = null;
  4290. } // release circular reference (#6759)
  4291. if (vm.$vnode) {
  4292. vm.$vnode.parent = null;
  4293. }
  4294. };
  4295. }
  4296. function mountComponent(vm, el, hydrating) {
  4297. vm.$el = el;
  4298. if (!vm.$options.render) {
  4299. vm.$options.render = createEmptyVNode;
  4300. if (true) {
  4301. /* istanbul ignore if */
  4302. if (vm.$options.template && vm.$options.template.charAt(0) !== '#' || vm.$options.el || el) {
  4303. warn('You are using the runtime-only build of Vue where the template ' + 'compiler is not available. Either pre-compile the templates into ' + 'render functions, or use the compiler-included build.', vm);
  4304. } else {
  4305. warn('Failed to mount component: template or render function not defined.', vm);
  4306. }
  4307. }
  4308. }
  4309. callHook(vm, 'beforeMount');
  4310. var updateComponent;
  4311. /* istanbul ignore if */
  4312. if ( true && config.performance && mark) {
  4313. updateComponent = function updateComponent() {
  4314. var name = vm._name;
  4315. var id = vm._uid;
  4316. var startTag = "vue-perf-start:" + id;
  4317. var endTag = "vue-perf-end:" + id;
  4318. mark(startTag);
  4319. var vnode = vm._render();
  4320. mark(endTag);
  4321. measure("vue " + name + " render", startTag, endTag);
  4322. mark(startTag);
  4323. vm._update(vnode, hydrating);
  4324. mark(endTag);
  4325. measure("vue " + name + " patch", startTag, endTag);
  4326. };
  4327. } else {
  4328. updateComponent = function updateComponent() {
  4329. vm._update(vm._render(), hydrating);
  4330. };
  4331. } // we set this to vm._watcher inside the watcher's constructor
  4332. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  4333. // component's mounted hook), which relies on vm._watcher being already defined
  4334. new Watcher(vm, updateComponent, noop, {
  4335. before: function before() {
  4336. if (vm._isMounted && !vm._isDestroyed) {
  4337. callHook(vm, 'beforeUpdate');
  4338. }
  4339. }
  4340. }, true
  4341. /* isRenderWatcher */
  4342. );
  4343. hydrating = false; // manually mounted instance, call mounted on self
  4344. // mounted is called for render-created child components in its inserted hook
  4345. if (vm.$vnode == null) {
  4346. // fixed by xxxxxx
  4347. callHook(vm, 'onServiceCreated');
  4348. callHook(vm, 'onServiceAttached');
  4349. vm._isMounted = true;
  4350. callHook(vm, 'mounted');
  4351. }
  4352. return vm;
  4353. }
  4354. function updateChildComponent(vm, propsData, listeners, parentVnode, renderChildren) {
  4355. if (true) {
  4356. isUpdatingChildComponent = true;
  4357. } // determine whether component has slot children
  4358. // we need to do this before overwriting $options._renderChildren.
  4359. // check if there are dynamic scopedSlots (hand-written or compiled but with
  4360. // dynamic slot names). Static scoped slots compiled from template has the
  4361. // "$stable" marker.
  4362. var newScopedSlots = parentVnode.data.scopedSlots;
  4363. var oldScopedSlots = vm.$scopedSlots;
  4364. var hasDynamicScopedSlot = !!(newScopedSlots && !newScopedSlots.$stable || oldScopedSlots !== emptyObject && !oldScopedSlots.$stable || newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key); // Any static slot children from the parent may have changed during parent's
  4365. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  4366. // update is necessary to ensure correctness.
  4367. var needsForceUpdate = !!(renderChildren || // has new static slots
  4368. vm.$options._renderChildren || // has old static slots
  4369. hasDynamicScopedSlot);
  4370. vm.$options._parentVnode = parentVnode;
  4371. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  4372. if (vm._vnode) {
  4373. // update child tree's parent
  4374. vm._vnode.parent = parentVnode;
  4375. }
  4376. vm.$options._renderChildren = renderChildren; // update $attrs and $listeners hash
  4377. // these are also reactive so they may trigger child update if the child
  4378. // used them during render
  4379. vm.$attrs = parentVnode.data.attrs || emptyObject;
  4380. vm.$listeners = listeners || emptyObject; // update props
  4381. if (propsData && vm.$options.props) {
  4382. toggleObserving(false);
  4383. var props = vm._props;
  4384. var propKeys = vm.$options._propKeys || [];
  4385. for (var i = 0; i < propKeys.length; i++) {
  4386. var key = propKeys[i];
  4387. var propOptions = vm.$options.props; // wtf flow?
  4388. props[key] = validateProp(key, propOptions, propsData, vm);
  4389. }
  4390. toggleObserving(true); // keep a copy of raw propsData
  4391. vm.$options.propsData = propsData;
  4392. } // fixed by xxxxxx update properties(mp runtime)
  4393. vm._$updateProperties && vm._$updateProperties(vm); // update listeners
  4394. listeners = listeners || emptyObject;
  4395. var oldListeners = vm.$options._parentListeners;
  4396. vm.$options._parentListeners = listeners;
  4397. updateComponentListeners(vm, listeners, oldListeners); // resolve slots + force update if has children
  4398. if (needsForceUpdate) {
  4399. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  4400. vm.$forceUpdate();
  4401. }
  4402. if (true) {
  4403. isUpdatingChildComponent = false;
  4404. }
  4405. }
  4406. function isInInactiveTree(vm) {
  4407. while (vm && (vm = vm.$parent)) {
  4408. if (vm._inactive) {
  4409. return true;
  4410. }
  4411. }
  4412. return false;
  4413. }
  4414. function activateChildComponent(vm, direct) {
  4415. if (direct) {
  4416. vm._directInactive = false;
  4417. if (isInInactiveTree(vm)) {
  4418. return;
  4419. }
  4420. } else if (vm._directInactive) {
  4421. return;
  4422. }
  4423. if (vm._inactive || vm._inactive === null) {
  4424. vm._inactive = false;
  4425. for (var i = 0; i < vm.$children.length; i++) {
  4426. activateChildComponent(vm.$children[i]);
  4427. }
  4428. callHook(vm, 'activated');
  4429. }
  4430. }
  4431. function deactivateChildComponent(vm, direct) {
  4432. if (direct) {
  4433. vm._directInactive = true;
  4434. if (isInInactiveTree(vm)) {
  4435. return;
  4436. }
  4437. }
  4438. if (!vm._inactive) {
  4439. vm._inactive = true;
  4440. for (var i = 0; i < vm.$children.length; i++) {
  4441. deactivateChildComponent(vm.$children[i]);
  4442. }
  4443. callHook(vm, 'deactivated');
  4444. }
  4445. }
  4446. function callHook(vm, hook) {
  4447. // #7573 disable dep collection when invoking lifecycle hooks
  4448. pushTarget();
  4449. var handlers = vm.$options[hook];
  4450. var info = hook + " hook";
  4451. if (handlers) {
  4452. for (var i = 0, j = handlers.length; i < j; i++) {
  4453. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  4454. }
  4455. }
  4456. if (vm._hasHookEvent) {
  4457. vm.$emit('hook:' + hook);
  4458. }
  4459. popTarget();
  4460. }
  4461. /* */
  4462. var MAX_UPDATE_COUNT = 100;
  4463. var queue = [];
  4464. var activatedChildren = [];
  4465. var has = {};
  4466. var circular = {};
  4467. var waiting = false;
  4468. var flushing = false;
  4469. var index = 0;
  4470. /**
  4471. * Reset the scheduler's state.
  4472. */
  4473. function resetSchedulerState() {
  4474. index = queue.length = activatedChildren.length = 0;
  4475. has = {};
  4476. if (true) {
  4477. circular = {};
  4478. }
  4479. waiting = flushing = false;
  4480. } // Async edge case #6566 requires saving the timestamp when event listeners are
  4481. // attached. However, calling performance.now() has a perf overhead especially
  4482. // if the page has thousands of event listeners. Instead, we take a timestamp
  4483. // every time the scheduler flushes and use that for all event listeners
  4484. // attached during that flush.
  4485. var currentFlushTimestamp = 0; // Async edge case fix requires storing an event listener's attach timestamp.
  4486. var getNow = Date.now; // Determine what event timestamp the browser is using. Annoyingly, the
  4487. // timestamp can either be hi-res (relative to page load) or low-res
  4488. // (relative to UNIX epoch), so in order to compare time we have to use the
  4489. // same timestamp type when saving the flush timestamp.
  4490. // All IE versions use low-res event timestamps, and have problematic clock
  4491. // implementations (#9632)
  4492. if (inBrowser && !isIE) {
  4493. var performance = window.performance;
  4494. if (performance && typeof performance.now === 'function' && getNow() > document.createEvent('Event').timeStamp) {
  4495. // if the event timestamp, although evaluated AFTER the Date.now(), is
  4496. // smaller than it, it means the event is using a hi-res timestamp,
  4497. // and we need to use the hi-res version for event listener timestamps as
  4498. // well.
  4499. getNow = function getNow() {
  4500. return performance.now();
  4501. };
  4502. }
  4503. }
  4504. /**
  4505. * Flush both queues and run the watchers.
  4506. */
  4507. function flushSchedulerQueue() {
  4508. currentFlushTimestamp = getNow();
  4509. flushing = true;
  4510. var watcher, id; // Sort queue before flush.
  4511. // This ensures that:
  4512. // 1. Components are updated from parent to child. (because parent is always
  4513. // created before the child)
  4514. // 2. A component's user watchers are run before its render watcher (because
  4515. // user watchers are created before the render watcher)
  4516. // 3. If a component is destroyed during a parent component's watcher run,
  4517. // its watchers can be skipped.
  4518. queue.sort(function (a, b) {
  4519. return a.id - b.id;
  4520. }); // do not cache length because more watchers might be pushed
  4521. // as we run existing watchers
  4522. for (index = 0; index < queue.length; index++) {
  4523. watcher = queue[index];
  4524. if (watcher.before) {
  4525. watcher.before();
  4526. }
  4527. id = watcher.id;
  4528. has[id] = null;
  4529. watcher.run(); // in dev build, check and stop circular updates.
  4530. if ( true && has[id] != null) {
  4531. circular[id] = (circular[id] || 0) + 1;
  4532. if (circular[id] > MAX_UPDATE_COUNT) {
  4533. warn('You may have an infinite update loop ' + (watcher.user ? "in watcher with expression \"" + watcher.expression + "\"" : "in a component render function."), watcher.vm);
  4534. break;
  4535. }
  4536. }
  4537. } // keep copies of post queues before resetting state
  4538. var activatedQueue = activatedChildren.slice();
  4539. var updatedQueue = queue.slice();
  4540. resetSchedulerState(); // call component updated and activated hooks
  4541. callActivatedHooks(activatedQueue);
  4542. callUpdatedHooks(updatedQueue); // devtool hook
  4543. /* istanbul ignore if */
  4544. if (devtools && config.devtools) {
  4545. devtools.emit('flush');
  4546. }
  4547. }
  4548. function callUpdatedHooks(queue) {
  4549. var i = queue.length;
  4550. while (i--) {
  4551. var watcher = queue[i];
  4552. var vm = watcher.vm;
  4553. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  4554. callHook(vm, 'updated');
  4555. }
  4556. }
  4557. }
  4558. /**
  4559. * Queue a kept-alive component that was activated during patch.
  4560. * The queue will be processed after the entire tree has been patched.
  4561. */
  4562. function queueActivatedComponent(vm) {
  4563. // setting _inactive to false here so that a render function can
  4564. // rely on checking whether it's in an inactive tree (e.g. router-view)
  4565. vm._inactive = false;
  4566. activatedChildren.push(vm);
  4567. }
  4568. function callActivatedHooks(queue) {
  4569. for (var i = 0; i < queue.length; i++) {
  4570. queue[i]._inactive = true;
  4571. activateChildComponent(queue[i], true
  4572. /* true */
  4573. );
  4574. }
  4575. }
  4576. /**
  4577. * Push a watcher into the watcher queue.
  4578. * Jobs with duplicate IDs will be skipped unless it's
  4579. * pushed when the queue is being flushed.
  4580. */
  4581. function queueWatcher(watcher) {
  4582. var id = watcher.id;
  4583. if (has[id] == null) {
  4584. has[id] = true;
  4585. if (!flushing) {
  4586. queue.push(watcher);
  4587. } else {
  4588. // if already flushing, splice the watcher based on its id
  4589. // if already past its id, it will be run next immediately.
  4590. var i = queue.length - 1;
  4591. while (i > index && queue[i].id > watcher.id) {
  4592. i--;
  4593. }
  4594. queue.splice(i + 1, 0, watcher);
  4595. } // queue the flush
  4596. if (!waiting) {
  4597. waiting = true;
  4598. if ( true && !config.async) {
  4599. flushSchedulerQueue();
  4600. return;
  4601. }
  4602. nextTick(flushSchedulerQueue);
  4603. }
  4604. }
  4605. }
  4606. /* */
  4607. var uid$2 = 0;
  4608. /**
  4609. * A watcher parses an expression, collects dependencies,
  4610. * and fires callback when the expression value changes.
  4611. * This is used for both the $watch() api and directives.
  4612. */
  4613. var Watcher = function Watcher(vm, expOrFn, cb, options, isRenderWatcher) {
  4614. this.vm = vm;
  4615. if (isRenderWatcher) {
  4616. vm._watcher = this;
  4617. }
  4618. vm._watchers.push(this); // options
  4619. if (options) {
  4620. this.deep = !!options.deep;
  4621. this.user = !!options.user;
  4622. this.lazy = !!options.lazy;
  4623. this.sync = !!options.sync;
  4624. this.before = options.before;
  4625. } else {
  4626. this.deep = this.user = this.lazy = this.sync = false;
  4627. }
  4628. this.cb = cb;
  4629. this.id = ++uid$2; // uid for batching
  4630. this.active = true;
  4631. this.dirty = this.lazy; // for lazy watchers
  4632. this.deps = [];
  4633. this.newDeps = [];
  4634. this.depIds = new _Set();
  4635. this.newDepIds = new _Set();
  4636. this.expression = true ? expOrFn.toString() : undefined; // parse expression for getter
  4637. if (typeof expOrFn === 'function') {
  4638. this.getter = expOrFn;
  4639. } else {
  4640. this.getter = parsePath(expOrFn);
  4641. if (!this.getter) {
  4642. this.getter = noop;
  4643. true && warn("Failed watching path: \"" + expOrFn + "\" " + 'Watcher only accepts simple dot-delimited paths. ' + 'For full control, use a function instead.', vm);
  4644. }
  4645. }
  4646. this.value = this.lazy ? undefined : this.get();
  4647. };
  4648. /**
  4649. * Evaluate the getter, and re-collect dependencies.
  4650. */
  4651. Watcher.prototype.get = function get() {
  4652. pushTarget(this);
  4653. var value;
  4654. var vm = this.vm;
  4655. try {
  4656. value = this.getter.call(vm, vm);
  4657. } catch (e) {
  4658. if (this.user) {
  4659. handleError(e, vm, "getter for watcher \"" + this.expression + "\"");
  4660. } else {
  4661. throw e;
  4662. }
  4663. } finally {
  4664. // "touch" every property so they are all tracked as
  4665. // dependencies for deep watching
  4666. if (this.deep) {
  4667. traverse(value);
  4668. }
  4669. popTarget();
  4670. this.cleanupDeps();
  4671. }
  4672. return value;
  4673. };
  4674. /**
  4675. * Add a dependency to this directive.
  4676. */
  4677. Watcher.prototype.addDep = function addDep(dep) {
  4678. var id = dep.id;
  4679. if (!this.newDepIds.has(id)) {
  4680. this.newDepIds.add(id);
  4681. this.newDeps.push(dep);
  4682. if (!this.depIds.has(id)) {
  4683. dep.addSub(this);
  4684. }
  4685. }
  4686. };
  4687. /**
  4688. * Clean up for dependency collection.
  4689. */
  4690. Watcher.prototype.cleanupDeps = function cleanupDeps() {
  4691. var i = this.deps.length;
  4692. while (i--) {
  4693. var dep = this.deps[i];
  4694. if (!this.newDepIds.has(dep.id)) {
  4695. dep.removeSub(this);
  4696. }
  4697. }
  4698. var tmp = this.depIds;
  4699. this.depIds = this.newDepIds;
  4700. this.newDepIds = tmp;
  4701. this.newDepIds.clear();
  4702. tmp = this.deps;
  4703. this.deps = this.newDeps;
  4704. this.newDeps = tmp;
  4705. this.newDeps.length = 0;
  4706. };
  4707. /**
  4708. * Subscriber interface.
  4709. * Will be called when a dependency changes.
  4710. */
  4711. Watcher.prototype.update = function update() {
  4712. /* istanbul ignore else */
  4713. if (this.lazy) {
  4714. this.dirty = true;
  4715. } else if (this.sync) {
  4716. this.run();
  4717. } else {
  4718. queueWatcher(this);
  4719. }
  4720. };
  4721. /**
  4722. * Scheduler job interface.
  4723. * Will be called by the scheduler.
  4724. */
  4725. Watcher.prototype.run = function run() {
  4726. if (this.active) {
  4727. var value = this.get();
  4728. if (value !== this.value || // Deep watchers and watchers on Object/Arrays should fire even
  4729. // when the value is the same, because the value may
  4730. // have mutated.
  4731. isObject(value) || this.deep) {
  4732. // set new value
  4733. var oldValue = this.value;
  4734. this.value = value;
  4735. if (this.user) {
  4736. try {
  4737. this.cb.call(this.vm, value, oldValue);
  4738. } catch (e) {
  4739. handleError(e, this.vm, "callback for watcher \"" + this.expression + "\"");
  4740. }
  4741. } else {
  4742. this.cb.call(this.vm, value, oldValue);
  4743. }
  4744. }
  4745. }
  4746. };
  4747. /**
  4748. * Evaluate the value of the watcher.
  4749. * This only gets called for lazy watchers.
  4750. */
  4751. Watcher.prototype.evaluate = function evaluate() {
  4752. this.value = this.get();
  4753. this.dirty = false;
  4754. };
  4755. /**
  4756. * Depend on all deps collected by this watcher.
  4757. */
  4758. Watcher.prototype.depend = function depend() {
  4759. var i = this.deps.length;
  4760. while (i--) {
  4761. this.deps[i].depend();
  4762. }
  4763. };
  4764. /**
  4765. * Remove self from all dependencies' subscriber list.
  4766. */
  4767. Watcher.prototype.teardown = function teardown() {
  4768. if (this.active) {
  4769. // remove self from vm's watcher list
  4770. // this is a somewhat expensive operation so we skip it
  4771. // if the vm is being destroyed.
  4772. if (!this.vm._isBeingDestroyed) {
  4773. remove(this.vm._watchers, this);
  4774. }
  4775. var i = this.deps.length;
  4776. while (i--) {
  4777. this.deps[i].removeSub(this);
  4778. }
  4779. this.active = false;
  4780. }
  4781. };
  4782. /* */
  4783. var sharedPropertyDefinition = {
  4784. enumerable: true,
  4785. configurable: true,
  4786. get: noop,
  4787. set: noop
  4788. };
  4789. function proxy(target, sourceKey, key) {
  4790. sharedPropertyDefinition.get = function proxyGetter() {
  4791. return this[sourceKey][key];
  4792. };
  4793. sharedPropertyDefinition.set = function proxySetter(val) {
  4794. this[sourceKey][key] = val;
  4795. };
  4796. Object.defineProperty(target, key, sharedPropertyDefinition);
  4797. }
  4798. function initState(vm) {
  4799. vm._watchers = [];
  4800. var opts = vm.$options;
  4801. if (opts.props) {
  4802. initProps(vm, opts.props);
  4803. }
  4804. if (opts.methods) {
  4805. initMethods(vm, opts.methods);
  4806. }
  4807. if (opts.data) {
  4808. initData(vm);
  4809. } else {
  4810. observe(vm._data = {}, true
  4811. /* asRootData */
  4812. );
  4813. }
  4814. if (opts.computed) {
  4815. initComputed(vm, opts.computed);
  4816. }
  4817. if (opts.watch && opts.watch !== nativeWatch) {
  4818. initWatch(vm, opts.watch);
  4819. }
  4820. }
  4821. function initProps(vm, propsOptions) {
  4822. var propsData = vm.$options.propsData || {};
  4823. var props = vm._props = {}; // cache prop keys so that future props updates can iterate using Array
  4824. // instead of dynamic object key enumeration.
  4825. var keys = vm.$options._propKeys = [];
  4826. var isRoot = !vm.$parent; // root instance props should be converted
  4827. if (!isRoot) {
  4828. toggleObserving(false);
  4829. }
  4830. var loop = function loop(key) {
  4831. keys.push(key);
  4832. var value = validateProp(key, propsOptions, propsData, vm);
  4833. /* istanbul ignore else */
  4834. if (true) {
  4835. var hyphenatedKey = hyphenate(key);
  4836. if (isReservedAttribute(hyphenatedKey) || config.isReservedAttr(hyphenatedKey)) {
  4837. warn("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop.", vm);
  4838. }
  4839. defineReactive$$1(props, key, value, function () {
  4840. if (!isRoot && !isUpdatingChildComponent) {
  4841. warn("Avoid mutating a prop directly since the value will be " + "overwritten whenever the parent component re-renders. " + "Instead, use a data or computed property based on the prop's " + "value. Prop being mutated: \"" + key + "\"", vm);
  4842. }
  4843. });
  4844. } else {} // static props are already proxied on the component's prototype
  4845. // during Vue.extend(). We only need to proxy props defined at
  4846. // instantiation here.
  4847. if (!(key in vm)) {
  4848. proxy(vm, "_props", key);
  4849. }
  4850. };
  4851. for (var key in propsOptions) {
  4852. loop(key);
  4853. }
  4854. toggleObserving(true);
  4855. }
  4856. function initData(vm) {
  4857. var data = vm.$options.data;
  4858. data = vm._data = typeof data === 'function' ? getData(data, vm) : data || {};
  4859. if (!isPlainObject(data)) {
  4860. data = {};
  4861. true && warn('data functions should return an object:\n' + 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', vm);
  4862. } // proxy data on instance
  4863. var keys = Object.keys(data);
  4864. var props = vm.$options.props;
  4865. var methods = vm.$options.methods;
  4866. var i = keys.length;
  4867. while (i--) {
  4868. var key = keys[i];
  4869. if (true) {
  4870. if (methods && hasOwn(methods, key)) {
  4871. warn("Method \"" + key + "\" has already been defined as a data property.", vm);
  4872. }
  4873. }
  4874. if (props && hasOwn(props, key)) {
  4875. true && warn("The data property \"" + key + "\" is already declared as a prop. " + "Use prop default value instead.", vm);
  4876. } else if (!isReserved(key)) {
  4877. proxy(vm, "_data", key);
  4878. }
  4879. } // observe data
  4880. observe(data, true
  4881. /* asRootData */
  4882. );
  4883. }
  4884. function getData(data, vm) {
  4885. // #7573 disable dep collection when invoking data getters
  4886. pushTarget();
  4887. try {
  4888. return data.call(vm, vm);
  4889. } catch (e) {
  4890. handleError(e, vm, "data()");
  4891. return {};
  4892. } finally {
  4893. popTarget();
  4894. }
  4895. }
  4896. var computedWatcherOptions = {
  4897. lazy: true
  4898. };
  4899. function initComputed(vm, computed) {
  4900. // $flow-disable-line
  4901. var watchers = vm._computedWatchers = Object.create(null); // computed properties are just getters during SSR
  4902. var isSSR = isServerRendering();
  4903. for (var key in computed) {
  4904. var userDef = computed[key];
  4905. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  4906. if ( true && getter == null) {
  4907. warn("Getter is missing for computed property \"" + key + "\".", vm);
  4908. }
  4909. if (!isSSR) {
  4910. // create internal watcher for the computed property.
  4911. watchers[key] = new Watcher(vm, getter || noop, noop, computedWatcherOptions);
  4912. } // component-defined computed properties are already defined on the
  4913. // component prototype. We only need to define computed properties defined
  4914. // at instantiation here.
  4915. if (!(key in vm)) {
  4916. defineComputed(vm, key, userDef);
  4917. } else if (true) {
  4918. if (key in vm.$data) {
  4919. warn("The computed property \"" + key + "\" is already defined in data.", vm);
  4920. } else if (vm.$options.props && key in vm.$options.props) {
  4921. warn("The computed property \"" + key + "\" is already defined as a prop.", vm);
  4922. }
  4923. }
  4924. }
  4925. }
  4926. function defineComputed(target, key, userDef) {
  4927. var shouldCache = !isServerRendering();
  4928. if (typeof userDef === 'function') {
  4929. sharedPropertyDefinition.get = shouldCache ? createComputedGetter(key) : createGetterInvoker(userDef);
  4930. sharedPropertyDefinition.set = noop;
  4931. } else {
  4932. sharedPropertyDefinition.get = userDef.get ? shouldCache && userDef.cache !== false ? createComputedGetter(key) : createGetterInvoker(userDef.get) : noop;
  4933. sharedPropertyDefinition.set = userDef.set || noop;
  4934. }
  4935. if ( true && sharedPropertyDefinition.set === noop) {
  4936. sharedPropertyDefinition.set = function () {
  4937. warn("Computed property \"" + key + "\" was assigned to but it has no setter.", this);
  4938. };
  4939. }
  4940. Object.defineProperty(target, key, sharedPropertyDefinition);
  4941. }
  4942. function createComputedGetter(key) {
  4943. return function computedGetter() {
  4944. var watcher = this._computedWatchers && this._computedWatchers[key];
  4945. if (watcher) {
  4946. if (watcher.dirty) {
  4947. watcher.evaluate();
  4948. }
  4949. if (Dep.SharedObject.target) {
  4950. // fixed by xxxxxx
  4951. watcher.depend();
  4952. }
  4953. return watcher.value;
  4954. }
  4955. };
  4956. }
  4957. function createGetterInvoker(fn) {
  4958. return function computedGetter() {
  4959. return fn.call(this, this);
  4960. };
  4961. }
  4962. function initMethods(vm, methods) {
  4963. var props = vm.$options.props;
  4964. for (var key in methods) {
  4965. if (true) {
  4966. if (typeof methods[key] !== 'function') {
  4967. warn("Method \"" + key + "\" has type \"" + _typeof(methods[key]) + "\" in the component definition. " + "Did you reference the function correctly?", vm);
  4968. }
  4969. if (props && hasOwn(props, key)) {
  4970. warn("Method \"" + key + "\" has already been defined as a prop.", vm);
  4971. }
  4972. if (key in vm && isReserved(key)) {
  4973. warn("Method \"" + key + "\" conflicts with an existing Vue instance method. " + "Avoid defining component methods that start with _ or $.");
  4974. }
  4975. }
  4976. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  4977. }
  4978. }
  4979. function initWatch(vm, watch) {
  4980. for (var key in watch) {
  4981. var handler = watch[key];
  4982. if (Array.isArray(handler)) {
  4983. for (var i = 0; i < handler.length; i++) {
  4984. createWatcher(vm, key, handler[i]);
  4985. }
  4986. } else {
  4987. createWatcher(vm, key, handler);
  4988. }
  4989. }
  4990. }
  4991. function createWatcher(vm, expOrFn, handler, options) {
  4992. if (isPlainObject(handler)) {
  4993. options = handler;
  4994. handler = handler.handler;
  4995. }
  4996. if (typeof handler === 'string') {
  4997. handler = vm[handler];
  4998. }
  4999. return vm.$watch(expOrFn, handler, options);
  5000. }
  5001. function stateMixin(Vue) {
  5002. // flow somehow has problems with directly declared definition object
  5003. // when using Object.defineProperty, so we have to procedurally build up
  5004. // the object here.
  5005. var dataDef = {};
  5006. dataDef.get = function () {
  5007. return this._data;
  5008. };
  5009. var propsDef = {};
  5010. propsDef.get = function () {
  5011. return this._props;
  5012. };
  5013. if (true) {
  5014. dataDef.set = function () {
  5015. warn('Avoid replacing instance root $data. ' + 'Use nested data properties instead.', this);
  5016. };
  5017. propsDef.set = function () {
  5018. warn("$props is readonly.", this);
  5019. };
  5020. }
  5021. Object.defineProperty(Vue.prototype, '$data', dataDef);
  5022. Object.defineProperty(Vue.prototype, '$props', propsDef);
  5023. Vue.prototype.$set = set;
  5024. Vue.prototype.$delete = del;
  5025. Vue.prototype.$watch = function (expOrFn, cb, options) {
  5026. var vm = this;
  5027. if (isPlainObject(cb)) {
  5028. return createWatcher(vm, expOrFn, cb, options);
  5029. }
  5030. options = options || {};
  5031. options.user = true;
  5032. var watcher = new Watcher(vm, expOrFn, cb, options);
  5033. if (options.immediate) {
  5034. try {
  5035. cb.call(vm, watcher.value);
  5036. } catch (error) {
  5037. handleError(error, vm, "callback for immediate watcher \"" + watcher.expression + "\"");
  5038. }
  5039. }
  5040. return function unwatchFn() {
  5041. watcher.teardown();
  5042. };
  5043. };
  5044. }
  5045. /* */
  5046. var uid$3 = 0;
  5047. function initMixin(Vue) {
  5048. Vue.prototype._init = function (options) {
  5049. var vm = this; // a uid
  5050. vm._uid = uid$3++;
  5051. var startTag, endTag;
  5052. /* istanbul ignore if */
  5053. if ( true && config.performance && mark) {
  5054. startTag = "vue-perf-start:" + vm._uid;
  5055. endTag = "vue-perf-end:" + vm._uid;
  5056. mark(startTag);
  5057. } // a flag to avoid this being observed
  5058. vm._isVue = true; // merge options
  5059. if (options && options._isComponent) {
  5060. // optimize internal component instantiation
  5061. // since dynamic options merging is pretty slow, and none of the
  5062. // internal component options needs special treatment.
  5063. initInternalComponent(vm, options);
  5064. } else {
  5065. vm.$options = mergeOptions(resolveConstructorOptions(vm.constructor), options || {}, vm);
  5066. }
  5067. /* istanbul ignore else */
  5068. if (true) {
  5069. initProxy(vm);
  5070. } else {} // expose real self
  5071. vm._self = vm;
  5072. initLifecycle(vm);
  5073. initEvents(vm);
  5074. initRender(vm);
  5075. callHook(vm, 'beforeCreate');
  5076. vm.mpHost !== 'mp-toutiao' && initInjections(vm); // resolve injections before data/props
  5077. initState(vm);
  5078. vm.mpHost !== 'mp-toutiao' && initProvide(vm); // resolve provide after data/props
  5079. vm.mpHost !== 'mp-toutiao' && callHook(vm, 'created');
  5080. /* istanbul ignore if */
  5081. if ( true && config.performance && mark) {
  5082. vm._name = formatComponentName(vm, false);
  5083. mark(endTag);
  5084. measure("vue " + vm._name + " init", startTag, endTag);
  5085. }
  5086. if (vm.$options.el) {
  5087. vm.$mount(vm.$options.el);
  5088. }
  5089. };
  5090. }
  5091. function initInternalComponent(vm, options) {
  5092. var opts = vm.$options = Object.create(vm.constructor.options); // doing this because it's faster than dynamic enumeration.
  5093. var parentVnode = options._parentVnode;
  5094. opts.parent = options.parent;
  5095. opts._parentVnode = parentVnode;
  5096. var vnodeComponentOptions = parentVnode.componentOptions;
  5097. opts.propsData = vnodeComponentOptions.propsData;
  5098. opts._parentListeners = vnodeComponentOptions.listeners;
  5099. opts._renderChildren = vnodeComponentOptions.children;
  5100. opts._componentTag = vnodeComponentOptions.tag;
  5101. if (options.render) {
  5102. opts.render = options.render;
  5103. opts.staticRenderFns = options.staticRenderFns;
  5104. }
  5105. }
  5106. function resolveConstructorOptions(Ctor) {
  5107. var options = Ctor.options;
  5108. if (Ctor.super) {
  5109. var superOptions = resolveConstructorOptions(Ctor.super);
  5110. var cachedSuperOptions = Ctor.superOptions;
  5111. if (superOptions !== cachedSuperOptions) {
  5112. // super option changed,
  5113. // need to resolve new options.
  5114. Ctor.superOptions = superOptions; // check if there are any late-modified/attached options (#4976)
  5115. var modifiedOptions = resolveModifiedOptions(Ctor); // update base extend options
  5116. if (modifiedOptions) {
  5117. extend(Ctor.extendOptions, modifiedOptions);
  5118. }
  5119. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  5120. if (options.name) {
  5121. options.components[options.name] = Ctor;
  5122. }
  5123. }
  5124. }
  5125. return options;
  5126. }
  5127. function resolveModifiedOptions(Ctor) {
  5128. var modified;
  5129. var latest = Ctor.options;
  5130. var sealed = Ctor.sealedOptions;
  5131. for (var key in latest) {
  5132. if (latest[key] !== sealed[key]) {
  5133. if (!modified) {
  5134. modified = {};
  5135. }
  5136. modified[key] = latest[key];
  5137. }
  5138. }
  5139. return modified;
  5140. }
  5141. function Vue(options) {
  5142. if ( true && !(this instanceof Vue)) {
  5143. warn('Vue is a constructor and should be called with the `new` keyword');
  5144. }
  5145. this._init(options);
  5146. }
  5147. initMixin(Vue);
  5148. stateMixin(Vue);
  5149. eventsMixin(Vue);
  5150. lifecycleMixin(Vue);
  5151. renderMixin(Vue);
  5152. /* */
  5153. function initUse(Vue) {
  5154. Vue.use = function (plugin) {
  5155. var installedPlugins = this._installedPlugins || (this._installedPlugins = []);
  5156. if (installedPlugins.indexOf(plugin) > -1) {
  5157. return this;
  5158. } // additional parameters
  5159. var args = toArray(arguments, 1);
  5160. args.unshift(this);
  5161. if (typeof plugin.install === 'function') {
  5162. plugin.install.apply(plugin, args);
  5163. } else if (typeof plugin === 'function') {
  5164. plugin.apply(null, args);
  5165. }
  5166. installedPlugins.push(plugin);
  5167. return this;
  5168. };
  5169. }
  5170. /* */
  5171. function initMixin$1(Vue) {
  5172. Vue.mixin = function (mixin) {
  5173. this.options = mergeOptions(this.options, mixin);
  5174. return this;
  5175. };
  5176. }
  5177. /* */
  5178. function initExtend(Vue) {
  5179. /**
  5180. * Each instance constructor, including Vue, has a unique
  5181. * cid. This enables us to create wrapped "child
  5182. * constructors" for prototypal inheritance and cache them.
  5183. */
  5184. Vue.cid = 0;
  5185. var cid = 1;
  5186. /**
  5187. * Class inheritance
  5188. */
  5189. Vue.extend = function (extendOptions) {
  5190. extendOptions = extendOptions || {};
  5191. var Super = this;
  5192. var SuperId = Super.cid;
  5193. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  5194. if (cachedCtors[SuperId]) {
  5195. return cachedCtors[SuperId];
  5196. }
  5197. var name = extendOptions.name || Super.options.name;
  5198. if ( true && name) {
  5199. validateComponentName(name);
  5200. }
  5201. var Sub = function VueComponent(options) {
  5202. this._init(options);
  5203. };
  5204. Sub.prototype = Object.create(Super.prototype);
  5205. Sub.prototype.constructor = Sub;
  5206. Sub.cid = cid++;
  5207. Sub.options = mergeOptions(Super.options, extendOptions);
  5208. Sub['super'] = Super; // For props and computed properties, we define the proxy getters on
  5209. // the Vue instances at extension time, on the extended prototype. This
  5210. // avoids Object.defineProperty calls for each instance created.
  5211. if (Sub.options.props) {
  5212. initProps$1(Sub);
  5213. }
  5214. if (Sub.options.computed) {
  5215. initComputed$1(Sub);
  5216. } // allow further extension/mixin/plugin usage
  5217. Sub.extend = Super.extend;
  5218. Sub.mixin = Super.mixin;
  5219. Sub.use = Super.use; // create asset registers, so extended classes
  5220. // can have their private assets too.
  5221. ASSET_TYPES.forEach(function (type) {
  5222. Sub[type] = Super[type];
  5223. }); // enable recursive self-lookup
  5224. if (name) {
  5225. Sub.options.components[name] = Sub;
  5226. } // keep a reference to the super options at extension time.
  5227. // later at instantiation we can check if Super's options have
  5228. // been updated.
  5229. Sub.superOptions = Super.options;
  5230. Sub.extendOptions = extendOptions;
  5231. Sub.sealedOptions = extend({}, Sub.options); // cache constructor
  5232. cachedCtors[SuperId] = Sub;
  5233. return Sub;
  5234. };
  5235. }
  5236. function initProps$1(Comp) {
  5237. var props = Comp.options.props;
  5238. for (var key in props) {
  5239. proxy(Comp.prototype, "_props", key);
  5240. }
  5241. }
  5242. function initComputed$1(Comp) {
  5243. var computed = Comp.options.computed;
  5244. for (var key in computed) {
  5245. defineComputed(Comp.prototype, key, computed[key]);
  5246. }
  5247. }
  5248. /* */
  5249. function initAssetRegisters(Vue) {
  5250. /**
  5251. * Create asset registration methods.
  5252. */
  5253. ASSET_TYPES.forEach(function (type) {
  5254. Vue[type] = function (id, definition) {
  5255. if (!definition) {
  5256. return this.options[type + 's'][id];
  5257. } else {
  5258. /* istanbul ignore if */
  5259. if ( true && type === 'component') {
  5260. validateComponentName(id);
  5261. }
  5262. if (type === 'component' && isPlainObject(definition)) {
  5263. definition.name = definition.name || id;
  5264. definition = this.options._base.extend(definition);
  5265. }
  5266. if (type === 'directive' && typeof definition === 'function') {
  5267. definition = {
  5268. bind: definition,
  5269. update: definition
  5270. };
  5271. }
  5272. this.options[type + 's'][id] = definition;
  5273. return definition;
  5274. }
  5275. };
  5276. });
  5277. }
  5278. /* */
  5279. function getComponentName(opts) {
  5280. return opts && (opts.Ctor.options.name || opts.tag);
  5281. }
  5282. function matches(pattern, name) {
  5283. if (Array.isArray(pattern)) {
  5284. return pattern.indexOf(name) > -1;
  5285. } else if (typeof pattern === 'string') {
  5286. return pattern.split(',').indexOf(name) > -1;
  5287. } else if (isRegExp(pattern)) {
  5288. return pattern.test(name);
  5289. }
  5290. /* istanbul ignore next */
  5291. return false;
  5292. }
  5293. function pruneCache(keepAliveInstance, filter) {
  5294. var cache = keepAliveInstance.cache;
  5295. var keys = keepAliveInstance.keys;
  5296. var _vnode = keepAliveInstance._vnode;
  5297. for (var key in cache) {
  5298. var cachedNode = cache[key];
  5299. if (cachedNode) {
  5300. var name = getComponentName(cachedNode.componentOptions);
  5301. if (name && !filter(name)) {
  5302. pruneCacheEntry(cache, key, keys, _vnode);
  5303. }
  5304. }
  5305. }
  5306. }
  5307. function pruneCacheEntry(cache, key, keys, current) {
  5308. var cached$$1 = cache[key];
  5309. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  5310. cached$$1.componentInstance.$destroy();
  5311. }
  5312. cache[key] = null;
  5313. remove(keys, key);
  5314. }
  5315. var patternTypes = [String, RegExp, Array];
  5316. var KeepAlive = {
  5317. name: 'keep-alive',
  5318. abstract: true,
  5319. props: {
  5320. include: patternTypes,
  5321. exclude: patternTypes,
  5322. max: [String, Number]
  5323. },
  5324. created: function created() {
  5325. this.cache = Object.create(null);
  5326. this.keys = [];
  5327. },
  5328. destroyed: function destroyed() {
  5329. for (var key in this.cache) {
  5330. pruneCacheEntry(this.cache, key, this.keys);
  5331. }
  5332. },
  5333. mounted: function mounted() {
  5334. var this$1 = this;
  5335. this.$watch('include', function (val) {
  5336. pruneCache(this$1, function (name) {
  5337. return matches(val, name);
  5338. });
  5339. });
  5340. this.$watch('exclude', function (val) {
  5341. pruneCache(this$1, function (name) {
  5342. return !matches(val, name);
  5343. });
  5344. });
  5345. },
  5346. render: function render() {
  5347. var slot = this.$slots.default;
  5348. var vnode = getFirstComponentChild(slot);
  5349. var componentOptions = vnode && vnode.componentOptions;
  5350. if (componentOptions) {
  5351. // check pattern
  5352. var name = getComponentName(componentOptions);
  5353. var ref = this;
  5354. var include = ref.include;
  5355. var exclude = ref.exclude;
  5356. if ( // not included
  5357. include && (!name || !matches(include, name)) || // excluded
  5358. exclude && name && matches(exclude, name)) {
  5359. return vnode;
  5360. }
  5361. var ref$1 = this;
  5362. var cache = ref$1.cache;
  5363. var keys = ref$1.keys;
  5364. var key = vnode.key == null // same constructor may get registered as different local components
  5365. // so cid alone is not enough (#3269)
  5366. ? componentOptions.Ctor.cid + (componentOptions.tag ? "::" + componentOptions.tag : '') : vnode.key;
  5367. if (cache[key]) {
  5368. vnode.componentInstance = cache[key].componentInstance; // make current key freshest
  5369. remove(keys, key);
  5370. keys.push(key);
  5371. } else {
  5372. cache[key] = vnode;
  5373. keys.push(key); // prune oldest entry
  5374. if (this.max && keys.length > parseInt(this.max)) {
  5375. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  5376. }
  5377. }
  5378. vnode.data.keepAlive = true;
  5379. }
  5380. return vnode || slot && slot[0];
  5381. }
  5382. };
  5383. var builtInComponents = {
  5384. KeepAlive: KeepAlive
  5385. };
  5386. /* */
  5387. function initGlobalAPI(Vue) {
  5388. // config
  5389. var configDef = {};
  5390. configDef.get = function () {
  5391. return config;
  5392. };
  5393. if (true) {
  5394. configDef.set = function () {
  5395. warn('Do not replace the Vue.config object, set individual fields instead.');
  5396. };
  5397. }
  5398. Object.defineProperty(Vue, 'config', configDef); // exposed util methods.
  5399. // NOTE: these are not considered part of the public API - avoid relying on
  5400. // them unless you are aware of the risk.
  5401. Vue.util = {
  5402. warn: warn,
  5403. extend: extend,
  5404. mergeOptions: mergeOptions,
  5405. defineReactive: defineReactive$$1
  5406. };
  5407. Vue.set = set;
  5408. Vue.delete = del;
  5409. Vue.nextTick = nextTick; // 2.6 explicit observable API
  5410. Vue.observable = function (obj) {
  5411. observe(obj);
  5412. return obj;
  5413. };
  5414. Vue.options = Object.create(null);
  5415. ASSET_TYPES.forEach(function (type) {
  5416. Vue.options[type + 's'] = Object.create(null);
  5417. }); // this is used to identify the "base" constructor to extend all plain-object
  5418. // components with in Weex's multi-instance scenarios.
  5419. Vue.options._base = Vue;
  5420. extend(Vue.options.components, builtInComponents);
  5421. initUse(Vue);
  5422. initMixin$1(Vue);
  5423. initExtend(Vue);
  5424. initAssetRegisters(Vue);
  5425. }
  5426. initGlobalAPI(Vue);
  5427. Object.defineProperty(Vue.prototype, '$isServer', {
  5428. get: isServerRendering
  5429. });
  5430. Object.defineProperty(Vue.prototype, '$ssrContext', {
  5431. get: function get() {
  5432. /* istanbul ignore next */
  5433. return this.$vnode && this.$vnode.ssrContext;
  5434. }
  5435. }); // expose FunctionalRenderContext for ssr runtime helper installation
  5436. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  5437. value: FunctionalRenderContext
  5438. });
  5439. Vue.version = '2.6.11';
  5440. /* */
  5441. // these are reserved for web because they are directly compiled away
  5442. // during template compilation
  5443. var isReservedAttr = makeMap('style,class'); // attributes that should be using props for binding
  5444. var acceptValue = makeMap('input,textarea,option,select,progress');
  5445. var mustUseProp = function mustUseProp(tag, type, attr) {
  5446. return attr === 'value' && acceptValue(tag) && type !== 'button' || attr === 'selected' && tag === 'option' || attr === 'checked' && tag === 'input' || attr === 'muted' && tag === 'video';
  5447. };
  5448. var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
  5449. var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');
  5450. var convertEnumeratedValue = function convertEnumeratedValue(key, value) {
  5451. return isFalsyAttrValue(value) || value === 'false' ? 'false' // allow arbitrary string value for contenteditable
  5452. : key === 'contenteditable' && isValidContentEditableValue(value) ? value : 'true';
  5453. };
  5454. var isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' + 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' + 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' + 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' + 'required,reversed,scoped,seamless,selected,sortable,translate,' + 'truespeed,typemustmatch,visible');
  5455. var xlinkNS = 'http://www.w3.org/1999/xlink';
  5456. var isXlink = function isXlink(name) {
  5457. return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink';
  5458. };
  5459. var getXlinkProp = function getXlinkProp(name) {
  5460. return isXlink(name) ? name.slice(6, name.length) : '';
  5461. };
  5462. var isFalsyAttrValue = function isFalsyAttrValue(val) {
  5463. return val == null || val === false;
  5464. };
  5465. /* */
  5466. function genClassForVnode(vnode) {
  5467. var data = vnode.data;
  5468. var parentNode = vnode;
  5469. var childNode = vnode;
  5470. while (isDef(childNode.componentInstance)) {
  5471. childNode = childNode.componentInstance._vnode;
  5472. if (childNode && childNode.data) {
  5473. data = mergeClassData(childNode.data, data);
  5474. }
  5475. }
  5476. while (isDef(parentNode = parentNode.parent)) {
  5477. if (parentNode && parentNode.data) {
  5478. data = mergeClassData(data, parentNode.data);
  5479. }
  5480. }
  5481. return renderClass(data.staticClass, data.class);
  5482. }
  5483. function mergeClassData(child, parent) {
  5484. return {
  5485. staticClass: concat(child.staticClass, parent.staticClass),
  5486. class: isDef(child.class) ? [child.class, parent.class] : parent.class
  5487. };
  5488. }
  5489. function renderClass(staticClass, dynamicClass) {
  5490. if (isDef(staticClass) || isDef(dynamicClass)) {
  5491. return concat(staticClass, stringifyClass(dynamicClass));
  5492. }
  5493. /* istanbul ignore next */
  5494. return '';
  5495. }
  5496. function concat(a, b) {
  5497. return a ? b ? a + ' ' + b : a : b || '';
  5498. }
  5499. function stringifyClass(value) {
  5500. if (Array.isArray(value)) {
  5501. return stringifyArray(value);
  5502. }
  5503. if (isObject(value)) {
  5504. return stringifyObject(value);
  5505. }
  5506. if (typeof value === 'string') {
  5507. return value;
  5508. }
  5509. /* istanbul ignore next */
  5510. return '';
  5511. }
  5512. function stringifyArray(value) {
  5513. var res = '';
  5514. var stringified;
  5515. for (var i = 0, l = value.length; i < l; i++) {
  5516. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  5517. if (res) {
  5518. res += ' ';
  5519. }
  5520. res += stringified;
  5521. }
  5522. }
  5523. return res;
  5524. }
  5525. function stringifyObject(value) {
  5526. var res = '';
  5527. for (var key in value) {
  5528. if (value[key]) {
  5529. if (res) {
  5530. res += ' ';
  5531. }
  5532. res += key;
  5533. }
  5534. }
  5535. return res;
  5536. }
  5537. /* */
  5538. var namespaceMap = {
  5539. svg: 'http://www.w3.org/2000/svg',
  5540. math: 'http://www.w3.org/1998/Math/MathML'
  5541. };
  5542. var isHTMLTag = makeMap('html,body,base,head,link,meta,style,title,' + 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' + 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' + 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' + 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' + 'embed,object,param,source,canvas,script,noscript,del,ins,' + 'caption,col,colgroup,table,thead,tbody,td,th,tr,' + 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' + 'output,progress,select,textarea,' + 'details,dialog,menu,menuitem,summary,' + 'content,element,shadow,template,blockquote,iframe,tfoot'); // this map is intentionally selective, only covering SVG elements that may
  5543. // contain child elements.
  5544. var isSVG = makeMap('svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' + 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' + 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', true);
  5545. var isReservedTag = function isReservedTag(tag) {
  5546. return isHTMLTag(tag) || isSVG(tag);
  5547. };
  5548. function getTagNamespace(tag) {
  5549. if (isSVG(tag)) {
  5550. return 'svg';
  5551. } // basic support for MathML
  5552. // note it doesn't support other MathML elements being component roots
  5553. if (tag === 'math') {
  5554. return 'math';
  5555. }
  5556. }
  5557. var unknownElementCache = Object.create(null);
  5558. function isUnknownElement(tag) {
  5559. /* istanbul ignore if */
  5560. if (!inBrowser) {
  5561. return true;
  5562. }
  5563. if (isReservedTag(tag)) {
  5564. return false;
  5565. }
  5566. tag = tag.toLowerCase();
  5567. /* istanbul ignore if */
  5568. if (unknownElementCache[tag] != null) {
  5569. return unknownElementCache[tag];
  5570. }
  5571. var el = document.createElement(tag);
  5572. if (tag.indexOf('-') > -1) {
  5573. // http://stackoverflow.com/a/28210364/1070244
  5574. return unknownElementCache[tag] = el.constructor === window.HTMLUnknownElement || el.constructor === window.HTMLElement;
  5575. } else {
  5576. return unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString());
  5577. }
  5578. }
  5579. var isTextInputType = makeMap('text,number,password,search,email,tel,url');
  5580. /* */
  5581. /**
  5582. * Query an element selector if it's not an element already.
  5583. */
  5584. function query(el) {
  5585. if (typeof el === 'string') {
  5586. var selected = document.querySelector(el);
  5587. if (!selected) {
  5588. true && warn('Cannot find element: ' + el);
  5589. return document.createElement('div');
  5590. }
  5591. return selected;
  5592. } else {
  5593. return el;
  5594. }
  5595. }
  5596. /* */
  5597. function createElement$1(tagName, vnode) {
  5598. var elm = document.createElement(tagName);
  5599. if (tagName !== 'select') {
  5600. return elm;
  5601. } // false or null will remove the attribute but undefined will not
  5602. if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {
  5603. elm.setAttribute('multiple', 'multiple');
  5604. }
  5605. return elm;
  5606. }
  5607. function createElementNS(namespace, tagName) {
  5608. return document.createElementNS(namespaceMap[namespace], tagName);
  5609. }
  5610. function createTextNode(text) {
  5611. return document.createTextNode(text);
  5612. }
  5613. function createComment(text) {
  5614. return document.createComment(text);
  5615. }
  5616. function insertBefore(parentNode, newNode, referenceNode) {
  5617. parentNode.insertBefore(newNode, referenceNode);
  5618. }
  5619. function removeChild(node, child) {
  5620. node.removeChild(child);
  5621. }
  5622. function appendChild(node, child) {
  5623. node.appendChild(child);
  5624. }
  5625. function parentNode(node) {
  5626. return node.parentNode;
  5627. }
  5628. function nextSibling(node) {
  5629. return node.nextSibling;
  5630. }
  5631. function tagName(node) {
  5632. return node.tagName;
  5633. }
  5634. function setTextContent(node, text) {
  5635. node.textContent = text;
  5636. }
  5637. function setStyleScope(node, scopeId) {
  5638. node.setAttribute(scopeId, '');
  5639. }
  5640. var nodeOps = /*#__PURE__*/Object.freeze({
  5641. createElement: createElement$1,
  5642. createElementNS: createElementNS,
  5643. createTextNode: createTextNode,
  5644. createComment: createComment,
  5645. insertBefore: insertBefore,
  5646. removeChild: removeChild,
  5647. appendChild: appendChild,
  5648. parentNode: parentNode,
  5649. nextSibling: nextSibling,
  5650. tagName: tagName,
  5651. setTextContent: setTextContent,
  5652. setStyleScope: setStyleScope
  5653. });
  5654. /* */
  5655. var ref = {
  5656. create: function create(_, vnode) {
  5657. registerRef(vnode);
  5658. },
  5659. update: function update(oldVnode, vnode) {
  5660. if (oldVnode.data.ref !== vnode.data.ref) {
  5661. registerRef(oldVnode, true);
  5662. registerRef(vnode);
  5663. }
  5664. },
  5665. destroy: function destroy(vnode) {
  5666. registerRef(vnode, true);
  5667. }
  5668. };
  5669. function registerRef(vnode, isRemoval) {
  5670. var key = vnode.data.ref;
  5671. if (!isDef(key)) {
  5672. return;
  5673. }
  5674. var vm = vnode.context;
  5675. var ref = vnode.componentInstance || vnode.elm;
  5676. var refs = vm.$refs;
  5677. if (isRemoval) {
  5678. if (Array.isArray(refs[key])) {
  5679. remove(refs[key], ref);
  5680. } else if (refs[key] === ref) {
  5681. refs[key] = undefined;
  5682. }
  5683. } else {
  5684. if (vnode.data.refInFor) {
  5685. if (!Array.isArray(refs[key])) {
  5686. refs[key] = [ref];
  5687. } else if (refs[key].indexOf(ref) < 0) {
  5688. // $flow-disable-line
  5689. refs[key].push(ref);
  5690. }
  5691. } else {
  5692. refs[key] = ref;
  5693. }
  5694. }
  5695. }
  5696. /**
  5697. * Virtual DOM patching algorithm based on Snabbdom by
  5698. * Simon Friis Vindum (@paldepind)
  5699. * Licensed under the MIT License
  5700. * https://github.com/paldepind/snabbdom/blob/master/LICENSE
  5701. *
  5702. * modified by Evan You (@yyx990803)
  5703. *
  5704. * Not type-checking this because this file is perf-critical and the cost
  5705. * of making flow understand it is not worth it.
  5706. */
  5707. var emptyNode = new VNode('', {}, []);
  5708. var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
  5709. function sameVnode(a, b) {
  5710. return a.key === b.key && (a.tag === b.tag && a.isComment === b.isComment && isDef(a.data) === isDef(b.data) && sameInputType(a, b) || isTrue(a.isAsyncPlaceholder) && a.asyncFactory === b.asyncFactory && isUndef(b.asyncFactory.error));
  5711. }
  5712. function sameInputType(a, b) {
  5713. if (a.tag !== 'input') {
  5714. return true;
  5715. }
  5716. var i;
  5717. var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;
  5718. var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;
  5719. return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB);
  5720. }
  5721. function createKeyToOldIdx(children, beginIdx, endIdx) {
  5722. var i, key;
  5723. var map = {};
  5724. for (i = beginIdx; i <= endIdx; ++i) {
  5725. key = children[i].key;
  5726. if (isDef(key)) {
  5727. map[key] = i;
  5728. }
  5729. }
  5730. return map;
  5731. }
  5732. function createPatchFunction(backend) {
  5733. var i, j;
  5734. var cbs = {};
  5735. var modules = backend.modules;
  5736. var nodeOps = backend.nodeOps;
  5737. for (i = 0; i < hooks.length; ++i) {
  5738. cbs[hooks[i]] = [];
  5739. for (j = 0; j < modules.length; ++j) {
  5740. if (isDef(modules[j][hooks[i]])) {
  5741. cbs[hooks[i]].push(modules[j][hooks[i]]);
  5742. }
  5743. }
  5744. }
  5745. function emptyNodeAt(elm) {
  5746. return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm);
  5747. }
  5748. function createRmCb(childElm, listeners) {
  5749. function remove$$1() {
  5750. if (--remove$$1.listeners === 0) {
  5751. removeNode(childElm);
  5752. }
  5753. }
  5754. remove$$1.listeners = listeners;
  5755. return remove$$1;
  5756. }
  5757. function removeNode(el) {
  5758. var parent = nodeOps.parentNode(el); // element may have already been removed due to v-html / v-text
  5759. if (isDef(parent)) {
  5760. nodeOps.removeChild(parent, el);
  5761. }
  5762. }
  5763. function isUnknownElement$$1(vnode, inVPre) {
  5764. return !inVPre && !vnode.ns && !(config.ignoredElements.length && config.ignoredElements.some(function (ignore) {
  5765. return isRegExp(ignore) ? ignore.test(vnode.tag) : ignore === vnode.tag;
  5766. })) && config.isUnknownElement(vnode.tag);
  5767. }
  5768. var creatingElmInVPre = 0;
  5769. function createElm(vnode, insertedVnodeQueue, parentElm, refElm, nested, ownerArray, index) {
  5770. if (isDef(vnode.elm) && isDef(ownerArray)) {
  5771. // This vnode was used in a previous render!
  5772. // now it's used as a new node, overwriting its elm would cause
  5773. // potential patch errors down the road when it's used as an insertion
  5774. // reference node. Instead, we clone the node on-demand before creating
  5775. // associated DOM element for it.
  5776. vnode = ownerArray[index] = cloneVNode(vnode);
  5777. }
  5778. vnode.isRootInsert = !nested; // for transition enter check
  5779. if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
  5780. return;
  5781. }
  5782. var data = vnode.data;
  5783. var children = vnode.children;
  5784. var tag = vnode.tag;
  5785. if (isDef(tag)) {
  5786. if (true) {
  5787. if (data && data.pre) {
  5788. creatingElmInVPre++;
  5789. }
  5790. if (isUnknownElement$$1(vnode, creatingElmInVPre)) {
  5791. warn('Unknown custom element: <' + tag + '> - did you ' + 'register the component correctly? For recursive components, ' + 'make sure to provide the "name" option.', vnode.context);
  5792. }
  5793. }
  5794. vnode.elm = vnode.ns ? nodeOps.createElementNS(vnode.ns, tag) : nodeOps.createElement(tag, vnode);
  5795. setScope(vnode);
  5796. /* istanbul ignore if */
  5797. {
  5798. createChildren(vnode, children, insertedVnodeQueue);
  5799. if (isDef(data)) {
  5800. invokeCreateHooks(vnode, insertedVnodeQueue);
  5801. }
  5802. insert(parentElm, vnode.elm, refElm);
  5803. }
  5804. if ( true && data && data.pre) {
  5805. creatingElmInVPre--;
  5806. }
  5807. } else if (isTrue(vnode.isComment)) {
  5808. vnode.elm = nodeOps.createComment(vnode.text);
  5809. insert(parentElm, vnode.elm, refElm);
  5810. } else {
  5811. vnode.elm = nodeOps.createTextNode(vnode.text);
  5812. insert(parentElm, vnode.elm, refElm);
  5813. }
  5814. }
  5815. function createComponent(vnode, insertedVnodeQueue, parentElm, refElm) {
  5816. var i = vnode.data;
  5817. if (isDef(i)) {
  5818. var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;
  5819. if (isDef(i = i.hook) && isDef(i = i.init)) {
  5820. i(vnode, false
  5821. /* hydrating */
  5822. );
  5823. } // after calling the init hook, if the vnode is a child component
  5824. // it should've created a child instance and mounted it. the child
  5825. // component also has set the placeholder vnode's elm.
  5826. // in that case we can just return the element and be done.
  5827. if (isDef(vnode.componentInstance)) {
  5828. initComponent(vnode, insertedVnodeQueue);
  5829. insert(parentElm, vnode.elm, refElm);
  5830. if (isTrue(isReactivated)) {
  5831. reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
  5832. }
  5833. return true;
  5834. }
  5835. }
  5836. }
  5837. function initComponent(vnode, insertedVnodeQueue) {
  5838. if (isDef(vnode.data.pendingInsert)) {
  5839. insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);
  5840. vnode.data.pendingInsert = null;
  5841. }
  5842. vnode.elm = vnode.componentInstance.$el;
  5843. if (isPatchable(vnode)) {
  5844. invokeCreateHooks(vnode, insertedVnodeQueue);
  5845. setScope(vnode);
  5846. } else {
  5847. // empty component root.
  5848. // skip all element-related modules except for ref (#3455)
  5849. registerRef(vnode); // make sure to invoke the insert hook
  5850. insertedVnodeQueue.push(vnode);
  5851. }
  5852. }
  5853. function reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm) {
  5854. var i; // hack for #4339: a reactivated component with inner transition
  5855. // does not trigger because the inner node's created hooks are not called
  5856. // again. It's not ideal to involve module-specific logic in here but
  5857. // there doesn't seem to be a better way to do it.
  5858. var innerNode = vnode;
  5859. while (innerNode.componentInstance) {
  5860. innerNode = innerNode.componentInstance._vnode;
  5861. if (isDef(i = innerNode.data) && isDef(i = i.transition)) {
  5862. for (i = 0; i < cbs.activate.length; ++i) {
  5863. cbs.activate[i](emptyNode, innerNode);
  5864. }
  5865. insertedVnodeQueue.push(innerNode);
  5866. break;
  5867. }
  5868. } // unlike a newly created component,
  5869. // a reactivated keep-alive component doesn't insert itself
  5870. insert(parentElm, vnode.elm, refElm);
  5871. }
  5872. function insert(parent, elm, ref$$1) {
  5873. if (isDef(parent)) {
  5874. if (isDef(ref$$1)) {
  5875. if (nodeOps.parentNode(ref$$1) === parent) {
  5876. nodeOps.insertBefore(parent, elm, ref$$1);
  5877. }
  5878. } else {
  5879. nodeOps.appendChild(parent, elm);
  5880. }
  5881. }
  5882. }
  5883. function createChildren(vnode, children, insertedVnodeQueue) {
  5884. if (Array.isArray(children)) {
  5885. if (true) {
  5886. checkDuplicateKeys(children);
  5887. }
  5888. for (var i = 0; i < children.length; ++i) {
  5889. createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i);
  5890. }
  5891. } else if (isPrimitive(vnode.text)) {
  5892. nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));
  5893. }
  5894. }
  5895. function isPatchable(vnode) {
  5896. while (vnode.componentInstance) {
  5897. vnode = vnode.componentInstance._vnode;
  5898. }
  5899. return isDef(vnode.tag);
  5900. }
  5901. function invokeCreateHooks(vnode, insertedVnodeQueue) {
  5902. for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
  5903. cbs.create[i$1](emptyNode, vnode);
  5904. }
  5905. i = vnode.data.hook; // Reuse variable
  5906. if (isDef(i)) {
  5907. if (isDef(i.create)) {
  5908. i.create(emptyNode, vnode);
  5909. }
  5910. if (isDef(i.insert)) {
  5911. insertedVnodeQueue.push(vnode);
  5912. }
  5913. }
  5914. } // set scope id attribute for scoped CSS.
  5915. // this is implemented as a special case to avoid the overhead
  5916. // of going through the normal attribute patching process.
  5917. function setScope(vnode) {
  5918. var i;
  5919. if (isDef(i = vnode.fnScopeId)) {
  5920. nodeOps.setStyleScope(vnode.elm, i);
  5921. } else {
  5922. var ancestor = vnode;
  5923. while (ancestor) {
  5924. if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {
  5925. nodeOps.setStyleScope(vnode.elm, i);
  5926. }
  5927. ancestor = ancestor.parent;
  5928. }
  5929. } // for slot content they should also get the scopeId from the host instance.
  5930. if (isDef(i = activeInstance) && i !== vnode.context && i !== vnode.fnContext && isDef(i = i.$options._scopeId)) {
  5931. nodeOps.setStyleScope(vnode.elm, i);
  5932. }
  5933. }
  5934. function addVnodes(parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
  5935. for (; startIdx <= endIdx; ++startIdx) {
  5936. createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);
  5937. }
  5938. }
  5939. function invokeDestroyHook(vnode) {
  5940. var i, j;
  5941. var data = vnode.data;
  5942. if (isDef(data)) {
  5943. if (isDef(i = data.hook) && isDef(i = i.destroy)) {
  5944. i(vnode);
  5945. }
  5946. for (i = 0; i < cbs.destroy.length; ++i) {
  5947. cbs.destroy[i](vnode);
  5948. }
  5949. }
  5950. if (isDef(i = vnode.children)) {
  5951. for (j = 0; j < vnode.children.length; ++j) {
  5952. invokeDestroyHook(vnode.children[j]);
  5953. }
  5954. }
  5955. }
  5956. function removeVnodes(vnodes, startIdx, endIdx) {
  5957. for (; startIdx <= endIdx; ++startIdx) {
  5958. var ch = vnodes[startIdx];
  5959. if (isDef(ch)) {
  5960. if (isDef(ch.tag)) {
  5961. removeAndInvokeRemoveHook(ch);
  5962. invokeDestroyHook(ch);
  5963. } else {
  5964. // Text node
  5965. removeNode(ch.elm);
  5966. }
  5967. }
  5968. }
  5969. }
  5970. function removeAndInvokeRemoveHook(vnode, rm) {
  5971. if (isDef(rm) || isDef(vnode.data)) {
  5972. var i;
  5973. var listeners = cbs.remove.length + 1;
  5974. if (isDef(rm)) {
  5975. // we have a recursively passed down rm callback
  5976. // increase the listeners count
  5977. rm.listeners += listeners;
  5978. } else {
  5979. // directly removing
  5980. rm = createRmCb(vnode.elm, listeners);
  5981. } // recursively invoke hooks on child component root node
  5982. if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {
  5983. removeAndInvokeRemoveHook(i, rm);
  5984. }
  5985. for (i = 0; i < cbs.remove.length; ++i) {
  5986. cbs.remove[i](vnode, rm);
  5987. }
  5988. if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {
  5989. i(vnode, rm);
  5990. } else {
  5991. rm();
  5992. }
  5993. } else {
  5994. removeNode(vnode.elm);
  5995. }
  5996. }
  5997. function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
  5998. var oldStartIdx = 0;
  5999. var newStartIdx = 0;
  6000. var oldEndIdx = oldCh.length - 1;
  6001. var oldStartVnode = oldCh[0];
  6002. var oldEndVnode = oldCh[oldEndIdx];
  6003. var newEndIdx = newCh.length - 1;
  6004. var newStartVnode = newCh[0];
  6005. var newEndVnode = newCh[newEndIdx];
  6006. var oldKeyToIdx, idxInOld, vnodeToMove, refElm; // removeOnly is a special flag used only by <transition-group>
  6007. // to ensure removed elements stay in correct relative positions
  6008. // during leaving transitions
  6009. var canMove = !removeOnly;
  6010. if (true) {
  6011. checkDuplicateKeys(newCh);
  6012. }
  6013. while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
  6014. if (isUndef(oldStartVnode)) {
  6015. oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left
  6016. } else if (isUndef(oldEndVnode)) {
  6017. oldEndVnode = oldCh[--oldEndIdx];
  6018. } else if (sameVnode(oldStartVnode, newStartVnode)) {
  6019. patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
  6020. oldStartVnode = oldCh[++oldStartIdx];
  6021. newStartVnode = newCh[++newStartIdx];
  6022. } else if (sameVnode(oldEndVnode, newEndVnode)) {
  6023. patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
  6024. oldEndVnode = oldCh[--oldEndIdx];
  6025. newEndVnode = newCh[--newEndIdx];
  6026. } else if (sameVnode(oldStartVnode, newEndVnode)) {
  6027. // Vnode moved right
  6028. patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
  6029. canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
  6030. oldStartVnode = oldCh[++oldStartIdx];
  6031. newEndVnode = newCh[--newEndIdx];
  6032. } else if (sameVnode(oldEndVnode, newStartVnode)) {
  6033. // Vnode moved left
  6034. patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
  6035. canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
  6036. oldEndVnode = oldCh[--oldEndIdx];
  6037. newStartVnode = newCh[++newStartIdx];
  6038. } else {
  6039. if (isUndef(oldKeyToIdx)) {
  6040. oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);
  6041. }
  6042. idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);
  6043. if (isUndef(idxInOld)) {
  6044. // New element
  6045. createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
  6046. } else {
  6047. vnodeToMove = oldCh[idxInOld];
  6048. if (sameVnode(vnodeToMove, newStartVnode)) {
  6049. patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
  6050. oldCh[idxInOld] = undefined;
  6051. canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);
  6052. } else {
  6053. // same key but different element. treat as new element
  6054. createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
  6055. }
  6056. }
  6057. newStartVnode = newCh[++newStartIdx];
  6058. }
  6059. }
  6060. if (oldStartIdx > oldEndIdx) {
  6061. refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
  6062. addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
  6063. } else if (newStartIdx > newEndIdx) {
  6064. removeVnodes(oldCh, oldStartIdx, oldEndIdx);
  6065. }
  6066. }
  6067. function checkDuplicateKeys(children) {
  6068. var seenKeys = {};
  6069. for (var i = 0; i < children.length; i++) {
  6070. var vnode = children[i];
  6071. var key = vnode.key;
  6072. if (isDef(key)) {
  6073. if (seenKeys[key]) {
  6074. warn("Duplicate keys detected: '" + key + "'. This may cause an update error.", vnode.context);
  6075. } else {
  6076. seenKeys[key] = true;
  6077. }
  6078. }
  6079. }
  6080. }
  6081. function findIdxInOld(node, oldCh, start, end) {
  6082. for (var i = start; i < end; i++) {
  6083. var c = oldCh[i];
  6084. if (isDef(c) && sameVnode(node, c)) {
  6085. return i;
  6086. }
  6087. }
  6088. }
  6089. function patchVnode(oldVnode, vnode, insertedVnodeQueue, ownerArray, index, removeOnly) {
  6090. if (oldVnode === vnode) {
  6091. return;
  6092. }
  6093. if (isDef(vnode.elm) && isDef(ownerArray)) {
  6094. // clone reused vnode
  6095. vnode = ownerArray[index] = cloneVNode(vnode);
  6096. }
  6097. var elm = vnode.elm = oldVnode.elm;
  6098. if (isTrue(oldVnode.isAsyncPlaceholder)) {
  6099. if (isDef(vnode.asyncFactory.resolved)) {
  6100. hydrate(oldVnode.elm, vnode, insertedVnodeQueue);
  6101. } else {
  6102. vnode.isAsyncPlaceholder = true;
  6103. }
  6104. return;
  6105. } // reuse element for static trees.
  6106. // note we only do this if the vnode is cloned -
  6107. // if the new node is not cloned it means the render functions have been
  6108. // reset by the hot-reload-api and we need to do a proper re-render.
  6109. if (isTrue(vnode.isStatic) && isTrue(oldVnode.isStatic) && vnode.key === oldVnode.key && (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {
  6110. vnode.componentInstance = oldVnode.componentInstance;
  6111. return;
  6112. }
  6113. var i;
  6114. var data = vnode.data;
  6115. if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {
  6116. i(oldVnode, vnode);
  6117. }
  6118. var oldCh = oldVnode.children;
  6119. var ch = vnode.children;
  6120. if (isDef(data) && isPatchable(vnode)) {
  6121. for (i = 0; i < cbs.update.length; ++i) {
  6122. cbs.update[i](oldVnode, vnode);
  6123. }
  6124. if (isDef(i = data.hook) && isDef(i = i.update)) {
  6125. i(oldVnode, vnode);
  6126. }
  6127. }
  6128. if (isUndef(vnode.text)) {
  6129. if (isDef(oldCh) && isDef(ch)) {
  6130. if (oldCh !== ch) {
  6131. updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly);
  6132. }
  6133. } else if (isDef(ch)) {
  6134. if (true) {
  6135. checkDuplicateKeys(ch);
  6136. }
  6137. if (isDef(oldVnode.text)) {
  6138. nodeOps.setTextContent(elm, '');
  6139. }
  6140. addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
  6141. } else if (isDef(oldCh)) {
  6142. removeVnodes(oldCh, 0, oldCh.length - 1);
  6143. } else if (isDef(oldVnode.text)) {
  6144. nodeOps.setTextContent(elm, '');
  6145. }
  6146. } else if (oldVnode.text !== vnode.text) {
  6147. nodeOps.setTextContent(elm, vnode.text);
  6148. }
  6149. if (isDef(data)) {
  6150. if (isDef(i = data.hook) && isDef(i = i.postpatch)) {
  6151. i(oldVnode, vnode);
  6152. }
  6153. }
  6154. }
  6155. function invokeInsertHook(vnode, queue, initial) {
  6156. // delay insert hooks for component root nodes, invoke them after the
  6157. // element is really inserted
  6158. if (isTrue(initial) && isDef(vnode.parent)) {
  6159. vnode.parent.data.pendingInsert = queue;
  6160. } else {
  6161. for (var i = 0; i < queue.length; ++i) {
  6162. queue[i].data.hook.insert(queue[i]);
  6163. }
  6164. }
  6165. }
  6166. var hydrationBailed = false; // list of modules that can skip create hook during hydration because they
  6167. // are already rendered on the client or has no need for initialization
  6168. // Note: style is excluded because it relies on initial clone for future
  6169. // deep updates (#7063).
  6170. var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key'); // Note: this is a browser-only function so we can assume elms are DOM nodes.
  6171. function hydrate(elm, vnode, insertedVnodeQueue, inVPre) {
  6172. var i;
  6173. var tag = vnode.tag;
  6174. var data = vnode.data;
  6175. var children = vnode.children;
  6176. inVPre = inVPre || data && data.pre;
  6177. vnode.elm = elm;
  6178. if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {
  6179. vnode.isAsyncPlaceholder = true;
  6180. return true;
  6181. } // assert node match
  6182. if (true) {
  6183. if (!assertNodeMatch(elm, vnode, inVPre)) {
  6184. return false;
  6185. }
  6186. }
  6187. if (isDef(data)) {
  6188. if (isDef(i = data.hook) && isDef(i = i.init)) {
  6189. i(vnode, true
  6190. /* hydrating */
  6191. );
  6192. }
  6193. if (isDef(i = vnode.componentInstance)) {
  6194. // child component. it should have hydrated its own tree.
  6195. initComponent(vnode, insertedVnodeQueue);
  6196. return true;
  6197. }
  6198. }
  6199. if (isDef(tag)) {
  6200. if (isDef(children)) {
  6201. // empty element, allow client to pick up and populate children
  6202. if (!elm.hasChildNodes()) {
  6203. createChildren(vnode, children, insertedVnodeQueue);
  6204. } else {
  6205. // v-html and domProps: innerHTML
  6206. if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) {
  6207. if (i !== elm.innerHTML) {
  6208. /* istanbul ignore if */
  6209. if ( true && typeof console !== 'undefined' && !hydrationBailed) {
  6210. hydrationBailed = true;
  6211. console.warn('Parent: ', elm);
  6212. console.warn('server innerHTML: ', i);
  6213. console.warn('client innerHTML: ', elm.innerHTML);
  6214. }
  6215. return false;
  6216. }
  6217. } else {
  6218. // iterate and compare children lists
  6219. var childrenMatch = true;
  6220. var childNode = elm.firstChild;
  6221. for (var i$1 = 0; i$1 < children.length; i$1++) {
  6222. if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) {
  6223. childrenMatch = false;
  6224. break;
  6225. }
  6226. childNode = childNode.nextSibling;
  6227. } // if childNode is not null, it means the actual childNodes list is
  6228. // longer than the virtual children list.
  6229. if (!childrenMatch || childNode) {
  6230. /* istanbul ignore if */
  6231. if ( true && typeof console !== 'undefined' && !hydrationBailed) {
  6232. hydrationBailed = true;
  6233. console.warn('Parent: ', elm);
  6234. console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
  6235. }
  6236. return false;
  6237. }
  6238. }
  6239. }
  6240. }
  6241. if (isDef(data)) {
  6242. var fullInvoke = false;
  6243. for (var key in data) {
  6244. if (!isRenderedModule(key)) {
  6245. fullInvoke = true;
  6246. invokeCreateHooks(vnode, insertedVnodeQueue);
  6247. break;
  6248. }
  6249. }
  6250. if (!fullInvoke && data['class']) {
  6251. // ensure collecting deps for deep class bindings for future updates
  6252. traverse(data['class']);
  6253. }
  6254. }
  6255. } else if (elm.data !== vnode.text) {
  6256. elm.data = vnode.text;
  6257. }
  6258. return true;
  6259. }
  6260. function assertNodeMatch(node, vnode, inVPre) {
  6261. if (isDef(vnode.tag)) {
  6262. return vnode.tag.indexOf('vue-component') === 0 || !isUnknownElement$$1(vnode, inVPre) && vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase());
  6263. } else {
  6264. return node.nodeType === (vnode.isComment ? 8 : 3);
  6265. }
  6266. }
  6267. return function patch(oldVnode, vnode, hydrating, removeOnly) {
  6268. if (isUndef(vnode)) {
  6269. if (isDef(oldVnode)) {
  6270. invokeDestroyHook(oldVnode);
  6271. }
  6272. return;
  6273. }
  6274. var isInitialPatch = false;
  6275. var insertedVnodeQueue = [];
  6276. if (isUndef(oldVnode)) {
  6277. // empty mount (likely as component), create new root element
  6278. isInitialPatch = true;
  6279. createElm(vnode, insertedVnodeQueue);
  6280. } else {
  6281. var isRealElement = isDef(oldVnode.nodeType);
  6282. if (!isRealElement && sameVnode(oldVnode, vnode)) {
  6283. // patch existing root node
  6284. patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);
  6285. } else {
  6286. if (isRealElement) {
  6287. // mounting to a real element
  6288. // check if this is server-rendered content and if we can perform
  6289. // a successful hydration.
  6290. if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {
  6291. oldVnode.removeAttribute(SSR_ATTR);
  6292. hydrating = true;
  6293. }
  6294. if (isTrue(hydrating)) {
  6295. if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
  6296. invokeInsertHook(vnode, insertedVnodeQueue, true);
  6297. return oldVnode;
  6298. } else if (true) {
  6299. warn('The client-side rendered virtual DOM tree is not matching ' + 'server-rendered content. This is likely caused by incorrect ' + 'HTML markup, for example nesting block-level elements inside ' + '<p>, or missing <tbody>. Bailing hydration and performing ' + 'full client-side render.');
  6300. }
  6301. } // either not server-rendered, or hydration failed.
  6302. // create an empty node and replace it
  6303. oldVnode = emptyNodeAt(oldVnode);
  6304. } // replacing existing element
  6305. var oldElm = oldVnode.elm;
  6306. var parentElm = nodeOps.parentNode(oldElm); // create new node
  6307. createElm(vnode, insertedVnodeQueue, // extremely rare edge case: do not insert if old element is in a
  6308. // leaving transition. Only happens when combining transition +
  6309. // keep-alive + HOCs. (#4590)
  6310. oldElm._leaveCb ? null : parentElm, nodeOps.nextSibling(oldElm)); // update parent placeholder node element, recursively
  6311. if (isDef(vnode.parent)) {
  6312. var ancestor = vnode.parent;
  6313. var patchable = isPatchable(vnode);
  6314. while (ancestor) {
  6315. for (var i = 0; i < cbs.destroy.length; ++i) {
  6316. cbs.destroy[i](ancestor);
  6317. }
  6318. ancestor.elm = vnode.elm;
  6319. if (patchable) {
  6320. for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
  6321. cbs.create[i$1](emptyNode, ancestor);
  6322. } // #6513
  6323. // invoke insert hooks that may have been merged by create hooks.
  6324. // e.g. for directives that uses the "inserted" hook.
  6325. var insert = ancestor.data.hook.insert;
  6326. if (insert.merged) {
  6327. // start at index 1 to avoid re-invoking component mounted hook
  6328. for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {
  6329. insert.fns[i$2]();
  6330. }
  6331. }
  6332. } else {
  6333. registerRef(ancestor);
  6334. }
  6335. ancestor = ancestor.parent;
  6336. }
  6337. } // destroy old node
  6338. if (isDef(parentElm)) {
  6339. removeVnodes([oldVnode], 0, 0);
  6340. } else if (isDef(oldVnode.tag)) {
  6341. invokeDestroyHook(oldVnode);
  6342. }
  6343. }
  6344. }
  6345. invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
  6346. return vnode.elm;
  6347. };
  6348. }
  6349. /* */
  6350. var directives = {
  6351. create: updateDirectives,
  6352. update: updateDirectives,
  6353. destroy: function unbindDirectives(vnode) {
  6354. updateDirectives(vnode, emptyNode);
  6355. }
  6356. };
  6357. function updateDirectives(oldVnode, vnode) {
  6358. if (oldVnode.data.directives || vnode.data.directives) {
  6359. _update(oldVnode, vnode);
  6360. }
  6361. }
  6362. function _update(oldVnode, vnode) {
  6363. var isCreate = oldVnode === emptyNode;
  6364. var isDestroy = vnode === emptyNode;
  6365. var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);
  6366. var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);
  6367. var dirsWithInsert = [];
  6368. var dirsWithPostpatch = [];
  6369. var key, oldDir, dir;
  6370. for (key in newDirs) {
  6371. oldDir = oldDirs[key];
  6372. dir = newDirs[key];
  6373. if (!oldDir) {
  6374. // new directive, bind
  6375. callHook$1(dir, 'bind', vnode, oldVnode);
  6376. if (dir.def && dir.def.inserted) {
  6377. dirsWithInsert.push(dir);
  6378. }
  6379. } else {
  6380. // existing directive, update
  6381. dir.oldValue = oldDir.value;
  6382. dir.oldArg = oldDir.arg;
  6383. callHook$1(dir, 'update', vnode, oldVnode);
  6384. if (dir.def && dir.def.componentUpdated) {
  6385. dirsWithPostpatch.push(dir);
  6386. }
  6387. }
  6388. }
  6389. if (dirsWithInsert.length) {
  6390. var callInsert = function callInsert() {
  6391. for (var i = 0; i < dirsWithInsert.length; i++) {
  6392. callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);
  6393. }
  6394. };
  6395. if (isCreate) {
  6396. mergeVNodeHook(vnode, 'insert', callInsert);
  6397. } else {
  6398. callInsert();
  6399. }
  6400. }
  6401. if (dirsWithPostpatch.length) {
  6402. mergeVNodeHook(vnode, 'postpatch', function () {
  6403. for (var i = 0; i < dirsWithPostpatch.length; i++) {
  6404. callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
  6405. }
  6406. });
  6407. }
  6408. if (!isCreate) {
  6409. for (key in oldDirs) {
  6410. if (!newDirs[key]) {
  6411. // no longer present, unbind
  6412. callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);
  6413. }
  6414. }
  6415. }
  6416. }
  6417. var emptyModifiers = Object.create(null);
  6418. function normalizeDirectives$1(dirs, vm) {
  6419. var res = Object.create(null);
  6420. if (!dirs) {
  6421. // $flow-disable-line
  6422. return res;
  6423. }
  6424. var i, dir;
  6425. for (i = 0; i < dirs.length; i++) {
  6426. dir = dirs[i];
  6427. if (!dir.modifiers) {
  6428. // $flow-disable-line
  6429. dir.modifiers = emptyModifiers;
  6430. }
  6431. res[getRawDirName(dir)] = dir;
  6432. dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);
  6433. } // $flow-disable-line
  6434. return res;
  6435. }
  6436. function getRawDirName(dir) {
  6437. return dir.rawName || dir.name + "." + Object.keys(dir.modifiers || {}).join('.');
  6438. }
  6439. function callHook$1(dir, hook, vnode, oldVnode, isDestroy) {
  6440. var fn = dir.def && dir.def[hook];
  6441. if (fn) {
  6442. try {
  6443. fn(vnode.elm, dir, vnode, oldVnode, isDestroy);
  6444. } catch (e) {
  6445. handleError(e, vnode.context, "directive " + dir.name + " " + hook + " hook");
  6446. }
  6447. }
  6448. }
  6449. var baseModules = [ref, directives];
  6450. /* */
  6451. function findWxsProps(wxsProps, attrs) {
  6452. var ret = {};
  6453. Object.keys(wxsProps).forEach(function (name) {
  6454. if (attrs[name]) {
  6455. ret[wxsProps[name]] = attrs[name];
  6456. delete attrs[name];
  6457. }
  6458. });
  6459. return ret;
  6460. }
  6461. function updateWxsProps(oldVnode, vnode) {
  6462. if (isUndef(oldVnode.data.wxsProps) && isUndef(vnode.data.wxsProps)) {
  6463. return;
  6464. }
  6465. var oldWxsWatches = oldVnode.$wxsWatches;
  6466. var wxsPropsKey = Object.keys(vnode.data.wxsProps);
  6467. if (!oldWxsWatches && !wxsPropsKey.length) {
  6468. return;
  6469. }
  6470. if (!oldWxsWatches) {
  6471. oldWxsWatches = {};
  6472. }
  6473. var wxsProps = findWxsProps(vnode.data.wxsProps, vnode.data.attrs);
  6474. var context = vnode.context;
  6475. vnode.$wxsWatches = {};
  6476. Object.keys(wxsProps).forEach(function (prop) {
  6477. // app-plus view wxs
  6478. var watchProp = prop;
  6479. if (vnode.context.wxsProps) {
  6480. watchProp = 'wxsProps.' + prop;
  6481. }
  6482. vnode.$wxsWatches[prop] = oldWxsWatches[prop] || vnode.context.$watch(watchProp, function (newVal, oldVal) {
  6483. wxsProps[prop](newVal, oldVal, context.$getComponentDescriptor(context, true), vnode.elm.__vue__.$getComponentDescriptor(vnode.elm.__vue__, false));
  6484. }, {
  6485. deep: true
  6486. });
  6487. });
  6488. Object.keys(oldWxsWatches).forEach(function (oldName) {
  6489. if (!vnode.$wxsWatches[oldName]) {
  6490. oldWxsWatches[oldName]();
  6491. delete oldWxsWatches[oldName];
  6492. }
  6493. });
  6494. }
  6495. var wxs = {
  6496. create: updateWxsProps,
  6497. update: updateWxsProps
  6498. };
  6499. /* */
  6500. function updateAttrs(oldVnode, vnode) {
  6501. var opts = vnode.componentOptions;
  6502. if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {
  6503. return;
  6504. }
  6505. if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
  6506. return;
  6507. }
  6508. var key, cur, old;
  6509. var elm = vnode.elm;
  6510. var oldAttrs = oldVnode.data.attrs || {};
  6511. var attrs = vnode.data.attrs || {}; // clone observed objects, as the user probably wants to mutate it
  6512. if (isDef(attrs.__ob__)) {
  6513. attrs = vnode.data.attrs = extend({}, attrs);
  6514. }
  6515. for (key in attrs) {
  6516. cur = attrs[key];
  6517. old = oldAttrs[key];
  6518. if (old !== cur) {
  6519. setAttr(elm, key, cur);
  6520. }
  6521. } // #4391: in IE9, setting type can reset value for input[type=radio]
  6522. // #6666: IE/Edge forces progress value down to 1 before setting a max
  6523. /* istanbul ignore if */
  6524. if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {
  6525. setAttr(elm, 'value', attrs.value);
  6526. }
  6527. for (key in oldAttrs) {
  6528. if (isUndef(attrs[key])) {
  6529. if (isXlink(key)) {
  6530. elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
  6531. } else if (!isEnumeratedAttr(key)) {
  6532. elm.removeAttribute(key);
  6533. }
  6534. }
  6535. }
  6536. }
  6537. function setAttr(el, key, value) {
  6538. if (el.tagName.indexOf('-') > -1) {
  6539. baseSetAttr(el, key, value);
  6540. } else if (isBooleanAttr(key)) {
  6541. // set attribute for blank value
  6542. // e.g. <option disabled>Select one</option>
  6543. if (isFalsyAttrValue(value)) {
  6544. el.removeAttribute(key);
  6545. } else {
  6546. // technically allowfullscreen is a boolean attribute for <iframe>,
  6547. // but Flash expects a value of "true" when used on <embed> tag
  6548. value = key === 'allowfullscreen' && el.tagName === 'EMBED' ? 'true' : key;
  6549. el.setAttribute(key, value);
  6550. }
  6551. } else if (isEnumeratedAttr(key)) {
  6552. el.setAttribute(key, convertEnumeratedValue(key, value));
  6553. } else if (isXlink(key)) {
  6554. if (isFalsyAttrValue(value)) {
  6555. el.removeAttributeNS(xlinkNS, getXlinkProp(key));
  6556. } else {
  6557. el.setAttributeNS(xlinkNS, key, value);
  6558. }
  6559. } else {
  6560. baseSetAttr(el, key, value);
  6561. }
  6562. }
  6563. function baseSetAttr(el, key, value) {
  6564. if (isFalsyAttrValue(value)) {
  6565. el.removeAttribute(key);
  6566. } else {
  6567. // #7138: IE10 & 11 fires input event when setting placeholder on
  6568. // <textarea>... block the first input event and remove the blocker
  6569. // immediately.
  6570. /* istanbul ignore if */
  6571. if (isIE && !isIE9 && el.tagName === 'TEXTAREA' && key === 'placeholder' && value !== '' && !el.__ieph) {
  6572. var blocker = function blocker(e) {
  6573. e.stopImmediatePropagation();
  6574. el.removeEventListener('input', blocker);
  6575. };
  6576. el.addEventListener('input', blocker); // $flow-disable-line
  6577. el.__ieph = true;
  6578. /* IE placeholder patched */
  6579. }
  6580. el.setAttribute(key, value);
  6581. }
  6582. }
  6583. var attrs = {
  6584. create: updateAttrs,
  6585. update: updateAttrs
  6586. };
  6587. /* */
  6588. function updateClass(oldVnode, vnode) {
  6589. var el = vnode.elm;
  6590. var data = vnode.data;
  6591. var oldData = oldVnode.data;
  6592. if (isUndef(data.staticClass) && isUndef(data.class) && (isUndef(oldData) || isUndef(oldData.staticClass) && isUndef(oldData.class)) && isUndef(el.__wxsAddClass) && isUndef(el.__wxsRemoveClass) // fixed by xxxxxx __wxsClass
  6593. ) {
  6594. return;
  6595. }
  6596. var cls = genClassForVnode(vnode); // handle transition classes
  6597. var transitionClass = el._transitionClasses;
  6598. if (isDef(transitionClass)) {
  6599. cls = concat(cls, stringifyClass(transitionClass));
  6600. } // fixed by xxxxxx __wxsClass
  6601. if (Array.isArray(el.__wxsRemoveClass) && el.__wxsRemoveClass.length) {
  6602. var clsArr = cls.split(/\s+/);
  6603. el.__wxsRemoveClass.forEach(function (removeCls) {
  6604. var clsIndex = clsArr.findIndex(function (cls) {
  6605. return cls === removeCls;
  6606. });
  6607. if (clsIndex !== -1) {
  6608. clsArr.splice(clsIndex, 1);
  6609. }
  6610. });
  6611. cls = clsArr.join(' ');
  6612. el.__wxsRemoveClass.length = 0;
  6613. }
  6614. if (el.__wxsAddClass) {
  6615. // 去重
  6616. var clsArr$1 = cls.split(/\s+/).concat(el.__wxsAddClass.split(/\s+/));
  6617. var clsObj = Object.create(null);
  6618. clsArr$1.forEach(function (cls) {
  6619. cls && (clsObj[cls] = 1);
  6620. });
  6621. cls = Object.keys(clsObj).join(' ');
  6622. } // fixed by xxxxxx (仅 h5 平台 extenalClasses)
  6623. var context = vnode.context;
  6624. var externalClasses = context.$options.mpOptions && context.$options.mpOptions.externalClasses;
  6625. if (Array.isArray(externalClasses)) {
  6626. externalClasses.forEach(function (externalClass) {
  6627. // 简单替换 externalClass
  6628. var externalClassValue = context[camelize(externalClass)];
  6629. externalClassValue && (cls = cls.replace(externalClass, externalClassValue));
  6630. });
  6631. } // set the class
  6632. if (cls !== el._prevClass) {
  6633. el.setAttribute('class', cls);
  6634. el._prevClass = cls;
  6635. }
  6636. }
  6637. var klass = {
  6638. create: updateClass,
  6639. update: updateClass
  6640. };
  6641. /* */
  6642. /* */
  6643. /* */
  6644. /* */
  6645. // in some cases, the event used has to be determined at runtime
  6646. // so we used some reserved tokens during compile.
  6647. var RANGE_TOKEN = '__r';
  6648. var CHECKBOX_RADIO_TOKEN = '__c';
  6649. /* */
  6650. // normalize v-model event tokens that can only be determined at runtime.
  6651. // it's important to place the event as the first in the array because
  6652. // the whole point is ensuring the v-model callback gets called before
  6653. // user-attached handlers.
  6654. function normalizeEvents(on) {
  6655. /* istanbul ignore if */
  6656. if (isDef(on[RANGE_TOKEN])) {
  6657. // IE input[type=range] only supports `change` event
  6658. var event = isIE ? 'change' : 'input';
  6659. on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);
  6660. delete on[RANGE_TOKEN];
  6661. } // This was originally intended to fix #4521 but no longer necessary
  6662. // after 2.5. Keeping it for backwards compat with generated code from < 2.4
  6663. /* istanbul ignore if */
  6664. if (isDef(on[CHECKBOX_RADIO_TOKEN])) {
  6665. on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);
  6666. delete on[CHECKBOX_RADIO_TOKEN];
  6667. }
  6668. }
  6669. var target$1;
  6670. function createOnceHandler$1(event, handler, capture) {
  6671. var _target = target$1; // save current target element in closure
  6672. return function onceHandler() {
  6673. var res = handler.apply(null, arguments);
  6674. if (res !== null) {
  6675. remove$2(event, onceHandler, capture, _target);
  6676. }
  6677. };
  6678. } // #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp
  6679. // implementation and does not fire microtasks in between event propagation, so
  6680. // safe to exclude.
  6681. var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);
  6682. function add$1(name, handler, capture, passive) {
  6683. // async edge case #6566: inner click event triggers patch, event handler
  6684. // attached to outer element during patch, and triggered again. This
  6685. // happens because browsers fire microtask ticks between event propagation.
  6686. // the solution is simple: we save the timestamp when a handler is attached,
  6687. // and the handler would only fire if the event passed to it was fired
  6688. // AFTER it was attached.
  6689. if (useMicrotaskFix) {
  6690. var attachedTimestamp = currentFlushTimestamp;
  6691. var original = handler;
  6692. handler = original._wrapper = function (e) {
  6693. if ( // no bubbling, should always fire.
  6694. // this is just a safety net in case event.timeStamp is unreliable in
  6695. // certain weird environments...
  6696. e.target === e.currentTarget || // event is fired after handler attachment
  6697. e.timeStamp >= attachedTimestamp || // bail for environments that have buggy event.timeStamp implementations
  6698. // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
  6699. // #9681 QtWebEngine event.timeStamp is negative value
  6700. e.timeStamp <= 0 || // #9448 bail if event is fired in another document in a multi-page
  6701. // electron/nw.js app, since event.timeStamp will be using a different
  6702. // starting reference
  6703. e.target.ownerDocument !== document) {
  6704. return original.apply(this, arguments);
  6705. }
  6706. };
  6707. }
  6708. target$1.addEventListener(name, handler, supportsPassive ? {
  6709. capture: capture,
  6710. passive: passive
  6711. } : capture);
  6712. }
  6713. function remove$2(name, handler, capture, _target) {
  6714. (_target || target$1).removeEventListener(name, handler._wrapper || handler, capture);
  6715. }
  6716. function updateDOMListeners(oldVnode, vnode) {
  6717. if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
  6718. return;
  6719. }
  6720. var on = vnode.data.on || {};
  6721. var oldOn = oldVnode.data.on || {};
  6722. target$1 = vnode.elm;
  6723. normalizeEvents(on);
  6724. updateListeners(on, oldOn, add$1, remove$2, createOnceHandler$1, vnode.context);
  6725. target$1 = undefined;
  6726. }
  6727. var events = {
  6728. create: updateDOMListeners,
  6729. update: updateDOMListeners
  6730. };
  6731. /* */
  6732. var svgContainer;
  6733. function updateDOMProps(oldVnode, vnode) {
  6734. if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
  6735. return;
  6736. }
  6737. var key, cur;
  6738. var elm = vnode.elm;
  6739. var oldProps = oldVnode.data.domProps || {};
  6740. var props = vnode.data.domProps || {}; // clone observed objects, as the user probably wants to mutate it
  6741. if (isDef(props.__ob__)) {
  6742. props = vnode.data.domProps = extend({}, props);
  6743. }
  6744. for (key in oldProps) {
  6745. if (!(key in props)) {
  6746. elm[key] = '';
  6747. }
  6748. }
  6749. for (key in props) {
  6750. cur = props[key]; // ignore children if the node has textContent or innerHTML,
  6751. // as these will throw away existing DOM nodes and cause removal errors
  6752. // on subsequent patches (#3360)
  6753. if (key === 'textContent' || key === 'innerHTML') {
  6754. if (vnode.children) {
  6755. vnode.children.length = 0;
  6756. }
  6757. if (cur === oldProps[key]) {
  6758. continue;
  6759. } // #6601 work around Chrome version <= 55 bug where single textNode
  6760. // replaced by innerHTML/textContent retains its parentNode property
  6761. if (elm.childNodes.length === 1) {
  6762. elm.removeChild(elm.childNodes[0]);
  6763. }
  6764. }
  6765. if (key === 'value' && elm.tagName !== 'PROGRESS') {
  6766. // store value as _value as well since
  6767. // non-string values will be stringified
  6768. elm._value = cur; // avoid resetting cursor position when value is the same
  6769. var strCur = isUndef(cur) ? '' : String(cur);
  6770. if (shouldUpdateValue(elm, strCur)) {
  6771. elm.value = strCur;
  6772. }
  6773. } else if (key === 'innerHTML' && isSVG(elm.tagName) && isUndef(elm.innerHTML)) {
  6774. // IE doesn't support innerHTML for SVG elements
  6775. svgContainer = svgContainer || document.createElement('div');
  6776. svgContainer.innerHTML = "<svg>" + cur + "</svg>";
  6777. var svg = svgContainer.firstChild;
  6778. while (elm.firstChild) {
  6779. elm.removeChild(elm.firstChild);
  6780. }
  6781. while (svg.firstChild) {
  6782. elm.appendChild(svg.firstChild);
  6783. }
  6784. } else if ( // skip the update if old and new VDOM state is the same.
  6785. // `value` is handled separately because the DOM value may be temporarily
  6786. // out of sync with VDOM state due to focus, composition and modifiers.
  6787. // This #4521 by skipping the unnecesarry `checked` update.
  6788. cur !== oldProps[key]) {
  6789. // some property updates can throw
  6790. // e.g. `value` on <progress> w/ non-finite value
  6791. try {
  6792. elm[key] = cur;
  6793. } catch (e) {}
  6794. }
  6795. }
  6796. } // check platforms/web/util/attrs.js acceptValue
  6797. function shouldUpdateValue(elm, checkVal) {
  6798. return !elm.composing && (elm.tagName === 'OPTION' || isNotInFocusAndDirty(elm, checkVal) || isDirtyWithModifiers(elm, checkVal));
  6799. }
  6800. function isNotInFocusAndDirty(elm, checkVal) {
  6801. // return true when textbox (.number and .trim) loses focus and its value is
  6802. // not equal to the updated value
  6803. var notInFocus = true; // #6157
  6804. // work around IE bug when accessing document.activeElement in an iframe
  6805. try {
  6806. notInFocus = document.activeElement !== elm;
  6807. } catch (e) {}
  6808. return notInFocus && elm.value !== checkVal;
  6809. }
  6810. function isDirtyWithModifiers(elm, newVal) {
  6811. var value = elm.value;
  6812. var modifiers = elm._vModifiers; // injected by v-model runtime
  6813. if (isDef(modifiers)) {
  6814. if (modifiers.number) {
  6815. return toNumber(value) !== toNumber(newVal);
  6816. }
  6817. if (modifiers.trim) {
  6818. return value.trim() !== newVal.trim();
  6819. }
  6820. }
  6821. return value !== newVal;
  6822. }
  6823. var domProps = {
  6824. create: updateDOMProps,
  6825. update: updateDOMProps
  6826. };
  6827. /* */
  6828. var parseStyleText = cached(function (cssText) {
  6829. var res = {};
  6830. var listDelimiter = /;(?![^(]*\))/g;
  6831. var propertyDelimiter = /:(.+)/;
  6832. cssText.split(listDelimiter).forEach(function (item) {
  6833. if (item) {
  6834. var tmp = item.split(propertyDelimiter);
  6835. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  6836. }
  6837. });
  6838. return res;
  6839. }); // merge static and dynamic style data on the same vnode
  6840. function normalizeStyleData(data) {
  6841. var style = normalizeStyleBinding(data.style); // static style is pre-processed into an object during compilation
  6842. // and is always a fresh object, so it's safe to merge into it
  6843. return data.staticStyle ? extend(data.staticStyle, style) : style;
  6844. } // normalize possible array / string values into Object
  6845. function normalizeStyleBinding(bindingStyle) {
  6846. if (Array.isArray(bindingStyle)) {
  6847. return toObject(bindingStyle);
  6848. }
  6849. if (typeof bindingStyle === 'string') {
  6850. return parseStyleText(bindingStyle);
  6851. }
  6852. return bindingStyle;
  6853. }
  6854. /**
  6855. * parent component style should be after child's
  6856. * so that parent component's style could override it
  6857. */
  6858. function getStyle(vnode, checkChild) {
  6859. var res = {};
  6860. var styleData;
  6861. if (checkChild) {
  6862. var childNode = vnode;
  6863. while (childNode.componentInstance) {
  6864. childNode = childNode.componentInstance._vnode;
  6865. if (childNode && childNode.data && (styleData = normalizeStyleData(childNode.data))) {
  6866. extend(res, styleData);
  6867. }
  6868. }
  6869. }
  6870. if (styleData = normalizeStyleData(vnode.data)) {
  6871. extend(res, styleData);
  6872. }
  6873. var parentNode = vnode;
  6874. while (parentNode = parentNode.parent) {
  6875. if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
  6876. extend(res, styleData);
  6877. }
  6878. }
  6879. return res;
  6880. }
  6881. /* */
  6882. var cssVarRE = /^--/;
  6883. var importantRE = /\s*!important$/; // upx,rpx 正则匹配
  6884. var unitRE = /([+-]?\d+(\.\d+)?)[r|u]px/g;
  6885. var transformUnit = function transformUnit(val) {
  6886. if (typeof val === 'string') {
  6887. return val.replace(unitRE, function (a, b) {
  6888. /* eslint-disable no-undef */
  6889. return uni.upx2px(b) + 'px';
  6890. });
  6891. }
  6892. return val;
  6893. };
  6894. var urlRE = /url\(\s*'?"?([a-zA-Z0-9\.\-\_\/]+\.(jpg|gif|png))"?'?\s*\)/;
  6895. var transformUrl = function transformUrl(val, ctx) {
  6896. if (typeof val === 'string' && val.indexOf('url(') !== -1) {
  6897. var matches = val.match(urlRE);
  6898. if (matches && matches.length === 3) {
  6899. val = val.replace(matches[1], ctx._$getRealPath(matches[1]));
  6900. }
  6901. }
  6902. return val;
  6903. };
  6904. var setProp = function setProp(el, name, val, ctx) {
  6905. if (ctx && ctx._$getRealPath && val) {
  6906. val = transformUrl(val, ctx);
  6907. }
  6908. /* istanbul ignore if */
  6909. if (cssVarRE.test(name)) {
  6910. el.style.setProperty(name, val);
  6911. } else if (importantRE.test(val)) {
  6912. el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');
  6913. } else {
  6914. var normalizedName = normalize(name);
  6915. if (Array.isArray(val)) {
  6916. // Support values array created by autoprefixer, e.g.
  6917. // {display: ["-webkit-box", "-ms-flexbox", "flex"]}
  6918. // Set them one by one, and the browser will only set those it can recognize
  6919. for (var i = 0, len = val.length; i < len; i++) {
  6920. el.style[normalizedName] = transformUnit(val[i]);
  6921. }
  6922. } else {
  6923. el.style[normalizedName] = transformUnit(val);
  6924. }
  6925. }
  6926. };
  6927. var vendorNames = ['Webkit', 'Moz', 'ms'];
  6928. var emptyStyle;
  6929. var normalize = cached(function (prop) {
  6930. emptyStyle = emptyStyle || document.createElement('div').style;
  6931. prop = camelize(prop);
  6932. if (prop !== 'filter' && prop in emptyStyle) {
  6933. return prop;
  6934. }
  6935. var capName = prop.charAt(0).toUpperCase() + prop.slice(1);
  6936. for (var i = 0; i < vendorNames.length; i++) {
  6937. var name = vendorNames[i] + capName;
  6938. if (name in emptyStyle) {
  6939. return name;
  6940. }
  6941. }
  6942. });
  6943. function updateStyle(oldVnode, vnode) {
  6944. var data = vnode.data;
  6945. var oldData = oldVnode.data;
  6946. var el = vnode.elm;
  6947. if (isUndef(data.staticStyle) && isUndef(data.style) && isUndef(oldData.staticStyle) && isUndef(oldData.style) && isUndef(el.__wxsStyle) // fixed by xxxxxx __wxsStyle
  6948. ) {
  6949. return;
  6950. }
  6951. var cur, name;
  6952. var oldStaticStyle = oldData.staticStyle;
  6953. var oldStyleBinding = oldData.normalizedStyle || oldData.style || {}; // if static style exists, stylebinding already merged into it when doing normalizeStyleData
  6954. var oldStyle = oldStaticStyle || oldStyleBinding;
  6955. var style = normalizeStyleBinding(vnode.data.style) || {}; // store normalized style under a different key for next diff
  6956. // make sure to clone it if it's reactive, since the user likely wants
  6957. // to mutate it.
  6958. vnode.data.normalizedStyle = isDef(style.__ob__) ? extend({}, style) : style;
  6959. var newStyle = getStyle(vnode, true); // fixed by xxxxxx __wxsStyle
  6960. if (el.__wxsStyle) {
  6961. Object.assign(vnode.data.normalizedStyle, el.__wxsStyle);
  6962. Object.assign(newStyle, el.__wxsStyle);
  6963. }
  6964. for (name in oldStyle) {
  6965. if (isUndef(newStyle[name])) {
  6966. setProp(el, name, '');
  6967. }
  6968. }
  6969. for (name in newStyle) {
  6970. cur = newStyle[name];
  6971. if (cur !== oldStyle[name]) {
  6972. // ie9 setting to null has no effect, must use empty string
  6973. setProp(el, name, cur == null ? '' : cur, vnode.context);
  6974. }
  6975. }
  6976. }
  6977. var style = {
  6978. create: updateStyle,
  6979. update: updateStyle
  6980. };
  6981. /* */
  6982. var whitespaceRE = /\s+/;
  6983. /**
  6984. * Add class with compatibility for SVG since classList is not supported on
  6985. * SVG elements in IE
  6986. */
  6987. function addClass(el, cls) {
  6988. /* istanbul ignore if */
  6989. if (!cls || !(cls = cls.trim())) {
  6990. return;
  6991. }
  6992. /* istanbul ignore else */
  6993. if (el.classList) {
  6994. if (cls.indexOf(' ') > -1) {
  6995. cls.split(whitespaceRE).forEach(function (c) {
  6996. return el.classList.add(c);
  6997. });
  6998. } else {
  6999. el.classList.add(cls);
  7000. }
  7001. } else {
  7002. var cur = " " + (el.getAttribute('class') || '') + " ";
  7003. if (cur.indexOf(' ' + cls + ' ') < 0) {
  7004. el.setAttribute('class', (cur + cls).trim());
  7005. }
  7006. }
  7007. }
  7008. /**
  7009. * Remove class with compatibility for SVG since classList is not supported on
  7010. * SVG elements in IE
  7011. */
  7012. function removeClass(el, cls) {
  7013. /* istanbul ignore if */
  7014. if (!cls || !(cls = cls.trim())) {
  7015. return;
  7016. }
  7017. /* istanbul ignore else */
  7018. if (el.classList) {
  7019. if (cls.indexOf(' ') > -1) {
  7020. cls.split(whitespaceRE).forEach(function (c) {
  7021. return el.classList.remove(c);
  7022. });
  7023. } else {
  7024. el.classList.remove(cls);
  7025. }
  7026. if (!el.classList.length) {
  7027. el.removeAttribute('class');
  7028. }
  7029. } else {
  7030. var cur = " " + (el.getAttribute('class') || '') + " ";
  7031. var tar = ' ' + cls + ' ';
  7032. while (cur.indexOf(tar) >= 0) {
  7033. cur = cur.replace(tar, ' ');
  7034. }
  7035. cur = cur.trim();
  7036. if (cur) {
  7037. el.setAttribute('class', cur);
  7038. } else {
  7039. el.removeAttribute('class');
  7040. }
  7041. }
  7042. }
  7043. /* */
  7044. function resolveTransition(def$$1) {
  7045. if (!def$$1) {
  7046. return;
  7047. }
  7048. /* istanbul ignore else */
  7049. if (_typeof(def$$1) === 'object') {
  7050. var res = {};
  7051. if (def$$1.css !== false) {
  7052. extend(res, autoCssTransition(def$$1.name || 'v'));
  7053. }
  7054. extend(res, def$$1);
  7055. return res;
  7056. } else if (typeof def$$1 === 'string') {
  7057. return autoCssTransition(def$$1);
  7058. }
  7059. }
  7060. var autoCssTransition = cached(function (name) {
  7061. return {
  7062. enterClass: name + "-enter",
  7063. enterToClass: name + "-enter-to",
  7064. enterActiveClass: name + "-enter-active",
  7065. leaveClass: name + "-leave",
  7066. leaveToClass: name + "-leave-to",
  7067. leaveActiveClass: name + "-leave-active"
  7068. };
  7069. });
  7070. var hasTransition = inBrowser && !isIE9;
  7071. var TRANSITION = 'transition';
  7072. var ANIMATION = 'animation'; // Transition property/event sniffing
  7073. var transitionProp = 'transition';
  7074. var transitionEndEvent = 'transitionend';
  7075. var animationProp = 'animation';
  7076. var animationEndEvent = 'animationend';
  7077. if (hasTransition) {
  7078. /* istanbul ignore if */
  7079. if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) {
  7080. transitionProp = 'WebkitTransition';
  7081. transitionEndEvent = 'webkitTransitionEnd';
  7082. }
  7083. if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) {
  7084. animationProp = 'WebkitAnimation';
  7085. animationEndEvent = 'webkitAnimationEnd';
  7086. }
  7087. } // binding to window is necessary to make hot reload work in IE in strict mode
  7088. var raf = inBrowser ? window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout :
  7089. /* istanbul ignore next */
  7090. function (fn) {
  7091. return fn();
  7092. };
  7093. function nextFrame(fn) {
  7094. raf(function () {
  7095. raf(fn);
  7096. });
  7097. }
  7098. function addTransitionClass(el, cls) {
  7099. var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
  7100. if (transitionClasses.indexOf(cls) < 0) {
  7101. transitionClasses.push(cls);
  7102. addClass(el, cls);
  7103. }
  7104. }
  7105. function removeTransitionClass(el, cls) {
  7106. if (el._transitionClasses) {
  7107. remove(el._transitionClasses, cls);
  7108. }
  7109. removeClass(el, cls);
  7110. }
  7111. function whenTransitionEnds(el, expectedType, cb) {
  7112. var ref = getTransitionInfo(el, expectedType);
  7113. var type = ref.type;
  7114. var timeout = ref.timeout;
  7115. var propCount = ref.propCount;
  7116. if (!type) {
  7117. return cb();
  7118. }
  7119. var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
  7120. var ended = 0;
  7121. var end = function end() {
  7122. el.removeEventListener(event, onEnd);
  7123. cb();
  7124. };
  7125. var onEnd = function onEnd(e) {
  7126. if (e.target === el) {
  7127. if (++ended >= propCount) {
  7128. end();
  7129. }
  7130. }
  7131. };
  7132. setTimeout(function () {
  7133. if (ended < propCount) {
  7134. end();
  7135. }
  7136. }, timeout + 1);
  7137. el.addEventListener(event, onEnd);
  7138. }
  7139. var transformRE = /\b(transform|all)(,|$)/;
  7140. function getTransitionInfo(el, expectedType) {
  7141. var styles = window.getComputedStyle(el); // JSDOM may return undefined for transition properties
  7142. var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');
  7143. var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');
  7144. var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  7145. var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');
  7146. var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');
  7147. var animationTimeout = getTimeout(animationDelays, animationDurations);
  7148. var type;
  7149. var timeout = 0;
  7150. var propCount = 0;
  7151. /* istanbul ignore if */
  7152. if (expectedType === TRANSITION) {
  7153. if (transitionTimeout > 0) {
  7154. type = TRANSITION;
  7155. timeout = transitionTimeout;
  7156. propCount = transitionDurations.length;
  7157. }
  7158. } else if (expectedType === ANIMATION) {
  7159. if (animationTimeout > 0) {
  7160. type = ANIMATION;
  7161. timeout = animationTimeout;
  7162. propCount = animationDurations.length;
  7163. }
  7164. } else {
  7165. timeout = Math.max(transitionTimeout, animationTimeout);
  7166. type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
  7167. propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
  7168. }
  7169. var hasTransform = type === TRANSITION && transformRE.test(styles[transitionProp + 'Property']);
  7170. return {
  7171. type: type,
  7172. timeout: timeout,
  7173. propCount: propCount,
  7174. hasTransform: hasTransform
  7175. };
  7176. }
  7177. function getTimeout(delays, durations) {
  7178. /* istanbul ignore next */
  7179. while (delays.length < durations.length) {
  7180. delays = delays.concat(delays);
  7181. }
  7182. return Math.max.apply(null, durations.map(function (d, i) {
  7183. return toMs(d) + toMs(delays[i]);
  7184. }));
  7185. } // Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers
  7186. // in a locale-dependent way, using a comma instead of a dot.
  7187. // If comma is not replaced with a dot, the input will be rounded down (i.e. acting
  7188. // as a floor function) causing unexpected behaviors
  7189. function toMs(s) {
  7190. return Number(s.slice(0, -1).replace(',', '.')) * 1000;
  7191. }
  7192. /* */
  7193. function enter(vnode, toggleDisplay) {
  7194. var el = vnode.elm; // call leave callback now
  7195. if (isDef(el._leaveCb)) {
  7196. el._leaveCb.cancelled = true;
  7197. el._leaveCb();
  7198. }
  7199. var data = resolveTransition(vnode.data.transition);
  7200. if (isUndef(data)) {
  7201. return;
  7202. }
  7203. /* istanbul ignore if */
  7204. if (isDef(el._enterCb) || el.nodeType !== 1) {
  7205. return;
  7206. }
  7207. var css = data.css;
  7208. var type = data.type;
  7209. var enterClass = data.enterClass;
  7210. var enterToClass = data.enterToClass;
  7211. var enterActiveClass = data.enterActiveClass;
  7212. var appearClass = data.appearClass;
  7213. var appearToClass = data.appearToClass;
  7214. var appearActiveClass = data.appearActiveClass;
  7215. var beforeEnter = data.beforeEnter;
  7216. var enter = data.enter;
  7217. var afterEnter = data.afterEnter;
  7218. var enterCancelled = data.enterCancelled;
  7219. var beforeAppear = data.beforeAppear;
  7220. var appear = data.appear;
  7221. var afterAppear = data.afterAppear;
  7222. var appearCancelled = data.appearCancelled;
  7223. var duration = data.duration; // activeInstance will always be the <transition> component managing this
  7224. // transition. One edge case to check is when the <transition> is placed
  7225. // as the root node of a child component. In that case we need to check
  7226. // <transition>'s parent for appear check.
  7227. var context = activeInstance;
  7228. var transitionNode = activeInstance.$vnode;
  7229. while (transitionNode && transitionNode.parent) {
  7230. context = transitionNode.context;
  7231. transitionNode = transitionNode.parent;
  7232. }
  7233. var isAppear = !context._isMounted || !vnode.isRootInsert;
  7234. if (isAppear && !appear && appear !== '') {
  7235. return;
  7236. }
  7237. var startClass = isAppear && appearClass ? appearClass : enterClass;
  7238. var activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;
  7239. var toClass = isAppear && appearToClass ? appearToClass : enterToClass;
  7240. var beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;
  7241. var enterHook = isAppear ? typeof appear === 'function' ? appear : enter : enter;
  7242. var afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;
  7243. var enterCancelledHook = isAppear ? appearCancelled || enterCancelled : enterCancelled;
  7244. var explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);
  7245. if ( true && explicitEnterDuration != null) {
  7246. checkDuration(explicitEnterDuration, 'enter', vnode);
  7247. }
  7248. var expectsCSS = css !== false && !isIE9;
  7249. var userWantsControl = getHookArgumentsLength(enterHook);
  7250. var cb = el._enterCb = once(function () {
  7251. if (expectsCSS) {
  7252. removeTransitionClass(el, toClass);
  7253. removeTransitionClass(el, activeClass);
  7254. }
  7255. if (cb.cancelled) {
  7256. if (expectsCSS) {
  7257. removeTransitionClass(el, startClass);
  7258. }
  7259. enterCancelledHook && enterCancelledHook(el);
  7260. } else {
  7261. afterEnterHook && afterEnterHook(el);
  7262. }
  7263. el._enterCb = null;
  7264. });
  7265. if (!vnode.data.show) {
  7266. // remove pending leave element on enter by injecting an insert hook
  7267. mergeVNodeHook(vnode, 'insert', function () {
  7268. var parent = el.parentNode;
  7269. var pendingNode = parent && parent._pending && parent._pending[vnode.key];
  7270. if (pendingNode && pendingNode.tag === vnode.tag && pendingNode.elm._leaveCb) {
  7271. pendingNode.elm._leaveCb();
  7272. }
  7273. enterHook && enterHook(el, cb);
  7274. });
  7275. } // start enter transition
  7276. beforeEnterHook && beforeEnterHook(el);
  7277. if (expectsCSS) {
  7278. addTransitionClass(el, startClass);
  7279. addTransitionClass(el, activeClass);
  7280. nextFrame(function () {
  7281. removeTransitionClass(el, startClass);
  7282. if (!cb.cancelled) {
  7283. addTransitionClass(el, toClass);
  7284. if (!userWantsControl) {
  7285. if (isValidDuration(explicitEnterDuration)) {
  7286. setTimeout(cb, explicitEnterDuration);
  7287. } else {
  7288. whenTransitionEnds(el, type, cb);
  7289. }
  7290. }
  7291. }
  7292. });
  7293. }
  7294. if (vnode.data.show) {
  7295. toggleDisplay && toggleDisplay();
  7296. enterHook && enterHook(el, cb);
  7297. }
  7298. if (!expectsCSS && !userWantsControl) {
  7299. cb();
  7300. }
  7301. }
  7302. function leave(vnode, rm) {
  7303. var el = vnode.elm; // call enter callback now
  7304. if (isDef(el._enterCb)) {
  7305. el._enterCb.cancelled = true;
  7306. el._enterCb();
  7307. }
  7308. var data = resolveTransition(vnode.data.transition);
  7309. if (isUndef(data) || el.nodeType !== 1) {
  7310. return rm();
  7311. }
  7312. /* istanbul ignore if */
  7313. if (isDef(el._leaveCb)) {
  7314. return;
  7315. }
  7316. var css = data.css;
  7317. var type = data.type;
  7318. var leaveClass = data.leaveClass;
  7319. var leaveToClass = data.leaveToClass;
  7320. var leaveActiveClass = data.leaveActiveClass;
  7321. var beforeLeave = data.beforeLeave;
  7322. var leave = data.leave;
  7323. var afterLeave = data.afterLeave;
  7324. var leaveCancelled = data.leaveCancelled;
  7325. var delayLeave = data.delayLeave;
  7326. var duration = data.duration;
  7327. var expectsCSS = css !== false && !isIE9;
  7328. var userWantsControl = getHookArgumentsLength(leave);
  7329. var explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);
  7330. if ( true && isDef(explicitLeaveDuration)) {
  7331. checkDuration(explicitLeaveDuration, 'leave', vnode);
  7332. }
  7333. var cb = el._leaveCb = once(function () {
  7334. if (el.parentNode && el.parentNode._pending) {
  7335. el.parentNode._pending[vnode.key] = null;
  7336. }
  7337. if (expectsCSS) {
  7338. removeTransitionClass(el, leaveToClass);
  7339. removeTransitionClass(el, leaveActiveClass);
  7340. }
  7341. if (cb.cancelled) {
  7342. if (expectsCSS) {
  7343. removeTransitionClass(el, leaveClass);
  7344. }
  7345. leaveCancelled && leaveCancelled(el);
  7346. } else {
  7347. rm();
  7348. afterLeave && afterLeave(el);
  7349. }
  7350. el._leaveCb = null;
  7351. });
  7352. if (delayLeave) {
  7353. delayLeave(performLeave);
  7354. } else {
  7355. performLeave();
  7356. }
  7357. function performLeave() {
  7358. // the delayed leave may have already been cancelled
  7359. if (cb.cancelled) {
  7360. return;
  7361. } // record leaving element
  7362. if (!vnode.data.show && el.parentNode) {
  7363. (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;
  7364. }
  7365. beforeLeave && beforeLeave(el);
  7366. if (expectsCSS) {
  7367. addTransitionClass(el, leaveClass);
  7368. addTransitionClass(el, leaveActiveClass);
  7369. nextFrame(function () {
  7370. removeTransitionClass(el, leaveClass);
  7371. if (!cb.cancelled) {
  7372. addTransitionClass(el, leaveToClass);
  7373. if (!userWantsControl) {
  7374. if (isValidDuration(explicitLeaveDuration)) {
  7375. setTimeout(cb, explicitLeaveDuration);
  7376. } else {
  7377. whenTransitionEnds(el, type, cb);
  7378. }
  7379. }
  7380. }
  7381. });
  7382. }
  7383. leave && leave(el, cb);
  7384. if (!expectsCSS && !userWantsControl) {
  7385. cb();
  7386. }
  7387. }
  7388. } // only used in dev mode
  7389. function checkDuration(val, name, vnode) {
  7390. if (typeof val !== 'number') {
  7391. warn("<transition> explicit " + name + " duration is not a valid number - " + "got " + JSON.stringify(val) + ".", vnode.context);
  7392. } else if (isNaN(val)) {
  7393. warn("<transition> explicit " + name + " duration is NaN - " + 'the duration expression might be incorrect.', vnode.context);
  7394. }
  7395. }
  7396. function isValidDuration(val) {
  7397. return typeof val === 'number' && !isNaN(val);
  7398. }
  7399. /**
  7400. * Normalize a transition hook's argument length. The hook may be:
  7401. * - a merged hook (invoker) with the original in .fns
  7402. * - a wrapped component method (check ._length)
  7403. * - a plain function (.length)
  7404. */
  7405. function getHookArgumentsLength(fn) {
  7406. if (isUndef(fn)) {
  7407. return false;
  7408. }
  7409. var invokerFns = fn.fns;
  7410. if (isDef(invokerFns)) {
  7411. // invoker
  7412. return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);
  7413. } else {
  7414. return (fn._length || fn.length) > 1;
  7415. }
  7416. }
  7417. function _enter(_, vnode) {
  7418. if (vnode.data.show !== true) {
  7419. enter(vnode);
  7420. }
  7421. }
  7422. var transition = inBrowser ? {
  7423. create: _enter,
  7424. activate: _enter,
  7425. remove: function remove$$1(vnode, rm) {
  7426. /* istanbul ignore else */
  7427. if (vnode.data.show !== true) {
  7428. leave(vnode, rm);
  7429. } else {
  7430. rm();
  7431. }
  7432. }
  7433. } : {};
  7434. var platformModules = [wxs, // fixed by xxxxxx wxs props
  7435. attrs, klass, events, domProps, style, transition];
  7436. /* */
  7437. // the directive module should be applied last, after all
  7438. // built-in modules have been applied.
  7439. var modules = platformModules.concat(baseModules);
  7440. var patch = createPatchFunction({
  7441. nodeOps: nodeOps,
  7442. modules: modules
  7443. });
  7444. /**
  7445. * Not type checking this file because flow doesn't like attaching
  7446. * properties to Elements.
  7447. */
  7448. /* istanbul ignore if */
  7449. if (isIE9) {
  7450. // http://www.matts411.com/post/internet-explorer-9-oninput/
  7451. document.addEventListener('selectionchange', function () {
  7452. var el = document.activeElement;
  7453. if (el && el.vmodel) {
  7454. trigger(el, 'input');
  7455. }
  7456. });
  7457. }
  7458. var directive = {
  7459. inserted: function inserted(el, binding, vnode, oldVnode) {
  7460. if (vnode.tag === 'select') {
  7461. // #6903
  7462. if (oldVnode.elm && !oldVnode.elm._vOptions) {
  7463. mergeVNodeHook(vnode, 'postpatch', function () {
  7464. directive.componentUpdated(el, binding, vnode);
  7465. });
  7466. } else {
  7467. setSelected(el, binding, vnode.context);
  7468. }
  7469. el._vOptions = [].map.call(el.options, getValue);
  7470. } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
  7471. el._vModifiers = binding.modifiers;
  7472. if (!binding.modifiers.lazy) {
  7473. el.addEventListener('compositionstart', onCompositionStart);
  7474. el.addEventListener('compositionend', onCompositionEnd); // Safari < 10.2 & UIWebView doesn't fire compositionend when
  7475. // switching focus before confirming composition choice
  7476. // this also fixes the issue where some browsers e.g. iOS Chrome
  7477. // fires "change" instead of "input" on autocomplete.
  7478. el.addEventListener('change', onCompositionEnd);
  7479. /* istanbul ignore if */
  7480. if (isIE9) {
  7481. el.vmodel = true;
  7482. }
  7483. }
  7484. }
  7485. },
  7486. componentUpdated: function componentUpdated(el, binding, vnode) {
  7487. if (vnode.tag === 'select') {
  7488. setSelected(el, binding, vnode.context); // in case the options rendered by v-for have changed,
  7489. // it's possible that the value is out-of-sync with the rendered options.
  7490. // detect such cases and filter out values that no longer has a matching
  7491. // option in the DOM.
  7492. var prevOptions = el._vOptions;
  7493. var curOptions = el._vOptions = [].map.call(el.options, getValue);
  7494. if (curOptions.some(function (o, i) {
  7495. return !looseEqual(o, prevOptions[i]);
  7496. })) {
  7497. // trigger change event if
  7498. // no matching option found for at least one value
  7499. var needReset = el.multiple ? binding.value.some(function (v) {
  7500. return hasNoMatchingOption(v, curOptions);
  7501. }) : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions);
  7502. if (needReset) {
  7503. trigger(el, 'change');
  7504. }
  7505. }
  7506. }
  7507. }
  7508. };
  7509. function setSelected(el, binding, vm) {
  7510. actuallySetSelected(el, binding, vm);
  7511. /* istanbul ignore if */
  7512. if (isIE || isEdge) {
  7513. setTimeout(function () {
  7514. actuallySetSelected(el, binding, vm);
  7515. }, 0);
  7516. }
  7517. }
  7518. function actuallySetSelected(el, binding, vm) {
  7519. var value = binding.value;
  7520. var isMultiple = el.multiple;
  7521. if (isMultiple && !Array.isArray(value)) {
  7522. true && warn("<select multiple v-model=\"" + binding.expression + "\"> " + "expects an Array value for its binding, but got " + Object.prototype.toString.call(value).slice(8, -1), vm);
  7523. return;
  7524. }
  7525. var selected, option;
  7526. for (var i = 0, l = el.options.length; i < l; i++) {
  7527. option = el.options[i];
  7528. if (isMultiple) {
  7529. selected = looseIndexOf(value, getValue(option)) > -1;
  7530. if (option.selected !== selected) {
  7531. option.selected = selected;
  7532. }
  7533. } else {
  7534. if (looseEqual(getValue(option), value)) {
  7535. if (el.selectedIndex !== i) {
  7536. el.selectedIndex = i;
  7537. }
  7538. return;
  7539. }
  7540. }
  7541. }
  7542. if (!isMultiple) {
  7543. el.selectedIndex = -1;
  7544. }
  7545. }
  7546. function hasNoMatchingOption(value, options) {
  7547. return options.every(function (o) {
  7548. return !looseEqual(o, value);
  7549. });
  7550. }
  7551. function getValue(option) {
  7552. return '_value' in option ? option._value : option.value;
  7553. }
  7554. function onCompositionStart(e) {
  7555. e.target.composing = true;
  7556. }
  7557. function onCompositionEnd(e) {
  7558. // prevent triggering an input event for no reason
  7559. if (!e.target.composing) {
  7560. return;
  7561. }
  7562. e.target.composing = false;
  7563. trigger(e.target, 'input');
  7564. }
  7565. function trigger(el, type) {
  7566. var e = document.createEvent('HTMLEvents');
  7567. e.initEvent(type, true, true);
  7568. el.dispatchEvent(e);
  7569. }
  7570. /* */
  7571. // recursively search for possible transition defined inside the component root
  7572. function locateNode(vnode) {
  7573. return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;
  7574. }
  7575. var show = {
  7576. bind: function bind(el, ref, vnode) {
  7577. var value = ref.value;
  7578. vnode = locateNode(vnode);
  7579. var transition$$1 = vnode.data && vnode.data.transition;
  7580. var originalDisplay = el.__vOriginalDisplay = el.style.display === 'none' ? '' : el.style.display;
  7581. if (value && transition$$1) {
  7582. vnode.data.show = true;
  7583. enter(vnode, function () {
  7584. el.style.display = originalDisplay;
  7585. });
  7586. } else {
  7587. el.style.display = value ? originalDisplay : 'none';
  7588. }
  7589. },
  7590. update: function update(el, ref, vnode) {
  7591. var value = ref.value;
  7592. var oldValue = ref.oldValue;
  7593. /* istanbul ignore if */
  7594. if (!value === !oldValue) {
  7595. return;
  7596. }
  7597. vnode = locateNode(vnode);
  7598. var transition$$1 = vnode.data && vnode.data.transition;
  7599. if (transition$$1) {
  7600. vnode.data.show = true;
  7601. if (value) {
  7602. enter(vnode, function () {
  7603. el.style.display = el.__vOriginalDisplay;
  7604. });
  7605. } else {
  7606. leave(vnode, function () {
  7607. el.style.display = 'none';
  7608. });
  7609. }
  7610. } else {
  7611. el.style.display = value ? el.__vOriginalDisplay : 'none';
  7612. }
  7613. },
  7614. unbind: function unbind(el, binding, vnode, oldVnode, isDestroy) {
  7615. if (!isDestroy) {
  7616. el.style.display = el.__vOriginalDisplay;
  7617. }
  7618. }
  7619. };
  7620. var platformDirectives = {
  7621. model: directive,
  7622. show: show
  7623. };
  7624. /* */
  7625. var transitionProps = {
  7626. name: String,
  7627. appear: Boolean,
  7628. css: Boolean,
  7629. mode: String,
  7630. type: String,
  7631. enterClass: String,
  7632. leaveClass: String,
  7633. enterToClass: String,
  7634. leaveToClass: String,
  7635. enterActiveClass: String,
  7636. leaveActiveClass: String,
  7637. appearClass: String,
  7638. appearActiveClass: String,
  7639. appearToClass: String,
  7640. duration: [Number, String, Object]
  7641. }; // in case the child is also an abstract component, e.g. <keep-alive>
  7642. // we want to recursively retrieve the real component to be rendered
  7643. function getRealChild(vnode) {
  7644. var compOptions = vnode && vnode.componentOptions;
  7645. if (compOptions && compOptions.Ctor.options.abstract) {
  7646. return getRealChild(getFirstComponentChild(compOptions.children));
  7647. } else {
  7648. return vnode;
  7649. }
  7650. }
  7651. function extractTransitionData(comp) {
  7652. var data = {};
  7653. var options = comp.$options; // props
  7654. for (var key in options.propsData) {
  7655. data[key] = comp[key];
  7656. } // events.
  7657. // extract listeners and pass them directly to the transition methods
  7658. var listeners = options._parentListeners;
  7659. for (var key$1 in listeners) {
  7660. data[camelize(key$1)] = listeners[key$1];
  7661. }
  7662. return data;
  7663. }
  7664. function placeholder(h, rawChild) {
  7665. if (/\d-keep-alive$/.test(rawChild.tag)) {
  7666. return h('keep-alive', {
  7667. props: rawChild.componentOptions.propsData
  7668. });
  7669. }
  7670. }
  7671. function hasParentTransition(vnode) {
  7672. while (vnode = vnode.parent) {
  7673. if (vnode.data.transition) {
  7674. return true;
  7675. }
  7676. }
  7677. }
  7678. function isSameChild(child, oldChild) {
  7679. return oldChild.key === child.key && oldChild.tag === child.tag;
  7680. }
  7681. var isNotTextNode = function isNotTextNode(c) {
  7682. return c.tag || isAsyncPlaceholder(c);
  7683. };
  7684. var isVShowDirective = function isVShowDirective(d) {
  7685. return d.name === 'show';
  7686. };
  7687. var Transition = {
  7688. name: 'transition',
  7689. props: transitionProps,
  7690. abstract: true,
  7691. render: function render(h) {
  7692. var this$1 = this;
  7693. var children = this.$slots.default;
  7694. if (!children) {
  7695. return;
  7696. } // filter out text nodes (possible whitespaces)
  7697. children = children.filter(isNotTextNode);
  7698. /* istanbul ignore if */
  7699. if (!children.length) {
  7700. return;
  7701. } // warn multiple elements
  7702. if ( true && children.length > 1) {
  7703. warn('<transition> can only be used on a single element. Use ' + '<transition-group> for lists.', this.$parent);
  7704. }
  7705. var mode = this.mode; // warn invalid mode
  7706. if ( true && mode && mode !== 'in-out' && mode !== 'out-in') {
  7707. warn('invalid <transition> mode: ' + mode, this.$parent);
  7708. }
  7709. var rawChild = children[0]; // if this is a component root node and the component's
  7710. // parent container node also has transition, skip.
  7711. if (hasParentTransition(this.$vnode)) {
  7712. return rawChild;
  7713. } // apply transition data to child
  7714. // use getRealChild() to ignore abstract components e.g. keep-alive
  7715. var child = getRealChild(rawChild);
  7716. /* istanbul ignore if */
  7717. if (!child) {
  7718. return rawChild;
  7719. }
  7720. if (this._leaving) {
  7721. return placeholder(h, rawChild);
  7722. } // ensure a key that is unique to the vnode type and to this transition
  7723. // component instance. This key will be used to remove pending leaving nodes
  7724. // during entering.
  7725. var id = "__transition-" + this._uid + "-";
  7726. child.key = child.key == null ? child.isComment ? id + 'comment' : id + child.tag : isPrimitive(child.key) ? String(child.key).indexOf(id) === 0 ? child.key : id + child.key : child.key;
  7727. var data = (child.data || (child.data = {})).transition = extractTransitionData(this);
  7728. var oldRawChild = this._vnode;
  7729. var oldChild = getRealChild(oldRawChild); // mark v-show
  7730. // so that the transition module can hand over the control to the directive
  7731. if (child.data.directives && child.data.directives.some(isVShowDirective)) {
  7732. child.data.show = true;
  7733. }
  7734. if (oldChild && oldChild.data && !isSameChild(child, oldChild) && !isAsyncPlaceholder(oldChild) && // #6687 component root is a comment node
  7735. !(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment)) {
  7736. // replace old child transition data with fresh one
  7737. // important for dynamic transitions!
  7738. var oldData = oldChild.data.transition = extend({}, data); // handle transition mode
  7739. if (mode === 'out-in') {
  7740. // return placeholder node and queue update when leave finishes
  7741. this._leaving = true;
  7742. mergeVNodeHook(oldData, 'afterLeave', function () {
  7743. this$1._leaving = false;
  7744. this$1.$forceUpdate();
  7745. });
  7746. return placeholder(h, rawChild);
  7747. } else if (mode === 'in-out') {
  7748. if (isAsyncPlaceholder(child)) {
  7749. return oldRawChild;
  7750. }
  7751. var delayedLeave;
  7752. var performLeave = function performLeave() {
  7753. delayedLeave();
  7754. };
  7755. mergeVNodeHook(data, 'afterEnter', performLeave);
  7756. mergeVNodeHook(data, 'enterCancelled', performLeave);
  7757. mergeVNodeHook(oldData, 'delayLeave', function (leave) {
  7758. delayedLeave = leave;
  7759. });
  7760. }
  7761. }
  7762. return rawChild;
  7763. }
  7764. };
  7765. /* */
  7766. var props = extend({
  7767. tag: String,
  7768. moveClass: String
  7769. }, transitionProps);
  7770. delete props.mode;
  7771. var TransitionGroup = {
  7772. props: props,
  7773. beforeMount: function beforeMount() {
  7774. var this$1 = this;
  7775. var update = this._update;
  7776. this._update = function (vnode, hydrating) {
  7777. var restoreActiveInstance = setActiveInstance(this$1); // force removing pass
  7778. this$1.__patch__(this$1._vnode, this$1.kept, false, // hydrating
  7779. true // removeOnly (!important, avoids unnecessary moves)
  7780. );
  7781. this$1._vnode = this$1.kept;
  7782. restoreActiveInstance();
  7783. update.call(this$1, vnode, hydrating);
  7784. };
  7785. },
  7786. render: function render(h) {
  7787. var tag = this.tag || this.$vnode.data.tag || 'span';
  7788. var map = Object.create(null);
  7789. var prevChildren = this.prevChildren = this.children;
  7790. var rawChildren = this.$slots.default || [];
  7791. var children = this.children = [];
  7792. var transitionData = extractTransitionData(this);
  7793. for (var i = 0; i < rawChildren.length; i++) {
  7794. var c = rawChildren[i];
  7795. if (c.tag) {
  7796. if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
  7797. children.push(c);
  7798. map[c.key] = c;
  7799. (c.data || (c.data = {})).transition = transitionData;
  7800. } else if (true) {
  7801. var opts = c.componentOptions;
  7802. var name = opts ? opts.Ctor.options.name || opts.tag || '' : c.tag;
  7803. warn("<transition-group> children must be keyed: <" + name + ">");
  7804. }
  7805. }
  7806. }
  7807. if (prevChildren) {
  7808. var kept = [];
  7809. var removed = [];
  7810. for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {
  7811. var c$1 = prevChildren[i$1];
  7812. c$1.data.transition = transitionData;
  7813. c$1.data.pos = c$1.elm.getBoundingClientRect();
  7814. if (map[c$1.key]) {
  7815. kept.push(c$1);
  7816. } else {
  7817. removed.push(c$1);
  7818. }
  7819. }
  7820. this.kept = h(tag, null, kept);
  7821. this.removed = removed;
  7822. }
  7823. return h(tag, null, children);
  7824. },
  7825. updated: function updated() {
  7826. var children = this.prevChildren;
  7827. var moveClass = this.moveClass || (this.name || 'v') + '-move';
  7828. if (!children.length || !this.hasMove(children[0].elm, moveClass)) {
  7829. return;
  7830. } // we divide the work into three loops to avoid mixing DOM reads and writes
  7831. // in each iteration - which helps prevent layout thrashing.
  7832. children.forEach(callPendingCbs);
  7833. children.forEach(recordPosition);
  7834. children.forEach(applyTranslation); // force reflow to put everything in position
  7835. // assign to this to avoid being removed in tree-shaking
  7836. // $flow-disable-line
  7837. this._reflow = document.body.offsetHeight;
  7838. children.forEach(function (c) {
  7839. if (c.data.moved) {
  7840. var el = c.elm;
  7841. var s = el.style;
  7842. addTransitionClass(el, moveClass);
  7843. s.transform = s.WebkitTransform = s.transitionDuration = '';
  7844. el.addEventListener(transitionEndEvent, el._moveCb = function cb(e) {
  7845. if (e && e.target !== el) {
  7846. return;
  7847. }
  7848. if (!e || /transform$/.test(e.propertyName)) {
  7849. el.removeEventListener(transitionEndEvent, cb);
  7850. el._moveCb = null;
  7851. removeTransitionClass(el, moveClass);
  7852. }
  7853. });
  7854. }
  7855. });
  7856. },
  7857. methods: {
  7858. hasMove: function hasMove(el, moveClass) {
  7859. /* istanbul ignore if */
  7860. if (!hasTransition) {
  7861. return false;
  7862. }
  7863. /* istanbul ignore if */
  7864. if (this._hasMove) {
  7865. return this._hasMove;
  7866. } // Detect whether an element with the move class applied has
  7867. // CSS transitions. Since the element may be inside an entering
  7868. // transition at this very moment, we make a clone of it and remove
  7869. // all other transition classes applied to ensure only the move class
  7870. // is applied.
  7871. var clone = el.cloneNode();
  7872. if (el._transitionClasses) {
  7873. el._transitionClasses.forEach(function (cls) {
  7874. removeClass(clone, cls);
  7875. });
  7876. }
  7877. addClass(clone, moveClass);
  7878. clone.style.display = 'none';
  7879. this.$el.appendChild(clone);
  7880. var info = getTransitionInfo(clone);
  7881. this.$el.removeChild(clone);
  7882. return this._hasMove = info.hasTransform;
  7883. }
  7884. }
  7885. };
  7886. function callPendingCbs(c) {
  7887. /* istanbul ignore if */
  7888. if (c.elm._moveCb) {
  7889. c.elm._moveCb();
  7890. }
  7891. /* istanbul ignore if */
  7892. if (c.elm._enterCb) {
  7893. c.elm._enterCb();
  7894. }
  7895. }
  7896. function recordPosition(c) {
  7897. c.data.newPos = c.elm.getBoundingClientRect();
  7898. }
  7899. function applyTranslation(c) {
  7900. var oldPos = c.data.pos;
  7901. var newPos = c.data.newPos;
  7902. var dx = oldPos.left - newPos.left;
  7903. var dy = oldPos.top - newPos.top;
  7904. if (dx || dy) {
  7905. c.data.moved = true;
  7906. var s = c.elm.style;
  7907. s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)";
  7908. s.transitionDuration = '0s';
  7909. }
  7910. }
  7911. var platformComponents = {
  7912. Transition: Transition,
  7913. TransitionGroup: TransitionGroup
  7914. };
  7915. /* */
  7916. // install platform specific utils
  7917. Vue.config.mustUseProp = mustUseProp;
  7918. Vue.config.isReservedTag = isReservedTag;
  7919. Vue.config.isReservedAttr = isReservedAttr;
  7920. Vue.config.getTagNamespace = getTagNamespace;
  7921. Vue.config.isUnknownElement = isUnknownElement; // install platform runtime directives & components
  7922. extend(Vue.options.directives, platformDirectives);
  7923. extend(Vue.options.components, platformComponents); // install platform patch function
  7924. Vue.prototype.__patch__ = inBrowser ? patch : noop;
  7925. Vue.prototype.__call_hook = function (hook, args) {
  7926. var vm = this; // #7573 disable dep collection when invoking lifecycle hooks
  7927. pushTarget();
  7928. var handlers = vm.$options[hook];
  7929. var info = hook + " hook";
  7930. var ret;
  7931. if (handlers) {
  7932. for (var i = 0, j = handlers.length; i < j; i++) {
  7933. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  7934. }
  7935. }
  7936. if (vm._hasHookEvent) {
  7937. vm.$emit('hook:' + hook, args);
  7938. }
  7939. popTarget();
  7940. return ret;
  7941. }; // public mount method
  7942. Vue.prototype.$mount = function (el, hydrating) {
  7943. el = el && inBrowser ? query(el) : undefined;
  7944. return mountComponent(this, el, hydrating);
  7945. }; // devtools global hook
  7946. /* istanbul ignore next */
  7947. if (inBrowser) {
  7948. setTimeout(function () {
  7949. if (config.devtools) {
  7950. if (devtools) {
  7951. devtools.emit('init', Vue);
  7952. } else if (true) {
  7953. console[console.info ? 'info' : 'log']('Download the Vue Devtools extension for a better development experience:\n' + 'https://github.com/vuejs/vue-devtools');
  7954. }
  7955. }
  7956. if ( true && config.productionTip !== false && typeof console !== 'undefined') {
  7957. console[console.info ? 'info' : 'log']("You are running Vue in development mode.\n" + "Make sure to turn on production mode when deploying for production.\n" + "See more tips at https://vuejs.org/guide/deployment.html");
  7958. }
  7959. }, 0);
  7960. }
  7961. /* */
  7962. /* harmony default export */ __webpack_exports__["a"] = (Vue);
  7963. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(16)))
  7964. /***/ }),
  7965. /* 9 */
  7966. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  7967. "use strict";
  7968. var addListenerToElement = function addListenerToElement(element, type, callback, capture) {
  7969. // 暂时忽略 capture
  7970. element.addEventListener(type, function ($event) {
  7971. if (typeof callback === 'function') {
  7972. if (callback($event) === false) {
  7973. $event.preventDefault();
  7974. $event.stopPropagation();
  7975. }
  7976. }
  7977. }, {
  7978. passive: false
  7979. });
  7980. };
  7981. /* harmony default export */ __webpack_exports__["a"] = ({
  7982. beforeDestroy: function beforeDestroy() {
  7983. document.removeEventListener('mousemove', this.__mouseMoveEventListener);
  7984. document.removeEventListener('mouseup', this.__mouseUpEventListener);
  7985. },
  7986. methods: {
  7987. touchtrack: function touchtrack(element, method, useCancel) {
  7988. var self = this;
  7989. var x0 = 0;
  7990. var y0 = 0;
  7991. var x1 = 0;
  7992. var y1 = 0;
  7993. var fn = function fn($event, state, x, y) {
  7994. if (self[method]({
  7995. target: $event.target,
  7996. currentTarget: $event.currentTarget,
  7997. preventDefault: $event.preventDefault.bind($event),
  7998. stopPropagation: $event.stopPropagation.bind($event),
  7999. touches: $event.touches,
  8000. changedTouches: $event.changedTouches,
  8001. detail: {
  8002. state: state,
  8003. x0: x,
  8004. y0: y,
  8005. dx: x - x0,
  8006. dy: y - y0,
  8007. ddx: x - x1,
  8008. ddy: y - y1,
  8009. timeStamp: $event.timeStamp
  8010. }
  8011. }) === false) {
  8012. return false;
  8013. }
  8014. };
  8015. var $eventOld = null;
  8016. var hasTouchStart;
  8017. var hasMouseDown;
  8018. addListenerToElement(element, 'touchstart', function ($event) {
  8019. hasTouchStart = true;
  8020. if ($event.touches.length === 1 && !$eventOld) {
  8021. $eventOld = $event;
  8022. x0 = x1 = $event.touches[0].pageX;
  8023. y0 = y1 = $event.touches[0].pageY;
  8024. return fn($event, 'start', x0, y0);
  8025. }
  8026. });
  8027. addListenerToElement(element, 'mousedown', function ($event) {
  8028. hasMouseDown = true;
  8029. if (!hasTouchStart && !$eventOld) {
  8030. // TODO touches changedTouches
  8031. $eventOld = $event;
  8032. x0 = x1 = $event.pageX;
  8033. y0 = y1 = $event.pageY;
  8034. return fn($event, 'start', x0, y0);
  8035. }
  8036. });
  8037. addListenerToElement(element, 'touchmove', function ($event) {
  8038. if ($event.touches.length === 1 && $eventOld) {
  8039. var res = fn($event, 'move', $event.touches[0].pageX, $event.touches[0].pageY);
  8040. x1 = $event.touches[0].pageX;
  8041. y1 = $event.touches[0].pageY;
  8042. return res;
  8043. }
  8044. });
  8045. var mouseMoveEventListener = this.__mouseMoveEventListener = function ($event) {
  8046. if (!hasTouchStart && hasMouseDown && $eventOld) {
  8047. // TODO target currentTarget touches changedTouches
  8048. var res = fn($event, 'move', $event.pageX, $event.pageY);
  8049. x1 = $event.pageX;
  8050. y1 = $event.pageY;
  8051. return res;
  8052. }
  8053. };
  8054. document.addEventListener('mousemove', mouseMoveEventListener);
  8055. addListenerToElement(element, 'touchend', function ($event) {
  8056. if ($event.touches.length === 0 && $eventOld) {
  8057. hasTouchStart = false;
  8058. $eventOld = null;
  8059. return fn($event, 'end', $event.changedTouches[0].pageX, $event.changedTouches[0].pageY);
  8060. }
  8061. });
  8062. var mouseUpEventListener = this.__mouseUpEventListener = function ($event) {
  8063. hasMouseDown = false;
  8064. if (!hasTouchStart && $eventOld) {
  8065. // TODO target currentTarget touches changedTouches
  8066. $eventOld = null;
  8067. return fn($event, 'end', $event.pageX, $event.pageY);
  8068. }
  8069. };
  8070. document.addEventListener('mouseup', mouseUpEventListener);
  8071. addListenerToElement(element, 'touchcancel', function ($event) {
  8072. if ($eventOld) {
  8073. hasTouchStart = false;
  8074. var $eventTemp = $eventOld;
  8075. $eventOld = null;
  8076. return fn($event, useCancel ? 'cancel' : 'end', $eventTemp.touches[0].pageX, $eventTemp.touches[0].pageY);
  8077. }
  8078. });
  8079. }
  8080. }
  8081. });
  8082. /***/ }),
  8083. /* 10 */
  8084. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8085. "use strict";
  8086. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getWindowOffset; });
  8087. function getWindowOffset() {
  8088. return {
  8089. top: 0,
  8090. bottom: 0
  8091. };
  8092. }
  8093. /***/ }),
  8094. /* 11 */
  8095. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8096. "use strict";
  8097. // EXPORTS
  8098. __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ processEvent; });
  8099. __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ initEvents; });
  8100. // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
  8101. var shared = __webpack_require__(1);
  8102. // EXTERNAL MODULE: ./src/core/helpers/index.js
  8103. var helpers = __webpack_require__(6);
  8104. // CONCATENATED MODULE: ./src/core/helpers/patch.js
  8105. function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  8106. /**
  8107. * mpvue event
  8108. */
  8109. function wrapperMPEvent(event) {
  8110. return Object.assign({
  8111. mp: event,
  8112. _processed: true
  8113. }, event);
  8114. }
  8115. /**
  8116. * app-plus titleNView
  8117. */
  8118. function mergeTitleNView(navigationBar, titleNView) {
  8119. if (Object(shared["e" /* isPlainObject */])(titleNView)) {
  8120. if (Object(shared["c" /* hasOwn */])(titleNView, 'backgroundColor')) {
  8121. navigationBar.backgroundColor = titleNView.backgroundColor;
  8122. }
  8123. if (Object(shared["c" /* hasOwn */])(titleNView, 'buttons')) {
  8124. navigationBar.buttons = titleNView.buttons;
  8125. }
  8126. if (Object(shared["c" /* hasOwn */])(titleNView, 'titleColor')) {
  8127. navigationBar.textColor = titleNView.titleColor;
  8128. }
  8129. if (Object(shared["c" /* hasOwn */])(titleNView, 'titleText')) {
  8130. navigationBar.titleText = titleNView.titleText;
  8131. }
  8132. if (Object(shared["c" /* hasOwn */])(titleNView, 'titleSize')) {
  8133. navigationBar.titleSize = titleNView.titleSize;
  8134. }
  8135. if (Object(shared["c" /* hasOwn */])(titleNView, 'type')) {
  8136. navigationBar.type = titleNView.type;
  8137. }
  8138. if (Object(shared["c" /* hasOwn */])(titleNView, 'searchInput') && _typeof(titleNView.searchInput) === 'object') {
  8139. navigationBar.searchInput = Object.assign({
  8140. autoFocus: false,
  8141. align: 'center',
  8142. color: '#000000',
  8143. backgroundColor: 'rgba(255,255,255,0.5)',
  8144. borderRadius: '0px',
  8145. placeholder: '',
  8146. placeholderColor: '#CCCCCC',
  8147. disabled: false
  8148. }, titleNView.searchInput);
  8149. }
  8150. }
  8151. return navigationBar;
  8152. }
  8153. // EXTERNAL MODULE: ./src/platforms/app-plus/helpers/get-window-offset.js
  8154. var get_window_offset = __webpack_require__(10);
  8155. // CONCATENATED MODULE: ./src/core/view/plugins/events.js
  8156. function processTarget(target, detail) {
  8157. var checkShadowRoot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  8158. var res = {
  8159. id: target.id,
  8160. offsetLeft: target.offsetLeft,
  8161. offsetTop: target.offsetTop,
  8162. dataset: Object(helpers["c" /* normalizeDataset */])(target.dataset)
  8163. };
  8164. if (detail) {
  8165. Object.assign(res, detail);
  8166. }
  8167. return res;
  8168. }
  8169. function processTouches(touches) {
  8170. if (touches) {
  8171. var res = [];
  8172. var _getWindowOffset = Object(get_window_offset["a" /* default */])(),
  8173. top = _getWindowOffset.top;
  8174. for (var i = 0; i < touches.length; i++) {
  8175. var touch = touches[i];
  8176. res.push({
  8177. identifier: touch.identifier,
  8178. pageX: touch.pageX,
  8179. pageY: touch.pageY - top,
  8180. clientX: touch.clientX,
  8181. clientY: touch.clientY - top,
  8182. force: touch.force || 0
  8183. });
  8184. }
  8185. return res;
  8186. }
  8187. return [];
  8188. }
  8189. function processEvent(name) {
  8190. var $event = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  8191. var detail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  8192. var target = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  8193. var currentTarget = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  8194. if ($event._processed) {
  8195. $event.type = detail.type || name;
  8196. return $event;
  8197. } // fixed 针对小程序 click(tap)事件,补充事件详情
  8198. if (name === 'click') {
  8199. var _getWindowOffset2 = Object(get_window_offset["a" /* default */])(),
  8200. top = _getWindowOffset2.top;
  8201. detail = {
  8202. x: $event.x,
  8203. y: $event.y - top
  8204. };
  8205. $event.touches = $event.changedTouches = [{
  8206. force: 1,
  8207. identifier: 0,
  8208. clientX: $event.clientX,
  8209. clientY: $event.clientY,
  8210. pageX: $event.pageX,
  8211. pageY: $event.pageY
  8212. }];
  8213. } // fixed mp-vue
  8214. var ret = wrapperMPEvent({
  8215. type: detail.type || name,
  8216. timeStamp: $event.timeStamp || 0,
  8217. detail: detail,
  8218. target: processTarget(target, detail),
  8219. currentTarget: processTarget(currentTarget, false, true),
  8220. // 只处理系统事件
  8221. touches: $event instanceof Event || $event instanceof CustomEvent ? processTouches($event.touches) : $event.touches,
  8222. changedTouches: $event instanceof Event || $event instanceof CustomEvent ? processTouches($event.changedTouches) : $event.changedTouches,
  8223. preventDefault: function preventDefault() {},
  8224. stopPropagation: function stopPropagation() {}
  8225. });
  8226. if (true) {
  8227. var nid = currentTarget.getAttribute('_i');
  8228. ret.options = {
  8229. nid: nid
  8230. }; // 保留原始 currentTarget 方便后续对比
  8231. ret.$origCurrentTarget = currentTarget;
  8232. }
  8233. return ret;
  8234. }
  8235. var LONGPRESS_TIMEOUT = 350;
  8236. var LONGPRESS_THRESHOLD = 10;
  8237. var passiveOptions = shared["h" /* supportsPassive */] ? {
  8238. passive: true
  8239. } : false;
  8240. var longPressTimer = false;
  8241. function clearLongPressTimer() {
  8242. if (longPressTimer) {
  8243. clearTimeout(longPressTimer);
  8244. longPressTimer = false;
  8245. }
  8246. }
  8247. var startPageX = 0;
  8248. var startPageY = 0;
  8249. function touchstart(evt) {
  8250. clearLongPressTimer();
  8251. if (evt.touches.length !== 1) {
  8252. return;
  8253. }
  8254. var _evt$touches$ = evt.touches[0],
  8255. pageX = _evt$touches$.pageX,
  8256. pageY = _evt$touches$.pageY;
  8257. startPageX = pageX;
  8258. startPageY = pageY;
  8259. longPressTimer = setTimeout(function () {
  8260. var customEvent = new CustomEvent('longpress', {
  8261. bubbles: true,
  8262. cancelable: true,
  8263. target: evt.target,
  8264. currentTarget: evt.currentTarget
  8265. });
  8266. customEvent.touches = evt.touches;
  8267. customEvent.changedTouches = evt.changedTouches;
  8268. evt.target.dispatchEvent(customEvent);
  8269. }, LONGPRESS_TIMEOUT);
  8270. }
  8271. function touchmove(evt) {
  8272. if (!longPressTimer) {
  8273. return;
  8274. }
  8275. if (evt.touches.length !== 1) {
  8276. return clearLongPressTimer();
  8277. }
  8278. var _evt$touches$2 = evt.touches[0],
  8279. pageX = _evt$touches$2.pageX,
  8280. pageY = _evt$touches$2.pageY;
  8281. if (Math.abs(pageX - startPageX) > LONGPRESS_THRESHOLD || Math.abs(pageY - startPageY) > LONGPRESS_THRESHOLD) {
  8282. return clearLongPressTimer();
  8283. }
  8284. }
  8285. function initEvents() {
  8286. window.addEventListener('touchstart', touchstart, passiveOptions);
  8287. window.addEventListener('touchmove', touchmove, passiveOptions);
  8288. window.addEventListener('touchend', clearLongPressTimer, passiveOptions);
  8289. window.addEventListener('touchcancel', clearLongPressTimer, passiveOptions);
  8290. }
  8291. /***/ }),
  8292. /* 12 */
  8293. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8294. "use strict";
  8295. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return publishHandler; });
  8296. /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
  8297. /* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
  8298. function publishHandler(event) {
  8299. var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  8300. Object(uni_shared__WEBPACK_IMPORTED_MODULE_1__[/* plusReady */ "g"])(function () {
  8301. var pageId = plus.webview.currentWebview().id;
  8302. if (true) {
  8303. console.log("[VIEW][".concat(Date.now(), "]:"), event, args, pageId);
  8304. }
  8305. plus.webview.postMessageToUniNView({
  8306. type: 'subscribeHandler',
  8307. args: {
  8308. type: event,
  8309. data: args,
  8310. pageId: pageId
  8311. }
  8312. }, _constants__WEBPACK_IMPORTED_MODULE_0__[/* APP_SERVICE_ID */ "a"]);
  8313. });
  8314. }
  8315. /***/ }),
  8316. /* 13 */
  8317. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8318. "use strict";
  8319. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return disableScroll; });
  8320. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return pageScrollTo; });
  8321. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createScrollListener; });
  8322. /* harmony import */ var uni_platform_view_bridge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
  8323. function disableScroll(evt) {
  8324. evt.preventDefault();
  8325. }
  8326. function pageScrollTo(_ref) {
  8327. var scrollTop = _ref.scrollTop,
  8328. duration = _ref.duration;
  8329. var documentElement = document.documentElement;
  8330. var clientHeight = documentElement.clientHeight,
  8331. scrollHeight = documentElement.scrollHeight;
  8332. scrollTop = Math.min(scrollTop, scrollHeight - clientHeight);
  8333. if (duration === 0) {
  8334. // 部分浏览器(比如微信)中 scrollTop 的值需要通过 document.body 来控制
  8335. documentElement.scrollTop = document.body.scrollTop = scrollTop;
  8336. return;
  8337. }
  8338. if (window.scrollY === scrollTop) {
  8339. return;
  8340. }
  8341. function scrollTo(duration) {
  8342. if (duration <= 0) {
  8343. window.scrollTo(0, scrollTop);
  8344. return;
  8345. }
  8346. var distaince = scrollTop - window.scrollY;
  8347. requestAnimationFrame(function () {
  8348. window.scrollTo(0, window.scrollY + distaince / duration * 10);
  8349. scrollTo(duration - 10);
  8350. });
  8351. }
  8352. scrollTo(duration); // TODO 暂不使用 transform 会导致 fixed 元素不可见
  8353. // const body = document.body
  8354. // const bodyStyle = body.style
  8355. //
  8356. // function webkitTransitionEnd() {
  8357. // bodyStyle.webkitTransition = ''
  8358. // bodyStyle.webkitTransform = ''
  8359. // documentElement.scrollTop = scrollTop
  8360. // body.removeEventListener('webkitTransitionEnd', webkitTransitionEnd)
  8361. // }
  8362. //
  8363. // body.addEventListener('webkitTransitionEnd', webkitTransitionEnd)
  8364. // bodyStyle.webkitTransition = `-webkit-transform ${duration}ms ease-out`
  8365. // bodyStyle.webkitTransform = `translateY(${documentElement.scrollTop}px) translateZ(0)`
  8366. }
  8367. var testReachBottomTimer;
  8368. var lastScrollHeight = 0;
  8369. function createScrollListener(pageId, _ref2) {
  8370. var enablePageScroll = _ref2.enablePageScroll,
  8371. enablePageReachBottom = _ref2.enablePageReachBottom,
  8372. onReachBottomDistance = _ref2.onReachBottomDistance,
  8373. enableTransparentTitleNView = _ref2.enableTransparentTitleNView;
  8374. var ticking = false;
  8375. var hasReachBottom = false;
  8376. var onReachBottom = true;
  8377. function isReachBottom() {
  8378. var scrollHeight = document.documentElement.scrollHeight; // 部分浏览器窗口高度变化后document.documentelement.clientheight不会变化,采用window.innerHeight
  8379. var windowHeight = window.innerHeight;
  8380. var scrollY = window.scrollY;
  8381. var isBottom = scrollY > 0 && scrollHeight > windowHeight && scrollY + windowHeight + onReachBottomDistance >= scrollHeight; // 兼容部分浏览器滚动时scroll事件不触发
  8382. var heightChanged = Math.abs(scrollHeight - lastScrollHeight) > onReachBottomDistance;
  8383. if (isBottom && (!hasReachBottom || heightChanged)) {
  8384. lastScrollHeight = scrollHeight;
  8385. hasReachBottom = true;
  8386. return true;
  8387. }
  8388. if (!isBottom && hasReachBottom) {
  8389. hasReachBottom = false;
  8390. }
  8391. return false;
  8392. }
  8393. function trigger() {
  8394. var pages = getCurrentPages();
  8395. if (!pages.length || pages[pages.length - 1].$page.id !== pageId) {
  8396. return;
  8397. } // publish
  8398. var scrollTop = window.pageYOffset;
  8399. if (enablePageScroll) {
  8400. // 向 Service 发送 onPageScroll 事件
  8401. Object(uni_platform_view_bridge__WEBPACK_IMPORTED_MODULE_0__[/* publishHandler */ "a"])('onPageScroll', {
  8402. scrollTop: scrollTop
  8403. }, pageId);
  8404. }
  8405. if (enableTransparentTitleNView) {
  8406. UniViewJSBridge.emit('onPageScroll', {
  8407. scrollTop: scrollTop
  8408. });
  8409. }
  8410. function testReachBottom() {
  8411. if (isReachBottom()) {
  8412. Object(uni_platform_view_bridge__WEBPACK_IMPORTED_MODULE_0__[/* publishHandler */ "a"])('onReachBottom', {}, pageId);
  8413. onReachBottom = false;
  8414. setTimeout(function () {
  8415. onReachBottom = true;
  8416. }, 350);
  8417. return true;
  8418. }
  8419. }
  8420. if (enablePageReachBottom && onReachBottom) {
  8421. if (testReachBottom()) {} else {
  8422. // 解决部分浏览器滚动中js获取窗口高度不准确导致的问题
  8423. testReachBottomTimer = setTimeout(testReachBottom, 300);
  8424. }
  8425. }
  8426. ticking = false;
  8427. }
  8428. return function onScroll() {
  8429. clearTimeout(testReachBottomTimer);
  8430. if (!ticking) {
  8431. requestAnimationFrame(trigger);
  8432. }
  8433. ticking = true;
  8434. };
  8435. }
  8436. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  8437. /***/ }),
  8438. /* 14 */
  8439. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8440. "use strict";
  8441. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return vd; });
  8442. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return initData; });
  8443. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
  8444. /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
  8445. /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
  8446. /* harmony import */ var _vdom_sync__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80);
  8447. /* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59);
  8448. /* harmony import */ var _page_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(58);
  8449. var _handleData;
  8450. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  8451. function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
  8452. function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
  8453. function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
  8454. function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  8455. function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
  8456. function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
  8457. var vd;
  8458. var PageVueComponent;
  8459. var handleData = (_handleData = {}, _defineProperty(_handleData, _constants__WEBPACK_IMPORTED_MODULE_1__[/* PAGE_CREATE */ "d"], function onPageCreate(data) {
  8460. var _data = _slicedToArray(data, 3),
  8461. pageId = _data[0],
  8462. pagePath = _data[1],
  8463. pageOptions = _data[2];
  8464. document.title = "".concat(pagePath, "[").concat(pageId, "]");
  8465. updateRootFontSize(); // 设置当前页面伪对象,方便其他地方使用 getCurrentPages 获取当前页面 id,route
  8466. Object(_page__WEBPACK_IMPORTED_MODULE_4__[/* setCurrentPage */ "b"])(pageId, pagePath); // 通知页面创建,根据当前页面配置信息,初始化部分事件
  8467. UniViewJSBridge.subscribeHandler(_constants__WEBPACK_IMPORTED_MODULE_2__[/* ON_PAGE_CREATE */ "a"], pageOptions, pageId); // 初始化当前页面 VueComponent(生成页面样式代码)
  8468. PageVueComponent = Object(_page_factory__WEBPACK_IMPORTED_MODULE_5__[/* getPageVueComponent */ "b"])(pagePath); // 生成当前页面 vd
  8469. vd = new _vdom_sync__WEBPACK_IMPORTED_MODULE_3__[/* VDomSync */ "a"](pageId);
  8470. }), _defineProperty(_handleData, _constants__WEBPACK_IMPORTED_MODULE_1__[/* MOUNTED_DATA */ "c"], function onMounted(data) {
  8471. vd.addVData.apply(vd, data);
  8472. }), _defineProperty(_handleData, _constants__WEBPACK_IMPORTED_MODULE_1__[/* UPDATED_DATA */ "g"], function onUpdated(data) {
  8473. vd.updateVData.apply(vd, data);
  8474. }), _defineProperty(_handleData, _constants__WEBPACK_IMPORTED_MODULE_1__[/* PAGE_CREATED */ "e"], function onPageCreated(data) {
  8475. var _data2 = _slicedToArray(data, 2),
  8476. pageId = _data2[0],
  8477. pagePath = _data2[1];
  8478. var page = getCurrentPages()[0];
  8479. page.$vm = new PageVueComponent({
  8480. mpType: 'page',
  8481. pageId: pageId,
  8482. pagePath: pagePath
  8483. }).$mount('#app');
  8484. }), _handleData);
  8485. function broadcast(vm, componentName, eventName) {
  8486. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  8487. params[_key - 3] = arguments[_key];
  8488. }
  8489. vm.$children.forEach(function (child) {
  8490. var name = child.$options.name && child.$options.name.replace(/^VUni/, '');
  8491. if (~componentName.indexOf(name)) {
  8492. child.$emit.apply(child, [eventName].concat(params));
  8493. }
  8494. broadcast.apply(void 0, [child, componentName, eventName].concat(params));
  8495. });
  8496. }
  8497. var NATIVE_COMPONENTS = ['Camera', 'LivePlayer', 'LivePusher', 'Map', 'Video', 'CoverView', 'CoverImage', 'Ad'];
  8498. function updateView() {
  8499. var pages = getCurrentPages();
  8500. var pageVm = pages[0] && pages[0].$vm;
  8501. pageVm && broadcast(pageVm, NATIVE_COMPONENTS, 'uni-view-update');
  8502. }
  8503. function updateRootFontSize() {
  8504. // 页面存在横竖屏切换时,预加载的 webview 的 fontSize 需要再次校正一下
  8505. var oldFontSize = document.documentElement.style.fontSize;
  8506. var newFontSize = document.documentElement.clientWidth / 20 + 'px';
  8507. if (oldFontSize !== newFontSize) {
  8508. document.documentElement.style.fontSize = newFontSize;
  8509. }
  8510. }
  8511. window.addEventListener('resize', function () {
  8512. // TODO 与之前逻辑保持一致,仅当前 webview 未被使用时,校准 fontSize,后续考虑动态旋转,调整rootfontSize
  8513. if (!getCurrentPages().length) {
  8514. updateRootFontSize();
  8515. }
  8516. updateView();
  8517. });
  8518. window.addEventListener('updateview', updateView);
  8519. function vdSync(_ref) {
  8520. var data = _ref.data,
  8521. options = _ref.options;
  8522. var isVdCallback = true;
  8523. data.forEach(function (data) {
  8524. if (data[0] === _constants__WEBPACK_IMPORTED_MODULE_1__[/* PAGE_CREATE */ "d"]) {
  8525. // 页面创建无需触发 callback
  8526. isVdCallback = false;
  8527. }
  8528. handleData[data[0]](data[1]);
  8529. });
  8530. vd.flush();
  8531. vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].nextTick(function () {
  8532. // 清空本次 addBatchData
  8533. vd.clearAddBatchVData();
  8534. updateView();
  8535. isVdCallback && UniViewJSBridge.publishHandler(_constants__WEBPACK_IMPORTED_MODULE_1__[/* VD_SYNC_CALLBACK */ "i"]);
  8536. });
  8537. }
  8538. function getData(id, name) {
  8539. try {
  8540. return this.$r[id][name];
  8541. } catch (e) {
  8542. console.error(this.$options.__file + ":[".concat(this._$id, "]$r[").concat(id, "][").concat(name, "] is undefined"));
  8543. }
  8544. }
  8545. /**
  8546. * wxs change:prop
  8547. * @param {Object} id
  8548. * @param {Object} name
  8549. */
  8550. function getChangeData(id, name) {
  8551. try {
  8552. var value = this.$r[id][name];
  8553. var wxsPropName = name.replace('change:', '');
  8554. this[wxsPropName] = value;
  8555. this.$set(this.wxsProps, wxsPropName, value);
  8556. return value;
  8557. } catch (e) {
  8558. console.error(this.$options.__file + ":[".concat(this._$id, "]$r[").concat(id, "][").concat(name, "] is undefined"));
  8559. }
  8560. }
  8561. function initData(Vue) {
  8562. Vue.prototype._$g = getData;
  8563. Vue.prototype._$gc = getChangeData;
  8564. UniViewJSBridge.subscribe(_constants__WEBPACK_IMPORTED_MODULE_1__[/* VD_SYNC */ "h"], vdSync);
  8565. Object.defineProperty(Vue.prototype, '_$vd', {
  8566. get: function get() {
  8567. return !this.$options.isReserved && vd;
  8568. }
  8569. });
  8570. Vue.mixin({
  8571. beforeCreate: function beforeCreate() {
  8572. if (this.$options.mpType) {
  8573. this.mpType = this.$options.mpType;
  8574. }
  8575. if (this._$vd) {
  8576. this._$vd.initVm(this);
  8577. }
  8578. }
  8579. });
  8580. }
  8581. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  8582. /***/ }),
  8583. /* 15 */
  8584. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8585. "use strict";
  8586. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return pixelRatio; });
  8587. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return wrapper; });
  8588. /* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
  8589. var pixelRatio = function () {
  8590. var canvas = document.createElement('canvas');
  8591. canvas.height = canvas.width = 0;
  8592. var context = canvas.getContext('2d');
  8593. var backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;
  8594. return (window.devicePixelRatio || 1) / backingStore;
  8595. }();
  8596. var forEach = function forEach(obj, func) {
  8597. for (var key in obj) {
  8598. if (Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* hasOwn */ "c"])(obj, key)) {
  8599. func(obj[key], key);
  8600. }
  8601. }
  8602. };
  8603. var ratioArgs = {
  8604. fillRect: 'all',
  8605. clearRect: 'all',
  8606. strokeRect: 'all',
  8607. moveTo: 'all',
  8608. lineTo: 'all',
  8609. arc: [0, 1, 2],
  8610. arcTo: 'all',
  8611. bezierCurveTo: 'all',
  8612. isPointinPath: 'all',
  8613. isPointinStroke: 'all',
  8614. quadraticCurveTo: 'all',
  8615. rect: 'all',
  8616. translate: 'all',
  8617. createRadialGradient: 'all',
  8618. createLinearGradient: 'all',
  8619. setTransform: [4, 5]
  8620. };
  8621. var proto = CanvasRenderingContext2D.prototype;
  8622. proto.drawImageByCanvas = function (_super) {
  8623. return function (canvas, srcx, srcy, srcw, srch, desx, desy, desw, desh, isScale) {
  8624. if (!this.__hidpi__) {
  8625. return _super.apply(this, arguments);
  8626. }
  8627. srcx *= pixelRatio;
  8628. srcy *= pixelRatio;
  8629. srcw *= pixelRatio;
  8630. srch *= pixelRatio;
  8631. desx *= pixelRatio;
  8632. desy *= pixelRatio;
  8633. desw = isScale ? desw * pixelRatio : desw;
  8634. desh = isScale ? desh * pixelRatio : desh;
  8635. _super.call(this, canvas, srcx, srcy, srcw, srch, desx, desy, desw, desh);
  8636. };
  8637. }(proto.drawImage);
  8638. if (pixelRatio !== 1) {
  8639. forEach(ratioArgs, function (value, key) {
  8640. proto[key] = function (_super) {
  8641. return function () {
  8642. if (!this.__hidpi__) {
  8643. return _super.apply(this, arguments);
  8644. }
  8645. var args = Array.prototype.slice.call(arguments);
  8646. if (value === 'all') {
  8647. args = args.map(function (a) {
  8648. return a * pixelRatio;
  8649. });
  8650. } else if (Array.isArray(value)) {
  8651. for (var i = 0; i < value.length; i++) {
  8652. args[value[i]] *= pixelRatio;
  8653. }
  8654. }
  8655. return _super.apply(this, args);
  8656. };
  8657. }(proto[key]);
  8658. });
  8659. proto.stroke = function (_super) {
  8660. return function () {
  8661. if (!this.__hidpi__) {
  8662. return _super.apply(this, arguments);
  8663. }
  8664. this.lineWidth *= pixelRatio;
  8665. _super.apply(this, arguments);
  8666. this.lineWidth /= pixelRatio;
  8667. };
  8668. }(proto.stroke);
  8669. proto.fillText = function (_super) {
  8670. return function () {
  8671. if (!this.__hidpi__) {
  8672. return _super.apply(this, arguments);
  8673. }
  8674. var args = Array.prototype.slice.call(arguments);
  8675. args[1] *= pixelRatio;
  8676. args[2] *= pixelRatio;
  8677. this.font = this.font.replace(/(\d+)(px|em|rem|pt)/g, function (w, m, u) {
  8678. return m * pixelRatio + u;
  8679. });
  8680. _super.apply(this, args);
  8681. this.font = this.font.replace(/(\d+)(px|em|rem|pt)/g, function (w, m, u) {
  8682. return m / pixelRatio + u;
  8683. });
  8684. };
  8685. }(proto.fillText);
  8686. proto.strokeText = function (_super) {
  8687. return function () {
  8688. if (!this.__hidpi__) {
  8689. return _super.apply(this, arguments);
  8690. }
  8691. var args = Array.prototype.slice.call(arguments);
  8692. args[1] *= pixelRatio; // x
  8693. args[2] *= pixelRatio; // y
  8694. this.font = this.font.replace(/(\d+)(px|em|rem|pt)/g, function (w, m, u) {
  8695. return m * pixelRatio + u;
  8696. });
  8697. _super.apply(this, args);
  8698. this.font = this.font.replace(/(\d+)(px|em|rem|pt)/g, function (w, m, u) {
  8699. return m / pixelRatio + u;
  8700. });
  8701. };
  8702. }(proto.strokeText);
  8703. proto.drawImage = function (_super) {
  8704. return function () {
  8705. if (!this.__hidpi__) {
  8706. return _super.apply(this, arguments);
  8707. }
  8708. this.scale(pixelRatio, pixelRatio);
  8709. _super.apply(this, arguments);
  8710. this.scale(1 / pixelRatio, 1 / pixelRatio);
  8711. };
  8712. }(proto.drawImage);
  8713. }
  8714. function wrapper(canvas) {
  8715. canvas.width = canvas.offsetWidth * pixelRatio;
  8716. canvas.height = canvas.offsetHeight * pixelRatio;
  8717. canvas.getContext('2d').__hidpi__ = true;
  8718. }
  8719. /***/ }),
  8720. /* 16 */
  8721. /***/ (function(module, exports) {
  8722. var g;
  8723. // This works in non-strict mode
  8724. g = (function() {
  8725. return this;
  8726. })();
  8727. try {
  8728. // This works if eval is allowed (see CSP)
  8729. g = g || new Function("return this")();
  8730. } catch (e) {
  8731. // This works if the window reference is available
  8732. if (typeof window === "object") g = window;
  8733. }
  8734. // g can still be undefined, but nothing to do about it...
  8735. // We return undefined, instead of nothing here, so it's
  8736. // easier to handle this case. if(!global) { ...}
  8737. module.exports = g;
  8738. /***/ }),
  8739. /* 17 */
  8740. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8741. "use strict";
  8742. /* harmony default export */ __webpack_exports__["a"] = ({
  8743. data: function data() {
  8744. return {
  8745. hovering: false
  8746. };
  8747. },
  8748. props: {
  8749. hoverClass: {
  8750. type: String,
  8751. default: 'none'
  8752. },
  8753. hoverStopPropagation: {
  8754. type: Boolean,
  8755. default: false
  8756. },
  8757. hoverStartTime: {
  8758. type: [Number, String],
  8759. default: 50
  8760. },
  8761. hoverStayTime: {
  8762. type: [Number, String],
  8763. default: 400
  8764. }
  8765. },
  8766. methods: {
  8767. _hoverTouchStart: function _hoverTouchStart(evt) {
  8768. var _this = this;
  8769. // TODO detect scrolling
  8770. if (evt._hoverPropagationStopped) {
  8771. return;
  8772. }
  8773. if (!this.hoverClass || this.hoverClass === 'none' || this.disabled) {
  8774. return;
  8775. }
  8776. if (evt.touches.length > 1) {
  8777. return;
  8778. }
  8779. if (this.hoverStopPropagation) {
  8780. evt._hoverPropagationStopped = true;
  8781. }
  8782. this._hoverTouch = true;
  8783. this._hoverStartTimer = setTimeout(function () {
  8784. _this.hovering = true;
  8785. if (!_this._hoverTouch) {
  8786. // 防止在hoverStartTime时间内触发了 touchend 或 touchcancel
  8787. _this._hoverReset();
  8788. }
  8789. }, this.hoverStartTime);
  8790. },
  8791. _hoverTouchEnd: function _hoverTouchEnd(evt) {
  8792. this._hoverTouch = false;
  8793. if (this.hovering) {
  8794. this._hoverReset();
  8795. }
  8796. },
  8797. _hoverReset: function _hoverReset() {
  8798. var _this2 = this;
  8799. requestAnimationFrame(function () {
  8800. clearTimeout(_this2._hoverStayTimer);
  8801. _this2._hoverStayTimer = setTimeout(function () {
  8802. _this2.hovering = false;
  8803. }, _this2.hoverStayTime);
  8804. });
  8805. },
  8806. _hoverTouchCancel: function _hoverTouchCancel(evt) {
  8807. this._hoverTouch = false;
  8808. this.hovering = false;
  8809. clearTimeout(this._hoverStartTimer);
  8810. }
  8811. }
  8812. });
  8813. /***/ }),
  8814. /* 18 */
  8815. /***/ (function(module, exports, __webpack_require__) {
  8816. // extracted by mini-css-extract-plugin
  8817. if(false) { var cssReload; }
  8818. /***/ }),
  8819. /* 19 */
  8820. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8821. "use strict";
  8822. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_mixins__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
  8823. /* harmony import */ var uni_helpers_hidpi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
  8824. function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
  8825. function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
  8826. function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
  8827. function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
  8828. function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
  8829. function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  8830. //
  8831. //
  8832. //
  8833. //
  8834. //
  8835. //
  8836. //
  8837. //
  8838. //
  8839. //
  8840. //
  8841. //
  8842. //
  8843. //
  8844. //
  8845. //
  8846. //
  8847. //
  8848. //
  8849. //
  8850. function resolveColor(color) {
  8851. color = color.slice(0);
  8852. color[3] = color[3] / 255;
  8853. return 'rgba(' + color.join(',') + ')';
  8854. }
  8855. function processTouches(target, touches) {
  8856. return [].map.call(touches, function (touch) {
  8857. var boundingClientRect = target.getBoundingClientRect();
  8858. return {
  8859. identifier: touch.identifier,
  8860. x: touch.clientX - boundingClientRect.left,
  8861. y: touch.clientY - boundingClientRect.top
  8862. };
  8863. });
  8864. }
  8865. var tempCanvas;
  8866. function getTempCanvas() {
  8867. var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  8868. var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  8869. if (!tempCanvas) {
  8870. tempCanvas = document.createElement('canvas');
  8871. }
  8872. tempCanvas.width = width;
  8873. tempCanvas.height = height;
  8874. return tempCanvas;
  8875. }
  8876. /* harmony default export */ __webpack_exports__["a"] = ({
  8877. name: 'Canvas',
  8878. mixins: [uni_mixins__WEBPACK_IMPORTED_MODULE_0__[/* subscriber */ "e"]],
  8879. props: {
  8880. canvasId: {
  8881. type: String,
  8882. default: ''
  8883. },
  8884. disableScroll: {
  8885. type: [Boolean, String],
  8886. default: false
  8887. }
  8888. },
  8889. data: function data() {
  8890. return {
  8891. actionsWaiting: false
  8892. };
  8893. },
  8894. computed: {
  8895. id: function id() {
  8896. return this.canvasId;
  8897. },
  8898. _listeners: function _listeners() {
  8899. var _this = this;
  8900. var $listeners = Object.assign({}, this.$listeners);
  8901. var events = ['touchstart', 'touchmove', 'touchend'];
  8902. events.forEach(function (event) {
  8903. var existing = $listeners[event];
  8904. var eventHandler = [];
  8905. if (existing) {
  8906. eventHandler.push(function ($event) {
  8907. _this.$trigger(event, Object.assign({}, $event, {
  8908. touches: processTouches($event.currentTarget, $event.touches),
  8909. changedTouches: processTouches($event.currentTarget, $event.changedTouches)
  8910. }));
  8911. });
  8912. }
  8913. if (_this.disableScroll && event === 'touchmove') {
  8914. eventHandler.push(_this._touchmove);
  8915. }
  8916. $listeners[event] = eventHandler;
  8917. });
  8918. return $listeners;
  8919. }
  8920. },
  8921. created: function created() {
  8922. this._actionsDefer = [];
  8923. this._images = {};
  8924. },
  8925. mounted: function mounted() {
  8926. this._resize({
  8927. width: this.$refs.sensor.$el.offsetWidth,
  8928. height: this.$refs.sensor.$el.offsetHeight
  8929. });
  8930. },
  8931. beforeDestroy: function beforeDestroy() {
  8932. var canvas = this.$refs.canvas;
  8933. canvas.height = canvas.width = 0;
  8934. },
  8935. methods: {
  8936. _handleSubscribe: function _handleSubscribe(_ref) {
  8937. var type = _ref.type,
  8938. _ref$data = _ref.data,
  8939. data = _ref$data === void 0 ? {} : _ref$data;
  8940. var method = this[type];
  8941. if (type.indexOf('_') !== 0 && typeof method === 'function') {
  8942. method(data);
  8943. }
  8944. },
  8945. _resize: function _resize() {
  8946. var canvas = this.$refs.canvas;
  8947. if (canvas.width > 0 && canvas.height > 0) {
  8948. var context = canvas.getContext('2d');
  8949. var imageData = context.getImageData(0, 0, canvas.width, canvas.height);
  8950. Object(uni_helpers_hidpi__WEBPACK_IMPORTED_MODULE_1__[/* wrapper */ "b"])(this.$refs.canvas);
  8951. context.putImageData(imageData, 0, 0);
  8952. } else {
  8953. Object(uni_helpers_hidpi__WEBPACK_IMPORTED_MODULE_1__[/* wrapper */ "b"])(this.$refs.canvas);
  8954. }
  8955. },
  8956. _touchmove: function _touchmove(event) {
  8957. event.preventDefault();
  8958. },
  8959. actionsChanged: function actionsChanged(_ref2) {
  8960. var _this2 = this;
  8961. var actions = _ref2.actions,
  8962. reserve = _ref2.reserve,
  8963. callbackId = _ref2.callbackId;
  8964. var self = this;
  8965. if (!actions) {
  8966. return;
  8967. }
  8968. if (this.actionsWaiting) {
  8969. this._actionsDefer.push([actions, reserve, callbackId]);
  8970. return;
  8971. }
  8972. var canvas = this.$refs.canvas;
  8973. var c2d = canvas.getContext('2d');
  8974. if (!reserve) {
  8975. c2d.fillStyle = '#000000';
  8976. c2d.strokeStyle = '#000000';
  8977. c2d.shadowColor = '#000000';
  8978. c2d.shadowBlur = 0;
  8979. c2d.shadowOffsetX = 0;
  8980. c2d.shadowOffsetY = 0;
  8981. c2d.setTransform(1, 0, 0, 1, 0, 0);
  8982. c2d.clearRect(0, 0, canvas.width, canvas.height);
  8983. }
  8984. this.preloadImage(actions);
  8985. var _loop2 = function _loop2(index) {
  8986. var action = actions[index];
  8987. var method = action.method;
  8988. var data = action.data;
  8989. if (/^set/.test(method) && method !== 'setTransform') {
  8990. var method1 = method[3].toLowerCase() + method.slice(4);
  8991. var color;
  8992. if (method1 === 'fillStyle' || method1 === 'strokeStyle') {
  8993. if (data[0] === 'normal') {
  8994. color = resolveColor(data[1]);
  8995. } else if (data[0] === 'linear') {
  8996. var LinearGradient = c2d.createLinearGradient.apply(c2d, _toConsumableArray(data[1]));
  8997. data[2].forEach(function (data2) {
  8998. var offset = data2[0];
  8999. var color = resolveColor(data2[1]);
  9000. LinearGradient.addColorStop(offset, color);
  9001. });
  9002. color = LinearGradient;
  9003. } else if (data[0] === 'radial') {
  9004. var x = data[1][0];
  9005. var y = data[1][1];
  9006. var r = data[1][2];
  9007. var _LinearGradient = c2d.createRadialGradient(x, y, 0, x, y, r);
  9008. data[2].forEach(function (data2) {
  9009. var offset = data2[0];
  9010. var color = resolveColor(data2[1]);
  9011. _LinearGradient.addColorStop(offset, color);
  9012. });
  9013. color = _LinearGradient;
  9014. } else if (data[0] === 'pattern') {
  9015. var loaded = _this2.checkImageLoaded(data[1], actions.slice(index + 1), callbackId, function (image) {
  9016. if (image) {
  9017. c2d[method1] = c2d.createPattern(image, data[2]);
  9018. }
  9019. });
  9020. if (!loaded) {
  9021. return "break";
  9022. }
  9023. return "continue";
  9024. }
  9025. c2d[method1] = color;
  9026. } else if (method1 === 'globalAlpha') {
  9027. c2d[method1] = data[0] / 255;
  9028. } else if (method1 === 'shadow') {
  9029. _ = ['shadowOffsetX', 'shadowOffsetY', 'shadowBlur', 'shadowColor'];
  9030. data.forEach(function (color_, method_) {
  9031. c2d[_[method_]] = _[method_] === 'shadowColor' ? resolveColor(color_) : color_;
  9032. });
  9033. } else {
  9034. if (method1 === 'fontSize') {
  9035. c2d.font = c2d.font.replace(/\d+\.?\d*px/, data[0] + 'px');
  9036. } else {
  9037. if (method1 === 'lineDash') {
  9038. c2d.setLineDash(data[0]);
  9039. c2d.lineDashOffset = data[1] || 0;
  9040. } else {
  9041. if (method1 === 'textBaseline') {
  9042. if (data[0] === 'normal') {
  9043. data[0] = 'alphabetic';
  9044. }
  9045. c2d[method1] = data[0];
  9046. } else {
  9047. c2d[method1] = data[0];
  9048. }
  9049. }
  9050. }
  9051. }
  9052. } else if (method === 'fillPath' || method === 'strokePath') {
  9053. method = method.replace(/Path/, '');
  9054. c2d.beginPath();
  9055. data.forEach(function (data_) {
  9056. c2d[data_.method].apply(c2d, data_.data);
  9057. });
  9058. c2d[method]();
  9059. } else if (method === 'fillText') {
  9060. c2d.fillText.apply(c2d, data);
  9061. } else if (method === 'drawImage') {
  9062. A = function () {
  9063. var dataArray = _toConsumableArray(data);
  9064. var url = dataArray[0];
  9065. var otherData = dataArray.slice(1);
  9066. self._images = self._images || {};
  9067. if (!self.checkImageLoaded(url, actions.slice(index + 1), callbackId, function (image) {
  9068. if (image) {
  9069. c2d.drawImage.apply(c2d, [image].concat(_toConsumableArray(otherData.slice(4, 8)), _toConsumableArray(otherData.slice(0, 4))));
  9070. }
  9071. })) return 'break';
  9072. }();
  9073. if (A === 'break') {
  9074. return "break";
  9075. }
  9076. } else {
  9077. if (method === 'clip') {
  9078. data.forEach(function (data_) {
  9079. c2d[data_.method].apply(c2d, data_.data);
  9080. });
  9081. c2d.clip();
  9082. } else {
  9083. c2d[method].apply(c2d, data);
  9084. }
  9085. }
  9086. };
  9087. _loop: for (var index = 0; index < actions.length; index++) {
  9088. var _;
  9089. var A;
  9090. var _ret = _loop2(index);
  9091. switch (_ret) {
  9092. case "break":
  9093. break _loop;
  9094. case "continue":
  9095. continue;
  9096. }
  9097. }
  9098. if (!this.actionsWaiting && callbackId) {
  9099. UniViewJSBridge.publishHandler('onDrawCanvas', {
  9100. callbackId: callbackId,
  9101. data: {
  9102. errMsg: 'drawCanvas:ok'
  9103. }
  9104. }, this.$page.id);
  9105. }
  9106. },
  9107. preloadImage: function preloadImage(actions) {
  9108. var sefl = this;
  9109. actions.forEach(function (action) {
  9110. var method = action.method;
  9111. var data = action.data;
  9112. var src = '';
  9113. if (method === 'drawImage') {
  9114. src = data[0];
  9115. src = sefl.$getRealPath(src);
  9116. data[0] = src;
  9117. } else if (method === 'setFillStyle' && data[0] === 'pattern') {
  9118. src = data[1];
  9119. src = sefl.$getRealPath(src);
  9120. data[1] = src;
  9121. }
  9122. if (src && !sefl._images[src]) {
  9123. loadImage();
  9124. }
  9125. /**
  9126. * 加载图像
  9127. */
  9128. function loadImage() {
  9129. sefl._images[src] = new Image();
  9130. sefl._images[src].onload = function () {
  9131. sefl._images[src].ready = true;
  9132. };
  9133. /**
  9134. * 从Blob加载
  9135. * @param {Blob} blob
  9136. */
  9137. function loadBlob(blob) {
  9138. sefl._images[src].src = (window.URL || window.webkitURL).createObjectURL(blob);
  9139. }
  9140. /**
  9141. * 从本地文件加载
  9142. * @param {string} path 文件路径
  9143. */
  9144. function loadFile(path) {
  9145. var bitmap = new plus.nativeObj.Bitmap('bitmap' + Date.now());
  9146. bitmap.load(path, function () {
  9147. sefl._images[src].src = bitmap.toBase64Data();
  9148. bitmap.clear();
  9149. }, function () {
  9150. bitmap.clear();
  9151. console.error('preloadImage error');
  9152. });
  9153. }
  9154. /**
  9155. * 从网络加载
  9156. * @param {string} url 文件地址
  9157. */
  9158. function loadUrl(url) {
  9159. function plusDownload() {
  9160. plus.downloader.createDownload(url, {
  9161. filename: '_doc/uniapp_temp/download/'
  9162. }, function (d, status) {
  9163. if (status === 200) {
  9164. loadFile(d.filename);
  9165. } else {
  9166. sefl._images[src].src = src;
  9167. }
  9168. }).start();
  9169. }
  9170. var xhr = new XMLHttpRequest();
  9171. xhr.open('GET', url, true);
  9172. xhr.responseType = 'blob';
  9173. xhr.onload = function () {
  9174. if (this.status === 200) {
  9175. loadBlob(this.response);
  9176. }
  9177. };
  9178. xhr.onerror = window.plus ? plusDownload : function () {
  9179. sefl._images[src].src = src;
  9180. };
  9181. xhr.send();
  9182. }
  9183. if (window.plus && (!window.webkit || !window.webkit.messageHandlers)) {
  9184. sefl._images[src].src = src;
  9185. } else {
  9186. // 解决 PLUS-APP(wkwebview)以及 H5 图像跨域问题(H5图像响应头需包含access-control-allow-origin)
  9187. if (window.plus && src.indexOf('http://') !== 0 && src.indexOf('https://') !== 0) {
  9188. loadFile(src);
  9189. } else if (/^data:.*,.*/.test(src)) {
  9190. sefl._images[src].src = src;
  9191. } else {
  9192. loadUrl(src);
  9193. }
  9194. }
  9195. }
  9196. });
  9197. },
  9198. checkImageLoaded: function checkImageLoaded(src, actions, callbackId, fn) {
  9199. var self = this;
  9200. var image = this._images[src];
  9201. if (image.ready) {
  9202. fn(image);
  9203. return true;
  9204. } else {
  9205. this._actionsDefer.unshift([actions, true]);
  9206. this.actionsWaiting = true;
  9207. image.onload = function () {
  9208. image.ready = true;
  9209. fn(image);
  9210. self.actionsWaiting = false;
  9211. var actions = self._actionsDefer.slice(0);
  9212. self._actionsDefer = [];
  9213. for (var action = actions.shift(); action;) {
  9214. self.actionsChanged({
  9215. actions: action[0],
  9216. reserve: action[1],
  9217. callbackId: callbackId
  9218. });
  9219. action = actions.shift();
  9220. }
  9221. };
  9222. return false;
  9223. }
  9224. },
  9225. getImageData: function getImageData(_ref3) {
  9226. var _ref3$x = _ref3.x,
  9227. x = _ref3$x === void 0 ? 0 : _ref3$x,
  9228. _ref3$y = _ref3.y,
  9229. y = _ref3$y === void 0 ? 0 : _ref3$y,
  9230. width = _ref3.width,
  9231. height = _ref3.height,
  9232. destWidth = _ref3.destWidth,
  9233. destHeight = _ref3.destHeight,
  9234. _ref3$hidpi = _ref3.hidpi,
  9235. hidpi = _ref3$hidpi === void 0 ? true : _ref3$hidpi,
  9236. callbackId = _ref3.callbackId;
  9237. var imgData;
  9238. var canvas = this.$refs.canvas;
  9239. if (!width) {
  9240. width = canvas.offsetWidth - x;
  9241. }
  9242. if (!height) {
  9243. height = canvas.offsetHeight - y;
  9244. }
  9245. try {
  9246. if (!hidpi) {
  9247. if (!destWidth && !destHeight) {
  9248. destWidth = Math.round(width * uni_helpers_hidpi__WEBPACK_IMPORTED_MODULE_1__[/* pixelRatio */ "a"]);
  9249. destHeight = Math.round(height * uni_helpers_hidpi__WEBPACK_IMPORTED_MODULE_1__[/* pixelRatio */ "a"]);
  9250. } else if (!destWidth) {
  9251. destWidth = Math.round(width / height * destHeight);
  9252. } else if (!destHeight) {
  9253. destHeight = Math.round(height / width * destWidth);
  9254. }
  9255. } else {
  9256. destWidth = width;
  9257. destHeight = height;
  9258. }
  9259. var newCanvas = getTempCanvas(destWidth, destHeight);
  9260. var context = newCanvas.getContext('2d');
  9261. context.__hidpi__ = true;
  9262. context.drawImageByCanvas(canvas, x, y, width, height, 0, 0, destWidth, destHeight, false);
  9263. imgData = context.getImageData(0, 0, destWidth, destHeight);
  9264. newCanvas.height = newCanvas.width = 0;
  9265. context.__hidpi__ = false;
  9266. } catch (error) {
  9267. if (!callbackId) {
  9268. return;
  9269. }
  9270. UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
  9271. callbackId: callbackId,
  9272. data: {
  9273. errMsg: 'canvasGetImageData:fail'
  9274. }
  9275. }, this.$page.id);
  9276. return;
  9277. }
  9278. if (!callbackId) {
  9279. // fix [...]展开TypedArray在低版本手机报错的问题,使用Array.prototype.slice
  9280. return {
  9281. data: Array.prototype.slice.call(imgData.data),
  9282. width: destWidth,
  9283. height: destHeight
  9284. };
  9285. } else {
  9286. UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
  9287. callbackId: callbackId,
  9288. data: {
  9289. errMsg: 'canvasGetImageData:ok',
  9290. data: _toConsumableArray(imgData.data),
  9291. width: destWidth,
  9292. height: destHeight
  9293. }
  9294. }, this.$page.id);
  9295. }
  9296. },
  9297. putImageData: function putImageData(_ref4) {
  9298. var data = _ref4.data,
  9299. x = _ref4.x,
  9300. y = _ref4.y,
  9301. width = _ref4.width,
  9302. height = _ref4.height,
  9303. callbackId = _ref4.callbackId;
  9304. try {
  9305. if (!height) {
  9306. height = Math.round(data.length / 4 / width);
  9307. }
  9308. var canvas = getTempCanvas(width, height);
  9309. var context = canvas.getContext('2d');
  9310. context.putImageData(new ImageData(new Uint8ClampedArray(data), width, height), 0, 0);
  9311. this.$refs.canvas.getContext('2d').drawImage(canvas, x, y, width, height);
  9312. canvas.height = canvas.width = 0;
  9313. } catch (error) {
  9314. UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
  9315. callbackId: callbackId,
  9316. data: {
  9317. errMsg: 'canvasPutImageData:fail'
  9318. }
  9319. }, this.$page.id);
  9320. return;
  9321. }
  9322. UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
  9323. callbackId: callbackId,
  9324. data: {
  9325. errMsg: 'canvasPutImageData:ok'
  9326. }
  9327. }, this.$page.id);
  9328. },
  9329. getDataUrl: function getDataUrl(_ref5) {
  9330. var _this3 = this;
  9331. var _ref5$x = _ref5.x,
  9332. x = _ref5$x === void 0 ? 0 : _ref5$x,
  9333. _ref5$y = _ref5.y,
  9334. y = _ref5$y === void 0 ? 0 : _ref5$y,
  9335. width = _ref5.width,
  9336. height = _ref5.height,
  9337. destWidth = _ref5.destWidth,
  9338. destHeight = _ref5.destHeight,
  9339. _ref5$hidpi = _ref5.hidpi,
  9340. hidpi = _ref5$hidpi === void 0 ? true : _ref5$hidpi,
  9341. fileType = _ref5.fileType,
  9342. qualit = _ref5.qualit,
  9343. callbackId = _ref5.callbackId;
  9344. var res = this.getImageData({
  9345. x: x,
  9346. y: y,
  9347. width: width,
  9348. height: height,
  9349. destWidth: destWidth,
  9350. destHeight: destHeight,
  9351. hidpi: hidpi
  9352. });
  9353. if (!res.data || !res.data.length) {
  9354. UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
  9355. callbackId: callbackId,
  9356. data: {
  9357. errMsg: 'canvasGetDataUrl:fail'
  9358. }
  9359. }, this.$page.id);
  9360. return;
  9361. }
  9362. var imgData;
  9363. try {
  9364. imgData = new ImageData(new Uint8ClampedArray(res.data), res.width, res.height);
  9365. } catch (error) {
  9366. UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
  9367. callbackId: callbackId,
  9368. data: {
  9369. errMsg: 'canvasGetDataUrl:fail'
  9370. }
  9371. }, this.$page.id);
  9372. return;
  9373. }
  9374. destWidth = res.width;
  9375. destHeight = res.height;
  9376. var canvas = getTempCanvas(destWidth, destHeight);
  9377. var c2d = canvas.getContext('2d');
  9378. c2d.putImageData(imgData, 0, 0);
  9379. var base64 = canvas.toDataURL('image/png');
  9380. canvas.height = canvas.width = 0;
  9381. var img = new Image();
  9382. img.onload = function () {
  9383. var canvas = getTempCanvas(destWidth, destHeight);
  9384. if (fileType === 'jpeg' || fileType === 'jpg') {
  9385. fileType = 'jpeg';
  9386. c2d.fillStyle = '#fff';
  9387. c2d.fillRect(0, 0, destWidth, destHeight);
  9388. }
  9389. c2d.drawImage(img, 0, 0);
  9390. base64 = canvas.toDataURL("image/".concat(fileType), qualit);
  9391. canvas.height = canvas.width = 0;
  9392. UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
  9393. callbackId: callbackId,
  9394. data: {
  9395. errMsg: 'canvasGetDataUrl:ok',
  9396. base64: base64
  9397. }
  9398. }, _this3.$page.id);
  9399. };
  9400. img.src = base64;
  9401. }
  9402. }
  9403. });
  9404. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  9405. /***/ }),
  9406. /* 20 */
  9407. /***/ (function(module, exports, __webpack_require__) {
  9408. // extracted by mini-css-extract-plugin
  9409. if(false) { var cssReload; }
  9410. /***/ }),
  9411. /* 21 */
  9412. /***/ (function(module, exports, __webpack_require__) {
  9413. // extracted by mini-css-extract-plugin
  9414. if(false) { var cssReload; }
  9415. /***/ }),
  9416. /* 22 */
  9417. /***/ (function(module, exports, __webpack_require__) {
  9418. // extracted by mini-css-extract-plugin
  9419. if(false) { var cssReload; }
  9420. /***/ }),
  9421. /* 23 */
  9422. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9423. "use strict";
  9424. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_mixins__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
  9425. /* harmony import */ var uni_helpers_html_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60);
  9426. /* harmony import */ var _formats__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(83);
  9427. function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  9428. //
  9429. //
  9430. //
  9431. //
  9432. //
  9433. //
  9434. //
  9435. //
  9436. /* harmony default export */ __webpack_exports__["a"] = ({
  9437. name: 'Editor',
  9438. mixins: [uni_mixins__WEBPACK_IMPORTED_MODULE_0__[/* subscriber */ "e"], uni_mixins__WEBPACK_IMPORTED_MODULE_0__[/* emitter */ "a"], uni_mixins__WEBPACK_IMPORTED_MODULE_0__[/* keyboard */ "c"]],
  9439. props: {
  9440. id: {
  9441. type: String,
  9442. default: ''
  9443. },
  9444. readOnly: {
  9445. type: [Boolean, String],
  9446. default: false
  9447. },
  9448. placeholder: {
  9449. type: String,
  9450. default: ''
  9451. },
  9452. showImgSize: {
  9453. type: [Boolean, String],
  9454. default: false
  9455. },
  9456. showImgToolbar: {
  9457. type: [Boolean, String],
  9458. default: false
  9459. },
  9460. showImgResize: {
  9461. type: [Boolean, String],
  9462. default: false
  9463. }
  9464. },
  9465. data: function data() {
  9466. return {
  9467. quillReady: false
  9468. };
  9469. },
  9470. computed: {},
  9471. watch: {
  9472. readOnly: function readOnly(value) {
  9473. if (this.quillReady) {
  9474. var quill = this.quill;
  9475. quill.enable(!value);
  9476. if (!value) {
  9477. quill.blur();
  9478. }
  9479. }
  9480. },
  9481. placeholder: function placeholder(value) {
  9482. if (this.quillReady) {
  9483. this.quill.root.setAttribute('data-placeholder', value);
  9484. }
  9485. }
  9486. },
  9487. mounted: function mounted() {
  9488. var _this = this;
  9489. var imageResizeModules = [];
  9490. if (this.showImgSize) {
  9491. imageResizeModules.push('DisplaySize');
  9492. }
  9493. if (this.showImgToolbar) {
  9494. imageResizeModules.push('Toolbar');
  9495. }
  9496. if (this.showImgResize) {
  9497. imageResizeModules.push('Resize');
  9498. }
  9499. this.loadQuill(function () {
  9500. if (imageResizeModules.length) {
  9501. _this.loadImageResizeModule(function () {
  9502. _this.initQuill(imageResizeModules);
  9503. });
  9504. } else {
  9505. _this.initQuill(imageResizeModules);
  9506. }
  9507. });
  9508. },
  9509. methods: {
  9510. _handleSubscribe: function _handleSubscribe(_ref) {
  9511. var type = _ref.type,
  9512. data = _ref.data;
  9513. var options = data.options,
  9514. callbackId = data.callbackId;
  9515. var quill = this.quill;
  9516. var Quill = window.Quill;
  9517. var res;
  9518. var range;
  9519. var errMsg;
  9520. if (this.quillReady) {
  9521. switch (type) {
  9522. case 'format':
  9523. {
  9524. var _options$name = options.name,
  9525. name = _options$name === void 0 ? '' : _options$name,
  9526. _options$value = options.value,
  9527. value = _options$value === void 0 ? false : _options$value;
  9528. range = quill.getSelection(true);
  9529. var format = quill.getFormat(range)[name] || false;
  9530. if (['bold', 'italic', 'underline', 'strike', 'ins'].includes(name)) {
  9531. value = !format;
  9532. } else if (name === 'direction') {
  9533. value = value === 'rtl' && format ? false : value;
  9534. var align = quill.getFormat(range).align;
  9535. if (value === 'rtl' && !align) {
  9536. quill.format('align', 'right', Quill.sources.USER);
  9537. } else if (!value && align === 'right') {
  9538. quill.format('align', false, Quill.sources.USER);
  9539. }
  9540. } else if (name === 'indent') {
  9541. var rtl = quill.getFormat(range).direction === 'rtl';
  9542. value = value === '+1';
  9543. if (rtl) {
  9544. value = !value;
  9545. }
  9546. value = value ? '+1' : '-1';
  9547. } else {
  9548. if (name === 'list') {
  9549. value = value === 'check' ? 'unchecked' : value;
  9550. format = format === 'checked' ? 'unchecked' : format;
  9551. }
  9552. value = format && format !== (value || false) || !format && value ? value : !format;
  9553. }
  9554. quill.format(name, value, Quill.sources.USER);
  9555. }
  9556. break;
  9557. case 'insertDivider':
  9558. range = quill.getSelection(true);
  9559. quill.insertText(range.index, '\n', Quill.sources.USER);
  9560. quill.insertEmbed(range.index + 1, 'divider', true, Quill.sources.USER);
  9561. quill.setSelection(range.index + 2, Quill.sources.SILENT);
  9562. break;
  9563. case 'insertImage':
  9564. {
  9565. range = quill.getSelection(true);
  9566. var _options$src = options.src,
  9567. src = _options$src === void 0 ? '' : _options$src,
  9568. _options$alt = options.alt,
  9569. alt = _options$alt === void 0 ? '' : _options$alt,
  9570. _options$data = options.data,
  9571. _data = _options$data === void 0 ? {} : _options$data;
  9572. quill.insertEmbed(range.index, 'image', this.$getRealPath(src), Quill.sources.USER);
  9573. quill.formatText(range.index, 1, 'alt', alt);
  9574. quill.formatText(range.index, 1, 'data-custom', Object.keys(_data).map(function (key) {
  9575. return "".concat(key, "=").concat(_data[key]);
  9576. }).join('&'));
  9577. quill.setSelection(range.index + 1, Quill.sources.SILENT);
  9578. }
  9579. break;
  9580. case 'insertText':
  9581. {
  9582. range = quill.getSelection(true);
  9583. var _options$text = options.text,
  9584. text = _options$text === void 0 ? '' : _options$text;
  9585. quill.insertText(range.index, text, Quill.sources.USER);
  9586. quill.setSelection(range.index + text.length, 0, Quill.sources.SILENT);
  9587. }
  9588. break;
  9589. case 'setContents':
  9590. {
  9591. var delta = options.delta,
  9592. html = options.html;
  9593. if (_typeof(delta) === 'object') {
  9594. quill.setContents(delta, Quill.sources.SILENT);
  9595. } else if (typeof html === 'string') {
  9596. quill.setContents(this.html2delta(html), Quill.sources.SILENT);
  9597. } else {
  9598. errMsg = 'contents is missing';
  9599. }
  9600. }
  9601. break;
  9602. case 'getContents':
  9603. res = this.getContents();
  9604. break;
  9605. case 'clear':
  9606. quill.setContents([]);
  9607. break;
  9608. case 'removeFormat':
  9609. {
  9610. range = quill.getSelection(true);
  9611. var parchment = Quill.import('parchment');
  9612. if (range.length) {
  9613. quill.removeFormat(range, Quill.sources.USER);
  9614. } else {
  9615. Object.keys(quill.getFormat(range)).forEach(function (key) {
  9616. if (parchment.query(key, parchment.Scope.INLINE)) {
  9617. quill.format(key, false);
  9618. }
  9619. });
  9620. }
  9621. }
  9622. break;
  9623. case 'undo':
  9624. quill.history.undo();
  9625. break;
  9626. case 'redo':
  9627. quill.history.redo();
  9628. break;
  9629. default:
  9630. break;
  9631. }
  9632. this.updateStatus(range);
  9633. } else {
  9634. errMsg = 'not ready';
  9635. }
  9636. if (callbackId) {
  9637. UniViewJSBridge.publishHandler('onEditorMethodCallback', {
  9638. callbackId: callbackId,
  9639. data: Object.assign({}, res, {
  9640. errMsg: "".concat(type, ":").concat(errMsg ? 'fail ' + errMsg : 'ok')
  9641. })
  9642. }, this.$page.id);
  9643. }
  9644. },
  9645. loadQuill: function loadQuill(callback) {
  9646. if (typeof window.Quill === 'function') {
  9647. if (typeof callback === 'function') {
  9648. callback();
  9649. }
  9650. return;
  9651. }
  9652. var script = document.createElement('script');
  9653. script.src = window.plus ? './__uniappquill.js' : 'https://unpkg.com/quill@1.3.7/dist/quill.min.js';
  9654. document.body.appendChild(script);
  9655. script.onload = callback;
  9656. },
  9657. loadImageResizeModule: function loadImageResizeModule(callback) {
  9658. if (typeof window.ImageResize === 'function') {
  9659. if (typeof callback === 'function') {
  9660. callback();
  9661. }
  9662. return;
  9663. }
  9664. var script = document.createElement('script');
  9665. script.src = window.plus ? './__uniappquillimageresize.js' : 'https://unpkg.com/quill-image-resize-mp@3.0.1/image-resize.min.js';
  9666. document.body.appendChild(script);
  9667. script.onload = callback;
  9668. },
  9669. initQuill: function initQuill(imageResizeModules) {
  9670. var _this2 = this;
  9671. var Quill = window.Quill;
  9672. _formats__WEBPACK_IMPORTED_MODULE_2__[/* register */ "a"](Quill);
  9673. var options = {
  9674. toolbar: false,
  9675. readOnly: this.readOnly,
  9676. placeholder: this.placeholder,
  9677. modules: {}
  9678. };
  9679. if (imageResizeModules.length) {
  9680. Quill.register('modules/ImageResize', window.ImageResize.default);
  9681. options.modules.ImageResize = {
  9682. modules: imageResizeModules
  9683. };
  9684. }
  9685. var quill = this.quill = new Quill(this.$el, options);
  9686. var $el = quill.root;
  9687. var events = ['focus', 'blur', 'input'];
  9688. events.forEach(function (name) {
  9689. $el.addEventListener(name, function ($event) {
  9690. if (name === 'input') {
  9691. $event.stopPropagation();
  9692. } else {
  9693. _this2.$trigger(name, $event, _this2.getContents());
  9694. }
  9695. });
  9696. });
  9697. quill.on(Quill.events.TEXT_CHANGE, function () {
  9698. _this2.$trigger('input', {}, _this2.getContents());
  9699. });
  9700. quill.on(Quill.events.SELECTION_CHANGE, this.updateStatus.bind(this));
  9701. quill.on(Quill.events.SCROLL_OPTIMIZE, function () {
  9702. var range = quill.selection.getRange()[0];
  9703. _this2.updateStatus(range);
  9704. });
  9705. quill.clipboard.addMatcher(Node.ELEMENT_NODE, function (node, delta) {
  9706. if (_this2.skipMatcher) {
  9707. return delta;
  9708. }
  9709. return {
  9710. ops: delta.ops.filter(function (_ref2) {
  9711. var insert = _ref2.insert;
  9712. return typeof insert === 'string';
  9713. }).map(function (_ref3) {
  9714. var insert = _ref3.insert;
  9715. return {
  9716. insert: insert
  9717. };
  9718. })
  9719. };
  9720. });
  9721. this.initKeyboard($el);
  9722. this.quillReady = true;
  9723. this.$trigger('ready', event, {});
  9724. },
  9725. getContents: function getContents() {
  9726. var quill = this.quill;
  9727. var html = quill.root.innerHTML;
  9728. var text = quill.getText();
  9729. var delta = quill.getContents();
  9730. return {
  9731. html: html,
  9732. text: text,
  9733. delta: delta
  9734. };
  9735. },
  9736. html2delta: function html2delta(html) {
  9737. var tags = ['span', 'strong', 'b', 'ins', 'em', 'i', 'u', 'a', 'del', 's', 'sub', 'sup', 'img', 'div', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'ol', 'ul', 'li'];
  9738. var content = '';
  9739. var disable;
  9740. Object(uni_helpers_html_parser__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(html, {
  9741. start: function start(tag, attrs, unary) {
  9742. if (!tags.includes(tag)) {
  9743. disable = !unary;
  9744. return;
  9745. }
  9746. disable = false;
  9747. var arrts = attrs.map(function (_ref4) {
  9748. var name = _ref4.name,
  9749. value = _ref4.value;
  9750. return "".concat(name, "=\"").concat(value, "\"");
  9751. }).join(' ');
  9752. var start = "<".concat(tag, " ").concat(arrts, " ").concat(unary ? '/' : '', ">");
  9753. content += start;
  9754. },
  9755. end: function end(tag) {
  9756. if (!disable) {
  9757. content += "</".concat(tag, ">");
  9758. }
  9759. },
  9760. chars: function chars(text) {
  9761. if (!disable) {
  9762. content += text;
  9763. }
  9764. }
  9765. });
  9766. this.skipMatcher = true;
  9767. var delta = this.quill.clipboard.convert(content);
  9768. this.skipMatcher = false;
  9769. return delta;
  9770. },
  9771. updateStatus: function updateStatus(range) {
  9772. var _this3 = this;
  9773. var status = range ? this.quill.getFormat(range) : {};
  9774. var keys = Object.keys(status);
  9775. if (keys.length !== Object.keys(this.__status || {}).length || keys.find(function (key) {
  9776. return status[key] !== _this3.__status[key];
  9777. })) {
  9778. this.__status = status;
  9779. this.$trigger('statuschange', {}, status);
  9780. }
  9781. }
  9782. }
  9783. });
  9784. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  9785. /***/ }),
  9786. /* 24 */
  9787. /***/ (function(module, exports, __webpack_require__) {
  9788. // extracted by mini-css-extract-plugin
  9789. if(false) { var cssReload; }
  9790. /***/ }),
  9791. /* 25 */
  9792. /***/ (function(module, exports, __webpack_require__) {
  9793. // extracted by mini-css-extract-plugin
  9794. if(false) { var cssReload; }
  9795. /***/ }),
  9796. /* 26 */
  9797. /***/ (function(module, exports, __webpack_require__) {
  9798. // extracted by mini-css-extract-plugin
  9799. if(false) { var cssReload; }
  9800. /***/ }),
  9801. /* 27 */
  9802. /***/ (function(module, exports, __webpack_require__) {
  9803. // extracted by mini-css-extract-plugin
  9804. if(false) { var cssReload; }
  9805. /***/ }),
  9806. /* 28 */
  9807. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9808. "use strict";
  9809. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_mixins__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
  9810. //
  9811. //
  9812. //
  9813. //
  9814. //
  9815. //
  9816. //
  9817. //
  9818. //
  9819. /* harmony default export */ __webpack_exports__["a"] = ({
  9820. name: 'Label',
  9821. mixins: [uni_mixins__WEBPACK_IMPORTED_MODULE_0__[/* emitter */ "a"]],
  9822. props: {
  9823. for: {
  9824. type: String,
  9825. default: ''
  9826. }
  9827. },
  9828. computed: {
  9829. pointer: function pointer() {
  9830. return this.for || this.$slots.default && this.$slots.default.length;
  9831. }
  9832. },
  9833. methods: {
  9834. _onClick: function _onClick($event) {
  9835. var stopPropagation = /^uni-(checkbox|radio|switch)-/.test($event.target.className);
  9836. if (!stopPropagation) {
  9837. stopPropagation = /^uni-(checkbox|radio|switch|button)$/i.test($event.target.tagName);
  9838. }
  9839. if (stopPropagation) {
  9840. return;
  9841. }
  9842. if (this.for) {
  9843. UniViewJSBridge.emit('uni-label-click-' + this.$page.id + '-' + this.for, $event, true);
  9844. } else {
  9845. this.$broadcast(['Checkbox', 'Radio', 'Switch', 'Button'], 'uni-label-click', $event, true);
  9846. }
  9847. }
  9848. }
  9849. });
  9850. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  9851. /***/ }),
  9852. /* 29 */
  9853. /***/ (function(module, exports, __webpack_require__) {
  9854. // extracted by mini-css-extract-plugin
  9855. if(false) { var cssReload; }
  9856. /***/ }),
  9857. /* 30 */
  9858. /***/ (function(module, exports, __webpack_require__) {
  9859. // extracted by mini-css-extract-plugin
  9860. if(false) { var cssReload; }
  9861. /***/ }),
  9862. /* 31 */
  9863. /***/ (function(module, exports, __webpack_require__) {
  9864. // extracted by mini-css-extract-plugin
  9865. if(false) { var cssReload; }
  9866. /***/ }),
  9867. /* 32 */
  9868. /***/ (function(module, exports, __webpack_require__) {
  9869. // extracted by mini-css-extract-plugin
  9870. if(false) { var cssReload; }
  9871. /***/ }),
  9872. /* 33 */
  9873. /***/ (function(module, exports, __webpack_require__) {
  9874. // extracted by mini-css-extract-plugin
  9875. if(false) { var cssReload; }
  9876. /***/ }),
  9877. /* 34 */
  9878. /***/ (function(module, exports, __webpack_require__) {
  9879. // extracted by mini-css-extract-plugin
  9880. if(false) { var cssReload; }
  9881. /***/ }),
  9882. /* 35 */
  9883. /***/ (function(module, exports, __webpack_require__) {
  9884. // extracted by mini-css-extract-plugin
  9885. if(false) { var cssReload; }
  9886. /***/ }),
  9887. /* 36 */
  9888. /***/ (function(module, exports, __webpack_require__) {
  9889. // extracted by mini-css-extract-plugin
  9890. if(false) { var cssReload; }
  9891. /***/ }),
  9892. /* 37 */
  9893. /***/ (function(module, exports, __webpack_require__) {
  9894. // extracted by mini-css-extract-plugin
  9895. if(false) { var cssReload; }
  9896. /***/ }),
  9897. /* 38 */
  9898. /***/ (function(module, exports, __webpack_require__) {
  9899. // extracted by mini-css-extract-plugin
  9900. if(false) { var cssReload; }
  9901. /***/ }),
  9902. /* 39 */
  9903. /***/ (function(module, exports, __webpack_require__) {
  9904. // extracted by mini-css-extract-plugin
  9905. if(false) { var cssReload; }
  9906. /***/ }),
  9907. /* 40 */
  9908. /***/ (function(module, exports, __webpack_require__) {
  9909. // extracted by mini-css-extract-plugin
  9910. if(false) { var cssReload; }
  9911. /***/ }),
  9912. /* 41 */
  9913. /***/ (function(module, exports, __webpack_require__) {
  9914. // extracted by mini-css-extract-plugin
  9915. if(false) { var cssReload; }
  9916. /***/ }),
  9917. /* 42 */
  9918. /***/ (function(module, exports, __webpack_require__) {
  9919. // extracted by mini-css-extract-plugin
  9920. if(false) { var cssReload; }
  9921. /***/ }),
  9922. /* 43 */
  9923. /***/ (function(module, exports, __webpack_require__) {
  9924. // extracted by mini-css-extract-plugin
  9925. if(false) { var cssReload; }
  9926. /***/ }),
  9927. /* 44 */
  9928. /***/ (function(module, exports, __webpack_require__) {
  9929. // extracted by mini-css-extract-plugin
  9930. if(false) { var cssReload; }
  9931. /***/ }),
  9932. /* 45 */
  9933. /***/ (function(module, exports, __webpack_require__) {
  9934. // extracted by mini-css-extract-plugin
  9935. if(false) { var cssReload; }
  9936. /***/ }),
  9937. /* 46 */
  9938. /***/ (function(module, exports, __webpack_require__) {
  9939. // extracted by mini-css-extract-plugin
  9940. if(false) { var cssReload; }
  9941. /***/ }),
  9942. /* 47 */
  9943. /***/ (function(module, exports, __webpack_require__) {
  9944. // extracted by mini-css-extract-plugin
  9945. if(false) { var cssReload; }
  9946. /***/ }),
  9947. /* 48 */
  9948. /***/ (function(module, exports, __webpack_require__) {
  9949. // extracted by mini-css-extract-plugin
  9950. if(false) { var cssReload; }
  9951. /***/ }),
  9952. /* 49 */
  9953. /***/ (function(module, exports, __webpack_require__) {
  9954. // extracted by mini-css-extract-plugin
  9955. if(false) { var cssReload; }
  9956. /***/ }),
  9957. /* 50 */
  9958. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9959. "use strict";
  9960. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_mixins__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
  9961. /* harmony import */ var _mixins_native__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
  9962. //
  9963. //
  9964. //
  9965. //
  9966. //
  9967. //
  9968. //
  9969. //
  9970. //
  9971. //
  9972. //
  9973. //
  9974. //
  9975. //
  9976. //
  9977. //
  9978. //
  9979. //
  9980. //
  9981. var methods = ['getCenterLocation', 'moveToLocation', 'getRegion', 'getScale', '$getAppMap']; // const events = [
  9982. // 'markertap',
  9983. // 'callouttap',
  9984. // 'controltap',
  9985. // 'regionchange',
  9986. // 'tap',
  9987. // 'updated'
  9988. // ]
  9989. var _attrs = ['latitude', 'longitude', 'scale', 'markers', 'polyline', 'circles', 'controls', 'show-location'];
  9990. var convertCoordinates = function convertCoordinates(lng, lat, callback) {
  9991. // plus.maps.Map.convertCoordinates(new plus.maps.Point(lng, lat), {
  9992. // coordType: 'gcj02'
  9993. // }, callback)
  9994. callback({
  9995. coord: {
  9996. latitude: lat,
  9997. longitude: lng
  9998. }
  9999. });
  10000. };
  10001. function parseHex(color) {
  10002. if (color.indexOf('#') !== 0) {
  10003. return {
  10004. color: color,
  10005. opacity: 1
  10006. };
  10007. }
  10008. var opacity = color.substr(7, 2);
  10009. return {
  10010. color: color.substr(0, 7),
  10011. opacity: opacity ? Number('0x' + opacity) / 255 : 1
  10012. };
  10013. }
  10014. /* harmony default export */ __webpack_exports__["a"] = ({
  10015. name: 'Map',
  10016. mixins: [uni_mixins__WEBPACK_IMPORTED_MODULE_0__[/* subscriber */ "e"], _mixins_native__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]],
  10017. props: {
  10018. id: {
  10019. type: String,
  10020. default: ''
  10021. },
  10022. latitude: {
  10023. type: [Number, String],
  10024. default: ''
  10025. },
  10026. longitude: {
  10027. type: [Number, String],
  10028. default: ''
  10029. },
  10030. scale: {
  10031. type: [String, Number],
  10032. default: 16
  10033. },
  10034. markers: {
  10035. type: Array,
  10036. default: function _default() {
  10037. return [];
  10038. }
  10039. },
  10040. polyline: {
  10041. type: Array,
  10042. default: function _default() {
  10043. return [];
  10044. }
  10045. },
  10046. circles: {
  10047. type: Array,
  10048. default: function _default() {
  10049. return [];
  10050. }
  10051. },
  10052. controls: {
  10053. type: Array,
  10054. default: function _default() {
  10055. return [];
  10056. }
  10057. }
  10058. },
  10059. data: function data() {
  10060. return {
  10061. style: {
  10062. top: '0px',
  10063. left: '0px',
  10064. width: '0px',
  10065. height: '0px',
  10066. position: 'static'
  10067. },
  10068. hidden: false
  10069. };
  10070. },
  10071. computed: {
  10072. attrs: function attrs() {
  10073. var _this = this;
  10074. var obj = {};
  10075. _attrs.forEach(function (key) {
  10076. var val = _this.$props[key];
  10077. val = key === 'src' ? _this.$getRealPath(val) : val;
  10078. obj[key.replace(/[A-Z]/g, function (str) {
  10079. return '-' + str.toLowerCase();
  10080. })] = val;
  10081. });
  10082. return obj;
  10083. },
  10084. mapControls: function mapControls() {
  10085. var _this2 = this;
  10086. var list = this.controls.map(function (control) {
  10087. var position = {
  10088. position: 'absolute'
  10089. };
  10090. ['top', 'left', 'width', 'height'].forEach(function (key) {
  10091. if (control.position[key]) {
  10092. position[key] = control.position[key] + 'px';
  10093. }
  10094. });
  10095. return {
  10096. id: control.id,
  10097. iconPath: _this2.$getRealPath(control.iconPath),
  10098. position: position
  10099. };
  10100. });
  10101. return list;
  10102. }
  10103. },
  10104. watch: {
  10105. hidden: function hidden(val) {
  10106. this.map && this.map[val ? 'hide' : 'show']();
  10107. },
  10108. scale: function scale(val) {
  10109. this.map && this.map.setZoom(val);
  10110. },
  10111. latitude: function latitude(val) {
  10112. this.map && this.map.setStyles({
  10113. center: new plus.maps.Point(this.longitude, this.latitude)
  10114. });
  10115. },
  10116. longitude: function longitude(val) {
  10117. this.map && this.map.setStyles({
  10118. center: new plus.maps.Point(this.longitude, this.latitude)
  10119. });
  10120. },
  10121. markers: function markers(val) {
  10122. this.map && this._addMarkers(val, true);
  10123. },
  10124. polyline: function polyline(val) {
  10125. this.map && this._addMapLines(val);
  10126. },
  10127. circles: function circles(val) {
  10128. this.map && this._addMapCircles(val);
  10129. }
  10130. },
  10131. mounted: function mounted() {
  10132. var _this3 = this;
  10133. var mapStyle = Object.assign({}, this.attrs, this.position);
  10134. if (this.latitude && this.longitude) {
  10135. mapStyle.center = new plus.maps.Point(this.longitude, this.latitude);
  10136. }
  10137. var map = this.map = plus.maps.create(this.$page.id + '-map-' + (this.id || Date.now()), mapStyle);
  10138. map.__markers__ = {};
  10139. map.__lines__ = [];
  10140. map.__circles__ = [];
  10141. map.setZoom(this.scale);
  10142. plus.webview.currentWebview().append(map);
  10143. if (this.hidden) {
  10144. map.hide();
  10145. }
  10146. this.$watch('position', function () {
  10147. _this3.map && _this3.map.setStyles(_this3.position);
  10148. }, {
  10149. deep: true
  10150. });
  10151. map.onclick = function (e) {
  10152. _this3.$trigger('click', {}, e);
  10153. };
  10154. map.onstatuschanged = function (e) {
  10155. _this3.$trigger('regionchange', {}, e);
  10156. };
  10157. this._addMarkers(this.markers);
  10158. this._addMapLines(this.polyline);
  10159. this._addMapCircles(this.circles);
  10160. },
  10161. beforeDestroy: function beforeDestroy() {
  10162. this.map && this.map.close();
  10163. delete this.map;
  10164. },
  10165. methods: {
  10166. _handleSubscribe: function _handleSubscribe(_ref) {
  10167. var type = _ref.type,
  10168. _ref$data = _ref.data,
  10169. data = _ref$data === void 0 ? {} : _ref$data;
  10170. if (!methods.includes(type)) {
  10171. return;
  10172. }
  10173. this.map && this[type](data);
  10174. },
  10175. moveToLocation: function moveToLocation(_ref2) {
  10176. var callbackId = _ref2.callbackId,
  10177. longitude = _ref2.longitude,
  10178. latitude = _ref2.latitude;
  10179. this.map.setCenter(new plus.maps.Point(longitude || this.longitude, latitude || this.latitude));
  10180. this._publishHandler(callbackId, {
  10181. errMsg: 'moveToLocation:ok'
  10182. });
  10183. },
  10184. getCenterLocation: function getCenterLocation(_ref3) {
  10185. var callbackId = _ref3.callbackId;
  10186. var center = this.map.getCenter();
  10187. this._publishHandler(callbackId, {
  10188. longitude: center.longitude,
  10189. latitude: center.latitude,
  10190. errMsg: 'getCenterLocation:ok'
  10191. });
  10192. },
  10193. getRegion: function getRegion(_ref4) {
  10194. var callbackId = _ref4.callbackId;
  10195. var rect = this.map.getBounds();
  10196. this._publishHandler(callbackId, {
  10197. southwest: rect.southwest,
  10198. northeast: rect.northeast || rect.northease,
  10199. // 5plus API 名字写错了
  10200. errMsg: 'getRegion:ok'
  10201. });
  10202. },
  10203. getScale: function getScale(_ref5) {
  10204. var callbackId = _ref5.callbackId;
  10205. this._publishHandler(callbackId, {
  10206. scale: this.map.getZoom(),
  10207. errMsg: 'getScale:ok'
  10208. });
  10209. },
  10210. controlclick: function controlclick(e) {
  10211. this.$trigger('controltap', {}, {
  10212. controlId: e.id
  10213. });
  10214. },
  10215. _publishHandler: function _publishHandler(callbackId, data) {
  10216. UniViewJSBridge.publishHandler('onMapMethodCallback', {
  10217. callbackId: callbackId,
  10218. data: data
  10219. }, this.$page.id);
  10220. },
  10221. _addMarker: function _addMarker(nativeMap, marker) {
  10222. var _this4 = this;
  10223. var id = marker.id,
  10224. latitude = marker.latitude,
  10225. longitude = marker.longitude,
  10226. iconPath = marker.iconPath,
  10227. callout = marker.callout,
  10228. label = marker.label;
  10229. convertCoordinates(longitude, latitude, function (res) {
  10230. var _res$coord = res.coord,
  10231. latitude = _res$coord.latitude,
  10232. longitude = _res$coord.longitude;
  10233. var nativeMarker = new plus.maps.Marker(new plus.maps.Point(longitude, latitude));
  10234. if (iconPath) {
  10235. nativeMarker.setIcon(_this4.$getRealPath(iconPath));
  10236. }
  10237. if (label && label.content) {
  10238. nativeMarker.setLabel(label.content);
  10239. }
  10240. var nativeBubble = false;
  10241. if (callout && callout.content) {
  10242. nativeBubble = new plus.maps.Bubble(callout.content);
  10243. }
  10244. if (nativeBubble) {
  10245. nativeMarker.setBubble(nativeBubble);
  10246. }
  10247. if (id || id === 0) {
  10248. nativeMarker.onclick = function (e) {
  10249. _this4.$trigger('markertap', {}, {
  10250. markerId: id
  10251. });
  10252. };
  10253. if (nativeBubble) {
  10254. nativeBubble.onclick = function () {
  10255. _this4.$trigger('callouttap', {}, {
  10256. markerId: id
  10257. });
  10258. };
  10259. }
  10260. }
  10261. nativeMap.addOverlay(nativeMarker);
  10262. nativeMap.__markers__[id + ''] = nativeMarker;
  10263. });
  10264. },
  10265. _addMarkers: function _addMarkers(markers, clear) {
  10266. var _this5 = this;
  10267. if (this.map) {
  10268. if (clear) {
  10269. this.map.clearOverlays();
  10270. this.map.__markers__ = {};
  10271. }
  10272. markers.forEach(function (marker) {
  10273. _this5._addMarker(_this5.map, marker);
  10274. });
  10275. return {
  10276. errMsg: 'addMapMarkers:ok'
  10277. };
  10278. }
  10279. return {
  10280. errMsg: 'addMapMarkers:fail:请先创建地图元素'
  10281. };
  10282. },
  10283. _translateMapMarker: function _translateMapMarker(_ref6) {
  10284. var autoRotate = _ref6.autoRotate,
  10285. callbackId = _ref6.callbackId,
  10286. destination = _ref6.destination,
  10287. duration = _ref6.duration,
  10288. markerId = _ref6.markerId;
  10289. if (this.map) {
  10290. var nativeMarker = this.map.__markers__[markerId + ''];
  10291. if (nativeMarker) {
  10292. nativeMarker.setPoint(new plus.maps.Point(destination.longitude, destination.latitude));
  10293. }
  10294. }
  10295. return {
  10296. errMsg: 'translateMapMarker:ok'
  10297. };
  10298. },
  10299. _addMapLines: function _addMapLines(lines) {
  10300. var nativeMap = this.map;
  10301. if (!nativeMap) {
  10302. return {
  10303. errMsg: 'addMapLines:fail:请先创建地图元素'
  10304. };
  10305. }
  10306. if (nativeMap.__lines__.length > 0) {
  10307. nativeMap.__lines__.forEach(function (circle) {
  10308. nativeMap.removeOverlay(circle);
  10309. });
  10310. nativeMap.__lines__ = [];
  10311. }
  10312. lines.forEach(function (line) {
  10313. var color = line.color,
  10314. width = line.width;
  10315. var points = line.points.map(function (point) {
  10316. return new plus.maps.Point(point.longitude, point.latitude);
  10317. });
  10318. var polyline = new plus.maps.Polyline(points);
  10319. if (color) {
  10320. var strokeStyle = parseHex(color);
  10321. polyline.setStrokeColor(strokeStyle.color);
  10322. polyline.setStrokeOpacity(strokeStyle.opacity);
  10323. }
  10324. if (width) {
  10325. polyline.setLineWidth(width);
  10326. }
  10327. nativeMap.addOverlay(polyline);
  10328. nativeMap.__lines__.push(polyline);
  10329. });
  10330. return {
  10331. errMsg: 'addMapLines:ok'
  10332. };
  10333. },
  10334. _addMapCircles: function _addMapCircles(circles) {
  10335. var nativeMap = this.map;
  10336. if (!nativeMap) {
  10337. return {
  10338. errMsg: 'addMapCircles:fail:请先创建地图元素'
  10339. };
  10340. }
  10341. if (nativeMap.__circles__.length > 0) {
  10342. nativeMap.__circles__.forEach(function (circle) {
  10343. nativeMap.removeOverlay(circle);
  10344. });
  10345. nativeMap.__circles__ = [];
  10346. }
  10347. circles.forEach(function (circle) {
  10348. var latitude = circle.latitude,
  10349. longitude = circle.longitude,
  10350. color = circle.color,
  10351. fillColor = circle.fillColor,
  10352. radius = circle.radius,
  10353. strokeWidth = circle.strokeWidth;
  10354. var nativeCircle = new plus.maps.Circle(new plus.maps.Point(longitude, latitude), radius);
  10355. if (color) {
  10356. var strokeStyle = parseHex(color);
  10357. nativeCircle.setStrokeColor(strokeStyle.color);
  10358. nativeCircle.setStrokeOpacity(strokeStyle.opacity);
  10359. }
  10360. if (fillColor) {
  10361. var fillStyle = parseHex(fillColor);
  10362. nativeCircle.setFillColor(fillStyle.color);
  10363. nativeCircle.setFillOpacity(fillStyle.opacity);
  10364. }
  10365. if (strokeWidth) {
  10366. nativeCircle.setLineWidth(strokeWidth);
  10367. }
  10368. nativeMap.addOverlay(nativeCircle);
  10369. nativeMap.__circles__.push(nativeCircle);
  10370. });
  10371. return {
  10372. errMsg: 'addMapCircles:ok'
  10373. };
  10374. }
  10375. }
  10376. });
  10377. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  10378. /***/ }),
  10379. /* 51 */
  10380. /***/ (function(module, exports, __webpack_require__) {
  10381. // extracted by mini-css-extract-plugin
  10382. if(false) { var cssReload; }
  10383. /***/ }),
  10384. /* 52 */
  10385. /***/ (function(module, exports, __webpack_require__) {
  10386. // extracted by mini-css-extract-plugin
  10387. if(false) { var cssReload; }
  10388. /***/ }),
  10389. /* 53 */
  10390. /***/ (function(module, exports, __webpack_require__) {
  10391. // extracted by mini-css-extract-plugin
  10392. if(false) { var cssReload; }
  10393. /***/ }),
  10394. /* 54 */
  10395. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  10396. "use strict";
  10397. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
  10398. //
  10399. //
  10400. //
  10401. var webview = false;
  10402. var insertHTMLWebView = function insertHTMLWebView(_ref) {
  10403. var htmlId = _ref.htmlId;
  10404. var parentWebview = plus.webview.currentWebview(); // fixed by hxy web-view 组件所在的 webview 不注入 uni-app 框架
  10405. var styles = {
  10406. 'uni-app': 'none'
  10407. };
  10408. var parentTitleNView = parentWebview.getTitleNView();
  10409. if (parentTitleNView) {
  10410. if (plus.navigator.isImmersedStatusbar()) {
  10411. styles.top = 44 + plus.navigator.getStatusbarHeight();
  10412. } else {
  10413. styles.top = 44;
  10414. }
  10415. styles.bottom = 0;
  10416. }
  10417. webview = plus.webview.create('', htmlId, styles);
  10418. if (parentTitleNView) {
  10419. webview.addEventListener('titleUpdate', function () {
  10420. var title = webview.getTitle();
  10421. parentWebview.setStyle({
  10422. titleNView: {
  10423. titleText: !title || title === 'null' ? '' : title
  10424. }
  10425. });
  10426. });
  10427. }
  10428. plus.webview.currentWebview().append(webview);
  10429. };
  10430. var updateHTMLWebView = function updateHTMLWebView(_ref2) {
  10431. var htmlId = _ref2.htmlId,
  10432. src = _ref2.src,
  10433. webviewStyles = _ref2.webviewStyles;
  10434. // fixed by xxx 非空时才执行更新操作
  10435. var realPath = src || '';
  10436. if (!realPath) {
  10437. return;
  10438. }
  10439. if (/^(http|https):\/\//.test(realPath) && webviewStyles.progress) {
  10440. webview.setStyle({
  10441. progress: {
  10442. color: webviewStyles.progress.color
  10443. }
  10444. });
  10445. }
  10446. webview.loadURL(realPath);
  10447. };
  10448. var removeHTMLWebView = function removeHTMLWebView() {
  10449. plus.webview.currentWebview().remove(webview);
  10450. webview.close('none');
  10451. webview = false;
  10452. };
  10453. /* harmony default export */ __webpack_exports__["a"] = ({
  10454. name: 'WebView',
  10455. props: {
  10456. src: {
  10457. type: String,
  10458. default: ''
  10459. },
  10460. webviewStyles: {
  10461. type: Object,
  10462. default: function _default() {
  10463. return {};
  10464. }
  10465. }
  10466. },
  10467. watch: {
  10468. src: function src(val, oldVal) {
  10469. webview && updateHTMLWebView({
  10470. src: this.$getRealPath(val),
  10471. webviewStyles: this.webviewStyles
  10472. });
  10473. }
  10474. },
  10475. mounted: function mounted() {
  10476. this.htmlId = 'webviewId' + this.$page.id;
  10477. insertHTMLWebView({
  10478. htmlId: this.htmlId
  10479. });
  10480. updateHTMLWebView({
  10481. src: this.$getRealPath(this.src),
  10482. webviewStyles: this.webviewStyles
  10483. });
  10484. UniViewJSBridge.publishHandler(_constants__WEBPACK_IMPORTED_MODULE_0__[/* WEBVIEW_INSERTED */ "j"], {}, this.$page.id);
  10485. },
  10486. beforeDestroy: function beforeDestroy() {
  10487. removeHTMLWebView();
  10488. UniViewJSBridge.publishHandler(_constants__WEBPACK_IMPORTED_MODULE_0__[/* WEBVIEW_REMOVED */ "l"], {}, this.$page.id);
  10489. }
  10490. });
  10491. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  10492. /***/ }),
  10493. /* 55 */
  10494. /***/ (function(module, exports, __webpack_require__) {
  10495. // extracted by mini-css-extract-plugin
  10496. if(false) { var cssReload; }
  10497. /***/ }),
  10498. /* 56 */
  10499. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  10500. "use strict";
  10501. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return findElm; });
  10502. function findVmById(id, vm) {
  10503. if (id === vm._$id) {
  10504. return vm;
  10505. }
  10506. var childVms = vm.$children;
  10507. var len = childVms.length;
  10508. for (var i = 0; i < len; i++) {
  10509. var childVm = findVmById(id, childVms[i]);
  10510. if (childVm) {
  10511. return childVm;
  10512. }
  10513. }
  10514. }
  10515. function findElm(component, pageVm) {
  10516. if (!pageVm) {
  10517. return console.error('page is not ready');
  10518. }
  10519. if (!component) {
  10520. return pageVm.$el;
  10521. }
  10522. if (true) {
  10523. if (typeof component === 'string') {
  10524. var componentVm = findVmById(component, pageVm);
  10525. if (!componentVm) {
  10526. throw new Error("Not Found\uFF1APage[".concat(pageVm.$page.id, "][").concat(component, "]"));
  10527. }
  10528. return componentVm.$el;
  10529. }
  10530. }
  10531. return component.$el;
  10532. }
  10533. /***/ }),
  10534. /* 57 */
  10535. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  10536. "use strict";
  10537. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ON_PAGE_CREATE; });
  10538. var ON_PAGE_CREATE = 'onPageCreate';
  10539. /***/ }),
  10540. /* 58 */
  10541. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  10542. "use strict";
  10543. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return definePage; });
  10544. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getPageVueComponent; });
  10545. /* unused harmony export createPage */
  10546. /* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
  10547. var pageFactory = Object.create(null);
  10548. function definePage(name, createPageVueComponent) {
  10549. pageFactory[name] = createPageVueComponent;
  10550. }
  10551. var getPageVueComponent = Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* cached */ "a"])(function (pagePath) {
  10552. return pageFactory[pagePath]();
  10553. });
  10554. function createPage(pagePath, pageId, pageQuery, pageInstance) {
  10555. if (!pageFactory[pagePath]) {
  10556. console.error("".concat(pagePath, " not found"));
  10557. }
  10558. var startTime = Date.now();
  10559. var pageVm = new (getPageVueComponent(pagePath))({
  10560. mpType: 'page',
  10561. pageId: pageId,
  10562. pagePath: pagePath,
  10563. pageQuery: pageQuery,
  10564. pageInstance: pageInstance
  10565. });
  10566. if (true) {
  10567. console.log("new ".concat(pagePath), Date.now() - startTime);
  10568. }
  10569. return pageVm;
  10570. }
  10571. /***/ }),
  10572. /* 59 */
  10573. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  10574. "use strict";
  10575. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getCurrentPages; });
  10576. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return setCurrentPage; });
  10577. var pages = [];
  10578. function getCurrentPages() {
  10579. return pages;
  10580. }
  10581. function setCurrentPage(pageId, pagePath) {
  10582. pages.length = 0;
  10583. pages.push({
  10584. $page: {
  10585. id: pageId,
  10586. route: pagePath
  10587. }
  10588. });
  10589. }
  10590. /***/ }),
  10591. /* 60 */
  10592. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  10593. "use strict";
  10594. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HTMLParser; });
  10595. /*
  10596. * HTML5 Parser By Sam Blowes
  10597. *
  10598. * Designed for HTML5 documents
  10599. *
  10600. * Original code by John Resig (ejohn.org)
  10601. * http://ejohn.org/blog/pure-javascript-html-parser/
  10602. * Original code by Erik Arvidsson, Mozilla Public License
  10603. * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
  10604. *
  10605. * ----------------------------------------------------------------------------
  10606. * License
  10607. * ----------------------------------------------------------------------------
  10608. *
  10609. * This code is triple licensed using Apache Software License 2.0,
  10610. * Mozilla Public License or GNU Public License
  10611. *
  10612. * ////////////////////////////////////////////////////////////////////////////
  10613. *
  10614. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  10615. * use this file except in compliance with the License. You may obtain a copy
  10616. * of the License at http://www.apache.org/licenses/LICENSE-2.0
  10617. *
  10618. * ////////////////////////////////////////////////////////////////////////////
  10619. *
  10620. * The contents of this file are subject to the Mozilla Public License
  10621. * Version 1.1 (the "License"); you may not use this file except in
  10622. * compliance with the License. You may obtain a copy of the License at
  10623. * http://www.mozilla.org/MPL/
  10624. *
  10625. * Software distributed under the License is distributed on an "AS IS"
  10626. * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  10627. * License for the specific language governing rights and limitations
  10628. * under the License.
  10629. *
  10630. * The Original Code is Simple HTML Parser.
  10631. *
  10632. * The Initial Developer of the Original Code is Erik Arvidsson.
  10633. * Portions created by Erik Arvidssson are Copyright (C) 2004. All Rights
  10634. * Reserved.
  10635. *
  10636. * ////////////////////////////////////////////////////////////////////////////
  10637. *
  10638. * This program is free software; you can redistribute it and/or
  10639. * modify it under the terms of the GNU General Public License
  10640. * as published by the Free Software Foundation; either version 2
  10641. * of the License, or (at your option) any later version.
  10642. *
  10643. * This program is distributed in the hope that it will be useful,
  10644. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10645. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10646. * GNU General Public License for more details.
  10647. *
  10648. * You should have received a copy of the GNU General Public License
  10649. * along with this program; if not, write to the Free Software
  10650. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  10651. *
  10652. * ----------------------------------------------------------------------------
  10653. * Usage
  10654. * ----------------------------------------------------------------------------
  10655. *
  10656. * // Use like so:
  10657. * HTMLParser(htmlString, {
  10658. * start: function(tag, attrs, unary) {},
  10659. * end: function(tag) {},
  10660. * chars: function(text) {},
  10661. * comment: function(text) {}
  10662. * });
  10663. *
  10664. * // or to get an XML string:
  10665. * HTMLtoXML(htmlString);
  10666. *
  10667. * // or to get an XML DOM Document
  10668. * HTMLtoDOM(htmlString);
  10669. *
  10670. * // or to inject into an existing document/DOM node
  10671. * HTMLtoDOM(htmlString, document);
  10672. * HTMLtoDOM(htmlString, document.body);
  10673. *
  10674. */
  10675. // Regular Expressions for parsing tags and attributes
  10676. var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
  10677. var endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/;
  10678. var attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; // Empty Elements - HTML 5
  10679. var empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr'); // Block Elements - HTML 5
  10680. // fixed by xxx 将 ins 标签从块级名单中移除
  10681. var block = makeMap('a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video'); // Inline Elements - HTML 5
  10682. var inline = makeMap('abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'); // Elements that you can, intentionally, leave open
  10683. // (and which close themselves)
  10684. var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); // Attributes that have their values filled in disabled="disabled"
  10685. var fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'); // Special Elements (can contain anything)
  10686. var special = makeMap('script,style');
  10687. function HTMLParser(html, handler) {
  10688. var index;
  10689. var chars;
  10690. var match;
  10691. var stack = [];
  10692. var last = html;
  10693. stack.last = function () {
  10694. return this[this.length - 1];
  10695. };
  10696. while (html) {
  10697. chars = true; // Make sure we're not in a script or style element
  10698. if (!stack.last() || !special[stack.last()]) {
  10699. // Comment
  10700. if (html.indexOf('<!--') == 0) {
  10701. index = html.indexOf('-->');
  10702. if (index >= 0) {
  10703. if (handler.comment) {
  10704. handler.comment(html.substring(4, index));
  10705. }
  10706. html = html.substring(index + 3);
  10707. chars = false;
  10708. } // end tag
  10709. } else if (html.indexOf('</') == 0) {
  10710. match = html.match(endTag);
  10711. if (match) {
  10712. html = html.substring(match[0].length);
  10713. match[0].replace(endTag, parseEndTag);
  10714. chars = false;
  10715. } // start tag
  10716. } else if (html.indexOf('<') == 0) {
  10717. match = html.match(startTag);
  10718. if (match) {
  10719. html = html.substring(match[0].length);
  10720. match[0].replace(startTag, parseStartTag);
  10721. chars = false;
  10722. }
  10723. }
  10724. if (chars) {
  10725. index = html.indexOf('<');
  10726. var text = index < 0 ? html : html.substring(0, index);
  10727. html = index < 0 ? '' : html.substring(index);
  10728. if (handler.chars) {
  10729. handler.chars(text);
  10730. }
  10731. }
  10732. } else {
  10733. html = html.replace(new RegExp('([\\s\\S]*?)<\/' + stack.last() + '[^>]*>'), function (all, text) {
  10734. text = text.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, '$1$2');
  10735. if (handler.chars) {
  10736. handler.chars(text);
  10737. }
  10738. return '';
  10739. });
  10740. parseEndTag('', stack.last());
  10741. }
  10742. if (html == last) {
  10743. throw 'Parse Error: ' + html;
  10744. }
  10745. last = html;
  10746. } // Clean up any remaining tags
  10747. parseEndTag();
  10748. function parseStartTag(tag, tagName, rest, unary) {
  10749. tagName = tagName.toLowerCase();
  10750. if (block[tagName]) {
  10751. while (stack.last() && inline[stack.last()]) {
  10752. parseEndTag('', stack.last());
  10753. }
  10754. }
  10755. if (closeSelf[tagName] && stack.last() == tagName) {
  10756. parseEndTag('', tagName);
  10757. }
  10758. unary = empty[tagName] || !!unary;
  10759. if (!unary) {
  10760. stack.push(tagName);
  10761. }
  10762. if (handler.start) {
  10763. var attrs = [];
  10764. rest.replace(attr, function (match, name) {
  10765. var value = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : fillAttrs[name] ? name : '';
  10766. attrs.push({
  10767. name: name,
  10768. value: value,
  10769. escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') // "
  10770. });
  10771. });
  10772. if (handler.start) {
  10773. handler.start(tagName, attrs, unary);
  10774. }
  10775. }
  10776. }
  10777. function parseEndTag(tag, tagName) {
  10778. // If no tag name is provided, clean shop
  10779. if (!tagName) {
  10780. var pos = 0;
  10781. } // Find the closest opened tag of the same type
  10782. else {
  10783. for (var pos = stack.length - 1; pos >= 0; pos--) {
  10784. if (stack[pos] == tagName) {
  10785. break;
  10786. }
  10787. }
  10788. }
  10789. if (pos >= 0) {
  10790. // Close all the open elements, up the stack
  10791. for (var i = stack.length - 1; i >= pos; i--) {
  10792. if (handler.end) {
  10793. handler.end(stack[i]);
  10794. }
  10795. } // Remove the open elements from the stack
  10796. stack.length = pos;
  10797. }
  10798. }
  10799. }
  10800. ;
  10801. function makeMap(str) {
  10802. var obj = {};
  10803. var items = str.split(',');
  10804. for (var i = 0; i < items.length; i++) {
  10805. obj[items[i]] = true;
  10806. }
  10807. return obj;
  10808. }
  10809. /***/ }),
  10810. /* 61 */
  10811. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  10812. "use strict";
  10813. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Friction; });
  10814. function Friction(e) {
  10815. this._drag = e;
  10816. this._dragLog = Math.log(e);
  10817. this._x = 0;
  10818. this._v = 0;
  10819. this._startTime = 0;
  10820. }
  10821. Friction.prototype.set = function (e, t) {
  10822. this._x = e;
  10823. this._v = t;
  10824. this._startTime = new Date().getTime();
  10825. };
  10826. Friction.prototype.setVelocityByEnd = function (e) {
  10827. this._v = (e - this._x) * this._dragLog / (Math.pow(this._drag, 100) - 1);
  10828. };
  10829. Friction.prototype.x = function (e) {
  10830. if (e === undefined) {
  10831. e = (new Date().getTime() - this._startTime) / 1e3;
  10832. }
  10833. var t;
  10834. t = e === this._dt && this._powDragDt ? this._powDragDt : this._powDragDt = Math.pow(this._drag, e);
  10835. this._dt = e;
  10836. return this._x + this._v * t / this._dragLog - this._v / this._dragLog;
  10837. };
  10838. Friction.prototype.dx = function (e) {
  10839. if (e === undefined) {
  10840. e = (new Date().getTime() - this._startTime) / 1e3;
  10841. }
  10842. var t;
  10843. t = e === this._dt && this._powDragDt ? this._powDragDt : this._powDragDt = Math.pow(this._drag, e);
  10844. this._dt = e;
  10845. return this._v * t;
  10846. };
  10847. Friction.prototype.done = function () {
  10848. return Math.abs(this.dx()) < 3;
  10849. };
  10850. Friction.prototype.reconfigure = function (e) {
  10851. var t = this.x();
  10852. var n = this.dx();
  10853. this._drag = e;
  10854. this._dragLog = Math.log(e);
  10855. this.set(t, n);
  10856. };
  10857. Friction.prototype.configuration = function () {
  10858. var e = this;
  10859. return [{
  10860. label: 'Friction',
  10861. read: function read() {
  10862. return e._drag;
  10863. },
  10864. write: function write(t) {
  10865. e.reconfigure(t);
  10866. },
  10867. min: 0.001,
  10868. max: 0.1,
  10869. step: 0.001
  10870. }];
  10871. };
  10872. /***/ }),
  10873. /* 62 */
  10874. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  10875. "use strict";
  10876. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Spring; });
  10877. function o(e, t, n) {
  10878. return e > t - n && e < t + n;
  10879. }
  10880. function a(e, t) {
  10881. return o(e, 0, t);
  10882. }
  10883. function Spring(e, t, n) {
  10884. this._m = e;
  10885. this._k = t;
  10886. this._c = n;
  10887. this._solution = null;
  10888. this._endPosition = 0;
  10889. this._startTime = 0;
  10890. }
  10891. Spring.prototype._solve = function (e, t) {
  10892. var n = this._c;
  10893. var i = this._m;
  10894. var r = this._k;
  10895. var o = n * n - 4 * i * r;
  10896. if (o === 0) {
  10897. var _a = -n / (2 * i);
  10898. var _s = e;
  10899. var _l = t / (_a * e);
  10900. return {
  10901. x: function x(e) {
  10902. return (_s + _l * e) * Math.pow(Math.E, _a * e);
  10903. },
  10904. dx: function dx(e) {
  10905. var t = Math.pow(Math.E, _a * e);
  10906. return _a * (_s + _l * e) * t + _l * t;
  10907. }
  10908. };
  10909. }
  10910. if (o > 0) {
  10911. var c = (-n - Math.sqrt(o)) / (2 * i);
  10912. var u = (-n + Math.sqrt(o)) / (2 * i);
  10913. var _l2 = (t - c * e) / (u - c);
  10914. var _s2 = e - _l2;
  10915. return {
  10916. x: function x(e) {
  10917. var t;
  10918. var n;
  10919. if (e === this._t) {
  10920. t = this._powER1T;
  10921. n = this._powER2T;
  10922. }
  10923. this._t = e;
  10924. if (!t) {
  10925. t = this._powER1T = Math.pow(Math.E, c * e);
  10926. }
  10927. if (!n) {
  10928. n = this._powER2T = Math.pow(Math.E, u * e);
  10929. }
  10930. return _s2 * t + _l2 * n;
  10931. },
  10932. dx: function dx(e) {
  10933. var t;
  10934. var n;
  10935. if (e === this._t) {
  10936. t = this._powER1T;
  10937. n = this._powER2T;
  10938. }
  10939. this._t = e;
  10940. if (!t) {
  10941. t = this._powER1T = Math.pow(Math.E, c * e);
  10942. }
  10943. if (!n) {
  10944. n = this._powER2T = Math.pow(Math.E, u * e);
  10945. }
  10946. return _s2 * c * t + _l2 * u * n;
  10947. }
  10948. };
  10949. }
  10950. var d = Math.sqrt(4 * i * r - n * n) / (2 * i);
  10951. var a = -n / 2 * i;
  10952. var s = e;
  10953. var l = (t - a * e) / d;
  10954. return {
  10955. x: function x(e) {
  10956. return Math.pow(Math.E, a * e) * (s * Math.cos(d * e) + l * Math.sin(d * e));
  10957. },
  10958. dx: function dx(e) {
  10959. var t = Math.pow(Math.E, a * e);
  10960. var n = Math.cos(d * e);
  10961. var i = Math.sin(d * e);
  10962. return t * (l * d * n - s * d * i) + a * t * (l * i + s * n);
  10963. }
  10964. };
  10965. };
  10966. Spring.prototype.x = function (e) {
  10967. if (e === undefined) {
  10968. e = (new Date().getTime() - this._startTime) / 1e3;
  10969. }
  10970. return this._solution ? this._endPosition + this._solution.x(e) : 0;
  10971. };
  10972. Spring.prototype.dx = function (e) {
  10973. if (e === undefined) {
  10974. e = (new Date().getTime() - this._startTime) / 1e3;
  10975. }
  10976. return this._solution ? this._solution.dx(e) : 0;
  10977. };
  10978. Spring.prototype.setEnd = function (e, t, n) {
  10979. if (!n) {
  10980. n = new Date().getTime();
  10981. }
  10982. if (e !== this._endPosition || !a(t, 0.4)) {
  10983. t = t || 0;
  10984. var i = this._endPosition;
  10985. if (this._solution) {
  10986. if (a(t, 0.4)) {
  10987. t = this._solution.dx((n - this._startTime) / 1e3);
  10988. }
  10989. i = this._solution.x((n - this._startTime) / 1e3);
  10990. if (a(t, 0.4)) {
  10991. t = 0;
  10992. }
  10993. if (a(i, 0.4)) {
  10994. i = 0;
  10995. }
  10996. i += this._endPosition;
  10997. }
  10998. if (!(this._solution && a(i - e, 0.4) && a(t, 0.4))) {
  10999. this._endPosition = e;
  11000. this._solution = this._solve(i - this._endPosition, t);
  11001. this._startTime = n;
  11002. }
  11003. }
  11004. };
  11005. Spring.prototype.snap = function (e) {
  11006. this._startTime = new Date().getTime();
  11007. this._endPosition = e;
  11008. this._solution = {
  11009. x: function x() {
  11010. return 0;
  11011. },
  11012. dx: function dx() {
  11013. return 0;
  11014. }
  11015. };
  11016. };
  11017. Spring.prototype.done = function (e) {
  11018. if (!e) {
  11019. e = new Date().getTime();
  11020. }
  11021. return o(this.x(), this._endPosition, 0.4) && a(this.dx(), 0.4);
  11022. };
  11023. Spring.prototype.reconfigure = function (e, t, n) {
  11024. this._m = e;
  11025. this._k = t;
  11026. this._c = n;
  11027. if (!this.done()) {
  11028. this._solution = this._solve(this.x() - this._endPosition, this.dx());
  11029. this._startTime = new Date().getTime();
  11030. }
  11031. };
  11032. Spring.prototype.springConstant = function () {
  11033. return this._k;
  11034. };
  11035. Spring.prototype.damping = function () {
  11036. return this._c;
  11037. };
  11038. Spring.prototype.configuration = function () {
  11039. function e(e, t) {
  11040. e.reconfigure(1, t, e.damping());
  11041. }
  11042. function t(e, t) {
  11043. e.reconfigure(1, e.springConstant(), t);
  11044. }
  11045. return [{
  11046. label: 'Spring Constant',
  11047. read: this.springConstant.bind(this),
  11048. write: e.bind(this, this),
  11049. min: 100,
  11050. max: 1e3
  11051. }, {
  11052. label: 'Damping',
  11053. read: this.damping.bind(this),
  11054. write: t.bind(this, this),
  11055. min: 1,
  11056. max: 500
  11057. }];
  11058. };
  11059. /***/ }),
  11060. /* 63 */
  11061. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11062. "use strict";
  11063. var base = ['borderRadius', 'borderColor', 'borderWidth', 'backgroundColor'];
  11064. var text = ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'color', 'textAlign', 'lineHeight', 'fontSize', 'fontWeight', 'textOverflow', 'whiteSpace'];
  11065. var image = [];
  11066. var textAlign = {
  11067. start: 'left',
  11068. end: 'right'
  11069. };
  11070. var index = 0;
  11071. /* harmony default export */ __webpack_exports__["a"] = ({
  11072. name: 'Cover',
  11073. data: function data() {
  11074. return {
  11075. style: {}
  11076. };
  11077. },
  11078. computed: {
  11079. viewPosition: function viewPosition() {
  11080. var position = {};
  11081. for (var key in this.position) {
  11082. var val = this.position[key];
  11083. var valNumber = parseFloat(val);
  11084. var parentValNumber = parseFloat(this._nativeParent.position[key]);
  11085. if (key === 'top' || key === 'left') {
  11086. val = Math.max(valNumber, parentValNumber) + 'px';
  11087. } else if (key === 'width' || key === 'height') {
  11088. var _base = key === 'width' ? 'left' : 'left';
  11089. var parentStart = parseFloat(this._nativeParent.position[_base]);
  11090. var viewStart = parseFloat(this.position[_base]);
  11091. var diff1 = Math.max(parentStart - viewStart, 0);
  11092. var diff2 = Math.max(viewStart + valNumber - (parentStart + parentValNumber), 0);
  11093. val = Math.max(valNumber - diff1 - diff2, 0) + 'px';
  11094. }
  11095. position[key] = val;
  11096. }
  11097. return position;
  11098. },
  11099. tags: function tags() {
  11100. var position = this._getTagPosition();
  11101. var style = this.style;
  11102. var tags = [{
  11103. tag: 'rect',
  11104. position: position,
  11105. rectStyles: {
  11106. color: style.backgroundColor,
  11107. radius: style.borderRadius,
  11108. borderColor: style.borderColor,
  11109. borderWidth: style.borderWidth
  11110. }
  11111. }];
  11112. if (this.coverType === 'image') {
  11113. tags.push({
  11114. tag: 'img',
  11115. position: position,
  11116. src: this.coverContent
  11117. });
  11118. } else {
  11119. var lineSpacing = parseFloat(style.lineHeight) - parseFloat(style.fontSize);
  11120. var width = parseFloat(position.width) - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight);
  11121. width = width < 0 ? 0 : width;
  11122. var height = parseFloat(position.height) - parseFloat(style.paddingTop) - lineSpacing / 2 - parseFloat(style.paddingBottom);
  11123. height = height < 0 ? 0 : height;
  11124. tags.push({
  11125. tag: 'font',
  11126. position: {
  11127. top: "".concat(parseFloat(position.top) + parseFloat(style.paddingTop) + lineSpacing / 2, "px"),
  11128. left: "".concat(parseFloat(position.left) + parseFloat(style.paddingLeft), "px"),
  11129. width: "".concat(width, "px"),
  11130. height: "".concat(height, "px")
  11131. },
  11132. textStyles: {
  11133. align: textAlign[style.textAlign] || style.textAlign,
  11134. color: style.color,
  11135. decoration: 'none',
  11136. lineSpacing: "".concat(lineSpacing, "px"),
  11137. margin: '0px',
  11138. overflow: style.textOverflow,
  11139. size: style.fontSize,
  11140. verticalAlign: 'top',
  11141. weight: style.fontWeight,
  11142. whiteSpace: style.whiteSpace
  11143. },
  11144. text: this.coverContent
  11145. });
  11146. }
  11147. return tags;
  11148. }
  11149. },
  11150. created: function created() {
  11151. var $parent = this.$parent;
  11152. while (!$parent.isNative && $parent !== this.$root) {
  11153. $parent = $parent.$parent;
  11154. }
  11155. this._nativeParent = $parent;
  11156. },
  11157. mounted: function mounted() {
  11158. var _this = this;
  11159. this._updateStyle();
  11160. var $nativeParent = this._nativeParent;
  11161. if ($nativeParent.isNative) {
  11162. if ($nativeParent._isMounted) {
  11163. this._onCanInsert();
  11164. } else {
  11165. $nativeParent.onCanInsertCallbacks.push(function () {
  11166. _this._onCanInsert();
  11167. });
  11168. }
  11169. this.$watch('hidden', function (val) {
  11170. _this.cover && _this.cover[val ? 'hide' : 'show']();
  11171. });
  11172. this.$watch('viewPosition', function (val) {
  11173. _this.cover && _this.cover.setStyle(val);
  11174. }, {
  11175. deep: true
  11176. });
  11177. this.$watch('tags', function () {
  11178. var cover = _this.cover;
  11179. if (cover) {
  11180. cover.reset();
  11181. cover.draw(_this.tags);
  11182. }
  11183. }, {
  11184. deep: true
  11185. });
  11186. this.$on('uni-view-update', this._requestStyleUpdate);
  11187. }
  11188. },
  11189. beforeDestroy: function beforeDestroy() {
  11190. if (this._nativeParent.isNative) {
  11191. this.cover && this.cover.close();
  11192. delete this.cover;
  11193. }
  11194. },
  11195. methods: {
  11196. _onCanInsert: function _onCanInsert() {
  11197. var _this2 = this;
  11198. var cover = this.cover = new plus.nativeObj.View("cover-".concat(Date.now(), "-").concat(index++), this.viewPosition, this.tags);
  11199. plus.webview.currentWebview().append(cover);
  11200. if (this.hidden) {
  11201. cover.hide();
  11202. }
  11203. cover.addEventListener('click', function () {
  11204. _this2.$trigger('click', {}, {});
  11205. });
  11206. },
  11207. _getTagPosition: function _getTagPosition() {
  11208. var position = {};
  11209. for (var key in this.position) {
  11210. var val = this.position[key];
  11211. if (key === 'top' || key === 'left') {
  11212. val = Math.min(parseFloat(val) - parseFloat(this._nativeParent.position[key]), 0) + 'px';
  11213. }
  11214. position[key] = val;
  11215. }
  11216. return position;
  11217. },
  11218. _updateStyle: function _updateStyle() {
  11219. var _this3 = this;
  11220. var style = getComputedStyle(this.$el);
  11221. base.concat(text, image).forEach(function (key) {
  11222. _this3.style[key] = style[key];
  11223. });
  11224. },
  11225. _requestStyleUpdate: function _requestStyleUpdate() {
  11226. var _this4 = this;
  11227. if (this._styleUpdateRequest) {
  11228. cancelAnimationFrame(this._styleUpdateRequest);
  11229. }
  11230. this._styleUpdateRequest = requestAnimationFrame(function () {
  11231. delete _this4._styleUpdateRequest;
  11232. _this4._updateStyle();
  11233. });
  11234. }
  11235. }
  11236. });
  11237. /***/ }),
  11238. /* 64 */
  11239. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11240. "use strict";
  11241. // EXTERNAL MODULE: ./src/core/view/mixins/scroller/Friction.js
  11242. var Friction = __webpack_require__(61);
  11243. // EXTERNAL MODULE: ./src/core/view/mixins/scroller/Spring.js
  11244. var Spring = __webpack_require__(62);
  11245. // CONCATENATED MODULE: ./src/core/view/mixins/scroller/Scroll.js
  11246. function Scroll(extent, friction, spring) {
  11247. this._extent = extent;
  11248. this._friction = friction || new Friction["a" /* Friction */](0.01);
  11249. this._spring = spring || new Spring["a" /* Spring */](1, 90, 20);
  11250. this._startTime = 0;
  11251. this._springing = false;
  11252. this._springOffset = 0;
  11253. }
  11254. Scroll.prototype.snap = function (e, t) {
  11255. this._springOffset = 0;
  11256. this._springing = true;
  11257. this._spring.snap(e);
  11258. this._spring.setEnd(t);
  11259. };
  11260. Scroll.prototype.set = function (e, t) {
  11261. this._friction.set(e, t);
  11262. if (e > 0 && t >= 0) {
  11263. this._springOffset = 0;
  11264. this._springing = true;
  11265. this._spring.snap(e);
  11266. this._spring.setEnd(0);
  11267. } else {
  11268. if (e < -this._extent && t <= 0) {
  11269. this._springOffset = 0;
  11270. this._springing = true;
  11271. this._spring.snap(e);
  11272. this._spring.setEnd(-this._extent);
  11273. } else {
  11274. this._springing = false;
  11275. }
  11276. }
  11277. this._startTime = new Date().getTime();
  11278. };
  11279. Scroll.prototype.x = function (e) {
  11280. if (!this._startTime) {
  11281. return 0;
  11282. }
  11283. if (!e) {
  11284. e = (new Date().getTime() - this._startTime) / 1e3;
  11285. }
  11286. if (this._springing) {
  11287. return this._spring.x() + this._springOffset;
  11288. }
  11289. var t = this._friction.x(e);
  11290. var n = this.dx(e);
  11291. if (t > 0 && n >= 0 || t < -this._extent && n <= 0) {
  11292. this._springing = true;
  11293. this._spring.setEnd(0, n);
  11294. if (t < -this._extent) {
  11295. this._springOffset = -this._extent;
  11296. } else {
  11297. this._springOffset = 0;
  11298. }
  11299. t = this._spring.x() + this._springOffset;
  11300. }
  11301. return t;
  11302. };
  11303. Scroll.prototype.dx = function (e) {
  11304. var t = 0;
  11305. t = this._lastTime === e ? this._lastDx : this._springing ? this._spring.dx(e) : this._friction.dx(e);
  11306. this._lastTime = e;
  11307. this._lastDx = t;
  11308. return t;
  11309. };
  11310. Scroll.prototype.done = function () {
  11311. return this._springing ? this._spring.done() : this._friction.done();
  11312. };
  11313. Scroll.prototype.setVelocityByEnd = function (e) {
  11314. this._friction.setVelocityByEnd(e);
  11315. };
  11316. Scroll.prototype.configuration = function () {
  11317. var e = this._friction.configuration();
  11318. e.push.apply(e, this._spring.configuration());
  11319. return e;
  11320. };
  11321. // CONCATENATED MODULE: ./src/core/view/mixins/scroller/Scroller.js
  11322. function i(scroll, t, n) {
  11323. function i(t, scroll, r, o) {
  11324. if (!t || !t.cancelled) {
  11325. r(scroll);
  11326. var a = scroll.done();
  11327. if (!a) {
  11328. if (!t.cancelled) {
  11329. t.id = requestAnimationFrame(i.bind(null, t, scroll, r, o));
  11330. }
  11331. }
  11332. if (a && o) {
  11333. o(scroll);
  11334. }
  11335. }
  11336. }
  11337. function r(scroll) {
  11338. if (scroll && scroll.id) {
  11339. cancelAnimationFrame(scroll.id);
  11340. }
  11341. if (scroll) {
  11342. scroll.cancelled = true;
  11343. }
  11344. }
  11345. var o = {
  11346. id: 0,
  11347. cancelled: false
  11348. };
  11349. i(o, scroll, t, n);
  11350. return {
  11351. cancel: r.bind(null, o),
  11352. model: scroll
  11353. };
  11354. }
  11355. function Scroller(element, options) {
  11356. options = options || {};
  11357. this._element = element;
  11358. this._options = options;
  11359. this._enableSnap = options.enableSnap || false;
  11360. this._itemSize = options.itemSize || 0;
  11361. this._enableX = options.enableX || false;
  11362. this._enableY = options.enableY || false;
  11363. this._shouldDispatchScrollEvent = !!options.onScroll;
  11364. if (this._enableX) {
  11365. this._extent = (options.scrollWidth || this._element.offsetWidth) - this._element.parentElement.offsetWidth;
  11366. this._scrollWidth = options.scrollWidth;
  11367. } else {
  11368. this._extent = (options.scrollHeight || this._element.offsetHeight) - this._element.parentElement.offsetHeight;
  11369. this._scrollHeight = options.scrollHeight;
  11370. }
  11371. this._position = 0;
  11372. this._scroll = new Scroll(this._extent, options.friction, options.spring);
  11373. this._onTransitionEnd = this.onTransitionEnd.bind(this);
  11374. this.updatePosition();
  11375. }
  11376. Scroller.prototype.onTouchStart = function () {
  11377. this._startPosition = this._position;
  11378. this._lastChangePos = this._startPosition;
  11379. if (this._startPosition > 0) {
  11380. this._startPosition /= 0.5;
  11381. } else {
  11382. if (this._startPosition < -this._extent) {
  11383. this._startPosition = (this._startPosition + this._extent) / 0.5 - this._extent;
  11384. }
  11385. }
  11386. if (this._animation) {
  11387. this._animation.cancel();
  11388. this._scrolling = false;
  11389. }
  11390. this.updatePosition();
  11391. };
  11392. Scroller.prototype.onTouchMove = function (x, y) {
  11393. var startPosition = this._startPosition;
  11394. if (this._enableX) {
  11395. startPosition += x;
  11396. } else if (this._enableY) {
  11397. startPosition += y;
  11398. }
  11399. if (startPosition > 0) {
  11400. startPosition *= 0.5;
  11401. } else if (startPosition < -this._extent) {
  11402. startPosition = 0.5 * (startPosition + this._extent) - this._extent;
  11403. }
  11404. this._position = startPosition;
  11405. this.updatePosition();
  11406. this.dispatchScroll();
  11407. };
  11408. Scroller.prototype.onTouchEnd = function (e, r, o) {
  11409. var _this = this;
  11410. if (this._enableSnap && this._position > -this._extent && this._position < 0) {
  11411. if (this._enableY && (Math.abs(r) < this._itemSize && Math.abs(o.y) < 300 || Math.abs(o.y) < 150)) {
  11412. this.snap();
  11413. return;
  11414. }
  11415. if (this._enableX && (Math.abs(e) < this._itemSize && Math.abs(o.x) < 300 || Math.abs(o.x) < 150)) {
  11416. this.snap();
  11417. return;
  11418. }
  11419. }
  11420. if (this._enableX) {
  11421. this._scroll.set(this._position, o.x);
  11422. } else if (this._enableY) {
  11423. this._scroll.set(this._position, o.y);
  11424. }
  11425. if (this._enableSnap) {
  11426. var s = this._scroll._friction.x(100);
  11427. var l = s % this._itemSize;
  11428. var c = Math.abs(l) > this._itemSize / 2 ? s - (this._itemSize - Math.abs(l)) : s - l;
  11429. if (c <= 0 && c >= -this._extent) {
  11430. this._scroll.setVelocityByEnd(c);
  11431. }
  11432. }
  11433. this._lastTime = Date.now();
  11434. this._lastDelay = 0;
  11435. this._scrolling = true;
  11436. this._lastChangePos = this._position;
  11437. this._lastIdx = Math.floor(Math.abs(this._position / this._itemSize));
  11438. this._animation = i(this._scroll, function () {
  11439. var e = Date.now();
  11440. var i = (e - _this._scroll._startTime) / 1e3;
  11441. var r = _this._scroll.x(i);
  11442. _this._position = r;
  11443. _this.updatePosition();
  11444. var o = _this._scroll.dx(i);
  11445. if (_this._shouldDispatchScrollEvent && e - _this._lastTime > _this._lastDelay) {
  11446. _this.dispatchScroll();
  11447. _this._lastDelay = Math.abs(2e3 / o);
  11448. _this._lastTime = e;
  11449. }
  11450. }, function () {
  11451. if (_this._enableSnap) {
  11452. if (c <= 0 && c >= -_this._extent) {
  11453. _this._position = c;
  11454. _this.updatePosition();
  11455. }
  11456. if (typeof _this._options.onSnap === 'function') {
  11457. _this._options.onSnap(Math.floor(Math.abs(_this._position) / _this._itemSize));
  11458. }
  11459. }
  11460. if (_this._shouldDispatchScrollEvent) {
  11461. _this.dispatchScroll();
  11462. }
  11463. _this._scrolling = false;
  11464. });
  11465. };
  11466. Scroller.prototype.onTransitionEnd = function () {
  11467. this._element.style.transition = '';
  11468. this._element.style.webkitTransition = '';
  11469. this._element.removeEventListener('transitionend', this._onTransitionEnd);
  11470. this._element.removeEventListener('webkitTransitionEnd', this._onTransitionEnd);
  11471. if (this._snapping) {
  11472. this._snapping = false;
  11473. }
  11474. this.dispatchScroll();
  11475. };
  11476. Scroller.prototype.snap = function () {
  11477. var e = this._itemSize;
  11478. var t = this._position % e;
  11479. var i = Math.abs(t) > this._itemSize / 2 ? this._position - (e - Math.abs(t)) : this._position - t;
  11480. if (this._position !== i) {
  11481. this._snapping = true;
  11482. this.scrollTo(-i);
  11483. if (typeof this._options.onSnap === 'function') {
  11484. this._options.onSnap(Math.floor(Math.abs(this._position) / this._itemSize));
  11485. }
  11486. }
  11487. };
  11488. Scroller.prototype.scrollTo = function (e, t) {
  11489. if (this._animation) {
  11490. this._animation.cancel();
  11491. this._scrolling = false;
  11492. }
  11493. if (typeof e === 'number') {
  11494. this._position = -e;
  11495. }
  11496. if (this._position < -this._extent) {
  11497. this._position = -this._extent;
  11498. } else {
  11499. if (this._position > 0) {
  11500. this._position = 0;
  11501. }
  11502. }
  11503. this._element.style.transition = 'transform ' + (t || 0.2) + 's ease-out';
  11504. this._element.style.webkitTransition = '-webkit-transform ' + (t || 0.2) + 's ease-out';
  11505. this.updatePosition();
  11506. this._element.addEventListener('transitionend', this._onTransitionEnd);
  11507. this._element.addEventListener('webkitTransitionEnd', this._onTransitionEnd);
  11508. };
  11509. Scroller.prototype.dispatchScroll = function () {
  11510. if (typeof this._options.onScroll === 'function' && Math.round(this._lastPos) !== Math.round(this._position)) {
  11511. this._lastPos = this._position;
  11512. var e = {
  11513. target: {
  11514. scrollLeft: this._enableX ? -this._position : 0,
  11515. scrollTop: this._enableY ? -this._position : 0,
  11516. scrollHeight: this._scrollHeight || this._element.offsetHeight,
  11517. scrollWidth: this._scrollWidth || this._element.offsetWidth,
  11518. offsetHeight: this._element.parentElement.offsetHeight,
  11519. offsetWidth: this._element.parentElement.offsetWidth
  11520. }
  11521. };
  11522. this._options.onScroll(e);
  11523. }
  11524. };
  11525. Scroller.prototype.update = function (e, t, n) {
  11526. var i = 0;
  11527. var r = this._position;
  11528. if (this._enableX) {
  11529. i = this._element.childNodes.length ? (t || this._element.offsetWidth) - this._element.parentElement.offsetWidth : 0;
  11530. this._scrollWidth = t;
  11531. } else {
  11532. i = this._element.childNodes.length ? (t || this._element.offsetHeight) - this._element.parentElement.offsetHeight : 0;
  11533. this._scrollHeight = t;
  11534. }
  11535. if (typeof e === 'number') {
  11536. this._position = -e;
  11537. }
  11538. if (this._position < -i) {
  11539. this._position = -i;
  11540. } else {
  11541. if (this._position > 0) {
  11542. this._position = 0;
  11543. }
  11544. }
  11545. this._itemSize = n || this._itemSize;
  11546. this.updatePosition();
  11547. if (r !== this._position) {
  11548. this.dispatchScroll();
  11549. if (typeof this._options.onSnap === 'function') {
  11550. this._options.onSnap(Math.floor(Math.abs(this._position) / this._itemSize));
  11551. }
  11552. }
  11553. this._extent = i;
  11554. this._scroll._extent = i;
  11555. };
  11556. Scroller.prototype.updatePosition = function () {
  11557. var transform = '';
  11558. if (this._enableX) {
  11559. transform = 'translateX(' + this._position + 'px) translateZ(0)';
  11560. } else {
  11561. if (this._enableY) {
  11562. transform = 'translateY(' + this._position + 'px) translateZ(0)';
  11563. }
  11564. }
  11565. this._element.style.webkitTransform = transform;
  11566. this._element.style.transform = transform;
  11567. };
  11568. Scroller.prototype.isScrolling = function () {
  11569. return this._scrolling || this._snapping;
  11570. };
  11571. // CONCATENATED MODULE: ./src/core/view/mixins/scroller/index.js
  11572. /* harmony default export */ var scroller = __webpack_exports__["a"] = ({
  11573. methods: {
  11574. initScroller: function initScroller(element, options) {
  11575. this._touchInfo = {
  11576. trackingID: -1,
  11577. maxDy: 0,
  11578. maxDx: 0
  11579. };
  11580. this._scroller = new Scroller(element, options);
  11581. this.__handleTouchStart = this._handleTouchStart.bind(this);
  11582. this.__handleTouchMove = this._handleTouchMove.bind(this);
  11583. this.__handleTouchEnd = this._handleTouchEnd.bind(this);
  11584. this._initedScroller = true;
  11585. },
  11586. _findDelta: function _findDelta(event) {
  11587. var touchInfo = this._touchInfo;
  11588. return event.detail.state === 'move' || event.detail.state === 'end' ? {
  11589. x: event.detail.dx,
  11590. y: event.detail.dy
  11591. } : {
  11592. x: event.screenX - touchInfo.x,
  11593. y: event.screenY - touchInfo.y
  11594. };
  11595. },
  11596. _handleTouchStart: function _handleTouchStart(e) {
  11597. var t = this._touchInfo;
  11598. var n = this._scroller;
  11599. if (n) {
  11600. if (e.detail.state === 'start') {
  11601. t.trackingID = 'touch';
  11602. t.x = e.detail.x;
  11603. t.y = e.detail.y;
  11604. } else {
  11605. t.trackingID = 'mouse';
  11606. t.x = e.screenX;
  11607. t.y = e.screenY;
  11608. }
  11609. t.maxDx = 0;
  11610. t.maxDy = 0;
  11611. t.historyX = [0];
  11612. t.historyY = [0];
  11613. t.historyTime = [e.detail.timeStamp];
  11614. t.listener = n;
  11615. if (n.onTouchStart) {
  11616. n.onTouchStart();
  11617. }
  11618. event.preventDefault();
  11619. }
  11620. },
  11621. _handleTouchMove: function _handleTouchMove(event) {
  11622. var touchInfo = this._touchInfo;
  11623. if (touchInfo.trackingID !== -1) {
  11624. event.preventDefault();
  11625. var delta = this._findDelta(event);
  11626. if (delta) {
  11627. for (touchInfo.maxDy = Math.max(touchInfo.maxDy, Math.abs(delta.y)), touchInfo.maxDx = Math.max(touchInfo.maxDx, Math.abs(delta.x)), touchInfo.historyX.push(delta.x), touchInfo.historyY.push(delta.y), touchInfo.historyTime.push(event.detail.timeStamp); touchInfo.historyTime.length > 10;) {
  11628. touchInfo.historyTime.shift();
  11629. touchInfo.historyX.shift();
  11630. touchInfo.historyY.shift();
  11631. }
  11632. if (touchInfo.listener && touchInfo.listener.onTouchMove) {
  11633. touchInfo.listener.onTouchMove(delta.x, delta.y, event.detail.timeStamp);
  11634. }
  11635. }
  11636. }
  11637. },
  11638. _handleTouchEnd: function _handleTouchEnd(event) {
  11639. var touchInfo = this._touchInfo;
  11640. if (touchInfo.trackingID !== -1) {
  11641. event.preventDefault();
  11642. var delta = this._findDelta(event);
  11643. if (delta) {
  11644. var listener = touchInfo.listener;
  11645. touchInfo.trackingID = -1;
  11646. touchInfo.listener = null;
  11647. var r = touchInfo.historyTime.length;
  11648. var o = {
  11649. x: 0,
  11650. y: 0
  11651. };
  11652. if (r > 2) {
  11653. for (var a = touchInfo.historyTime.length - 1, s = touchInfo.historyTime[a], l = touchInfo.historyX[a], c = touchInfo.historyY[a]; a > 0;) {
  11654. a--;
  11655. var u = touchInfo.historyTime[a];
  11656. var d = s - u;
  11657. if (d > 30 && d < 50) {
  11658. o.x = (l - touchInfo.historyX[a]) / (d / 1e3);
  11659. o.y = (c - touchInfo.historyY[a]) / (d / 1e3);
  11660. break;
  11661. }
  11662. }
  11663. }
  11664. touchInfo.historyTime = [];
  11665. touchInfo.historyX = [];
  11666. touchInfo.historyY = [];
  11667. if (listener && listener.onTouchEnd) {
  11668. listener.onTouchEnd(delta.x, delta.y, o);
  11669. }
  11670. }
  11671. }
  11672. }
  11673. }
  11674. });
  11675. /***/ }),
  11676. /* 65 */
  11677. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11678. "use strict";
  11679. // EXPORTS
  11680. __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ getRealPath; });
  11681. // CONCATENATED MODULE: ./src/core/helpers/get-real-route.js
  11682. function getRealRoute(fromRoute, toRoute) {
  11683. if (!toRoute) {
  11684. toRoute = fromRoute;
  11685. if (toRoute.indexOf('/') === 0) {
  11686. return toRoute;
  11687. }
  11688. var pages = getCurrentPages();
  11689. if (pages.length) {
  11690. fromRoute = pages[pages.length - 1].$page.route;
  11691. } else {
  11692. fromRoute = '';
  11693. }
  11694. } else {
  11695. if (toRoute.indexOf('/') === 0) {
  11696. return toRoute;
  11697. }
  11698. }
  11699. if (toRoute.indexOf('./') === 0) {
  11700. return getRealRoute(fromRoute, toRoute.substr(2));
  11701. }
  11702. var toRouteArray = toRoute.split('/');
  11703. var toRouteLength = toRouteArray.length;
  11704. var i = 0;
  11705. for (; i < toRouteLength && toRouteArray[i] === '..'; i++) {// noop
  11706. }
  11707. toRouteArray.splice(0, i);
  11708. toRoute = toRouteArray.join('/');
  11709. var fromRouteArray = fromRoute.length > 0 ? fromRoute.split('/') : [];
  11710. fromRouteArray.splice(fromRouteArray.length - i - 1, i + 1);
  11711. return '/' + fromRouteArray.concat(toRouteArray).join('/');
  11712. }
  11713. // CONCATENATED MODULE: ./src/platforms/app-plus/helpers/get-real-path.js
  11714. var SCHEME_RE = /^([a-z-]+:)?\/\//i;
  11715. var DATA_RE = /^data:.*,.*/; // 处理 Android 平台解压与非解压模式下获取的路径不一致的情况
  11716. function handleLocalPath(filePath) {
  11717. return plus.io.convertLocalFileSystemURL(filePath).replace(/^\/?apps\//, '/android_asset/apps/').replace(/\/$/, '');
  11718. }
  11719. var wwwPath;
  11720. function addBase(filePath) {
  11721. if (!wwwPath) {
  11722. // 需要时,初始化一次,外部直接初始化,需要等 plusready
  11723. wwwPath = 'file://' + handleLocalPath('_www') + '/';
  11724. }
  11725. return wwwPath + filePath;
  11726. }
  11727. function getRealPath(filePath) {
  11728. if (filePath.indexOf('/') === 0) {
  11729. if (filePath.indexOf('//') === 0) {
  11730. filePath = 'https:' + filePath;
  11731. } else {
  11732. return addBase(filePath.substr(1));
  11733. }
  11734. } // 网络资源或base64
  11735. if (SCHEME_RE.test(filePath) || DATA_RE.test(filePath) || filePath.indexOf('blob:') === 0) {
  11736. return filePath;
  11737. } // _do=>_doc,_documents,_downloads
  11738. if (filePath.indexOf('_www') === 0 || filePath.indexOf('_do') === 0) {
  11739. return 'file://' + handleLocalPath(filePath);
  11740. }
  11741. var pages = getCurrentPages();
  11742. if (pages.length) {
  11743. return addBase(getRealRoute(pages[pages.length - 1].$page.route, filePath).substr(1));
  11744. }
  11745. return filePath;
  11746. }
  11747. /***/ }),
  11748. /* 66 */
  11749. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11750. "use strict";
  11751. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return requestComponentObserver; });
  11752. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return destroyComponentObserver; });
  11753. /* harmony import */ var intersection_observer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87);
  11754. /* harmony import */ var intersection_observer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(intersection_observer__WEBPACK_IMPORTED_MODULE_0__);
  11755. /* harmony import */ var uni_helpers_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
  11756. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56);
  11757. function getRect(rect) {
  11758. return {
  11759. bottom: rect.bottom,
  11760. height: rect.height,
  11761. left: rect.left,
  11762. right: rect.right,
  11763. top: rect.top,
  11764. width: rect.width
  11765. };
  11766. }
  11767. var intersectionObservers = {};
  11768. function requestComponentObserver(_ref, pageId) {
  11769. var reqId = _ref.reqId,
  11770. component = _ref.component,
  11771. options = _ref.options;
  11772. var pages = getCurrentPages();
  11773. var page = pages.find(function (page) {
  11774. return page.$page.id === pageId;
  11775. });
  11776. if (!page) {
  11777. throw new Error("Not Found\uFF1APage[".concat(pageId, "]"));
  11778. }
  11779. var pageVm = page.$vm;
  11780. var $el = Object(_util__WEBPACK_IMPORTED_MODULE_2__[/* findElm */ "a"])(component, pageVm);
  11781. var root = options.relativeToSelector ? $el.querySelector(options.relativeToSelector) : null;
  11782. var intersectionObserver = intersectionObservers[reqId] = new IntersectionObserver(function (entries, observer) {
  11783. entries.forEach(function (entrie) {
  11784. UniViewJSBridge.publishHandler('onRequestComponentObserver', {
  11785. reqId: reqId,
  11786. res: {
  11787. intersectionRatio: entrie.intersectionRatio,
  11788. intersectionRect: getRect(entrie.intersectionRect),
  11789. boundingClientRect: getRect(entrie.boundingClientRect),
  11790. relativeRect: getRect(entrie.rootBounds),
  11791. time: Date.now(),
  11792. dataset: Object(uni_helpers_index__WEBPACK_IMPORTED_MODULE_1__[/* normalizeDataset */ "c"])(entrie.target.dataset || {}),
  11793. id: entrie.target.id
  11794. }
  11795. }, pageVm.$page.id);
  11796. });
  11797. }, {
  11798. root: root,
  11799. rootMargin: options.rootMargin,
  11800. threshold: options.thresholds
  11801. });
  11802. if (options.observeAll) {
  11803. intersectionObserver.USE_MUTATION_OBSERVER = true;
  11804. Array.prototype.map.call($el.querySelectorAll(options.selector), function (el) {
  11805. intersectionObserver.observe(el);
  11806. });
  11807. } else {
  11808. intersectionObserver.USE_MUTATION_OBSERVER = false;
  11809. intersectionObserver.observe($el.querySelector(options.selector));
  11810. }
  11811. }
  11812. function destroyComponentObserver(_ref2) {
  11813. var reqId = _ref2.reqId;
  11814. var intersectionObserver = intersectionObservers[reqId];
  11815. if (intersectionObserver) {
  11816. intersectionObserver.disconnect();
  11817. UniViewJSBridge.publishHandler('onRequestComponentObserver', {
  11818. reqId: reqId,
  11819. reqEnd: true
  11820. });
  11821. }
  11822. }
  11823. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  11824. /***/ }),
  11825. /* 67 */
  11826. /***/ (function(module, exports) {
  11827. module.exports = ['uni-app', 'uni-tabbar', 'uni-page', 'uni-page-head', 'uni-page-wrapper', 'uni-page-body', 'uni-page-refresh', 'uni-actionsheet', 'uni-modal', 'uni-toast', 'uni-resize-sensor', 'uni-shadow-root', 'uni-ad', 'uni-audio', 'uni-button', 'uni-camera', 'uni-canvas', 'uni-checkbox', 'uni-checkbox-group', 'uni-cover-image', 'uni-cover-view', 'uni-editor', 'uni-form', 'uni-functional-page-navigator', 'uni-icon', 'uni-image', 'uni-input', 'uni-label', 'uni-live-player', 'uni-live-pusher', 'uni-map', 'uni-movable-area', 'uni-movable-view', 'uni-navigator', 'uni-official-account', 'uni-open-data', 'uni-picker', 'uni-picker-view', 'uni-picker-view-column', 'uni-progress', 'uni-radio', 'uni-radio-group', 'uni-rich-text', 'uni-scroll-view', 'uni-slider', 'uni-swiper', 'uni-swiper-item', 'uni-switch', 'uni-text', 'uni-textarea', 'uni-video', 'uni-view', 'uni-web-view'];
  11828. /***/ }),
  11829. /* 68 */
  11830. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11831. "use strict";
  11832. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge, global) {/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
  11833. /* harmony import */ var uni_platform_view_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88);
  11834. /* harmony import */ var uni_platform_view_index_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(uni_platform_view_index_css__WEBPACK_IMPORTED_MODULE_1__);
  11835. /* harmony import */ var uni_platform_page_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58);
  11836. /* harmony import */ var uni_platform_view_framework_page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59);
  11837. /* harmony import */ var uni_platform_view_framework_plugins_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84);
  11838. /* harmony import */ var _view_api_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(74);
  11839. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["a"]; });
  11840. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["b"]; });
  11841. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["c"]; });
  11842. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "d", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["d"]; });
  11843. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "e", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["e"]; });
  11844. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "f", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["f"]; });
  11845. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "g", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["g"]; });
  11846. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "h", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["h"]; });
  11847. global.UniViewJSBridge = {
  11848. publishHandler: UniViewJSBridge.publishHandler,
  11849. subscribeHandler: UniViewJSBridge.subscribeHandler
  11850. };
  11851. global.getCurrentPages = uni_platform_view_framework_page__WEBPACK_IMPORTED_MODULE_3__[/* getCurrentPages */ "a"];
  11852. global.__definePage = uni_platform_page_factory__WEBPACK_IMPORTED_MODULE_2__[/* definePage */ "a"];
  11853. global.Vue = vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"];
  11854. vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].use(uni_platform_view_framework_plugins_index__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]);
  11855. __webpack_require__(152);
  11856. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4), __webpack_require__(16)))
  11857. /***/ }),
  11858. /* 69 */
  11859. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11860. "use strict";
  11861. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
  11862. /* harmony default export */ __webpack_exports__["a"] = ({
  11863. props: {
  11864. id: {
  11865. type: String,
  11866. default: ''
  11867. }
  11868. },
  11869. created: function created() {
  11870. var _this = this;
  11871. this._addListeners(this.id); // 初始化监听
  11872. this.$watch('id', function (newId, oldId) {
  11873. // watch id
  11874. _this._removeListeners(oldId, true);
  11875. _this._addListeners(newId, true);
  11876. });
  11877. },
  11878. beforeDestroy: function beforeDestroy() {
  11879. // 销毁时移除
  11880. this._removeListeners(this.id);
  11881. },
  11882. methods: {
  11883. _addListeners: function _addListeners(id, watch) {
  11884. var _this2 = this;
  11885. if (watch && !id) {
  11886. // id被置空
  11887. return;
  11888. }
  11889. var listeners = this.$options.listeners;
  11890. if (!Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* isPlainObject */ "e"])(listeners)) {
  11891. return;
  11892. }
  11893. Object.keys(listeners).forEach(function (name) {
  11894. if (watch) {
  11895. // watch id
  11896. if (name.indexOf('@') !== 0 && name.indexOf('uni-') !== 0) {
  11897. /* eslint-disable standard/computed-property-even-spacing */
  11898. UniViewJSBridge.on("uni-".concat(name, "-").concat(_this2.$page.id, "-").concat(id), _this2[listeners[name]]);
  11899. }
  11900. } else {
  11901. if (name.indexOf('@') === 0) {
  11902. /* eslint-disable standard/computed-property-even-spacing */
  11903. _this2.$on("uni-".concat(name.substr(1)), _this2[listeners[name]]);
  11904. } else if (name.indexOf('uni-') === 0) {
  11905. // 完全限定
  11906. /* eslint-disable standard/computed-property-even-spacing */
  11907. UniViewJSBridge.on(name, _this2[listeners[name]]);
  11908. } else if (id) {
  11909. // scoped
  11910. /* eslint-disable standard/computed-property-even-spacing */
  11911. UniViewJSBridge.on("uni-".concat(name, "-").concat(_this2.$page.id, "-").concat(id), _this2[listeners[name]]);
  11912. }
  11913. }
  11914. });
  11915. },
  11916. _removeListeners: function _removeListeners(id, watch) {
  11917. var _this3 = this;
  11918. if (watch && !id) {
  11919. // id之前不存在
  11920. return;
  11921. }
  11922. var listeners = this.$options.listeners;
  11923. if (!Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* isPlainObject */ "e"])(listeners)) {
  11924. return;
  11925. }
  11926. Object.keys(listeners).forEach(function (name) {
  11927. if (watch) {
  11928. // watch id
  11929. if (name.indexOf('@') !== 0 && name.indexOf('uni-') !== 0) {
  11930. /* eslint-disable standard/computed-property-even-spacing */
  11931. UniViewJSBridge.off("uni-".concat(name, "-").concat(_this3.$page.id, "-").concat(id), _this3[listeners[name]]);
  11932. }
  11933. } else {
  11934. if (name.indexOf('@') === 0) {
  11935. /* eslint-disable standard/computed-property-even-spacing */
  11936. _this3.$off("uni-".concat(name.substr(1)), _this3[listeners[name]]);
  11937. } else if (name.indexOf('uni-') === 0) {
  11938. // 完全限定
  11939. /* eslint-disable standard/computed-property-even-spacing */
  11940. UniViewJSBridge.off(name, _this3[listeners[name]]);
  11941. } else if (id) {
  11942. // scoped
  11943. /* eslint-disable standard/computed-property-even-spacing */
  11944. UniViewJSBridge.off("uni-".concat(name, "-").concat(_this3.$page.id, "-").concat(id), _this3[listeners[name]]);
  11945. }
  11946. }
  11947. });
  11948. }
  11949. }
  11950. });
  11951. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  11952. /***/ }),
  11953. /* 70 */
  11954. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11955. "use strict";
  11956. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
  11957. /* harmony default export */ __webpack_exports__["a"] = ({
  11958. // 取消id的定义,某些组件(canvas)内不在props内定义id
  11959. // props: {
  11960. // id: {
  11961. // type: String,
  11962. // default: ''
  11963. // }
  11964. // },
  11965. mounted: function mounted() {
  11966. var _this = this;
  11967. this._toggleListeners('subscribe', this.id); // 初始化监听
  11968. this.$watch('id', function (newId, oldId) {
  11969. // watch id
  11970. _this._toggleListeners('unsubscribe', oldId, true);
  11971. _this._toggleListeners('subscribe', newId, true);
  11972. });
  11973. },
  11974. beforeDestroy: function beforeDestroy() {
  11975. // 销毁时移除
  11976. this._toggleListeners('unsubscribe', this.id);
  11977. if (this._contextId) {
  11978. this._toggleListeners('unsubscribe', this._contextId);
  11979. }
  11980. },
  11981. methods: {
  11982. _toggleListeners: function _toggleListeners(type, id, watch) {
  11983. if (watch && !id) {
  11984. // id被置空
  11985. return;
  11986. }
  11987. if (!Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* isFn */ "d"])(this._handleSubscribe)) {
  11988. return;
  11989. } // 纠正VUniVideo等组件命名为Video
  11990. UniViewJSBridge[type](this.$page.id + '-' + this.$options.name.replace(/VUni([A-Z])/, '$1').toLowerCase() + '-' + id, this._handleSubscribe);
  11991. },
  11992. _getContextInfo: function _getContextInfo() {
  11993. var id = "context-".concat(this._uid);
  11994. if (!this._contextId) {
  11995. this._toggleListeners('subscribe', id);
  11996. this._contextId = id;
  11997. }
  11998. return {
  11999. name: this.$options.name.replace(/VUni([A-Z])/, '$1').toLowerCase(),
  12000. id: id,
  12001. page: this.$page.id
  12002. };
  12003. }
  12004. }
  12005. });
  12006. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  12007. /***/ }),
  12008. /* 71 */
  12009. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  12010. "use strict";
  12011. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
  12012. function hideKeyboard() {
  12013. document.activeElement.blur();
  12014. }
  12015. /**
  12016. * 保证iOS点击输入框外隐藏键盘
  12017. */
  12018. function iosHideKeyboard() {}
  12019. /* harmony default export */ __webpack_exports__["a"] = ({
  12020. name: 'Keyboard',
  12021. props: {
  12022. cursorSpacing: {
  12023. type: [Number, String],
  12024. default: 0
  12025. },
  12026. showConfirmBar: {
  12027. type: [Boolean, String],
  12028. default: 'auto'
  12029. },
  12030. adjustPosition: {
  12031. type: Boolean,
  12032. default: true
  12033. }
  12034. },
  12035. watch: {
  12036. focus: function focus(val) {
  12037. if (val) {
  12038. this.showSoftKeybord();
  12039. }
  12040. }
  12041. },
  12042. mounted: function mounted() {
  12043. if (this.autoFocus || this.focus) {
  12044. this.showSoftKeybord();
  12045. }
  12046. },
  12047. beforeDestroy: function beforeDestroy() {
  12048. this.onKeyboardHide();
  12049. },
  12050. methods: {
  12051. initKeyboard: function initKeyboard(el) {
  12052. var _this = this;
  12053. el.addEventListener('focus', function () {
  12054. _this.hideKeyboardTemp = function () {
  12055. hideKeyboard();
  12056. };
  12057. UniViewJSBridge.subscribe('hideKeyboard', _this.hideKeyboardTemp);
  12058. document.addEventListener('click', iosHideKeyboard, false);
  12059. _this.setSoftinputNavBar();
  12060. _this.setSoftinputTemporary();
  12061. });
  12062. el.addEventListener('blur', this.onKeyboardHide.bind(this));
  12063. },
  12064. showSoftKeybord: function showSoftKeybord() {
  12065. Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* plusReady */ "g"])(function () {
  12066. plus.key.showSoftKeybord();
  12067. });
  12068. },
  12069. setSoftinputTemporary: function setSoftinputTemporary() {
  12070. var _this2 = this;
  12071. Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* plusReady */ "g"])(function () {
  12072. var currentWebview = plus.webview.currentWebview();
  12073. var style = currentWebview.getStyle() || {};
  12074. var rect = _this2.$el.getBoundingClientRect();
  12075. currentWebview.setSoftinputTemporary && currentWebview.setSoftinputTemporary({
  12076. mode: style.softinputMode === 'adjustResize' ? 'adjustResize' : _this2.adjustPosition ? 'adjustPan' : 'nothing',
  12077. position: {
  12078. top: rect.top,
  12079. height: rect.height + (Number(_this2.cursorSpacing) || 0)
  12080. }
  12081. });
  12082. });
  12083. },
  12084. setSoftinputNavBar: function setSoftinputNavBar() {
  12085. var _this3 = this;
  12086. if (this.showConfirmBar === 'auto') {
  12087. delete this.__softinputNavBar;
  12088. return;
  12089. }
  12090. Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* plusReady */ "g"])(function () {
  12091. var currentWebview = plus.webview.currentWebview();
  12092. var _ref = currentWebview.getStyle() || {},
  12093. softinputNavBar = _ref.softinputNavBar;
  12094. var showConfirmBar = softinputNavBar !== 'none';
  12095. if (showConfirmBar !== _this3.showConfirmBar) {
  12096. _this3.__softinputNavBar = softinputNavBar || 'auto';
  12097. currentWebview.setStyle({
  12098. softinputNavBar: _this3.showConfirmBar ? 'auto' : 'none'
  12099. });
  12100. } else {
  12101. delete _this3.__softinputNavBar;
  12102. }
  12103. });
  12104. },
  12105. resetSoftinputNavBar: function resetSoftinputNavBar() {
  12106. var softinputNavBar = this.__softinputNavBar;
  12107. if (softinputNavBar) {
  12108. Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* plusReady */ "g"])(function () {
  12109. var currentWebview = plus.webview.currentWebview();
  12110. currentWebview.setStyle({
  12111. softinputNavBar: softinputNavBar
  12112. });
  12113. });
  12114. }
  12115. },
  12116. onKeyboardHide: function onKeyboardHide() {
  12117. UniViewJSBridge.unsubscribe('hideKeyboard', this.hideKeyboardTemp);
  12118. document.removeEventListener('click', iosHideKeyboard, false);
  12119. this.resetSoftinputNavBar();
  12120. }
  12121. }
  12122. });
  12123. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  12124. /***/ }),
  12125. /* 72 */
  12126. /***/ (function(module, exports, __webpack_require__) {
  12127. exports.nextTick = function nextTick(fn) {
  12128. var args = Array.prototype.slice.call(arguments);
  12129. args.shift();
  12130. setTimeout(function () {
  12131. fn.apply(null, args);
  12132. }, 0);
  12133. };
  12134. exports.platform = exports.arch =
  12135. exports.execPath = exports.title = 'browser';
  12136. exports.pid = 1;
  12137. exports.browser = true;
  12138. exports.env = {};
  12139. exports.argv = [];
  12140. exports.binding = function (name) {
  12141. throw new Error('No such module. (Possibly not yet loaded)')
  12142. };
  12143. (function () {
  12144. var cwd = '/';
  12145. var path;
  12146. exports.cwd = function () { return cwd };
  12147. exports.chdir = function (dir) {
  12148. if (!path) path = __webpack_require__(121);
  12149. cwd = path.resolve(dir, cwd);
  12150. };
  12151. })();
  12152. exports.exit = exports.kill =
  12153. exports.umask = exports.dlopen =
  12154. exports.uptime = exports.memoryUsage =
  12155. exports.uvCounters = function() {};
  12156. exports.features = {};
  12157. /***/ }),
  12158. /* 73 */
  12159. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  12160. "use strict";
  12161. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return navigateTo; });
  12162. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return navigateBack; });
  12163. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return reLaunch; });
  12164. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return redirectTo; });
  12165. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return switchTab; });
  12166. /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
  12167. function invokeApi(method) {
  12168. var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12169. UniViewJSBridge.publishHandler(_constants__WEBPACK_IMPORTED_MODULE_0__[/* INVOKE_API */ "b"], {
  12170. data: {
  12171. method: method,
  12172. args: args
  12173. },
  12174. options: {
  12175. timestamp: Date.now()
  12176. }
  12177. });
  12178. }
  12179. function navigateTo(args) {
  12180. invokeApi('navigateTo', args);
  12181. }
  12182. function navigateBack(args) {
  12183. invokeApi('navigateBack', args);
  12184. }
  12185. function reLaunch(args) {
  12186. invokeApi('reLaunch', args);
  12187. }
  12188. function redirectTo(args) {
  12189. invokeApi('redirectTo', args);
  12190. }
  12191. function switchTab(args) {
  12192. invokeApi('switchTab', args);
  12193. }
  12194. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  12195. /***/ }),
  12196. /* 74 */
  12197. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  12198. "use strict";
  12199. // EXPORTS
  12200. __webpack_require__.d(__webpack_exports__, "h", function() { return /* reexport */ upx2px; });
  12201. __webpack_require__.d(__webpack_exports__, "d", function() { return /* reexport */ api["b" /* navigateTo */]; });
  12202. __webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ api["a" /* navigateBack */]; });
  12203. __webpack_require__.d(__webpack_exports__, "e", function() { return /* reexport */ api["c" /* reLaunch */]; });
  12204. __webpack_require__.d(__webpack_exports__, "f", function() { return /* reexport */ api["d" /* redirectTo */]; });
  12205. __webpack_require__.d(__webpack_exports__, "g", function() { return /* reexport */ api["e" /* switchTab */]; });
  12206. __webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ getSystemInfoSync; });
  12207. __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ canIUse; });
  12208. // CONCATENATED MODULE: ./src/core/service/api/base/upx2px.js
  12209. var EPS = 1e-4;
  12210. var BASE_DEVICE_WIDTH = 750;
  12211. var isIOS = false;
  12212. var deviceWidth = 0;
  12213. var deviceDPR = 0;
  12214. function checkDeviceWidth() {
  12215. var _uni$getSystemInfoSyn = uni.getSystemInfoSync(),
  12216. platform = _uni$getSystemInfoSyn.platform,
  12217. pixelRatio = _uni$getSystemInfoSyn.pixelRatio,
  12218. windowWidth = _uni$getSystemInfoSyn.windowWidth;
  12219. deviceWidth = windowWidth;
  12220. deviceDPR = pixelRatio;
  12221. isIOS = platform === 'ios';
  12222. }
  12223. function upx2px(number, newDeviceWidth) {
  12224. if (deviceWidth === 0) {
  12225. checkDeviceWidth();
  12226. }
  12227. number = Number(number);
  12228. if (number === 0) {
  12229. return 0;
  12230. }
  12231. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  12232. if (result < 0) {
  12233. result = -result;
  12234. }
  12235. result = Math.floor(result + EPS);
  12236. if (result === 0) {
  12237. if (deviceDPR === 1 || !isIOS) {
  12238. return 1;
  12239. } else {
  12240. return 0.5;
  12241. }
  12242. }
  12243. return number < 0 ? -result : result;
  12244. }
  12245. // EXTERNAL MODULE: ./src/platforms/app-plus/view/api/index.js
  12246. var api = __webpack_require__(73);
  12247. // EXTERNAL MODULE: ./src/platforms/app-plus/helpers/get-window-offset.js
  12248. var get_window_offset = __webpack_require__(10);
  12249. // EXTERNAL MODULE: ./node_modules/safe-area-insets/out/index.js
  12250. var out = __webpack_require__(5);
  12251. var out_default = /*#__PURE__*/__webpack_require__.n(out);
  12252. // CONCATENATED MODULE: ./src/platforms/h5/service/api/device/get-system-info.js
  12253. var ua = navigator.userAgent;
  12254. /**
  12255. * 是否安卓设备
  12256. */
  12257. var isAndroid = /android/i.test(ua);
  12258. /**
  12259. * 是否iOS设备
  12260. */
  12261. var get_system_info_isIOS = /iphone|ipad|ipod/i.test(ua);
  12262. /**
  12263. * 获取系统信息-同步
  12264. */
  12265. function getSystemInfoSync() {
  12266. var screen = window.screen;
  12267. var pixelRatio = window.devicePixelRatio;
  12268. var screenWidth = screen.width;
  12269. var screenHeight = screen.height;
  12270. var windowWidth = Math.min(window.innerWidth, document.documentElement.clientWidth, screenWidth);
  12271. var windowHeight = window.innerHeight;
  12272. var language = navigator.language;
  12273. var statusBarHeight = out_default.a.top;
  12274. var osname;
  12275. var osversion;
  12276. var model;
  12277. if (get_system_info_isIOS) {
  12278. osname = 'iOS';
  12279. var osversionFind = ua.match(/OS\s([\w_]+)\slike/);
  12280. if (osversionFind) {
  12281. osversion = osversionFind[1].replace(/_/g, '.');
  12282. }
  12283. var modelFind = ua.match(/\(([a-zA-Z]+);/);
  12284. if (modelFind) {
  12285. model = modelFind[1];
  12286. }
  12287. } else if (isAndroid) {
  12288. osname = 'Android'; // eslint-disable-next-line no-useless-escape
  12289. var _osversionFind = ua.match(/Android[\s/]([\w\.]+)[;\s]/);
  12290. if (_osversionFind) {
  12291. osversion = _osversionFind[1];
  12292. }
  12293. var infoFind = ua.match(/\((.+?)\)/);
  12294. var infos = infoFind ? infoFind[1].split(';') : ua.split(' '); // eslint-disable-next-line no-useless-escape
  12295. var otherInfo = [/\bAndroid\b/i, /\bLinux\b/i, /\bU\b/i, /^\s?[a-z][a-z]$/i, /^\s?[a-z][a-z]-[a-z][a-z]$/i, /\bwv\b/i, /\/[\d\.,]+$/, /^\s?[\d\.,]+$/, /\bBrowser\b/i, /\bMobile\b/i];
  12296. for (var i = 0; i < infos.length; i++) {
  12297. var info = infos[i];
  12298. if (info.indexOf('Build') > 0) {
  12299. model = info.split('Build')[0].trim();
  12300. break;
  12301. }
  12302. var other = void 0;
  12303. for (var o = 0; o < otherInfo.length; o++) {
  12304. if (otherInfo[o].test(info)) {
  12305. other = true;
  12306. break;
  12307. }
  12308. }
  12309. if (!other) {
  12310. model = info.trim();
  12311. break;
  12312. }
  12313. }
  12314. } else {
  12315. osname = 'Other';
  12316. osversion = '0';
  12317. }
  12318. var system = "".concat(osname, " ").concat(osversion);
  12319. var platform = osname.toLocaleLowerCase();
  12320. var safeArea = {
  12321. left: out_default.a.left,
  12322. right: windowWidth - out_default.a.right,
  12323. top: out_default.a.top,
  12324. bottom: windowHeight - out_default.a.bottom,
  12325. width: windowWidth - out_default.a.left - out_default.a.right,
  12326. height: windowHeight - out_default.a.top - out_default.a.bottom
  12327. };
  12328. var _getWindowOffset = Object(get_window_offset["a" /* default */])(),
  12329. windowTop = _getWindowOffset.top,
  12330. windowBottom = _getWindowOffset.bottom;
  12331. windowHeight -= windowTop;
  12332. windowHeight -= windowBottom;
  12333. return {
  12334. windowTop: windowTop,
  12335. windowBottom: windowBottom,
  12336. windowWidth: windowWidth,
  12337. windowHeight: windowHeight,
  12338. pixelRatio: pixelRatio,
  12339. screenWidth: screenWidth,
  12340. screenHeight: screenHeight,
  12341. language: language,
  12342. statusBarHeight: statusBarHeight,
  12343. system: system,
  12344. platform: platform,
  12345. model: model,
  12346. safeArea: safeArea,
  12347. safeAreaInsets: {
  12348. top: out_default.a.top,
  12349. right: out_default.a.right,
  12350. bottom: out_default.a.bottom,
  12351. left: out_default.a.left
  12352. }
  12353. };
  12354. }
  12355. /**
  12356. * 获取系统信息-异步
  12357. */
  12358. function getSystemInfo() {
  12359. return getSystemInfoSync();
  12360. }
  12361. // CONCATENATED MODULE: ./lib/app-plus/view-api.js
  12362. function canIUse(schema) {
  12363. if (schema === 'css.var') {
  12364. return window.CSS && window.CSS.supports && window.CSS.supports('--a:0');
  12365. }
  12366. return true;
  12367. }
  12368. /***/ }),
  12369. /* 75 */
  12370. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  12371. "use strict";
  12372. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return requestComponentInfo; });
  12373. /* harmony import */ var uni_helpers_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
  12374. /* harmony import */ var uni_platform_helpers_get_window_offset__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
  12375. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56);
  12376. function getRootInfo(fields) {
  12377. var info = {};
  12378. if (fields.id) {
  12379. info.id = '';
  12380. }
  12381. if (fields.dataset) {
  12382. info.dataset = {};
  12383. }
  12384. if (fields.rect) {
  12385. info.left = 0;
  12386. info.right = 0;
  12387. info.top = 0;
  12388. info.bottom = 0;
  12389. }
  12390. if (fields.size) {
  12391. info.width = document.documentElement.clientWidth;
  12392. info.height = document.documentElement.clientHeight;
  12393. }
  12394. if (fields.scrollOffset) {
  12395. info.scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft || 0;
  12396. info.scrollTop = document.documentElement.scrollTop || document.body.scrollTop || 0;
  12397. }
  12398. return info;
  12399. }
  12400. function getNodeInfo(el, fields) {
  12401. var info = {};
  12402. var _getWindowOffset = Object(uni_platform_helpers_get_window_offset__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(),
  12403. top = _getWindowOffset.top;
  12404. if (fields.id) {
  12405. info.id = el.id;
  12406. }
  12407. if (fields.dataset) {
  12408. info.dataset = Object(uni_helpers_index__WEBPACK_IMPORTED_MODULE_0__[/* normalizeDataset */ "c"])(el.dataset || {});
  12409. }
  12410. if (fields.rect || fields.size) {
  12411. var rect = el.getBoundingClientRect();
  12412. if (fields.rect) {
  12413. info.left = rect.left;
  12414. info.right = rect.right;
  12415. info.top = rect.top - top;
  12416. info.bottom = rect.bottom - top;
  12417. }
  12418. if (fields.size) {
  12419. info.width = rect.width;
  12420. info.height = rect.height;
  12421. }
  12422. } // TODO 组件 props
  12423. if (fields.properties) {
  12424. fields.properties.forEach(function (prop) {
  12425. prop = prop.replace(/-([a-z])/g, function (e, t) {
  12426. return t.toUpperCase();
  12427. }); // props
  12428. });
  12429. }
  12430. if (fields.scrollOffset) {
  12431. if (el.tagName === 'UNI-SCROLL-VIEW' && el.__vue__ && el.__vue__.getScrollPosition) {
  12432. Object.assign(info, el.__vue__.getScrollPosition());
  12433. } else {
  12434. info.scrollLeft = 0;
  12435. info.scrollTop = 0;
  12436. }
  12437. }
  12438. if (fields.context) {
  12439. if (el.__vue__ && el.__vue__._getContextInfo) {
  12440. info.context = el.__vue__._getContextInfo();
  12441. }
  12442. }
  12443. return info;
  12444. }
  12445. function getNodesInfo(pageVm, component, selector, single, fields) {
  12446. var $el = Object(_util__WEBPACK_IMPORTED_MODULE_2__[/* findElm */ "a"])(component, pageVm);
  12447. if (!$el || $el && $el.nodeType === 8) {
  12448. // Comment
  12449. return single ? null : [];
  12450. }
  12451. if (single) {
  12452. var node = $el.matches(selector) ? $el : $el.querySelector(selector);
  12453. if (node) {
  12454. return getNodeInfo(node, fields);
  12455. }
  12456. return null;
  12457. } else {
  12458. var infos = [];
  12459. var nodeList = $el.querySelectorAll(selector);
  12460. if (nodeList && nodeList.length) {
  12461. infos = [].map.call(nodeList, function (node) {
  12462. return getNodeInfo(node, fields);
  12463. });
  12464. }
  12465. if ($el.matches(selector)) {
  12466. infos.unshift(getNodeInfo($el, fields));
  12467. }
  12468. return infos;
  12469. }
  12470. }
  12471. function requestComponentInfo(_ref, pageId) {
  12472. var reqId = _ref.reqId,
  12473. reqs = _ref.reqs;
  12474. var pages = getCurrentPages(); // 跨平台时,View 层也应该实现该方法,举例 App 上,View 层的 getCurrentPages 返回长度为1的当前页面数组
  12475. var page = pages.find(function (page) {
  12476. return page.$page.id === pageId;
  12477. });
  12478. if (!page) {
  12479. throw new Error("Not Found\uFF1APage[".concat(pageId, "]"));
  12480. }
  12481. var pageVm = page.$vm;
  12482. var result = [];
  12483. reqs.forEach(function (_ref2) {
  12484. var component = _ref2.component,
  12485. selector = _ref2.selector,
  12486. single = _ref2.single,
  12487. fields = _ref2.fields;
  12488. if (component === 0) {
  12489. result.push(getRootInfo(fields));
  12490. } else {
  12491. result.push(getNodesInfo(pageVm, component, selector, single, fields));
  12492. }
  12493. });
  12494. UniViewJSBridge.publishHandler('onRequestComponentInfo', {
  12495. reqId: reqId,
  12496. res: result
  12497. }, pageVm.$page.id);
  12498. }
  12499. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  12500. /***/ }),
  12501. /* 76 */
  12502. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  12503. "use strict";
  12504. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return loadFontFace; });
  12505. function loadFontFace(_ref) {
  12506. var options = _ref.options,
  12507. callbackId = _ref.callbackId;
  12508. var family = options.family,
  12509. source = options.source,
  12510. _options$desc = options.desc,
  12511. desc = _options$desc === void 0 ? {} : _options$desc;
  12512. var fonts = document.fonts;
  12513. if (fonts) {
  12514. var fontFace = new FontFace(family, source, desc);
  12515. fontFace.load().then(function () {
  12516. fonts.add(fontFace);
  12517. UniViewJSBridge.publishHandler('onLoadFontFaceCallback', {
  12518. callbackId: callbackId,
  12519. data: {
  12520. errMsg: 'loadFontFace:ok'
  12521. }
  12522. });
  12523. }).catch(function (error) {
  12524. UniViewJSBridge.publishHandler('onLoadFontFaceCallback', {
  12525. callbackId: callbackId,
  12526. data: {
  12527. errMsg: "loadFontFace:fail ".concat(error)
  12528. }
  12529. });
  12530. });
  12531. } else {
  12532. var style = document.createElement('style');
  12533. style.innerText = "@font-face{font-family:\"".concat(family, "\";src:").concat(source, ";font-style:").concat(desc.style, ";font-weight:").concat(desc.weight, ";font-stretch:").concat(desc.stretch, ";unicode-range:").concat(desc.unicodeRange, ";font-variant:").concat(desc.variant, ";font-feature-settings:").concat(desc.featureSettings, ";}");
  12534. document.head.appendChild(style);
  12535. UniViewJSBridge.publishHandler('onLoadFontFaceCallback', {
  12536. callbackId: callbackId,
  12537. data: {
  12538. errMsg: 'loadFontFace:ok'
  12539. }
  12540. });
  12541. }
  12542. }
  12543. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  12544. /***/ }),
  12545. /* 77 */
  12546. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  12547. "use strict";
  12548. /* WEBPACK VAR INJECTION */(function(global, UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return initSubscribe; });
  12549. /* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
  12550. /* harmony import */ var uni_core_view_bridge_subscribe_scroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
  12551. /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
  12552. /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
  12553. var passiveOptions = uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* supportsPassive */ "h"] ? {
  12554. passive: false
  12555. } : false;
  12556. function onCssVar(_ref) {
  12557. var statusbarHeight = _ref.statusbarHeight,
  12558. windowTop = _ref.windowTop,
  12559. windowBottom = _ref.windowBottom;
  12560. global.__WINDOW_TOP = windowTop;
  12561. global.__WINDOW_BOTTOM = windowBottom;
  12562. if (uni.canIUse('css.var')) {
  12563. var style = document.documentElement.style;
  12564. style.setProperty('--window-top', windowTop + 'px');
  12565. style.setProperty('--window-bottom', windowBottom + 'px');
  12566. style.setProperty('--status-bar-height', statusbarHeight + 'px');
  12567. if (true) {
  12568. console.log("--status-bar-height=".concat(statusbarHeight));
  12569. console.log("--window-top=".concat(windowTop));
  12570. console.log("--window-bottom=".concat(windowBottom));
  12571. }
  12572. }
  12573. }
  12574. function onPageCreate(_ref2, pageId) {
  12575. var statusbarHeight = _ref2.statusbarHeight,
  12576. windowTop = _ref2.windowTop,
  12577. windowBottom = _ref2.windowBottom,
  12578. disableScroll = _ref2.disableScroll,
  12579. onPageScroll = _ref2.onPageScroll,
  12580. onPageReachBottom = _ref2.onPageReachBottom,
  12581. onReachBottomDistance = _ref2.onReachBottomDistance;
  12582. onCssVar({
  12583. statusbarHeight: statusbarHeight,
  12584. windowTop: windowTop,
  12585. windowBottom: windowBottom
  12586. });
  12587. if (disableScroll) {
  12588. document.addEventListener('touchmove', uni_core_view_bridge_subscribe_scroll__WEBPACK_IMPORTED_MODULE_1__[/* disableScroll */ "b"], passiveOptions);
  12589. } else if (onPageScroll || onPageReachBottom) {
  12590. requestAnimationFrame(function () {
  12591. // 避免监听太早,直接触发了 scroll
  12592. document.addEventListener('scroll', Object(uni_core_view_bridge_subscribe_scroll__WEBPACK_IMPORTED_MODULE_1__[/* createScrollListener */ "a"])(pageId, {
  12593. enablePageScroll: onPageScroll,
  12594. enablePageReachBottom: onPageReachBottom,
  12595. onReachBottomDistance: onReachBottomDistance
  12596. }));
  12597. });
  12598. }
  12599. }
  12600. function onWebviewReady() {
  12601. // service 主动发起检测
  12602. UniViewJSBridge.publishHandler('webviewReady');
  12603. }
  12604. function initSubscribe(subscribe) {
  12605. subscribe(_constants__WEBPACK_IMPORTED_MODULE_3__[/* WEBVIEW_READY */ "k"], onWebviewReady);
  12606. subscribe(_constants__WEBPACK_IMPORTED_MODULE_2__[/* ON_PAGE_CREATE */ "a"], onPageCreate);
  12607. }
  12608. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(16), __webpack_require__(4)))
  12609. /***/ }),
  12610. /* 78 */
  12611. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  12612. "use strict";
  12613. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_helpers_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
  12614. /* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
  12615. /* harmony import */ var _behaviors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85);
  12616. /* harmony import */ var _wxs_component_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(79);
  12617. function pageMounted() {
  12618. // 通知 Service,View 层已 ready
  12619. UniViewJSBridge.publishHandler('onPageReady', {}, this.$page.id);
  12620. }
  12621. /**
  12622. * View 层 Vue 插件
  12623. * 1.init events
  12624. * 2.$trigger
  12625. * 3.$handleProxy
  12626. */
  12627. /* harmony default export */ __webpack_exports__["a"] = ({
  12628. install: function install(Vue) {
  12629. var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  12630. routes = _ref.routes;
  12631. Object(_events__WEBPACK_IMPORTED_MODULE_1__[/* initEvents */ "a"])();
  12632. var findUniTarget = function findUniTarget($event, $el) {
  12633. var target = $event.target;
  12634. for (; target && target !== $el; target = target.parentNode) {
  12635. if (target.tagName && target.tagName.indexOf('UNI-') === 0) {
  12636. break;
  12637. }
  12638. }
  12639. return target;
  12640. };
  12641. Vue.prototype.$handleEvent = function ($event) {
  12642. if ($event instanceof Event) {
  12643. // 未处理的 event 对象 需要对 target 校正及包装
  12644. // 查找 uniTarget
  12645. var target = findUniTarget($event, this.$el);
  12646. $event = _events__WEBPACK_IMPORTED_MODULE_1__[/* processEvent */ "b"].call(this, $event.type, $event, {}, target || $event.target, $event.currentTarget);
  12647. }
  12648. return $event;
  12649. };
  12650. Vue.prototype.$getComponentDescriptor = function (vm, isOwnerInstance) {
  12651. return Object(_wxs_component_descriptor__WEBPACK_IMPORTED_MODULE_3__[/* createComponentDescriptor */ "a"])(vm || this, isOwnerInstance);
  12652. };
  12653. Vue.prototype.$handleWxsEvent = function ($event) {
  12654. if ($event instanceof Event) {
  12655. // 未处理的 event 对象 需要对 target 校正及包装
  12656. var currentTarget = $event.currentTarget;
  12657. var instance = currentTarget && currentTarget.__vue__ && currentTarget.__vue__.$getComponentDescriptor(currentTarget.__vue__, false);
  12658. $event = _events__WEBPACK_IMPORTED_MODULE_1__[/* processEvent */ "b"].call(this, $event.type, $event, {}, findUniTarget($event, this.$el) || $event.target, $event.currentTarget);
  12659. $event.instance = instance;
  12660. }
  12661. return $event;
  12662. };
  12663. Vue.mixin({
  12664. beforeCreate: function beforeCreate() {
  12665. var _this = this;
  12666. var options = this.$options;
  12667. var wxs = options.wxs;
  12668. if (wxs) {
  12669. Object.keys(wxs).forEach(function (module) {
  12670. _this[module] = wxs[module];
  12671. });
  12672. }
  12673. if (options.behaviors && options.behaviors.length) {
  12674. Object(_behaviors__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(options, this);
  12675. }
  12676. if (Object(uni_helpers_index__WEBPACK_IMPORTED_MODULE_0__[/* isPage */ "b"])(this)) {
  12677. options.mounted = options.mounted ? [].concat(pageMounted, options.mounted) : [pageMounted];
  12678. }
  12679. }
  12680. }); // TODO 跨平台时,View 层需要注入$page属性
  12681. }
  12682. });
  12683. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  12684. /***/ }),
  12685. /* 79 */
  12686. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  12687. "use strict";
  12688. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge, global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createComponentDescriptor; });
  12689. /* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
  12690. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  12691. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  12692. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  12693. var CLASS_RE = /^\s+|\s+$/g;
  12694. var WXS_CLASS_RE = /\s+/;
  12695. function getWxsClsArr(clsArr, classList, isAdd) {
  12696. var wxsClsArr = [];
  12697. var _checkClassList = function checkClassList(cls) {
  12698. if (isAdd) {
  12699. _checkClassList = function checkClassList(cls) {
  12700. return !classList.contains(cls);
  12701. };
  12702. } else {
  12703. _checkClassList = function checkClassList(cls) {
  12704. return classList.contains(cls);
  12705. };
  12706. }
  12707. return _checkClassList(cls);
  12708. };
  12709. clsArr.forEach(function (cls) {
  12710. cls = cls.replace(CLASS_RE, '');
  12711. _checkClassList(cls) && wxsClsArr.push(cls);
  12712. });
  12713. return wxsClsArr;
  12714. }
  12715. function parseStyleText(cssText) {
  12716. var res = {};
  12717. var listDelimiter = /;(?![^(]*\))/g;
  12718. var propertyDelimiter = /:(.+)/;
  12719. cssText.split(listDelimiter).forEach(function (item) {
  12720. if (item) {
  12721. var tmp = item.split(propertyDelimiter);
  12722. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  12723. }
  12724. });
  12725. return res;
  12726. }
  12727. var ComponentDescriptor = /*#__PURE__*/function () {
  12728. function ComponentDescriptor(vm) {
  12729. _classCallCheck(this, ComponentDescriptor);
  12730. this.$vm = vm;
  12731. this.$el = vm.$el;
  12732. }
  12733. _createClass(ComponentDescriptor, [{
  12734. key: "selectComponent",
  12735. value: function selectComponent(selector) {
  12736. if (!this.$el || !selector) {
  12737. return;
  12738. }
  12739. var el = this.$el.querySelector(selector);
  12740. return el && el.__vue__ && createComponentDescriptor(el.__vue__, false);
  12741. }
  12742. }, {
  12743. key: "selectAllComponents",
  12744. value: function selectAllComponents(selector) {
  12745. if (!this.$el || !selector) {
  12746. return [];
  12747. }
  12748. var descriptors = [];
  12749. var els = this.$el.querySelectorAll(selector);
  12750. for (var i = 0; i < els.length; i++) {
  12751. var el = els[i];
  12752. el.__vue__ && descriptors.push(createComponentDescriptor(el.__vue__, false));
  12753. }
  12754. return descriptors;
  12755. }
  12756. }, {
  12757. key: "setStyle",
  12758. value: function setStyle(style) {
  12759. if (!this.$el || !style) {
  12760. return this;
  12761. }
  12762. if (typeof style === 'string') {
  12763. style = parseStyleText(style);
  12764. }
  12765. if (Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* isPlainObject */ "e"])(style)) {
  12766. this.$el.__wxsStyle = style;
  12767. this.$vm.$forceUpdate();
  12768. }
  12769. return this;
  12770. }
  12771. }, {
  12772. key: "addClass",
  12773. value: function addClass() {
  12774. for (var _len = arguments.length, clsArr = new Array(_len), _key = 0; _key < _len; _key++) {
  12775. clsArr[_key] = arguments[_key];
  12776. }
  12777. if (!this.$el || !clsArr.length) {
  12778. return this;
  12779. }
  12780. var wxsClsArr = getWxsClsArr(clsArr, this.$el.classList, true);
  12781. if (wxsClsArr.length) {
  12782. var wxsClass = this.$el.__wxsAddClass || '';
  12783. this.$el.__wxsAddClass = wxsClass + (wxsClass ? ' ' : '') + wxsClsArr.join(' ');
  12784. this.$vm.$forceUpdate();
  12785. }
  12786. return this;
  12787. }
  12788. }, {
  12789. key: "removeClass",
  12790. value: function removeClass() {
  12791. for (var _len2 = arguments.length, clsArr = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  12792. clsArr[_key2] = arguments[_key2];
  12793. }
  12794. if (!this.$el || !clsArr.length) {
  12795. return this;
  12796. }
  12797. var classList = this.$el.classList;
  12798. var addWxsClsArr = this.$el.__wxsAddClass ? this.$el.__wxsAddClass.split(WXS_CLASS_RE) : [];
  12799. var wxsClsArr = getWxsClsArr(clsArr, classList, false);
  12800. if (wxsClsArr.length) {
  12801. var removeWxsClsArr = [];
  12802. wxsClsArr.forEach(function (cls) {
  12803. var clsIndex = addWxsClsArr.findIndex(function (oldCls) {
  12804. return oldCls === cls;
  12805. });
  12806. if (clsIndex !== -1) {
  12807. // 在 addWxsClass 中
  12808. addWxsClsArr.splice(clsIndex, 1);
  12809. }
  12810. removeWxsClsArr.push(cls);
  12811. });
  12812. this.$el.__wxsRemoveClass = removeWxsClsArr;
  12813. this.$el.__wxsAddClass = addWxsClsArr.join(' ');
  12814. this.$vm.$forceUpdate();
  12815. }
  12816. return this;
  12817. }
  12818. }, {
  12819. key: "hasClass",
  12820. value: function hasClass(cls) {
  12821. return this.$el && this.$el.classList.contains(cls);
  12822. }
  12823. }, {
  12824. key: "getDataset",
  12825. value: function getDataset() {
  12826. return this.$el && this.$el.dataset;
  12827. }
  12828. }, {
  12829. key: "callMethod",
  12830. value: function callMethod(funcName) {
  12831. var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12832. if (this.$vm[funcName]) {
  12833. this.$vm[funcName](JSON.parse(JSON.stringify(args)));
  12834. } else if (this.$vm._$id) {
  12835. UniViewJSBridge.publishHandler('onWxsInvokeCallMethod', {
  12836. cid: this.$vm._$id,
  12837. method: funcName,
  12838. args: args
  12839. });
  12840. }
  12841. }
  12842. }, {
  12843. key: "requestAnimationFrame",
  12844. value: function requestAnimationFrame(callback) {
  12845. return global.requestAnimationFrame(callback), this;
  12846. }
  12847. }, {
  12848. key: "getState",
  12849. value: function getState() {
  12850. return this.$el && (this.$el.__wxsState || (this.$el.__wxsState = {}));
  12851. }
  12852. }, {
  12853. key: "triggerEvent",
  12854. value: function triggerEvent(eventName) {
  12855. var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12856. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  12857. // TODO options
  12858. return this.$vm.$emit(eventName, detail), this;
  12859. }
  12860. }]);
  12861. return ComponentDescriptor;
  12862. }();
  12863. function createComponentDescriptor(vm) {
  12864. var isOwnerInstance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  12865. if (isOwnerInstance && vm && vm.$options.name && vm.$options.name.indexOf('VUni') === 0) {
  12866. // ownerInstance 内置组件需要使用父 vm
  12867. vm = vm.$parent;
  12868. }
  12869. if (vm && vm.$el) {
  12870. if (!vm.$el.__wxsComponentDescriptor) {
  12871. vm.$el.__wxsComponentDescriptor = new ComponentDescriptor(vm);
  12872. }
  12873. return vm.$el.__wxsComponentDescriptor;
  12874. }
  12875. }
  12876. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4), __webpack_require__(16)))
  12877. /***/ }),
  12878. /* 80 */
  12879. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  12880. "use strict";
  12881. /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VDomSync; });
  12882. /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
  12883. /* harmony import */ var _helpers_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81);
  12884. function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
  12885. function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
  12886. function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
  12887. function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  12888. function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
  12889. function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
  12890. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  12891. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  12892. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  12893. function findParent(vm) {
  12894. var parent = vm.$parent;
  12895. while (parent) {
  12896. if (parent._$id) {
  12897. return parent;
  12898. }
  12899. parent = parent.$parent;
  12900. }
  12901. }
  12902. var VDomSync = /*#__PURE__*/function () {
  12903. function VDomSync(pageId) {
  12904. _classCallCheck(this, VDomSync);
  12905. this.pageId = pageId;
  12906. this.addBatchVData = Object.create(null);
  12907. this.updateBatchVData = [];
  12908. this.vms = Object.create(null);
  12909. }
  12910. _createClass(VDomSync, [{
  12911. key: "addVData",
  12912. value: function addVData(cid) {
  12913. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12914. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  12915. this.addBatchVData[cid] = [data, options];
  12916. }
  12917. }, {
  12918. key: "updateVData",
  12919. value: function updateVData(cid) {
  12920. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12921. this.updateBatchVData.push([cid, data]);
  12922. }
  12923. }, {
  12924. key: "initVm",
  12925. value: function initVm(vm) {
  12926. vm._$id = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_1__[/* generateId */ "a"])(vm, findParent(vm));
  12927. var vData = this.addBatchVData[vm._$id];
  12928. if (!vData) {
  12929. console.error('cid unmatched', vm);
  12930. vData = {
  12931. data: {},
  12932. options: {}
  12933. };
  12934. } else {
  12935. delete this.addBatchVData[vm._$id];
  12936. }
  12937. var _vData = vData,
  12938. _vData2 = _slicedToArray(_vData, 2),
  12939. data = _vData2[0],
  12940. options = _vData2[1];
  12941. Object.assign(vm.$options, options);
  12942. vm.$r = data || Object.create(null);
  12943. this.vms[vm._$id] = vm;
  12944. }
  12945. }, {
  12946. key: "sendUIEvent",
  12947. value: function sendUIEvent(cid, nid, event) {
  12948. UniViewJSBridge.publishHandler(_constants__WEBPACK_IMPORTED_MODULE_0__[/* VD_SYNC */ "h"], {
  12949. data: [[_constants__WEBPACK_IMPORTED_MODULE_0__[/* UI_EVENT */ "f"], [[cid, nid, event]]]],
  12950. options: {
  12951. timestamp: Date.now()
  12952. }
  12953. });
  12954. }
  12955. }, {
  12956. key: "clearAddBatchVData",
  12957. value: function clearAddBatchVData() {
  12958. if (true) {
  12959. if (Object.keys(this.addBatchVData).length) {
  12960. console.error('this.addBatchVData...=' + JSON.stringify(this.addBatchVData));
  12961. }
  12962. }
  12963. this.addBatchVData = Object.create(null);
  12964. }
  12965. }, {
  12966. key: "flush",
  12967. value: function flush() {
  12968. var _this = this;
  12969. this.updateBatchVData.forEach(function (_ref) {
  12970. var _ref2 = _slicedToArray(_ref, 2),
  12971. cid = _ref2[0],
  12972. data = _ref2[1];
  12973. var vm = _this.vms[cid];
  12974. if (!vm) {
  12975. return console.error("Not found ".concat(cid));
  12976. }
  12977. Object.keys(data).forEach(function (cid) {
  12978. Object.assign(vm.$r[cid] || (vm.$r[cid] = Object.create(null)), data[cid]);
  12979. });
  12980. vm.$forceUpdate();
  12981. });
  12982. this.updateBatchVData.length = 0;
  12983. }
  12984. }]);
  12985. return VDomSync;
  12986. }();
  12987. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
  12988. /***/ }),
  12989. /* 81 */
  12990. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  12991. "use strict";
  12992. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return generateId; });
  12993. function generateId(vm, parent) {
  12994. if (!vm.$parent) {
  12995. return '-1';
  12996. }
  12997. var vnode = vm.$vnode;
  12998. var context = vnode.context; // slot 内的组件,需要补充 context 的 id,否则可能与内部组件索引值一致,导致 id 冲突
  12999. if (context && context !== parent && context._$id) {
  13000. if (true) {
  13001. console.log('generateId:' + context._$id + ';' + parent._$id + ',' + vnode.data.attrs._i);
  13002. }
  13003. return context._$id + ';' + parent._$id + ',' + vnode.data.attrs._i;
  13004. }
  13005. return parent._$id + ',' + vnode.data.attrs._i;
  13006. }
  13007. /***/ }),
  13008. /* 82 */
  13009. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  13010. "use strict";
  13011. /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return showPage; });
  13012. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13013. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  13014. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  13015. function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  13016. var plus_;
  13017. var weex_;
  13018. var BroadcastChannel_;
  13019. function getRuntime() {
  13020. return (typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object' && (typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) === 'object' && (typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object' ? 'webview' : 'v8';
  13021. }
  13022. function getPageId() {
  13023. return plus_.webview.currentWebview().id;
  13024. }
  13025. var channel;
  13026. var globalEvent;
  13027. var callbacks = {};
  13028. function onPlusMessage(res) {
  13029. var message = res.data && res.data.__message;
  13030. if (!message || !message.__page) {
  13031. return;
  13032. }
  13033. var pageId = message.__page;
  13034. var callback = callbacks[pageId];
  13035. callback && callback(message);
  13036. if (!message.keep) {
  13037. delete callbacks[pageId];
  13038. }
  13039. }
  13040. function addEventListener(pageId, callback) {
  13041. if (getRuntime() === 'v8') {
  13042. if (BroadcastChannel_) {
  13043. channel && channel.close();
  13044. channel = new BroadcastChannel_(getPageId());
  13045. channel.onmessage = onPlusMessage;
  13046. } else if (!globalEvent) {
  13047. globalEvent = weex_.requireModule('globalEvent');
  13048. globalEvent.addEventListener('plusMessage', onPlusMessage);
  13049. }
  13050. } else {
  13051. window.__plusMessage = onPlusMessage;
  13052. }
  13053. callbacks[pageId] = callback;
  13054. }
  13055. var Page = /*#__PURE__*/function () {
  13056. function Page(webview) {
  13057. _classCallCheck(this, Page);
  13058. this.webview = webview;
  13059. }
  13060. _createClass(Page, [{
  13061. key: "sendMessage",
  13062. value: function sendMessage(data) {
  13063. var message = {
  13064. __message: {
  13065. data: data
  13066. }
  13067. };
  13068. var id = this.webview.id;
  13069. if (BroadcastChannel_) {
  13070. var _channel = new BroadcastChannel_(id);
  13071. _channel.postMessage(message);
  13072. } else {
  13073. plus_.webview.postMessageToUniNView(message, id);
  13074. }
  13075. }
  13076. }, {
  13077. key: "close",
  13078. value: function close() {
  13079. this.webview.close();
  13080. }
  13081. }]);
  13082. return Page;
  13083. }();
  13084. function showPage(_ref) {
  13085. var _ref$context = _ref.context,
  13086. context = _ref$context === void 0 ? {} : _ref$context,
  13087. url = _ref.url,
  13088. _ref$data = _ref.data,
  13089. data = _ref$data === void 0 ? {} : _ref$data,
  13090. _ref$style = _ref.style,
  13091. style = _ref$style === void 0 ? {} : _ref$style,
  13092. onMessage = _ref.onMessage,
  13093. onClose = _ref.onClose;
  13094. // eslint-disable-next-line
  13095. plus_ = context.plus || plus; // eslint-disable-next-line
  13096. weex_ = context.weex || ((typeof weex === "undefined" ? "undefined" : _typeof(weex)) === 'object' ? weex : null); // eslint-disable-next-line
  13097. BroadcastChannel_ = context.BroadcastChannel || ((typeof BroadcastChannel === "undefined" ? "undefined" : _typeof(BroadcastChannel)) === 'object' ? BroadcastChannel : null);
  13098. var titleNView = {
  13099. autoBackButton: true,
  13100. titleSize: '17px'
  13101. };
  13102. var pageId = "page".concat(Date.now());
  13103. style = Object.assign({}, style);
  13104. if (style.titleNView !== false && style.titleNView !== 'none') {
  13105. style.titleNView = Object.assign(titleNView, style.titleNView);
  13106. }
  13107. var defaultStyle = {
  13108. top: 0,
  13109. bottom: 0,
  13110. usingComponents: {},
  13111. popGesture: 'close',
  13112. scrollIndicator: 'none',
  13113. animationType: 'pop-in',
  13114. animationDuration: 200,
  13115. uniNView: {
  13116. path: "".concat((typeof process === "undefined" ? "undefined" : _typeof(process)) === 'object' && Object({"NODE_ENV":"development","BASE_URL":"/"}) && Object({"NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_TEMPLATE_PATH || '', "/").concat(url, ".js"),
  13117. defaultFontSize: plus_.screen.resolutionWidth / 20,
  13118. viewport: plus_.screen.resolutionWidth
  13119. }
  13120. };
  13121. style = Object.assign(defaultStyle, style);
  13122. var page = plus_.webview.create('', pageId, style, {
  13123. extras: {
  13124. from: getPageId(),
  13125. runtime: getRuntime(),
  13126. data: data,
  13127. useGlobalEvent: !BroadcastChannel_
  13128. }
  13129. });
  13130. page.addEventListener('close', onClose);
  13131. addEventListener(pageId, function (message) {
  13132. if (typeof onMessage === 'function') {
  13133. onMessage(message.data);
  13134. }
  13135. if (!message.keep) {
  13136. page.close('auto');
  13137. }
  13138. });
  13139. page.show(style.animationType, style.animationDuration);
  13140. return new Page(page);
  13141. }
  13142. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(72)))
  13143. /***/ }),
  13144. /* 83 */
  13145. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  13146. "use strict";
  13147. // EXPORTS
  13148. __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ register; });
  13149. // CONCATENATED MODULE: ./src/core/view/components/editor/formats/divider.js
  13150. function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  13151. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13152. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
  13153. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  13154. function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
  13155. function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
  13156. function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  13157. function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  13158. function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  13159. /* harmony default export */ var divider = (function (Quill) {
  13160. var BlockEmbed = Quill.import('blots/block/embed');
  13161. var Divider = /*#__PURE__*/function (_BlockEmbed) {
  13162. _inherits(Divider, _BlockEmbed);
  13163. var _super = _createSuper(Divider);
  13164. function Divider() {
  13165. _classCallCheck(this, Divider);
  13166. return _super.apply(this, arguments);
  13167. }
  13168. return Divider;
  13169. }(BlockEmbed);
  13170. Divider.blotName = 'divider';
  13171. Divider.tagName = 'HR';
  13172. return {
  13173. 'formats/divider': Divider
  13174. };
  13175. });
  13176. // CONCATENATED MODULE: ./src/core/view/components/editor/formats/ins.js
  13177. function ins_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { ins_typeof = function _typeof(obj) { return typeof obj; }; } else { ins_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return ins_typeof(obj); }
  13178. function ins_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13179. function ins_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) ins_setPrototypeOf(subClass, superClass); }
  13180. function ins_setPrototypeOf(o, p) { ins_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return ins_setPrototypeOf(o, p); }
  13181. function ins_createSuper(Derived) { return function () { var Super = ins_getPrototypeOf(Derived), result; if (ins_isNativeReflectConstruct()) { var NewTarget = ins_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return ins_possibleConstructorReturn(this, result); }; }
  13182. function ins_possibleConstructorReturn(self, call) { if (call && (ins_typeof(call) === "object" || typeof call === "function")) { return call; } return ins_assertThisInitialized(self); }
  13183. function ins_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  13184. function ins_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  13185. function ins_getPrototypeOf(o) { ins_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return ins_getPrototypeOf(o); }
  13186. /* harmony default export */ var ins = (function (Quill) {
  13187. var Inline = Quill.import('blots/inline');
  13188. var Ins = /*#__PURE__*/function (_Inline) {
  13189. ins_inherits(Ins, _Inline);
  13190. var _super = ins_createSuper(Ins);
  13191. function Ins() {
  13192. ins_classCallCheck(this, Ins);
  13193. return _super.apply(this, arguments);
  13194. }
  13195. return Ins;
  13196. }(Inline);
  13197. Ins.blotName = 'ins';
  13198. Ins.tagName = 'INS';
  13199. return {
  13200. 'formats/ins': Ins
  13201. };
  13202. });
  13203. // CONCATENATED MODULE: ./src/core/view/components/editor/formats/align.js
  13204. /* harmony default export */ var align = (function (Quill) {
  13205. var _Quill$import = Quill.import('parchment'),
  13206. Scope = _Quill$import.Scope,
  13207. Attributor = _Quill$import.Attributor;
  13208. var config = {
  13209. scope: Scope.BLOCK,
  13210. whitelist: ['left', 'right', 'center', 'justify']
  13211. };
  13212. var AlignStyle = new Attributor.Style('align', 'text-align', config);
  13213. return {
  13214. 'formats/align': AlignStyle
  13215. };
  13216. });
  13217. // CONCATENATED MODULE: ./src/core/view/components/editor/formats/direction.js
  13218. /* harmony default export */ var direction = (function (Quill) {
  13219. var _Quill$import = Quill.import('parchment'),
  13220. Scope = _Quill$import.Scope,
  13221. Attributor = _Quill$import.Attributor;
  13222. var config = {
  13223. scope: Scope.BLOCK,
  13224. whitelist: ['rtl']
  13225. };
  13226. var DirectionStyle = new Attributor.Style('direction', 'direction', config);
  13227. return {
  13228. 'formats/direction': DirectionStyle
  13229. };
  13230. });
  13231. // CONCATENATED MODULE: ./src/core/view/components/editor/formats/list.js
  13232. function list_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { list_typeof = function _typeof(obj) { return typeof obj; }; } else { list_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return list_typeof(obj); }
  13233. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  13234. function list_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13235. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  13236. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  13237. function list_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) list_setPrototypeOf(subClass, superClass); }
  13238. function list_setPrototypeOf(o, p) { list_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return list_setPrototypeOf(o, p); }
  13239. function list_createSuper(Derived) { return function () { var Super = list_getPrototypeOf(Derived), result; if (list_isNativeReflectConstruct()) { var NewTarget = list_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return list_possibleConstructorReturn(this, result); }; }
  13240. function list_possibleConstructorReturn(self, call) { if (call && (list_typeof(call) === "object" || typeof call === "function")) { return call; } return list_assertThisInitialized(self); }
  13241. function list_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  13242. function list_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  13243. function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
  13244. function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = list_getPrototypeOf(object); if (object === null) break; } return object; }
  13245. function list_getPrototypeOf(o) { list_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return list_getPrototypeOf(o); }
  13246. /* harmony default export */ var list = (function (Quill) {
  13247. var Parchment = Quill.import('parchment');
  13248. var Container = Quill.import('blots/container');
  13249. var ListItem = Quill.import('formats/list/item');
  13250. var List = /*#__PURE__*/function (_Container) {
  13251. list_inherits(List, _Container);
  13252. var _super = list_createSuper(List);
  13253. _createClass(List, null, [{
  13254. key: "create",
  13255. value: function create(value) {
  13256. var tagName = value === 'ordered' ? 'OL' : 'UL';
  13257. var node = _get(list_getPrototypeOf(List), "create", this).call(this, tagName);
  13258. if (value === 'checked' || value === 'unchecked') {
  13259. node.setAttribute('data-checked', value === 'checked');
  13260. }
  13261. return node;
  13262. }
  13263. }, {
  13264. key: "formats",
  13265. value: function formats(domNode) {
  13266. if (domNode.tagName === 'OL') return 'ordered';
  13267. if (domNode.tagName === 'UL') {
  13268. if (domNode.hasAttribute('data-checked')) {
  13269. return domNode.getAttribute('data-checked') === 'true' ? 'checked' : 'unchecked';
  13270. } else {
  13271. return 'bullet';
  13272. }
  13273. }
  13274. return undefined;
  13275. }
  13276. }]);
  13277. function List(domNode) {
  13278. var _this;
  13279. list_classCallCheck(this, List);
  13280. _this = _super.call(this, domNode);
  13281. var listEventHandler = function listEventHandler(e) {
  13282. if (e.target.parentNode !== domNode) return;
  13283. var format = _this.statics.formats(domNode);
  13284. var blot = Parchment.find(e.target);
  13285. if (format === 'checked') {
  13286. blot.format('list', 'unchecked');
  13287. } else if (format === 'unchecked') {
  13288. blot.format('list', 'checked');
  13289. }
  13290. };
  13291. domNode.addEventListener('click', listEventHandler);
  13292. return _this;
  13293. }
  13294. _createClass(List, [{
  13295. key: "format",
  13296. value: function format(name, value) {
  13297. if (this.children.length > 0) {
  13298. this.children.tail.format(name, value);
  13299. }
  13300. }
  13301. }, {
  13302. key: "formats",
  13303. value: function formats() {
  13304. // We don't inherit from FormatBlot
  13305. return _defineProperty({}, this.statics.blotName, this.statics.formats(this.domNode));
  13306. }
  13307. }, {
  13308. key: "insertBefore",
  13309. value: function insertBefore(blot, ref) {
  13310. if (blot instanceof ListItem) {
  13311. _get(list_getPrototypeOf(List.prototype), "insertBefore", this).call(this, blot, ref);
  13312. } else {
  13313. var index = ref == null ? this.length() : ref.offset(this);
  13314. var after = this.split(index);
  13315. after.parent.insertBefore(blot, after);
  13316. }
  13317. }
  13318. }, {
  13319. key: "optimize",
  13320. value: function optimize(context) {
  13321. _get(list_getPrototypeOf(List.prototype), "optimize", this).call(this, context);
  13322. var next = this.next;
  13323. if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && next.domNode.tagName === this.domNode.tagName && next.domNode.getAttribute('data-checked') === this.domNode.getAttribute('data-checked')) {
  13324. next.moveChildren(this);
  13325. next.remove();
  13326. }
  13327. }
  13328. }, {
  13329. key: "replace",
  13330. value: function replace(target) {
  13331. if (target.statics.blotName !== this.statics.blotName) {
  13332. var item = Parchment.create(this.statics.defaultChild);
  13333. target.moveChildren(item);
  13334. this.appendChild(item);
  13335. }
  13336. _get(list_getPrototypeOf(List.prototype), "replace", this).call(this, target);
  13337. }
  13338. }]);
  13339. return List;
  13340. }(Container);
  13341. List.blotName = 'list';
  13342. List.scope = Parchment.Scope.BLOCK_BLOT;
  13343. List.tagName = ['OL', 'UL'];
  13344. List.defaultChild = 'list-item';
  13345. List.allowedChildren = [ListItem];
  13346. return {
  13347. 'formats/list': List
  13348. };
  13349. });
  13350. // CONCATENATED MODULE: ./src/core/view/components/editor/formats/background.js
  13351. /* harmony default export */ var background = (function (Quill) {
  13352. var _Quill$import = Quill.import('parchment'),
  13353. Scope = _Quill$import.Scope;
  13354. var BackgroundStyle = Quill.import('formats/background');
  13355. var BackgroundColorStyle = new BackgroundStyle.constructor('backgroundColor', 'background-color', {
  13356. scope: Scope.INLINE
  13357. });
  13358. return {
  13359. 'formats/backgroundColor': BackgroundColorStyle
  13360. };
  13361. });
  13362. // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
  13363. var shared = __webpack_require__(1);
  13364. // CONCATENATED MODULE: ./src/core/view/components/editor/formats/box.js
  13365. /* harmony default export */ var box = (function (Quill) {
  13366. var _Quill$import = Quill.import('parchment'),
  13367. Scope = _Quill$import.Scope,
  13368. Attributor = _Quill$import.Attributor;
  13369. var config = {
  13370. scope: Scope.BLOCK
  13371. };
  13372. var margin = ['margin', 'marginTop', 'marginBottom', 'marginLeft', 'marginRight'];
  13373. var padding = ['padding', 'paddingTop', 'paddingBottom', 'paddingLeft', 'paddingRight'];
  13374. var result = {};
  13375. margin.concat(padding).forEach(function (name) {
  13376. result["formats/".concat(name)] = new Attributor.Style(name, Object(shared["f" /* kebabCase */])(name), config);
  13377. });
  13378. return result;
  13379. });
  13380. // CONCATENATED MODULE: ./src/core/view/components/editor/formats/font.js
  13381. /* harmony default export */ var formats_font = (function (Quill) {
  13382. var _Quill$import = Quill.import('parchment'),
  13383. Scope = _Quill$import.Scope,
  13384. Attributor = _Quill$import.Attributor;
  13385. var config = {
  13386. scope: Scope.INLINE
  13387. };
  13388. var font = ['font', 'fontSize', 'fontStyle', 'fontVariant', 'fontWeight', 'fontFamily'];
  13389. var result = {};
  13390. font.forEach(function (name) {
  13391. result["formats/".concat(name)] = new Attributor.Style(name, Object(shared["f" /* kebabCase */])(name), config);
  13392. });
  13393. return result;
  13394. });
  13395. // CONCATENATED MODULE: ./src/core/view/components/editor/formats/text.js
  13396. /* harmony default export */ var formats_text = (function (Quill) {
  13397. var _Quill$import = Quill.import('parchment'),
  13398. Scope = _Quill$import.Scope,
  13399. Attributor = _Quill$import.Attributor;
  13400. var text = [{
  13401. name: 'lineHeight',
  13402. scope: Scope.BLOCK
  13403. }, {
  13404. name: 'letterSpacing',
  13405. scope: Scope.INLINE
  13406. }, {
  13407. name: 'textDecoration',
  13408. scope: Scope.INLINE
  13409. }, {
  13410. name: 'textIndent',
  13411. scope: Scope.BLOCK
  13412. }];
  13413. var result = {};
  13414. text.forEach(function (_ref) {
  13415. var name = _ref.name,
  13416. scope = _ref.scope;
  13417. result["formats/".concat(name)] = new Attributor.Style(name, Object(shared["f" /* kebabCase */])(name), {
  13418. scope: scope
  13419. });
  13420. });
  13421. return result;
  13422. });
  13423. // CONCATENATED MODULE: ./src/core/view/components/editor/formats/image.js
  13424. /* harmony default export */ var formats_image = (function (Quill) {
  13425. var Image = Quill.import('formats/image');
  13426. Image.sanitize = function (url) {
  13427. return url;
  13428. };
  13429. });
  13430. // CONCATENATED MODULE: ./src/core/view/components/editor/formats/index.js
  13431. function register(Quill) {
  13432. var formats = {
  13433. divider: divider,
  13434. ins: ins,
  13435. align: align,
  13436. direction: direction,
  13437. list: list,
  13438. background: background,
  13439. box: box,
  13440. font: formats_font,
  13441. text: formats_text,
  13442. image: formats_image
  13443. };
  13444. var options = {};
  13445. Object.values(formats).forEach(function (value) {
  13446. return Object.assign(options, value(Quill));
  13447. });
  13448. Quill.register(options, true);
  13449. }
  13450. /***/ }),
  13451. /* 84 */
  13452. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  13453. "use strict";
  13454. // EXTERNAL MODULE: ./src/core/helpers/tags.js
  13455. var tags = __webpack_require__(67);
  13456. var tags_default = /*#__PURE__*/__webpack_require__.n(tags);
  13457. // EXTERNAL MODULE: ./src/core/helpers/index.js
  13458. var helpers = __webpack_require__(6);
  13459. // CONCATENATED MODULE: ./src/core/vue.js
  13460. // 使用白名单过滤(前期有一批自定义组件使用了 uni-)
  13461. function initVue(Vue) {
  13462. Vue.config.errorHandler = function (err) {
  13463. var app = typeof getApp === 'function' && getApp();
  13464. if (app && Object(helpers["a" /* hasLifecycleHook */])(app.$options, 'onError')) {
  13465. app.__call_hook('onError', err);
  13466. } else {
  13467. console.error(err);
  13468. }
  13469. };
  13470. var oldIsReservedTag = Vue.config.isReservedTag;
  13471. Vue.config.isReservedTag = function (tag) {
  13472. return tags_default.a.indexOf(tag) !== -1 || oldIsReservedTag(tag);
  13473. };
  13474. Vue.config.ignoredElements = tags_default.a;
  13475. var oldGetTagNamespace = Vue.config.getTagNamespace;
  13476. var conflictTags = ['switch', 'image', 'text', 'view'];
  13477. Vue.config.getTagNamespace = function (tag) {
  13478. if (~conflictTags.indexOf(tag)) {
  13479. // svg 部分标签名称与 uni 标签冲突
  13480. return false;
  13481. }
  13482. return oldGetTagNamespace(tag) || false;
  13483. };
  13484. }
  13485. // EXTERNAL MODULE: ./src/core/view/plugins/index.js
  13486. var plugins = __webpack_require__(78);
  13487. // EXTERNAL MODULE: ./src/platforms/app-plus/helpers/get-real-path.js + 1 modules
  13488. var get_real_path = __webpack_require__(65);
  13489. // EXTERNAL MODULE: ./src/platforms/app-plus/view/framework/plugins/data.js
  13490. var data = __webpack_require__(14);
  13491. // CONCATENATED MODULE: ./src/platforms/app-plus/view/framework/plugins/event.js
  13492. function initEvent(Vue) {
  13493. // 部分组件内部使用了$page
  13494. Object.defineProperty(Vue.prototype, '$page', {
  13495. get: function get() {
  13496. return getCurrentPages()[0].$page;
  13497. }
  13498. });
  13499. Vue.prototype.$handleVModelEvent = function (nid, value) {
  13500. data["b" /* vd */].sendUIEvent(this._$id, nid, {
  13501. type: 'input',
  13502. target: {
  13503. value: value
  13504. }
  13505. });
  13506. };
  13507. Vue.prototype.$handleViewEvent = function ($vueEvent) {
  13508. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13509. // const isCustomEvent = $vueEvent._processed // 自定义事件已提前处理过
  13510. if (options.stop) {
  13511. $vueEvent.stopPropagation();
  13512. }
  13513. if (options.prevent) {
  13514. $vueEvent.preventDefault();
  13515. }
  13516. var $event = this.$handleEvent($vueEvent);
  13517. var cid = this._$id;
  13518. var currentTarget = $vueEvent.$origCurrentTarget || $vueEvent.currentTarget; // 当自定义组件根节点触发事件时,nid 补充前缀,避免与组件内部 nid 冲突(根组件page不需要)
  13519. var nid = (currentTarget === this.$el && this.$options.mpType !== 'page' ? 'r-' : '') + $event.options.nid;
  13520. if (typeof nid === 'undefined') {
  13521. return console.error("[".concat(cid, "] nid not found"));
  13522. } // 移除无用属性
  13523. delete $event._processed;
  13524. delete $event.mp;
  13525. delete $event.preventDefault;
  13526. delete $event.stopPropagation;
  13527. delete $event.options;
  13528. delete $event.$origCurrentTarget; // 实时发送,延迟的话,会导致 touch 类事件被合并,影响实际业务逻辑,比如 touchstart 中修改变量为 true,touchend 修改为 false
  13529. data["b" /* vd */].sendUIEvent(cid, nid, $event);
  13530. };
  13531. }
  13532. // CONCATENATED MODULE: ./src/platforms/app-plus/view/framework/plugins/index.js
  13533. /* harmony default export */ var framework_plugins = __webpack_exports__["a"] = ({
  13534. install: function install(Vue, options) {
  13535. if (true) {
  13536. Vue.config.productionTip = false;
  13537. Vue.config.performance = true;
  13538. }
  13539. Vue.prototype._$getRealPath = get_real_path["a" /* default */];
  13540. initVue(Vue);
  13541. plugins["a" /* default */].install(Vue, options);
  13542. Object(data["a" /* initData */])(Vue);
  13543. initEvent(Vue);
  13544. }
  13545. });
  13546. /***/ }),
  13547. /* 85 */
  13548. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  13549. "use strict";
  13550. // EXPORTS
  13551. __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ initBehaviors; });
  13552. // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
  13553. var shared = __webpack_require__(1);
  13554. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  13555. var mixins = __webpack_require__(2);
  13556. // CONCATENATED MODULE: ./src/core/view/plugins/behaviors/form-field.js
  13557. /**
  13558. * uni://form-field
  13559. */
  13560. function created() {
  13561. this.$dispatch('Form', 'uni-form-group-update', {
  13562. type: 'add',
  13563. vm: this
  13564. });
  13565. }
  13566. function beforeDestroy() {
  13567. this.$dispatch('Form', 'uni-form-group-update', {
  13568. type: 'remove',
  13569. vm: this
  13570. });
  13571. }
  13572. /* harmony default export */ var form_field = ({
  13573. name: 'uni://form-field',
  13574. init: function init(options, vm) {
  13575. if (!vm.constructor.options.props || !vm.constructor.options.props.name || !vm.constructor.options.props.value) {
  13576. // 未初始化 props
  13577. if (!vm.constructor.options.props) {
  13578. vm.constructor.options.props = {};
  13579. }
  13580. if (!vm.constructor.options.props.name) {
  13581. vm.constructor.options.props.name = options.props.name = {
  13582. type: String
  13583. };
  13584. }
  13585. if (!vm.constructor.options.props.value) {
  13586. vm.constructor.options.props.value = options.props.value = {
  13587. type: null
  13588. };
  13589. }
  13590. }
  13591. if (!options.propsData) {
  13592. options.propsData = {};
  13593. }
  13594. var $vnode = vm.$vnode;
  13595. if ($vnode && $vnode.data && $vnode.data.attrs) {
  13596. if (Object(shared["c" /* hasOwn */])($vnode.data.attrs, 'name')) {
  13597. options.propsData.name = $vnode.data.attrs.name;
  13598. }
  13599. if (Object(shared["c" /* hasOwn */])($vnode.data.attrs, 'value')) {
  13600. options.propsData.value = $vnode.data.attrs.value;
  13601. }
  13602. }
  13603. if (!vm.constructor.options.methods || !vm.constructor.options.methods._getFormData) {
  13604. // 未初始化 methods
  13605. if (!vm.constructor.options.methods) {
  13606. vm.constructor.options.methods = {};
  13607. }
  13608. if (!options.methods) {
  13609. options.methods = {};
  13610. }
  13611. var formMethods = {
  13612. _getFormData: function _getFormData() {
  13613. return this.name ? {
  13614. key: this.name,
  13615. value: this.value
  13616. } : {};
  13617. },
  13618. _resetFormData: function _resetFormData() {
  13619. this.value = '';
  13620. }
  13621. };
  13622. Object.assign(vm.constructor.options.methods, formMethods);
  13623. Object.assign(options.methods, formMethods); // add $dispatch
  13624. Object.assign(vm.constructor.options.methods, mixins["a" /* emitter */].methods);
  13625. Object.assign(options.methods, mixins["a" /* emitter */].methods);
  13626. var createdHooks = options.created;
  13627. vm.constructor.options.created = options.created = createdHooks ? [].concat(created, createdHooks) : [created];
  13628. var beforeDestroyHooks = options.beforeDestroy;
  13629. vm.constructor.options.beforeDestroy = options.beforeDestroy = beforeDestroyHooks ? [].concat(beforeDestroy, beforeDestroyHooks) : [beforeDestroy];
  13630. }
  13631. }
  13632. });
  13633. // CONCATENATED MODULE: ./src/core/view/plugins/behaviors/index.js
  13634. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  13635. var behaviors = _defineProperty({}, form_field.name, form_field);
  13636. function initBehaviors(options, vm) {
  13637. options.behaviors.forEach(function (name) {
  13638. var behavior = behaviors[name];
  13639. behavior && behavior.init(options, vm);
  13640. });
  13641. }
  13642. /***/ }),
  13643. /* 86 */
  13644. /***/ (function(module, exports, __webpack_require__) {
  13645. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
  13646. // MIT license
  13647. // source: https://github.com/amiller-gh/currentScript-polyfill
  13648. // added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
  13649. (function (root, factory) {
  13650. if (true) {
  13651. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  13652. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  13653. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  13654. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  13655. } else {}
  13656. }(typeof self !== 'undefined' ? self : this, function () {
  13657. function getCurrentScript () {
  13658. if (document.currentScript) {
  13659. return document.currentScript
  13660. }
  13661. // IE 8-10 support script readyState
  13662. // IE 11+ & Firefox support stack trace
  13663. try {
  13664. throw new Error();
  13665. }
  13666. catch (err) {
  13667. // Find the second match for the "at" string to get file src url from stack.
  13668. var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
  13669. ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
  13670. stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
  13671. scriptLocation = (stackDetails && stackDetails[1]) || false,
  13672. line = (stackDetails && stackDetails[2]) || false,
  13673. currentLocation = document.location.href.replace(document.location.hash, ''),
  13674. pageSource,
  13675. inlineScriptSourceRegExp,
  13676. inlineScriptSource,
  13677. scripts = document.getElementsByTagName('script'); // Live NodeList collection
  13678. if (scriptLocation === currentLocation) {
  13679. pageSource = document.documentElement.outerHTML;
  13680. inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
  13681. inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
  13682. }
  13683. for (var i = 0; i < scripts.length; i++) {
  13684. // If ready state is interactive, return the script tag
  13685. if (scripts[i].readyState === 'interactive') {
  13686. return scripts[i];
  13687. }
  13688. // If src matches, return the script tag
  13689. if (scripts[i].src === scriptLocation) {
  13690. return scripts[i];
  13691. }
  13692. // If inline source matches, return the script tag
  13693. if (
  13694. scriptLocation === currentLocation &&
  13695. scripts[i].innerHTML &&
  13696. scripts[i].innerHTML.trim() === inlineScriptSource
  13697. ) {
  13698. return scripts[i];
  13699. }
  13700. }
  13701. // If no match, return null
  13702. return null;
  13703. }
  13704. };
  13705. return getCurrentScript
  13706. }));
  13707. /***/ }),
  13708. /* 87 */
  13709. /***/ (function(module, exports) {
  13710. /**
  13711. * Copyright 2016 Google Inc. All Rights Reserved.
  13712. *
  13713. * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.
  13714. *
  13715. * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
  13716. *
  13717. */
  13718. (function() {
  13719. 'use strict';
  13720. // Exit early if we're not running in a browser.
  13721. if (typeof window !== 'object') {
  13722. return;
  13723. }
  13724. // Exit early if all IntersectionObserver and IntersectionObserverEntry
  13725. // features are natively supported.
  13726. if ('IntersectionObserver' in window &&
  13727. 'IntersectionObserverEntry' in window &&
  13728. 'intersectionRatio' in window.IntersectionObserverEntry.prototype) {
  13729. // Minimal polyfill for Edge 15's lack of `isIntersecting`
  13730. // See: https://github.com/w3c/IntersectionObserver/issues/211
  13731. if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {
  13732. Object.defineProperty(window.IntersectionObserverEntry.prototype,
  13733. 'isIntersecting', {
  13734. get: function () {
  13735. return this.intersectionRatio > 0;
  13736. }
  13737. });
  13738. }
  13739. return;
  13740. }
  13741. /**
  13742. * A local reference to the document.
  13743. */
  13744. var document = window.document;
  13745. /**
  13746. * An IntersectionObserver registry. This registry exists to hold a strong
  13747. * reference to IntersectionObserver instances currently observing a target
  13748. * element. Without this registry, instances without another reference may be
  13749. * garbage collected.
  13750. */
  13751. var registry = [];
  13752. /**
  13753. * Creates the global IntersectionObserverEntry constructor.
  13754. * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry
  13755. * @param {Object} entry A dictionary of instance properties.
  13756. * @constructor
  13757. */
  13758. function IntersectionObserverEntry(entry) {
  13759. this.time = entry.time;
  13760. this.target = entry.target;
  13761. this.rootBounds = entry.rootBounds;
  13762. this.boundingClientRect = entry.boundingClientRect;
  13763. this.intersectionRect = entry.intersectionRect || getEmptyRect();
  13764. this.isIntersecting = !!entry.intersectionRect;
  13765. // Calculates the intersection ratio.
  13766. var targetRect = this.boundingClientRect;
  13767. var targetArea = targetRect.width * targetRect.height;
  13768. var intersectionRect = this.intersectionRect;
  13769. var intersectionArea = intersectionRect.width * intersectionRect.height;
  13770. // Sets intersection ratio.
  13771. if (targetArea) {
  13772. // Round the intersection ratio to avoid floating point math issues:
  13773. // https://github.com/w3c/IntersectionObserver/issues/324
  13774. this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4));
  13775. } else {
  13776. // If area is zero and is intersecting, sets to 1, otherwise to 0
  13777. this.intersectionRatio = this.isIntersecting ? 1 : 0;
  13778. }
  13779. }
  13780. /**
  13781. * Creates the global IntersectionObserver constructor.
  13782. * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface
  13783. * @param {Function} callback The function to be invoked after intersection
  13784. * changes have queued. The function is not invoked if the queue has
  13785. * been emptied by calling the `takeRecords` method.
  13786. * @param {Object=} opt_options Optional configuration options.
  13787. * @constructor
  13788. */
  13789. function IntersectionObserver(callback, opt_options) {
  13790. var options = opt_options || {};
  13791. if (typeof callback != 'function') {
  13792. throw new Error('callback must be a function');
  13793. }
  13794. if (options.root && options.root.nodeType != 1) {
  13795. throw new Error('root must be an Element');
  13796. }
  13797. // Binds and throttles `this._checkForIntersections`.
  13798. this._checkForIntersections = throttle(
  13799. this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT);
  13800. // Private properties.
  13801. this._callback = callback;
  13802. this._observationTargets = [];
  13803. this._queuedEntries = [];
  13804. this._rootMarginValues = this._parseRootMargin(options.rootMargin);
  13805. // Public properties.
  13806. this.thresholds = this._initThresholds(options.threshold);
  13807. this.root = options.root || null;
  13808. this.rootMargin = this._rootMarginValues.map(function(margin) {
  13809. return margin.value + margin.unit;
  13810. }).join(' ');
  13811. }
  13812. /**
  13813. * The minimum interval within which the document will be checked for
  13814. * intersection changes.
  13815. */
  13816. IntersectionObserver.prototype.THROTTLE_TIMEOUT = 100;
  13817. /**
  13818. * The frequency in which the polyfill polls for intersection changes.
  13819. * this can be updated on a per instance basis and must be set prior to
  13820. * calling `observe` on the first target.
  13821. */
  13822. IntersectionObserver.prototype.POLL_INTERVAL = null;
  13823. /**
  13824. * Use a mutation observer on the root element
  13825. * to detect intersection changes.
  13826. */
  13827. IntersectionObserver.prototype.USE_MUTATION_OBSERVER = true;
  13828. /**
  13829. * Starts observing a target element for intersection changes based on
  13830. * the thresholds values.
  13831. * @param {Element} target The DOM element to observe.
  13832. */
  13833. IntersectionObserver.prototype.observe = function(target) {
  13834. var isTargetAlreadyObserved = this._observationTargets.some(function(item) {
  13835. return item.element == target;
  13836. });
  13837. if (isTargetAlreadyObserved) {
  13838. return;
  13839. }
  13840. if (!(target && target.nodeType == 1)) {
  13841. throw new Error('target must be an Element');
  13842. }
  13843. this._registerInstance();
  13844. this._observationTargets.push({element: target, entry: null});
  13845. this._monitorIntersections();
  13846. this._checkForIntersections();
  13847. };
  13848. /**
  13849. * Stops observing a target element for intersection changes.
  13850. * @param {Element} target The DOM element to observe.
  13851. */
  13852. IntersectionObserver.prototype.unobserve = function(target) {
  13853. this._observationTargets =
  13854. this._observationTargets.filter(function(item) {
  13855. return item.element != target;
  13856. });
  13857. if (!this._observationTargets.length) {
  13858. this._unmonitorIntersections();
  13859. this._unregisterInstance();
  13860. }
  13861. };
  13862. /**
  13863. * Stops observing all target elements for intersection changes.
  13864. */
  13865. IntersectionObserver.prototype.disconnect = function() {
  13866. this._observationTargets = [];
  13867. this._unmonitorIntersections();
  13868. this._unregisterInstance();
  13869. };
  13870. /**
  13871. * Returns any queue entries that have not yet been reported to the
  13872. * callback and clears the queue. This can be used in conjunction with the
  13873. * callback to obtain the absolute most up-to-date intersection information.
  13874. * @return {Array} The currently queued entries.
  13875. */
  13876. IntersectionObserver.prototype.takeRecords = function() {
  13877. var records = this._queuedEntries.slice();
  13878. this._queuedEntries = [];
  13879. return records;
  13880. };
  13881. /**
  13882. * Accepts the threshold value from the user configuration object and
  13883. * returns a sorted array of unique threshold values. If a value is not
  13884. * between 0 and 1 and error is thrown.
  13885. * @private
  13886. * @param {Array|number=} opt_threshold An optional threshold value or
  13887. * a list of threshold values, defaulting to [0].
  13888. * @return {Array} A sorted list of unique and valid threshold values.
  13889. */
  13890. IntersectionObserver.prototype._initThresholds = function(opt_threshold) {
  13891. var threshold = opt_threshold || [0];
  13892. if (!Array.isArray(threshold)) threshold = [threshold];
  13893. return threshold.sort().filter(function(t, i, a) {
  13894. if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) {
  13895. throw new Error('threshold must be a number between 0 and 1 inclusively');
  13896. }
  13897. return t !== a[i - 1];
  13898. });
  13899. };
  13900. /**
  13901. * Accepts the rootMargin value from the user configuration object
  13902. * and returns an array of the four margin values as an object containing
  13903. * the value and unit properties. If any of the values are not properly
  13904. * formatted or use a unit other than px or %, and error is thrown.
  13905. * @private
  13906. * @param {string=} opt_rootMargin An optional rootMargin value,
  13907. * defaulting to '0px'.
  13908. * @return {Array<Object>} An array of margin objects with the keys
  13909. * value and unit.
  13910. */
  13911. IntersectionObserver.prototype._parseRootMargin = function(opt_rootMargin) {
  13912. var marginString = opt_rootMargin || '0px';
  13913. var margins = marginString.split(/\s+/).map(function(margin) {
  13914. var parts = /^(-?\d*\.?\d+)(px|%)$/.exec(margin);
  13915. if (!parts) {
  13916. throw new Error('rootMargin must be specified in pixels or percent');
  13917. }
  13918. return {value: parseFloat(parts[1]), unit: parts[2]};
  13919. });
  13920. // Handles shorthand.
  13921. margins[1] = margins[1] || margins[0];
  13922. margins[2] = margins[2] || margins[0];
  13923. margins[3] = margins[3] || margins[1];
  13924. return margins;
  13925. };
  13926. /**
  13927. * Starts polling for intersection changes if the polling is not already
  13928. * happening, and if the page's visibility state is visible.
  13929. * @private
  13930. */
  13931. IntersectionObserver.prototype._monitorIntersections = function() {
  13932. if (!this._monitoringIntersections) {
  13933. this._monitoringIntersections = true;
  13934. // If a poll interval is set, use polling instead of listening to
  13935. // resize and scroll events or DOM mutations.
  13936. if (this.POLL_INTERVAL) {
  13937. this._monitoringInterval = setInterval(
  13938. this._checkForIntersections, this.POLL_INTERVAL);
  13939. }
  13940. else {
  13941. addEvent(window, 'resize', this._checkForIntersections, true);
  13942. addEvent(document, 'scroll', this._checkForIntersections, true);
  13943. if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in window) {
  13944. this._domObserver = new MutationObserver(this._checkForIntersections);
  13945. this._domObserver.observe(document, {
  13946. attributes: true,
  13947. childList: true,
  13948. characterData: true,
  13949. subtree: true
  13950. });
  13951. }
  13952. }
  13953. }
  13954. };
  13955. /**
  13956. * Stops polling for intersection changes.
  13957. * @private
  13958. */
  13959. IntersectionObserver.prototype._unmonitorIntersections = function() {
  13960. if (this._monitoringIntersections) {
  13961. this._monitoringIntersections = false;
  13962. clearInterval(this._monitoringInterval);
  13963. this._monitoringInterval = null;
  13964. removeEvent(window, 'resize', this._checkForIntersections, true);
  13965. removeEvent(document, 'scroll', this._checkForIntersections, true);
  13966. if (this._domObserver) {
  13967. this._domObserver.disconnect();
  13968. this._domObserver = null;
  13969. }
  13970. }
  13971. };
  13972. /**
  13973. * Scans each observation target for intersection changes and adds them
  13974. * to the internal entries queue. If new entries are found, it
  13975. * schedules the callback to be invoked.
  13976. * @private
  13977. */
  13978. IntersectionObserver.prototype._checkForIntersections = function() {
  13979. var rootIsInDom = this._rootIsInDom();
  13980. var rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect();
  13981. this._observationTargets.forEach(function(item) {
  13982. var target = item.element;
  13983. var targetRect = getBoundingClientRect(target);
  13984. var rootContainsTarget = this._rootContainsTarget(target);
  13985. var oldEntry = item.entry;
  13986. var intersectionRect = rootIsInDom && rootContainsTarget &&
  13987. this._computeTargetAndRootIntersection(target, rootRect);
  13988. var newEntry = item.entry = new IntersectionObserverEntry({
  13989. time: now(),
  13990. target: target,
  13991. boundingClientRect: targetRect,
  13992. rootBounds: rootRect,
  13993. intersectionRect: intersectionRect
  13994. });
  13995. if (!oldEntry) {
  13996. this._queuedEntries.push(newEntry);
  13997. } else if (rootIsInDom && rootContainsTarget) {
  13998. // If the new entry intersection ratio has crossed any of the
  13999. // thresholds, add a new entry.
  14000. if (this._hasCrossedThreshold(oldEntry, newEntry)) {
  14001. this._queuedEntries.push(newEntry);
  14002. }
  14003. } else {
  14004. // If the root is not in the DOM or target is not contained within
  14005. // root but the previous entry for this target had an intersection,
  14006. // add a new record indicating removal.
  14007. if (oldEntry && oldEntry.isIntersecting) {
  14008. this._queuedEntries.push(newEntry);
  14009. }
  14010. }
  14011. }, this);
  14012. if (this._queuedEntries.length) {
  14013. this._callback(this.takeRecords(), this);
  14014. }
  14015. };
  14016. /**
  14017. * Accepts a target and root rect computes the intersection between then
  14018. * following the algorithm in the spec.
  14019. * TODO(philipwalton): at this time clip-path is not considered.
  14020. * https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo
  14021. * @param {Element} target The target DOM element
  14022. * @param {Object} rootRect The bounding rect of the root after being
  14023. * expanded by the rootMargin value.
  14024. * @return {?Object} The final intersection rect object or undefined if no
  14025. * intersection is found.
  14026. * @private
  14027. */
  14028. IntersectionObserver.prototype._computeTargetAndRootIntersection =
  14029. function(target, rootRect) {
  14030. // If the element isn't displayed, an intersection can't happen.
  14031. if (window.getComputedStyle(target).display == 'none') return;
  14032. var targetRect = getBoundingClientRect(target);
  14033. var intersectionRect = targetRect;
  14034. var parent = getParentNode(target);
  14035. var atRoot = false;
  14036. while (!atRoot) {
  14037. var parentRect = null;
  14038. var parentComputedStyle = parent.nodeType == 1 ?
  14039. window.getComputedStyle(parent) : {};
  14040. // If the parent isn't displayed, an intersection can't happen.
  14041. if (parentComputedStyle.display == 'none') return;
  14042. if (parent == this.root || parent == document) {
  14043. atRoot = true;
  14044. parentRect = rootRect;
  14045. } else {
  14046. // If the element has a non-visible overflow, and it's not the <body>
  14047. // or <html> element, update the intersection rect.
  14048. // Note: <body> and <html> cannot be clipped to a rect that's not also
  14049. // the document rect, so no need to compute a new intersection.
  14050. if (parent != document.body &&
  14051. parent != document.documentElement &&
  14052. parentComputedStyle.overflow != 'visible') {
  14053. parentRect = getBoundingClientRect(parent);
  14054. }
  14055. }
  14056. // If either of the above conditionals set a new parentRect,
  14057. // calculate new intersection data.
  14058. if (parentRect) {
  14059. intersectionRect = computeRectIntersection(parentRect, intersectionRect);
  14060. if (!intersectionRect) break;
  14061. }
  14062. parent = getParentNode(parent);
  14063. }
  14064. return intersectionRect;
  14065. };
  14066. /**
  14067. * Returns the root rect after being expanded by the rootMargin value.
  14068. * @return {Object} The expanded root rect.
  14069. * @private
  14070. */
  14071. IntersectionObserver.prototype._getRootRect = function() {
  14072. var rootRect;
  14073. if (this.root) {
  14074. rootRect = getBoundingClientRect(this.root);
  14075. } else {
  14076. // Use <html>/<body> instead of window since scroll bars affect size.
  14077. var html = document.documentElement;
  14078. var body = document.body;
  14079. rootRect = {
  14080. top: 0,
  14081. left: 0,
  14082. right: html.clientWidth || body.clientWidth,
  14083. width: html.clientWidth || body.clientWidth,
  14084. bottom: html.clientHeight || body.clientHeight,
  14085. height: html.clientHeight || body.clientHeight
  14086. };
  14087. }
  14088. return this._expandRectByRootMargin(rootRect);
  14089. };
  14090. /**
  14091. * Accepts a rect and expands it by the rootMargin value.
  14092. * @param {Object} rect The rect object to expand.
  14093. * @return {Object} The expanded rect.
  14094. * @private
  14095. */
  14096. IntersectionObserver.prototype._expandRectByRootMargin = function(rect) {
  14097. var margins = this._rootMarginValues.map(function(margin, i) {
  14098. return margin.unit == 'px' ? margin.value :
  14099. margin.value * (i % 2 ? rect.width : rect.height) / 100;
  14100. });
  14101. var newRect = {
  14102. top: rect.top - margins[0],
  14103. right: rect.right + margins[1],
  14104. bottom: rect.bottom + margins[2],
  14105. left: rect.left - margins[3]
  14106. };
  14107. newRect.width = newRect.right - newRect.left;
  14108. newRect.height = newRect.bottom - newRect.top;
  14109. return newRect;
  14110. };
  14111. /**
  14112. * Accepts an old and new entry and returns true if at least one of the
  14113. * threshold values has been crossed.
  14114. * @param {?IntersectionObserverEntry} oldEntry The previous entry for a
  14115. * particular target element or null if no previous entry exists.
  14116. * @param {IntersectionObserverEntry} newEntry The current entry for a
  14117. * particular target element.
  14118. * @return {boolean} Returns true if a any threshold has been crossed.
  14119. * @private
  14120. */
  14121. IntersectionObserver.prototype._hasCrossedThreshold =
  14122. function(oldEntry, newEntry) {
  14123. // To make comparing easier, an entry that has a ratio of 0
  14124. // but does not actually intersect is given a value of -1
  14125. var oldRatio = oldEntry && oldEntry.isIntersecting ?
  14126. oldEntry.intersectionRatio || 0 : -1;
  14127. var newRatio = newEntry.isIntersecting ?
  14128. newEntry.intersectionRatio || 0 : -1;
  14129. // Ignore unchanged ratios
  14130. if (oldRatio === newRatio) return;
  14131. for (var i = 0; i < this.thresholds.length; i++) {
  14132. var threshold = this.thresholds[i];
  14133. // Return true if an entry matches a threshold or if the new ratio
  14134. // and the old ratio are on the opposite sides of a threshold.
  14135. if (threshold == oldRatio || threshold == newRatio ||
  14136. threshold < oldRatio !== threshold < newRatio) {
  14137. return true;
  14138. }
  14139. }
  14140. };
  14141. /**
  14142. * Returns whether or not the root element is an element and is in the DOM.
  14143. * @return {boolean} True if the root element is an element and is in the DOM.
  14144. * @private
  14145. */
  14146. IntersectionObserver.prototype._rootIsInDom = function() {
  14147. return !this.root || containsDeep(document, this.root);
  14148. };
  14149. /**
  14150. * Returns whether or not the target element is a child of root.
  14151. * @param {Element} target The target element to check.
  14152. * @return {boolean} True if the target element is a child of root.
  14153. * @private
  14154. */
  14155. IntersectionObserver.prototype._rootContainsTarget = function(target) {
  14156. return containsDeep(this.root || document, target);
  14157. };
  14158. /**
  14159. * Adds the instance to the global IntersectionObserver registry if it isn't
  14160. * already present.
  14161. * @private
  14162. */
  14163. IntersectionObserver.prototype._registerInstance = function() {
  14164. if (registry.indexOf(this) < 0) {
  14165. registry.push(this);
  14166. }
  14167. };
  14168. /**
  14169. * Removes the instance from the global IntersectionObserver registry.
  14170. * @private
  14171. */
  14172. IntersectionObserver.prototype._unregisterInstance = function() {
  14173. var index = registry.indexOf(this);
  14174. if (index != -1) registry.splice(index, 1);
  14175. };
  14176. /**
  14177. * Returns the result of the performance.now() method or null in browsers
  14178. * that don't support the API.
  14179. * @return {number} The elapsed time since the page was requested.
  14180. */
  14181. function now() {
  14182. return window.performance && performance.now && performance.now();
  14183. }
  14184. /**
  14185. * Throttles a function and delays its execution, so it's only called at most
  14186. * once within a given time period.
  14187. * @param {Function} fn The function to throttle.
  14188. * @param {number} timeout The amount of time that must pass before the
  14189. * function can be called again.
  14190. * @return {Function} The throttled function.
  14191. */
  14192. function throttle(fn, timeout) {
  14193. var timer = null;
  14194. return function () {
  14195. if (!timer) {
  14196. timer = setTimeout(function() {
  14197. fn();
  14198. timer = null;
  14199. }, timeout);
  14200. }
  14201. };
  14202. }
  14203. /**
  14204. * Adds an event handler to a DOM node ensuring cross-browser compatibility.
  14205. * @param {Node} node The DOM node to add the event handler to.
  14206. * @param {string} event The event name.
  14207. * @param {Function} fn The event handler to add.
  14208. * @param {boolean} opt_useCapture Optionally adds the even to the capture
  14209. * phase. Note: this only works in modern browsers.
  14210. */
  14211. function addEvent(node, event, fn, opt_useCapture) {
  14212. if (typeof node.addEventListener == 'function') {
  14213. node.addEventListener(event, fn, opt_useCapture || false);
  14214. }
  14215. else if (typeof node.attachEvent == 'function') {
  14216. node.attachEvent('on' + event, fn);
  14217. }
  14218. }
  14219. /**
  14220. * Removes a previously added event handler from a DOM node.
  14221. * @param {Node} node The DOM node to remove the event handler from.
  14222. * @param {string} event The event name.
  14223. * @param {Function} fn The event handler to remove.
  14224. * @param {boolean} opt_useCapture If the event handler was added with this
  14225. * flag set to true, it should be set to true here in order to remove it.
  14226. */
  14227. function removeEvent(node, event, fn, opt_useCapture) {
  14228. if (typeof node.removeEventListener == 'function') {
  14229. node.removeEventListener(event, fn, opt_useCapture || false);
  14230. }
  14231. else if (typeof node.detatchEvent == 'function') {
  14232. node.detatchEvent('on' + event, fn);
  14233. }
  14234. }
  14235. /**
  14236. * Returns the intersection between two rect objects.
  14237. * @param {Object} rect1 The first rect.
  14238. * @param {Object} rect2 The second rect.
  14239. * @return {?Object} The intersection rect or undefined if no intersection
  14240. * is found.
  14241. */
  14242. function computeRectIntersection(rect1, rect2) {
  14243. var top = Math.max(rect1.top, rect2.top);
  14244. var bottom = Math.min(rect1.bottom, rect2.bottom);
  14245. var left = Math.max(rect1.left, rect2.left);
  14246. var right = Math.min(rect1.right, rect2.right);
  14247. var width = right - left;
  14248. var height = bottom - top;
  14249. return (width >= 0 && height >= 0) && {
  14250. top: top,
  14251. bottom: bottom,
  14252. left: left,
  14253. right: right,
  14254. width: width,
  14255. height: height
  14256. };
  14257. }
  14258. /**
  14259. * Shims the native getBoundingClientRect for compatibility with older IE.
  14260. * @param {Element} el The element whose bounding rect to get.
  14261. * @return {Object} The (possibly shimmed) rect of the element.
  14262. */
  14263. function getBoundingClientRect(el) {
  14264. var rect;
  14265. try {
  14266. rect = el.getBoundingClientRect();
  14267. } catch (err) {
  14268. // Ignore Windows 7 IE11 "Unspecified error"
  14269. // https://github.com/w3c/IntersectionObserver/pull/205
  14270. }
  14271. if (!rect) return getEmptyRect();
  14272. // Older IE
  14273. if (!(rect.width && rect.height)) {
  14274. rect = {
  14275. top: rect.top,
  14276. right: rect.right,
  14277. bottom: rect.bottom,
  14278. left: rect.left,
  14279. width: rect.right - rect.left,
  14280. height: rect.bottom - rect.top
  14281. };
  14282. }
  14283. return rect;
  14284. }
  14285. /**
  14286. * Returns an empty rect object. An empty rect is returned when an element
  14287. * is not in the DOM.
  14288. * @return {Object} The empty rect.
  14289. */
  14290. function getEmptyRect() {
  14291. return {
  14292. top: 0,
  14293. bottom: 0,
  14294. left: 0,
  14295. right: 0,
  14296. width: 0,
  14297. height: 0
  14298. };
  14299. }
  14300. /**
  14301. * Checks to see if a parent element contains a child element (including inside
  14302. * shadow DOM).
  14303. * @param {Node} parent The parent element.
  14304. * @param {Node} child The child element.
  14305. * @return {boolean} True if the parent node contains the child node.
  14306. */
  14307. function containsDeep(parent, child) {
  14308. var node = child;
  14309. while (node) {
  14310. if (node == parent) return true;
  14311. node = getParentNode(node);
  14312. }
  14313. return false;
  14314. }
  14315. /**
  14316. * Gets the parent node of an element or its host element if the parent node
  14317. * is a shadow root.
  14318. * @param {Node} node The node whose parent to get.
  14319. * @return {Node|null} The parent node or null if no parent exists.
  14320. */
  14321. function getParentNode(node) {
  14322. var parent = node.parentNode;
  14323. if (parent && parent.nodeType == 11 && parent.host) {
  14324. // If the parent is a shadow root, return the host element.
  14325. return parent.host;
  14326. }
  14327. if (parent && parent.assignedSlot) {
  14328. // If the parent is distributed in a <slot>, return the parent of a slot.
  14329. return parent.assignedSlot.parentNode;
  14330. }
  14331. return parent;
  14332. }
  14333. // Exposes the constructors globally.
  14334. window.IntersectionObserver = IntersectionObserver;
  14335. window.IntersectionObserverEntry = IntersectionObserverEntry;
  14336. }());
  14337. /***/ }),
  14338. /* 88 */
  14339. /***/ (function(module, exports, __webpack_require__) {
  14340. // extracted by mini-css-extract-plugin
  14341. if(false) { var cssReload; }
  14342. /***/ }),
  14343. /* 89 */
  14344. /***/ (function(module, exports, __webpack_require__) {
  14345. var map = {
  14346. "./button/index.vue": 153,
  14347. "./canvas/index.vue": 147,
  14348. "./checkbox-group/index.vue": 128,
  14349. "./checkbox/index.vue": 129,
  14350. "./editor/index.vue": 148,
  14351. "./form/index.vue": 130,
  14352. "./icon/index.vue": 131,
  14353. "./image/index.vue": 132,
  14354. "./input/index.vue": 133,
  14355. "./label/index.vue": 149,
  14356. "./movable-area/index.vue": 154,
  14357. "./movable-view/index.vue": 126,
  14358. "./navigator/index.vue": 134,
  14359. "./picker-view-column/index.vue": 155,
  14360. "./picker-view/index.vue": 156,
  14361. "./progress/index.vue": 135,
  14362. "./radio-group/index.vue": 136,
  14363. "./radio/index.vue": 137,
  14364. "./resize-sensor/index.vue": 157,
  14365. "./rich-text/index.vue": 125,
  14366. "./scroll-view/index.vue": 138,
  14367. "./slider/index.vue": 139,
  14368. "./swiper-item/index.vue": 140,
  14369. "./swiper/index.vue": 158,
  14370. "./switch/index.vue": 141,
  14371. "./text/index.vue": 159,
  14372. "./textarea/index.vue": 142,
  14373. "./view/index.vue": 143
  14374. };
  14375. function webpackContext(req) {
  14376. var id = webpackContextResolve(req);
  14377. return __webpack_require__(id);
  14378. }
  14379. function webpackContextResolve(req) {
  14380. if(!__webpack_require__.o(map, req)) {
  14381. var e = new Error("Cannot find module '" + req + "'");
  14382. e.code = 'MODULE_NOT_FOUND';
  14383. throw e;
  14384. }
  14385. return map[req];
  14386. }
  14387. webpackContext.keys = function webpackContextKeys() {
  14388. return Object.keys(map);
  14389. };
  14390. webpackContext.resolve = webpackContextResolve;
  14391. module.exports = webpackContext;
  14392. webpackContext.id = 89;
  14393. /***/ }),
  14394. /* 90 */
  14395. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14396. "use strict";
  14397. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
  14398. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14399. /* unused harmony reexport * */
  14400. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14401. /***/ }),
  14402. /* 91 */
  14403. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14404. "use strict";
  14405. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
  14406. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14407. /* unused harmony reexport * */
  14408. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14409. /***/ }),
  14410. /* 92 */
  14411. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14412. "use strict";
  14413. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21);
  14414. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14415. /* unused harmony reexport * */
  14416. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14417. /***/ }),
  14418. /* 93 */
  14419. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14420. "use strict";
  14421. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22);
  14422. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14423. /* unused harmony reexport * */
  14424. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14425. /***/ }),
  14426. /* 94 */
  14427. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14428. "use strict";
  14429. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_editor_css_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24);
  14430. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_editor_css_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_editor_css_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14431. /* unused harmony reexport * */
  14432. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_editor_css_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14433. /***/ }),
  14434. /* 95 */
  14435. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14436. "use strict";
  14437. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25);
  14438. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14439. /* unused harmony reexport * */
  14440. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14441. /***/ }),
  14442. /* 96 */
  14443. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14444. "use strict";
  14445. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26);
  14446. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14447. /* unused harmony reexport * */
  14448. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14449. /***/ }),
  14450. /* 97 */
  14451. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14452. "use strict";
  14453. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27);
  14454. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14455. /* unused harmony reexport * */
  14456. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14457. /***/ }),
  14458. /* 98 */
  14459. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14460. "use strict";
  14461. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29);
  14462. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14463. /* unused harmony reexport * */
  14464. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14465. /***/ }),
  14466. /* 99 */
  14467. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14468. "use strict";
  14469. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30);
  14470. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14471. /* unused harmony reexport * */
  14472. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14473. /***/ }),
  14474. /* 100 */
  14475. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14476. "use strict";
  14477. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31);
  14478. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14479. /* unused harmony reexport * */
  14480. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14481. /***/ }),
  14482. /* 101 */
  14483. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14484. "use strict";
  14485. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32);
  14486. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14487. /* unused harmony reexport * */
  14488. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14489. /***/ }),
  14490. /* 102 */
  14491. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14492. "use strict";
  14493. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33);
  14494. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14495. /* unused harmony reexport * */
  14496. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14497. /***/ }),
  14498. /* 103 */
  14499. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14500. "use strict";
  14501. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34);
  14502. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14503. /* unused harmony reexport * */
  14504. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14505. /***/ }),
  14506. /* 104 */
  14507. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14508. "use strict";
  14509. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(35);
  14510. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14511. /* unused harmony reexport * */
  14512. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14513. /***/ }),
  14514. /* 105 */
  14515. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14516. "use strict";
  14517. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
  14518. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14519. /* unused harmony reexport * */
  14520. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14521. /***/ }),
  14522. /* 106 */
  14523. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14524. "use strict";
  14525. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37);
  14526. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14527. /* unused harmony reexport * */
  14528. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14529. /***/ }),
  14530. /* 107 */
  14531. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14532. "use strict";
  14533. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
  14534. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14535. /* unused harmony reexport * */
  14536. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14537. /***/ }),
  14538. /* 108 */
  14539. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14540. "use strict";
  14541. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39);
  14542. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14543. /* unused harmony reexport * */
  14544. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14545. /***/ }),
  14546. /* 109 */
  14547. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14548. "use strict";
  14549. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
  14550. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14551. /* unused harmony reexport * */
  14552. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14553. /***/ }),
  14554. /* 110 */
  14555. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14556. "use strict";
  14557. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41);
  14558. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14559. /* unused harmony reexport * */
  14560. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14561. /***/ }),
  14562. /* 111 */
  14563. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14564. "use strict";
  14565. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42);
  14566. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14567. /* unused harmony reexport * */
  14568. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14569. /***/ }),
  14570. /* 112 */
  14571. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14572. "use strict";
  14573. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43);
  14574. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14575. /* unused harmony reexport * */
  14576. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14577. /***/ }),
  14578. /* 113 */
  14579. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14580. "use strict";
  14581. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44);
  14582. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14583. /* unused harmony reexport * */
  14584. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14585. /***/ }),
  14586. /* 114 */
  14587. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14588. "use strict";
  14589. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45);
  14590. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14591. /* unused harmony reexport * */
  14592. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14593. /***/ }),
  14594. /* 115 */
  14595. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14596. "use strict";
  14597. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46);
  14598. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14599. /* unused harmony reexport * */
  14600. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14601. /***/ }),
  14602. /* 116 */
  14603. /***/ (function(module, exports, __webpack_require__) {
  14604. var map = {
  14605. "./ad/index.vue": 144,
  14606. "./cover-image/index.vue": 127,
  14607. "./cover-view/index.vue": 160,
  14608. "./map/index.vue": 150,
  14609. "./picker/index.vue": 145,
  14610. "./video/index.vue": 146,
  14611. "./web-view/index.vue": 151
  14612. };
  14613. function webpackContext(req) {
  14614. var id = webpackContextResolve(req);
  14615. return __webpack_require__(id);
  14616. }
  14617. function webpackContextResolve(req) {
  14618. if(!__webpack_require__.o(map, req)) {
  14619. var e = new Error("Cannot find module '" + req + "'");
  14620. e.code = 'MODULE_NOT_FOUND';
  14621. throw e;
  14622. }
  14623. return map[req];
  14624. }
  14625. webpackContext.keys = function webpackContextKeys() {
  14626. return Object.keys(map);
  14627. };
  14628. webpackContext.resolve = webpackContextResolve;
  14629. module.exports = webpackContext;
  14630. webpackContext.id = 116;
  14631. /***/ }),
  14632. /* 117 */
  14633. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14634. "use strict";
  14635. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47);
  14636. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14637. /* unused harmony reexport * */
  14638. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14639. /***/ }),
  14640. /* 118 */
  14641. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14642. "use strict";
  14643. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(48);
  14644. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14645. /* unused harmony reexport * */
  14646. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14647. /***/ }),
  14648. /* 119 */
  14649. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14650. "use strict";
  14651. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(49);
  14652. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14653. /* unused harmony reexport * */
  14654. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14655. /***/ }),
  14656. /* 120 */
  14657. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14658. "use strict";
  14659. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51);
  14660. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14661. /* unused harmony reexport * */
  14662. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14663. /***/ }),
  14664. /* 121 */
  14665. /***/ (function(module, exports, __webpack_require__) {
  14666. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  14667. // backported and transplited with Babel, with backwards-compat fixes
  14668. // Copyright Joyent, Inc. and other Node contributors.
  14669. //
  14670. // Permission is hereby granted, free of charge, to any person obtaining a
  14671. // copy of this software and associated documentation files (the
  14672. // "Software"), to deal in the Software without restriction, including
  14673. // without limitation the rights to use, copy, modify, merge, publish,
  14674. // distribute, sublicense, and/or sell copies of the Software, and to permit
  14675. // persons to whom the Software is furnished to do so, subject to the
  14676. // following conditions:
  14677. //
  14678. // The above copyright notice and this permission notice shall be included
  14679. // in all copies or substantial portions of the Software.
  14680. //
  14681. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  14682. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  14683. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  14684. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  14685. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  14686. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  14687. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  14688. // resolves . and .. elements in a path array with directory names there
  14689. // must be no slashes, empty elements, or device names (c:\) in the array
  14690. // (so also no leading and trailing slashes - it does not distinguish
  14691. // relative and absolute paths)
  14692. function normalizeArray(parts, allowAboveRoot) {
  14693. // if the path tries to go above the root, `up` ends up > 0
  14694. var up = 0;
  14695. for (var i = parts.length - 1; i >= 0; i--) {
  14696. var last = parts[i];
  14697. if (last === '.') {
  14698. parts.splice(i, 1);
  14699. } else if (last === '..') {
  14700. parts.splice(i, 1);
  14701. up++;
  14702. } else if (up) {
  14703. parts.splice(i, 1);
  14704. up--;
  14705. }
  14706. }
  14707. // if the path is allowed to go above the root, restore leading ..s
  14708. if (allowAboveRoot) {
  14709. for (; up--; up) {
  14710. parts.unshift('..');
  14711. }
  14712. }
  14713. return parts;
  14714. }
  14715. // path.resolve([from ...], to)
  14716. // posix version
  14717. exports.resolve = function() {
  14718. var resolvedPath = '',
  14719. resolvedAbsolute = false;
  14720. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  14721. var path = (i >= 0) ? arguments[i] : process.cwd();
  14722. // Skip empty and invalid entries
  14723. if (typeof path !== 'string') {
  14724. throw new TypeError('Arguments to path.resolve must be strings');
  14725. } else if (!path) {
  14726. continue;
  14727. }
  14728. resolvedPath = path + '/' + resolvedPath;
  14729. resolvedAbsolute = path.charAt(0) === '/';
  14730. }
  14731. // At this point the path should be resolved to a full absolute path, but
  14732. // handle relative paths to be safe (might happen when process.cwd() fails)
  14733. // Normalize the path
  14734. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  14735. return !!p;
  14736. }), !resolvedAbsolute).join('/');
  14737. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  14738. };
  14739. // path.normalize(path)
  14740. // posix version
  14741. exports.normalize = function(path) {
  14742. var isAbsolute = exports.isAbsolute(path),
  14743. trailingSlash = substr(path, -1) === '/';
  14744. // Normalize the path
  14745. path = normalizeArray(filter(path.split('/'), function(p) {
  14746. return !!p;
  14747. }), !isAbsolute).join('/');
  14748. if (!path && !isAbsolute) {
  14749. path = '.';
  14750. }
  14751. if (path && trailingSlash) {
  14752. path += '/';
  14753. }
  14754. return (isAbsolute ? '/' : '') + path;
  14755. };
  14756. // posix version
  14757. exports.isAbsolute = function(path) {
  14758. return path.charAt(0) === '/';
  14759. };
  14760. // posix version
  14761. exports.join = function() {
  14762. var paths = Array.prototype.slice.call(arguments, 0);
  14763. return exports.normalize(filter(paths, function(p, index) {
  14764. if (typeof p !== 'string') {
  14765. throw new TypeError('Arguments to path.join must be strings');
  14766. }
  14767. return p;
  14768. }).join('/'));
  14769. };
  14770. // path.relative(from, to)
  14771. // posix version
  14772. exports.relative = function(from, to) {
  14773. from = exports.resolve(from).substr(1);
  14774. to = exports.resolve(to).substr(1);
  14775. function trim(arr) {
  14776. var start = 0;
  14777. for (; start < arr.length; start++) {
  14778. if (arr[start] !== '') break;
  14779. }
  14780. var end = arr.length - 1;
  14781. for (; end >= 0; end--) {
  14782. if (arr[end] !== '') break;
  14783. }
  14784. if (start > end) return [];
  14785. return arr.slice(start, end - start + 1);
  14786. }
  14787. var fromParts = trim(from.split('/'));
  14788. var toParts = trim(to.split('/'));
  14789. var length = Math.min(fromParts.length, toParts.length);
  14790. var samePartsLength = length;
  14791. for (var i = 0; i < length; i++) {
  14792. if (fromParts[i] !== toParts[i]) {
  14793. samePartsLength = i;
  14794. break;
  14795. }
  14796. }
  14797. var outputParts = [];
  14798. for (var i = samePartsLength; i < fromParts.length; i++) {
  14799. outputParts.push('..');
  14800. }
  14801. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  14802. return outputParts.join('/');
  14803. };
  14804. exports.sep = '/';
  14805. exports.delimiter = ':';
  14806. exports.dirname = function (path) {
  14807. if (typeof path !== 'string') path = path + '';
  14808. if (path.length === 0) return '.';
  14809. var code = path.charCodeAt(0);
  14810. var hasRoot = code === 47 /*/*/;
  14811. var end = -1;
  14812. var matchedSlash = true;
  14813. for (var i = path.length - 1; i >= 1; --i) {
  14814. code = path.charCodeAt(i);
  14815. if (code === 47 /*/*/) {
  14816. if (!matchedSlash) {
  14817. end = i;
  14818. break;
  14819. }
  14820. } else {
  14821. // We saw the first non-path separator
  14822. matchedSlash = false;
  14823. }
  14824. }
  14825. if (end === -1) return hasRoot ? '/' : '.';
  14826. if (hasRoot && end === 1) {
  14827. // return '//';
  14828. // Backwards-compat fix:
  14829. return '/';
  14830. }
  14831. return path.slice(0, end);
  14832. };
  14833. function basename(path) {
  14834. if (typeof path !== 'string') path = path + '';
  14835. var start = 0;
  14836. var end = -1;
  14837. var matchedSlash = true;
  14838. var i;
  14839. for (i = path.length - 1; i >= 0; --i) {
  14840. if (path.charCodeAt(i) === 47 /*/*/) {
  14841. // If we reached a path separator that was not part of a set of path
  14842. // separators at the end of the string, stop now
  14843. if (!matchedSlash) {
  14844. start = i + 1;
  14845. break;
  14846. }
  14847. } else if (end === -1) {
  14848. // We saw the first non-path separator, mark this as the end of our
  14849. // path component
  14850. matchedSlash = false;
  14851. end = i + 1;
  14852. }
  14853. }
  14854. if (end === -1) return '';
  14855. return path.slice(start, end);
  14856. }
  14857. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  14858. // in new Node.js versions, so only basename() above is backported here
  14859. exports.basename = function (path, ext) {
  14860. var f = basename(path);
  14861. if (ext && f.substr(-1 * ext.length) === ext) {
  14862. f = f.substr(0, f.length - ext.length);
  14863. }
  14864. return f;
  14865. };
  14866. exports.extname = function (path) {
  14867. if (typeof path !== 'string') path = path + '';
  14868. var startDot = -1;
  14869. var startPart = 0;
  14870. var end = -1;
  14871. var matchedSlash = true;
  14872. // Track the state of characters (if any) we see before our first dot and
  14873. // after any path separator we find
  14874. var preDotState = 0;
  14875. for (var i = path.length - 1; i >= 0; --i) {
  14876. var code = path.charCodeAt(i);
  14877. if (code === 47 /*/*/) {
  14878. // If we reached a path separator that was not part of a set of path
  14879. // separators at the end of the string, stop now
  14880. if (!matchedSlash) {
  14881. startPart = i + 1;
  14882. break;
  14883. }
  14884. continue;
  14885. }
  14886. if (end === -1) {
  14887. // We saw the first non-path separator, mark this as the end of our
  14888. // extension
  14889. matchedSlash = false;
  14890. end = i + 1;
  14891. }
  14892. if (code === 46 /*.*/) {
  14893. // If this is our first dot, mark it as the start of our extension
  14894. if (startDot === -1)
  14895. startDot = i;
  14896. else if (preDotState !== 1)
  14897. preDotState = 1;
  14898. } else if (startDot !== -1) {
  14899. // We saw a non-dot and non-path separator before our dot, so we should
  14900. // have a good chance at having a non-empty extension
  14901. preDotState = -1;
  14902. }
  14903. }
  14904. if (startDot === -1 || end === -1 ||
  14905. // We saw a non-dot character immediately before the dot
  14906. preDotState === 0 ||
  14907. // The (right-most) trimmed path component is exactly '..'
  14908. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  14909. return '';
  14910. }
  14911. return path.slice(startDot, end);
  14912. };
  14913. function filter (xs, f) {
  14914. if (xs.filter) return xs.filter(f);
  14915. var res = [];
  14916. for (var i = 0; i < xs.length; i++) {
  14917. if (f(xs[i], i, xs)) res.push(xs[i]);
  14918. }
  14919. return res;
  14920. }
  14921. // String.prototype.substr - negative index don't work in IE8
  14922. var substr = 'ab'.substr(-1) === 'b'
  14923. ? function (str, start, len) { return str.substr(start, len) }
  14924. : function (str, start, len) {
  14925. if (start < 0) start = str.length + start;
  14926. return str.substr(start, len);
  14927. }
  14928. ;
  14929. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(72)))
  14930. /***/ }),
  14931. /* 122 */
  14932. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14933. "use strict";
  14934. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52);
  14935. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14936. /* unused harmony reexport * */
  14937. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14938. /***/ }),
  14939. /* 123 */
  14940. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14941. "use strict";
  14942. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53);
  14943. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14944. /* unused harmony reexport * */
  14945. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14946. /***/ }),
  14947. /* 124 */
  14948. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14949. "use strict";
  14950. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55);
  14951. /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  14952. /* unused harmony reexport * */
  14953. /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
  14954. /***/ }),
  14955. /* 125 */
  14956. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14957. "use strict";
  14958. // ESM COMPAT FLAG
  14959. __webpack_require__.r(__webpack_exports__);
  14960. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/rich-text/index.vue?vue&type=template&id=1447b4ca&
  14961. var render = function() {
  14962. var _vm = this
  14963. var _h = _vm.$createElement
  14964. var _c = _vm._self._c || _h
  14965. return _c("uni-rich-text", _vm._g({}, _vm.$listeners), [_c("div")])
  14966. }
  14967. var staticRenderFns = []
  14968. render._withStripped = true
  14969. // CONCATENATED MODULE: ./src/core/view/components/rich-text/index.vue?vue&type=template&id=1447b4ca&
  14970. // EXTERNAL MODULE: ./src/core/helpers/html-parser.js
  14971. var html_parser = __webpack_require__(60);
  14972. // CONCATENATED MODULE: ./src/core/view/components/rich-text/html-parser.js
  14973. function removeDOCTYPE(html) {
  14974. return html.replace(/<\?xml.*\?>\n/, '').replace(/<!doctype.*>\n/, '').replace(/<!DOCTYPE.*>\n/, '');
  14975. }
  14976. function parseAttrs(attrs) {
  14977. return attrs.reduce(function (pre, attr) {
  14978. var value = attr.value;
  14979. var name = attr.name;
  14980. if (value.match(/ /) && name !== 'style') {
  14981. value = value.split(' ');
  14982. }
  14983. if (pre[name]) {
  14984. if (Array.isArray(pre[name])) {
  14985. pre[name].push(value);
  14986. } else {
  14987. pre[name] = [pre[name], value];
  14988. }
  14989. } else {
  14990. pre[name] = value;
  14991. }
  14992. return pre;
  14993. }, {});
  14994. }
  14995. function parseHtml(html) {
  14996. html = removeDOCTYPE(html);
  14997. var stacks = [];
  14998. var results = {
  14999. node: 'root',
  15000. children: []
  15001. };
  15002. Object(html_parser["a" /* default */])(html, {
  15003. start: function start(tag, attrs, unary) {
  15004. var node = {
  15005. name: tag
  15006. };
  15007. if (attrs.length !== 0) {
  15008. node.attrs = parseAttrs(attrs);
  15009. }
  15010. if (unary) {
  15011. var parent = stacks[0] || results;
  15012. if (!parent.children) {
  15013. parent.children = [];
  15014. }
  15015. parent.children.push(node);
  15016. } else {
  15017. stacks.unshift(node);
  15018. }
  15019. },
  15020. end: function end(tag) {
  15021. var node = stacks.shift();
  15022. if (node.name !== tag) console.error('invalid state: mismatch end tag');
  15023. if (stacks.length === 0) {
  15024. results.children.push(node);
  15025. } else {
  15026. var parent = stacks[0];
  15027. if (!parent.children) {
  15028. parent.children = [];
  15029. }
  15030. parent.children.push(node);
  15031. }
  15032. },
  15033. chars: function chars(text) {
  15034. var node = {
  15035. type: 'text',
  15036. text: text
  15037. };
  15038. if (stacks.length === 0) {
  15039. results.children.push(node);
  15040. } else {
  15041. var parent = stacks[0];
  15042. if (!parent.children) {
  15043. parent.children = [];
  15044. }
  15045. parent.children.push(node);
  15046. }
  15047. },
  15048. comment: function comment(text) {
  15049. var node = {
  15050. node: 'comment',
  15051. text: text
  15052. };
  15053. var parent = stacks[0];
  15054. if (!parent.children) {
  15055. parent.children = [];
  15056. }
  15057. parent.children.push(node);
  15058. }
  15059. });
  15060. return results.children;
  15061. }
  15062. // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
  15063. var shared = __webpack_require__(1);
  15064. // CONCATENATED MODULE: ./src/core/view/components/rich-text/nodes-parser.js
  15065. var TAGS = {
  15066. a: '',
  15067. abbr: '',
  15068. b: '',
  15069. blockquote: '',
  15070. br: '',
  15071. code: '',
  15072. col: ['span', 'width'],
  15073. colgroup: ['span', 'width'],
  15074. dd: '',
  15075. del: '',
  15076. div: '',
  15077. dl: '',
  15078. dt: '',
  15079. em: '',
  15080. fieldset: '',
  15081. h1: '',
  15082. h2: '',
  15083. h3: '',
  15084. h4: '',
  15085. h5: '',
  15086. h6: '',
  15087. hr: '',
  15088. i: '',
  15089. img: ['alt', 'src', 'height', 'width'],
  15090. ins: '',
  15091. label: '',
  15092. legend: '',
  15093. li: '',
  15094. ol: ['start', 'type'],
  15095. p: '',
  15096. q: '',
  15097. span: '',
  15098. strong: '',
  15099. sub: '',
  15100. sup: '',
  15101. table: ['width'],
  15102. tbody: '',
  15103. td: ['colspan', 'rowspan', 'height', 'width'],
  15104. tfoot: '',
  15105. th: ['colspan', 'rowspan', 'height', 'width'],
  15106. thead: '',
  15107. tr: '',
  15108. ul: ''
  15109. };
  15110. var CHARS = {
  15111. amp: '&',
  15112. gt: '>',
  15113. lt: '<',
  15114. nbsp: ' ',
  15115. quot: '"',
  15116. apos: "'"
  15117. };
  15118. function decodeEntities(htmlString) {
  15119. return htmlString.replace(/&(([a-zA-Z]+)|(#x{0,1}[\da-zA-Z]+));/gi, function (match, stage) {
  15120. if (Object(shared["c" /* hasOwn */])(CHARS, stage) && CHARS[stage]) {
  15121. return CHARS[stage];
  15122. }
  15123. if (/^#[0-9]{1,4}$/.test(stage)) {
  15124. return String.fromCharCode(stage.slice(1));
  15125. }
  15126. if (/^#x[0-9a-f]{1,4}$/i.test(stage)) {
  15127. return String.fromCharCode('0' + stage.slice(1));
  15128. }
  15129. var wrap = document.createElement('div');
  15130. wrap.innerHTML = match;
  15131. return wrap.innerText || wrap.textContent;
  15132. });
  15133. }
  15134. function parseNodes(nodes, parentNode) {
  15135. nodes.forEach(function (node) {
  15136. if (!Object(shared["e" /* isPlainObject */])(node)) {
  15137. return;
  15138. }
  15139. if (!Object(shared["c" /* hasOwn */])(node, 'type') || node.type === 'node') {
  15140. if (!(typeof node.name === 'string' && node.name)) {
  15141. return;
  15142. }
  15143. var tagName = node.name.toLowerCase();
  15144. if (!Object(shared["c" /* hasOwn */])(TAGS, tagName)) {
  15145. return;
  15146. }
  15147. var elem = document.createElement(tagName);
  15148. if (!elem) {
  15149. return;
  15150. }
  15151. var attrs = node.attrs;
  15152. if (Object(shared["e" /* isPlainObject */])(attrs)) {
  15153. var tagAttrs = TAGS[tagName] || [];
  15154. Object.keys(attrs).forEach(function (name) {
  15155. var value = attrs[name];
  15156. switch (name) {
  15157. case 'class':
  15158. /* eslint-disable no-fallthrough */
  15159. Array.isArray(value) && (value = value.join(' '));
  15160. case 'style':
  15161. elem.setAttribute(name, value);
  15162. break;
  15163. default:
  15164. if (tagAttrs.indexOf(name) !== -1) {
  15165. elem.setAttribute(name, value);
  15166. }
  15167. }
  15168. });
  15169. }
  15170. var children = node.children;
  15171. if (Array.isArray(children) && children.length) {
  15172. parseNodes(node.children, elem);
  15173. }
  15174. parentNode.appendChild(elem);
  15175. } else {
  15176. if (node.type === 'text' && typeof node.text === 'string' && node.text !== '') {
  15177. parentNode.appendChild(document.createTextNode(decodeEntities(node.text)));
  15178. }
  15179. }
  15180. });
  15181. return parentNode;
  15182. }
  15183. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/rich-text/index.vue?vue&type=script&lang=js&
  15184. //
  15185. //
  15186. //
  15187. //
  15188. //
  15189. /* harmony default export */ var rich_textvue_type_script_lang_js_ = ({
  15190. name: 'RichText',
  15191. props: {
  15192. nodes: {
  15193. type: [Array, String],
  15194. default: function _default() {
  15195. return [];
  15196. }
  15197. }
  15198. },
  15199. watch: {
  15200. nodes: function nodes(value) {
  15201. this._renderNodes(value);
  15202. }
  15203. },
  15204. mounted: function mounted() {
  15205. this._renderNodes(this.nodes);
  15206. },
  15207. methods: {
  15208. _renderNodes: function _renderNodes(nodes) {
  15209. if (typeof nodes === 'string') {
  15210. nodes = parseHtml(nodes);
  15211. }
  15212. var nodeList = parseNodes(nodes, document.createDocumentFragment());
  15213. this.$el.firstChild.innerHTML = '';
  15214. this.$el.firstChild.appendChild(nodeList);
  15215. }
  15216. }
  15217. });
  15218. // CONCATENATED MODULE: ./src/core/view/components/rich-text/index.vue?vue&type=script&lang=js&
  15219. /* harmony default export */ var components_rich_textvue_type_script_lang_js_ = (rich_textvue_type_script_lang_js_);
  15220. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  15221. var componentNormalizer = __webpack_require__(0);
  15222. // CONCATENATED MODULE: ./src/core/view/components/rich-text/index.vue
  15223. /* normalize component */
  15224. var component = Object(componentNormalizer["a" /* default */])(
  15225. components_rich_textvue_type_script_lang_js_,
  15226. render,
  15227. staticRenderFns,
  15228. false,
  15229. null,
  15230. null,
  15231. null
  15232. )
  15233. /* hot reload */
  15234. if (false) { var api; }
  15235. component.options.__file = "src/core/view/components/rich-text/index.vue"
  15236. /* harmony default export */ var rich_text = __webpack_exports__["default"] = (component.exports);
  15237. /***/ }),
  15238. /* 126 */
  15239. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  15240. "use strict";
  15241. // ESM COMPAT FLAG
  15242. __webpack_require__.r(__webpack_exports__);
  15243. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/movable-view/index.vue?vue&type=template&id=8de47606&
  15244. var render = function() {
  15245. var _vm = this
  15246. var _h = _vm.$createElement
  15247. var _c = _vm._self._c || _h
  15248. return _c(
  15249. "uni-movable-view",
  15250. _vm._g({}, _vm.$listeners),
  15251. [
  15252. _c("v-uni-resize-sensor", { on: { resize: _vm.setParent } }),
  15253. _vm._t("default")
  15254. ],
  15255. 2
  15256. )
  15257. }
  15258. var staticRenderFns = []
  15259. render._withStripped = true
  15260. // CONCATENATED MODULE: ./src/core/view/components/movable-view/index.vue?vue&type=template&id=8de47606&
  15261. // EXTERNAL MODULE: ./src/core/view/mixins/touchtrack.js
  15262. var touchtrack = __webpack_require__(9);
  15263. // CONCATENATED MODULE: ./src/core/view/components/movable-view/utils.js
  15264. function e(e, t, n) {
  15265. return e > t - n && e < t + n;
  15266. }
  15267. function t(t, n) {
  15268. return e(t, 0, n);
  15269. }
  15270. function Decline() {}
  15271. Decline.prototype.x = function (e) {
  15272. return Math.sqrt(e);
  15273. };
  15274. function Friction(e, t) {
  15275. this._m = e;
  15276. this._f = 1e3 * t;
  15277. this._startTime = 0;
  15278. this._v = 0;
  15279. }
  15280. Friction.prototype.setV = function (x, y) {
  15281. var n = Math.pow(Math.pow(x, 2) + Math.pow(y, 2), 0.5);
  15282. this._x_v = x;
  15283. this._y_v = y;
  15284. this._x_a = -this._f * this._x_v / n;
  15285. this._y_a = -this._f * this._y_v / n;
  15286. this._t = Math.abs(x / this._x_a) || Math.abs(y / this._y_a);
  15287. this._lastDt = null;
  15288. this._startTime = new Date().getTime();
  15289. };
  15290. Friction.prototype.setS = function (x, y) {
  15291. this._x_s = x;
  15292. this._y_s = y;
  15293. };
  15294. Friction.prototype.s = function (t) {
  15295. if (undefined === t) {
  15296. t = (new Date().getTime() - this._startTime) / 1e3;
  15297. }
  15298. if (t > this._t) {
  15299. t = this._t;
  15300. this._lastDt = t;
  15301. }
  15302. var x = this._x_v * t + 0.5 * this._x_a * Math.pow(t, 2) + this._x_s;
  15303. var y = this._y_v * t + 0.5 * this._y_a * Math.pow(t, 2) + this._y_s;
  15304. if (this._x_a > 0 && x < this._endPositionX || this._x_a < 0 && x > this._endPositionX) {
  15305. x = this._endPositionX;
  15306. }
  15307. if (this._y_a > 0 && y < this._endPositionY || this._y_a < 0 && y > this._endPositionY) {
  15308. y = this._endPositionY;
  15309. }
  15310. return {
  15311. x: x,
  15312. y: y
  15313. };
  15314. };
  15315. Friction.prototype.ds = function (t) {
  15316. if (undefined === t) {
  15317. t = (new Date().getTime() - this._startTime) / 1e3;
  15318. }
  15319. if (t > this._t) {
  15320. t = this._t;
  15321. }
  15322. return {
  15323. dx: this._x_v + this._x_a * t,
  15324. dy: this._y_v + this._y_a * t
  15325. };
  15326. };
  15327. Friction.prototype.delta = function () {
  15328. return {
  15329. x: -1.5 * Math.pow(this._x_v, 2) / this._x_a || 0,
  15330. y: -1.5 * Math.pow(this._y_v, 2) / this._y_a || 0
  15331. };
  15332. };
  15333. Friction.prototype.dt = function () {
  15334. return -this._x_v / this._x_a;
  15335. };
  15336. Friction.prototype.done = function () {
  15337. var t = e(this.s().x, this._endPositionX) || e(this.s().y, this._endPositionY) || this._lastDt === this._t;
  15338. this._lastDt = null;
  15339. return t;
  15340. };
  15341. Friction.prototype.setEnd = function (x, y) {
  15342. this._endPositionX = x;
  15343. this._endPositionY = y;
  15344. };
  15345. Friction.prototype.reconfigure = function (m, f) {
  15346. this._m = m;
  15347. this._f = 1e3 * f;
  15348. };
  15349. function Spring(m, k, c) {
  15350. this._m = m;
  15351. this._k = k;
  15352. this._c = c;
  15353. this._solution = null;
  15354. this._endPosition = 0;
  15355. this._startTime = 0;
  15356. }
  15357. Spring.prototype._solve = function (e, t) {
  15358. var n = this._c;
  15359. var i = this._m;
  15360. var r = this._k;
  15361. var o = n * n - 4 * i * r;
  15362. if (o === 0) {
  15363. var a = -n / (2 * i);
  15364. var s = e;
  15365. var l = t / (a * e);
  15366. return {
  15367. x: function x(e) {
  15368. return (s + l * e) * Math.pow(Math.E, a * e);
  15369. },
  15370. dx: function dx(e) {
  15371. var t = Math.pow(Math.E, a * e);
  15372. return a * (s + l * e) * t + l * t;
  15373. }
  15374. };
  15375. }
  15376. if (o > 0) {
  15377. var c = (-n - Math.sqrt(o)) / (2 * i);
  15378. var u = (-n + Math.sqrt(o)) / (2 * i);
  15379. var d = (t - c * e) / (u - c);
  15380. var h = e - d;
  15381. return {
  15382. x: function x(e) {
  15383. var t;
  15384. var n;
  15385. if (e === this._t) {
  15386. t = this._powER1T;
  15387. n = this._powER2T;
  15388. }
  15389. this._t = e;
  15390. if (!t) {
  15391. t = this._powER1T = Math.pow(Math.E, c * e);
  15392. }
  15393. if (!n) {
  15394. n = this._powER2T = Math.pow(Math.E, u * e);
  15395. }
  15396. return h * t + d * n;
  15397. },
  15398. dx: function dx(e) {
  15399. var t;
  15400. var n;
  15401. if (e === this._t) {
  15402. t = this._powER1T;
  15403. n = this._powER2T;
  15404. }
  15405. this._t = e;
  15406. if (!t) {
  15407. t = this._powER1T = Math.pow(Math.E, c * e);
  15408. }
  15409. if (!n) {
  15410. n = this._powER2T = Math.pow(Math.E, u * e);
  15411. }
  15412. return h * c * t + d * u * n;
  15413. }
  15414. };
  15415. }
  15416. var p = Math.sqrt(4 * i * r - n * n) / (2 * i);
  15417. var f = -n / 2 * i;
  15418. var v = e;
  15419. var g = (t - f * e) / p;
  15420. return {
  15421. x: function x(e) {
  15422. return Math.pow(Math.E, f * e) * (v * Math.cos(p * e) + g * Math.sin(p * e));
  15423. },
  15424. dx: function dx(e) {
  15425. var t = Math.pow(Math.E, f * e);
  15426. var n = Math.cos(p * e);
  15427. var i = Math.sin(p * e);
  15428. return t * (g * p * n - v * p * i) + f * t * (g * i + v * n);
  15429. }
  15430. };
  15431. };
  15432. Spring.prototype.x = function (e) {
  15433. if (undefined === e) {
  15434. e = (new Date().getTime() - this._startTime) / 1e3;
  15435. }
  15436. return this._solution ? this._endPosition + this._solution.x(e) : 0;
  15437. };
  15438. Spring.prototype.dx = function (e) {
  15439. if (undefined === e) {
  15440. e = (new Date().getTime() - this._startTime) / 1e3;
  15441. }
  15442. return this._solution ? this._solution.dx(e) : 0;
  15443. };
  15444. Spring.prototype.setEnd = function (e, n, i) {
  15445. if (!i) {
  15446. i = new Date().getTime();
  15447. }
  15448. if (e !== this._endPosition || !t(n, 0.1)) {
  15449. n = n || 0;
  15450. var r = this._endPosition;
  15451. if (this._solution) {
  15452. if (t(n, 0.1)) {
  15453. n = this._solution.dx((i - this._startTime) / 1e3);
  15454. }
  15455. r = this._solution.x((i - this._startTime) / 1e3);
  15456. if (t(n, 0.1)) {
  15457. n = 0;
  15458. }
  15459. if (t(r, 0.1)) {
  15460. r = 0;
  15461. }
  15462. r += this._endPosition;
  15463. }
  15464. if (!(this._solution && t(r - e, 0.1) && t(n, 0.1))) {
  15465. this._endPosition = e;
  15466. this._solution = this._solve(r - this._endPosition, n);
  15467. this._startTime = i;
  15468. }
  15469. }
  15470. };
  15471. Spring.prototype.snap = function (e) {
  15472. this._startTime = new Date().getTime();
  15473. this._endPosition = e;
  15474. this._solution = {
  15475. x: function x() {
  15476. return 0;
  15477. },
  15478. dx: function dx() {
  15479. return 0;
  15480. }
  15481. };
  15482. };
  15483. Spring.prototype.done = function (n) {
  15484. if (!n) {
  15485. n = new Date().getTime();
  15486. }
  15487. return e(this.x(), this._endPosition, 0.1) && t(this.dx(), 0.1);
  15488. };
  15489. Spring.prototype.reconfigure = function (m, t, c) {
  15490. this._m = m;
  15491. this._k = t;
  15492. this._c = c;
  15493. if (!this.done()) {
  15494. this._solution = this._solve(this.x() - this._endPosition, this.dx());
  15495. this._startTime = new Date().getTime();
  15496. }
  15497. };
  15498. Spring.prototype.springConstant = function () {
  15499. return this._k;
  15500. };
  15501. Spring.prototype.damping = function () {
  15502. return this._c;
  15503. };
  15504. Spring.prototype.configuration = function () {
  15505. function e(e, t) {
  15506. e.reconfigure(1, t, e.damping());
  15507. }
  15508. function t(e, t) {
  15509. e.reconfigure(1, e.springConstant(), t);
  15510. }
  15511. return [{
  15512. label: 'Spring Constant',
  15513. read: this.springConstant.bind(this),
  15514. write: e.bind(this, this),
  15515. min: 100,
  15516. max: 1e3
  15517. }, {
  15518. label: 'Damping',
  15519. read: this.damping.bind(this),
  15520. write: t.bind(this, this),
  15521. min: 1,
  15522. max: 500
  15523. }];
  15524. };
  15525. function STD(e, t, n) {
  15526. this._springX = new Spring(e, t, n);
  15527. this._springY = new Spring(e, t, n);
  15528. this._springScale = new Spring(e, t, n);
  15529. this._startTime = 0;
  15530. }
  15531. STD.prototype.setEnd = function (e, t, n, i) {
  15532. var r = new Date().getTime();
  15533. this._springX.setEnd(e, i, r);
  15534. this._springY.setEnd(t, i, r);
  15535. this._springScale.setEnd(n, i, r);
  15536. this._startTime = r;
  15537. };
  15538. STD.prototype.x = function () {
  15539. var e = (new Date().getTime() - this._startTime) / 1e3;
  15540. return {
  15541. x: this._springX.x(e),
  15542. y: this._springY.x(e),
  15543. scale: this._springScale.x(e)
  15544. };
  15545. };
  15546. STD.prototype.done = function () {
  15547. var e = new Date().getTime();
  15548. return this._springX.done(e) && this._springY.done(e) && this._springScale.done(e);
  15549. };
  15550. STD.prototype.reconfigure = function (e, t, n) {
  15551. this._springX.reconfigure(e, t, n);
  15552. this._springY.reconfigure(e, t, n);
  15553. this._springScale.reconfigure(e, t, n);
  15554. };
  15555. // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
  15556. var shared = __webpack_require__(1);
  15557. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/movable-view/index.vue?vue&type=script&lang=js&
  15558. //
  15559. //
  15560. //
  15561. //
  15562. //
  15563. //
  15564. var requesting = false;
  15565. function _requestAnimationFrame(e) {
  15566. if (!requesting) {
  15567. requesting = true;
  15568. requestAnimationFrame(function () {
  15569. e();
  15570. requesting = false;
  15571. });
  15572. }
  15573. }
  15574. function p(t, n) {
  15575. if (t === n) {
  15576. return 0;
  15577. }
  15578. var i = t.offsetLeft;
  15579. return t.offsetParent ? i += p(t.offsetParent, n) : 0;
  15580. }
  15581. function f(t, n) {
  15582. if (t === n) {
  15583. return 0;
  15584. }
  15585. var i = t.offsetTop;
  15586. return t.offsetParent ? i += f(t.offsetParent, n) : 0;
  15587. }
  15588. function v(a, b) {
  15589. return +((1000 * a - 1000 * b) / 1000).toFixed(1);
  15590. }
  15591. function g(e, t, n) {
  15592. var i = function i(e) {
  15593. if (e && e.id) {
  15594. cancelAnimationFrame(e.id);
  15595. }
  15596. if (e) {
  15597. e.cancelled = true;
  15598. }
  15599. };
  15600. var r = {
  15601. id: 0,
  15602. cancelled: false
  15603. };
  15604. function fn(n, i, r, o) {
  15605. if (!n || !n.cancelled) {
  15606. r(i);
  15607. var a = e.done();
  15608. if (!a) {
  15609. if (!n.cancelled) {
  15610. n.id = requestAnimationFrame(fn.bind(null, n, i, r, o));
  15611. }
  15612. }
  15613. if (a && o) {
  15614. o(i);
  15615. }
  15616. }
  15617. }
  15618. fn(r, e, t, n);
  15619. return {
  15620. cancel: i.bind(null, r),
  15621. model: e
  15622. };
  15623. }
  15624. /* harmony default export */ var movable_viewvue_type_script_lang_js_ = ({
  15625. name: 'MovableView',
  15626. mixins: [touchtrack["a" /* default */]],
  15627. props: {
  15628. direction: {
  15629. type: String,
  15630. default: 'none'
  15631. },
  15632. inertia: {
  15633. type: [Boolean, String],
  15634. default: false
  15635. },
  15636. outOfBounds: {
  15637. type: [Boolean, String],
  15638. default: false
  15639. },
  15640. x: {
  15641. type: [Number, String],
  15642. default: 0
  15643. },
  15644. y: {
  15645. type: [Number, String],
  15646. default: 0
  15647. },
  15648. damping: {
  15649. type: [Number, String],
  15650. default: 20
  15651. },
  15652. friction: {
  15653. type: [Number, String],
  15654. default: 2
  15655. },
  15656. disabled: {
  15657. type: [Boolean, String],
  15658. default: false
  15659. },
  15660. scale: {
  15661. type: [Boolean, String],
  15662. default: false
  15663. },
  15664. scaleMin: {
  15665. type: [Number, String],
  15666. default: 0.5
  15667. },
  15668. scaleMax: {
  15669. type: [Number, String],
  15670. default: 10
  15671. },
  15672. scaleValue: {
  15673. type: [Number, String],
  15674. default: 1
  15675. },
  15676. animation: {
  15677. type: [Boolean, String],
  15678. default: true
  15679. }
  15680. },
  15681. data: function data() {
  15682. return {
  15683. xSync: this._getPx(this.x),
  15684. ySync: this._getPx(this.y),
  15685. scaleValueSync: Number(this.scaleValue) || 1,
  15686. width: 0,
  15687. height: 0,
  15688. minX: 0,
  15689. minY: 0,
  15690. maxX: 0,
  15691. maxY: 0
  15692. };
  15693. },
  15694. computed: {
  15695. dampingNumber: function dampingNumber() {
  15696. var val = Number(this.damping);
  15697. return isNaN(val) ? 20 : val;
  15698. },
  15699. frictionNumber: function frictionNumber() {
  15700. var val = Number(this.friction);
  15701. return isNaN(val) || val <= 0 ? 2 : val;
  15702. },
  15703. scaleMinNumber: function scaleMinNumber() {
  15704. var val = Number(this.scaleMin);
  15705. return isNaN(val) ? 0.5 : val;
  15706. },
  15707. scaleMaxNumber: function scaleMaxNumber() {
  15708. var val = Number(this.scaleMax);
  15709. return isNaN(val) ? 10 : val;
  15710. },
  15711. xMove: function xMove() {
  15712. return this.direction === 'all' || this.direction === 'horizontal';
  15713. },
  15714. yMove: function yMove() {
  15715. return this.direction === 'all' || this.direction === 'vertical';
  15716. }
  15717. },
  15718. watch: {
  15719. x: function x(val) {
  15720. this.xSync = this._getPx(val);
  15721. },
  15722. xSync: function xSync(val) {
  15723. this._setX(val);
  15724. },
  15725. y: function y(val) {
  15726. this.ySync = this._getPx(val);
  15727. },
  15728. ySync: function ySync(val) {
  15729. this._setY(val);
  15730. },
  15731. scaleValue: function scaleValue(val) {
  15732. this.scaleValueSync = Number(val) || 0;
  15733. },
  15734. scaleValueSync: function scaleValueSync(val) {
  15735. this._setScaleValue(val);
  15736. },
  15737. scaleMinNumber: function scaleMinNumber() {
  15738. this._setScaleMinOrMax();
  15739. },
  15740. scaleMaxNumber: function scaleMaxNumber() {
  15741. this._setScaleMinOrMax();
  15742. }
  15743. },
  15744. created: function created() {
  15745. this._offset = {
  15746. x: 0,
  15747. y: 0
  15748. };
  15749. this._scaleOffset = {
  15750. x: 0,
  15751. y: 0
  15752. };
  15753. this._translateX = 0;
  15754. this._translateY = 0;
  15755. this._scale = 1;
  15756. this._oldScale = 1;
  15757. this._STD = new STD(1, 9 * Math.pow(this.dampingNumber, 2) / 40, this.dampingNumber);
  15758. this._friction = new Friction(1, this.frictionNumber);
  15759. this._declineX = new Decline();
  15760. this._declineY = new Decline();
  15761. this.__touchInfo = {
  15762. historyX: [0, 0],
  15763. historyY: [0, 0],
  15764. historyT: [0, 0]
  15765. };
  15766. },
  15767. mounted: function mounted() {
  15768. this.touchtrack(this.$el, '_onTrack');
  15769. this.setParent();
  15770. this._friction.reconfigure(1, this.frictionNumber);
  15771. this._STD.reconfigure(1, 9 * Math.pow(this.dampingNumber, 2) / 40, this.dampingNumber);
  15772. this.$el.style.transformOrigin = 'center';
  15773. },
  15774. methods: {
  15775. _getPx: function _getPx(val) {
  15776. if (/\d+[ur]px$/i.test(val)) {
  15777. return uni.upx2px(parseFloat(val));
  15778. }
  15779. return Number(val) || 0;
  15780. },
  15781. _setX: function _setX(val) {
  15782. if (this.xMove) {
  15783. if (val + this._scaleOffset.x === this._translateX) {
  15784. return this._translateX;
  15785. } else {
  15786. if (this._SFA) {
  15787. this._SFA.cancel();
  15788. }
  15789. this._animationTo(val + this._scaleOffset.x, this.ySync + this._scaleOffset.y, this._scale);
  15790. }
  15791. }
  15792. return val;
  15793. },
  15794. _setY: function _setY(val) {
  15795. if (this.yMove) {
  15796. if (val + this._scaleOffset.y === this._translateY) {
  15797. return this._translateY;
  15798. } else {
  15799. if (this._SFA) {
  15800. this._SFA.cancel();
  15801. }
  15802. this._animationTo(this.xSync + this._scaleOffset.x, val + this._scaleOffset.y, this._scale);
  15803. }
  15804. }
  15805. return val;
  15806. },
  15807. _setScaleMinOrMax: function _setScaleMinOrMax() {
  15808. if (!this.scale) {
  15809. return false;
  15810. }
  15811. this._updateScale(this._scale, true);
  15812. this._updateOldScale(this._scale);
  15813. },
  15814. _setScaleValue: function _setScaleValue(scale) {
  15815. if (!this.scale) {
  15816. return false;
  15817. }
  15818. scale = this._adjustScale(scale);
  15819. this._updateScale(scale, true);
  15820. this._updateOldScale(scale);
  15821. return scale;
  15822. },
  15823. __handleTouchStart: function __handleTouchStart() {
  15824. if (!this._isScaling) {
  15825. if (!this.disabled) {
  15826. Object(shared["b" /* disableScrollBounce */])({
  15827. disable: true
  15828. });
  15829. if (this._FA) {
  15830. this._FA.cancel();
  15831. }
  15832. if (this._SFA) {
  15833. this._SFA.cancel();
  15834. }
  15835. this.__touchInfo.historyX = [0, 0];
  15836. this.__touchInfo.historyY = [0, 0];
  15837. this.__touchInfo.historyT = [0, 0];
  15838. if (this.xMove) {
  15839. this.__baseX = this._translateX;
  15840. }
  15841. if (this.yMove) {
  15842. this.__baseY = this._translateY;
  15843. }
  15844. this.$el.style.willChange = 'transform';
  15845. this._checkCanMove = null;
  15846. this._firstMoveDirection = null;
  15847. this._isTouching = true;
  15848. }
  15849. }
  15850. },
  15851. __handleTouchMove: function __handleTouchMove(event) {
  15852. var self = this;
  15853. if (!this._isScaling && !this.disabled && this._isTouching) {
  15854. var x = this._translateX;
  15855. var y = this._translateY;
  15856. if (this._firstMoveDirection === null) {
  15857. this._firstMoveDirection = Math.abs(event.detail.dx / event.detail.dy) > 1 ? 'htouchmove' : 'vtouchmove';
  15858. }
  15859. if (this.xMove) {
  15860. x = event.detail.dx + this.__baseX;
  15861. this.__touchInfo.historyX.shift();
  15862. this.__touchInfo.historyX.push(x);
  15863. if (!this.yMove && this._checkCanMove === null) {
  15864. this._checkCanMove = Math.abs(event.detail.dx / event.detail.dy) < 1;
  15865. }
  15866. }
  15867. if (this.yMove) {
  15868. y = event.detail.dy + this.__baseY;
  15869. this.__touchInfo.historyY.shift();
  15870. this.__touchInfo.historyY.push(y);
  15871. if (!this.xMove && this._checkCanMove === null) {
  15872. this._checkCanMove = Math.abs(event.detail.dy / event.detail.dx) < 1;
  15873. }
  15874. }
  15875. this.__touchInfo.historyT.shift();
  15876. this.__touchInfo.historyT.push(event.detail.timeStamp);
  15877. if (!this._checkCanMove) {
  15878. event.preventDefault();
  15879. var source = 'touch';
  15880. if (x < this.minX) {
  15881. if (this.outOfBounds) {
  15882. source = 'touch-out-of-bounds';
  15883. x = this.minX - this._declineX.x(this.minX - x);
  15884. } else {
  15885. x = this.minX;
  15886. }
  15887. } else if (x > this.maxX) {
  15888. if (this.outOfBounds) {
  15889. source = 'touch-out-of-bounds';
  15890. x = this.maxX + this._declineX.x(x - this.maxX);
  15891. } else {
  15892. x = this.maxX;
  15893. }
  15894. }
  15895. if (y < this.minY) {
  15896. if (this.outOfBounds) {
  15897. source = 'touch-out-of-bounds';
  15898. y = this.minY - this._declineY.x(this.minY - y);
  15899. } else {
  15900. y = this.minY;
  15901. }
  15902. } else {
  15903. if (y > this.maxY) {
  15904. if (this.outOfBounds) {
  15905. source = 'touch-out-of-bounds';
  15906. y = this.maxY + this._declineY.x(y - this.maxY);
  15907. } else {
  15908. y = this.maxY;
  15909. }
  15910. }
  15911. }
  15912. _requestAnimationFrame(function () {
  15913. self._setTransform(x, y, self._scale, source);
  15914. });
  15915. }
  15916. }
  15917. },
  15918. __handleTouchEnd: function __handleTouchEnd() {
  15919. var self = this;
  15920. if (!this._isScaling && !this.disabled && this._isTouching) {
  15921. Object(shared["b" /* disableScrollBounce */])({
  15922. disable: false
  15923. });
  15924. this.$el.style.willChange = 'auto';
  15925. this._isTouching = false;
  15926. if (!this._checkCanMove && !this._revise('out-of-bounds') && this.inertia) {
  15927. var xv = 1000 * (this.__touchInfo.historyX[1] - this.__touchInfo.historyX[0]) / (this.__touchInfo.historyT[1] - this.__touchInfo.historyT[0]);
  15928. var yv = 1000 * (this.__touchInfo.historyY[1] - this.__touchInfo.historyY[0]) / (this.__touchInfo.historyT[1] - this.__touchInfo.historyT[0]);
  15929. this._friction.setV(xv, yv);
  15930. this._friction.setS(this._translateX, this._translateY);
  15931. var x0 = this._friction.delta().x;
  15932. var y0 = this._friction.delta().y;
  15933. var x = x0 + this._translateX;
  15934. var y = y0 + this._translateY;
  15935. if (x < this.minX) {
  15936. x = this.minX;
  15937. y = this._translateY + (this.minX - this._translateX) * y0 / x0;
  15938. } else {
  15939. if (x > this.maxX) {
  15940. x = this.maxX;
  15941. y = this._translateY + (this.maxX - this._translateX) * y0 / x0;
  15942. }
  15943. }
  15944. if (y < this.minY) {
  15945. y = this.minY;
  15946. x = this._translateX + (this.minY - this._translateY) * x0 / y0;
  15947. } else {
  15948. if (y > this.maxY) {
  15949. y = this.maxY;
  15950. x = this._translateX + (this.maxY - this._translateY) * x0 / y0;
  15951. }
  15952. }
  15953. this._friction.setEnd(x, y);
  15954. this._FA = g(this._friction, function () {
  15955. var t = self._friction.s();
  15956. var x = t.x;
  15957. var y = t.y;
  15958. self._setTransform(x, y, self._scale, 'friction');
  15959. }, function () {
  15960. self._FA.cancel();
  15961. });
  15962. }
  15963. }
  15964. },
  15965. _onTrack: function _onTrack(event) {
  15966. switch (event.detail.state) {
  15967. case 'start':
  15968. this.__handleTouchStart();
  15969. break;
  15970. case 'move':
  15971. this.__handleTouchMove(event);
  15972. break;
  15973. case 'end':
  15974. this.__handleTouchEnd();
  15975. }
  15976. },
  15977. _getLimitXY: function _getLimitXY(x, y) {
  15978. var outOfBounds = false;
  15979. if (x > this.maxX) {
  15980. x = this.maxX;
  15981. outOfBounds = true;
  15982. } else {
  15983. if (x < this.minX) {
  15984. x = this.minX;
  15985. outOfBounds = true;
  15986. }
  15987. }
  15988. if (y > this.maxY) {
  15989. y = this.maxY;
  15990. outOfBounds = true;
  15991. } else {
  15992. if (y < this.minY) {
  15993. y = this.minY;
  15994. outOfBounds = true;
  15995. }
  15996. }
  15997. return {
  15998. x: x,
  15999. y: y,
  16000. outOfBounds: outOfBounds
  16001. };
  16002. },
  16003. setParent: function setParent() {
  16004. if (!this.$parent._isMounted) {
  16005. return;
  16006. }
  16007. if (this._FA) {
  16008. this._FA.cancel();
  16009. }
  16010. if (this._SFA) {
  16011. this._SFA.cancel();
  16012. }
  16013. var scale = this.scale ? this.scaleValueSync : 1;
  16014. this._updateOffset();
  16015. this._updateWH(scale);
  16016. this._updateBoundary();
  16017. this._translateX = this.xSync + this._scaleOffset.x;
  16018. this._translateY = this.ySync + this._scaleOffset.y;
  16019. var limitXY = this._getLimitXY(this._translateX, this._translateY);
  16020. var x = limitXY.x;
  16021. var y = limitXY.y;
  16022. this._setTransform(x, y, scale, '', true);
  16023. this._updateOldScale(scale);
  16024. },
  16025. _updateOffset: function _updateOffset() {
  16026. this._offset.x = p(this.$el, this.$parent.$el);
  16027. this._offset.y = f(this.$el, this.$parent.$el);
  16028. },
  16029. _updateWH: function _updateWH(scale) {
  16030. scale = scale || this._scale;
  16031. scale = this._adjustScale(scale);
  16032. var rect = this.$el.getBoundingClientRect();
  16033. this.height = rect.height / this._scale;
  16034. this.width = rect.width / this._scale;
  16035. var height = this.height * scale;
  16036. var width = this.width * scale;
  16037. this._scaleOffset.x = (width - this.width) / 2;
  16038. this._scaleOffset.y = (height - this.height) / 2;
  16039. },
  16040. _updateBoundary: function _updateBoundary() {
  16041. var x = 0 - this._offset.x + this._scaleOffset.x;
  16042. var width = this.$parent.width - this.width - this._offset.x - this._scaleOffset.x;
  16043. this.minX = Math.min(x, width);
  16044. this.maxX = Math.max(x, width);
  16045. var y = 0 - this._offset.y + this._scaleOffset.y;
  16046. var height = this.$parent.height - this.height - this._offset.y - this._scaleOffset.y;
  16047. this.minY = Math.min(y, height);
  16048. this.maxY = Math.max(y, height);
  16049. },
  16050. _beginScale: function _beginScale() {
  16051. this._isScaling = true;
  16052. },
  16053. _endScale: function _endScale() {
  16054. this._isScaling = false;
  16055. this._updateOldScale(this._scale);
  16056. },
  16057. _setScale: function _setScale(scale) {
  16058. if (this.scale) {
  16059. scale = this._adjustScale(scale);
  16060. scale = this._oldScale * scale;
  16061. this._beginScale();
  16062. this._updateScale(scale);
  16063. }
  16064. },
  16065. _updateScale: function _updateScale(scale, animat) {
  16066. var self = this;
  16067. if (this.scale) {
  16068. scale = this._adjustScale(scale);
  16069. this._updateWH(scale);
  16070. this._updateBoundary();
  16071. var limitXY = this._getLimitXY(this._translateX, this._translateY);
  16072. var x = limitXY.x;
  16073. var y = limitXY.y;
  16074. if (animat) {
  16075. this._animationTo(x, y, scale, '', true, true);
  16076. } else {
  16077. _requestAnimationFrame(function () {
  16078. self._setTransform(x, y, scale, '', true, true);
  16079. });
  16080. }
  16081. }
  16082. },
  16083. _updateOldScale: function _updateOldScale(scale) {
  16084. this._oldScale = scale;
  16085. },
  16086. _adjustScale: function _adjustScale(scale) {
  16087. scale = Math.max(0.5, this.scaleMinNumber, scale);
  16088. scale = Math.min(10, this.scaleMaxNumber, scale);
  16089. return scale;
  16090. },
  16091. _animationTo: function _animationTo(x, y, scale, source, r, o) {
  16092. var self = this;
  16093. if (this._FA) {
  16094. this._FA.cancel();
  16095. }
  16096. if (this._SFA) {
  16097. this._SFA.cancel();
  16098. }
  16099. if (!this.xMove) {
  16100. x = this._translateX;
  16101. }
  16102. if (!this.yMove) {
  16103. y = this._translateY;
  16104. }
  16105. if (!this.scale) {
  16106. scale = this._scale;
  16107. }
  16108. var limitXY = this._getLimitXY(x, y);
  16109. x = limitXY.x;
  16110. y = limitXY.y;
  16111. if (!this.animation) {
  16112. this._setTransform(x, y, scale, source, r, o);
  16113. return;
  16114. }
  16115. this._STD._springX._solution = null;
  16116. this._STD._springY._solution = null;
  16117. this._STD._springScale._solution = null;
  16118. this._STD._springX._endPosition = this._translateX;
  16119. this._STD._springY._endPosition = this._translateY;
  16120. this._STD._springScale._endPosition = this._scale;
  16121. this._STD.setEnd(x, y, scale, 1);
  16122. this._SFA = g(this._STD, function () {
  16123. var data = self._STD.x();
  16124. var x = data.x;
  16125. var y = data.y;
  16126. var scale = data.scale;
  16127. self._setTransform(x, y, scale, source, r, o);
  16128. }, function () {
  16129. self._SFA.cancel();
  16130. });
  16131. },
  16132. _revise: function _revise(source) {
  16133. var limitXY = this._getLimitXY(this._translateX, this._translateY);
  16134. var x = limitXY.x;
  16135. var y = limitXY.y;
  16136. var outOfBounds = limitXY.outOfBounds;
  16137. if (outOfBounds) {
  16138. this._animationTo(x, y, this._scale, source);
  16139. }
  16140. return outOfBounds;
  16141. },
  16142. _setTransform: function _setTransform(x, y, scale) {
  16143. var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
  16144. var r = arguments.length > 4 ? arguments[4] : undefined;
  16145. var o = arguments.length > 5 ? arguments[5] : undefined;
  16146. if (!(x !== null && x.toString() !== 'NaN' && typeof x === 'number')) {
  16147. x = this._translateX || 0;
  16148. }
  16149. if (!(y !== null && y.toString() !== 'NaN' && typeof y === 'number')) {
  16150. y = this._translateY || 0;
  16151. }
  16152. x = Number(x.toFixed(1));
  16153. y = Number(y.toFixed(1));
  16154. scale = Number(scale.toFixed(1));
  16155. if (!(this._translateX === x && this._translateY === y)) {
  16156. if (!r) {
  16157. this.$trigger('change', {}, {
  16158. x: v(x, this._scaleOffset.x),
  16159. y: v(y, this._scaleOffset.y),
  16160. source: source
  16161. });
  16162. }
  16163. }
  16164. if (!this.scale) {
  16165. scale = this._scale;
  16166. }
  16167. scale = this._adjustScale(scale);
  16168. scale = +scale.toFixed(3);
  16169. if (o && scale !== this._scale) {
  16170. this.$trigger('scale', {}, {
  16171. x: x,
  16172. y: y,
  16173. scale: scale
  16174. });
  16175. }
  16176. var transform = 'translateX(' + x + 'px) translateY(' + y + 'px) translateZ(0px) scale(' + scale + ')';
  16177. this.$el.style.transform = transform;
  16178. this.$el.style.webkitTransform = transform;
  16179. this._translateX = x;
  16180. this._translateY = y;
  16181. this._scale = scale;
  16182. }
  16183. }
  16184. });
  16185. // CONCATENATED MODULE: ./src/core/view/components/movable-view/index.vue?vue&type=script&lang=js&
  16186. /* harmony default export */ var components_movable_viewvue_type_script_lang_js_ = (movable_viewvue_type_script_lang_js_);
  16187. // EXTERNAL MODULE: ./src/core/view/components/movable-view/index.vue?vue&type=style&index=0&lang=css&
  16188. var movable_viewvue_type_style_index_0_lang_css_ = __webpack_require__(100);
  16189. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  16190. var componentNormalizer = __webpack_require__(0);
  16191. // CONCATENATED MODULE: ./src/core/view/components/movable-view/index.vue
  16192. /* normalize component */
  16193. var component = Object(componentNormalizer["a" /* default */])(
  16194. components_movable_viewvue_type_script_lang_js_,
  16195. render,
  16196. staticRenderFns,
  16197. false,
  16198. null,
  16199. null,
  16200. null
  16201. )
  16202. /* hot reload */
  16203. if (false) { var api; }
  16204. component.options.__file = "src/core/view/components/movable-view/index.vue"
  16205. /* harmony default export */ var movable_view = __webpack_exports__["default"] = (component.exports);
  16206. /***/ }),
  16207. /* 127 */
  16208. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  16209. "use strict";
  16210. // ESM COMPAT FLAG
  16211. __webpack_require__.r(__webpack_exports__);
  16212. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/cover-image/index.vue?vue&type=template&id=221fdf58&
  16213. var render = function() {
  16214. var _vm = this
  16215. var _h = _vm.$createElement
  16216. var _c = _vm._self._c || _h
  16217. return _c(
  16218. "uni-cover-image",
  16219. _vm._g({ style: _vm.imageInfo, attrs: { src: _vm.src } }, _vm.$listeners),
  16220. [_c("div", { ref: "container", staticClass: "uni-cover-image" })]
  16221. )
  16222. }
  16223. var staticRenderFns = []
  16224. render._withStripped = true
  16225. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/cover-image/index.vue?vue&type=template&id=221fdf58&
  16226. // EXTERNAL MODULE: ./src/platforms/app-plus/view/mixins/native.js
  16227. var mixins_native = __webpack_require__(7);
  16228. // EXTERNAL MODULE: ./src/platforms/app-plus/view/mixins/cover.js
  16229. var cover = __webpack_require__(63);
  16230. // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
  16231. var shared = __webpack_require__(1);
  16232. // CONCATENATED MODULE: ./src/platforms/app-plus/service/api/constants.js
  16233. var DEVICE_FREQUENCY = 200;
  16234. var NETWORK_TYPES = ['unknown', 'none', 'ethernet', 'wifi', '2g', '3g', '4g'];
  16235. var MAP_ID = '__UNIAPP_MAP';
  16236. var TEMP_PATH_BASE = '_doc/uniapp_temp';
  16237. var TEMP_PATH = "".concat(TEMP_PATH_BASE, "_").concat(Date.now());
  16238. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/cover-image/index.vue?vue&type=script&lang=js&
  16239. //
  16240. //
  16241. //
  16242. //
  16243. //
  16244. //
  16245. //
  16246. //
  16247. //
  16248. //
  16249. //
  16250. //
  16251. /* harmony default export */ var cover_imagevue_type_script_lang_js_ = ({
  16252. name: 'CoverImage',
  16253. mixins: [mixins_native["a" /* default */], cover["a" /* default */]],
  16254. props: {
  16255. src: {
  16256. type: String,
  16257. default: ''
  16258. },
  16259. autoSize: {
  16260. type: [Boolean, String],
  16261. default: false
  16262. }
  16263. },
  16264. data: function data() {
  16265. return {
  16266. coverType: 'image',
  16267. coverContent: '',
  16268. imageInfo: {}
  16269. };
  16270. },
  16271. watch: {
  16272. src: function src() {
  16273. this.loadImage();
  16274. }
  16275. },
  16276. created: function created() {
  16277. this.loadImage();
  16278. },
  16279. beforeDestroy: function beforeDestroy() {
  16280. var downloaTask = this.downloaTask;
  16281. if (downloaTask && downloaTask.state < 4) {
  16282. downloaTask.abort();
  16283. }
  16284. },
  16285. methods: {
  16286. loadImage: function loadImage() {
  16287. var _this = this;
  16288. this.coverContent = '';
  16289. this.imageInfo = this.autoSize ? {
  16290. width: 0,
  16291. height: 0
  16292. } : {};
  16293. var realPath = this.src ? this.$getRealPath(this.src) : '';
  16294. if (realPath.indexOf('http://') === 0 || realPath.indexOf('https://') === 0) {
  16295. Object(shared["g" /* plusReady */])(function () {
  16296. _this.downloaTask = plus.downloader.createDownload(realPath, {
  16297. filename: TEMP_PATH + '/download/'
  16298. }, function (task, status) {
  16299. if (status === 200) {
  16300. _this.getImageInfo(task.filename);
  16301. } else {
  16302. _this.$trigger('error', {}, {
  16303. errMsg: 'error'
  16304. });
  16305. }
  16306. }).start();
  16307. });
  16308. } else if (realPath) {
  16309. this.getImageInfo(realPath);
  16310. }
  16311. },
  16312. getImageInfo: function getImageInfo(src) {
  16313. var _this2 = this;
  16314. this.coverContent = src;
  16315. Object(shared["g" /* plusReady */])(function () {
  16316. plus.io.getImageInfo({
  16317. src: src,
  16318. success: function success(_ref) {
  16319. var width = _ref.width,
  16320. height = _ref.height;
  16321. if (_this2.autoSize) {
  16322. _this2.imageInfo = {
  16323. width: "".concat(width, "px"),
  16324. height: "".concat(height, "px")
  16325. };
  16326. if (_this2._isMounted) {
  16327. _this2._requestPositionUpdate();
  16328. }
  16329. }
  16330. _this2.$trigger('load', {}, {
  16331. width: width,
  16332. height: height
  16333. });
  16334. },
  16335. fail: function fail() {
  16336. _this2.$trigger('error', {}, {
  16337. errMsg: 'error'
  16338. });
  16339. }
  16340. });
  16341. });
  16342. }
  16343. }
  16344. });
  16345. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/cover-image/index.vue?vue&type=script&lang=js&
  16346. /* harmony default export */ var components_cover_imagevue_type_script_lang_js_ = (cover_imagevue_type_script_lang_js_);
  16347. // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/cover-image/index.vue?vue&type=style&index=0&lang=css&
  16348. var cover_imagevue_type_style_index_0_lang_css_ = __webpack_require__(118);
  16349. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  16350. var componentNormalizer = __webpack_require__(0);
  16351. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/cover-image/index.vue
  16352. /* normalize component */
  16353. var component = Object(componentNormalizer["a" /* default */])(
  16354. components_cover_imagevue_type_script_lang_js_,
  16355. render,
  16356. staticRenderFns,
  16357. false,
  16358. null,
  16359. null,
  16360. null
  16361. )
  16362. /* hot reload */
  16363. if (false) { var api; }
  16364. component.options.__file = "src/platforms/app-plus/view/components/cover-image/index.vue"
  16365. /* harmony default export */ var cover_image = __webpack_exports__["default"] = (component.exports);
  16366. /***/ }),
  16367. /* 128 */
  16368. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  16369. "use strict";
  16370. // ESM COMPAT FLAG
  16371. __webpack_require__.r(__webpack_exports__);
  16372. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/checkbox-group/index.vue?vue&type=template&id=37cde58e&
  16373. var render = function() {
  16374. var _vm = this
  16375. var _h = _vm.$createElement
  16376. var _c = _vm._self._c || _h
  16377. return _c(
  16378. "uni-checkbox-group",
  16379. _vm._g({}, _vm.$listeners),
  16380. [_vm._t("default")],
  16381. 2
  16382. )
  16383. }
  16384. var staticRenderFns = []
  16385. render._withStripped = true
  16386. // CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=template&id=37cde58e&
  16387. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  16388. var mixins = __webpack_require__(2);
  16389. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/checkbox-group/index.vue?vue&type=script&lang=js&
  16390. //
  16391. //
  16392. //
  16393. //
  16394. //
  16395. //
  16396. /* harmony default export */ var checkbox_groupvue_type_script_lang_js_ = ({
  16397. name: 'CheckboxGroup',
  16398. mixins: [mixins["a" /* emitter */], mixins["d" /* listeners */]],
  16399. props: {
  16400. name: {
  16401. type: String,
  16402. default: ''
  16403. }
  16404. },
  16405. data: function data() {
  16406. return {
  16407. checkboxList: []
  16408. };
  16409. },
  16410. listeners: {
  16411. '@checkbox-change': '_changeHandler',
  16412. '@checkbox-group-update': '_checkboxGroupUpdateHandler'
  16413. },
  16414. created: function created() {
  16415. this.$dispatch('Form', 'uni-form-group-update', {
  16416. type: 'add',
  16417. vm: this
  16418. });
  16419. },
  16420. beforeDestroy: function beforeDestroy() {
  16421. this.$dispatch('Form', 'uni-form-group-update', {
  16422. type: 'remove',
  16423. vm: this
  16424. });
  16425. },
  16426. methods: {
  16427. _changeHandler: function _changeHandler($event) {
  16428. var value = [];
  16429. this.checkboxList.forEach(function (vm) {
  16430. if (vm.checkboxChecked) {
  16431. value.push(vm.value);
  16432. }
  16433. });
  16434. this.$trigger('change', $event, {
  16435. value: value
  16436. });
  16437. },
  16438. _checkboxGroupUpdateHandler: function _checkboxGroupUpdateHandler($event) {
  16439. if ($event.type === 'add') {
  16440. this.checkboxList.push($event.vm);
  16441. } else {
  16442. var index = this.checkboxList.indexOf($event.vm);
  16443. this.checkboxList.splice(index, 1);
  16444. }
  16445. },
  16446. _getFormData: function _getFormData() {
  16447. var data = {};
  16448. if (this.name !== '') {
  16449. var value = [];
  16450. this.checkboxList.forEach(function (vm) {
  16451. if (vm.checkboxChecked) {
  16452. value.push(vm.value);
  16453. }
  16454. });
  16455. data.value = value;
  16456. data.key = this.name;
  16457. }
  16458. return data;
  16459. }
  16460. }
  16461. });
  16462. // CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=script&lang=js&
  16463. /* harmony default export */ var components_checkbox_groupvue_type_script_lang_js_ = (checkbox_groupvue_type_script_lang_js_);
  16464. // EXTERNAL MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=style&index=0&lang=css&
  16465. var checkbox_groupvue_type_style_index_0_lang_css_ = __webpack_require__(92);
  16466. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  16467. var componentNormalizer = __webpack_require__(0);
  16468. // CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue
  16469. /* normalize component */
  16470. var component = Object(componentNormalizer["a" /* default */])(
  16471. components_checkbox_groupvue_type_script_lang_js_,
  16472. render,
  16473. staticRenderFns,
  16474. false,
  16475. null,
  16476. null,
  16477. null
  16478. )
  16479. /* hot reload */
  16480. if (false) { var api; }
  16481. component.options.__file = "src/core/view/components/checkbox-group/index.vue"
  16482. /* harmony default export */ var checkbox_group = __webpack_exports__["default"] = (component.exports);
  16483. /***/ }),
  16484. /* 129 */
  16485. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  16486. "use strict";
  16487. // ESM COMPAT FLAG
  16488. __webpack_require__.r(__webpack_exports__);
  16489. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/checkbox/index.vue?vue&type=template&id=a63c1348&
  16490. var render = function() {
  16491. var _vm = this
  16492. var _h = _vm.$createElement
  16493. var _c = _vm._self._c || _h
  16494. return _c(
  16495. "uni-checkbox",
  16496. _vm._g(
  16497. { attrs: { disabled: _vm.disabled }, on: { click: _vm._onClick } },
  16498. _vm.$listeners
  16499. ),
  16500. [
  16501. _c(
  16502. "div",
  16503. { staticClass: "uni-checkbox-wrapper" },
  16504. [
  16505. _c("div", {
  16506. staticClass: "uni-checkbox-input",
  16507. class: [_vm.checkboxChecked ? "uni-checkbox-input-checked" : ""],
  16508. style: { color: _vm.color }
  16509. }),
  16510. _vm._t("default")
  16511. ],
  16512. 2
  16513. )
  16514. ]
  16515. )
  16516. }
  16517. var staticRenderFns = []
  16518. render._withStripped = true
  16519. // CONCATENATED MODULE: ./src/core/view/components/checkbox/index.vue?vue&type=template&id=a63c1348&
  16520. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  16521. var mixins = __webpack_require__(2);
  16522. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/checkbox/index.vue?vue&type=script&lang=js&
  16523. //
  16524. //
  16525. //
  16526. //
  16527. //
  16528. //
  16529. //
  16530. //
  16531. //
  16532. //
  16533. //
  16534. //
  16535. //
  16536. //
  16537. //
  16538. //
  16539. /* harmony default export */ var checkboxvue_type_script_lang_js_ = ({
  16540. name: 'Checkbox',
  16541. mixins: [mixins["a" /* emitter */], mixins["d" /* listeners */]],
  16542. props: {
  16543. checked: {
  16544. type: [Boolean, String],
  16545. default: false
  16546. },
  16547. id: {
  16548. type: String,
  16549. default: ''
  16550. },
  16551. disabled: {
  16552. type: [Boolean, String],
  16553. default: false
  16554. },
  16555. color: {
  16556. type: String,
  16557. default: '#007aff'
  16558. },
  16559. value: {
  16560. type: String,
  16561. default: ''
  16562. }
  16563. },
  16564. data: function data() {
  16565. return {
  16566. checkboxChecked: this.checked,
  16567. checkboxValue: this.value
  16568. };
  16569. },
  16570. watch: {
  16571. checked: function checked(val) {
  16572. this.checkboxChecked = val;
  16573. },
  16574. value: function value(val) {
  16575. this.checkboxValue = val;
  16576. }
  16577. },
  16578. listeners: {
  16579. 'label-click': '_onClick',
  16580. '@label-click': '_onClick'
  16581. },
  16582. created: function created() {
  16583. this.$dispatch('CheckboxGroup', 'uni-checkbox-group-update', {
  16584. type: 'add',
  16585. vm: this
  16586. });
  16587. this.$dispatch('Form', 'uni-form-group-update', {
  16588. type: 'add',
  16589. vm: this
  16590. });
  16591. },
  16592. beforeDestroy: function beforeDestroy() {
  16593. this.$dispatch('CheckboxGroup', 'uni-checkbox-group-update', {
  16594. type: 'remove',
  16595. vm: this
  16596. });
  16597. this.$dispatch('Form', 'uni-form-group-update', {
  16598. type: 'remove',
  16599. vm: this
  16600. });
  16601. },
  16602. methods: {
  16603. _onClick: function _onClick($event) {
  16604. if (this.disabled) {
  16605. return;
  16606. }
  16607. this.checkboxChecked = !this.checkboxChecked;
  16608. this.$dispatch('CheckboxGroup', 'uni-checkbox-change', $event);
  16609. },
  16610. _resetFormData: function _resetFormData() {
  16611. this.checkboxChecked = false;
  16612. }
  16613. }
  16614. });
  16615. // CONCATENATED MODULE: ./src/core/view/components/checkbox/index.vue?vue&type=script&lang=js&
  16616. /* harmony default export */ var components_checkboxvue_type_script_lang_js_ = (checkboxvue_type_script_lang_js_);
  16617. // EXTERNAL MODULE: ./src/core/view/components/checkbox/index.vue?vue&type=style&index=0&lang=css&
  16618. var checkboxvue_type_style_index_0_lang_css_ = __webpack_require__(93);
  16619. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  16620. var componentNormalizer = __webpack_require__(0);
  16621. // CONCATENATED MODULE: ./src/core/view/components/checkbox/index.vue
  16622. /* normalize component */
  16623. var component = Object(componentNormalizer["a" /* default */])(
  16624. components_checkboxvue_type_script_lang_js_,
  16625. render,
  16626. staticRenderFns,
  16627. false,
  16628. null,
  16629. null,
  16630. null
  16631. )
  16632. /* hot reload */
  16633. if (false) { var api; }
  16634. component.options.__file = "src/core/view/components/checkbox/index.vue"
  16635. /* harmony default export */ var components_checkbox = __webpack_exports__["default"] = (component.exports);
  16636. /***/ }),
  16637. /* 130 */
  16638. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  16639. "use strict";
  16640. // ESM COMPAT FLAG
  16641. __webpack_require__.r(__webpack_exports__);
  16642. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/form/index.vue?vue&type=template&id=7735a91d&
  16643. var render = function() {
  16644. var _vm = this
  16645. var _h = _vm.$createElement
  16646. var _c = _vm._self._c || _h
  16647. return _c("uni-form", _vm._g({}, _vm.$listeners), [
  16648. _c("span", [_vm._t("default")], 2)
  16649. ])
  16650. }
  16651. var staticRenderFns = []
  16652. render._withStripped = true
  16653. // CONCATENATED MODULE: ./src/core/view/components/form/index.vue?vue&type=template&id=7735a91d&
  16654. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  16655. var mixins = __webpack_require__(2);
  16656. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/form/index.vue?vue&type=script&lang=js&
  16657. //
  16658. //
  16659. //
  16660. //
  16661. //
  16662. //
  16663. //
  16664. /* harmony default export */ var formvue_type_script_lang_js_ = ({
  16665. name: 'Form',
  16666. mixins: [mixins["d" /* listeners */]],
  16667. data: function data() {
  16668. return {
  16669. childrenList: []
  16670. };
  16671. },
  16672. listeners: {
  16673. '@form-submit': '_onSubmit',
  16674. '@form-reset': '_onReset',
  16675. '@form-group-update': '_formGroupUpdateHandler'
  16676. },
  16677. methods: {
  16678. _onSubmit: function _onSubmit($event) {
  16679. var data = {};
  16680. this.childrenList.forEach(function (vm) {
  16681. if (vm._getFormData && vm._getFormData().key) {
  16682. data[vm._getFormData().key] = vm._getFormData().value;
  16683. }
  16684. });
  16685. this.$trigger('submit', $event, {
  16686. value: data
  16687. });
  16688. },
  16689. _onReset: function _onReset($event) {
  16690. this.$trigger('reset', $event, {});
  16691. this.childrenList.forEach(function (vm) {
  16692. vm._resetFormData && vm._resetFormData();
  16693. });
  16694. },
  16695. _formGroupUpdateHandler: function _formGroupUpdateHandler($event) {
  16696. if ($event.type === 'add') {
  16697. this.childrenList.push($event.vm);
  16698. } else {
  16699. var index = this.childrenList.indexOf($event.vm);
  16700. this.childrenList.splice(index, 1);
  16701. }
  16702. }
  16703. }
  16704. });
  16705. // CONCATENATED MODULE: ./src/core/view/components/form/index.vue?vue&type=script&lang=js&
  16706. /* harmony default export */ var components_formvue_type_script_lang_js_ = (formvue_type_script_lang_js_);
  16707. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  16708. var componentNormalizer = __webpack_require__(0);
  16709. // CONCATENATED MODULE: ./src/core/view/components/form/index.vue
  16710. /* normalize component */
  16711. var component = Object(componentNormalizer["a" /* default */])(
  16712. components_formvue_type_script_lang_js_,
  16713. render,
  16714. staticRenderFns,
  16715. false,
  16716. null,
  16717. null,
  16718. null
  16719. )
  16720. /* hot reload */
  16721. if (false) { var api; }
  16722. component.options.__file = "src/core/view/components/form/index.vue"
  16723. /* harmony default export */ var components_form = __webpack_exports__["default"] = (component.exports);
  16724. /***/ }),
  16725. /* 131 */
  16726. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  16727. "use strict";
  16728. // ESM COMPAT FLAG
  16729. __webpack_require__.r(__webpack_exports__);
  16730. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/icon/index.vue?vue&type=template&id=6c7a7a92&
  16731. var render = function() {
  16732. var _vm = this
  16733. var _h = _vm.$createElement
  16734. var _c = _vm._self._c || _h
  16735. return _c("uni-icon", _vm._g({}, _vm.$listeners), [
  16736. _c("i", {
  16737. class: "uni-icon-" + _vm.type,
  16738. style: { "font-size": _vm._converPx(_vm.size), color: _vm.color },
  16739. attrs: { role: "img" }
  16740. })
  16741. ])
  16742. }
  16743. var staticRenderFns = []
  16744. render._withStripped = true
  16745. // CONCATENATED MODULE: ./src/core/view/components/icon/index.vue?vue&type=template&id=6c7a7a92&
  16746. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/icon/index.vue?vue&type=script&lang=js&
  16747. //
  16748. //
  16749. //
  16750. //
  16751. //
  16752. //
  16753. //
  16754. //
  16755. //
  16756. //
  16757. /* harmony default export */ var iconvue_type_script_lang_js_ = ({
  16758. name: 'Icon',
  16759. props: {
  16760. type: {
  16761. type: String,
  16762. required: true,
  16763. default: ''
  16764. },
  16765. size: {
  16766. type: [String, Number],
  16767. default: 23
  16768. },
  16769. color: {
  16770. type: String,
  16771. default: ''
  16772. }
  16773. },
  16774. methods: {
  16775. _converPx: function _converPx(value) {
  16776. if (/\d+[ur]px$/i.test(value)) {
  16777. value.replace(/\d+[ur]px$/i, function (text) {
  16778. return "".concat(uni.upx2px(parseFloat(text)), "px");
  16779. }); // eslint-disable-next-line no-useless-escape
  16780. } else if (/^-?[\d\.]+$/.test(value)) {
  16781. return "".concat(value, "px");
  16782. }
  16783. return value || '';
  16784. }
  16785. }
  16786. });
  16787. // CONCATENATED MODULE: ./src/core/view/components/icon/index.vue?vue&type=script&lang=js&
  16788. /* harmony default export */ var components_iconvue_type_script_lang_js_ = (iconvue_type_script_lang_js_);
  16789. // EXTERNAL MODULE: ./src/core/view/components/icon/index.vue?vue&type=style&index=0&lang=css&
  16790. var iconvue_type_style_index_0_lang_css_ = __webpack_require__(95);
  16791. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  16792. var componentNormalizer = __webpack_require__(0);
  16793. // CONCATENATED MODULE: ./src/core/view/components/icon/index.vue
  16794. /* normalize component */
  16795. var component = Object(componentNormalizer["a" /* default */])(
  16796. components_iconvue_type_script_lang_js_,
  16797. render,
  16798. staticRenderFns,
  16799. false,
  16800. null,
  16801. null,
  16802. null
  16803. )
  16804. /* hot reload */
  16805. if (false) { var api; }
  16806. component.options.__file = "src/core/view/components/icon/index.vue"
  16807. /* harmony default export */ var icon = __webpack_exports__["default"] = (component.exports);
  16808. /***/ }),
  16809. /* 132 */
  16810. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  16811. "use strict";
  16812. // ESM COMPAT FLAG
  16813. __webpack_require__.r(__webpack_exports__);
  16814. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/image/index.vue?vue&type=template&id=c7af6f90&
  16815. var render = function() {
  16816. var _vm = this
  16817. var _h = _vm.$createElement
  16818. var _c = _vm._self._c || _h
  16819. return _c(
  16820. "uni-image",
  16821. _vm._g({}, _vm.$listeners),
  16822. [
  16823. _c("div", { ref: "content", style: _vm.modeStyle }),
  16824. _c("img", { attrs: { src: _vm.realImagePath } }),
  16825. _vm.mode === "widthFix"
  16826. ? _c("v-uni-resize-sensor", {
  16827. ref: "sensor",
  16828. on: { resize: _vm._resize }
  16829. })
  16830. : _vm._e()
  16831. ],
  16832. 1
  16833. )
  16834. }
  16835. var staticRenderFns = []
  16836. render._withStripped = true
  16837. // CONCATENATED MODULE: ./src/core/view/components/image/index.vue?vue&type=template&id=c7af6f90&
  16838. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/image/index.vue?vue&type=script&lang=js&
  16839. function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  16840. //
  16841. //
  16842. //
  16843. //
  16844. //
  16845. //
  16846. //
  16847. //
  16848. //
  16849. //
  16850. //
  16851. //
  16852. //
  16853. //
  16854. /* harmony default export */ var imagevue_type_script_lang_js_ = ({
  16855. name: 'Image',
  16856. props: {
  16857. src: {
  16858. type: String,
  16859. default: ''
  16860. },
  16861. mode: {
  16862. type: String,
  16863. default: 'scaleToFill'
  16864. },
  16865. // TODO 懒加载
  16866. lazyLoad: {
  16867. type: [Boolean, String],
  16868. default: false
  16869. }
  16870. },
  16871. data: function data() {
  16872. return {
  16873. originalWidth: 0,
  16874. originalHeight: 0,
  16875. availHeight: '',
  16876. sizeFixed: false
  16877. };
  16878. },
  16879. computed: {
  16880. ratio: function ratio() {
  16881. return this.originalWidth && this.originalHeight ? this.originalWidth / this.originalHeight : 0;
  16882. },
  16883. realImagePath: function realImagePath() {
  16884. return this.src && this.$getRealPath(this.src);
  16885. },
  16886. modeStyle: function modeStyle() {
  16887. var size = 'auto';
  16888. var position = '';
  16889. var repeat = 'no-repeat';
  16890. switch (this.mode) {
  16891. case 'aspectFit':
  16892. size = 'contain';
  16893. position = 'center center';
  16894. break;
  16895. case 'aspectFill':
  16896. size = 'cover';
  16897. position = 'center center';
  16898. break;
  16899. case 'widthFix':
  16900. size = '100% 100%';
  16901. break;
  16902. case 'top':
  16903. position = 'center top';
  16904. break;
  16905. case 'bottom':
  16906. position = 'center bottom';
  16907. break;
  16908. case 'center':
  16909. position = 'center center';
  16910. break;
  16911. case 'left':
  16912. position = 'left center';
  16913. break;
  16914. case 'right':
  16915. position = 'right center';
  16916. break;
  16917. case 'top left':
  16918. position = 'left top';
  16919. break;
  16920. case 'top right':
  16921. position = 'right top';
  16922. break;
  16923. case 'bottom left':
  16924. position = 'left bottom';
  16925. break;
  16926. case 'bottom right':
  16927. position = 'right bottom';
  16928. break;
  16929. default:
  16930. size = '100% 100%';
  16931. position = '0% 0%';
  16932. break;
  16933. }
  16934. return "background-position:".concat(position, ";background-size:").concat(size, ";background-repeat:").concat(repeat, ";");
  16935. }
  16936. },
  16937. watch: {
  16938. src: function src(newValue, oldValue) {
  16939. this._setContentImage();
  16940. this._loadImage();
  16941. },
  16942. mode: function mode(newValue, oldValue) {
  16943. if (oldValue === 'widthFix') {
  16944. this.$el.style.height = this.availHeight;
  16945. this.sizeFixed = false;
  16946. }
  16947. if (newValue === 'widthFix' && this.ratio) {
  16948. this._fixSize();
  16949. }
  16950. }
  16951. },
  16952. mounted: function mounted() {
  16953. this.availHeight = this.$el.style.height || '';
  16954. this._setContentImage();
  16955. if (!this.realImagePath) {
  16956. return;
  16957. }
  16958. this._loadImage();
  16959. },
  16960. methods: {
  16961. _resize: function _resize() {
  16962. if (this.mode === 'widthFix' && !this.sizeFixed) {
  16963. this._fixSize();
  16964. }
  16965. },
  16966. _fixSize: function _fixSize() {
  16967. var elWidth = this._getWidth();
  16968. if (elWidth) {
  16969. var height = elWidth / this.ratio; // fix: 解决 Chrome 浏览器上某些情况下导致 1px 缝隙的问题
  16970. if ((typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) && navigator.vendor === 'Google Inc.' && height > 10) {
  16971. height = Math.round(height / 2) * 2;
  16972. }
  16973. this.$el.style.height = height + 'px';
  16974. this.sizeFixed = true;
  16975. }
  16976. },
  16977. _setContentImage: function _setContentImage() {
  16978. this.$refs.content.style.backgroundImage = this.src ? "url(\"".concat(this.realImagePath, "\")") : 'none';
  16979. },
  16980. _loadImage: function _loadImage() {
  16981. var _self = this;
  16982. var img = new Image();
  16983. img.onload = function ($event) {
  16984. _self.originalWidth = this.width;
  16985. _self.originalHeight = this.height;
  16986. if (_self.mode === 'widthFix') {
  16987. _self._fixSize();
  16988. }
  16989. _self.$trigger('load', $event, {
  16990. width: this.width,
  16991. height: this.height
  16992. });
  16993. };
  16994. img.onerror = function ($event) {
  16995. _self.$trigger('error', $event, {
  16996. errMsg: "GET ".concat(_self.src, " 404 (Not Found)")
  16997. });
  16998. };
  16999. img.src = this.realImagePath;
  17000. },
  17001. _getWidth: function _getWidth() {
  17002. var computedStyle = window.getComputedStyle(this.$el);
  17003. var borderWidth = (parseFloat(computedStyle.borderLeftWidth, 10) || 0) + (parseFloat(computedStyle.borderRightWidth, 10) || 0);
  17004. var paddingWidth = (parseFloat(computedStyle.paddingLeft, 10) || 0) + (parseFloat(computedStyle.paddingRight, 10) || 0);
  17005. return this.$el.offsetWidth - borderWidth - paddingWidth;
  17006. }
  17007. }
  17008. });
  17009. // CONCATENATED MODULE: ./src/core/view/components/image/index.vue?vue&type=script&lang=js&
  17010. /* harmony default export */ var components_imagevue_type_script_lang_js_ = (imagevue_type_script_lang_js_);
  17011. // EXTERNAL MODULE: ./src/core/view/components/image/index.vue?vue&type=style&index=0&lang=css&
  17012. var imagevue_type_style_index_0_lang_css_ = __webpack_require__(96);
  17013. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  17014. var componentNormalizer = __webpack_require__(0);
  17015. // CONCATENATED MODULE: ./src/core/view/components/image/index.vue
  17016. /* normalize component */
  17017. var component = Object(componentNormalizer["a" /* default */])(
  17018. components_imagevue_type_script_lang_js_,
  17019. render,
  17020. staticRenderFns,
  17021. false,
  17022. null,
  17023. null,
  17024. null
  17025. )
  17026. /* hot reload */
  17027. if (false) { var api; }
  17028. component.options.__file = "src/core/view/components/image/index.vue"
  17029. /* harmony default export */ var components_image = __webpack_exports__["default"] = (component.exports);
  17030. /***/ }),
  17031. /* 133 */
  17032. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  17033. "use strict";
  17034. // ESM COMPAT FLAG
  17035. __webpack_require__.r(__webpack_exports__);
  17036. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/input/index.vue?vue&type=template&id=c65e1032&
  17037. var render = function() {
  17038. var _vm = this
  17039. var _h = _vm.$createElement
  17040. var _c = _vm._self._c || _h
  17041. return _c(
  17042. "uni-input",
  17043. _vm._g(
  17044. {
  17045. on: {
  17046. change: function($event) {
  17047. $event.stopPropagation()
  17048. }
  17049. }
  17050. },
  17051. _vm.$listeners
  17052. ),
  17053. [
  17054. _c("div", { ref: "wrapper", staticClass: "uni-input-wrapper" }, [
  17055. _c(
  17056. "div",
  17057. {
  17058. directives: [
  17059. {
  17060. name: "show",
  17061. rawName: "v-show",
  17062. value: !(_vm.composing || _vm.inputValue.length),
  17063. expression: "!(composing || inputValue.length)"
  17064. }
  17065. ],
  17066. ref: "placeholder",
  17067. staticClass: "uni-input-placeholder",
  17068. class: _vm.placeholderClass,
  17069. style: _vm.placeholderStyle
  17070. },
  17071. [_vm._v(" " + _vm._s(_vm.placeholder) + " ")]
  17072. ),
  17073. _vm.inputType === "checkbox"
  17074. ? _c("input", {
  17075. directives: [
  17076. {
  17077. name: "model",
  17078. rawName: "v-model",
  17079. value: _vm.inputValue,
  17080. expression: "inputValue"
  17081. }
  17082. ],
  17083. ref: "input",
  17084. staticClass: "uni-input-input",
  17085. attrs: {
  17086. disabled: _vm.disabled,
  17087. maxlength: _vm.maxlength,
  17088. step: _vm.step,
  17089. autocomplete: "off",
  17090. type: "checkbox"
  17091. },
  17092. domProps: {
  17093. checked: Array.isArray(_vm.inputValue)
  17094. ? _vm._i(_vm.inputValue, null) > -1
  17095. : _vm.inputValue
  17096. },
  17097. on: {
  17098. focus: _vm._onFocus,
  17099. blur: _vm._onBlur,
  17100. input: function($event) {
  17101. $event.stopPropagation()
  17102. return _vm._onInput($event)
  17103. },
  17104. compositionstart: _vm._onComposition,
  17105. compositionend: _vm._onComposition,
  17106. keyup: function($event) {
  17107. $event.stopPropagation()
  17108. return _vm._onKeyup($event)
  17109. },
  17110. change: function($event) {
  17111. var $$a = _vm.inputValue,
  17112. $$el = $event.target,
  17113. $$c = $$el.checked ? true : false
  17114. if (Array.isArray($$a)) {
  17115. var $$v = null,
  17116. $$i = _vm._i($$a, $$v)
  17117. if ($$el.checked) {
  17118. $$i < 0 && (_vm.inputValue = $$a.concat([$$v]))
  17119. } else {
  17120. $$i > -1 &&
  17121. (_vm.inputValue = $$a
  17122. .slice(0, $$i)
  17123. .concat($$a.slice($$i + 1)))
  17124. }
  17125. } else {
  17126. _vm.inputValue = $$c
  17127. }
  17128. }
  17129. }
  17130. })
  17131. : _vm.inputType === "radio"
  17132. ? _c("input", {
  17133. directives: [
  17134. {
  17135. name: "model",
  17136. rawName: "v-model",
  17137. value: _vm.inputValue,
  17138. expression: "inputValue"
  17139. }
  17140. ],
  17141. ref: "input",
  17142. staticClass: "uni-input-input",
  17143. attrs: {
  17144. disabled: _vm.disabled,
  17145. maxlength: _vm.maxlength,
  17146. step: _vm.step,
  17147. autocomplete: "off",
  17148. type: "radio"
  17149. },
  17150. domProps: { checked: _vm._q(_vm.inputValue, null) },
  17151. on: {
  17152. focus: _vm._onFocus,
  17153. blur: _vm._onBlur,
  17154. input: function($event) {
  17155. $event.stopPropagation()
  17156. return _vm._onInput($event)
  17157. },
  17158. compositionstart: _vm._onComposition,
  17159. compositionend: _vm._onComposition,
  17160. keyup: function($event) {
  17161. $event.stopPropagation()
  17162. return _vm._onKeyup($event)
  17163. },
  17164. change: function($event) {
  17165. _vm.inputValue = null
  17166. }
  17167. }
  17168. })
  17169. : _c("input", {
  17170. directives: [
  17171. {
  17172. name: "model",
  17173. rawName: "v-model",
  17174. value: _vm.inputValue,
  17175. expression: "inputValue"
  17176. }
  17177. ],
  17178. ref: "input",
  17179. staticClass: "uni-input-input",
  17180. attrs: {
  17181. disabled: _vm.disabled,
  17182. maxlength: _vm.maxlength,
  17183. step: _vm.step,
  17184. autocomplete: "off",
  17185. type: _vm.inputType
  17186. },
  17187. domProps: { value: _vm.inputValue },
  17188. on: {
  17189. focus: _vm._onFocus,
  17190. blur: _vm._onBlur,
  17191. input: [
  17192. function($event) {
  17193. if ($event.target.composing) {
  17194. return
  17195. }
  17196. _vm.inputValue = $event.target.value
  17197. },
  17198. function($event) {
  17199. $event.stopPropagation()
  17200. return _vm._onInput($event)
  17201. }
  17202. ],
  17203. compositionstart: _vm._onComposition,
  17204. compositionend: _vm._onComposition,
  17205. keyup: function($event) {
  17206. $event.stopPropagation()
  17207. return _vm._onKeyup($event)
  17208. }
  17209. }
  17210. })
  17211. ])
  17212. ]
  17213. )
  17214. }
  17215. var staticRenderFns = []
  17216. render._withStripped = true
  17217. // CONCATENATED MODULE: ./src/core/view/components/input/index.vue?vue&type=template&id=c65e1032&
  17218. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  17219. var mixins = __webpack_require__(2);
  17220. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/input/index.vue?vue&type=script&lang=js&
  17221. //
  17222. //
  17223. //
  17224. //
  17225. //
  17226. //
  17227. //
  17228. //
  17229. //
  17230. //
  17231. //
  17232. //
  17233. //
  17234. //
  17235. //
  17236. //
  17237. //
  17238. //
  17239. //
  17240. //
  17241. //
  17242. //
  17243. //
  17244. //
  17245. //
  17246. //
  17247. //
  17248. //
  17249. //
  17250. //
  17251. //
  17252. //
  17253. //
  17254. //
  17255. //
  17256. //
  17257. //
  17258. var INPUT_TYPES = ['text', 'number', 'idcard', 'digit', 'password'];
  17259. var NUMBER_TYPES = ['number', 'digit'];
  17260. /* harmony default export */ var inputvue_type_script_lang_js_ = ({
  17261. name: 'Input',
  17262. mixins: [mixins["a" /* emitter */], mixins["c" /* keyboard */]],
  17263. model: {
  17264. prop: 'value',
  17265. event: 'update:value'
  17266. },
  17267. props: {
  17268. name: {
  17269. type: String,
  17270. default: ''
  17271. },
  17272. value: {
  17273. type: [String, Number],
  17274. default: ''
  17275. },
  17276. type: {
  17277. type: String,
  17278. default: 'text'
  17279. },
  17280. password: {
  17281. type: [Boolean, String],
  17282. default: false
  17283. },
  17284. placeholder: {
  17285. type: String,
  17286. default: ''
  17287. },
  17288. placeholderStyle: {
  17289. type: String,
  17290. default: ''
  17291. },
  17292. placeholderClass: {
  17293. type: String,
  17294. default: 'input-placeholder'
  17295. },
  17296. disabled: {
  17297. type: [Boolean, String],
  17298. default: false
  17299. },
  17300. maxlength: {
  17301. type: [Number, String],
  17302. default: 140
  17303. },
  17304. focus: {
  17305. type: [Boolean, String],
  17306. default: false
  17307. },
  17308. confirmType: {
  17309. type: String,
  17310. default: 'done'
  17311. }
  17312. },
  17313. data: function data() {
  17314. return {
  17315. inputValue: this.value + '',
  17316. composing: false,
  17317. wrapperHeight: 0,
  17318. cachedValue: ''
  17319. };
  17320. },
  17321. computed: {
  17322. inputType: function inputType() {
  17323. var type = '';
  17324. switch (this.type) {
  17325. case 'text':
  17326. this.confirmType === 'search' && (type = 'search');
  17327. break;
  17328. case 'idcard':
  17329. // TODO 可能要根据不同平台进行区分处理
  17330. type = 'text';
  17331. break;
  17332. case 'digit':
  17333. type = 'number';
  17334. break;
  17335. default:
  17336. type = ~INPUT_TYPES.indexOf(this.type) ? this.type : 'text';
  17337. break;
  17338. }
  17339. return this.password ? 'password' : type;
  17340. },
  17341. step: function step() {
  17342. // 处理部分设备中无法输入小数点的问题
  17343. return ~NUMBER_TYPES.indexOf(this.type) ? '0.000000000000000001' : '';
  17344. }
  17345. },
  17346. watch: {
  17347. focus: function focus(value) {
  17348. value && this._focusInput();
  17349. },
  17350. value: function value(_value) {
  17351. this.inputValue = _value + '';
  17352. },
  17353. inputValue: function inputValue(value) {
  17354. this.$emit('update:value', value);
  17355. },
  17356. maxlength: function maxlength(value) {
  17357. var realValue = this.inputValue.slice(0, parseInt(value, 10));
  17358. realValue !== this.inputValue && (this.inputValue = realValue);
  17359. }
  17360. },
  17361. created: function created() {
  17362. this.$dispatch('Form', 'uni-form-group-update', {
  17363. type: 'add',
  17364. vm: this
  17365. });
  17366. },
  17367. mounted: function mounted() {
  17368. if (this.confirmType === 'search') {
  17369. var formElem = document.createElement('form');
  17370. formElem.action = '';
  17371. formElem.onsubmit = function () {
  17372. return false;
  17373. };
  17374. formElem.className = 'uni-input-form';
  17375. formElem.appendChild(this.$refs.input);
  17376. this.$refs.wrapper.appendChild(formElem);
  17377. }
  17378. var $vm = this;
  17379. while ($vm) {
  17380. var scopeId = $vm.$options._scopeId;
  17381. if (scopeId) {
  17382. this.$refs.placeholder.setAttribute(scopeId, '');
  17383. }
  17384. $vm = $vm.$parent;
  17385. }
  17386. this.initKeyboard(this.$refs.input);
  17387. this.focus && this._focusInput();
  17388. },
  17389. beforeDestroy: function beforeDestroy() {
  17390. this.$dispatch('Form', 'uni-form-group-update', {
  17391. type: 'remove',
  17392. vm: this
  17393. });
  17394. },
  17395. methods: {
  17396. _onKeyup: function _onKeyup($event) {
  17397. if ($event.keyCode === 13) {
  17398. this.$trigger('confirm', $event, {
  17399. value: $event.target.value
  17400. });
  17401. }
  17402. },
  17403. _onInput: function _onInput($event) {
  17404. if (this.composing) {
  17405. return;
  17406. } // 处理部分输入法可以输入其它字符的情况
  17407. if (~NUMBER_TYPES.indexOf(this.type)) {
  17408. if (this.$refs.input.validity && !this.$refs.input.validity.valid) {
  17409. $event.target.value = this.cachedValue;
  17410. this.inputValue = $event.target.value; // 输入非法字符不触发 input 事件
  17411. return;
  17412. } else {
  17413. this.cachedValue = this.inputValue;
  17414. }
  17415. } // type="number" 不支持 maxlength 属性,因此需要主动限制长度。
  17416. if (this.inputType === 'number') {
  17417. var maxlength = parseInt(this.maxlength, 10);
  17418. if (maxlength > 0 && $event.target.value.length > maxlength) {
  17419. $event.target.value = $event.target.value.slice(0, maxlength);
  17420. this.inputValue = $event.target.value; // 字符长度超出范围不触发 input 事件
  17421. return;
  17422. }
  17423. }
  17424. this.$trigger('input', $event, {
  17425. value: this.inputValue
  17426. });
  17427. },
  17428. _onFocus: function _onFocus($event) {
  17429. this.$trigger('focus', $event, {
  17430. value: $event.target.value
  17431. });
  17432. },
  17433. _onBlur: function _onBlur($event) {
  17434. this.$trigger('blur', $event, {
  17435. value: $event.target.value
  17436. });
  17437. },
  17438. _focusInput: function _focusInput() {
  17439. var _this = this;
  17440. setTimeout(function () {
  17441. _this.$refs.input.focus();
  17442. }, 350);
  17443. },
  17444. _blurInput: function _blurInput() {
  17445. var _this2 = this;
  17446. setTimeout(function () {
  17447. _this2.$refs.input.blur();
  17448. }, 350);
  17449. },
  17450. _onComposition: function _onComposition($event) {
  17451. if ($event.type === 'compositionstart') {
  17452. this.composing = true;
  17453. } else {
  17454. this.composing = false;
  17455. }
  17456. },
  17457. _resetFormData: function _resetFormData() {
  17458. this.inputValue = '';
  17459. },
  17460. _getFormData: function _getFormData() {
  17461. return this.name ? {
  17462. value: this.inputValue,
  17463. key: this.name
  17464. } : {};
  17465. }
  17466. }
  17467. });
  17468. // CONCATENATED MODULE: ./src/core/view/components/input/index.vue?vue&type=script&lang=js&
  17469. /* harmony default export */ var components_inputvue_type_script_lang_js_ = (inputvue_type_script_lang_js_);
  17470. // EXTERNAL MODULE: ./src/core/view/components/input/index.vue?vue&type=style&index=0&lang=css&
  17471. var inputvue_type_style_index_0_lang_css_ = __webpack_require__(97);
  17472. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  17473. var componentNormalizer = __webpack_require__(0);
  17474. // CONCATENATED MODULE: ./src/core/view/components/input/index.vue
  17475. /* normalize component */
  17476. var component = Object(componentNormalizer["a" /* default */])(
  17477. components_inputvue_type_script_lang_js_,
  17478. render,
  17479. staticRenderFns,
  17480. false,
  17481. null,
  17482. null,
  17483. null
  17484. )
  17485. /* hot reload */
  17486. if (false) { var api; }
  17487. component.options.__file = "src/core/view/components/input/index.vue"
  17488. /* harmony default export */ var input = __webpack_exports__["default"] = (component.exports);
  17489. /***/ }),
  17490. /* 134 */
  17491. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  17492. "use strict";
  17493. // ESM COMPAT FLAG
  17494. __webpack_require__.r(__webpack_exports__);
  17495. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/navigator/index.vue?vue&type=template&id=c893a598&
  17496. var render = function() {
  17497. var _vm = this
  17498. var _h = _vm.$createElement
  17499. var _c = _vm._self._c || _h
  17500. return _vm.hoverClass && _vm.hoverClass !== "none"
  17501. ? _c(
  17502. "uni-navigator",
  17503. _vm._g(
  17504. {
  17505. class: [_vm.hovering ? _vm.hoverClass : ""],
  17506. on: {
  17507. touchstart: _vm._hoverTouchStart,
  17508. touchend: _vm._hoverTouchEnd,
  17509. touchcancel: _vm._hoverTouchCancel,
  17510. click: _vm._onClick
  17511. }
  17512. },
  17513. _vm.$listeners
  17514. ),
  17515. [_vm._t("default")],
  17516. 2
  17517. )
  17518. : _c(
  17519. "uni-navigator",
  17520. _vm._g({ on: { click: _vm._onClick } }, _vm.$listeners),
  17521. [_vm._t("default")],
  17522. 2
  17523. )
  17524. }
  17525. var staticRenderFns = []
  17526. render._withStripped = true
  17527. // CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue?vue&type=template&id=c893a598&
  17528. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  17529. var mixins = __webpack_require__(2);
  17530. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/navigator/index.vue?vue&type=script&lang=js&
  17531. //
  17532. //
  17533. //
  17534. //
  17535. //
  17536. //
  17537. //
  17538. //
  17539. //
  17540. //
  17541. //
  17542. //
  17543. //
  17544. //
  17545. //
  17546. //
  17547. //
  17548. //
  17549. //
  17550. //
  17551. var OPEN_TYPES = ['navigate', 'redirect', 'switchTab', 'reLaunch', 'navigateBack'];
  17552. /* harmony default export */ var navigatorvue_type_script_lang_js_ = ({
  17553. name: 'Navigator',
  17554. mixins: [mixins["b" /* hover */]],
  17555. props: {
  17556. hoverClass: {
  17557. type: String,
  17558. default: 'navigator-hover'
  17559. },
  17560. url: {
  17561. type: String,
  17562. default: ''
  17563. },
  17564. openType: {
  17565. type: String,
  17566. default: 'navigate',
  17567. validator: function validator(value) {
  17568. return ~OPEN_TYPES.indexOf(value);
  17569. }
  17570. },
  17571. delta: {
  17572. type: Number,
  17573. default: 1
  17574. },
  17575. hoverStartTime: {
  17576. type: [Number, String],
  17577. default: 20
  17578. },
  17579. hoverStayTime: {
  17580. type: [Number, String],
  17581. default: 600
  17582. }
  17583. },
  17584. methods: {
  17585. _onClick: function _onClick($event) {
  17586. if (this.openType !== 'navigateBack' && !this.url) {
  17587. console.error('<navigator/> should have url attribute when using navigateTo, redirectTo, reLaunch or switchTab');
  17588. return;
  17589. }
  17590. switch (this.openType) {
  17591. case 'navigate':
  17592. uni.navigateTo({
  17593. url: this.url
  17594. });
  17595. break;
  17596. case 'redirect':
  17597. uni.redirectTo({
  17598. url: this.url
  17599. });
  17600. break;
  17601. case 'switchTab':
  17602. uni.switchTab({
  17603. url: this.url
  17604. });
  17605. break;
  17606. case 'reLaunch':
  17607. uni.reLaunch({
  17608. url: this.url
  17609. });
  17610. break;
  17611. case 'navigateBack':
  17612. uni.navigateBack({
  17613. delta: this.delta
  17614. });
  17615. break;
  17616. default:
  17617. break;
  17618. }
  17619. }
  17620. }
  17621. });
  17622. // CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue?vue&type=script&lang=js&
  17623. /* harmony default export */ var components_navigatorvue_type_script_lang_js_ = (navigatorvue_type_script_lang_js_);
  17624. // EXTERNAL MODULE: ./src/core/view/components/navigator/index.vue?vue&type=style&index=0&lang=css&
  17625. var navigatorvue_type_style_index_0_lang_css_ = __webpack_require__(101);
  17626. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  17627. var componentNormalizer = __webpack_require__(0);
  17628. // CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue
  17629. /* normalize component */
  17630. var component = Object(componentNormalizer["a" /* default */])(
  17631. components_navigatorvue_type_script_lang_js_,
  17632. render,
  17633. staticRenderFns,
  17634. false,
  17635. null,
  17636. null,
  17637. null
  17638. )
  17639. /* hot reload */
  17640. if (false) { var api; }
  17641. component.options.__file = "src/core/view/components/navigator/index.vue"
  17642. /* harmony default export */ var components_navigator = __webpack_exports__["default"] = (component.exports);
  17643. /***/ }),
  17644. /* 135 */
  17645. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  17646. "use strict";
  17647. // ESM COMPAT FLAG
  17648. __webpack_require__.r(__webpack_exports__);
  17649. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/progress/index.vue?vue&type=template&id=34f62046&
  17650. var render = function() {
  17651. var _vm = this
  17652. var _h = _vm.$createElement
  17653. var _c = _vm._self._c || _h
  17654. return _c(
  17655. "uni-progress",
  17656. _vm._g({ staticClass: "uni-progress" }, _vm.$listeners),
  17657. [
  17658. _c("div", { staticClass: "uni-progress-bar", style: _vm.outerBarStyle }, [
  17659. _c("div", {
  17660. staticClass: "uni-progress-inner-bar",
  17661. style: _vm.innerBarStyle
  17662. })
  17663. ]),
  17664. _vm.showInfo
  17665. ? [
  17666. _c("p", { staticClass: "uni-progress-info" }, [
  17667. _vm._v(" " + _vm._s(_vm.currentPercent) + "% ")
  17668. ])
  17669. ]
  17670. : _vm._e()
  17671. ],
  17672. 2
  17673. )
  17674. }
  17675. var staticRenderFns = []
  17676. render._withStripped = true
  17677. // CONCATENATED MODULE: ./src/core/view/components/progress/index.vue?vue&type=template&id=34f62046&
  17678. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/progress/index.vue?vue&type=script&lang=js&
  17679. //
  17680. //
  17681. //
  17682. //
  17683. //
  17684. //
  17685. //
  17686. //
  17687. //
  17688. //
  17689. //
  17690. //
  17691. //
  17692. //
  17693. //
  17694. //
  17695. //
  17696. //
  17697. //
  17698. //
  17699. //
  17700. var VALUES = {
  17701. activeColor: '#007AFF',
  17702. backgroundColor: '#EBEBEB',
  17703. activeMode: 'backwards'
  17704. };
  17705. /* harmony default export */ var progressvue_type_script_lang_js_ = ({
  17706. name: 'Progress',
  17707. props: {
  17708. percent: {
  17709. type: [Number, String],
  17710. default: 0,
  17711. validator: function validator(value) {
  17712. return !isNaN(parseFloat(value, 10));
  17713. }
  17714. },
  17715. showInfo: {
  17716. type: [Boolean, String],
  17717. default: false
  17718. },
  17719. strokeWidth: {
  17720. type: [Number, String],
  17721. default: 6,
  17722. validator: function validator(value) {
  17723. return !isNaN(parseFloat(value, 10));
  17724. }
  17725. },
  17726. color: {
  17727. type: String,
  17728. default: VALUES.activeColor
  17729. },
  17730. activeColor: {
  17731. type: String,
  17732. default: VALUES.activeColor
  17733. },
  17734. backgroundColor: {
  17735. type: String,
  17736. default: VALUES.backgroundColor
  17737. },
  17738. active: {
  17739. type: [Boolean, String],
  17740. default: false
  17741. },
  17742. activeMode: {
  17743. type: String,
  17744. default: VALUES.activeMode
  17745. }
  17746. },
  17747. data: function data() {
  17748. return {
  17749. currentPercent: 0,
  17750. strokeTimer: 0,
  17751. lastPercent: 0
  17752. };
  17753. },
  17754. computed: {
  17755. outerBarStyle: function outerBarStyle() {
  17756. return "background-color: ".concat(this.backgroundColor, "; height: ").concat(this.strokeWidth, "px;");
  17757. },
  17758. innerBarStyle: function innerBarStyle() {
  17759. // 兼容下不推荐的属性,activeColor 优先级高于 color。
  17760. var backgroundColor = '';
  17761. if (this.color !== VALUES.activeColor && this.activeColor === VALUES.activeColor) {
  17762. backgroundColor = this.color;
  17763. } else {
  17764. backgroundColor = this.activeColor;
  17765. }
  17766. return "width: ".concat(this.currentPercent, "%;background-color: ").concat(backgroundColor);
  17767. },
  17768. realPercent: function realPercent() {
  17769. // 确保最终计算时使用的是 Number 类型的值,并且在有效范围内。
  17770. var realValue = parseFloat(this.percent, 10);
  17771. realValue < 0 && (realValue = 0);
  17772. realValue > 100 && (realValue = 100);
  17773. return realValue;
  17774. }
  17775. },
  17776. watch: {
  17777. realPercent: function realPercent(newValue, oldValue) {
  17778. this.strokeTimer && clearInterval(this.strokeTimer);
  17779. this.lastPercent = oldValue || 0;
  17780. this._activeAnimation();
  17781. }
  17782. },
  17783. created: function created() {
  17784. this._activeAnimation();
  17785. },
  17786. methods: {
  17787. _activeAnimation: function _activeAnimation() {
  17788. var _this = this;
  17789. if (this.active) {
  17790. this.currentPercent = this.activeMode === VALUES.activeMode ? 0 : this.lastPercent;
  17791. this.strokeTimer = setInterval(function () {
  17792. if (_this.currentPercent + 1 > _this.realPercent) {
  17793. _this.currentPercent = _this.realPercent;
  17794. _this.strokeTimer && clearInterval(_this.strokeTimer);
  17795. } else {
  17796. _this.currentPercent += 1;
  17797. }
  17798. }, 30);
  17799. } else {
  17800. this.currentPercent = this.realPercent;
  17801. }
  17802. }
  17803. }
  17804. });
  17805. // CONCATENATED MODULE: ./src/core/view/components/progress/index.vue?vue&type=script&lang=js&
  17806. /* harmony default export */ var components_progressvue_type_script_lang_js_ = (progressvue_type_script_lang_js_);
  17807. // EXTERNAL MODULE: ./src/core/view/components/progress/index.vue?vue&type=style&index=0&lang=css&
  17808. var progressvue_type_style_index_0_lang_css_ = __webpack_require__(104);
  17809. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  17810. var componentNormalizer = __webpack_require__(0);
  17811. // CONCATENATED MODULE: ./src/core/view/components/progress/index.vue
  17812. /* normalize component */
  17813. var component = Object(componentNormalizer["a" /* default */])(
  17814. components_progressvue_type_script_lang_js_,
  17815. render,
  17816. staticRenderFns,
  17817. false,
  17818. null,
  17819. null,
  17820. null
  17821. )
  17822. /* hot reload */
  17823. if (false) { var api; }
  17824. component.options.__file = "src/core/view/components/progress/index.vue"
  17825. /* harmony default export */ var progress = __webpack_exports__["default"] = (component.exports);
  17826. /***/ }),
  17827. /* 136 */
  17828. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  17829. "use strict";
  17830. // ESM COMPAT FLAG
  17831. __webpack_require__.r(__webpack_exports__);
  17832. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/radio-group/index.vue?vue&type=template&id=17be8d0a&
  17833. var render = function() {
  17834. var _vm = this
  17835. var _h = _vm.$createElement
  17836. var _c = _vm._self._c || _h
  17837. return _c(
  17838. "uni-radio-group",
  17839. _vm._g({}, _vm.$listeners),
  17840. [_vm._t("default")],
  17841. 2
  17842. )
  17843. }
  17844. var staticRenderFns = []
  17845. render._withStripped = true
  17846. // CONCATENATED MODULE: ./src/core/view/components/radio-group/index.vue?vue&type=template&id=17be8d0a&
  17847. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  17848. var mixins = __webpack_require__(2);
  17849. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/radio-group/index.vue?vue&type=script&lang=js&
  17850. //
  17851. //
  17852. //
  17853. //
  17854. //
  17855. //
  17856. /* harmony default export */ var radio_groupvue_type_script_lang_js_ = ({
  17857. name: 'RadioGroup',
  17858. mixins: [mixins["a" /* emitter */], mixins["d" /* listeners */]],
  17859. props: {
  17860. name: {
  17861. type: String,
  17862. default: ''
  17863. }
  17864. },
  17865. data: function data() {
  17866. return {
  17867. radioList: []
  17868. };
  17869. },
  17870. listeners: {
  17871. '@radio-change': '_changeHandler',
  17872. '@radio-group-update': '_radioGroupUpdateHandler'
  17873. },
  17874. mounted: function mounted() {
  17875. this._resetRadioGroupValue(this.radioList.length - 1);
  17876. },
  17877. created: function created() {
  17878. this.$dispatch('Form', 'uni-form-group-update', {
  17879. type: 'add',
  17880. vm: this
  17881. });
  17882. },
  17883. beforeDestroy: function beforeDestroy() {
  17884. this.$dispatch('Form', 'uni-form-group-update', {
  17885. type: 'remove',
  17886. vm: this
  17887. });
  17888. },
  17889. methods: {
  17890. _changeHandler: function _changeHandler($event, vm) {
  17891. var index = this.radioList.indexOf(vm);
  17892. this._resetRadioGroupValue(index, true);
  17893. this.$trigger('change', $event, {
  17894. value: vm.radioValue
  17895. });
  17896. },
  17897. _radioGroupUpdateHandler: function _radioGroupUpdateHandler($event) {
  17898. if ($event.type === 'add') {
  17899. this.radioList.push($event.vm);
  17900. } else {
  17901. var index = this.radioList.indexOf($event.vm);
  17902. this.radioList.splice(index, 1);
  17903. }
  17904. },
  17905. _resetRadioGroupValue: function _resetRadioGroupValue(key, change) {
  17906. var _this = this;
  17907. this.radioList.forEach(function (value, index) {
  17908. if (index === key) {
  17909. return;
  17910. }
  17911. if (change) {
  17912. _this.radioList[index].radioChecked = false;
  17913. } else {
  17914. _this.radioList.forEach(function (v, i) {
  17915. if (index >= i) {
  17916. return;
  17917. }
  17918. if (_this.radioList[i].radioChecked) {
  17919. _this.radioList[index].radioChecked = false;
  17920. }
  17921. });
  17922. }
  17923. });
  17924. },
  17925. _getFormData: function _getFormData() {
  17926. var data = {};
  17927. if (this.name !== '') {
  17928. var value = '';
  17929. this.radioList.forEach(function (vm) {
  17930. if (vm.radioChecked) {
  17931. value = vm.value;
  17932. }
  17933. });
  17934. data.value = value;
  17935. data.key = this.name;
  17936. }
  17937. return data;
  17938. }
  17939. }
  17940. });
  17941. // CONCATENATED MODULE: ./src/core/view/components/radio-group/index.vue?vue&type=script&lang=js&
  17942. /* harmony default export */ var components_radio_groupvue_type_script_lang_js_ = (radio_groupvue_type_script_lang_js_);
  17943. // EXTERNAL MODULE: ./src/core/view/components/radio-group/index.vue?vue&type=style&index=0&lang=css&
  17944. var radio_groupvue_type_style_index_0_lang_css_ = __webpack_require__(105);
  17945. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  17946. var componentNormalizer = __webpack_require__(0);
  17947. // CONCATENATED MODULE: ./src/core/view/components/radio-group/index.vue
  17948. /* normalize component */
  17949. var component = Object(componentNormalizer["a" /* default */])(
  17950. components_radio_groupvue_type_script_lang_js_,
  17951. render,
  17952. staticRenderFns,
  17953. false,
  17954. null,
  17955. null,
  17956. null
  17957. )
  17958. /* hot reload */
  17959. if (false) { var api; }
  17960. component.options.__file = "src/core/view/components/radio-group/index.vue"
  17961. /* harmony default export */ var radio_group = __webpack_exports__["default"] = (component.exports);
  17962. /***/ }),
  17963. /* 137 */
  17964. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  17965. "use strict";
  17966. // ESM COMPAT FLAG
  17967. __webpack_require__.r(__webpack_exports__);
  17968. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/radio/index.vue?vue&type=template&id=4b562a50&
  17969. var render = function() {
  17970. var _vm = this
  17971. var _h = _vm.$createElement
  17972. var _c = _vm._self._c || _h
  17973. return _c(
  17974. "uni-radio",
  17975. _vm._g(
  17976. { attrs: { disabled: _vm.disabled }, on: { click: _vm._onClick } },
  17977. _vm.$listeners
  17978. ),
  17979. [
  17980. _c(
  17981. "div",
  17982. { staticClass: "uni-radio-wrapper" },
  17983. [
  17984. _c("div", {
  17985. staticClass: "uni-radio-input",
  17986. class: _vm.radioChecked ? "uni-radio-input-checked" : "",
  17987. style: _vm.radioChecked ? _vm.checkedStyle : ""
  17988. }),
  17989. _vm._t("default")
  17990. ],
  17991. 2
  17992. )
  17993. ]
  17994. )
  17995. }
  17996. var staticRenderFns = []
  17997. render._withStripped = true
  17998. // CONCATENATED MODULE: ./src/core/view/components/radio/index.vue?vue&type=template&id=4b562a50&
  17999. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  18000. var mixins = __webpack_require__(2);
  18001. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/radio/index.vue?vue&type=script&lang=js&
  18002. //
  18003. //
  18004. //
  18005. //
  18006. //
  18007. //
  18008. //
  18009. //
  18010. //
  18011. //
  18012. //
  18013. //
  18014. //
  18015. //
  18016. //
  18017. //
  18018. /* harmony default export */ var radiovue_type_script_lang_js_ = ({
  18019. name: 'Radio',
  18020. mixins: [mixins["a" /* emitter */], mixins["d" /* listeners */]],
  18021. props: {
  18022. checked: {
  18023. type: [Boolean, String],
  18024. default: false
  18025. },
  18026. id: {
  18027. type: String,
  18028. default: ''
  18029. },
  18030. disabled: {
  18031. type: [Boolean, String],
  18032. default: false
  18033. },
  18034. color: {
  18035. type: String,
  18036. default: '#007AFF'
  18037. },
  18038. value: {
  18039. type: String,
  18040. default: ''
  18041. }
  18042. },
  18043. data: function data() {
  18044. return {
  18045. radioChecked: this.checked,
  18046. radioValue: this.value
  18047. };
  18048. },
  18049. computed: {
  18050. checkedStyle: function checkedStyle() {
  18051. return "background-color: ".concat(this.color, ";border-color: ").concat(this.color, ";");
  18052. }
  18053. },
  18054. watch: {
  18055. checked: function checked(val) {
  18056. this.radioChecked = val;
  18057. },
  18058. value: function value(val) {
  18059. this.radioValue = val;
  18060. }
  18061. },
  18062. listeners: {
  18063. 'label-click': '_onClick',
  18064. '@label-click': '_onClick'
  18065. },
  18066. created: function created() {
  18067. this.$dispatch('RadioGroup', 'uni-radio-group-update', {
  18068. type: 'add',
  18069. vm: this
  18070. });
  18071. this.$dispatch('Form', 'uni-form-group-update', {
  18072. type: 'add',
  18073. vm: this
  18074. });
  18075. },
  18076. beforeDestroy: function beforeDestroy() {
  18077. this.$dispatch('RadioGroup', 'uni-radio-group-update', {
  18078. type: 'remove',
  18079. vm: this
  18080. });
  18081. this.$dispatch('Form', 'uni-form-group-update', {
  18082. type: 'remove',
  18083. vm: this
  18084. });
  18085. },
  18086. methods: {
  18087. _onClick: function _onClick($event) {
  18088. if (this.disabled || this.radioChecked) {
  18089. return;
  18090. }
  18091. this.radioChecked = true;
  18092. this.$dispatch('RadioGroup', 'uni-radio-change', $event, this);
  18093. },
  18094. _resetFormData: function _resetFormData() {
  18095. this.radioChecked = this.min;
  18096. }
  18097. }
  18098. });
  18099. // CONCATENATED MODULE: ./src/core/view/components/radio/index.vue?vue&type=script&lang=js&
  18100. /* harmony default export */ var components_radiovue_type_script_lang_js_ = (radiovue_type_script_lang_js_);
  18101. // EXTERNAL MODULE: ./src/core/view/components/radio/index.vue?vue&type=style&index=0&lang=css&
  18102. var radiovue_type_style_index_0_lang_css_ = __webpack_require__(106);
  18103. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  18104. var componentNormalizer = __webpack_require__(0);
  18105. // CONCATENATED MODULE: ./src/core/view/components/radio/index.vue
  18106. /* normalize component */
  18107. var component = Object(componentNormalizer["a" /* default */])(
  18108. components_radiovue_type_script_lang_js_,
  18109. render,
  18110. staticRenderFns,
  18111. false,
  18112. null,
  18113. null,
  18114. null
  18115. )
  18116. /* hot reload */
  18117. if (false) { var api; }
  18118. component.options.__file = "src/core/view/components/radio/index.vue"
  18119. /* harmony default export */ var components_radio = __webpack_exports__["default"] = (component.exports);
  18120. /***/ }),
  18121. /* 138 */
  18122. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  18123. "use strict";
  18124. // ESM COMPAT FLAG
  18125. __webpack_require__.r(__webpack_exports__);
  18126. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/scroll-view/index.vue?vue&type=template&id=e9d562fc&
  18127. var render = function() {
  18128. var _vm = this
  18129. var _h = _vm.$createElement
  18130. var _c = _vm._self._c || _h
  18131. return _c("uni-scroll-view", _vm._g({}, _vm.$listeners), [
  18132. _c("div", { ref: "wrap", staticClass: "uni-scroll-view" }, [
  18133. _c(
  18134. "div",
  18135. {
  18136. ref: "main",
  18137. staticClass: "uni-scroll-view",
  18138. style: {
  18139. "overflow-x": _vm.scrollX ? "auto" : "hidden",
  18140. "overflow-y": _vm.scrollY ? "auto" : "hidden"
  18141. }
  18142. },
  18143. [
  18144. _c(
  18145. "div",
  18146. { ref: "content" },
  18147. [
  18148. _vm.refresherEnabled
  18149. ? _c(
  18150. "div",
  18151. {
  18152. ref: "refresherinner",
  18153. staticClass: "uni-scroll-view-refresher",
  18154. style: {
  18155. "background-color": _vm.refresherBackground,
  18156. height: _vm.refresherHeight + "px"
  18157. }
  18158. },
  18159. [
  18160. _vm.refresherDefaultStyle !== "none"
  18161. ? _c(
  18162. "div",
  18163. { staticClass: "uni-scroll-view-refresh" },
  18164. [
  18165. _c(
  18166. "div",
  18167. {
  18168. staticClass: "uni-scroll-view-refresh-inner"
  18169. },
  18170. [
  18171. _vm.refreshState == "pulling"
  18172. ? _c(
  18173. "svg",
  18174. {
  18175. staticClass:
  18176. "uni-scroll-view-refresh__icon",
  18177. style: {
  18178. transform:
  18179. "rotate(" +
  18180. _vm.refreshRotate +
  18181. "deg)"
  18182. },
  18183. attrs: {
  18184. fill: "#2BD009",
  18185. width: "24",
  18186. height: "24",
  18187. viewBox: "0 0 24 24"
  18188. }
  18189. },
  18190. [
  18191. _c("path", {
  18192. attrs: {
  18193. d:
  18194. "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
  18195. }
  18196. }),
  18197. _c("path", {
  18198. attrs: {
  18199. d: "M0 0h24v24H0z",
  18200. fill: "none"
  18201. }
  18202. })
  18203. ]
  18204. )
  18205. : _vm._e(),
  18206. _vm.refreshState == "refreshing"
  18207. ? _c(
  18208. "svg",
  18209. {
  18210. staticClass:
  18211. "uni-scroll-view-refresh__spinner",
  18212. attrs: {
  18213. width: "24",
  18214. height: "24",
  18215. viewBox: "25 25 50 50"
  18216. }
  18217. },
  18218. [
  18219. _c("circle", {
  18220. staticStyle: { color: "#2BD009" },
  18221. attrs: {
  18222. cx: "50",
  18223. cy: "50",
  18224. r: "20",
  18225. fill: "none",
  18226. "stroke-width": "3"
  18227. }
  18228. })
  18229. ]
  18230. )
  18231. : _vm._e()
  18232. ]
  18233. )
  18234. ]
  18235. )
  18236. : _vm._e(),
  18237. _vm.refresherDefaultStyle == "none"
  18238. ? _vm._t("refresher")
  18239. : _vm._e()
  18240. ],
  18241. 2
  18242. )
  18243. : _vm._e(),
  18244. _vm._t("default")
  18245. ],
  18246. 2
  18247. )
  18248. ]
  18249. )
  18250. ])
  18251. ])
  18252. }
  18253. var staticRenderFns = []
  18254. render._withStripped = true
  18255. // CONCATENATED MODULE: ./src/core/view/components/scroll-view/index.vue?vue&type=template&id=e9d562fc&
  18256. // EXTERNAL MODULE: ./src/core/view/mixins/scroller/index.js + 2 modules
  18257. var scroller = __webpack_require__(64);
  18258. // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
  18259. var shared = __webpack_require__(1);
  18260. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/scroll-view/index.vue?vue&type=script&lang=js&
  18261. //
  18262. //
  18263. //
  18264. //
  18265. //
  18266. //
  18267. //
  18268. //
  18269. //
  18270. //
  18271. //
  18272. //
  18273. //
  18274. //
  18275. //
  18276. //
  18277. //
  18278. //
  18279. //
  18280. //
  18281. //
  18282. //
  18283. //
  18284. //
  18285. //
  18286. //
  18287. //
  18288. //
  18289. //
  18290. //
  18291. //
  18292. //
  18293. //
  18294. //
  18295. //
  18296. //
  18297. //
  18298. //
  18299. //
  18300. //
  18301. //
  18302. //
  18303. //
  18304. //
  18305. //
  18306. //
  18307. //
  18308. //
  18309. //
  18310. //
  18311. //
  18312. //
  18313. //
  18314. //
  18315. //
  18316. //
  18317. //
  18318. //
  18319. //
  18320. //
  18321. //
  18322. //
  18323. //
  18324. //
  18325. //
  18326. //
  18327. //
  18328. var passiveOptions = shared["h" /* supportsPassive */] ? {
  18329. passive: true
  18330. } : false; // const PULLING = 'pulling'
  18331. // const REFRESHING = 'refreshing'
  18332. /* harmony default export */ var scroll_viewvue_type_script_lang_js_ = ({
  18333. name: 'ScrollView',
  18334. mixins: [scroller["a" /* default */]],
  18335. props: {
  18336. scrollX: {
  18337. type: [Boolean, String],
  18338. default: false
  18339. },
  18340. scrollY: {
  18341. type: [Boolean, String],
  18342. default: false
  18343. },
  18344. upperThreshold: {
  18345. type: [Number, String],
  18346. default: 50
  18347. },
  18348. lowerThreshold: {
  18349. type: [Number, String],
  18350. default: 50
  18351. },
  18352. scrollTop: {
  18353. type: [Number, String],
  18354. default: 0
  18355. },
  18356. scrollLeft: {
  18357. type: [Number, String],
  18358. default: 0
  18359. },
  18360. scrollIntoView: {
  18361. type: String,
  18362. default: ''
  18363. },
  18364. scrollWithAnimation: {
  18365. type: [Boolean, String],
  18366. default: false
  18367. },
  18368. enableBackToTop: {
  18369. type: [Boolean, String],
  18370. default: false
  18371. },
  18372. refresherEnabled: {
  18373. type: [Boolean, String],
  18374. default: false
  18375. },
  18376. refresherThreshold: {
  18377. type: Number,
  18378. default: 45
  18379. },
  18380. refresherDefaultStyle: {
  18381. type: String,
  18382. default: 'back'
  18383. },
  18384. refresherBackground: {
  18385. type: String,
  18386. default: '#fff'
  18387. },
  18388. refresherTriggered: {
  18389. type: [Boolean, String],
  18390. default: false
  18391. }
  18392. },
  18393. data: function data() {
  18394. return {
  18395. lastScrollTop: this.scrollTopNumber,
  18396. lastScrollLeft: this.scrollLeftNumber,
  18397. lastScrollToUpperTime: 0,
  18398. lastScrollToLowerTime: 0,
  18399. refresherHeight: 0,
  18400. refreshRotate: 0,
  18401. refreshState: ''
  18402. };
  18403. },
  18404. computed: {
  18405. upperThresholdNumber: function upperThresholdNumber() {
  18406. var val = Number(this.upperThreshold);
  18407. return isNaN(val) ? 50 : val;
  18408. },
  18409. lowerThresholdNumber: function lowerThresholdNumber() {
  18410. var val = Number(this.lowerThreshold);
  18411. return isNaN(val) ? 50 : val;
  18412. },
  18413. scrollTopNumber: function scrollTopNumber() {
  18414. return Number(this.scrollTop) || 0;
  18415. },
  18416. scrollLeftNumber: function scrollLeftNumber() {
  18417. return Number(this.scrollLeft) || 0;
  18418. }
  18419. },
  18420. watch: {
  18421. scrollTopNumber: function scrollTopNumber(val) {
  18422. this._scrollTopChanged(val);
  18423. },
  18424. scrollLeftNumber: function scrollLeftNumber(val) {
  18425. this._scrollLeftChanged(val);
  18426. },
  18427. scrollIntoView: function scrollIntoView(val) {
  18428. this._scrollIntoViewChanged(val);
  18429. },
  18430. refresherTriggered: function refresherTriggered(val) {
  18431. // TODO
  18432. if (val === true) {
  18433. this._setRefreshState('refreshing');
  18434. } else if (val === false) {
  18435. this._setRefreshState('restore');
  18436. }
  18437. }
  18438. },
  18439. mounted: function mounted() {
  18440. var self = this;
  18441. this._attached = true;
  18442. this._scrollTopChanged(this.scrollTopNumber);
  18443. this._scrollLeftChanged(this.scrollLeftNumber);
  18444. this._scrollIntoViewChanged(this.scrollIntoView);
  18445. this.__handleScroll = function (e) {
  18446. event.preventDefault();
  18447. event.stopPropagation();
  18448. self._handleScroll.bind(self, event)();
  18449. };
  18450. var touchStart = null;
  18451. var needStop = null;
  18452. this.__handleTouchMove = function (event) {
  18453. var x = event.touches[0].pageX;
  18454. var y = event.touches[0].pageY;
  18455. var main = self.$refs.main;
  18456. if (needStop === null) {
  18457. if (Math.abs(x - touchStart.x) > Math.abs(y - touchStart.y)) {
  18458. // 横向滑动
  18459. if (self.scrollX) {
  18460. if (main.scrollLeft === 0 && x > touchStart.x) {
  18461. needStop = false;
  18462. return;
  18463. } else if (main.scrollWidth === main.offsetWidth + main.scrollLeft && x < touchStart.x) {
  18464. needStop = false;
  18465. return;
  18466. }
  18467. needStop = true;
  18468. } else {
  18469. needStop = false;
  18470. }
  18471. } else {
  18472. // 纵向滑动
  18473. if (self.scrollY) {
  18474. if (main.scrollTop === 0 && y > touchStart.y) {
  18475. needStop = false;
  18476. return;
  18477. } else if (main.scrollHeight === main.offsetHeight + main.scrollTop && y < touchStart.y) {
  18478. needStop = false;
  18479. return;
  18480. }
  18481. needStop = true;
  18482. } else {
  18483. needStop = false;
  18484. }
  18485. }
  18486. }
  18487. if (needStop) {
  18488. event.stopPropagation();
  18489. }
  18490. if (self.refresherEnabled && self.refreshState === 'pulling') {
  18491. var dy = y - touchStart.y;
  18492. self.refresherHeight = dy;
  18493. var rotate = dy / self.refresherThreshold;
  18494. if (rotate > 1) {
  18495. rotate = 1;
  18496. } else {
  18497. rotate = rotate * 360;
  18498. }
  18499. self.refreshRotate = rotate;
  18500. self.$trigger('refresherpulling', event, {
  18501. deltaY: dy
  18502. });
  18503. }
  18504. };
  18505. this.__handleTouchStart = function (event) {
  18506. if (event.touches.length === 1) {
  18507. Object(shared["b" /* disableScrollBounce */])({
  18508. disable: true
  18509. });
  18510. needStop = null;
  18511. touchStart = {
  18512. x: event.touches[0].pageX,
  18513. y: event.touches[0].pageY
  18514. };
  18515. if (self.refresherEnabled && self.refreshState !== 'refreshing' && self.$refs.main.scrollTop === 0) {
  18516. self.refreshState = 'pulling';
  18517. }
  18518. }
  18519. };
  18520. this.__handleTouchEnd = function (event) {
  18521. touchStart = null;
  18522. Object(shared["b" /* disableScrollBounce */])({
  18523. disable: false
  18524. });
  18525. if (self.refresherHeight >= self.refresherThreshold) {
  18526. self._setRefreshState('refreshing');
  18527. } else {
  18528. self.refresherHeight = 0;
  18529. self.$trigger('refresherabort', event, {});
  18530. }
  18531. };
  18532. this.$refs.main.addEventListener('touchstart', this.__handleTouchStart, passiveOptions);
  18533. this.$refs.main.addEventListener('touchmove', this.__handleTouchMove, passiveOptions);
  18534. this.$refs.main.addEventListener('scroll', this.__handleScroll, shared["h" /* supportsPassive */] ? {
  18535. passive: false
  18536. } : false);
  18537. this.$refs.main.addEventListener('touchend', this.__handleTouchEnd, passiveOptions);
  18538. },
  18539. activated: function activated() {
  18540. // 还原 scroll-view 滚动位置
  18541. this.scrollY && (this.$refs.main.scrollTop = this.lastScrollTop);
  18542. this.scrollX && (this.$refs.main.scrollLeft = this.lastScrollLeft);
  18543. },
  18544. beforeDestroy: function beforeDestroy() {
  18545. this.$refs.main.removeEventListener('touchstart', this.__handleTouchStart, passiveOptions);
  18546. this.$refs.main.removeEventListener('touchmove', this.__handleTouchMove, passiveOptions);
  18547. this.$refs.main.removeEventListener('scroll', this.__handleScroll, shared["h" /* supportsPassive */] ? {
  18548. passive: false
  18549. } : false);
  18550. this.$refs.main.removeEventListener('touchend', this.__handleTouchEnd, passiveOptions);
  18551. },
  18552. methods: {
  18553. scrollTo: function scrollTo(t, n) {
  18554. var i = this.$refs.main;
  18555. t < 0 ? t = 0 : n === 'x' && t > i.scrollWidth - i.offsetWidth ? t = i.scrollWidth - i.offsetWidth : n === 'y' && t > i.scrollHeight - i.offsetHeight && (t = i.scrollHeight - i.offsetHeight);
  18556. var r = 0;
  18557. var o = '';
  18558. n === 'x' ? r = i.scrollLeft - t : n === 'y' && (r = i.scrollTop - t);
  18559. if (r !== 0) {
  18560. this.$refs.content.style.transition = 'transform .3s ease-out';
  18561. this.$refs.content.style.webkitTransition = '-webkit-transform .3s ease-out';
  18562. if (n === 'x') {
  18563. o = 'translateX(' + r + 'px) translateZ(0)';
  18564. } else {
  18565. n === 'y' && (o = 'translateY(' + r + 'px) translateZ(0)');
  18566. }
  18567. this.$refs.content.removeEventListener('transitionend', this.__transitionEnd);
  18568. this.$refs.content.removeEventListener('webkitTransitionEnd', this.__transitionEnd);
  18569. this.__transitionEnd = this._transitionEnd.bind(this, t, n);
  18570. this.$refs.content.addEventListener('transitionend', this.__transitionEnd);
  18571. this.$refs.content.addEventListener('webkitTransitionEnd', this.__transitionEnd);
  18572. if (n === 'x') {
  18573. // if (e !== 'ios') {
  18574. i.style.overflowX = 'hidden'; // }
  18575. } else if (n === 'y') {
  18576. i.style.overflowY = 'hidden';
  18577. }
  18578. this.$refs.content.style.transform = o;
  18579. this.$refs.content.style.webkitTransform = o;
  18580. }
  18581. },
  18582. _handleTrack: function _handleTrack($event) {
  18583. if ($event.detail.state === 'start') {
  18584. this._x = $event.detail.x;
  18585. this._y = $event.detail.y;
  18586. this._noBubble = null;
  18587. return;
  18588. }
  18589. if ($event.detail.state === 'end') {
  18590. this._noBubble = false;
  18591. }
  18592. if (this._noBubble === null && this.scrollY) {
  18593. if (Math.abs(this._y - $event.detail.y) / Math.abs(this._x - $event.detail.x) > 1) {
  18594. this._noBubble = true;
  18595. } else {
  18596. this._noBubble = false;
  18597. }
  18598. }
  18599. if (this._noBubble === null && this.scrollX) {
  18600. if (Math.abs(this._x - $event.detail.x) / Math.abs(this._y - $event.detail.y) > 1) {
  18601. this._noBubble = true;
  18602. } else {
  18603. this._noBubble = false;
  18604. }
  18605. }
  18606. this._x = $event.detail.x;
  18607. this._y = $event.detail.y;
  18608. if (this._noBubble) {
  18609. $event.stopPropagation();
  18610. }
  18611. },
  18612. _handleScroll: function _handleScroll($event) {
  18613. if (!($event.timeStamp - this._lastScrollTime < 20)) {
  18614. this._lastScrollTime = $event.timeStamp;
  18615. var target = $event.target;
  18616. this.$trigger('scroll', $event, {
  18617. scrollLeft: target.scrollLeft,
  18618. scrollTop: target.scrollTop,
  18619. scrollHeight: target.scrollHeight,
  18620. scrollWidth: target.scrollWidth,
  18621. deltaX: this.lastScrollLeft - target.scrollLeft,
  18622. deltaY: this.lastScrollTop - target.scrollTop
  18623. });
  18624. if (this.scrollY) {
  18625. if (target.scrollTop <= this.upperThresholdNumber && this.lastScrollTop - target.scrollTop > 0 && $event.timeStamp - this.lastScrollToUpperTime > 200) {
  18626. this.$trigger('scrolltoupper', $event, {
  18627. direction: 'top'
  18628. });
  18629. this.lastScrollToUpperTime = $event.timeStamp;
  18630. }
  18631. if (target.scrollTop + target.offsetHeight + this.lowerThresholdNumber >= target.scrollHeight && this.lastScrollTop - target.scrollTop < 0 && $event.timeStamp - this.lastScrollToLowerTime > 200) {
  18632. this.$trigger('scrolltolower', $event, {
  18633. direction: 'bottom'
  18634. });
  18635. this.lastScrollToLowerTime = $event.timeStamp;
  18636. }
  18637. }
  18638. if (this.scrollX) {
  18639. if (target.scrollLeft <= this.upperThresholdNumber && this.lastScrollLeft - target.scrollLeft > 0 && $event.timeStamp - this.lastScrollToUpperTime > 200) {
  18640. this.$trigger('scrolltoupper', $event, {
  18641. direction: 'left'
  18642. });
  18643. this.lastScrollToUpperTime = $event.timeStamp;
  18644. }
  18645. if (target.scrollLeft + target.offsetWidth + this.lowerThresholdNumber >= target.scrollWidth && this.lastScrollLeft - target.scrollLeft < 0 && $event.timeStamp - this.lastScrollToLowerTime > 200) {
  18646. this.$trigger('scrolltolower', $event, {
  18647. direction: 'right'
  18648. });
  18649. this.lastScrollToLowerTime = $event.timeStamp;
  18650. }
  18651. }
  18652. this.lastScrollTop = target.scrollTop;
  18653. this.lastScrollLeft = target.scrollLeft;
  18654. }
  18655. },
  18656. _scrollTopChanged: function _scrollTopChanged(val) {
  18657. if (this.scrollY) {
  18658. if (this._innerSetScrollTop) {
  18659. this._innerSetScrollTop = false;
  18660. } else {
  18661. if (this.scrollWithAnimation) {
  18662. this.scrollTo(val, 'y');
  18663. } else {
  18664. this.$refs.main.scrollTop = val;
  18665. }
  18666. }
  18667. }
  18668. },
  18669. _scrollLeftChanged: function _scrollLeftChanged(val) {
  18670. if (this.scrollX) {
  18671. if (this._innerSetScrollLeft) {
  18672. this._innerSetScrollLeft = false;
  18673. } else {
  18674. if (this.scrollWithAnimation) {
  18675. this.scrollTo(val, 'x');
  18676. } else {
  18677. this.$refs.main.scrollLeft = val;
  18678. }
  18679. }
  18680. }
  18681. },
  18682. _scrollIntoViewChanged: function _scrollIntoViewChanged(val) {
  18683. if (val) {
  18684. if (!/^[_a-zA-Z][-_a-zA-Z0-9:]*$/.test(val)) {
  18685. console.group('scroll-into-view="' + val + '" 有误');
  18686. console.error('id 属性值格式错误。如不能以数字开头。');
  18687. console.groupEnd();
  18688. return;
  18689. }
  18690. var element = this.$el.querySelector('#' + val);
  18691. if (element) {
  18692. var mainRect = this.$refs.main.getBoundingClientRect();
  18693. var elRect = element.getBoundingClientRect();
  18694. if (this.scrollX) {
  18695. var left = elRect.left - mainRect.left;
  18696. var scrollLeft = this.$refs.main.scrollLeft;
  18697. var x = scrollLeft + left;
  18698. if (this.scrollWithAnimation) {
  18699. this.scrollTo(x, 'x');
  18700. } else {
  18701. this.$refs.main.scrollLeft = x;
  18702. }
  18703. }
  18704. if (this.scrollY) {
  18705. var top = elRect.top - mainRect.top;
  18706. var scrollTop = this.$refs.main.scrollTop;
  18707. var y = scrollTop + top;
  18708. if (this.scrollWithAnimation) {
  18709. this.scrollTo(y, 'y');
  18710. } else {
  18711. this.$refs.main.scrollTop = y;
  18712. }
  18713. }
  18714. }
  18715. }
  18716. },
  18717. _transitionEnd: function _transitionEnd(val, type) {
  18718. this.$refs.content.style.transition = '';
  18719. this.$refs.content.style.webkitTransition = '';
  18720. this.$refs.content.style.transform = '';
  18721. this.$refs.content.style.webkitTransform = '';
  18722. var main = this.$refs.main;
  18723. if (type === 'x') {
  18724. main.style.overflowX = this.scrollX ? 'auto' : 'hidden';
  18725. main.scrollLeft = val;
  18726. } else if (type === 'y') {
  18727. main.style.overflowY = this.scrollY ? 'auto' : 'hidden';
  18728. main.scrollTop = val;
  18729. }
  18730. this.$refs.content.removeEventListener('transitionend', this.__transitionEnd);
  18731. this.$refs.content.removeEventListener('webkitTransitionEnd', this.__transitionEnd);
  18732. },
  18733. _setRefreshState: function _setRefreshState(state) {
  18734. switch (state) {
  18735. case 'refreshing':
  18736. this.refresherHeight = this.refresherThreshold;
  18737. this.$trigger('refresherrefresh', event, {});
  18738. break;
  18739. case 'restore':
  18740. this.refresherHeight = 0;
  18741. this.$trigger('refresherrestore', {}, {});
  18742. break;
  18743. }
  18744. this.refreshState = state;
  18745. },
  18746. getScrollPosition: function getScrollPosition() {
  18747. var main = this.$refs.main;
  18748. return {
  18749. scrollLeft: main.scrollLeft,
  18750. scrollTop: main.scrollTop
  18751. };
  18752. }
  18753. }
  18754. });
  18755. // CONCATENATED MODULE: ./src/core/view/components/scroll-view/index.vue?vue&type=script&lang=js&
  18756. /* harmony default export */ var components_scroll_viewvue_type_script_lang_js_ = (scroll_viewvue_type_script_lang_js_);
  18757. // EXTERNAL MODULE: ./src/core/view/components/scroll-view/index.vue?vue&type=style&index=0&lang=css&
  18758. var scroll_viewvue_type_style_index_0_lang_css_ = __webpack_require__(108);
  18759. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  18760. var componentNormalizer = __webpack_require__(0);
  18761. // CONCATENATED MODULE: ./src/core/view/components/scroll-view/index.vue
  18762. /* normalize component */
  18763. var component = Object(componentNormalizer["a" /* default */])(
  18764. components_scroll_viewvue_type_script_lang_js_,
  18765. render,
  18766. staticRenderFns,
  18767. false,
  18768. null,
  18769. null,
  18770. null
  18771. )
  18772. /* hot reload */
  18773. if (false) { var api; }
  18774. component.options.__file = "src/core/view/components/scroll-view/index.vue"
  18775. /* harmony default export */ var scroll_view = __webpack_exports__["default"] = (component.exports);
  18776. /***/ }),
  18777. /* 139 */
  18778. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  18779. "use strict";
  18780. // ESM COMPAT FLAG
  18781. __webpack_require__.r(__webpack_exports__);
  18782. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/slider/index.vue?vue&type=template&id=1969bd7a&
  18783. var render = function() {
  18784. var _vm = this
  18785. var _h = _vm.$createElement
  18786. var _c = _vm._self._c || _h
  18787. return _c(
  18788. "uni-slider",
  18789. _vm._g({ ref: "uni-slider", on: { click: _vm._onClick } }, _vm.$listeners),
  18790. [
  18791. _c("div", { staticClass: "uni-slider-wrapper" }, [
  18792. _c("div", { staticClass: "uni-slider-tap-area" }, [
  18793. _c(
  18794. "div",
  18795. { staticClass: "uni-slider-handle-wrapper", style: _vm.setBgColor },
  18796. [
  18797. _c("div", {
  18798. ref: "uni-slider-handle",
  18799. staticClass: "uni-slider-handle",
  18800. style: _vm.setBlockBg
  18801. }),
  18802. _c("div", {
  18803. staticClass: "uni-slider-thumb",
  18804. style: _vm.setBlockStyle
  18805. }),
  18806. _c("div", {
  18807. staticClass: "uni-slider-track",
  18808. style: _vm.setActiveColor
  18809. })
  18810. ]
  18811. )
  18812. ]),
  18813. _c(
  18814. "span",
  18815. {
  18816. directives: [
  18817. {
  18818. name: "show",
  18819. rawName: "v-show",
  18820. value: _vm.showValue,
  18821. expression: "showValue"
  18822. }
  18823. ],
  18824. staticClass: "uni-slider-value"
  18825. },
  18826. [_vm._v(_vm._s(_vm.sliderValue))]
  18827. )
  18828. ]),
  18829. _vm._t("default")
  18830. ],
  18831. 2
  18832. )
  18833. }
  18834. var staticRenderFns = []
  18835. render._withStripped = true
  18836. // CONCATENATED MODULE: ./src/core/view/components/slider/index.vue?vue&type=template&id=1969bd7a&
  18837. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  18838. var mixins = __webpack_require__(2);
  18839. // EXTERNAL MODULE: ./src/core/view/mixins/touchtrack.js
  18840. var touchtrack = __webpack_require__(9);
  18841. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/slider/index.vue?vue&type=script&lang=js&
  18842. //
  18843. //
  18844. //
  18845. //
  18846. //
  18847. //
  18848. //
  18849. //
  18850. //
  18851. //
  18852. //
  18853. //
  18854. //
  18855. //
  18856. //
  18857. //
  18858. //
  18859. //
  18860. //
  18861. //
  18862. //
  18863. //
  18864. //
  18865. //
  18866. //
  18867. //
  18868. //
  18869. //
  18870. //
  18871. //
  18872. //
  18873. //
  18874. //
  18875. //
  18876. //
  18877. /* harmony default export */ var slidervue_type_script_lang_js_ = ({
  18878. name: 'Slider',
  18879. mixins: [mixins["a" /* emitter */], mixins["d" /* listeners */], touchtrack["a" /* default */]],
  18880. props: {
  18881. name: {
  18882. type: String,
  18883. default: ''
  18884. },
  18885. min: {
  18886. type: [Number, String],
  18887. default: 0
  18888. },
  18889. max: {
  18890. type: [Number, String],
  18891. default: 100
  18892. },
  18893. value: {
  18894. type: [Number, String],
  18895. default: 0
  18896. },
  18897. step: {
  18898. type: [Number, String],
  18899. default: 1
  18900. },
  18901. disabled: {
  18902. type: [Boolean, String],
  18903. default: false
  18904. },
  18905. color: {
  18906. type: String,
  18907. default: '#e9e9e9'
  18908. },
  18909. backgroundColor: {
  18910. type: String,
  18911. default: '#e9e9e9'
  18912. },
  18913. activeColor: {
  18914. type: String,
  18915. default: '#007aff'
  18916. },
  18917. selectedColor: {
  18918. type: String,
  18919. default: '#007aff'
  18920. },
  18921. blockColor: {
  18922. type: String,
  18923. default: '#ffffff'
  18924. },
  18925. blockSize: {
  18926. type: [Number, String],
  18927. default: 28
  18928. },
  18929. showValue: {
  18930. type: [Boolean, String],
  18931. default: false
  18932. }
  18933. },
  18934. data: function data() {
  18935. return {
  18936. sliderValue: Number(this.value)
  18937. };
  18938. },
  18939. computed: {
  18940. setBlockStyle: function setBlockStyle() {
  18941. return {
  18942. width: this.blockSize + 'px',
  18943. height: this.blockSize + 'px',
  18944. marginLeft: -this.blockSize / 2 + 'px',
  18945. marginTop: -this.blockSize / 2 + 'px',
  18946. left: this._getValueWidth(),
  18947. backgroundColor: this.blockColor
  18948. };
  18949. },
  18950. setBgColor: function setBgColor() {
  18951. return {
  18952. backgroundColor: this._getBgColor()
  18953. };
  18954. },
  18955. setBlockBg: function setBlockBg() {
  18956. return {
  18957. left: this._getValueWidth()
  18958. };
  18959. },
  18960. setActiveColor: function setActiveColor() {
  18961. // 有问题,设置最大值最小值是有问题
  18962. return {
  18963. backgroundColor: this._getActiveColor(),
  18964. width: this._getValueWidth()
  18965. };
  18966. }
  18967. },
  18968. watch: {
  18969. value: function value(val) {
  18970. this.sliderValue = Number(val);
  18971. }
  18972. },
  18973. mounted: function mounted() {
  18974. this.touchtrack(this.$refs['uni-slider-handle'], '_onTrack');
  18975. },
  18976. created: function created() {
  18977. this.$dispatch('Form', 'uni-form-group-update', {
  18978. type: 'add',
  18979. vm: this
  18980. });
  18981. },
  18982. beforeDestroy: function beforeDestroy() {
  18983. this.$dispatch('Form', 'uni-form-group-update', {
  18984. type: 'remove',
  18985. vm: this
  18986. });
  18987. },
  18988. methods: {
  18989. _onUserChangedValue: function _onUserChangedValue(e) {
  18990. var slider = this.$refs['uni-slider'];
  18991. var offsetWidth = slider.offsetWidth;
  18992. var boxLeft = slider.getBoundingClientRect().left;
  18993. var value = (e.x - boxLeft) * (this.max - this.min) / offsetWidth + Number(this.min);
  18994. this.sliderValue = this._filterValue(value);
  18995. },
  18996. _filterValue: function _filterValue(e) {
  18997. return e < this.min ? this.min : e > this.max ? this.max : Math.round((e - this.min) / this.step) * this.step + Number(this.min);
  18998. },
  18999. _getValueWidth: function _getValueWidth() {
  19000. return 100 * (this.sliderValue - this.min) / (this.max - this.min) + '%';
  19001. },
  19002. _getBgColor: function _getBgColor() {
  19003. return this.backgroundColor !== '#e9e9e9' ? this.backgroundColor : this.color !== '#007aff' ? this.color : '#007aff';
  19004. },
  19005. _getActiveColor: function _getActiveColor() {
  19006. return this.activeColor !== '#007aff' ? this.activeColor : this.selectedColor !== '#e9e9e9' ? this.selectedColor : '#e9e9e9';
  19007. },
  19008. _onTrack: function _onTrack(e) {
  19009. if (!this.disabled) {
  19010. return e.detail.state === 'move' ? (this._onUserChangedValue({
  19011. x: e.detail.x0
  19012. }), this.$trigger('changing', e, {
  19013. value: this.sliderValue
  19014. }), !1) : e.detail.state === 'end' && this.$trigger('change', e, {
  19015. value: this.sliderValue
  19016. });
  19017. }
  19018. },
  19019. _onClick: function _onClick($event) {
  19020. if (this.disabled) {
  19021. return;
  19022. }
  19023. this._onUserChangedValue($event);
  19024. this.$trigger('change', $event, {
  19025. value: this.sliderValue
  19026. });
  19027. },
  19028. _resetFormData: function _resetFormData() {
  19029. this.sliderValue = this.min;
  19030. },
  19031. _getFormData: function _getFormData() {
  19032. var data = {};
  19033. if (this.name !== '') {
  19034. data.value = this.sliderValue;
  19035. data.key = this.name;
  19036. }
  19037. return data;
  19038. }
  19039. }
  19040. });
  19041. // CONCATENATED MODULE: ./src/core/view/components/slider/index.vue?vue&type=script&lang=js&
  19042. /* harmony default export */ var components_slidervue_type_script_lang_js_ = (slidervue_type_script_lang_js_);
  19043. // EXTERNAL MODULE: ./src/core/view/components/slider/index.vue?vue&type=style&index=0&lang=css&
  19044. var slidervue_type_style_index_0_lang_css_ = __webpack_require__(109);
  19045. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  19046. var componentNormalizer = __webpack_require__(0);
  19047. // CONCATENATED MODULE: ./src/core/view/components/slider/index.vue
  19048. /* normalize component */
  19049. var component = Object(componentNormalizer["a" /* default */])(
  19050. components_slidervue_type_script_lang_js_,
  19051. render,
  19052. staticRenderFns,
  19053. false,
  19054. null,
  19055. null,
  19056. null
  19057. )
  19058. /* hot reload */
  19059. if (false) { var api; }
  19060. component.options.__file = "src/core/view/components/slider/index.vue"
  19061. /* harmony default export */ var slider = __webpack_exports__["default"] = (component.exports);
  19062. /***/ }),
  19063. /* 140 */
  19064. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19065. "use strict";
  19066. // ESM COMPAT FLAG
  19067. __webpack_require__.r(__webpack_exports__);
  19068. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/swiper-item/index.vue?vue&type=template&id=3883b065&
  19069. var render = function() {
  19070. var _vm = this
  19071. var _h = _vm.$createElement
  19072. var _c = _vm._self._c || _h
  19073. return _c(
  19074. "uni-swiper-item",
  19075. _vm._g({}, _vm.$listeners),
  19076. [_vm._t("default")],
  19077. 2
  19078. )
  19079. }
  19080. var staticRenderFns = []
  19081. render._withStripped = true
  19082. // CONCATENATED MODULE: ./src/core/view/components/swiper-item/index.vue?vue&type=template&id=3883b065&
  19083. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/swiper-item/index.vue?vue&type=script&lang=js&
  19084. //
  19085. //
  19086. //
  19087. //
  19088. //
  19089. /* harmony default export */ var swiper_itemvue_type_script_lang_js_ = ({
  19090. name: 'SwiperItem',
  19091. props: {
  19092. itemId: {
  19093. type: String,
  19094. default: ''
  19095. }
  19096. },
  19097. mounted: function mounted() {
  19098. var $el = this.$el;
  19099. $el.style.position = 'absolute';
  19100. $el.style.width = '100%';
  19101. $el.style.height = '100%';
  19102. var callbacks = this.$vnode._callbacks;
  19103. if (callbacks) {
  19104. callbacks.forEach(function (callback) {
  19105. callback();
  19106. });
  19107. }
  19108. }
  19109. });
  19110. // CONCATENATED MODULE: ./src/core/view/components/swiper-item/index.vue?vue&type=script&lang=js&
  19111. /* harmony default export */ var components_swiper_itemvue_type_script_lang_js_ = (swiper_itemvue_type_script_lang_js_);
  19112. // EXTERNAL MODULE: ./src/core/view/components/swiper-item/index.vue?vue&type=style&index=0&lang=css&
  19113. var swiper_itemvue_type_style_index_0_lang_css_ = __webpack_require__(110);
  19114. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  19115. var componentNormalizer = __webpack_require__(0);
  19116. // CONCATENATED MODULE: ./src/core/view/components/swiper-item/index.vue
  19117. /* normalize component */
  19118. var component = Object(componentNormalizer["a" /* default */])(
  19119. components_swiper_itemvue_type_script_lang_js_,
  19120. render,
  19121. staticRenderFns,
  19122. false,
  19123. null,
  19124. null,
  19125. null
  19126. )
  19127. /* hot reload */
  19128. if (false) { var api; }
  19129. component.options.__file = "src/core/view/components/swiper-item/index.vue"
  19130. /* harmony default export */ var swiper_item = __webpack_exports__["default"] = (component.exports);
  19131. /***/ }),
  19132. /* 141 */
  19133. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19134. "use strict";
  19135. // ESM COMPAT FLAG
  19136. __webpack_require__.r(__webpack_exports__);
  19137. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/switch/index.vue?vue&type=template&id=04951fe6&
  19138. var render = function() {
  19139. var _vm = this
  19140. var _h = _vm.$createElement
  19141. var _c = _vm._self._c || _h
  19142. return _c(
  19143. "uni-switch",
  19144. _vm._g(
  19145. { attrs: { disabled: _vm.disabled }, on: { click: _vm._onClick } },
  19146. _vm.$listeners
  19147. ),
  19148. [
  19149. _c("div", { staticClass: "uni-switch-wrapper" }, [
  19150. _c("div", {
  19151. directives: [
  19152. {
  19153. name: "show",
  19154. rawName: "v-show",
  19155. value: _vm.type === "switch",
  19156. expression: "type === 'switch'"
  19157. }
  19158. ],
  19159. staticClass: "uni-switch-input",
  19160. class: [_vm.switchChecked ? "uni-switch-input-checked" : ""],
  19161. style: {
  19162. backgroundColor: _vm.switchChecked ? _vm.color : "#DFDFDF",
  19163. borderColor: _vm.switchChecked ? _vm.color : "#DFDFDF"
  19164. }
  19165. }),
  19166. _c("div", {
  19167. directives: [
  19168. {
  19169. name: "show",
  19170. rawName: "v-show",
  19171. value: _vm.type === "checkbox",
  19172. expression: "type === 'checkbox'"
  19173. }
  19174. ],
  19175. staticClass: "uni-checkbox-input",
  19176. class: [_vm.switchChecked ? "uni-checkbox-input-checked" : ""],
  19177. style: { color: _vm.color }
  19178. })
  19179. ])
  19180. ]
  19181. )
  19182. }
  19183. var staticRenderFns = []
  19184. render._withStripped = true
  19185. // CONCATENATED MODULE: ./src/core/view/components/switch/index.vue?vue&type=template&id=04951fe6&
  19186. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  19187. var mixins = __webpack_require__(2);
  19188. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/switch/index.vue?vue&type=script&lang=js&
  19189. //
  19190. //
  19191. //
  19192. //
  19193. //
  19194. //
  19195. //
  19196. //
  19197. //
  19198. //
  19199. //
  19200. //
  19201. //
  19202. //
  19203. //
  19204. //
  19205. //
  19206. //
  19207. //
  19208. //
  19209. //
  19210. //
  19211. /* harmony default export */ var switchvue_type_script_lang_js_ = ({
  19212. name: 'Switch',
  19213. mixins: [mixins["a" /* emitter */], mixins["d" /* listeners */]],
  19214. props: {
  19215. name: {
  19216. type: String,
  19217. default: ''
  19218. },
  19219. checked: {
  19220. type: [Boolean, String],
  19221. default: false
  19222. },
  19223. type: {
  19224. type: String,
  19225. default: 'switch'
  19226. },
  19227. id: {
  19228. type: String,
  19229. default: ''
  19230. },
  19231. disabled: {
  19232. type: [Boolean, String],
  19233. default: false
  19234. },
  19235. color: {
  19236. type: String,
  19237. default: '#007aff'
  19238. }
  19239. },
  19240. data: function data() {
  19241. return {
  19242. switchChecked: this.checked
  19243. };
  19244. },
  19245. watch: {
  19246. checked: function checked(val) {
  19247. this.switchChecked = val;
  19248. }
  19249. },
  19250. created: function created() {
  19251. this.$dispatch('Form', 'uni-form-group-update', {
  19252. type: 'add',
  19253. vm: this
  19254. });
  19255. },
  19256. beforeDestroy: function beforeDestroy() {
  19257. this.$dispatch('Form', 'uni-form-group-update', {
  19258. type: 'remove',
  19259. vm: this
  19260. });
  19261. },
  19262. listeners: {
  19263. 'label-click': '_onClick',
  19264. '@label-click': '_onClick'
  19265. },
  19266. methods: {
  19267. _onClick: function _onClick($event) {
  19268. if (this.disabled) {
  19269. return;
  19270. }
  19271. this.switchChecked = !this.switchChecked;
  19272. this.$trigger('change', $event, {
  19273. value: this.switchChecked
  19274. });
  19275. },
  19276. _resetFormData: function _resetFormData() {
  19277. this.switchChecked = false;
  19278. },
  19279. _getFormData: function _getFormData() {
  19280. var data = {};
  19281. if (this.name !== '') {
  19282. data.value = this.switchChecked;
  19283. data.key = this.name;
  19284. }
  19285. return data;
  19286. }
  19287. }
  19288. });
  19289. // CONCATENATED MODULE: ./src/core/view/components/switch/index.vue?vue&type=script&lang=js&
  19290. /* harmony default export */ var components_switchvue_type_script_lang_js_ = (switchvue_type_script_lang_js_);
  19291. // EXTERNAL MODULE: ./src/core/view/components/switch/index.vue?vue&type=style&index=0&lang=css&
  19292. var switchvue_type_style_index_0_lang_css_ = __webpack_require__(112);
  19293. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  19294. var componentNormalizer = __webpack_require__(0);
  19295. // CONCATENATED MODULE: ./src/core/view/components/switch/index.vue
  19296. /* normalize component */
  19297. var component = Object(componentNormalizer["a" /* default */])(
  19298. components_switchvue_type_script_lang_js_,
  19299. render,
  19300. staticRenderFns,
  19301. false,
  19302. null,
  19303. null,
  19304. null
  19305. )
  19306. /* hot reload */
  19307. if (false) { var api; }
  19308. component.options.__file = "src/core/view/components/switch/index.vue"
  19309. /* harmony default export */ var components_switch = __webpack_exports__["default"] = (component.exports);
  19310. /***/ }),
  19311. /* 142 */
  19312. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19313. "use strict";
  19314. // ESM COMPAT FLAG
  19315. __webpack_require__.r(__webpack_exports__);
  19316. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/textarea/index.vue?vue&type=template&id=33f82dda&
  19317. var render = function() {
  19318. var _vm = this
  19319. var _h = _vm.$createElement
  19320. var _c = _vm._self._c || _h
  19321. return _c(
  19322. "uni-textarea",
  19323. _vm._g(
  19324. {
  19325. on: {
  19326. change: function($event) {
  19327. $event.stopPropagation()
  19328. }
  19329. }
  19330. },
  19331. _vm.$listeners
  19332. ),
  19333. [
  19334. _c("div", { staticClass: "uni-textarea-wrapper" }, [
  19335. _c(
  19336. "div",
  19337. {
  19338. directives: [
  19339. {
  19340. name: "show",
  19341. rawName: "v-show",
  19342. value: !(_vm.composition || _vm.valueSync.length),
  19343. expression: "!(composition||valueSync.length)"
  19344. }
  19345. ],
  19346. ref: "placeholder",
  19347. staticClass: "uni-textarea-placeholder",
  19348. class: _vm.placeholderClass,
  19349. style: _vm.placeholderStyle
  19350. },
  19351. [_vm._v(" " + _vm._s(_vm.placeholder) + " ")]
  19352. ),
  19353. _c("div", { ref: "line", staticClass: "uni-textarea-line" }),
  19354. _c(
  19355. "div",
  19356. { staticClass: "uni-textarea-compute" },
  19357. [
  19358. _vm._l(_vm.valueCompute, function(item, index) {
  19359. return _c("div", { key: index }, [
  19360. _vm._v(" " + _vm._s(item.trim() ? item : ".") + " ")
  19361. ])
  19362. }),
  19363. _c("v-uni-resize-sensor", {
  19364. ref: "sensor",
  19365. on: { resize: _vm._resize }
  19366. })
  19367. ],
  19368. 2
  19369. ),
  19370. _c("textarea", {
  19371. directives: [
  19372. {
  19373. name: "model",
  19374. rawName: "v-model",
  19375. value: _vm.valueSync,
  19376. expression: "valueSync"
  19377. }
  19378. ],
  19379. ref: "textarea",
  19380. staticClass: "uni-textarea-textarea",
  19381. class: { "uni-textarea-textarea-fix-margin": _vm.fixMargin },
  19382. style: { "overflow-y": _vm.autoHeight ? "hidden" : "auto" },
  19383. attrs: {
  19384. disabled: _vm.disabled,
  19385. maxlength: _vm.maxlengthNumber,
  19386. autofocus: _vm.autoFocus
  19387. },
  19388. domProps: { value: _vm.valueSync },
  19389. on: {
  19390. compositionstart: _vm._compositionstart,
  19391. compositionend: _vm._compositionend,
  19392. input: [
  19393. function($event) {
  19394. if ($event.target.composing) {
  19395. return
  19396. }
  19397. _vm.valueSync = $event.target.value
  19398. },
  19399. function($event) {
  19400. $event.stopPropagation()
  19401. return _vm._input($event)
  19402. }
  19403. ],
  19404. focus: _vm._focus,
  19405. blur: _vm._blur,
  19406. "&touchstart": function($event) {
  19407. return _vm._touchstart($event)
  19408. }
  19409. }
  19410. })
  19411. ])
  19412. ]
  19413. )
  19414. }
  19415. var staticRenderFns = []
  19416. render._withStripped = true
  19417. // CONCATENATED MODULE: ./src/core/view/components/textarea/index.vue?vue&type=template&id=33f82dda&
  19418. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  19419. var mixins = __webpack_require__(2);
  19420. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/textarea/index.vue?vue&type=script&lang=js&
  19421. //
  19422. //
  19423. //
  19424. //
  19425. //
  19426. //
  19427. //
  19428. //
  19429. //
  19430. //
  19431. //
  19432. //
  19433. //
  19434. //
  19435. //
  19436. //
  19437. //
  19438. //
  19439. //
  19440. //
  19441. //
  19442. //
  19443. //
  19444. //
  19445. //
  19446. //
  19447. //
  19448. //
  19449. //
  19450. //
  19451. //
  19452. //
  19453. //
  19454. //
  19455. //
  19456. //
  19457. //
  19458. //
  19459. //
  19460. //
  19461. //
  19462. //
  19463. //
  19464. //
  19465. //
  19466. //
  19467. //
  19468. //
  19469. //
  19470. //
  19471. //
  19472. //
  19473. var DARK_TEST_STRING = '(prefers-color-scheme: dark)';
  19474. /* harmony default export */ var textareavue_type_script_lang_js_ = ({
  19475. name: 'Textarea',
  19476. mixins: [mixins["a" /* emitter */], mixins["c" /* keyboard */]],
  19477. model: {
  19478. prop: 'value',
  19479. event: 'update:value'
  19480. },
  19481. props: {
  19482. name: {
  19483. type: String,
  19484. default: ''
  19485. },
  19486. value: {
  19487. type: [String, Number],
  19488. default: ''
  19489. },
  19490. maxlength: {
  19491. type: [Number, String],
  19492. default: 140
  19493. },
  19494. placeholder: {
  19495. type: String,
  19496. default: ''
  19497. },
  19498. disabled: {
  19499. type: [Boolean, String],
  19500. default: false
  19501. },
  19502. focus: {
  19503. type: [Boolean, String],
  19504. default: false
  19505. },
  19506. autoFocus: {
  19507. type: [Boolean, String],
  19508. default: false
  19509. },
  19510. placeholderClass: {
  19511. type: String,
  19512. default: 'textarea-placeholder'
  19513. },
  19514. placeholderStyle: {
  19515. type: String,
  19516. default: ''
  19517. },
  19518. autoHeight: {
  19519. type: [Boolean, String],
  19520. default: false
  19521. },
  19522. cursor: {
  19523. type: [Number, String],
  19524. default: -1
  19525. },
  19526. selectionStart: {
  19527. type: [Number, String],
  19528. default: -1
  19529. },
  19530. selectionEnd: {
  19531. type: [Number, String],
  19532. default: -1
  19533. }
  19534. },
  19535. data: function data() {
  19536. return {
  19537. valueSync: String(this.value),
  19538. valueComposition: '',
  19539. composition: false,
  19540. focusSync: this.focus,
  19541. height: 0,
  19542. focusChangeSource: '',
  19543. // iOS 13 以下版本需要修正边距
  19544. fixMargin: String(navigator.platform).indexOf('iP') === 0 && String(navigator.vendor).indexOf('Apple') === 0 && window.matchMedia(DARK_TEST_STRING).media !== DARK_TEST_STRING
  19545. };
  19546. },
  19547. computed: {
  19548. maxlengthNumber: function maxlengthNumber() {
  19549. var maxlength = Number(this.maxlength);
  19550. return isNaN(maxlength) ? 140 : maxlength;
  19551. },
  19552. cursorNumber: function cursorNumber() {
  19553. var cursor = Number(this.cursor);
  19554. return isNaN(cursor) ? -1 : cursor;
  19555. },
  19556. selectionStartNumber: function selectionStartNumber() {
  19557. var selectionStart = Number(this.selectionStart);
  19558. return isNaN(selectionStart) ? -1 : selectionStart;
  19559. },
  19560. selectionEndNumber: function selectionEndNumber() {
  19561. var selectionEnd = Number(this.selectionEnd);
  19562. return isNaN(selectionEnd) ? -1 : selectionEnd;
  19563. },
  19564. valueCompute: function valueCompute() {
  19565. return (this.composition ? this.valueComposition : this.valueSync).split('\n');
  19566. }
  19567. },
  19568. watch: {
  19569. value: function value(val) {
  19570. this.valueSync = String(val);
  19571. },
  19572. valueSync: function valueSync(val) {
  19573. if (val !== this._oldValue) {
  19574. this._oldValue = val;
  19575. this.$trigger('input', {}, {
  19576. value: val,
  19577. cursor: this.$refs.textarea.selectionEnd
  19578. });
  19579. this.$emit('update:value', val);
  19580. }
  19581. },
  19582. focus: function focus(val) {
  19583. if (val) {
  19584. this.focusChangeSource = 'focus';
  19585. if (this.$refs.textarea) {
  19586. this.$refs.textarea.focus();
  19587. }
  19588. } else {
  19589. if (this.$refs.textarea) {
  19590. this.$refs.textarea.blur();
  19591. }
  19592. }
  19593. },
  19594. focusSync: function focusSync(val) {
  19595. this.$emit('update:focus', val);
  19596. this._checkSelection();
  19597. this._checkCursor();
  19598. },
  19599. cursorNumber: function cursorNumber() {
  19600. this._checkCursor();
  19601. },
  19602. selectionStartNumber: function selectionStartNumber() {
  19603. this._checkSelection();
  19604. },
  19605. selectionEndNumber: function selectionEndNumber() {
  19606. this._checkSelection();
  19607. },
  19608. height: function height(_height) {
  19609. var lineHeight = parseFloat(getComputedStyle(this.$el).lineHeight);
  19610. if (isNaN(lineHeight)) {
  19611. lineHeight = this.$refs.line.offsetHeight;
  19612. }
  19613. var lineCount = Math.round(_height / lineHeight);
  19614. this.$trigger('linechange', {}, {
  19615. height: _height,
  19616. heightRpx: 750 / window.innerWidth * _height,
  19617. lineCount: lineCount
  19618. });
  19619. if (this.autoHeight) {
  19620. this.$el.style.height = this.height + 'px';
  19621. }
  19622. }
  19623. },
  19624. created: function created() {
  19625. this.$dispatch('Form', 'uni-form-group-update', {
  19626. type: 'add',
  19627. vm: this
  19628. });
  19629. },
  19630. mounted: function mounted() {
  19631. this._oldValue = this.$refs.textarea.value = this.valueSync;
  19632. this._resize({
  19633. height: this.$refs.sensor.$el.offsetHeight
  19634. });
  19635. var $vm = this;
  19636. while ($vm) {
  19637. var scopeId = $vm.$options._scopeId;
  19638. if (scopeId) {
  19639. this.$refs.placeholder.setAttribute(scopeId, '');
  19640. }
  19641. $vm = $vm.$parent;
  19642. }
  19643. this.initKeyboard(this.$refs.textarea);
  19644. },
  19645. beforeDestroy: function beforeDestroy() {
  19646. this.$dispatch('Form', 'uni-form-group-update', {
  19647. type: 'remove',
  19648. vm: this
  19649. });
  19650. },
  19651. methods: {
  19652. _focus: function _focus($event) {
  19653. this.focusSync = true;
  19654. this.$trigger('focus', $event, {
  19655. value: this.valueSync
  19656. });
  19657. },
  19658. _checkSelection: function _checkSelection() {
  19659. if (this.focusSync && !this.focusChangeSource && this.selectionStartNumber > -1 && this.selectionEndNumber > -1) {
  19660. this.$refs.textarea.selectionStart = this.selectionStartNumber;
  19661. this.$refs.textarea.selectionEnd = this.selectionEndNumber;
  19662. }
  19663. },
  19664. _checkCursor: function _checkCursor() {
  19665. if (this.focusSync && (this.focusChangeSource === 'focus' || !this.focusChangeSource && this.selectionStartNumber < 0 && this.selectionEndNumber < 0) && this.cursorNumber > -1) {
  19666. this.$refs.textarea.selectionEnd = this.$refs.textarea.selectionStart = this.cursorNumber;
  19667. }
  19668. },
  19669. _blur: function _blur($event) {
  19670. this.focusSync = false;
  19671. this.$trigger('blur', $event, {
  19672. value: this.valueSync,
  19673. cursor: this.$refs.textarea.selectionEnd
  19674. });
  19675. },
  19676. _compositionstart: function _compositionstart($event) {
  19677. this.composition = true;
  19678. },
  19679. _compositionend: function _compositionend($event) {
  19680. this.composition = false;
  19681. },
  19682. // 暂无完成按钮,此功能未实现
  19683. _confirm: function _confirm($event) {
  19684. this.$trigger('confirm', $event, {
  19685. value: this.valueSync
  19686. });
  19687. },
  19688. _linechange: function _linechange($event) {
  19689. this.$trigger('linechange', $event, {
  19690. value: this.valueSync
  19691. });
  19692. },
  19693. _touchstart: function _touchstart() {
  19694. this.focusChangeSource = 'touch';
  19695. },
  19696. _resize: function _resize(_ref) {
  19697. var height = _ref.height;
  19698. this.height = height;
  19699. },
  19700. _input: function _input($event) {
  19701. if (this.composition) {
  19702. this.valueComposition = $event.target.value;
  19703. }
  19704. },
  19705. _getFormData: function _getFormData() {
  19706. return {
  19707. value: this.valueSync,
  19708. key: this.name
  19709. };
  19710. },
  19711. _resetFormData: function _resetFormData() {
  19712. this.valueSync = '';
  19713. }
  19714. }
  19715. });
  19716. // CONCATENATED MODULE: ./src/core/view/components/textarea/index.vue?vue&type=script&lang=js&
  19717. /* harmony default export */ var components_textareavue_type_script_lang_js_ = (textareavue_type_script_lang_js_);
  19718. // EXTERNAL MODULE: ./src/core/view/components/textarea/index.vue?vue&type=style&index=0&lang=css&
  19719. var textareavue_type_style_index_0_lang_css_ = __webpack_require__(114);
  19720. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  19721. var componentNormalizer = __webpack_require__(0);
  19722. // CONCATENATED MODULE: ./src/core/view/components/textarea/index.vue
  19723. /* normalize component */
  19724. var component = Object(componentNormalizer["a" /* default */])(
  19725. components_textareavue_type_script_lang_js_,
  19726. render,
  19727. staticRenderFns,
  19728. false,
  19729. null,
  19730. null,
  19731. null
  19732. )
  19733. /* hot reload */
  19734. if (false) { var api; }
  19735. component.options.__file = "src/core/view/components/textarea/index.vue"
  19736. /* harmony default export */ var components_textarea = __webpack_exports__["default"] = (component.exports);
  19737. /***/ }),
  19738. /* 143 */
  19739. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19740. "use strict";
  19741. // ESM COMPAT FLAG
  19742. __webpack_require__.r(__webpack_exports__);
  19743. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/view/index.vue?vue&type=template&id=6ae9b1be&
  19744. var render = function() {
  19745. var _vm = this
  19746. var _h = _vm.$createElement
  19747. var _c = _vm._self._c || _h
  19748. return _vm.hoverClass && _vm.hoverClass !== "none"
  19749. ? _c(
  19750. "uni-view",
  19751. _vm._g(
  19752. {
  19753. class: [_vm.hovering ? _vm.hoverClass : ""],
  19754. on: {
  19755. touchstart: _vm._hoverTouchStart,
  19756. touchend: _vm._hoverTouchEnd,
  19757. touchcancel: _vm._hoverTouchCancel
  19758. }
  19759. },
  19760. _vm.$listeners
  19761. ),
  19762. [_vm._t("default")],
  19763. 2
  19764. )
  19765. : _c("uni-view", _vm._g({}, _vm.$listeners), [_vm._t("default")], 2)
  19766. }
  19767. var staticRenderFns = []
  19768. render._withStripped = true
  19769. // CONCATENATED MODULE: ./src/core/view/components/view/index.vue?vue&type=template&id=6ae9b1be&
  19770. // EXTERNAL MODULE: ./src/core/view/mixins/hover.js
  19771. var hover = __webpack_require__(17);
  19772. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/view/index.vue?vue&type=script&lang=js&
  19773. //
  19774. //
  19775. //
  19776. //
  19777. //
  19778. //
  19779. //
  19780. //
  19781. //
  19782. //
  19783. //
  19784. //
  19785. //
  19786. //
  19787. //
  19788. //
  19789. //
  19790. //
  19791. //
  19792. //
  19793. //
  19794. //
  19795. //
  19796. //
  19797. //
  19798. //
  19799. //
  19800. //
  19801. /* harmony default export */ var viewvue_type_script_lang_js_ = ({
  19802. name: 'View',
  19803. mixins: [hover["a" /* default */]],
  19804. listeners: {
  19805. 'label-click': 'clickHandler'
  19806. }
  19807. });
  19808. // CONCATENATED MODULE: ./src/core/view/components/view/index.vue?vue&type=script&lang=js&
  19809. /* harmony default export */ var components_viewvue_type_script_lang_js_ = (viewvue_type_script_lang_js_);
  19810. // EXTERNAL MODULE: ./src/core/view/components/view/index.vue?vue&type=style&index=0&lang=css&
  19811. var viewvue_type_style_index_0_lang_css_ = __webpack_require__(115);
  19812. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  19813. var componentNormalizer = __webpack_require__(0);
  19814. // CONCATENATED MODULE: ./src/core/view/components/view/index.vue
  19815. /* normalize component */
  19816. var component = Object(componentNormalizer["a" /* default */])(
  19817. components_viewvue_type_script_lang_js_,
  19818. render,
  19819. staticRenderFns,
  19820. false,
  19821. null,
  19822. null,
  19823. null
  19824. )
  19825. /* hot reload */
  19826. if (false) { var api; }
  19827. component.options.__file = "src/core/view/components/view/index.vue"
  19828. /* harmony default export */ var view = __webpack_exports__["default"] = (component.exports);
  19829. /***/ }),
  19830. /* 144 */
  19831. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19832. "use strict";
  19833. // ESM COMPAT FLAG
  19834. __webpack_require__.r(__webpack_exports__);
  19835. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/ad/index.vue?vue&type=template&id=4d0d75c6&
  19836. var render = function() {
  19837. var _vm = this
  19838. var _h = _vm.$createElement
  19839. var _c = _vm._self._c || _h
  19840. return _c(
  19841. "uni-ad",
  19842. _vm._g(_vm._b({}, "uni-ad", _vm.attrs, false), _vm.$listeners),
  19843. [_c("div", { ref: "container", staticClass: "uni-ad-container" })]
  19844. )
  19845. }
  19846. var staticRenderFns = []
  19847. render._withStripped = true
  19848. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/ad/index.vue?vue&type=template&id=4d0d75c6&
  19849. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  19850. var mixins = __webpack_require__(2);
  19851. // EXTERNAL MODULE: ./src/platforms/app-plus/view/mixins/native.js
  19852. var mixins_native = __webpack_require__(7);
  19853. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/ad/index.vue?vue&type=script&lang=js&
  19854. //
  19855. //
  19856. //
  19857. //
  19858. //
  19859. //
  19860. //
  19861. //
  19862. //
  19863. //
  19864. //
  19865. var _adDataCache = {};
  19866. function getAdData(adpid, adWidth, onsuccess, onerror) {
  19867. var key = adpid + '-' + adWidth;
  19868. var adDataList = _adDataCache[key];
  19869. if (adDataList && adDataList.length > 0) {
  19870. onsuccess(adDataList.splice(0, 1)[0]);
  19871. return;
  19872. }
  19873. plus.ad.getAds({
  19874. adpid: adpid,
  19875. count: 10,
  19876. width: adWidth
  19877. }, function (res) {
  19878. var list = res.ads;
  19879. onsuccess(list.splice(0, 1)[0]);
  19880. _adDataCache[key] = adDataList ? adDataList.concat(list) : list;
  19881. }, function (err) {
  19882. onerror({
  19883. errCode: err.code,
  19884. errMsg: err.message
  19885. });
  19886. });
  19887. }
  19888. var methods = ['draw'];
  19889. var _attrs = ['adpid', 'data'];
  19890. /* harmony default export */ var advue_type_script_lang_js_ = ({
  19891. name: 'Ad',
  19892. mixins: [mixins["e" /* subscriber */], mixins_native["a" /* default */]],
  19893. props: {
  19894. adpid: {
  19895. type: [Number, String],
  19896. default: ''
  19897. },
  19898. data: {
  19899. type: Object,
  19900. default: null
  19901. }
  19902. },
  19903. data: function data() {
  19904. return {
  19905. hidden: false
  19906. };
  19907. },
  19908. computed: {
  19909. attrs: function attrs() {
  19910. var _this = this;
  19911. var obj = {};
  19912. _attrs.forEach(function (key) {
  19913. var val = _this.$props[key];
  19914. val = key === 'src' ? _this.$getRealPath(val) : val;
  19915. obj[key.replace(/[A-Z]/g, function (str) {
  19916. return '-' + str.toLowerCase();
  19917. })] = val;
  19918. });
  19919. return obj;
  19920. }
  19921. },
  19922. watch: {
  19923. hidden: function hidden(val) {
  19924. this.adView && this.adView[val ? 'hide' : 'show']();
  19925. },
  19926. adpid: function adpid(val) {
  19927. if (val) {
  19928. this._loadData(val);
  19929. }
  19930. },
  19931. data: function data(val) {
  19932. if (val) {
  19933. this._fillData(val);
  19934. }
  19935. }
  19936. },
  19937. mounted: function mounted() {
  19938. var _this2 = this;
  19939. var adStyle = Object.assign({
  19940. id: 'AdView' + Date.now()
  19941. }, this.position);
  19942. var adView = this.adView = plus.ad.createAdView(adStyle);
  19943. adView.interceptTouchEvent(false);
  19944. plus.webview.currentWebview().append(adView);
  19945. if (this.hidden) {
  19946. adView.hide();
  19947. }
  19948. this.$watch('attrs', function () {
  19949. _this2._request();
  19950. }, {
  19951. deep: true
  19952. });
  19953. this.$watch('position', function () {
  19954. _this2.adView && _this2.adView.setStyle(_this2.position);
  19955. }, {
  19956. deep: true
  19957. }); // 模板渲染有效
  19958. adView.setDislikeListener && adView.setDislikeListener(function (data) {
  19959. _this2.adView && _this2.adView.close();
  19960. _this2.$refs.container.style.height = '0px';
  19961. _this2._updateView();
  19962. _this2.$trigger('close', {}, data);
  19963. });
  19964. adView.setRenderingListener && adView.setRenderingListener(function (data) {
  19965. if (data.result === 0) {
  19966. _this2.$refs.container.style.height = data.height + 'px';
  19967. _this2._updateView();
  19968. } else {
  19969. _this2.$trigger('error', {}, {
  19970. errCode: data.result
  19971. });
  19972. }
  19973. }); // 仅 Android 下载类广告
  19974. adView.setDownloadListener && adView.setDownloadListener(function (data) {
  19975. _this2.$trigger('downloadchange', {}, data);
  19976. });
  19977. this._request();
  19978. },
  19979. beforeDestroy: function beforeDestroy() {
  19980. this.adView && this.adView.close();
  19981. delete this.adView;
  19982. },
  19983. methods: {
  19984. _handleSubscribe: function _handleSubscribe(_ref) {
  19985. var type = _ref.type,
  19986. _ref$data = _ref.data,
  19987. data = _ref$data === void 0 ? {} : _ref$data;
  19988. if (methods.includes(type)) {
  19989. this.adView && this.adView[type](data);
  19990. }
  19991. },
  19992. _request: function _request() {
  19993. if (!this.adView) {
  19994. return;
  19995. }
  19996. if (this.data) {
  19997. this._fillData(this.data);
  19998. } else if (this.adpid) {
  19999. this._loadData();
  20000. }
  20001. },
  20002. _loadData: function _loadData(adpid) {
  20003. var _this3 = this;
  20004. getAdData(adpid || this.adpid, this.position.width, function (data) {
  20005. _this3._fillData(data);
  20006. }, function (err) {
  20007. _this3.$trigger('error', {}, err);
  20008. });
  20009. },
  20010. _fillData: function _fillData(data) {
  20011. this.adView.renderingBind(data); // const height = plus.ad.measureAdHeight(this.position.width.replace('px', ''), data)
  20012. // this.$refs.container.style.height = height + 'px'
  20013. this.$trigger('load', {}, {});
  20014. },
  20015. _updateView: function _updateView() {
  20016. window.dispatchEvent(new CustomEvent('updateview'));
  20017. }
  20018. }
  20019. });
  20020. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/ad/index.vue?vue&type=script&lang=js&
  20021. /* harmony default export */ var components_advue_type_script_lang_js_ = (advue_type_script_lang_js_);
  20022. // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/ad/index.vue?vue&type=style&index=0&lang=css&
  20023. var advue_type_style_index_0_lang_css_ = __webpack_require__(117);
  20024. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  20025. var componentNormalizer = __webpack_require__(0);
  20026. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/ad/index.vue
  20027. /* normalize component */
  20028. var component = Object(componentNormalizer["a" /* default */])(
  20029. components_advue_type_script_lang_js_,
  20030. render,
  20031. staticRenderFns,
  20032. false,
  20033. null,
  20034. null,
  20035. null
  20036. )
  20037. /* hot reload */
  20038. if (false) { var api; }
  20039. component.options.__file = "src/platforms/app-plus/view/components/ad/index.vue"
  20040. /* harmony default export */ var ad = __webpack_exports__["default"] = (component.exports);
  20041. /***/ }),
  20042. /* 145 */
  20043. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  20044. "use strict";
  20045. // ESM COMPAT FLAG
  20046. __webpack_require__.r(__webpack_exports__);
  20047. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/picker/index.vue?vue&type=template&id=0268771e&
  20048. var render = function() {
  20049. var _vm = this
  20050. var _h = _vm.$createElement
  20051. var _c = _vm._self._c || _h
  20052. return _c(
  20053. "uni-picker",
  20054. _vm._g(
  20055. {
  20056. on: {
  20057. click: function($event) {
  20058. $event.stopPropagation()
  20059. return _vm._show($event)
  20060. }
  20061. }
  20062. },
  20063. _vm.$listeners
  20064. ),
  20065. [_vm._t("default")],
  20066. 2
  20067. )
  20068. }
  20069. var staticRenderFns = []
  20070. render._withStripped = true
  20071. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/picker/index.vue?vue&type=template&id=0268771e&
  20072. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  20073. var mixins = __webpack_require__(2);
  20074. // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/picker/page.js
  20075. var page = __webpack_require__(82);
  20076. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/picker/index.vue?vue&type=script&lang=js&
  20077. //
  20078. //
  20079. //
  20080. //
  20081. //
  20082. //
  20083. //
  20084. //
  20085. //
  20086. var mode = {
  20087. SELECTOR: 'selector',
  20088. MULTISELECTOR: 'multiSelector',
  20089. TIME: 'time',
  20090. DATE: 'date' // 暂不支持城市选择
  20091. // REGION: 'region'
  20092. };
  20093. var fields = {
  20094. YEAR: 'year',
  20095. MONTH: 'month',
  20096. DAY: 'day'
  20097. };
  20098. function padLeft(num) {
  20099. return num > 9 ? num : "0".concat(num);
  20100. }
  20101. function getDate(str, mode_) {
  20102. str = String(str || '');
  20103. var date = new Date();
  20104. if (mode_ === mode.TIME) {
  20105. str = str.split(':');
  20106. if (str.length === 2) {
  20107. date.setHours(parseInt(str[0]), parseInt(str[1]));
  20108. }
  20109. } else {
  20110. str = str.split('-');
  20111. if (str.length === 3) {
  20112. date.setFullYear(parseInt(str[0]), parseInt(str[1] - 1), parseInt(str[2]));
  20113. }
  20114. }
  20115. return date;
  20116. }
  20117. function getDefaultStartValue() {
  20118. if (this.mode === mode.TIME) {
  20119. return '00:00';
  20120. }
  20121. if (this.mode === mode.DATE) {
  20122. var year = new Date().getFullYear() - 100;
  20123. switch (this.fields) {
  20124. case fields.YEAR:
  20125. return year;
  20126. case fields.MONTH:
  20127. return year + '-01';
  20128. case fields.DAY:
  20129. return year + '-01-01';
  20130. }
  20131. }
  20132. return '';
  20133. }
  20134. function getDefaultEndValue() {
  20135. if (this.mode === mode.TIME) {
  20136. return '23:59';
  20137. }
  20138. if (this.mode === mode.DATE) {
  20139. var year = new Date().getFullYear() + 100;
  20140. switch (this.fields) {
  20141. case fields.YEAR:
  20142. return year;
  20143. case fields.MONTH:
  20144. return year + '-12';
  20145. case fields.DAY:
  20146. return year + '-12-31';
  20147. }
  20148. }
  20149. return '';
  20150. }
  20151. /* harmony default export */ var pickervue_type_script_lang_js_ = ({
  20152. name: 'Picker',
  20153. mixins: [mixins["a" /* emitter */]],
  20154. props: {
  20155. name: {
  20156. type: String,
  20157. default: ''
  20158. },
  20159. range: {
  20160. type: Array,
  20161. default: function _default() {
  20162. return [];
  20163. }
  20164. },
  20165. rangeKey: {
  20166. type: String,
  20167. default: ''
  20168. },
  20169. value: {
  20170. type: [Number, String, Array],
  20171. default: 0
  20172. },
  20173. mode: {
  20174. type: String,
  20175. default: mode.SELECTOR,
  20176. validator: function validator(val) {
  20177. return Object.values(mode).indexOf(val) >= 0;
  20178. }
  20179. },
  20180. fields: {
  20181. type: String,
  20182. default: ''
  20183. },
  20184. start: {
  20185. type: String,
  20186. default: getDefaultStartValue
  20187. },
  20188. end: {
  20189. type: String,
  20190. default: getDefaultEndValue
  20191. },
  20192. disabled: {
  20193. type: [Boolean, String],
  20194. default: false
  20195. }
  20196. },
  20197. data: function data() {
  20198. return {
  20199. valueSync: null
  20200. };
  20201. },
  20202. watch: {
  20203. value: function value() {
  20204. this._setValueSync();
  20205. }
  20206. },
  20207. created: function created() {
  20208. var _this = this;
  20209. this.$dispatch('Form', 'uni-form-group-update', {
  20210. type: 'add',
  20211. vm: this
  20212. });
  20213. Object.keys(this.$props).forEach(function (key) {
  20214. if (key !== 'name') {
  20215. _this.$watch(key, function (val) {
  20216. var data = {};
  20217. data[key] = val;
  20218. _this._updatePicker(data);
  20219. });
  20220. }
  20221. });
  20222. this._setValueSync();
  20223. },
  20224. beforeDestroy: function beforeDestroy() {
  20225. this.$dispatch('Form', 'uni-form-group-update', {
  20226. type: 'remove',
  20227. vm: this
  20228. });
  20229. },
  20230. methods: {
  20231. _setValueSync: function _setValueSync() {
  20232. var val = this.value;
  20233. switch (this.mode) {
  20234. case mode.MULTISELECTOR:
  20235. {
  20236. if (!Array.isArray(val)) {
  20237. val = [];
  20238. }
  20239. if (!Array.isArray(this.valueSync)) {
  20240. this.valueSync = [];
  20241. }
  20242. var length = this.valueSync.length = Math.max(val.length, this.range.length);
  20243. for (var index = 0; index < length; index++) {
  20244. var val0 = Number(val[index]);
  20245. var val1 = Number(this.valueSync[index]);
  20246. this.valueSync.splice(index, 1, isNaN(val0) ? isNaN(val1) ? 0 : val1 : val0);
  20247. }
  20248. }
  20249. break;
  20250. case mode.TIME:
  20251. case mode.DATE:
  20252. this.valueSync = String(val);
  20253. break;
  20254. default:
  20255. this.valueSync = Number(val) || 0;
  20256. break;
  20257. }
  20258. },
  20259. _show: function _show() {
  20260. if (this.disabled) {
  20261. return;
  20262. }
  20263. this._showPicker(Object.assign({}, this.$props));
  20264. },
  20265. _showPicker: function _showPicker(data) {
  20266. var _this2 = this;
  20267. if ((data.mode === mode.TIME || data.mode === mode.DATE) && !data.fields) {
  20268. plus.nativeUI[this.mode === mode.TIME ? 'pickTime' : 'pickDate'](function (res) {
  20269. var date = res.date;
  20270. _this2.$trigger('change', {}, {
  20271. value: _this2.mode === mode.TIME ? "".concat(padLeft(date.getHours()), ":").concat(padLeft(date.getMinutes())) : "".concat(date.getFullYear(), "-").concat(padLeft(date.getMonth() + 1), "-").concat(padLeft(date.getDate()))
  20272. });
  20273. }, function () {
  20274. _this2.$trigger('cancel', {}, {});
  20275. }, this.mode === mode.TIME ? {
  20276. time: getDate(this.value, mode.TIME)
  20277. } : {
  20278. date: getDate(this.value, mode.DATE),
  20279. minDate: getDate(this.start, mode.DATE),
  20280. maxDate: getDate(this.end, mode.DATE)
  20281. });
  20282. } else {
  20283. data.fields = Object.values(fields).includes(data.fields) ? data.fields : fields.DAY;
  20284. var res = {
  20285. event: 'cancel'
  20286. };
  20287. this.page = Object(page["a" /* showPage */])({
  20288. url: '__uniapppicker',
  20289. data: data,
  20290. style: {
  20291. titleNView: false,
  20292. animationType: 'none',
  20293. animationDuration: 0,
  20294. background: 'rgba(0,0,0,0)',
  20295. popGesture: 'none'
  20296. },
  20297. onMessage: function onMessage(message) {
  20298. var event = message.event;
  20299. if (event === 'created') {
  20300. _this2._updatePicker(data);
  20301. return;
  20302. }
  20303. if (event === 'columnchange') {
  20304. delete message.event;
  20305. _this2.$trigger(event, {}, message);
  20306. return;
  20307. }
  20308. res = message;
  20309. },
  20310. onClose: function onClose() {
  20311. _this2.page = null;
  20312. var event = res.event;
  20313. delete res.event;
  20314. _this2.$trigger(event, {}, res);
  20315. }
  20316. });
  20317. }
  20318. },
  20319. _getFormData: function _getFormData() {
  20320. return {
  20321. value: this.valueSync,
  20322. key: this.name
  20323. };
  20324. },
  20325. _resetFormData: function _resetFormData() {
  20326. switch (this.mode) {
  20327. case mode.SELECTOR:
  20328. this.valueSync = -1;
  20329. break;
  20330. case mode.MULTISELECTOR:
  20331. this.valueSync = this.value.map(function (val) {
  20332. return 0;
  20333. });
  20334. break;
  20335. case mode.DATE:
  20336. case mode.TIME:
  20337. this.valueSync = '';
  20338. break;
  20339. default:
  20340. break;
  20341. }
  20342. },
  20343. _updatePicker: function _updatePicker(data) {
  20344. this.page && this.page.sendMessage(data);
  20345. }
  20346. }
  20347. });
  20348. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/picker/index.vue?vue&type=script&lang=js&
  20349. /* harmony default export */ var components_pickervue_type_script_lang_js_ = (pickervue_type_script_lang_js_);
  20350. // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/picker/index.vue?vue&type=style&index=0&lang=css&
  20351. var pickervue_type_style_index_0_lang_css_ = __webpack_require__(122);
  20352. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  20353. var componentNormalizer = __webpack_require__(0);
  20354. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/picker/index.vue
  20355. /* normalize component */
  20356. var component = Object(componentNormalizer["a" /* default */])(
  20357. components_pickervue_type_script_lang_js_,
  20358. render,
  20359. staticRenderFns,
  20360. false,
  20361. null,
  20362. null,
  20363. null
  20364. )
  20365. /* hot reload */
  20366. if (false) { var api; }
  20367. component.options.__file = "src/platforms/app-plus/view/components/picker/index.vue"
  20368. /* harmony default export */ var picker = __webpack_exports__["default"] = (component.exports);
  20369. /***/ }),
  20370. /* 146 */
  20371. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  20372. "use strict";
  20373. // ESM COMPAT FLAG
  20374. __webpack_require__.r(__webpack_exports__);
  20375. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/video/index.vue?vue&type=template&id=0ba2468e&
  20376. var render = function() {
  20377. var _vm = this
  20378. var _h = _vm.$createElement
  20379. var _c = _vm._self._c || _h
  20380. return _c("uni-video", _vm._g({}, _vm.$listeners), [
  20381. _c("div", { ref: "container", staticClass: "uni-video-container" }),
  20382. _c("div", { staticClass: "uni-video-slot" }, [_vm._t("default")], 2)
  20383. ])
  20384. }
  20385. var staticRenderFns = []
  20386. render._withStripped = true
  20387. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/video/index.vue?vue&type=template&id=0ba2468e&
  20388. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  20389. var mixins = __webpack_require__(2);
  20390. // EXTERNAL MODULE: ./src/platforms/app-plus/view/mixins/native.js
  20391. var mixins_native = __webpack_require__(7);
  20392. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/video/index.vue?vue&type=script&lang=js&
  20393. function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  20394. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  20395. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  20396. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  20397. //
  20398. //
  20399. //
  20400. //
  20401. //
  20402. //
  20403. //
  20404. //
  20405. //
  20406. //
  20407. //
  20408. var methods = ['play', 'pause', 'seek', 'sendDanmu', 'playbackRate', 'requestFullScreen', 'exitFullScreen'];
  20409. var events = ['play', 'pause', 'ended', 'timeupdate', 'fullscreenchange', 'fullscreenclick', 'waiting', 'error'];
  20410. var _attrs = ['src', 'duration', 'controls', 'danmuList', 'danmuBtn', 'enableDanmu', 'autoplay', 'loop', 'muted', 'objectFit', 'poster', 'direction', 'showProgress', 'initialTime', 'showFullscreenBtn', 'pageGesture', 'enableProgressGesture', 'showPlayBtn', 'showCenterPlayBtn'];
  20411. /* harmony default export */ var videovue_type_script_lang_js_ = ({
  20412. name: 'Video',
  20413. mixins: [mixins["e" /* subscriber */], mixins_native["a" /* default */]],
  20414. props: {
  20415. id: {
  20416. type: String,
  20417. default: ''
  20418. },
  20419. src: {
  20420. type: String,
  20421. default: ''
  20422. },
  20423. duration: {
  20424. type: [Number, String],
  20425. default: ''
  20426. },
  20427. controls: {
  20428. type: [Boolean, String],
  20429. default: true
  20430. },
  20431. danmuList: {
  20432. type: Array,
  20433. default: function _default() {
  20434. return [];
  20435. }
  20436. },
  20437. danmuBtn: {
  20438. type: [Boolean, String],
  20439. default: false
  20440. },
  20441. enableDanmu: {
  20442. type: [Boolean, String],
  20443. default: false
  20444. },
  20445. autoplay: {
  20446. type: [Boolean, String],
  20447. default: false
  20448. },
  20449. loop: {
  20450. type: [Boolean, String],
  20451. default: false
  20452. },
  20453. muted: {
  20454. type: [Boolean, String],
  20455. default: false
  20456. },
  20457. objectFit: {
  20458. type: String,
  20459. default: 'contain'
  20460. },
  20461. poster: {
  20462. type: String,
  20463. default: ''
  20464. },
  20465. direction: {
  20466. type: [String, Number],
  20467. default: ''
  20468. },
  20469. showProgress: {
  20470. type: Boolean,
  20471. default: true
  20472. },
  20473. initialTime: {
  20474. type: [String, Number],
  20475. default: 0
  20476. },
  20477. showFullscreenBtn: {
  20478. type: [Boolean, String],
  20479. default: true
  20480. },
  20481. pageGesture: {
  20482. type: [Boolean, String],
  20483. default: false
  20484. },
  20485. enableProgressGesture: {
  20486. type: [Boolean, String],
  20487. default: true
  20488. },
  20489. showPlayBtn: {
  20490. type: [Boolean, String],
  20491. default: true
  20492. },
  20493. showCenterPlayBtn: {
  20494. type: [Boolean, String],
  20495. default: true
  20496. }
  20497. },
  20498. computed: {
  20499. attrs: function attrs() {
  20500. var _this = this;
  20501. var obj = {};
  20502. _attrs.forEach(function (key) {
  20503. var val = _this.$props[key];
  20504. val = key === 'src' ? _this.$getRealPath(val) : val;
  20505. obj[key.replace(/[A-Z]/g, function (str) {
  20506. return '-' + str.toLowerCase();
  20507. })] = val;
  20508. });
  20509. return obj;
  20510. }
  20511. },
  20512. mounted: function mounted() {
  20513. var _this2 = this;
  20514. var video = this.video = plus.video.createVideoPlayer('video' + Date.now(), Object.assign({}, this.attrs, this.position));
  20515. plus.webview.currentWebview().append(video);
  20516. if (this.hidden) {
  20517. video.hide();
  20518. }
  20519. this.$watch('attrs', function () {
  20520. _this2.video && _this2.video.setStyles(_this2.attrs);
  20521. }, {
  20522. deep: true
  20523. });
  20524. this.$watch('position', function () {
  20525. _this2.video && _this2.video.setStyles(_this2.position);
  20526. }, {
  20527. deep: true
  20528. });
  20529. this.$watch('hidden', function (val) {
  20530. var video = _this2.video;
  20531. if (video) {
  20532. video[val ? 'hide' : 'show'](); // iOS 隐藏状态设置 setStyles 不生效
  20533. if (!val) {
  20534. video.setStyles(_this2.position);
  20535. }
  20536. }
  20537. });
  20538. events.forEach(function (key) {
  20539. video.addEventListener(key, function (e) {
  20540. _this2.$trigger(key, {}, _objectSpread({}, e.detail));
  20541. });
  20542. });
  20543. },
  20544. beforeDestroy: function beforeDestroy() {
  20545. this.video && this.video.close();
  20546. delete this.video;
  20547. },
  20548. methods: {
  20549. _handleSubscribe: function _handleSubscribe(_ref) {
  20550. var type = _ref.type,
  20551. _ref$data = _ref.data,
  20552. data = _ref$data === void 0 ? {} : _ref$data;
  20553. if (methods.includes(type)) {
  20554. if (_typeof(data) === 'object') {
  20555. switch (type) {
  20556. case 'seek':
  20557. data = data.position;
  20558. break;
  20559. case 'playbackRate':
  20560. data = data.rate;
  20561. break;
  20562. case 'requestFullScreen':
  20563. data = data.direction;
  20564. break;
  20565. }
  20566. }
  20567. this.video && this.video[type](data);
  20568. }
  20569. }
  20570. }
  20571. });
  20572. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/video/index.vue?vue&type=script&lang=js&
  20573. /* harmony default export */ var components_videovue_type_script_lang_js_ = (videovue_type_script_lang_js_);
  20574. // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/video/index.vue?vue&type=style&index=0&lang=css&
  20575. var videovue_type_style_index_0_lang_css_ = __webpack_require__(123);
  20576. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  20577. var componentNormalizer = __webpack_require__(0);
  20578. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/video/index.vue
  20579. /* normalize component */
  20580. var component = Object(componentNormalizer["a" /* default */])(
  20581. components_videovue_type_script_lang_js_,
  20582. render,
  20583. staticRenderFns,
  20584. false,
  20585. null,
  20586. null,
  20587. null
  20588. )
  20589. /* hot reload */
  20590. if (false) { var api; }
  20591. component.options.__file = "src/platforms/app-plus/view/components/video/index.vue"
  20592. /* harmony default export */ var video = __webpack_exports__["default"] = (component.exports);
  20593. /***/ }),
  20594. /* 147 */
  20595. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  20596. "use strict";
  20597. // ESM COMPAT FLAG
  20598. __webpack_require__.r(__webpack_exports__);
  20599. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/canvas/index.vue?vue&type=template&id=6ef05d9e&
  20600. var render = function() {
  20601. var _vm = this
  20602. var _h = _vm.$createElement
  20603. var _c = _vm._self._c || _h
  20604. return _c(
  20605. "uni-canvas",
  20606. _vm._g(
  20607. {
  20608. attrs: {
  20609. "canvas-id": _vm.canvasId,
  20610. "disable-scroll": _vm.disableScroll
  20611. }
  20612. },
  20613. _vm._listeners
  20614. ),
  20615. [
  20616. _c("canvas", { ref: "canvas", attrs: { width: "300", height: "150" } }),
  20617. _c(
  20618. "div",
  20619. {
  20620. staticStyle: {
  20621. position: "absolute",
  20622. top: "0",
  20623. left: "0",
  20624. width: "100%",
  20625. height: "100%",
  20626. overflow: "hidden"
  20627. }
  20628. },
  20629. [_vm._t("default")],
  20630. 2
  20631. ),
  20632. _c("v-uni-resize-sensor", { ref: "sensor", on: { resize: _vm._resize } })
  20633. ],
  20634. 1
  20635. )
  20636. }
  20637. var staticRenderFns = []
  20638. render._withStripped = true
  20639. // CONCATENATED MODULE: ./src/core/view/components/canvas/index.vue?vue&type=template&id=6ef05d9e&
  20640. // EXTERNAL MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/canvas/index.vue?vue&type=script&lang=js&
  20641. var canvasvue_type_script_lang_js_ = __webpack_require__(19);
  20642. // CONCATENATED MODULE: ./src/core/view/components/canvas/index.vue?vue&type=script&lang=js&
  20643. /* harmony default export */ var components_canvasvue_type_script_lang_js_ = (canvasvue_type_script_lang_js_["a" /* default */]);
  20644. // EXTERNAL MODULE: ./src/core/view/components/canvas/index.vue?vue&type=style&index=0&lang=css&
  20645. var canvasvue_type_style_index_0_lang_css_ = __webpack_require__(91);
  20646. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  20647. var componentNormalizer = __webpack_require__(0);
  20648. // CONCATENATED MODULE: ./src/core/view/components/canvas/index.vue
  20649. /* normalize component */
  20650. var component = Object(componentNormalizer["a" /* default */])(
  20651. components_canvasvue_type_script_lang_js_,
  20652. render,
  20653. staticRenderFns,
  20654. false,
  20655. null,
  20656. null,
  20657. null
  20658. )
  20659. /* hot reload */
  20660. if (false) { var api; }
  20661. component.options.__file = "src/core/view/components/canvas/index.vue"
  20662. /* harmony default export */ var canvas = __webpack_exports__["default"] = (component.exports);
  20663. /***/ }),
  20664. /* 148 */
  20665. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  20666. "use strict";
  20667. // ESM COMPAT FLAG
  20668. __webpack_require__.r(__webpack_exports__);
  20669. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/editor/index.vue?vue&type=template&id=29b52706&
  20670. var render = function() {
  20671. var _vm = this
  20672. var _h = _vm.$createElement
  20673. var _c = _vm._self._c || _h
  20674. return _c(
  20675. "uni-editor",
  20676. _vm._g(
  20677. { staticClass: "ql-container", attrs: { id: _vm.id } },
  20678. _vm.$listeners
  20679. )
  20680. )
  20681. }
  20682. var staticRenderFns = []
  20683. render._withStripped = true
  20684. // CONCATENATED MODULE: ./src/core/view/components/editor/index.vue?vue&type=template&id=29b52706&
  20685. // EXTERNAL MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/editor/index.vue?vue&type=script&lang=js&
  20686. var editorvue_type_script_lang_js_ = __webpack_require__(23);
  20687. // CONCATENATED MODULE: ./src/core/view/components/editor/index.vue?vue&type=script&lang=js&
  20688. /* harmony default export */ var components_editorvue_type_script_lang_js_ = (editorvue_type_script_lang_js_["a" /* default */]);
  20689. // EXTERNAL MODULE: ./src/core/view/components/editor/editor.css?vue&type=style&index=0&lang=css&
  20690. var editorvue_type_style_index_0_lang_css_ = __webpack_require__(94);
  20691. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  20692. var componentNormalizer = __webpack_require__(0);
  20693. // CONCATENATED MODULE: ./src/core/view/components/editor/index.vue
  20694. /* normalize component */
  20695. var component = Object(componentNormalizer["a" /* default */])(
  20696. components_editorvue_type_script_lang_js_,
  20697. render,
  20698. staticRenderFns,
  20699. false,
  20700. null,
  20701. null,
  20702. null
  20703. )
  20704. /* hot reload */
  20705. if (false) { var api; }
  20706. component.options.__file = "src/core/view/components/editor/index.vue"
  20707. /* harmony default export */ var editor = __webpack_exports__["default"] = (component.exports);
  20708. /***/ }),
  20709. /* 149 */
  20710. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  20711. "use strict";
  20712. // ESM COMPAT FLAG
  20713. __webpack_require__.r(__webpack_exports__);
  20714. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/label/index.vue?vue&type=template&id=04b5b291&
  20715. var render = function() {
  20716. var _vm = this
  20717. var _h = _vm.$createElement
  20718. var _c = _vm._self._c || _h
  20719. return _c(
  20720. "uni-label",
  20721. _vm._g(
  20722. {
  20723. class: { "uni-label-pointer": _vm.pointer },
  20724. on: { click: _vm._onClick }
  20725. },
  20726. _vm.$listeners
  20727. ),
  20728. [_vm._t("default")],
  20729. 2
  20730. )
  20731. }
  20732. var staticRenderFns = []
  20733. render._withStripped = true
  20734. // CONCATENATED MODULE: ./src/core/view/components/label/index.vue?vue&type=template&id=04b5b291&
  20735. // EXTERNAL MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/label/index.vue?vue&type=script&lang=js&
  20736. var labelvue_type_script_lang_js_ = __webpack_require__(28);
  20737. // CONCATENATED MODULE: ./src/core/view/components/label/index.vue?vue&type=script&lang=js&
  20738. /* harmony default export */ var components_labelvue_type_script_lang_js_ = (labelvue_type_script_lang_js_["a" /* default */]);
  20739. // EXTERNAL MODULE: ./src/core/view/components/label/index.vue?vue&type=style&index=0&lang=css&
  20740. var labelvue_type_style_index_0_lang_css_ = __webpack_require__(98);
  20741. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  20742. var componentNormalizer = __webpack_require__(0);
  20743. // CONCATENATED MODULE: ./src/core/view/components/label/index.vue
  20744. /* normalize component */
  20745. var component = Object(componentNormalizer["a" /* default */])(
  20746. components_labelvue_type_script_lang_js_,
  20747. render,
  20748. staticRenderFns,
  20749. false,
  20750. null,
  20751. null,
  20752. null
  20753. )
  20754. /* hot reload */
  20755. if (false) { var api; }
  20756. component.options.__file = "src/core/view/components/label/index.vue"
  20757. /* harmony default export */ var label = __webpack_exports__["default"] = (component.exports);
  20758. /***/ }),
  20759. /* 150 */
  20760. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  20761. "use strict";
  20762. // ESM COMPAT FLAG
  20763. __webpack_require__.r(__webpack_exports__);
  20764. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/map/index.vue?vue&type=template&id=8d987fa2&
  20765. var render = function() {
  20766. var _vm = this
  20767. var _h = _vm.$createElement
  20768. var _c = _vm._self._c || _h
  20769. return _c(
  20770. "uni-map",
  20771. _vm._g({}, _vm.$listeners),
  20772. [
  20773. _c("div", { ref: "container", staticClass: "uni-map-container" }),
  20774. _vm._l(_vm.mapControls, function(control, index) {
  20775. return _c("v-uni-cover-image", {
  20776. key: index,
  20777. style: control.position,
  20778. attrs: { src: control.iconPath, "auto-size": "" },
  20779. on: {
  20780. click: function($event) {
  20781. return _vm.controlclick(control)
  20782. }
  20783. }
  20784. })
  20785. }),
  20786. _c("div", { staticClass: "uni-map-slot" }, [_vm._t("default")], 2)
  20787. ],
  20788. 2
  20789. )
  20790. }
  20791. var staticRenderFns = []
  20792. render._withStripped = true
  20793. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/map/index.vue?vue&type=template&id=8d987fa2&
  20794. // EXTERNAL MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/map/index.vue?vue&type=script&lang=js&
  20795. var mapvue_type_script_lang_js_ = __webpack_require__(50);
  20796. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/map/index.vue?vue&type=script&lang=js&
  20797. /* harmony default export */ var components_mapvue_type_script_lang_js_ = (mapvue_type_script_lang_js_["a" /* default */]);
  20798. // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/map/index.vue?vue&type=style&index=0&lang=css&
  20799. var mapvue_type_style_index_0_lang_css_ = __webpack_require__(120);
  20800. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  20801. var componentNormalizer = __webpack_require__(0);
  20802. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/map/index.vue
  20803. /* normalize component */
  20804. var component = Object(componentNormalizer["a" /* default */])(
  20805. components_mapvue_type_script_lang_js_,
  20806. render,
  20807. staticRenderFns,
  20808. false,
  20809. null,
  20810. null,
  20811. null
  20812. )
  20813. /* hot reload */
  20814. if (false) { var api; }
  20815. component.options.__file = "src/platforms/app-plus/view/components/map/index.vue"
  20816. /* harmony default export */ var map = __webpack_exports__["default"] = (component.exports);
  20817. /***/ }),
  20818. /* 151 */
  20819. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  20820. "use strict";
  20821. // ESM COMPAT FLAG
  20822. __webpack_require__.r(__webpack_exports__);
  20823. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4130fe76-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/web-view/index.vue?vue&type=template&id=02a3393e&
  20824. var render = function() {
  20825. var _vm = this
  20826. var _h = _vm.$createElement
  20827. var _c = _vm._self._c || _h
  20828. return _c("uni-web-view", _vm._g({}, _vm.$listeners))
  20829. }
  20830. var staticRenderFns = []
  20831. render._withStripped = true
  20832. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/web-view/index.vue?vue&type=template&id=02a3393e&
  20833. // EXTERNAL MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/web-view/index.vue?vue&type=script&lang=js&
  20834. var web_viewvue_type_script_lang_js_ = __webpack_require__(54);
  20835. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/web-view/index.vue?vue&type=script&lang=js&
  20836. /* harmony default export */ var components_web_viewvue_type_script_lang_js_ = (web_viewvue_type_script_lang_js_["a" /* default */]);
  20837. // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/web-view/index.vue?vue&type=style&index=0&lang=css&
  20838. var web_viewvue_type_style_index_0_lang_css_ = __webpack_require__(124);
  20839. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  20840. var componentNormalizer = __webpack_require__(0);
  20841. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/web-view/index.vue
  20842. /* normalize component */
  20843. var component = Object(componentNormalizer["a" /* default */])(
  20844. components_web_viewvue_type_script_lang_js_,
  20845. render,
  20846. staticRenderFns,
  20847. false,
  20848. null,
  20849. null,
  20850. null
  20851. )
  20852. /* hot reload */
  20853. if (false) { var api; }
  20854. component.options.__file = "src/platforms/app-plus/view/components/web-view/index.vue"
  20855. /* harmony default export */ var web_view = __webpack_exports__["default"] = (component.exports);
  20856. /***/ }),
  20857. /* 152 */
  20858. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  20859. "use strict";
  20860. // ESM COMPAT FLAG
  20861. __webpack_require__.r(__webpack_exports__);
  20862. // EXTERNAL MODULE: ./packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.esm.js
  20863. var vue_runtime_esm = __webpack_require__(8);
  20864. // EXTERNAL MODULE: ./src/platforms/app-plus/helpers/get-real-path.js + 1 modules
  20865. var get_real_path = __webpack_require__(65);
  20866. // EXTERNAL MODULE: ./src/core/view/plugins/events.js + 1 modules
  20867. var events = __webpack_require__(11);
  20868. // CONCATENATED MODULE: ./src/core/view/mixins/base.js
  20869. /* harmony default export */ var base = ({
  20870. methods: {
  20871. $getRealPath: function $getRealPath(src) {
  20872. return Object(get_real_path["a" /* default */])(src);
  20873. },
  20874. $trigger: function $trigger(name, $event, detail) {
  20875. this.$emit(name, events["b" /* processEvent */].call(this, name, $event, detail, this.$el, this.$el));
  20876. }
  20877. }
  20878. });
  20879. // CONCATENATED MODULE: ./src/core/view/mixins/animation.js
  20880. function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
  20881. function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
  20882. function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
  20883. function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
  20884. function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
  20885. function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  20886. function converPx(value) {
  20887. if (/\d+[ur]px$/i.test(value)) {
  20888. value.replace(/\d+[ur]px$/i, function (text) {
  20889. return "".concat(uni.upx2px(parseFloat(text)), "px");
  20890. }); // eslint-disable-next-line no-useless-escape
  20891. } else if (/^-?[\d\.]+$/.test(value)) {
  20892. return "".concat(value, "px");
  20893. }
  20894. return value || '';
  20895. }
  20896. function converType(type) {
  20897. return type.replace(/[A-Z]/g, function (text) {
  20898. return "-".concat(text.toLowerCase());
  20899. }).replace('webkit', '-webkit');
  20900. }
  20901. function getStyle(action) {
  20902. var animateTypes1 = ['matrix', 'matrix3d', 'scale', 'scale3d', 'rotate3d', 'skew', 'translate', 'translate3d'];
  20903. var animateTypes2 = ['scaleX', 'scaleY', 'scaleZ', 'rotate', 'rotateX', 'rotateY', 'rotateZ', 'skewX', 'skewY', 'translateX', 'translateY', 'translateZ'];
  20904. var animateTypes3 = ['opacity', 'background-color'];
  20905. var animateTypes4 = ['width', 'height', 'left', 'right', 'top', 'bottom'];
  20906. var animates = action.animates;
  20907. var option = action.option;
  20908. var transition = option.transition;
  20909. var style = {};
  20910. var transform = [];
  20911. animates.forEach(function (animate) {
  20912. var type = animate.type;
  20913. var args = _toConsumableArray(animate.args);
  20914. if (animateTypes1.concat(animateTypes2).includes(type)) {
  20915. if (type.startsWith('rotate') || type.startsWith('skew')) {
  20916. args = args.map(function (value) {
  20917. return parseFloat(value) + 'deg';
  20918. });
  20919. } else if (type.startsWith('translate')) {
  20920. args = args.map(converPx);
  20921. }
  20922. if (animateTypes2.indexOf(type) >= 0) {
  20923. args.length = 1;
  20924. }
  20925. transform.push("".concat(type, "(").concat(args.join(','), ")"));
  20926. } else if (animateTypes3.concat(animateTypes4).includes(args[0])) {
  20927. type = args[0];
  20928. var value = args[1];
  20929. style[type] = animateTypes4.includes(type) ? converPx(value) : value;
  20930. }
  20931. });
  20932. style.transform = style.webkitTransform = transform.join(' ');
  20933. style.transition = style.webkitTransition = Object.keys(style).map(function (type) {
  20934. return "".concat(converType(type), " ").concat(transition.duration, "ms ").concat(transition.timingFunction, " ").concat(transition.delay, "ms");
  20935. }).join(',');
  20936. style.transformOrigin = style.webkitTransformOrigin = option.transformOrigin;
  20937. return style;
  20938. }
  20939. function startAnimation(context) {
  20940. var animation = context.animation;
  20941. if (!animation || !animation.actions || !animation.actions.length) {
  20942. return;
  20943. }
  20944. var index = 0;
  20945. var actions = animation.actions;
  20946. var length = animation.actions.length;
  20947. function animate() {
  20948. var action = actions[index];
  20949. var transition = action.option.transition;
  20950. var style = getStyle(action);
  20951. Object.keys(style).forEach(function (key) {
  20952. context.$el.style[key] = style[key];
  20953. });
  20954. index += 1;
  20955. if (index < length) {
  20956. setTimeout(animate, transition.duration + transition.delay);
  20957. }
  20958. }
  20959. animate();
  20960. }
  20961. /* harmony default export */ var animation = ({
  20962. props: ['animation'],
  20963. watch: {
  20964. animation: function animation() {
  20965. startAnimation(this);
  20966. }
  20967. },
  20968. mounted: function mounted() {
  20969. startAnimation(this);
  20970. }
  20971. });
  20972. // CONCATENATED MODULE: ./src/core/view/components/index.js
  20973. var requireComponents = [// baseComponents
  20974. __webpack_require__(89), __webpack_require__(116)];
  20975. requireComponents.forEach(function (components, index) {
  20976. components.keys().forEach(function (fileName) {
  20977. // 获取组件配置
  20978. var componentModule = components(fileName);
  20979. var componentConfig = componentModule.default || componentModule;
  20980. componentConfig.mixins = componentConfig.mixins ? [].concat(base, componentConfig.mixins) : [base];
  20981. componentConfig.mixins.push(animation);
  20982. componentConfig.name = 'VUni' + componentConfig.name;
  20983. componentConfig.isReserved = true; // 全局注册组件
  20984. vue_runtime_esm["a" /* default */].component(componentConfig.name, componentConfig);
  20985. });
  20986. });
  20987. /***/ }),
  20988. /* 153 */
  20989. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  20990. "use strict";
  20991. // ESM COMPAT FLAG
  20992. __webpack_require__.r(__webpack_exports__);
  20993. // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
  20994. var mixins = __webpack_require__(2);
  20995. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/button/index.vue?vue&type=script&lang=js&
  20996. /* harmony default export */ var buttonvue_type_script_lang_js_ = ({
  20997. name: 'Button',
  20998. mixins: [mixins["b" /* hover */], mixins["a" /* emitter */], mixins["d" /* listeners */]],
  20999. props: {
  21000. hoverClass: {
  21001. type: String,
  21002. default: 'button-hover'
  21003. },
  21004. disabled: {
  21005. type: [Boolean, String],
  21006. default: false
  21007. },
  21008. id: {
  21009. type: String,
  21010. default: ''
  21011. },
  21012. hoverStopPropagation: {
  21013. type: Boolean,
  21014. default: false
  21015. },
  21016. hoverStartTime: {
  21017. type: [Number, String],
  21018. default: 20
  21019. },
  21020. hoverStayTime: {
  21021. type: [Number, String],
  21022. default: 70
  21023. },
  21024. formType: {
  21025. type: String,
  21026. default: '',
  21027. validator: function validator(value) {
  21028. // 只有这几个可取值,其它都是非法的。
  21029. return ~['', 'submit', 'reset'].indexOf(value);
  21030. }
  21031. }
  21032. },
  21033. data: function data() {
  21034. return {
  21035. clickFunction: null
  21036. };
  21037. },
  21038. methods: {
  21039. _onClick: function _onClick($event, isLabelClick) {
  21040. if (this.disabled) {
  21041. return;
  21042. }
  21043. if (isLabelClick) {
  21044. this.$el.click();
  21045. } // TODO 通知父表单执行相应的行为
  21046. if (this.formType) {
  21047. this.$dispatch('Form', this.formType === 'submit' ? 'uni-form-submit' : 'uni-form-reset', {
  21048. type: this.formType
  21049. });
  21050. }
  21051. },
  21052. _bindObjectListeners: function _bindObjectListeners(data, value) {
  21053. if (value) {
  21054. for (var key in value) {
  21055. var existing = data.on[key];
  21056. var ours = value[key];
  21057. data.on[key] = existing ? [].concat(existing, ours) : ours;
  21058. }
  21059. }
  21060. return data;
  21061. }
  21062. },
  21063. render: function render(createElement) {
  21064. var _this = this;
  21065. var $listeners = Object.create(null);
  21066. if (this.$listeners) {
  21067. Object.keys(this.$listeners).forEach(function (e) {
  21068. if (_this.disabled && (e === 'click' || e === 'tap')) {
  21069. return;
  21070. }
  21071. $listeners[e] = _this.$listeners[e];
  21072. });
  21073. }
  21074. if (this.hoverClass && this.hoverClass !== 'none') {
  21075. return createElement('uni-button', this._bindObjectListeners({
  21076. class: [this.hovering ? this.hoverClass : ''],
  21077. attrs: {
  21078. disabled: this.disabled
  21079. },
  21080. on: {
  21081. touchstart: this._hoverTouchStart,
  21082. touchend: this._hoverTouchEnd,
  21083. touchcancel: this._hoverTouchCancel,
  21084. click: this._onClick
  21085. }
  21086. }, $listeners), this.$slots.default);
  21087. } else {
  21088. return createElement('uni-button', this._bindObjectListeners({
  21089. class: [this.hovering ? this.hoverClass : ''],
  21090. attrs: {
  21091. disabled: this.disabled
  21092. },
  21093. on: {
  21094. click: this._onClick
  21095. }
  21096. }, $listeners), this.$slots.default);
  21097. }
  21098. },
  21099. listeners: {
  21100. 'label-click': '_onClick',
  21101. '@label-click': '_onClick'
  21102. }
  21103. });
  21104. // CONCATENATED MODULE: ./src/core/view/components/button/index.vue?vue&type=script&lang=js&
  21105. /* harmony default export */ var components_buttonvue_type_script_lang_js_ = (buttonvue_type_script_lang_js_);
  21106. // EXTERNAL MODULE: ./src/core/view/components/button/index.vue?vue&type=style&index=0&lang=css&
  21107. var buttonvue_type_style_index_0_lang_css_ = __webpack_require__(90);
  21108. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  21109. var componentNormalizer = __webpack_require__(0);
  21110. // CONCATENATED MODULE: ./src/core/view/components/button/index.vue
  21111. var render, staticRenderFns
  21112. /* normalize component */
  21113. var component = Object(componentNormalizer["a" /* default */])(
  21114. components_buttonvue_type_script_lang_js_,
  21115. render,
  21116. staticRenderFns,
  21117. false,
  21118. null,
  21119. null,
  21120. null
  21121. )
  21122. /* hot reload */
  21123. if (false) { var api; }
  21124. component.options.__file = "src/core/view/components/button/index.vue"
  21125. /* harmony default export */ var components_button = __webpack_exports__["default"] = (component.exports);
  21126. /***/ }),
  21127. /* 154 */
  21128. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  21129. "use strict";
  21130. // ESM COMPAT FLAG
  21131. __webpack_require__.r(__webpack_exports__);
  21132. // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
  21133. var shared = __webpack_require__(1);
  21134. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/movable-area/index.vue?vue&type=script&lang=js&
  21135. function calc(e) {
  21136. return Math.sqrt(e.x * e.x + e.y * e.y);
  21137. }
  21138. /* harmony default export */ var movable_areavue_type_script_lang_js_ = ({
  21139. name: 'MovableArea',
  21140. props: {
  21141. scaleArea: {
  21142. type: Boolean,
  21143. default: false
  21144. }
  21145. },
  21146. data: function data() {
  21147. return {
  21148. width: 0,
  21149. height: 0,
  21150. items: []
  21151. };
  21152. },
  21153. created: function created() {
  21154. this.gapV = {
  21155. x: null,
  21156. y: null
  21157. };
  21158. this.pinchStartLen = null;
  21159. },
  21160. mounted: function mounted() {
  21161. this._resize();
  21162. },
  21163. methods: {
  21164. _resize: function _resize() {
  21165. this._getWH();
  21166. this.items.forEach(function (item, index) {
  21167. item.componentInstance.setParent();
  21168. });
  21169. },
  21170. _find: function _find(target) {
  21171. var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.items;
  21172. var root = this.$el;
  21173. function get(node) {
  21174. for (var i = 0; i < items.length; i++) {
  21175. var item = items[i];
  21176. if (node === item.componentInstance.$el) {
  21177. return item;
  21178. }
  21179. }
  21180. if (node === root || node === document.body || node === document) {
  21181. return null;
  21182. }
  21183. return get(node.parentNode);
  21184. }
  21185. return get(target);
  21186. },
  21187. _touchstart: function _touchstart(t) {
  21188. Object(shared["b" /* disableScrollBounce */])({
  21189. disable: true
  21190. });
  21191. var i = t.touches;
  21192. if (i) {
  21193. if (i.length > 1) {
  21194. var r = {
  21195. x: i[1].pageX - i[0].pageX,
  21196. y: i[1].pageY - i[0].pageY
  21197. };
  21198. this.pinchStartLen = calc(r);
  21199. this.gapV = r;
  21200. if (!this.scaleArea) {
  21201. var touch0 = this._find(i[0].target);
  21202. var touch1 = this._find(i[1].target);
  21203. this._scaleMovableView = touch0 && touch0 === touch1 ? touch0 : null;
  21204. }
  21205. }
  21206. }
  21207. },
  21208. _touchmove: function _touchmove(t) {
  21209. var n = t.touches;
  21210. if (n) {
  21211. if (n.length > 1) {
  21212. t.preventDefault();
  21213. var i = {
  21214. x: n[1].pageX - n[0].pageX,
  21215. y: n[1].pageY - n[0].pageY
  21216. };
  21217. if (this.gapV.x !== null && this.pinchStartLen > 0) {
  21218. var r = calc(i) / this.pinchStartLen;
  21219. this._updateScale(r);
  21220. }
  21221. this.gapV = i;
  21222. }
  21223. }
  21224. },
  21225. _touchend: function _touchend(e) {
  21226. Object(shared["b" /* disableScrollBounce */])({
  21227. disable: false
  21228. });
  21229. var t = e.touches;
  21230. if (!(t && t.length)) {
  21231. if (e.changedTouches) {
  21232. this.gapV.x = 0;
  21233. this.gapV.y = 0;
  21234. this.pinchStartLen = null;
  21235. if (this.scaleArea) {
  21236. this.items.forEach(function (item) {
  21237. item.componentInstance._endScale();
  21238. });
  21239. } else {
  21240. if (this._scaleMovableView) {
  21241. this._scaleMovableView.componentInstance._endScale();
  21242. }
  21243. }
  21244. }
  21245. }
  21246. },
  21247. _updateScale: function _updateScale(e) {
  21248. if (e && e !== 1) {
  21249. if (this.scaleArea) {
  21250. this.items.forEach(function (item) {
  21251. item.componentInstance._setScale(e);
  21252. });
  21253. } else {
  21254. if (this._scaleMovableView) {
  21255. this._scaleMovableView.componentInstance._setScale(e);
  21256. }
  21257. }
  21258. }
  21259. },
  21260. _getWH: function _getWH() {
  21261. var style = window.getComputedStyle(this.$el);
  21262. var rect = this.$el.getBoundingClientRect();
  21263. this.width = rect.width - ['Left', 'Right'].reduce(function (all, item) {
  21264. return all + parseFloat(style['border' + item + 'Width']) + parseFloat(style['padding' + item]);
  21265. }, 0);
  21266. this.height = rect.height - ['Top', 'Bottom'].reduce(function (all, item) {
  21267. return all + parseFloat(style['border' + item + 'Width']) + parseFloat(style['padding' + item]);
  21268. }, 0);
  21269. }
  21270. },
  21271. render: function render(createElement) {
  21272. var _this = this;
  21273. var items = [];
  21274. if (this.$slots.default) {
  21275. this.$slots.default.forEach(function (vnode) {
  21276. if (vnode.componentOptions && vnode.componentOptions.tag === 'v-uni-movable-view') {
  21277. items.push(vnode);
  21278. }
  21279. });
  21280. }
  21281. this.items = items;
  21282. var $listeners = Object.assign({}, this.$listeners);
  21283. var events = ['touchstart', 'touchmove', 'touchend'];
  21284. events.forEach(function (event) {
  21285. var existing = $listeners[event];
  21286. var ours = _this["_".concat(event)];
  21287. $listeners[event] = existing ? [].concat(existing, ours) : ours;
  21288. });
  21289. return createElement('uni-movable-area', {
  21290. on: $listeners
  21291. }, [createElement('v-uni-resize-sensor', {
  21292. on: {
  21293. resize: this._resize
  21294. }
  21295. }), this.$slots.default]);
  21296. }
  21297. });
  21298. // CONCATENATED MODULE: ./src/core/view/components/movable-area/index.vue?vue&type=script&lang=js&
  21299. /* harmony default export */ var components_movable_areavue_type_script_lang_js_ = (movable_areavue_type_script_lang_js_);
  21300. // EXTERNAL MODULE: ./src/core/view/components/movable-area/index.vue?vue&type=style&index=0&lang=css&
  21301. var movable_areavue_type_style_index_0_lang_css_ = __webpack_require__(99);
  21302. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  21303. var componentNormalizer = __webpack_require__(0);
  21304. // CONCATENATED MODULE: ./src/core/view/components/movable-area/index.vue
  21305. var render, staticRenderFns
  21306. /* normalize component */
  21307. var component = Object(componentNormalizer["a" /* default */])(
  21308. components_movable_areavue_type_script_lang_js_,
  21309. render,
  21310. staticRenderFns,
  21311. false,
  21312. null,
  21313. null,
  21314. null
  21315. )
  21316. /* hot reload */
  21317. if (false) { var api; }
  21318. component.options.__file = "src/core/view/components/movable-area/index.vue"
  21319. /* harmony default export */ var movable_area = __webpack_exports__["default"] = (component.exports);
  21320. /***/ }),
  21321. /* 155 */
  21322. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  21323. "use strict";
  21324. // ESM COMPAT FLAG
  21325. __webpack_require__.r(__webpack_exports__);
  21326. // EXTERNAL MODULE: ./src/core/view/mixins/touchtrack.js
  21327. var touchtrack = __webpack_require__(9);
  21328. // EXTERNAL MODULE: ./src/core/view/mixins/scroller/index.js + 2 modules
  21329. var scroller = __webpack_require__(64);
  21330. // EXTERNAL MODULE: ./src/core/view/mixins/scroller/Friction.js
  21331. var Friction = __webpack_require__(61);
  21332. // EXTERNAL MODULE: ./src/core/view/mixins/scroller/Spring.js
  21333. var Spring = __webpack_require__(62);
  21334. // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
  21335. var shared = __webpack_require__(1);
  21336. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/picker-view-column/index.vue?vue&type=script&lang=js&
  21337. function initClick(dom) {
  21338. var MAX_MOVE = 20;
  21339. var x = 0;
  21340. var y = 0;
  21341. dom.addEventListener('touchstart', function (event) {
  21342. var info = event.changedTouches[0];
  21343. x = info.clientX;
  21344. y = info.clientY;
  21345. });
  21346. dom.addEventListener('touchend', function (event) {
  21347. var info = event.changedTouches[0];
  21348. if (Math.abs(info.clientX - x) < MAX_MOVE && Math.abs(info.clientY - y) < MAX_MOVE) {
  21349. var customEvent = new CustomEvent('click', {
  21350. bubbles: true,
  21351. cancelable: true,
  21352. target: event.target,
  21353. currentTarget: event.currentTarget
  21354. });
  21355. ['screenX', 'screenY', 'clientX', 'clientY', 'pageX', 'pageY'].forEach(function (key) {
  21356. customEvent[key] = info[key];
  21357. });
  21358. event.target.dispatchEvent(customEvent);
  21359. }
  21360. });
  21361. }
  21362. /* harmony default export */ var picker_view_columnvue_type_script_lang_js_ = ({
  21363. name: 'PickerViewColumn',
  21364. mixins: [touchtrack["a" /* default */], scroller["a" /* default */]],
  21365. data: function data() {
  21366. return {
  21367. scope: "picker-view-column-".concat(Date.now()),
  21368. inited: false,
  21369. indicatorStyle: '',
  21370. indicatorClass: '',
  21371. indicatorHeight: 34,
  21372. maskStyle: '',
  21373. maskClass: '',
  21374. current: this.$parent.getItemValue(this),
  21375. length: 0
  21376. };
  21377. },
  21378. computed: {
  21379. height: function height() {
  21380. return this.$parent.height;
  21381. },
  21382. maskSize: function maskSize() {
  21383. return (this.height - this.indicatorHeight) / 2;
  21384. }
  21385. },
  21386. watch: {
  21387. indicatorHeight: function indicatorHeight(val) {
  21388. this._setItemHeight(val);
  21389. if (this.inited) {
  21390. this.update();
  21391. }
  21392. },
  21393. current: function current(val) {
  21394. this.$parent.setItemValue(this, val);
  21395. },
  21396. length: function length(val) {
  21397. if (this.inited) {
  21398. this.update(val);
  21399. }
  21400. }
  21401. },
  21402. created: function created() {
  21403. var $parent = this.$parent;
  21404. this.indicatorStyle = $parent.indicatorStyle;
  21405. this.indicatorClass = $parent.indicatorClass;
  21406. this.maskStyle = $parent.maskStyle;
  21407. this.maskClass = $parent.maskClass;
  21408. this.deltaY = 0;
  21409. },
  21410. mounted: function mounted() {
  21411. var _this = this;
  21412. this.touchtrack(this.$refs.main, '_handleTrack', true);
  21413. this.setCurrent(this.current);
  21414. this.$nextTick(function () {
  21415. _this.init();
  21416. _this.update();
  21417. });
  21418. initClick(this.$el);
  21419. },
  21420. methods: {
  21421. _setItemHeight: function _setItemHeight(height) {
  21422. var style = document.createElement('style');
  21423. style.innerText = ".uni-picker-view-content.".concat(this.scope, ">*{height: ").concat(height, "px;overflow: hidden;}");
  21424. document.head.appendChild(style);
  21425. },
  21426. _handleTrack: function _handleTrack(e) {
  21427. if (this._scroller) {
  21428. switch (e.detail.state) {
  21429. case 'start':
  21430. this._handleTouchStart(e);
  21431. Object(shared["b" /* disableScrollBounce */])({
  21432. disable: true
  21433. });
  21434. break;
  21435. case 'move':
  21436. this._handleTouchMove(e);
  21437. break;
  21438. case 'end':
  21439. case 'cancel':
  21440. this._handleTouchEnd(e);
  21441. Object(shared["b" /* disableScrollBounce */])({
  21442. disable: false
  21443. });
  21444. }
  21445. }
  21446. },
  21447. _handleTap: function _handleTap(_ref) {
  21448. var clientY = _ref.clientY;
  21449. if (!this._scroller.isScrolling()) {
  21450. var rect = this.$el.getBoundingClientRect();
  21451. var r = clientY - rect.top - this.height / 2;
  21452. var o = this.indicatorHeight / 2;
  21453. if (!(Math.abs(r) <= o)) {
  21454. var a = Math.ceil((Math.abs(r) - o) / this.indicatorHeight);
  21455. var s = r < 0 ? -a : a;
  21456. var current = Math.min(this.current + s, this.length - 1);
  21457. this.current = current = Math.max(current, 0);
  21458. this._scroller.scrollTo(current * this.indicatorHeight);
  21459. }
  21460. }
  21461. },
  21462. _handleWheel: function _handleWheel($event) {
  21463. var deltaY = this.deltaY + $event.deltaY;
  21464. if (Math.abs(deltaY) > 10) {
  21465. this.deltaY = 0;
  21466. var current = Math.min(this.current + (deltaY < 0 ? -1 : 1), this.length - 1);
  21467. this.current = current = Math.max(current, 0);
  21468. this._scroller.scrollTo(current * this.indicatorHeight);
  21469. } else {
  21470. this.deltaY = deltaY;
  21471. }
  21472. $event.preventDefault();
  21473. },
  21474. setCurrent: function setCurrent(current) {
  21475. if (current !== this.current) {
  21476. this.current = current;
  21477. if (this.inited) {
  21478. this.update();
  21479. }
  21480. }
  21481. },
  21482. init: function init() {
  21483. var _this2 = this;
  21484. this.initScroller(this.$refs.content, {
  21485. enableY: true,
  21486. enableX: false,
  21487. enableSnap: true,
  21488. itemSize: this.indicatorHeight,
  21489. friction: new Friction["a" /* Friction */](0.0001),
  21490. spring: new Spring["a" /* Spring */](2, 90, 20),
  21491. onSnap: function onSnap(index) {
  21492. if (!isNaN(index) && index !== _this2.current) {
  21493. _this2.current = index;
  21494. }
  21495. }
  21496. });
  21497. this.inited = true;
  21498. },
  21499. update: function update() {
  21500. var _this3 = this;
  21501. this.$nextTick(function () {
  21502. var current = Math.min(_this3.current, _this3.length - 1);
  21503. current = Math.max(current, 0);
  21504. _this3._scroller.update(current * _this3.indicatorHeight, undefined, _this3.indicatorHeight);
  21505. });
  21506. },
  21507. _resize: function _resize(_ref2) {
  21508. var height = _ref2.height;
  21509. this.indicatorHeight = height;
  21510. }
  21511. },
  21512. render: function render(createElement) {
  21513. this.length = this.$slots.default && this.$slots.default.length || 0;
  21514. return createElement('uni-picker-view-column', {
  21515. on: {
  21516. on: this.$listeners
  21517. }
  21518. }, [createElement('div', {
  21519. ref: 'main',
  21520. staticClass: 'uni-picker-view-group',
  21521. on: {
  21522. wheel: this._handleWheel,
  21523. click: this._handleTap
  21524. }
  21525. }, [createElement('div', {
  21526. ref: 'mask',
  21527. staticClass: 'uni-picker-view-mask',
  21528. class: this.maskClass,
  21529. style: "background-size: 100% ".concat(this.maskSize, "px;").concat(this.maskStyle)
  21530. }), createElement('div', {
  21531. ref: 'indicator',
  21532. staticClass: 'uni-picker-view-indicator',
  21533. class: this.indicatorClass,
  21534. style: this.indicatorStyle
  21535. }, [createElement('v-uni-resize-sensor', {
  21536. attrs: {
  21537. initial: true
  21538. },
  21539. on: {
  21540. resize: this._resize
  21541. }
  21542. })]), createElement('div', {
  21543. ref: 'content',
  21544. staticClass: 'uni-picker-view-content',
  21545. class: this.scope,
  21546. style: "padding: ".concat(this.maskSize, "px 0;")
  21547. }, [this.$slots.default])])]);
  21548. }
  21549. });
  21550. // CONCATENATED MODULE: ./src/core/view/components/picker-view-column/index.vue?vue&type=script&lang=js&
  21551. /* harmony default export */ var components_picker_view_columnvue_type_script_lang_js_ = (picker_view_columnvue_type_script_lang_js_);
  21552. // EXTERNAL MODULE: ./src/core/view/components/picker-view-column/index.vue?vue&type=style&index=0&lang=css&
  21553. var picker_view_columnvue_type_style_index_0_lang_css_ = __webpack_require__(102);
  21554. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  21555. var componentNormalizer = __webpack_require__(0);
  21556. // CONCATENATED MODULE: ./src/core/view/components/picker-view-column/index.vue
  21557. var render, staticRenderFns
  21558. /* normalize component */
  21559. var component = Object(componentNormalizer["a" /* default */])(
  21560. components_picker_view_columnvue_type_script_lang_js_,
  21561. render,
  21562. staticRenderFns,
  21563. false,
  21564. null,
  21565. null,
  21566. null
  21567. )
  21568. /* hot reload */
  21569. if (false) { var api; }
  21570. component.options.__file = "src/core/view/components/picker-view-column/index.vue"
  21571. /* harmony default export */ var picker_view_column = __webpack_exports__["default"] = (component.exports);
  21572. /***/ }),
  21573. /* 156 */
  21574. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  21575. "use strict";
  21576. // ESM COMPAT FLAG
  21577. __webpack_require__.r(__webpack_exports__);
  21578. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/picker-view/index.vue?vue&type=script&lang=js&
  21579. function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
  21580. function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
  21581. function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
  21582. function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
  21583. function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
  21584. function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  21585. /* harmony default export */ var picker_viewvue_type_script_lang_js_ = ({
  21586. name: 'PickerView',
  21587. props: {
  21588. value: {
  21589. type: Array,
  21590. default: function _default() {
  21591. return [];
  21592. },
  21593. validator: function validator(val) {
  21594. return Array.isArray(val) && val.filter(function (val) {
  21595. return typeof val === 'number';
  21596. }).length === val.length;
  21597. }
  21598. },
  21599. indicatorStyle: {
  21600. type: String,
  21601. default: ''
  21602. },
  21603. indicatorClass: {
  21604. type: String,
  21605. default: ''
  21606. },
  21607. maskStyle: {
  21608. type: String,
  21609. default: ''
  21610. },
  21611. maskClass: {
  21612. type: String,
  21613. default: ''
  21614. }
  21615. },
  21616. data: function data() {
  21617. return {
  21618. valueSync: _toConsumableArray(this.value),
  21619. height: 34,
  21620. items: [],
  21621. changeSource: ''
  21622. };
  21623. },
  21624. watch: {
  21625. value: function value(val, oldVal) {
  21626. var _this = this;
  21627. if (val === oldVal || val.length !== oldVal.length || val.findIndex(function (item, index) {
  21628. return item !== oldVal[index];
  21629. }) >= 0) {
  21630. this.valueSync.length = val.length;
  21631. val.forEach(function (val, index) {
  21632. if (val !== _this.valueSync[index]) {
  21633. _this.$set(_this.valueSync, index, val);
  21634. }
  21635. });
  21636. }
  21637. },
  21638. valueSync: {
  21639. deep: true,
  21640. handler: function handler(val, oldVal) {
  21641. if (this.changeSource === '') {
  21642. this._valueChanged(val);
  21643. } else {
  21644. this.changeSource = ''; // 避免外部直接对此值进行修改
  21645. var value = val.map(function (val) {
  21646. return val;
  21647. });
  21648. this.$emit('update:value', value);
  21649. this.$trigger('change', {}, {
  21650. value: value
  21651. });
  21652. }
  21653. }
  21654. }
  21655. },
  21656. methods: {
  21657. getItemIndex: function getItemIndex(vnode) {
  21658. return this.items.indexOf(vnode);
  21659. },
  21660. getItemValue: function getItemValue(vm) {
  21661. return this.valueSync[this.getItemIndex(vm.$vnode)] || 0;
  21662. },
  21663. setItemValue: function setItemValue(vm, val) {
  21664. var index = this.getItemIndex(vm.$vnode);
  21665. var oldVal = this.valueSync[index];
  21666. if (oldVal !== val) {
  21667. this.changeSource = 'touch';
  21668. this.$set(this.valueSync, index, val);
  21669. }
  21670. },
  21671. _valueChanged: function _valueChanged(val) {
  21672. this.items.forEach(function (item, index) {
  21673. item.componentInstance.setCurrent(val[index] || 0);
  21674. });
  21675. },
  21676. _resize: function _resize(_ref) {
  21677. var height = _ref.height;
  21678. this.height = height;
  21679. }
  21680. },
  21681. render: function render(createElement) {
  21682. var items = [];
  21683. if (this.$slots.default) {
  21684. this.$slots.default.forEach(function (vnode) {
  21685. if (vnode.componentOptions && vnode.componentOptions.tag === 'v-uni-picker-view-column') {
  21686. items.push(vnode);
  21687. }
  21688. });
  21689. }
  21690. this.items = items;
  21691. return createElement('uni-picker-view', {
  21692. on: this.$listeners
  21693. }, [createElement('v-uni-resize-sensor', {
  21694. attrs: {
  21695. initial: true
  21696. },
  21697. on: {
  21698. resize: this._resize
  21699. }
  21700. }), createElement('div', {
  21701. ref: 'wrapper',
  21702. class: 'uni-picker-view-wrapper'
  21703. }, items)]);
  21704. }
  21705. });
  21706. // CONCATENATED MODULE: ./src/core/view/components/picker-view/index.vue?vue&type=script&lang=js&
  21707. /* harmony default export */ var components_picker_viewvue_type_script_lang_js_ = (picker_viewvue_type_script_lang_js_);
  21708. // EXTERNAL MODULE: ./src/core/view/components/picker-view/index.vue?vue&type=style&index=0&lang=css&
  21709. var picker_viewvue_type_style_index_0_lang_css_ = __webpack_require__(103);
  21710. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  21711. var componentNormalizer = __webpack_require__(0);
  21712. // CONCATENATED MODULE: ./src/core/view/components/picker-view/index.vue
  21713. var render, staticRenderFns
  21714. /* normalize component */
  21715. var component = Object(componentNormalizer["a" /* default */])(
  21716. components_picker_viewvue_type_script_lang_js_,
  21717. render,
  21718. staticRenderFns,
  21719. false,
  21720. null,
  21721. null,
  21722. null
  21723. )
  21724. /* hot reload */
  21725. if (false) { var api; }
  21726. component.options.__file = "src/core/view/components/picker-view/index.vue"
  21727. /* harmony default export */ var picker_view = __webpack_exports__["default"] = (component.exports);
  21728. /***/ }),
  21729. /* 157 */
  21730. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  21731. "use strict";
  21732. // ESM COMPAT FLAG
  21733. __webpack_require__.r(__webpack_exports__);
  21734. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/resize-sensor/index.vue?vue&type=script&lang=js&
  21735. /* harmony default export */ var resize_sensorvue_type_script_lang_js_ = ({
  21736. name: 'ResizeSensor',
  21737. props: {
  21738. initial: {
  21739. type: [Boolean, String],
  21740. default: false
  21741. }
  21742. },
  21743. data: function data() {
  21744. return {
  21745. size: {
  21746. width: -1,
  21747. height: -1
  21748. }
  21749. };
  21750. },
  21751. watch: {
  21752. size: {
  21753. deep: true,
  21754. handler: function handler(size) {
  21755. this.$emit('resize', Object.assign({}, size));
  21756. }
  21757. }
  21758. },
  21759. mounted: function mounted() {
  21760. if (this.initial === true) {
  21761. this.$nextTick(this.update);
  21762. }
  21763. if (this.$el.offsetParent !== this.$el.parentNode) {
  21764. this.$el.parentNode.style.position = 'relative';
  21765. }
  21766. if (!('AnimationEvent' in window)) {
  21767. this.reset();
  21768. }
  21769. },
  21770. methods: {
  21771. reset: function reset() {
  21772. var expand = this.$el.firstChild;
  21773. var shrink = this.$el.lastChild;
  21774. expand.scrollLeft = 100000;
  21775. expand.scrollTop = 100000;
  21776. shrink.scrollLeft = 100000;
  21777. shrink.scrollTop = 100000;
  21778. },
  21779. update: function update() {
  21780. this.size.width = this.$el.offsetWidth;
  21781. this.size.height = this.$el.offsetHeight;
  21782. this.reset();
  21783. }
  21784. },
  21785. render: function render(create) {
  21786. return create('uni-resize-sensor', {
  21787. on: {
  21788. '~animationstart': this.update
  21789. }
  21790. }, [create('div', {
  21791. on: {
  21792. scroll: this.update
  21793. }
  21794. }, [create('div')]), create('div', {
  21795. on: {
  21796. scroll: this.update
  21797. }
  21798. }, [create('div')])]);
  21799. }
  21800. });
  21801. // CONCATENATED MODULE: ./src/core/view/components/resize-sensor/index.vue?vue&type=script&lang=js&
  21802. /* harmony default export */ var components_resize_sensorvue_type_script_lang_js_ = (resize_sensorvue_type_script_lang_js_);
  21803. // EXTERNAL MODULE: ./src/core/view/components/resize-sensor/index.vue?vue&type=style&index=0&lang=css&
  21804. var resize_sensorvue_type_style_index_0_lang_css_ = __webpack_require__(107);
  21805. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  21806. var componentNormalizer = __webpack_require__(0);
  21807. // CONCATENATED MODULE: ./src/core/view/components/resize-sensor/index.vue
  21808. var render, staticRenderFns
  21809. /* normalize component */
  21810. var component = Object(componentNormalizer["a" /* default */])(
  21811. components_resize_sensorvue_type_script_lang_js_,
  21812. render,
  21813. staticRenderFns,
  21814. false,
  21815. null,
  21816. null,
  21817. null
  21818. )
  21819. /* hot reload */
  21820. if (false) { var api; }
  21821. component.options.__file = "src/core/view/components/resize-sensor/index.vue"
  21822. /* harmony default export */ var resize_sensor = __webpack_exports__["default"] = (component.exports);
  21823. /***/ }),
  21824. /* 158 */
  21825. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  21826. "use strict";
  21827. // ESM COMPAT FLAG
  21828. __webpack_require__.r(__webpack_exports__);
  21829. // EXTERNAL MODULE: ./src/core/view/mixins/touchtrack.js
  21830. var touchtrack = __webpack_require__(9);
  21831. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/swiper/index.vue?vue&type=script&lang=js&
  21832. //
  21833. function deepClone(vnodes, createElement) {
  21834. function cloneVNode(vnode) {
  21835. var clonedChildren = vnode.children && vnode.children.map(cloneVNode);
  21836. var cloned = createElement(vnode.tag, vnode.data, clonedChildren);
  21837. cloned.text = vnode.text;
  21838. cloned.isComment = vnode.isComment;
  21839. cloned.componentOptions = vnode.componentOptions;
  21840. cloned.elm = vnode.elm;
  21841. cloned.context = vnode.context;
  21842. cloned.ns = vnode.ns;
  21843. cloned.isStatic = vnode.isStatic;
  21844. cloned.key = vnode.key;
  21845. return cloned;
  21846. }
  21847. return vnodes.map(cloneVNode);
  21848. }
  21849. /* harmony default export */ var swipervue_type_script_lang_js_ = ({
  21850. name: 'Swiper',
  21851. mixins: [touchtrack["a" /* default */]],
  21852. props: {
  21853. indicatorDots: {
  21854. type: [Boolean, String],
  21855. default: false
  21856. },
  21857. vertical: {
  21858. type: [Boolean, String],
  21859. default: false
  21860. },
  21861. autoplay: {
  21862. type: [Boolean, String],
  21863. default: false
  21864. },
  21865. circular: {
  21866. type: [Boolean, String],
  21867. default: false
  21868. },
  21869. interval: {
  21870. type: [Number, String],
  21871. default: 5e3
  21872. },
  21873. duration: {
  21874. type: [Number, String],
  21875. default: 500
  21876. },
  21877. current: {
  21878. type: [Number, String],
  21879. default: 0
  21880. },
  21881. indicatorColor: {
  21882. type: String,
  21883. default: ''
  21884. },
  21885. indicatorActiveColor: {
  21886. type: String,
  21887. default: ''
  21888. },
  21889. previousMargin: {
  21890. type: String,
  21891. default: ''
  21892. },
  21893. nextMargin: {
  21894. type: String,
  21895. default: ''
  21896. },
  21897. currentItemId: {
  21898. type: String,
  21899. default: ''
  21900. },
  21901. skipHiddenItemLayout: {
  21902. type: [Boolean, String],
  21903. default: false
  21904. },
  21905. displayMultipleItems: {
  21906. type: [Number, String],
  21907. default: 1
  21908. },
  21909. disableTouch: {
  21910. type: [Boolean, String],
  21911. default: false
  21912. }
  21913. },
  21914. data: function data() {
  21915. return {
  21916. currentSync: Math.round(this.current) || 0,
  21917. currentItemIdSync: this.currentItemId || '',
  21918. userTracking: false,
  21919. currentChangeSource: '',
  21920. items: []
  21921. };
  21922. },
  21923. computed: {
  21924. intervalNumber: function intervalNumber() {
  21925. var interval = Number(this.interval);
  21926. return isNaN(interval) ? 5e3 : interval;
  21927. },
  21928. durationNumber: function durationNumber() {
  21929. var duration = Number(this.duration);
  21930. return isNaN(duration) ? 500 : duration;
  21931. },
  21932. displayMultipleItemsNumber: function displayMultipleItemsNumber() {
  21933. var displayMultipleItems = Math.round(this.displayMultipleItems);
  21934. return isNaN(displayMultipleItems) ? 1 : displayMultipleItems;
  21935. },
  21936. slidesStyle: function slidesStyle() {
  21937. var style = {};
  21938. if (this.nextMargin || this.previousMargin) {
  21939. style = this.vertical ? {
  21940. left: 0,
  21941. right: 0,
  21942. top: this._upx2px(this.previousMargin),
  21943. bottom: this._upx2px(this.nextMargin)
  21944. } : {
  21945. top: 0,
  21946. bottom: 0,
  21947. left: this._upx2px(this.previousMargin),
  21948. right: this._upx2px(this.nextMargin)
  21949. };
  21950. }
  21951. return style;
  21952. },
  21953. slideFrameStyle: function slideFrameStyle() {
  21954. var value = Math.abs(100 / this.displayMultipleItemsNumber) + '%';
  21955. return {
  21956. width: this.vertical ? '100%' : value,
  21957. height: !this.vertical ? '100%' : value
  21958. };
  21959. },
  21960. circularEnabled: function circularEnabled() {
  21961. return this.circular && this.items.length > this.displayMultipleItemsNumber;
  21962. }
  21963. },
  21964. watch: {
  21965. vertical: function vertical() {
  21966. this._resetLayout();
  21967. },
  21968. circular: function circular() {
  21969. this._resetLayout();
  21970. },
  21971. intervalNumber: function intervalNumber(val) {
  21972. if (this._timer) {
  21973. this._cancelSchedule();
  21974. this._scheduleAutoplay();
  21975. }
  21976. },
  21977. current: function current(val) {
  21978. this._currentCheck();
  21979. },
  21980. currentSync: function currentSync(val) {
  21981. this._currentChanged(val);
  21982. this.$emit('update:current', val);
  21983. },
  21984. currentItemId: function currentItemId(val) {
  21985. this._currentCheck();
  21986. },
  21987. currentItemIdSync: function currentItemIdSync(val) {
  21988. this.$emit('update:currentItemId', val);
  21989. },
  21990. displayMultipleItemsNumber: function displayMultipleItemsNumber() {
  21991. this._resetLayout();
  21992. }
  21993. },
  21994. created: function created() {
  21995. this._invalid = true;
  21996. this._viewportPosition = 0;
  21997. this._viewportMoveRatio = 1;
  21998. this._animating = null;
  21999. this._requestedAnimation = false;
  22000. this._userDirectionChecked = false;
  22001. this._contentTrackViewport = 0;
  22002. this._contentTrackSpeed = 0;
  22003. this._contentTrackT = 0;
  22004. },
  22005. mounted: function mounted() {
  22006. var _this = this;
  22007. this._currentCheck();
  22008. this.touchtrack(this.$refs.slidesWrapper, '_handleContentTrack', true);
  22009. this._resetLayout();
  22010. this.$watch(function () {
  22011. return _this.autoplay && !_this.userTracking;
  22012. }, this._inintAutoplay);
  22013. this._inintAutoplay(this.autoplay && !this.userTracking);
  22014. this.$watch('items.length', this._resetLayout);
  22015. },
  22016. beforeDestroy: function beforeDestroy() {
  22017. this._cancelSchedule();
  22018. cancelAnimationFrame(this._animationFrame);
  22019. },
  22020. methods: {
  22021. _inintAutoplay: function _inintAutoplay(enable) {
  22022. if (enable) {
  22023. this._scheduleAutoplay();
  22024. } else {
  22025. this._cancelSchedule();
  22026. }
  22027. },
  22028. /**
  22029. * 页面变更检查和同步
  22030. */
  22031. _currentCheck: function _currentCheck() {
  22032. var current = -1;
  22033. if (this.currentItemId) {
  22034. for (var i = 0, items = this.items; i < items.length; i++) {
  22035. var componentInstance = items[i].componentInstance;
  22036. if (componentInstance && componentInstance.itemId === this.currentItemId) {
  22037. current = i;
  22038. break;
  22039. }
  22040. }
  22041. }
  22042. if (current < 0) {
  22043. current = Math.round(this.current) || 0;
  22044. }
  22045. current = current < 0 ? 0 : current;
  22046. if (this.currentSync !== current) {
  22047. this.currentChangeSource = '';
  22048. this.currentSync = current;
  22049. }
  22050. },
  22051. _itemReady: function _itemReady(vnode, callback) {
  22052. if (vnode.componentInstance && vnode.componentInstance._isMounted) {
  22053. callback();
  22054. } else {
  22055. vnode._callbacks = vnode._callbacks || [];
  22056. vnode._callbacks.push(callback);
  22057. }
  22058. },
  22059. /**
  22060. * 当前页面变更
  22061. */
  22062. _currentChanged: function _currentChanged(current) {
  22063. var _this2 = this;
  22064. var source = this.currentChangeSource;
  22065. this.currentChangeSource = '';
  22066. if (!source) {
  22067. this._animateViewport(current, '', 0);
  22068. }
  22069. var item = this.items[current];
  22070. if (item) {
  22071. this._itemReady(item, function () {
  22072. var currentItemId = _this2.currentItemIdSync = item.componentInstance.itemId || '';
  22073. _this2.$trigger('change', {}, {
  22074. current: _this2.currentSync,
  22075. currentItemId: currentItemId,
  22076. source: source
  22077. });
  22078. });
  22079. }
  22080. },
  22081. /**
  22082. * 自动播放
  22083. */
  22084. _scheduleAutoplay: function _scheduleAutoplay() {
  22085. var self = this;
  22086. this._cancelSchedule();
  22087. function timer() {
  22088. self._timer = null;
  22089. self.currentChangeSource = 'autoplay';
  22090. if (self.circularEnabled) {
  22091. self.currentSync = self._normalizeCurrentValue(self.currentSync + 1);
  22092. } else {
  22093. self.currentSync = self.currentSync + self.displayMultipleItemsNumber < self.items.length ? self.currentSync + 1 : 0;
  22094. }
  22095. self._animateViewport(self.currentSync, 'autoplay', self.circularEnabled ? 1 : 0);
  22096. self._timer = setTimeout(timer, self.intervalNumber);
  22097. }
  22098. if (!(!this._isMounted || this._invalid || this.items.length <= this.displayMultipleItemsNumber)) {
  22099. this._timer = setTimeout(timer, this.intervalNumber);
  22100. }
  22101. },
  22102. /**
  22103. * 清除定时器
  22104. */
  22105. _cancelSchedule: function _cancelSchedule() {
  22106. if (this._timer) {
  22107. clearTimeout(this._timer);
  22108. this._timer = null;
  22109. }
  22110. },
  22111. /**
  22112. * 检查当前页值
  22113. */
  22114. _normalizeCurrentValue: function _normalizeCurrentValue(current) {
  22115. var length = this.items.length;
  22116. if (!length) {
  22117. return -1;
  22118. }
  22119. var index = (Math.round(current) % length + length) % length;
  22120. if (this.circularEnabled) {
  22121. if (length <= this.displayMultipleItemsNumber) {
  22122. return 0;
  22123. }
  22124. } else if (index > length - this.displayMultipleItemsNumber) {
  22125. return length - this.displayMultipleItemsNumber;
  22126. }
  22127. return index;
  22128. },
  22129. _upx2px: function _upx2px(val) {
  22130. if (/\d+[ur]px$/i.test(val)) {
  22131. val.replace(/\d+[ur]px$/i, function (text) {
  22132. return "".concat(uni.upx2px(parseFloat(text)), "px");
  22133. });
  22134. }
  22135. return val || '';
  22136. },
  22137. /**
  22138. * 重新布局
  22139. */
  22140. _resetLayout: function _resetLayout() {
  22141. if (this._isMounted) {
  22142. this._cancelSchedule();
  22143. this._endViewportAnimation();
  22144. var items = this.items;
  22145. for (var i = 0; i < items.length; i++) {
  22146. this._updateItemPos(i, i);
  22147. }
  22148. this._viewportMoveRatio = 1;
  22149. if (this.displayMultipleItemsNumber === 1 && items.length) {
  22150. var itemRect = items[0].componentInstance.$el.getBoundingClientRect();
  22151. var slideFrameRect = this.$refs.slideFrame.getBoundingClientRect();
  22152. this._viewportMoveRatio = itemRect.width / slideFrameRect.width;
  22153. if (!(this._viewportMoveRatio > 0 && this._viewportMoveRatio < 1)) {
  22154. this._viewportMoveRatio = 1;
  22155. }
  22156. }
  22157. var position = this._viewportPosition;
  22158. this._viewportPosition = -2;
  22159. var current = this.currentSync;
  22160. if (current >= 0) {
  22161. this._invalid = false;
  22162. if (this.userTracking) {
  22163. this._updateViewport(position + current - this._contentTrackViewport);
  22164. this._contentTrackViewport = current;
  22165. } else {
  22166. this._updateViewport(current);
  22167. if (this.autoplay) {
  22168. this._scheduleAutoplay();
  22169. }
  22170. }
  22171. } else {
  22172. this._invalid = true;
  22173. this._updateViewport(-this.displayMultipleItemsNumber - 1);
  22174. }
  22175. }
  22176. },
  22177. _checkCircularLayout: function _checkCircularLayout(e) {
  22178. if (!this._invalid) {
  22179. for (var items = this.items, n = items.length, i = e + this.displayMultipleItemsNumber, r = 0; r < n; r++) {
  22180. var item = items[r];
  22181. var _position = item._position;
  22182. var s = Math.floor(e / n) * n + r;
  22183. var l = s + n;
  22184. var c = s - n;
  22185. var u = Math.max(e - (s + 1), s - i, 0);
  22186. var d = Math.max(e - (l + 1), l - i, 0);
  22187. var h = Math.max(e - (c + 1), c - i, 0);
  22188. var p = Math.min(u, d, h);
  22189. var f = [s, l, c][[u, d, h].indexOf(p)];
  22190. if (_position !== f) {
  22191. this._updateItemPos(r, f);
  22192. }
  22193. }
  22194. }
  22195. },
  22196. _updateItemPos: function _updateItemPos(current, position) {
  22197. var x = this.vertical ? '0' : 100 * position + '%';
  22198. var y = this.vertical ? 100 * position + '%' : '0';
  22199. var transform = 'translate(' + x + ', ' + y + ') translateZ(0)';
  22200. var item = this.items[current];
  22201. this._itemReady(item, function () {
  22202. var el = item.componentInstance.$el;
  22203. el.style['-webkit-transform'] = transform;
  22204. el.style.transform = transform;
  22205. el._position = position;
  22206. });
  22207. },
  22208. _updateViewport: function _updateViewport(index) {
  22209. if (!(Math.floor(2 * this._viewportPosition) === Math.floor(2 * index) && Math.ceil(2 * this._viewportPosition) === Math.ceil(2 * index))) {
  22210. if (this.circularEnabled) {
  22211. this._checkCircularLayout(index);
  22212. }
  22213. }
  22214. var x = this.vertical ? '0' : 100 * -index * this._viewportMoveRatio + '%';
  22215. var y = this.vertical ? 100 * -index * this._viewportMoveRatio + '%' : '0';
  22216. var transform = 'translate(' + x + ', ' + y + ') translateZ(0)';
  22217. var slideFrame = this.$refs.slideFrame;
  22218. if (slideFrame) {
  22219. slideFrame.style['-webkit-transform'] = transform;
  22220. slideFrame.style.transform = transform;
  22221. }
  22222. this._viewportPosition = index;
  22223. if (!this._transitionStart) {
  22224. if (index % 1 === 0) {
  22225. return;
  22226. }
  22227. this._transitionStart = index;
  22228. }
  22229. index -= Math.floor(this._transitionStart);
  22230. if (index <= -(this.items.length - 1)) {
  22231. index += this.items.length;
  22232. } else if (index >= this.items.length) {
  22233. index -= this.items.length;
  22234. }
  22235. index = this._transitionStart % 1 > 0.5 || this._transitionStart < 0 ? index - 1 : index;
  22236. this.$trigger('transition', {}, {
  22237. dx: this.vertical ? 0 : index * slideFrame.offsetWidth,
  22238. dy: this.vertical ? index * slideFrame.offsetHeight : 0
  22239. });
  22240. },
  22241. _animateFrameFuncProto: function _animateFrameFuncProto() {
  22242. var _this3 = this;
  22243. if (!this._animating) {
  22244. this._requestedAnimation = false;
  22245. return;
  22246. }
  22247. var _animating = this._animating;
  22248. var toPos = _animating.toPos;
  22249. var acc = _animating.acc;
  22250. var endTime = _animating.endTime;
  22251. var source = _animating.source;
  22252. var time = endTime - Date.now();
  22253. if (time <= 0) {
  22254. this._updateViewport(toPos);
  22255. this._animating = null;
  22256. this._requestedAnimation = false;
  22257. this._transitionStart = null;
  22258. var item = this.items[this.currentSync];
  22259. if (item) {
  22260. this._itemReady(item, function () {
  22261. var currentItemId = item.componentInstance.itemId || '';
  22262. _this3.$trigger('animationfinish', {}, {
  22263. current: _this3.currentSync,
  22264. currentItemId: currentItemId,
  22265. source: source
  22266. });
  22267. });
  22268. }
  22269. return;
  22270. }
  22271. var s = acc * time * time / 2;
  22272. var l = toPos + s;
  22273. this._updateViewport(l);
  22274. this._animationFrame = requestAnimationFrame(this._animateFrameFuncProto.bind(this));
  22275. },
  22276. _animateViewport: function _animateViewport(current, source, n) {
  22277. this._cancelViewportAnimation();
  22278. var duration = this.durationNumber;
  22279. var length = this.items.length;
  22280. var position = this._viewportPosition;
  22281. if (this.circularEnabled) {
  22282. if (n < 0) {
  22283. for (; position < current;) {
  22284. position += length;
  22285. }
  22286. for (; position - length > current;) {
  22287. position -= length;
  22288. }
  22289. } else if (n > 0) {
  22290. for (; position > current;) {
  22291. position -= length;
  22292. }
  22293. for (; position + length < current;) {
  22294. position += length;
  22295. }
  22296. } else {
  22297. for (; position + length < current;) {
  22298. position += length;
  22299. }
  22300. for (; position - length > current;) {
  22301. position -= length;
  22302. }
  22303. if (position + length - current < current - position) {
  22304. position += length;
  22305. }
  22306. }
  22307. }
  22308. this._animating = {
  22309. toPos: current,
  22310. acc: 2 * (position - current) / (duration * duration),
  22311. endTime: Date.now() + duration,
  22312. source: source
  22313. };
  22314. if (!this._requestedAnimation) {
  22315. this._requestedAnimation = true;
  22316. this._animationFrame = requestAnimationFrame(this._animateFrameFuncProto.bind(this));
  22317. }
  22318. },
  22319. _cancelViewportAnimation: function _cancelViewportAnimation() {
  22320. this._animating = null;
  22321. },
  22322. /**
  22323. * 结束动画
  22324. */
  22325. _endViewportAnimation: function _endViewportAnimation() {
  22326. if (this._animating) {
  22327. this._updateViewport(this._animating.toPos);
  22328. this._animating = null;
  22329. }
  22330. },
  22331. _handleTrackStart: function _handleTrackStart() {
  22332. this._cancelSchedule();
  22333. this._contentTrackViewport = this._viewportPosition;
  22334. this._contentTrackSpeed = 0;
  22335. this._contentTrackT = Date.now();
  22336. this._cancelViewportAnimation();
  22337. },
  22338. _handleTrackMove: function _handleTrackMove(data) {
  22339. var self = this;
  22340. var contentTrackT = this._contentTrackT;
  22341. this._contentTrackT = Date.now();
  22342. var length = this.items.length;
  22343. var other = length - this.displayMultipleItemsNumber;
  22344. function calc(val) {
  22345. return 0.5 - 0.25 / (val + 0.5);
  22346. }
  22347. function move(oldVal, newVal) {
  22348. var val = self._contentTrackViewport + oldVal;
  22349. self._contentTrackSpeed = 0.6 * self._contentTrackSpeed + 0.4 * newVal;
  22350. if (!self.circularEnabled) {
  22351. if (val < 0 || val > other) {
  22352. if (val < 0) {
  22353. val = -calc(-val);
  22354. } else {
  22355. if (val > other) {
  22356. val = other + calc(val - other);
  22357. }
  22358. }
  22359. self._contentTrackSpeed = 0;
  22360. }
  22361. }
  22362. self._updateViewport(val);
  22363. }
  22364. var time = this._contentTrackT - contentTrackT || 1;
  22365. if (this.vertical) {
  22366. move(-data.dy / this.$refs.slideFrame.offsetHeight, -data.ddy / time);
  22367. } else {
  22368. move(-data.dx / this.$refs.slideFrame.offsetWidth, -data.ddx / time);
  22369. }
  22370. },
  22371. _handleTrackEnd: function _handleTrackEnd(isCancel) {
  22372. this.userTracking = false;
  22373. var t = this._contentTrackSpeed / Math.abs(this._contentTrackSpeed);
  22374. var n = 0;
  22375. if (!isCancel && Math.abs(this._contentTrackSpeed) > 0.2) {
  22376. n = 0.5 * t;
  22377. }
  22378. var current = this._normalizeCurrentValue(this._viewportPosition + n);
  22379. if (isCancel) {
  22380. this._updateViewport(this._contentTrackViewport);
  22381. } else {
  22382. this.currentChangeSource = 'touch';
  22383. this.currentSync = current;
  22384. this._animateViewport(current, 'touch', n !== 0 ? n : current === 0 && this.circularEnabled && this._viewportPosition >= 1 ? 1 : 0);
  22385. }
  22386. },
  22387. _handleContentTrack: function _handleContentTrack(e) {
  22388. if (this.disableTouch) {
  22389. return;
  22390. }
  22391. if (!this._invalid) {
  22392. if (e.detail.state === 'start') {
  22393. this.userTracking = true;
  22394. this._userDirectionChecked = false;
  22395. return this._handleTrackStart();
  22396. } // fixed by xxxxxx
  22397. if (e.detail.state === 'end') {
  22398. return this._handleTrackEnd(false);
  22399. }
  22400. if (e.detail.state === 'cancel') {
  22401. return this._handleTrackEnd(true);
  22402. }
  22403. if (this.userTracking) {
  22404. if (!this._userDirectionChecked) {
  22405. this._userDirectionChecked = true;
  22406. var t = Math.abs(e.detail.dx);
  22407. var n = Math.abs(e.detail.dy);
  22408. if (t >= n && this.vertical) {
  22409. this.userTracking = false;
  22410. } else {
  22411. if (t <= n && !this.vertical) {
  22412. this.userTracking = false;
  22413. }
  22414. }
  22415. if (!this.userTracking) {
  22416. if (this.autoplay) {
  22417. this._scheduleAutoplay();
  22418. }
  22419. return;
  22420. }
  22421. }
  22422. this._handleTrackMove(e.detail);
  22423. return false;
  22424. }
  22425. }
  22426. }
  22427. },
  22428. render: function render(createElement) {
  22429. var _this4 = this;
  22430. var slidesDots = [];
  22431. var swiperItems = [];
  22432. if (this.$slots.default) {
  22433. deepClone(this.$slots.default, createElement).forEach(function (vnode) {
  22434. if (vnode.componentOptions && vnode.componentOptions.tag === 'v-uni-swiper-item') {
  22435. swiperItems.push(vnode);
  22436. }
  22437. });
  22438. }
  22439. var _loop = function _loop(index, length) {
  22440. var currentSync = _this4.currentSync;
  22441. slidesDots.push(createElement('div', {
  22442. on: {
  22443. click: function click() {
  22444. _this4._animateViewport(_this4.currentSync = index, _this4.currentChangeSource = 'click', _this4.circularEnabled ? 1 : 0);
  22445. }
  22446. },
  22447. class: {
  22448. 'uni-swiper-dot': true,
  22449. 'uni-swiper-dot-active': index < currentSync + _this4.displayMultipleItemsNumber && index >= currentSync || index < currentSync + _this4.displayMultipleItemsNumber - length
  22450. },
  22451. style: {
  22452. background: index === currentSync ? _this4.indicatorActiveColor : _this4.indicatorColor
  22453. }
  22454. }));
  22455. };
  22456. for (var index = 0, length = swiperItems.length; index < length; index++) {
  22457. _loop(index, length);
  22458. }
  22459. this.items = swiperItems;
  22460. var slidesWrapperChild = [createElement('div', {
  22461. ref: 'slides',
  22462. style: this.slidesStyle,
  22463. class: 'uni-swiper-slides'
  22464. }, [createElement('div', {
  22465. ref: 'slideFrame',
  22466. class: 'uni-swiper-slide-frame',
  22467. style: this.slideFrameStyle
  22468. }, swiperItems)])];
  22469. if (this.indicatorDots) {
  22470. slidesWrapperChild.push(createElement('div', {
  22471. ref: 'slidesDots',
  22472. class: ['uni-swiper-dots', this.vertical ? 'uni-swiper-dots-vertical' : 'uni-swiper-dots-horizontal']
  22473. }, slidesDots));
  22474. }
  22475. return createElement('uni-swiper', {
  22476. on: this.$listeners
  22477. }, [createElement('div', {
  22478. ref: 'slidesWrapper',
  22479. class: 'uni-swiper-wrapper'
  22480. }, slidesWrapperChild)]);
  22481. }
  22482. });
  22483. // CONCATENATED MODULE: ./src/core/view/components/swiper/index.vue?vue&type=script&lang=js&
  22484. /* harmony default export */ var components_swipervue_type_script_lang_js_ = (swipervue_type_script_lang_js_);
  22485. // EXTERNAL MODULE: ./src/core/view/components/swiper/index.vue?vue&type=style&index=0&lang=css&
  22486. var swipervue_type_style_index_0_lang_css_ = __webpack_require__(111);
  22487. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  22488. var componentNormalizer = __webpack_require__(0);
  22489. // CONCATENATED MODULE: ./src/core/view/components/swiper/index.vue
  22490. var render, staticRenderFns
  22491. /* normalize component */
  22492. var component = Object(componentNormalizer["a" /* default */])(
  22493. components_swipervue_type_script_lang_js_,
  22494. render,
  22495. staticRenderFns,
  22496. false,
  22497. null,
  22498. null,
  22499. null
  22500. )
  22501. /* hot reload */
  22502. if (false) { var api; }
  22503. component.options.__file = "src/core/view/components/swiper/index.vue"
  22504. /* harmony default export */ var swiper = __webpack_exports__["default"] = (component.exports);
  22505. /***/ }),
  22506. /* 159 */
  22507. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  22508. "use strict";
  22509. // ESM COMPAT FLAG
  22510. __webpack_require__.r(__webpack_exports__);
  22511. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/text/index.vue?vue&type=script&lang=js&
  22512. var SPACE_UNICODE = {
  22513. ensp: "\u2002",
  22514. emsp: "\u2003",
  22515. nbsp: "\xA0"
  22516. };
  22517. /* harmony default export */ var textvue_type_script_lang_js_ = ({
  22518. name: 'Text',
  22519. props: {
  22520. selectable: {
  22521. type: [Boolean, String],
  22522. default: false
  22523. },
  22524. space: {
  22525. type: String,
  22526. default: ''
  22527. },
  22528. decode: {
  22529. type: [Boolean, String],
  22530. default: false
  22531. }
  22532. },
  22533. methods: {
  22534. _decodeHtml: function _decodeHtml(htmlString) {
  22535. if (this.space && SPACE_UNICODE[this.space]) {
  22536. htmlString = htmlString.replace(/ /g, SPACE_UNICODE[this.space]);
  22537. }
  22538. if (this.decode) {
  22539. htmlString = htmlString.replace(/&nbsp;/g, SPACE_UNICODE.nbsp).replace(/&ensp;/g, SPACE_UNICODE.ensp).replace(/&emsp;/g, SPACE_UNICODE.emsp).replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&').replace(/&quot;/g, '"').replace(/&apos;/g, "'");
  22540. }
  22541. return htmlString;
  22542. }
  22543. },
  22544. render: function render(createElement) {
  22545. var _this = this;
  22546. var nodeList = [];
  22547. this.$slots.default && this.$slots.default.forEach(function (vnode) {
  22548. if (vnode.text) {
  22549. // 处理可能出现的多余的转义字符
  22550. var nodeText = vnode.text.replace(/\\n/g, '\n');
  22551. var texts = _this._decodeHtml(nodeText).trim().split('\n');
  22552. texts.forEach(function (text, index) {
  22553. nodeList.push(text);
  22554. if (index !== texts.length - 1) {
  22555. nodeList.push(createElement('br'));
  22556. }
  22557. });
  22558. } else {
  22559. if (vnode.componentOptions && vnode.componentOptions.tag !== 'v-uni-text') {
  22560. console.warn('<text> 组件内只支持嵌套 <text>,不支持其它组件或自定义组件,否则会引发在不同平台的渲染差异。');
  22561. }
  22562. nodeList.push(vnode);
  22563. }
  22564. });
  22565. return createElement('uni-text', {
  22566. on: this.$listeners,
  22567. attrs: {
  22568. selectable: !!this.selectable
  22569. }
  22570. }, [createElement('span', {}, nodeList)]);
  22571. }
  22572. });
  22573. // CONCATENATED MODULE: ./src/core/view/components/text/index.vue?vue&type=script&lang=js&
  22574. /* harmony default export */ var components_textvue_type_script_lang_js_ = (textvue_type_script_lang_js_);
  22575. // EXTERNAL MODULE: ./src/core/view/components/text/index.vue?vue&type=style&index=0&lang=css&
  22576. var textvue_type_style_index_0_lang_css_ = __webpack_require__(113);
  22577. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  22578. var componentNormalizer = __webpack_require__(0);
  22579. // CONCATENATED MODULE: ./src/core/view/components/text/index.vue
  22580. var render, staticRenderFns
  22581. /* normalize component */
  22582. var component = Object(componentNormalizer["a" /* default */])(
  22583. components_textvue_type_script_lang_js_,
  22584. render,
  22585. staticRenderFns,
  22586. false,
  22587. null,
  22588. null,
  22589. null
  22590. )
  22591. /* hot reload */
  22592. if (false) { var api; }
  22593. component.options.__file = "src/core/view/components/text/index.vue"
  22594. /* harmony default export */ var components_text = __webpack_exports__["default"] = (component.exports);
  22595. /***/ }),
  22596. /* 160 */
  22597. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  22598. "use strict";
  22599. // ESM COMPAT FLAG
  22600. __webpack_require__.r(__webpack_exports__);
  22601. // EXTERNAL MODULE: ./src/platforms/app-plus/view/mixins/native.js
  22602. var mixins_native = __webpack_require__(7);
  22603. // EXTERNAL MODULE: ./src/platforms/app-plus/view/mixins/cover.js
  22604. var cover = __webpack_require__(63);
  22605. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/cover-view/index.vue?vue&type=script&lang=js&
  22606. /* harmony default export */ var cover_viewvue_type_script_lang_js_ = ({
  22607. name: 'CoverView',
  22608. mixins: [mixins_native["a" /* default */], cover["a" /* default */]],
  22609. props: {},
  22610. data: function data() {
  22611. return {
  22612. coverType: 'text',
  22613. coverContent: ''
  22614. };
  22615. },
  22616. render: function render(createElement) {
  22617. var coverContent = '';
  22618. var $slots = this.$slots.default || [];
  22619. $slots.forEach(function (node) {
  22620. if (!node.tag) {
  22621. coverContent += node.text || '';
  22622. }
  22623. });
  22624. this.coverContent = coverContent;
  22625. return createElement('uni-cover-view', {
  22626. on: {
  22627. on: this.$listeners
  22628. }
  22629. }, [createElement('div', {
  22630. ref: 'container',
  22631. staticClass: 'uni-cover-view'
  22632. }, [coverContent])]);
  22633. }
  22634. });
  22635. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/cover-view/index.vue?vue&type=script&lang=js&
  22636. /* harmony default export */ var components_cover_viewvue_type_script_lang_js_ = (cover_viewvue_type_script_lang_js_);
  22637. // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/cover-view/index.vue?vue&type=style&index=0&lang=css&
  22638. var cover_viewvue_type_style_index_0_lang_css_ = __webpack_require__(119);
  22639. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  22640. var componentNormalizer = __webpack_require__(0);
  22641. // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/cover-view/index.vue
  22642. var render, staticRenderFns
  22643. /* normalize component */
  22644. var component = Object(componentNormalizer["a" /* default */])(
  22645. components_cover_viewvue_type_script_lang_js_,
  22646. render,
  22647. staticRenderFns,
  22648. false,
  22649. null,
  22650. null,
  22651. null
  22652. )
  22653. /* hot reload */
  22654. if (false) { var api; }
  22655. component.options.__file = "src/platforms/app-plus/view/components/cover-view/index.vue"
  22656. /* harmony default export */ var cover_view = __webpack_exports__["default"] = (component.exports);
  22657. /***/ }),
  22658. /* 161 */
  22659. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  22660. "use strict";
  22661. // ESM COMPAT FLAG
  22662. __webpack_require__.r(__webpack_exports__);
  22663. // EXPORTS
  22664. __webpack_require__.d(__webpack_exports__, "upx2px", function() { return /* reexport */ view["h" /* upx2px */]; });
  22665. __webpack_require__.d(__webpack_exports__, "navigateTo", function() { return /* reexport */ view["d" /* navigateTo */]; });
  22666. __webpack_require__.d(__webpack_exports__, "navigateBack", function() { return /* reexport */ view["c" /* navigateBack */]; });
  22667. __webpack_require__.d(__webpack_exports__, "reLaunch", function() { return /* reexport */ view["e" /* reLaunch */]; });
  22668. __webpack_require__.d(__webpack_exports__, "redirectTo", function() { return /* reexport */ view["f" /* redirectTo */]; });
  22669. __webpack_require__.d(__webpack_exports__, "switchTab", function() { return /* reexport */ view["g" /* switchTab */]; });
  22670. __webpack_require__.d(__webpack_exports__, "getSystemInfoSync", function() { return /* reexport */ view["b" /* getSystemInfoSync */]; });
  22671. __webpack_require__.d(__webpack_exports__, "canIUse", function() { return /* reexport */ view["a" /* canIUse */]; });
  22672. // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
  22673. // This file is imported into lib/wc client bundles.
  22674. if (typeof window !== 'undefined') {
  22675. var currentScript = window.document.currentScript
  22676. if (true) {
  22677. var getCurrentScript = __webpack_require__(86)
  22678. currentScript = getCurrentScript()
  22679. // for backward compatibility, because previously we directly included the polyfill
  22680. if (!('currentScript' in document)) {
  22681. Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
  22682. }
  22683. }
  22684. var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
  22685. if (src) {
  22686. __webpack_require__.p = src[1] // eslint-disable-line
  22687. }
  22688. }
  22689. // Indicate to webpack that this file can be concatenated
  22690. /* harmony default export */ var setPublicPath = (null);
  22691. // EXTERNAL MODULE: ./lib/app-plus/view.js
  22692. var view = __webpack_require__(68);
  22693. // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js
  22694. /***/ })
  22695. /******/ ]);
  22696. });