| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438 |
- (function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory();
- else if(typeof define === 'function' && define.amd)
- define([], factory);
- else if(typeof exports === 'object')
- exports["uni"] = factory();
- else
- root["uni"] = factory();
- })((typeof self !== 'undefined' ? self : this), function() {
- return /******/ (function(modules) { // webpackBootstrap
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId]) {
- /******/ return installedModules[moduleId].exports;
- /******/ }
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ i: moduleId,
- /******/ l: false,
- /******/ exports: {}
- /******/ };
- /******/
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- /******/
- /******/ // Flag the module as loaded
- /******/ module.l = true;
- /******/
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/
- /******/
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/
- /******/ // define getter function for harmony exports
- /******/ __webpack_require__.d = function(exports, name, getter) {
- /******/ if(!__webpack_require__.o(exports, name)) {
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
- /******/ }
- /******/ };
- /******/
- /******/ // define __esModule on exports
- /******/ __webpack_require__.r = function(exports) {
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
- /******/ }
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
- /******/ };
- /******/
- /******/ // create a fake namespace object
- /******/ // mode & 1: value is a module id, require it
- /******/ // mode & 2: merge all properties of value into the ns
- /******/ // mode & 4: return value when already ns object
- /******/ // mode & 8|1: behave like require
- /******/ __webpack_require__.t = function(value, mode) {
- /******/ if(mode & 1) value = __webpack_require__(value);
- /******/ if(mode & 8) return value;
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
- /******/ var ns = Object.create(null);
- /******/ __webpack_require__.r(ns);
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
- /******/ return ns;
- /******/ };
- /******/
- /******/ // getDefaultExport function for compatibility with non-harmony modules
- /******/ __webpack_require__.n = function(module) {
- /******/ var getter = module && module.__esModule ?
- /******/ function getDefault() { return module['default']; } :
- /******/ function getModuleExports() { return module; };
- /******/ __webpack_require__.d(getter, 'a', getter);
- /******/ return getter;
- /******/ };
- /******/
- /******/ // Object.prototype.hasOwnProperty.call
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
- /******/
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "";
- /******/
- /******/
- /******/ // Load entry module and return exports
- /******/ return __webpack_require__(__webpack_require__.s = 161);
- /******/ })
- /************************************************************************/
- /******/ ([
- /* 0 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
- /* globals __VUE_SSR_CONTEXT__ */
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
- // This module is a runtime utility for cleaner component module output and will
- // be included in the final webpack user bundle.
- function normalizeComponent (
- scriptExports,
- render,
- staticRenderFns,
- functionalTemplate,
- injectStyles,
- scopeId,
- moduleIdentifier, /* server only */
- shadowMode /* vue-cli only */
- ) {
- // Vue.extend constructor export interop
- var options = typeof scriptExports === 'function'
- ? scriptExports.options
- : scriptExports
- // render functions
- if (render) {
- options.render = render
- options.staticRenderFns = staticRenderFns
- options._compiled = true
- }
- // functional template
- if (functionalTemplate) {
- options.functional = true
- }
- // scopedId
- if (scopeId) {
- options._scopeId = 'data-v-' + scopeId
- }
- var hook
- if (moduleIdentifier) { // server build
- hook = function (context) {
- // 2.3 injection
- context =
- context || // cached call
- (this.$vnode && this.$vnode.ssrContext) || // stateful
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
- // 2.2 with runInNewContext: true
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
- context = __VUE_SSR_CONTEXT__
- }
- // inject component styles
- if (injectStyles) {
- injectStyles.call(this, context)
- }
- // register component module identifier for async chunk inferrence
- if (context && context._registeredComponents) {
- context._registeredComponents.add(moduleIdentifier)
- }
- }
- // used by ssr in case component is cached and beforeCreate
- // never gets called
- options._ssrRegister = hook
- } else if (injectStyles) {
- hook = shadowMode
- ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
- : injectStyles
- }
- if (hook) {
- if (options.functional) {
- // for template-only hot-reload because in that case the render fn doesn't
- // go through the normalizer
- options._injectStyles = hook
- // register for functional component in vue file
- var originalRender = options.render
- options.render = function renderWithStyleInjection (h, context) {
- hook.call(context)
- return originalRender(h, context)
- }
- } else {
- // inject component registration as beforeCreate hook
- var existing = options.beforeCreate
- options.beforeCreate = existing
- ? [].concat(existing, hook)
- : [hook]
- }
- }
- return {
- exports: scriptExports,
- options: options
- }
- }
- /***/ }),
- /* 1 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // EXPORTS
- __webpack_require__.d(__webpack_exports__, "h", function() { return /* reexport */ supportsPassive; });
- __webpack_require__.d(__webpack_exports__, "d", function() { return /* reexport */ isFn; });
- __webpack_require__.d(__webpack_exports__, "e", function() { return /* reexport */ isPlainObject; });
- __webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ hasOwn; });
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ cached; });
- __webpack_require__.d(__webpack_exports__, "f", function() { return /* reexport */ kebabCase; });
- __webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ disableScrollBounce; });
- __webpack_require__.d(__webpack_exports__, "g", function() { return /* reexport */ plusReady; });
- // UNUSED EXPORTS: isStr, isObject, noop, toRawType, camelize, setProperties, getLen, formatDateTime, updateElementStyle, guid, debounce, looseEqual, hexToRgba, parseQuery, stringifyQuery, callback
- // CONCATENATED MODULE: ./src/shared/env.js
- var supportsPassive = false;
- try {
- var opts = {};
- Object.defineProperty(opts, 'passive', {
- get: function get() {
- /* istanbul ignore next */
- supportsPassive = true;
- }
- }); // https://github.com/facebook/flow/issues/285
- window.addEventListener('test-passive', null, opts);
- } catch (e) {}
- // CONCATENATED MODULE: ./src/shared/util.js
- 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); }
- var _toString = Object.prototype.toString;
- var util_hasOwnProperty = Object.prototype.hasOwnProperty;
- var _completeValue = function _completeValue(value) {
- return value > 9 ? value : '0' + value;
- };
- function isFn(fn) {
- return typeof fn === 'function';
- }
- function isStr(str) {
- return typeof str === 'string';
- }
- function isObject(obj) {
- return obj !== null && _typeof(obj) === 'object';
- }
- function isPlainObject(obj) {
- return _toString.call(obj) === '[object Object]';
- }
- function hasOwn(obj, key) {
- return util_hasOwnProperty.call(obj, key);
- }
- function noop() {}
- function toRawType(val) {
- return _toString.call(val).slice(8, -1);
- }
- /**
- * Create a cached version of a pure function.
- */
- function cached(fn) {
- var cache = Object.create(null);
- return function cachedFn(str) {
- var hit = cache[str];
- return hit || (cache[str] = fn(str));
- };
- }
- /**
- * Camelize a hyphen-delimited string.
- */
- var camelizeRE = /-(\w)/g;
- var camelize = cached(function (str) {
- return str.replace(camelizeRE, function (_, c) {
- return c ? c.toUpperCase() : '';
- });
- });
- function setProperties(item, props, propsData) {
- props.forEach(function (name) {
- if (hasOwn(propsData, name)) {
- item[name] = propsData[name];
- }
- });
- }
- function getLen() {
- var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
- /* eslint-disable no-control-regex */
- return ('' + str).replace(/[^\x00-\xff]/g, '**').length;
- }
- function formatDateTime(_ref) {
- var _ref$date = _ref.date,
- date = _ref$date === void 0 ? new Date() : _ref$date,
- _ref$mode = _ref.mode,
- mode = _ref$mode === void 0 ? 'date' : _ref$mode;
- if (mode === 'time') {
- return _completeValue(date.getHours()) + ':' + _completeValue(date.getMinutes());
- } else {
- return date.getFullYear() + '-' + _completeValue(date.getMonth() + 1) + '-' + _completeValue(date.getDate());
- }
- }
- function updateElementStyle(element, styles) {
- for (var attrName in styles) {
- element.style[attrName] = styles[attrName];
- }
- }
- function guid() {
- return Math.floor(4294967296 * (1 + Math.random())).toString(16).slice(1);
- }
- function debounce(fn, delay) {
- var timeout;
- return function () {
- var _arguments = arguments,
- _this = this;
- clearTimeout(timeout);
- var timerFn = function timerFn() {
- return fn.apply(_this, _arguments);
- };
- timeout = setTimeout(timerFn, delay);
- };
- }
- function kebabCase(string) {
- return string.replace(/[A-Z]/g, function (str) {
- return '-' + str.toLowerCase();
- });
- }
- /**
- * Check if two values are loosely equal - that is,
- * if they are plain objects, do they have the same shape?
- */
- function looseEqual(a, b) {
- if (a === b) return true;
- var isObjectA = isObject(a);
- var isObjectB = isObject(b);
- if (isObjectA && isObjectB) {
- try {
- var isArrayA = Array.isArray(a);
- var isArrayB = Array.isArray(b);
- if (isArrayA && isArrayB) {
- return a.length === b.length && a.every(function (e, i) {
- return looseEqual(e, b[i]);
- });
- } else if (a instanceof Date && b instanceof Date) {
- return a.getTime() === b.getTime();
- } else if (!isArrayA && !isArrayB) {
- var keysA = Object.keys(a);
- var keysB = Object.keys(b);
- return keysA.length === keysB.length && keysA.every(function (key) {
- return looseEqual(a[key], b[key]);
- });
- } else {
- /* istanbul ignore next */
- return false;
- }
- } catch (e) {
- /* istanbul ignore next */
- return false;
- }
- } else if (!isObjectA && !isObjectB) {
- return String(a) === String(b);
- } else {
- return false;
- }
- }
- // CONCATENATED MODULE: ./src/shared/color.js
- function hexToRgba(hex) {
- var r;
- var g;
- var b;
- hex = hex.replace('#', '');
- if (hex.length === 6) {
- r = hex.substring(0, 2);
- g = hex.substring(2, 4);
- b = hex.substring(4, 6);
- } else if (hex.length === 3) {
- r = hex.substring(0, 1);
- g = hex.substring(1, 2);
- b = hex.substring(2, 3);
- } else {
- return false;
- }
- if (r.length === 1) {
- r += r;
- }
- if (g.length === 1) {
- g += g;
- }
- if (b.length === 1) {
- b += b;
- }
- r = parseInt(r, 16);
- g = parseInt(g, 16);
- b = parseInt(b, 16);
- return {
- r: r,
- g: g,
- b: b
- };
- }
- // CONCATENATED MODULE: ./src/shared/query.js
- var encodeReserveRE = /[!'()*]/g;
- var encodeReserveReplacer = function encodeReserveReplacer(c) {
- return '%' + c.charCodeAt(0).toString(16);
- };
- var commaRE = /%2C/g; // fixed encodeURIComponent which is more conformant to RFC3986:
- // - escapes [!'()*]
- // - preserve commas
- var encode = function encode(str) {
- return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
- };
- var decode = decodeURIComponent;
- function parseQuery(query) {
- var res = {};
- query = query.trim().replace(/^(\?|#|&)/, '');
- if (!query) {
- return res;
- }
- query.split('&').forEach(function (param) {
- var parts = param.replace(/\+/g, ' ').split('=');
- var key = decode(parts.shift());
- var val = parts.length > 0 ? decode(parts.join('=')) : null;
- if (res[key] === undefined) {
- res[key] = val;
- } else if (Array.isArray(res[key])) {
- res[key].push(val);
- } else {
- res[key] = [res[key], val];
- }
- });
- return res;
- }
- function stringifyQuery(obj) {
- var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
- var res = obj ? Object.keys(obj).map(function (key) {
- var val = obj[key];
- if (val === undefined) {
- return '';
- }
- if (val === null) {
- return encodeStr(key);
- }
- if (Array.isArray(val)) {
- var result = [];
- val.forEach(function (val2) {
- if (val2 === undefined) {
- return;
- }
- if (val2 === null) {
- result.push(encodeStr(key));
- } else {
- result.push(encodeStr(key) + '=' + encodeStr(val2));
- }
- });
- return result.join('&');
- }
- return encodeStr(key) + '=' + encodeStr(val);
- }).filter(function (x) {
- return x.length > 0;
- }).join('&') : null;
- return res ? "?".concat(res) : '';
- }
- // CONCATENATED MODULE: ./src/shared/platform.js
- function plusReady(callback) {
- if (typeof callback !== 'function') {
- return;
- }
- if (window.plus) {
- return callback();
- }
- document.addEventListener('plusready', callback);
- }
- // CONCATENATED MODULE: ./src/shared/scroll.js
- var view;
- var pullToRefreshStyle;
- var disabled;
- var lastAction = {};
- function disableScrollBounce(_ref) {
- var disable = _ref.disable;
- function exec() {
- if (!view) {
- view = plus.webview.currentWebview();
- }
- if (!disabled) {
- pullToRefreshStyle = (view.getStyle() || {}).pullToRefresh || {};
- }
- disabled = disable;
- if (pullToRefreshStyle.support) {
- view.setPullToRefresh(Object.assign({}, pullToRefreshStyle, {
- support: !disable
- }));
- }
- }
- var time = Date.now();
- if (disable === lastAction.disable && time - lastAction.time < 20) {
- return;
- }
- lastAction.disable = disable;
- lastAction.time = time;
- plusReady(function () {
- if (plus.os.name === 'iOS') {
- // 延迟执行避免iOS13触摸卡死
- setTimeout(exec, 20);
- } else {
- exec();
- }
- });
- }
- // CONCATENATED MODULE: ./src/shared/callback.js
- var id = 0;
- var callbacks = {};
- function warp(fn) {
- return function () {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- var callbackId = String(id++);
- callbacks[callbackId] = {
- success: options.success,
- fail: options.fail,
- complete: options.complete
- };
- var data = Object.assign({}, options); // TODO 下版重构 nvue h5 callback
- // delete data.success
- // delete data.fail
- // delete data.complete
- var res = fn.bind(this)(data, callbackId);
- if (res) {
- invoke(callbackId, res);
- }
- };
- }
- function invoke(callbackId, res) {
- var callback = callbacks[callbackId] || {};
- delete callbacks[callbackId];
- var errMsg = res.errMsg || '';
- if (new RegExp('\\:\\s*fail').test(errMsg)) {
- callback.fail && callback.fail(res);
- } else {
- callback.success && callback.success(res);
- }
- callback.complete && callback.complete(res);
- }
- var callback = {
- warp: warp,
- invoke: invoke
- };
- // CONCATENATED MODULE: ./src/shared/index.js
- /***/ }),
- /* 2 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // EXPORTS
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ emitter; });
- __webpack_require__.d(__webpack_exports__, "d", function() { return /* reexport */ listeners["a" /* default */]; });
- __webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ hover["a" /* default */]; });
- __webpack_require__.d(__webpack_exports__, "e", function() { return /* reexport */ subscriber["a" /* default */]; });
- __webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ keyboard["a" /* default */]; });
- // UNUSED EXPORTS: interact
- // CONCATENATED MODULE: ./src/core/view/mixins/emitter.js
- // 暂不提供通知所有
- // function broadcast (componentName, eventName, ...params) {
- // this.$children.forEach(child => {
- // const name = child.$options.name && child.$options.name.substr(1)
- // if (~componentName.indexOf(name)) {
- // child.$emit.apply(child, [eventName].concat(params))
- // } else {
- // broadcast.apply(child, [componentName, eventName].concat([params]))
- // }
- // })
- // }
- function broadcast(componentName, eventName) {
- var children = this.$children;
- var len = children.length;
- for (var _len = arguments.length, params = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
- params[_key - 2] = arguments[_key];
- }
- for (var i = 0; i < len; i++) {
- var child = children[i];
- var name = child.$options.name && child.$options.name.substr(4);
- if (~componentName.indexOf(name)) {
- child.$emit.apply(child, [eventName].concat(params));
- return false;
- } else {
- if (broadcast.apply(child, [componentName, eventName].concat([params])) === false) {
- return false;
- }
- }
- }
- }
- /* harmony default export */ var emitter = ({
- methods: {
- $dispatch: function $dispatch(componentName, eventName) {
- if (typeof componentName === 'string') {
- componentName = [componentName];
- }
- var parent = this.$parent || this.$root;
- var name = parent.$options.name && parent.$options.name.substr(4);
- while (parent && (!name || !~componentName.indexOf(name))) {
- parent = parent.$parent;
- if (parent) {
- name = parent.$options.name && parent.$options.name.substr(4);
- }
- }
- if (parent) {
- for (var _len2 = arguments.length, params = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
- params[_key2 - 2] = arguments[_key2];
- }
- parent.$emit.apply(parent, [eventName].concat(params));
- }
- },
- $broadcast: function $broadcast(componentName, eventName) {
- if (typeof componentName === 'string') {
- componentName = [componentName];
- }
- for (var _len3 = arguments.length, params = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
- params[_key3 - 2] = arguments[_key3];
- }
- broadcast.apply(this, [componentName, eventName].concat(params));
- }
- }
- });
- // EXTERNAL MODULE: ./src/core/view/mixins/listeners.js
- var listeners = __webpack_require__(69);
- // EXTERNAL MODULE: ./src/core/view/mixins/hover.js
- var hover = __webpack_require__(17);
- // EXTERNAL MODULE: ./src/core/view/mixins/subscriber.js
- var subscriber = __webpack_require__(70);
- // EXTERNAL MODULE: ./src/core/view/mixins/keyboard.js
- var keyboard = __webpack_require__(71);
- // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
- var shared = __webpack_require__(1);
- // CONCATENATED MODULE: ./src/core/view/mixins/interact.js
- var passiveOptions = shared["h" /* supportsPassive */] ? {
- passive: true,
- capture: true
- } : true;
- var vms = [];
- var userInteract = 0;
- var inited;
- function addInteractListener(vm) {
- if (!inited) {
- var eventNames = ['touchstart', 'touchmove', 'touchend', 'mousedown', 'mouseup'];
- eventNames.forEach(function (eventName) {
- document.addEventListener(eventName, function () {
- vms.forEach(function (vm) {
- vm.userInteract = true;
- userInteract++;
- setTimeout(function () {
- userInteract--;
- if (!userInteract) {
- vm.userInteract = false;
- }
- }, 0);
- });
- }, passiveOptions);
- });
- }
- vms.push(vm);
- }
- function removeInteractListener(vm) {
- var index = vms.indexOf(vm);
- if (index >= 0) {
- vms.splice(index, 1);
- }
- }
- /* harmony default export */ var interact = ({
- data: function data() {
- return {
- /**
- * 是否用户交互行为
- */
- userInteract: false
- };
- },
- mounted: function mounted() {
- addInteractListener(this);
- },
- beforeDestroy: function beforeDestroy() {
- removeInteractListener(this);
- }
- });
- // CONCATENATED MODULE: ./src/core/view/mixins/index.js
- /***/ }),
- /* 3 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return PAGE_CREATE; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return MOUNTED_DATA; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return UPDATED_DATA; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return PAGE_CREATED; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return UI_EVENT; });
- /* unused harmony export LAYOUT_READY */
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return VD_SYNC; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return APP_SERVICE_ID; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return WEBVIEW_READY; });
- /* unused harmony export WEBVIEW_UI_EVENT */
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return VD_SYNC_CALLBACK; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return INVOKE_API; });
- /* unused harmony export WEB_INVOKE_APPSERVICE */
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return WEBVIEW_INSERTED; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return WEBVIEW_REMOVED; });
- var PAGE_CREATE = 2;
- var MOUNTED_DATA = 4;
- var UPDATED_DATA = 6;
- var PAGE_CREATED = 10;
- var UI_EVENT = 20;
- var LAYOUT_READY = 30;
- var VD_SYNC = 'vdSync';
- var APP_SERVICE_ID = '__uniapp__service';
- var WEBVIEW_READY = 'webviewReady';
- var WEBVIEW_UI_EVENT = 'webviewUIEvent';
- var VD_SYNC_CALLBACK = 'vdSyncCallback';
- var INVOKE_API = 'invokeApi';
- var WEB_INVOKE_APPSERVICE = 'WEB_INVOKE_APPSERVICE';
- var WEBVIEW_INSERTED = 'webviewInserted';
- var WEBVIEW_REMOVED = 'webviewRemoved';
- /***/ }),
- /* 4 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // EXPORTS
- __webpack_require__.d(__webpack_exports__, "on", function() { return /* binding */ on; });
- __webpack_require__.d(__webpack_exports__, "off", function() { return /* binding */ off; });
- __webpack_require__.d(__webpack_exports__, "once", function() { return /* binding */ once; });
- __webpack_require__.d(__webpack_exports__, "emit", function() { return /* binding */ emit; });
- __webpack_require__.d(__webpack_exports__, "subscribe", function() { return /* binding */ view_bridge_subscribe; });
- __webpack_require__.d(__webpack_exports__, "unsubscribe", function() { return /* binding */ unsubscribe; });
- __webpack_require__.d(__webpack_exports__, "subscribeHandler", function() { return /* binding */ subscribeHandler; });
- __webpack_require__.d(__webpack_exports__, "publishHandler", function() { return /* reexport */ bridge["a" /* publishHandler */]; });
- // EXTERNAL MODULE: ./packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.esm.js
- var vue_runtime_esm = __webpack_require__(8);
- // CONCATENATED MODULE: ./src/core/view/bridge/subscribe/api/set-page-meta.js
- function setPageMeta(_ref) {
- var pageStyle = _ref.pageStyle,
- rootFontSize = _ref.rootFontSize;
- var pageElm = document.querySelector('uni-page-body') || document.body;
- pageElm.setAttribute('style', pageStyle);
- if (rootFontSize && document.documentElement.style.fontSize !== rootFontSize) {
- document.documentElement.style.fontSize = rootFontSize;
- }
- }
- // EXTERNAL MODULE: ./src/core/view/bridge/subscribe/api/request-component-info.js
- var request_component_info = __webpack_require__(75);
- // EXTERNAL MODULE: ./src/core/view/bridge/subscribe/api/request-component-observer.js
- var request_component_observer = __webpack_require__(66);
- // CONCATENATED MODULE: ./src/core/view/bridge/subscribe/api/index.js
- /* harmony default export */ var api = ({
- setPageMeta: setPageMeta,
- requestComponentInfo: request_component_info["a" /* requestComponentInfo */],
- requestComponentObserver: request_component_observer["b" /* requestComponentObserver */],
- destroyComponentObserver: request_component_observer["a" /* destroyComponentObserver */]
- });
- // EXTERNAL MODULE: ./src/core/view/bridge/subscribe/scroll.js
- var subscribe_scroll = __webpack_require__(13);
- // EXTERNAL MODULE: ./src/core/view/bridge/subscribe/font.js
- var font = __webpack_require__(76);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/bridge/subscribe/index.js
- var bridge_subscribe = __webpack_require__(77);
- // CONCATENATED MODULE: ./src/core/view/bridge/subscribe/index.js
- function initSubscribe(subscribe) {
- Object.keys(api).forEach(function (name) {
- subscribe(name, api[name]);
- });
- subscribe('pageScrollTo', subscribe_scroll["c" /* pageScrollTo */]);
- subscribe('loadFontFace', font["a" /* loadFontFace */]);
- Object(bridge_subscribe["a" /* default */])(subscribe);
- }
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/bridge.js
- var bridge = __webpack_require__(12);
- // CONCATENATED MODULE: ./src/core/view/bridge/index.js
- var Emitter = new vue_runtime_esm["a" /* default */]();
- var on = Emitter.$on.bind(Emitter);
- var off = Emitter.$off.bind(Emitter);
- var once = Emitter.$once.bind(Emitter);
- var emit = Emitter.$emit.bind(Emitter);
- function view_bridge_subscribe(event, callback) {
- return on('service.' + event, callback);
- }
- function unsubscribe(event, callback) {
- return off('service.' + event, callback);
- }
- function subscribeHandler(event, args, pageId) {
- if (true) {
- console.log("[subscribeHandler][".concat(Date.now(), "]:").concat(event, ", ").concat(JSON.stringify(args), ", ").concat(pageId));
- }
- emit('service.' + event, args, pageId);
- }
- initSubscribe(view_bridge_subscribe);
- /***/ }),
- /* 5 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var attrs = ['top', 'left', 'right', 'bottom'];
- var inited;
- var elementComputedStyle = {};
- var support;
- function getSupport() {
- if (!('CSS' in window) || typeof CSS.supports != 'function') {
- support = '';
- }
- else if (CSS.supports('top: env(safe-area-inset-top)')) {
- support = 'env';
- }
- else if (CSS.supports('top: constant(safe-area-inset-top)')) {
- support = 'constant';
- }
- else {
- support = '';
- }
- return support;
- }
- function init() {
- support = typeof support === 'string' ? support : getSupport();
- if (!support) {
- attrs.forEach(function (attr) {
- elementComputedStyle[attr] = 0;
- });
- return;
- }
- function setStyle(el, style) {
- var elStyle = el.style;
- Object.keys(style).forEach(function (key) {
- var val = style[key];
- elStyle[key] = val;
- });
- }
- var cbs = [];
- function parentReady(callback) {
- if (callback) {
- cbs.push(callback);
- }
- else {
- cbs.forEach(function (cb) {
- cb();
- });
- }
- }
- var passiveEvents = false;
- try {
- var opts = Object.defineProperty({}, 'passive', {
- get: function () {
- passiveEvents = { passive: true };
- }
- });
- window.addEventListener('test', null, opts);
- }
- catch (e) {
- }
- function addChild(parent, attr) {
- var a1 = document.createElement('div');
- var a2 = document.createElement('div');
- var a1Children = document.createElement('div');
- var a2Children = document.createElement('div');
- var W = 100;
- var MAX = 10000;
- var aStyle = {
- position: 'absolute',
- width: W + 'px',
- height: '200px',
- boxSizing: 'border-box',
- overflow: 'hidden',
- paddingBottom: support + "(safe-area-inset-" + attr + ")"
- };
- setStyle(a1, aStyle);
- setStyle(a2, aStyle);
- setStyle(a1Children, {
- transition: '0s',
- animation: 'none',
- width: '400px',
- height: '400px'
- });
- setStyle(a2Children, {
- transition: '0s',
- animation: 'none',
- width: '250%',
- height: '250%'
- });
- a1.appendChild(a1Children);
- a2.appendChild(a2Children);
- parent.appendChild(a1);
- parent.appendChild(a2);
- parentReady(function () {
- a1.scrollTop = a2.scrollTop = MAX;
- var a1LastScrollTop = a1.scrollTop;
- var a2LastScrollTop = a2.scrollTop;
- function onScroll() {
- if (this.scrollTop === (this === a1 ? a1LastScrollTop : a2LastScrollTop)) {
- return;
- }
- a1.scrollTop = a2.scrollTop = MAX;
- a1LastScrollTop = a1.scrollTop;
- a2LastScrollTop = a2.scrollTop;
- attrChange(attr);
- }
- a1.addEventListener('scroll', onScroll, passiveEvents);
- a2.addEventListener('scroll', onScroll, passiveEvents);
- });
- var computedStyle = getComputedStyle(a1);
- Object.defineProperty(elementComputedStyle, attr, {
- configurable: true,
- get: function () {
- return parseFloat(computedStyle.paddingBottom);
- }
- });
- }
- var parentDiv = document.createElement('div');
- setStyle(parentDiv, {
- position: 'absolute',
- left: '0',
- top: '0',
- width: '0',
- height: '0',
- zIndex: '-1',
- overflow: 'hidden',
- visibility: 'hidden',
- });
- attrs.forEach(function (key) {
- addChild(parentDiv, key);
- });
- document.body.appendChild(parentDiv);
- parentReady();
- inited = true;
- }
- function getAttr(attr) {
- if (!inited) {
- init();
- }
- return elementComputedStyle[attr];
- }
- var changeAttrs = [];
- function attrChange(attr) {
- if (!changeAttrs.length) {
- setTimeout(function () {
- var style = {};
- changeAttrs.forEach(function (attr) {
- style[attr] = elementComputedStyle[attr];
- });
- changeAttrs.length = 0;
- callbacks.forEach(function (callback) {
- callback(style);
- });
- }, 0);
- }
- changeAttrs.push(attr);
- }
- var callbacks = [];
- function onChange(callback) {
- if (!getSupport()) {
- return;
- }
- if (!inited) {
- init();
- }
- if (typeof callback === 'function') {
- callbacks.push(callback);
- }
- }
- function offChange(callback) {
- var index = callbacks.indexOf(callback);
- if (index >= 0) {
- callbacks.splice(index, 1);
- }
- }
- var safeAreaInsets = {
- get support() {
- return (typeof support === 'string' ? support : getSupport()).length != 0;
- },
- get top() {
- return getAttr('top');
- },
- get left() {
- return getAttr('left');
- },
- get right() {
- return getAttr('right');
- },
- get bottom() {
- return getAttr('bottom');
- },
- onChange: onChange,
- offChange: offChange
- };
- module.exports = safeAreaInsets;
- //# sourceMappingURL=index.js.map
- /***/ }),
- /* 6 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isPage; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hasLifecycleHook; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return normalizeDataset; });
- /* unused harmony export upx2px */
- var components = ['SystemAsyncLoading', 'SystemAsyncError'];
- function isPage(vm) {
- if (vm.$parent && vm.$parent.$options.name === 'PageBody') {
- if (components.indexOf(vm.$options.name) !== -1) {
- return false;
- }
- return true;
- }
- return false;
- }
- function hasLifecycleHook() {
- var vueOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- var hook = arguments.length > 1 ? arguments[1] : undefined;
- return Array.isArray(vueOptions[hook]) && vueOptions[hook].length;
- }
- function normalizeDataset() {
- var dataset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- // ios8.x,9.x Object.assign({},dataset) 始终返回 {}
- // http://ask.dcloud.net.cn/question/70246
- var result = JSON.parse(JSON.stringify(dataset));
- if (false) { var _len, key, i, len, keys; }
- return result;
- }
- function upx2px(str) {
- str = str + '';
- if (str.indexOf('upx') !== -1) {
- // upx转换
- return uni.upx2px(parseInt(str) || 0);
- }
- return parseInt(str) || 0;
- }
- /***/ }),
- /* 7 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var TITLEBAR_HEIGHT = 44;
- function getStatusbarHeight() {
- // 横屏时 iOS 获取的状态栏高度错误,进行纠正
- return plus.navigator.isImmersedStatusbar() ? Math.round(plus.os.name === 'iOS' ? plus.navigator.getSafeAreaInsets().top : plus.navigator.getStatusbarHeight()) : 0;
- }
- function getNavigationBarHeight() {
- var webview = plus.webview.currentWebview();
- var style = webview.getStyle();
- style = style && style.titleNView;
- if (style && style.type === 'default') {
- return TITLEBAR_HEIGHT + getStatusbarHeight();
- }
- return 0;
- }
- function getFixed($el) {
- var fixed;
- while ($el) {
- var style = getComputedStyle($el);
- var transform = style.transform || style.webkitTransform;
- fixed = transform && transform !== 'none' ? false : fixed;
- fixed = style.position === 'fixed' ? true : fixed;
- $el = $el.parentElement;
- }
- return fixed;
- }
- /* harmony default export */ __webpack_exports__["a"] = ({
- name: 'Native',
- data: function data() {
- return {
- position: {
- top: '0px',
- left: '0px',
- width: '0px',
- height: '0px',
- position: 'static'
- },
- hidden: false
- };
- },
- created: function created() {
- this.isNative = true;
- this.onCanInsertCallbacks = [];
- },
- mounted: function mounted() {
- var _this = this;
- this._updatePosition();
- this.$nextTick(function () {
- _this.onCanInsertCallbacks.forEach(function (callback) {
- return callback();
- });
- });
- this.$on('uni-view-update', this._requestPositionUpdate);
- },
- methods: {
- _updatePosition: function _updatePosition() {
- var rect = (this.$refs.container || this.$el).getBoundingClientRect();
- this.hidden = rect.width === 0 || rect.height === 0;
- if (!this.hidden) {
- var position = this.position;
- position.position = getFixed(this.$el) ? 'absolute' : 'static';
- var keys = ['top', 'left', 'width', 'height'];
- keys.forEach(function (key) {
- var val = rect[key];
- val = key === 'top' ? val + (position.position === 'static' ? document.documentElement.scrollTop || document.body.scrollTop || 0 : getNavigationBarHeight()) : val;
- position[key] = val + 'px';
- });
- }
- },
- _requestPositionUpdate: function _requestPositionUpdate() {
- var _this2 = this;
- if (this._positionUpdateRequest) {
- cancelAnimationFrame(this._positionUpdateRequest);
- }
- this._positionUpdateRequest = requestAnimationFrame(function () {
- delete _this2._positionUpdateRequest;
- _this2._updatePosition();
- });
- }
- }
- });
- /***/ }),
- /* 8 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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); }
- /*!
- * Vue.js v2.6.11
- * (c) 2014-2020 Evan You
- * Released under the MIT License.
- */
- /* */
- var emptyObject = Object.freeze({}); // These helpers produce better VM code in JS engines due to their
- // explicitness and function inlining.
- function isUndef(v) {
- return v === undefined || v === null;
- }
- function isDef(v) {
- return v !== undefined && v !== null;
- }
- function isTrue(v) {
- return v === true;
- }
- function isFalse(v) {
- return v === false;
- }
- /**
- * Check if value is primitive.
- */
- function isPrimitive(value) {
- return typeof value === 'string' || typeof value === 'number' || // $flow-disable-line
- _typeof(value) === 'symbol' || typeof value === 'boolean';
- }
- /**
- * Quick object check - this is primarily used to tell
- * Objects from primitive values when we know the value
- * is a JSON-compliant type.
- */
- function isObject(obj) {
- return obj !== null && _typeof(obj) === 'object';
- }
- /**
- * Get the raw type string of a value, e.g., [object Object].
- */
- var _toString = Object.prototype.toString;
- function toRawType(value) {
- return _toString.call(value).slice(8, -1);
- }
- /**
- * Strict object type check. Only returns true
- * for plain JavaScript objects.
- */
- function isPlainObject(obj) {
- return _toString.call(obj) === '[object Object]';
- }
- function isRegExp(v) {
- return _toString.call(v) === '[object RegExp]';
- }
- /**
- * Check if val is a valid array index.
- */
- function isValidArrayIndex(val) {
- var n = parseFloat(String(val));
- return n >= 0 && Math.floor(n) === n && isFinite(val);
- }
- function isPromise(val) {
- return isDef(val) && typeof val.then === 'function' && typeof val.catch === 'function';
- }
- /**
- * Convert a value to a string that is actually rendered.
- */
- function toString(val) {
- return val == null ? '' : Array.isArray(val) || isPlainObject(val) && val.toString === _toString ? JSON.stringify(val, null, 2) : String(val);
- }
- /**
- * Convert an input value to a number for persistence.
- * If the conversion fails, return original string.
- */
- function toNumber(val) {
- var n = parseFloat(val);
- return isNaN(n) ? val : n;
- }
- /**
- * Make a map and return a function for checking if a key
- * is in that map.
- */
- function makeMap(str, expectsLowerCase) {
- var map = Object.create(null);
- var list = str.split(',');
- for (var i = 0; i < list.length; i++) {
- map[list[i]] = true;
- }
- return expectsLowerCase ? function (val) {
- return map[val.toLowerCase()];
- } : function (val) {
- return map[val];
- };
- }
- /**
- * Check if a tag is a built-in tag.
- */
- var isBuiltInTag = makeMap('slot,component', true);
- /**
- * Check if an attribute is a reserved attribute.
- */
- var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
- /**
- * Remove an item from an array.
- */
- function remove(arr, item) {
- if (arr.length) {
- var index = arr.indexOf(item);
- if (index > -1) {
- return arr.splice(index, 1);
- }
- }
- }
- /**
- * Check whether an object has the property.
- */
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- function hasOwn(obj, key) {
- return hasOwnProperty.call(obj, key);
- }
- /**
- * Create a cached version of a pure function.
- */
- function cached(fn) {
- var cache = Object.create(null);
- return function cachedFn(str) {
- var hit = cache[str];
- return hit || (cache[str] = fn(str));
- };
- }
- /**
- * Camelize a hyphen-delimited string.
- */
- var camelizeRE = /-(\w)/g;
- var camelize = cached(function (str) {
- return str.replace(camelizeRE, function (_, c) {
- return c ? c.toUpperCase() : '';
- });
- });
- /**
- * Capitalize a string.
- */
- var capitalize = cached(function (str) {
- return str.charAt(0).toUpperCase() + str.slice(1);
- });
- /**
- * Hyphenate a camelCase string.
- */
- var hyphenateRE = /\B([A-Z])/g;
- var hyphenate = cached(function (str) {
- return str.replace(hyphenateRE, '-$1').toLowerCase();
- });
- /**
- * Simple bind polyfill for environments that do not support it,
- * e.g., PhantomJS 1.x. Technically, we don't need this anymore
- * since native bind is now performant enough in most browsers.
- * But removing it would mean breaking code that was able to run in
- * PhantomJS 1.x, so this must be kept for backward compatibility.
- */
- /* istanbul ignore next */
- function polyfillBind(fn, ctx) {
- function boundFn(a) {
- var l = arguments.length;
- return l ? l > 1 ? fn.apply(ctx, arguments) : fn.call(ctx, a) : fn.call(ctx);
- }
- boundFn._length = fn.length;
- return boundFn;
- }
- function nativeBind(fn, ctx) {
- return fn.bind(ctx);
- }
- var bind = Function.prototype.bind ? nativeBind : polyfillBind;
- /**
- * Convert an Array-like object to a real Array.
- */
- function toArray(list, start) {
- start = start || 0;
- var i = list.length - start;
- var ret = new Array(i);
- while (i--) {
- ret[i] = list[i + start];
- }
- return ret;
- }
- /**
- * Mix properties into target object.
- */
- function extend(to, _from) {
- for (var key in _from) {
- to[key] = _from[key];
- }
- return to;
- }
- /**
- * Merge an Array of Objects into a single Object.
- */
- function toObject(arr) {
- var res = {};
- for (var i = 0; i < arr.length; i++) {
- if (arr[i]) {
- extend(res, arr[i]);
- }
- }
- return res;
- }
- /* eslint-disable no-unused-vars */
- /**
- * Perform no operation.
- * Stubbing args to make Flow happy without leaving useless transpiled code
- * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
- */
- function noop(a, b, c) {}
- /**
- * Always return false.
- */
- var no = function no(a, b, c) {
- return false;
- };
- /* eslint-enable no-unused-vars */
- /**
- * Return the same value.
- */
- var identity = function identity(_) {
- return _;
- };
- /**
- * Check if two values are loosely equal - that is,
- * if they are plain objects, do they have the same shape?
- */
- function looseEqual(a, b) {
- if (a === b) {
- return true;
- }
- var isObjectA = isObject(a);
- var isObjectB = isObject(b);
- if (isObjectA && isObjectB) {
- try {
- var isArrayA = Array.isArray(a);
- var isArrayB = Array.isArray(b);
- if (isArrayA && isArrayB) {
- return a.length === b.length && a.every(function (e, i) {
- return looseEqual(e, b[i]);
- });
- } else if (a instanceof Date && b instanceof Date) {
- return a.getTime() === b.getTime();
- } else if (!isArrayA && !isArrayB) {
- var keysA = Object.keys(a);
- var keysB = Object.keys(b);
- return keysA.length === keysB.length && keysA.every(function (key) {
- return looseEqual(a[key], b[key]);
- });
- } else {
- /* istanbul ignore next */
- return false;
- }
- } catch (e) {
- /* istanbul ignore next */
- return false;
- }
- } else if (!isObjectA && !isObjectB) {
- return String(a) === String(b);
- } else {
- return false;
- }
- }
- /**
- * Return the first index at which a loosely equal value can be
- * found in the array (if value is a plain object, the array must
- * contain an object of the same shape), or -1 if it is not present.
- */
- function looseIndexOf(arr, val) {
- for (var i = 0; i < arr.length; i++) {
- if (looseEqual(arr[i], val)) {
- return i;
- }
- }
- return -1;
- }
- /**
- * Ensure a function is called only once.
- */
- function once(fn) {
- var called = false;
- return function () {
- if (!called) {
- called = true;
- fn.apply(this, arguments);
- }
- };
- }
- var SSR_ATTR = 'data-server-rendered';
- var ASSET_TYPES = ['component', 'directive', 'filter'];
- var LIFECYCLE_HOOKS = ['beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUpdate', 'updated', 'beforeDestroy', 'destroyed', 'activated', 'deactivated', 'errorCaptured', 'serverPrefetch'];
- /* */
- var config = {
- /**
- * Option merge strategies (used in core/util/options)
- */
- // $flow-disable-line
- optionMergeStrategies: Object.create(null),
- /**
- * Whether to suppress warnings.
- */
- silent: false,
- /**
- * Show production mode tip message on boot?
- */
- productionTip: "development" !== 'production',
- /**
- * Whether to enable devtools
- */
- devtools: "development" !== 'production',
- /**
- * Whether to record perf
- */
- performance: false,
- /**
- * Error handler for watcher errors
- */
- errorHandler: null,
- /**
- * Warn handler for watcher warns
- */
- warnHandler: null,
- /**
- * Ignore certain custom elements
- */
- ignoredElements: [],
- /**
- * Custom user key aliases for v-on
- */
- // $flow-disable-line
- keyCodes: Object.create(null),
- /**
- * Check if a tag is reserved so that it cannot be registered as a
- * component. This is platform-dependent and may be overwritten.
- */
- isReservedTag: no,
- /**
- * Check if an attribute is reserved so that it cannot be used as a component
- * prop. This is platform-dependent and may be overwritten.
- */
- isReservedAttr: no,
- /**
- * Check if a tag is an unknown element.
- * Platform-dependent.
- */
- isUnknownElement: no,
- /**
- * Get the namespace of an element
- */
- getTagNamespace: noop,
- /**
- * Parse the real tag name for the specific platform.
- */
- parsePlatformTagName: identity,
- /**
- * Check if an attribute must be bound using property, e.g. value
- * Platform-dependent.
- */
- mustUseProp: no,
- /**
- * Perform updates asynchronously. Intended to be used by Vue Test Utils
- * This will significantly reduce performance if set to false.
- */
- async: true,
- /**
- * Exposed for legacy reasons
- */
- _lifecycleHooks: LIFECYCLE_HOOKS
- };
- /* */
- /**
- * unicode letters used for parsing html tags, component names and property paths.
- * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
- * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
- */
- 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/;
- /**
- * Check if a string starts with $ or _
- */
- function isReserved(str) {
- var c = (str + '').charCodeAt(0);
- return c === 0x24 || c === 0x5F;
- }
- /**
- * Define a property.
- */
- function def(obj, key, val, enumerable) {
- Object.defineProperty(obj, key, {
- value: val,
- enumerable: !!enumerable,
- writable: true,
- configurable: true
- });
- }
- /**
- * Parse simple path.
- */
- var bailRE = new RegExp("[^" + unicodeRegExp.source + ".$_\\d]");
- function parsePath(path) {
- if (bailRE.test(path)) {
- return;
- }
- var segments = path.split('.');
- return function (obj) {
- for (var i = 0; i < segments.length; i++) {
- if (!obj) {
- return;
- }
- obj = obj[segments[i]];
- }
- return obj;
- };
- }
- /* */
- // can we use __proto__?
- var hasProto = ('__proto__' in {}); // Browser environment sniffing
- var inBrowser = typeof window !== 'undefined';
- var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
- var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
- var UA = inBrowser && window.navigator.userAgent.toLowerCase();
- var isIE = UA && /msie|trident/.test(UA);
- var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
- var isEdge = UA && UA.indexOf('edge/') > 0;
- var isAndroid = UA && UA.indexOf('android') > 0 || weexPlatform === 'android';
- var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA) || weexPlatform === 'ios';
- var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
- var isPhantomJS = UA && /phantomjs/.test(UA);
- var isFF = UA && UA.match(/firefox\/(\d+)/); // Firefox has a "watch" function on Object.prototype...
- var nativeWatch = {}.watch;
- var supportsPassive = false;
- if (inBrowser) {
- try {
- var opts = {};
- Object.defineProperty(opts, 'passive', {
- get: function get() {
- /* istanbul ignore next */
- supportsPassive = true;
- }
- }); // https://github.com/facebook/flow/issues/285
- window.addEventListener('test-passive', null, opts);
- } catch (e) {}
- } // this needs to be lazy-evaled because vue may be required before
- // vue-server-renderer can set VUE_ENV
- var _isServer;
- var isServerRendering = function isServerRendering() {
- if (_isServer === undefined) {
- /* istanbul ignore if */
- if (!inBrowser && !inWeex && typeof global !== 'undefined') {
- // detect presence of vue-server-renderer and avoid
- // Webpack shimming the process
- _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
- } else {
- _isServer = false;
- }
- }
- return _isServer;
- }; // detect devtools
- var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
- /* istanbul ignore next */
- function isNative(Ctor) {
- return typeof Ctor === 'function' && /native code/.test(Ctor.toString());
- }
- var hasSymbol = typeof Symbol !== 'undefined' && isNative(Symbol) && typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
- var _Set;
- /* istanbul ignore if */
- // $flow-disable-line
- if (typeof Set !== 'undefined' && isNative(Set)) {
- // use native Set when available.
- _Set = Set;
- } else {
- // a non-standard Set polyfill that only works with primitive keys.
- _Set = /*@__PURE__*/function () {
- function Set() {
- this.set = Object.create(null);
- }
- Set.prototype.has = function has(key) {
- return this.set[key] === true;
- };
- Set.prototype.add = function add(key) {
- this.set[key] = true;
- };
- Set.prototype.clear = function clear() {
- this.set = Object.create(null);
- };
- return Set;
- }();
- }
- /* */
- var warn = noop;
- var tip = noop;
- var generateComponentTrace = noop; // work around flow check
- var formatComponentName = noop;
- if (true) {
- var hasConsole = typeof console !== 'undefined';
- var classifyRE = /(?:^|[-_])(\w)/g;
- var classify = function classify(str) {
- return str.replace(classifyRE, function (c) {
- return c.toUpperCase();
- }).replace(/[-_]/g, '');
- };
- warn = function warn(msg, vm) {
- var trace = vm ? generateComponentTrace(vm) : '';
- if (config.warnHandler) {
- config.warnHandler.call(null, msg, vm, trace);
- } else if (hasConsole && !config.silent) {
- console.error("[Vue warn]: " + msg + trace);
- }
- };
- tip = function tip(msg, vm) {
- if (hasConsole && !config.silent) {
- console.warn("[Vue tip]: " + msg + (vm ? generateComponentTrace(vm) : ''));
- }
- };
- formatComponentName = function formatComponentName(vm, includeFile) {
- if (vm.$root === vm) {
- return '<Root>';
- }
- var options = typeof vm === 'function' && vm.cid != null ? vm.options : vm._isVue ? vm.$options || vm.constructor.options : vm;
- var name = options.name || options._componentTag;
- var file = options.__file;
- if (!name && file) {
- var match = file.match(/([^/\\]+)\.vue$/);
- name = match && match[1];
- }
- return (name ? "<" + classify(name) + ">" : "<Anonymous>") + (file && includeFile !== false ? " at " + file : '');
- };
- var repeat = function repeat(str, n) {
- var res = '';
- while (n) {
- if (n % 2 === 1) {
- res += str;
- }
- if (n > 1) {
- str += str;
- }
- n >>= 1;
- }
- return res;
- };
- generateComponentTrace = function generateComponentTrace(vm) {
- if (vm._isVue && vm.$parent) {
- var tree = [];
- var currentRecursiveSequence = 0;
- while (vm) {
- if (tree.length > 0) {
- var last = tree[tree.length - 1];
- if (last.constructor === vm.constructor) {
- currentRecursiveSequence++;
- vm = vm.$parent;
- continue;
- } else if (currentRecursiveSequence > 0) {
- tree[tree.length - 1] = [last, currentRecursiveSequence];
- currentRecursiveSequence = 0;
- }
- }
- tree.push(vm);
- vm = vm.$parent;
- }
- return '\n\nfound in\n\n' + tree.map(function (vm, i) {
- return "" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm) ? formatComponentName(vm[0]) + "... (" + vm[1] + " recursive calls)" : formatComponentName(vm));
- }).join('\n');
- } else {
- return "\n\n(found in " + formatComponentName(vm) + ")";
- }
- };
- }
- /* */
- var uid = 0;
- /**
- * A dep is an observable that can have multiple
- * directives subscribing to it.
- */
- var Dep = function Dep() {
- // fixed by xxxxxx (nvue vuex)
- /* eslint-disable no-undef */
- if (typeof SharedObject !== 'undefined') {
- this.id = SharedObject.uid++;
- } else {
- this.id = uid++;
- }
- this.subs = [];
- };
- Dep.prototype.addSub = function addSub(sub) {
- this.subs.push(sub);
- };
- Dep.prototype.removeSub = function removeSub(sub) {
- remove(this.subs, sub);
- };
- Dep.prototype.depend = function depend() {
- if (Dep.SharedObject.target) {
- Dep.SharedObject.target.addDep(this);
- }
- };
- Dep.prototype.notify = function notify() {
- // stabilize the subscriber list first
- var subs = this.subs.slice();
- if ( true && !config.async) {
- // subs aren't sorted in scheduler if not running async
- // we need to sort them now to make sure they fire in correct
- // order
- subs.sort(function (a, b) {
- return a.id - b.id;
- });
- }
- for (var i = 0, l = subs.length; i < l; i++) {
- subs[i].update();
- }
- }; // The current target watcher being evaluated.
- // This is globally unique because only one watcher
- // can be evaluated at a time.
- // fixed by xxxxxx (nvue shared vuex)
- /* eslint-disable no-undef */
- Dep.SharedObject = typeof SharedObject !== 'undefined' ? SharedObject : {};
- Dep.SharedObject.target = null;
- Dep.SharedObject.targetStack = [];
- function pushTarget(target) {
- Dep.SharedObject.targetStack.push(target);
- Dep.SharedObject.target = target;
- }
- function popTarget() {
- Dep.SharedObject.targetStack.pop();
- Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
- }
- /* */
- var VNode = function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) {
- this.tag = tag;
- this.data = data;
- this.children = children;
- this.text = text;
- this.elm = elm;
- this.ns = undefined;
- this.context = context;
- this.fnContext = undefined;
- this.fnOptions = undefined;
- this.fnScopeId = undefined;
- this.key = data && data.key;
- this.componentOptions = componentOptions;
- this.componentInstance = undefined;
- this.parent = undefined;
- this.raw = false;
- this.isStatic = false;
- this.isRootInsert = true;
- this.isComment = false;
- this.isCloned = false;
- this.isOnce = false;
- this.asyncFactory = asyncFactory;
- this.asyncMeta = undefined;
- this.isAsyncPlaceholder = false;
- };
- var prototypeAccessors = {
- child: {
- configurable: true
- }
- }; // DEPRECATED: alias for componentInstance for backwards compat.
- /* istanbul ignore next */
- prototypeAccessors.child.get = function () {
- return this.componentInstance;
- };
- Object.defineProperties(VNode.prototype, prototypeAccessors);
- var createEmptyVNode = function createEmptyVNode(text) {
- if (text === void 0) text = '';
- var node = new VNode();
- node.text = text;
- node.isComment = true;
- return node;
- };
- function createTextVNode(val) {
- return new VNode(undefined, undefined, undefined, String(val));
- } // optimized shallow clone
- // used for static nodes and slot nodes because they may be reused across
- // multiple renders, cloning them avoids errors when DOM manipulations rely
- // on their elm reference.
- function cloneVNode(vnode) {
- var cloned = new VNode(vnode.tag, vnode.data, // #7975
- // clone children array to avoid mutating original in case of cloning
- // a child.
- vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);
- cloned.ns = vnode.ns;
- cloned.isStatic = vnode.isStatic;
- cloned.key = vnode.key;
- cloned.isComment = vnode.isComment;
- cloned.fnContext = vnode.fnContext;
- cloned.fnOptions = vnode.fnOptions;
- cloned.fnScopeId = vnode.fnScopeId;
- cloned.asyncMeta = vnode.asyncMeta;
- cloned.isCloned = true;
- return cloned;
- }
- /*
- * not type checking this file because flow doesn't play well with
- * dynamically accessing methods on Array prototype
- */
- var arrayProto = Array.prototype;
- var arrayMethods = Object.create(arrayProto);
- var methodsToPatch = ['push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse'];
- /**
- * Intercept mutating methods and emit events
- */
- methodsToPatch.forEach(function (method) {
- // cache original method
- var original = arrayProto[method];
- def(arrayMethods, method, function mutator() {
- var args = [],
- len = arguments.length;
- while (len--) {
- args[len] = arguments[len];
- }
- var result = original.apply(this, args);
- var ob = this.__ob__;
- var inserted;
- switch (method) {
- case 'push':
- case 'unshift':
- inserted = args;
- break;
- case 'splice':
- inserted = args.slice(2);
- break;
- }
- if (inserted) {
- ob.observeArray(inserted);
- } // notify change
- ob.dep.notify();
- return result;
- });
- });
- /* */
- var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
- /**
- * In some cases we may want to disable observation inside a component's
- * update computation.
- */
- var shouldObserve = true;
- function toggleObserving(value) {
- shouldObserve = value;
- }
- /**
- * Observer class that is attached to each observed
- * object. Once attached, the observer converts the target
- * object's property keys into getter/setters that
- * collect dependencies and dispatch updates.
- */
- var Observer = function Observer(value) {
- this.value = value;
- this.dep = new Dep();
- this.vmCount = 0;
- def(value, '__ob__', this);
- if (Array.isArray(value)) {
- if (hasProto) {
- {
- protoAugment(value, arrayMethods);
- }
- } else {
- copyAugment(value, arrayMethods, arrayKeys);
- }
- this.observeArray(value);
- } else {
- this.walk(value);
- }
- };
- /**
- * Walk through all properties and convert them into
- * getter/setters. This method should only be called when
- * value type is Object.
- */
- Observer.prototype.walk = function walk(obj) {
- var keys = Object.keys(obj);
- for (var i = 0; i < keys.length; i++) {
- defineReactive$$1(obj, keys[i]);
- }
- };
- /**
- * Observe a list of Array items.
- */
- Observer.prototype.observeArray = function observeArray(items) {
- for (var i = 0, l = items.length; i < l; i++) {
- observe(items[i]);
- }
- }; // helpers
- /**
- * Augment a target Object or Array by intercepting
- * the prototype chain using __proto__
- */
- function protoAugment(target, src) {
- /* eslint-disable no-proto */
- target.__proto__ = src;
- /* eslint-enable no-proto */
- }
- /**
- * Augment a target Object or Array by defining
- * hidden properties.
- */
- /* istanbul ignore next */
- function copyAugment(target, src, keys) {
- for (var i = 0, l = keys.length; i < l; i++) {
- var key = keys[i];
- def(target, key, src[key]);
- }
- }
- /**
- * Attempt to create an observer instance for a value,
- * returns the new observer if successfully observed,
- * or the existing observer if the value already has one.
- */
- function observe(value, asRootData) {
- if (!isObject(value) || value instanceof VNode) {
- return;
- }
- var ob;
- if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
- ob = value.__ob__;
- } else if (shouldObserve && !isServerRendering() && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue) {
- ob = new Observer(value);
- }
- if (asRootData && ob) {
- ob.vmCount++;
- }
- return ob;
- }
- /**
- * Define a reactive property on an Object.
- */
- function defineReactive$$1(obj, key, val, customSetter, shallow) {
- var dep = new Dep();
- var property = Object.getOwnPropertyDescriptor(obj, key);
- if (property && property.configurable === false) {
- return;
- } // cater for pre-defined getter/setters
- var getter = property && property.get;
- var setter = property && property.set;
- if ((!getter || setter) && arguments.length === 2) {
- val = obj[key];
- }
- var childOb = !shallow && observe(val);
- Object.defineProperty(obj, key, {
- enumerable: true,
- configurable: true,
- get: function reactiveGetter() {
- var value = getter ? getter.call(obj) : val;
- if (Dep.SharedObject.target) {
- // fixed by xxxxxx
- dep.depend();
- if (childOb) {
- childOb.dep.depend();
- if (Array.isArray(value)) {
- dependArray(value);
- }
- }
- }
- return value;
- },
- set: function reactiveSetter(newVal) {
- var value = getter ? getter.call(obj) : val;
- /* eslint-disable no-self-compare */
- if (newVal === value || newVal !== newVal && value !== value) {
- return;
- }
- /* eslint-enable no-self-compare */
- if ( true && customSetter) {
- customSetter();
- } // #7981: for accessor properties without setter
- if (getter && !setter) {
- return;
- }
- if (setter) {
- setter.call(obj, newVal);
- } else {
- val = newVal;
- }
- childOb = !shallow && observe(newVal);
- dep.notify();
- }
- });
- }
- /**
- * Set a property on an object. Adds the new property and
- * triggers change notification if the property doesn't
- * already exist.
- */
- function set(target, key, val) {
- if ( true && (isUndef(target) || isPrimitive(target))) {
- warn("Cannot set reactive property on undefined, null, or primitive value: " + target);
- }
- if (Array.isArray(target) && isValidArrayIndex(key)) {
- target.length = Math.max(target.length, key);
- target.splice(key, 1, val);
- return val;
- }
- if (key in target && !(key in Object.prototype)) {
- target[key] = val;
- return val;
- }
- var ob = target.__ob__;
- if (target._isVue || ob && ob.vmCount) {
- true && warn('Avoid adding reactive properties to a Vue instance or its root $data ' + 'at runtime - declare it upfront in the data option.');
- return val;
- }
- if (!ob) {
- target[key] = val;
- return val;
- }
- defineReactive$$1(ob.value, key, val);
- ob.dep.notify();
- return val;
- }
- /**
- * Delete a property and trigger change if necessary.
- */
- function del(target, key) {
- if ( true && (isUndef(target) || isPrimitive(target))) {
- warn("Cannot delete reactive property on undefined, null, or primitive value: " + target);
- }
- if (Array.isArray(target) && isValidArrayIndex(key)) {
- target.splice(key, 1);
- return;
- }
- var ob = target.__ob__;
- if (target._isVue || ob && ob.vmCount) {
- true && warn('Avoid deleting properties on a Vue instance or its root $data ' + '- just set it to null.');
- return;
- }
- if (!hasOwn(target, key)) {
- return;
- }
- delete target[key];
- if (!ob) {
- return;
- }
- ob.dep.notify();
- }
- /**
- * Collect dependencies on array elements when the array is touched, since
- * we cannot intercept array element access like property getters.
- */
- function dependArray(value) {
- for (var e = void 0, i = 0, l = value.length; i < l; i++) {
- e = value[i];
- e && e.__ob__ && e.__ob__.dep.depend();
- if (Array.isArray(e)) {
- dependArray(e);
- }
- }
- }
- /* */
- /**
- * Option overwriting strategies are functions that handle
- * how to merge a parent option value and a child option
- * value into the final value.
- */
- var strats = config.optionMergeStrategies;
- /**
- * Options with restrictions
- */
- if (true) {
- strats.el = strats.propsData = function (parent, child, vm, key) {
- if (!vm) {
- warn("option \"" + key + "\" can only be used during instance " + 'creation with the `new` keyword.');
- }
- return defaultStrat(parent, child);
- };
- }
- /**
- * Helper that recursively merges two data objects together.
- */
- function mergeData(to, from) {
- if (!from) {
- return to;
- }
- var key, toVal, fromVal;
- var keys = hasSymbol ? Reflect.ownKeys(from) : Object.keys(from);
- for (var i = 0; i < keys.length; i++) {
- key = keys[i]; // in case the object is already observed...
- if (key === '__ob__') {
- continue;
- }
- toVal = to[key];
- fromVal = from[key];
- if (!hasOwn(to, key)) {
- set(to, key, fromVal);
- } else if (toVal !== fromVal && isPlainObject(toVal) && isPlainObject(fromVal)) {
- mergeData(toVal, fromVal);
- }
- }
- return to;
- }
- /**
- * Data
- */
- function mergeDataOrFn(parentVal, childVal, vm) {
- if (!vm) {
- // in a Vue.extend merge, both should be functions
- if (!childVal) {
- return parentVal;
- }
- if (!parentVal) {
- return childVal;
- } // when parentVal & childVal are both present,
- // we need to return a function that returns the
- // merged result of both functions... no need to
- // check if parentVal is a function here because
- // it has to be a function to pass previous merges.
- return function mergedDataFn() {
- return mergeData(typeof childVal === 'function' ? childVal.call(this, this) : childVal, typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal);
- };
- } else {
- return function mergedInstanceDataFn() {
- // instance merge
- var instanceData = typeof childVal === 'function' ? childVal.call(vm, vm) : childVal;
- var defaultData = typeof parentVal === 'function' ? parentVal.call(vm, vm) : parentVal;
- if (instanceData) {
- return mergeData(instanceData, defaultData);
- } else {
- return defaultData;
- }
- };
- }
- }
- strats.data = function (parentVal, childVal, vm) {
- if (!vm) {
- if (childVal && typeof childVal !== 'function') {
- true && warn('The "data" option should be a function ' + 'that returns a per-instance value in component ' + 'definitions.', vm);
- return parentVal;
- }
- return mergeDataOrFn(parentVal, childVal);
- }
- return mergeDataOrFn(parentVal, childVal, vm);
- };
- /**
- * Hooks and props are merged as arrays.
- */
- function mergeHook(parentVal, childVal) {
- var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
- return res ? dedupeHooks(res) : res;
- }
- function dedupeHooks(hooks) {
- var res = [];
- for (var i = 0; i < hooks.length; i++) {
- if (res.indexOf(hooks[i]) === -1) {
- res.push(hooks[i]);
- }
- }
- return res;
- }
- LIFECYCLE_HOOKS.forEach(function (hook) {
- strats[hook] = mergeHook;
- });
- /**
- * Assets
- *
- * When a vm is present (instance creation), we need to do
- * a three-way merge between constructor options, instance
- * options and parent options.
- */
- function mergeAssets(parentVal, childVal, vm, key) {
- var res = Object.create(parentVal || null);
- if (childVal) {
- true && assertObjectType(key, childVal, vm);
- return extend(res, childVal);
- } else {
- return res;
- }
- }
- ASSET_TYPES.forEach(function (type) {
- strats[type + 's'] = mergeAssets;
- });
- /**
- * Watchers.
- *
- * Watchers hashes should not overwrite one
- * another, so we merge them as arrays.
- */
- strats.watch = function (parentVal, childVal, vm, key) {
- // work around Firefox's Object.prototype.watch...
- if (parentVal === nativeWatch) {
- parentVal = undefined;
- }
- if (childVal === nativeWatch) {
- childVal = undefined;
- }
- /* istanbul ignore if */
- if (!childVal) {
- return Object.create(parentVal || null);
- }
- if (true) {
- assertObjectType(key, childVal, vm);
- }
- if (!parentVal) {
- return childVal;
- }
- var ret = {};
- extend(ret, parentVal);
- for (var key$1 in childVal) {
- var parent = ret[key$1];
- var child = childVal[key$1];
- if (parent && !Array.isArray(parent)) {
- parent = [parent];
- }
- ret[key$1] = parent ? parent.concat(child) : Array.isArray(child) ? child : [child];
- }
- return ret;
- };
- /**
- * Other object hashes.
- */
- strats.props = strats.methods = strats.inject = strats.computed = function (parentVal, childVal, vm, key) {
- if (childVal && "development" !== 'production') {
- assertObjectType(key, childVal, vm);
- }
- if (!parentVal) {
- return childVal;
- }
- var ret = Object.create(null);
- extend(ret, parentVal);
- if (childVal) {
- extend(ret, childVal);
- }
- return ret;
- };
- strats.provide = mergeDataOrFn;
- /**
- * Default strategy.
- */
- var defaultStrat = function defaultStrat(parentVal, childVal) {
- return childVal === undefined ? parentVal : childVal;
- };
- /**
- * Validate component names
- */
- function checkComponents(options) {
- for (var key in options.components) {
- validateComponentName(key);
- }
- }
- function validateComponentName(name) {
- if (!new RegExp("^[a-zA-Z][\\-\\.0-9_" + unicodeRegExp.source + "]*$").test(name)) {
- warn('Invalid component name: "' + name + '". Component names ' + 'should conform to valid custom element name in html5 specification.');
- }
- if (isBuiltInTag(name) || config.isReservedTag(name)) {
- warn('Do not use built-in or reserved HTML elements as component ' + 'id: ' + name);
- }
- }
- /**
- * Ensure all props option syntax are normalized into the
- * Object-based format.
- */
- function normalizeProps(options, vm) {
- var props = options.props;
- if (!props) {
- return;
- }
- var res = {};
- var i, val, name;
- if (Array.isArray(props)) {
- i = props.length;
- while (i--) {
- val = props[i];
- if (typeof val === 'string') {
- name = camelize(val);
- res[name] = {
- type: null
- };
- } else if (true) {
- warn('props must be strings when using array syntax.');
- }
- }
- } else if (isPlainObject(props)) {
- for (var key in props) {
- val = props[key];
- name = camelize(key);
- res[name] = isPlainObject(val) ? val : {
- type: val
- };
- }
- } else if (true) {
- warn("Invalid value for option \"props\": expected an Array or an Object, " + "but got " + toRawType(props) + ".", vm);
- }
- options.props = res;
- }
- /**
- * Normalize all injections into Object-based format
- */
- function normalizeInject(options, vm) {
- var inject = options.inject;
- if (!inject) {
- return;
- }
- var normalized = options.inject = {};
- if (Array.isArray(inject)) {
- for (var i = 0; i < inject.length; i++) {
- normalized[inject[i]] = {
- from: inject[i]
- };
- }
- } else if (isPlainObject(inject)) {
- for (var key in inject) {
- var val = inject[key];
- normalized[key] = isPlainObject(val) ? extend({
- from: key
- }, val) : {
- from: val
- };
- }
- } else if (true) {
- warn("Invalid value for option \"inject\": expected an Array or an Object, " + "but got " + toRawType(inject) + ".", vm);
- }
- }
- /**
- * Normalize raw function directives into object format.
- */
- function normalizeDirectives(options) {
- var dirs = options.directives;
- if (dirs) {
- for (var key in dirs) {
- var def$$1 = dirs[key];
- if (typeof def$$1 === 'function') {
- dirs[key] = {
- bind: def$$1,
- update: def$$1
- };
- }
- }
- }
- }
- function assertObjectType(name, value, vm) {
- if (!isPlainObject(value)) {
- warn("Invalid value for option \"" + name + "\": expected an Object, " + "but got " + toRawType(value) + ".", vm);
- }
- }
- /**
- * Merge two option objects into a new one.
- * Core utility used in both instantiation and inheritance.
- */
- function mergeOptions(parent, child, vm) {
- if (true) {
- checkComponents(child);
- }
- if (typeof child === 'function') {
- child = child.options;
- }
- normalizeProps(child, vm);
- normalizeInject(child, vm);
- normalizeDirectives(child); // Apply extends and mixins on the child options,
- // but only if it is a raw options object that isn't
- // the result of another mergeOptions call.
- // Only merged options has the _base property.
- if (!child._base) {
- if (child.extends) {
- parent = mergeOptions(parent, child.extends, vm);
- }
- if (child.mixins) {
- for (var i = 0, l = child.mixins.length; i < l; i++) {
- parent = mergeOptions(parent, child.mixins[i], vm);
- }
- }
- }
- var options = {};
- var key;
- for (key in parent) {
- mergeField(key);
- }
- for (key in child) {
- if (!hasOwn(parent, key)) {
- mergeField(key);
- }
- }
- function mergeField(key) {
- var strat = strats[key] || defaultStrat;
- options[key] = strat(parent[key], child[key], vm, key);
- }
- return options;
- }
- /**
- * Resolve an asset.
- * This function is used because child instances need access
- * to assets defined in its ancestor chain.
- */
- function resolveAsset(options, type, id, warnMissing) {
- /* istanbul ignore if */
- if (typeof id !== 'string') {
- return;
- }
- var assets = options[type]; // check local registration variations first
- if (hasOwn(assets, id)) {
- return assets[id];
- }
- var camelizedId = camelize(id);
- if (hasOwn(assets, camelizedId)) {
- return assets[camelizedId];
- }
- var PascalCaseId = capitalize(camelizedId);
- if (hasOwn(assets, PascalCaseId)) {
- return assets[PascalCaseId];
- } // fallback to prototype chain
- var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
- if ( true && warnMissing && !res) {
- warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);
- }
- return res;
- }
- /* */
- function validateProp(key, propOptions, propsData, vm) {
- var prop = propOptions[key];
- var absent = !hasOwn(propsData, key);
- var value = propsData[key]; // boolean casting
- var booleanIndex = getTypeIndex(Boolean, prop.type);
- if (booleanIndex > -1) {
- if (absent && !hasOwn(prop, 'default')) {
- value = false;
- } else if (value === '' || value === hyphenate(key)) {
- // only cast empty string / same name to boolean if
- // boolean has higher priority
- var stringIndex = getTypeIndex(String, prop.type);
- if (stringIndex < 0 || booleanIndex < stringIndex) {
- value = true;
- }
- }
- } // check default value
- if (value === undefined) {
- value = getPropDefaultValue(vm, prop, key); // since the default value is a fresh copy,
- // make sure to observe it.
- var prevShouldObserve = shouldObserve;
- toggleObserving(true);
- observe(value);
- toggleObserving(prevShouldObserve);
- }
- if (true) {
- assertProp(prop, key, value, vm, absent);
- }
- return value;
- }
- /**
- * Get the default value of a prop.
- */
- function getPropDefaultValue(vm, prop, key) {
- // no default, return undefined
- if (!hasOwn(prop, 'default')) {
- return undefined;
- }
- var def = prop.default; // warn against non-factory defaults for Object & Array
- if ( true && isObject(def)) {
- warn('Invalid default value for prop "' + key + '": ' + 'Props with type Object/Array must use a factory function ' + 'to return the default value.', vm);
- } // the raw prop value was also undefined from previous render,
- // return previous default value to avoid unnecessary watcher trigger
- if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && vm._props[key] !== undefined) {
- return vm._props[key];
- } // call factory function for non-Function types
- // a value is Function if its prototype is function even across different execution context
- return typeof def === 'function' && getType(prop.type) !== 'Function' ? def.call(vm) : def;
- }
- /**
- * Assert whether a prop is valid.
- */
- function assertProp(prop, name, value, vm, absent) {
- if (prop.required && absent) {
- warn('Missing required prop: "' + name + '"', vm);
- return;
- }
- if (value == null && !prop.required) {
- return;
- }
- var type = prop.type;
- var valid = !type || type === true;
- var expectedTypes = [];
- if (type) {
- if (!Array.isArray(type)) {
- type = [type];
- }
- for (var i = 0; i < type.length && !valid; i++) {
- var assertedType = assertType(value, type[i]);
- expectedTypes.push(assertedType.expectedType || '');
- valid = assertedType.valid;
- }
- }
- if (!valid) {
- warn(getInvalidTypeMessage(name, value, expectedTypes), vm);
- return;
- }
- var validator = prop.validator;
- if (validator) {
- if (!validator(value)) {
- warn('Invalid prop: custom validator check failed for prop "' + name + '".', vm);
- }
- }
- }
- var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
- function assertType(value, type) {
- var valid;
- var expectedType = getType(type);
- if (simpleCheckRE.test(expectedType)) {
- var t = _typeof(value);
- valid = t === expectedType.toLowerCase(); // for primitive wrapper objects
- if (!valid && t === 'object') {
- valid = value instanceof type;
- }
- } else if (expectedType === 'Object') {
- valid = isPlainObject(value);
- } else if (expectedType === 'Array') {
- valid = Array.isArray(value);
- } else {
- valid = value instanceof type;
- }
- return {
- valid: valid,
- expectedType: expectedType
- };
- }
- /**
- * Use function string name to check built-in types,
- * because a simple equality check will fail when running
- * across different vms / iframes.
- */
- function getType(fn) {
- var match = fn && fn.toString().match(/^\s*function (\w+)/);
- return match ? match[1] : '';
- }
- function isSameType(a, b) {
- return getType(a) === getType(b);
- }
- function getTypeIndex(type, expectedTypes) {
- if (!Array.isArray(expectedTypes)) {
- return isSameType(expectedTypes, type) ? 0 : -1;
- }
- for (var i = 0, len = expectedTypes.length; i < len; i++) {
- if (isSameType(expectedTypes[i], type)) {
- return i;
- }
- }
- return -1;
- }
- function getInvalidTypeMessage(name, value, expectedTypes) {
- var message = "Invalid prop: type check failed for prop \"" + name + "\"." + " Expected " + expectedTypes.map(capitalize).join(', ');
- var expectedType = expectedTypes[0];
- var receivedType = toRawType(value);
- var expectedValue = styleValue(value, expectedType);
- var receivedValue = styleValue(value, receivedType); // check if we need to specify expected value
- if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
- message += " with value " + expectedValue;
- }
- message += ", got " + receivedType + " "; // check if we need to specify received value
- if (isExplicable(receivedType)) {
- message += "with value " + receivedValue + ".";
- }
- return message;
- }
- function styleValue(value, type) {
- if (type === 'String') {
- return "\"" + value + "\"";
- } else if (type === 'Number') {
- return "" + Number(value);
- } else {
- return "" + value;
- }
- }
- function isExplicable(value) {
- var explicitTypes = ['string', 'number', 'boolean'];
- return explicitTypes.some(function (elem) {
- return value.toLowerCase() === elem;
- });
- }
- function isBoolean() {
- var args = [],
- len = arguments.length;
- while (len--) {
- args[len] = arguments[len];
- }
- return args.some(function (elem) {
- return elem.toLowerCase() === 'boolean';
- });
- }
- /* */
- function handleError(err, vm, info) {
- // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
- // See: https://github.com/vuejs/vuex/issues/1505
- pushTarget();
- try {
- if (vm) {
- var cur = vm;
- while (cur = cur.$parent) {
- var hooks = cur.$options.errorCaptured;
- if (hooks) {
- for (var i = 0; i < hooks.length; i++) {
- try {
- var capture = hooks[i].call(cur, err, vm, info) === false;
- if (capture) {
- return;
- }
- } catch (e) {
- globalHandleError(e, cur, 'errorCaptured hook');
- }
- }
- }
- }
- }
- globalHandleError(err, vm, info);
- } finally {
- popTarget();
- }
- }
- function invokeWithErrorHandling(handler, context, args, vm, info) {
- var res;
- try {
- res = args ? handler.apply(context, args) : handler.call(context);
- if (res && !res._isVue && isPromise(res) && !res._handled) {
- res.catch(function (e) {
- return handleError(e, vm, info + " (Promise/async)");
- }); // issue #9511
- // avoid catch triggering multiple times when nested calls
- res._handled = true;
- }
- } catch (e) {
- handleError(e, vm, info);
- }
- return res;
- }
- function globalHandleError(err, vm, info) {
- if (config.errorHandler) {
- try {
- return config.errorHandler.call(null, err, vm, info);
- } catch (e) {
- // if the user intentionally throws the original error in the handler,
- // do not log it twice
- if (e !== err) {
- logError(e, null, 'config.errorHandler');
- }
- }
- }
- logError(err, vm, info);
- }
- function logError(err, vm, info) {
- if (true) {
- warn("Error in " + info + ": \"" + err.toString() + "\"", vm);
- }
- /* istanbul ignore else */
- if ((inBrowser || inWeex) && typeof console !== 'undefined') {
- console.error(err);
- } else {
- throw err;
- }
- }
- /* */
- var isUsingMicroTask = false;
- var callbacks = [];
- var pending = false;
- function flushCallbacks() {
- pending = false;
- var copies = callbacks.slice(0);
- callbacks.length = 0;
- for (var i = 0; i < copies.length; i++) {
- copies[i]();
- }
- } // Here we have async deferring wrappers using microtasks.
- // In 2.5 we used (macro) tasks (in combination with microtasks).
- // However, it has subtle problems when state is changed right before repaint
- // (e.g. #6813, out-in transitions).
- // Also, using (macro) tasks in event handler would cause some weird behaviors
- // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
- // So we now use microtasks everywhere, again.
- // A major drawback of this tradeoff is that there are some scenarios
- // where microtasks have too high a priority and fire in between supposedly
- // sequential events (e.g. #4521, #6690, which have workarounds)
- // or even between bubbling of the same event (#6566).
- var timerFunc; // The nextTick behavior leverages the microtask queue, which can be accessed
- // via either native Promise.then or MutationObserver.
- // MutationObserver has wider support, however it is seriously bugged in
- // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
- // completely stops working after triggering a few times... so, if native
- // Promise is available, we will use it:
- /* istanbul ignore next, $flow-disable-line */
- if (typeof Promise !== 'undefined' && isNative(Promise)) {
- var p = Promise.resolve();
- timerFunc = function timerFunc() {
- p.then(flushCallbacks); // In problematic UIWebViews, Promise.then doesn't completely break, but
- // it can get stuck in a weird state where callbacks are pushed into the
- // microtask queue but the queue isn't being flushed, until the browser
- // needs to do some other work, e.g. handle a timer. Therefore we can
- // "force" the microtask queue to be flushed by adding an empty timer.
- if (isIOS) {
- setTimeout(noop);
- }
- };
- isUsingMicroTask = true;
- } else if (!isIE && typeof MutationObserver !== 'undefined' && (isNative(MutationObserver) || // PhantomJS and iOS 7.x
- MutationObserver.toString() === '[object MutationObserverConstructor]')) {
- // Use MutationObserver where native Promise is not available,
- // e.g. PhantomJS, iOS7, Android 4.4
- // (#6466 MutationObserver is unreliable in IE11)
- var counter = 1;
- var observer = new MutationObserver(flushCallbacks);
- var textNode = document.createTextNode(String(counter));
- observer.observe(textNode, {
- characterData: true
- });
- timerFunc = function timerFunc() {
- counter = (counter + 1) % 2;
- textNode.data = String(counter);
- };
- isUsingMicroTask = true;
- } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
- // Fallback to setImmediate.
- // Technically it leverages the (macro) task queue,
- // but it is still a better choice than setTimeout.
- timerFunc = function timerFunc() {
- setImmediate(flushCallbacks);
- };
- } else {
- // Fallback to setTimeout.
- timerFunc = function timerFunc() {
- setTimeout(flushCallbacks, 0);
- };
- }
- function nextTick(cb, ctx) {
- var _resolve;
- callbacks.push(function () {
- if (cb) {
- try {
- cb.call(ctx);
- } catch (e) {
- handleError(e, ctx, 'nextTick');
- }
- } else if (_resolve) {
- _resolve(ctx);
- }
- });
- if (!pending) {
- pending = true;
- timerFunc();
- } // $flow-disable-line
- if (!cb && typeof Promise !== 'undefined') {
- return new Promise(function (resolve) {
- _resolve = resolve;
- });
- }
- }
- /* */
- /* not type checking this file because flow doesn't play well with Proxy */
- var initProxy;
- if (true) {
- 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
- );
- var warnNonPresent = function warnNonPresent(target, key) {
- 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);
- };
- var warnReservedPrefix = function warnReservedPrefix(target, key) {
- 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);
- };
- var hasProxy = typeof Proxy !== 'undefined' && isNative(Proxy);
- if (hasProxy) {
- var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
- config.keyCodes = new Proxy(config.keyCodes, {
- set: function set(target, key, value) {
- if (isBuiltInModifier(key)) {
- warn("Avoid overwriting built-in modifier in config.keyCodes: ." + key);
- return false;
- } else {
- target[key] = value;
- return true;
- }
- }
- });
- }
- var hasHandler = {
- has: function has(target, key) {
- var has = (key in target);
- var isAllowed = allowedGlobals(key) || typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data);
- if (!has && !isAllowed) {
- if (key in target.$data) {
- warnReservedPrefix(target, key);
- } else {
- warnNonPresent(target, key);
- }
- }
- return has || !isAllowed;
- }
- };
- var getHandler = {
- get: function get(target, key) {
- if (typeof key === 'string' && !(key in target)) {
- if (key in target.$data) {
- warnReservedPrefix(target, key);
- } else {
- warnNonPresent(target, key);
- }
- }
- return target[key];
- }
- };
- initProxy = function initProxy(vm) {
- if (hasProxy) {
- // determine which proxy handler to use
- var options = vm.$options;
- var handlers = options.render && options.render._withStripped ? getHandler : hasHandler;
- vm._renderProxy = new Proxy(vm, handlers);
- } else {
- vm._renderProxy = vm;
- }
- };
- }
- /* */
- var seenObjects = new _Set();
- /**
- * Recursively traverse an object to evoke all converted
- * getters, so that every nested property inside the object
- * is collected as a "deep" dependency.
- */
- function traverse(val) {
- _traverse(val, seenObjects);
- seenObjects.clear();
- }
- function _traverse(val, seen) {
- var i, keys;
- var isA = Array.isArray(val);
- if (!isA && !isObject(val) || Object.isFrozen(val) || val instanceof VNode) {
- return;
- }
- if (val.__ob__) {
- var depId = val.__ob__.dep.id;
- if (seen.has(depId)) {
- return;
- }
- seen.add(depId);
- }
- if (isA) {
- i = val.length;
- while (i--) {
- _traverse(val[i], seen);
- }
- } else {
- keys = Object.keys(val);
- i = keys.length;
- while (i--) {
- _traverse(val[keys[i]], seen);
- }
- }
- }
- var mark;
- var measure;
- if (true) {
- var perf = inBrowser && window.performance;
- /* istanbul ignore if */
- if (perf && perf.mark && perf.measure && perf.clearMarks && perf.clearMeasures) {
- mark = function mark(tag) {
- return perf.mark(tag);
- };
- measure = function measure(name, startTag, endTag) {
- perf.measure(name, startTag, endTag);
- perf.clearMarks(startTag);
- perf.clearMarks(endTag); // perf.clearMeasures(name)
- };
- }
- }
- /* */
- var normalizeEvent = cached(function (name) {
- var passive = name.charAt(0) === '&';
- name = passive ? name.slice(1) : name;
- var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
- name = once$$1 ? name.slice(1) : name;
- var capture = name.charAt(0) === '!';
- name = capture ? name.slice(1) : name;
- return {
- name: name,
- once: once$$1,
- capture: capture,
- passive: passive
- };
- });
- function createFnInvoker(fns, vm) {
- function invoker() {
- var arguments$1 = arguments;
- var fns = invoker.fns;
- if (Array.isArray(fns)) {
- var cloned = fns.slice();
- for (var i = 0; i < cloned.length; i++) {
- invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
- }
- } else {
- // return handler return value for single handlers
- return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler");
- }
- }
- invoker.fns = fns;
- return invoker;
- }
- function updateListeners(on, oldOn, add, remove$$1, createOnceHandler, vm) {
- var name, def$$1, cur, old, event;
- for (name in on) {
- def$$1 = cur = on[name];
- old = oldOn[name];
- event = normalizeEvent(name);
- if (isUndef(cur)) {
- true && warn("Invalid handler for event \"" + event.name + "\": got " + String(cur), vm);
- } else if (isUndef(old)) {
- if (isUndef(cur.fns)) {
- cur = on[name] = createFnInvoker(cur, vm);
- }
- if (isTrue(event.once)) {
- cur = on[name] = createOnceHandler(event.name, cur, event.capture);
- }
- add(event.name, cur, event.capture, event.passive, event.params);
- } else if (cur !== old) {
- old.fns = cur;
- on[name] = old;
- }
- }
- for (name in oldOn) {
- if (isUndef(on[name])) {
- event = normalizeEvent(name);
- remove$$1(event.name, oldOn[name], event.capture);
- }
- }
- }
- /* */
- function mergeVNodeHook(def, hookKey, hook) {
- if (def instanceof VNode) {
- def = def.data.hook || (def.data.hook = {});
- }
- var invoker;
- var oldHook = def[hookKey];
- function wrappedHook() {
- hook.apply(this, arguments); // important: remove merged hook to ensure it's called only once
- // and prevent memory leak
- remove(invoker.fns, wrappedHook);
- }
- if (isUndef(oldHook)) {
- // no existing hook
- invoker = createFnInvoker([wrappedHook]);
- } else {
- /* istanbul ignore if */
- if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
- // already a merged invoker
- invoker = oldHook;
- invoker.fns.push(wrappedHook);
- } else {
- // existing plain hook
- invoker = createFnInvoker([oldHook, wrappedHook]);
- }
- }
- invoker.merged = true;
- def[hookKey] = invoker;
- }
- /* */
- // fixed by xxxxxx (mp properties)
- function extractPropertiesFromVNodeData(data, Ctor, res, context) {
- var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
- if (isUndef(propOptions)) {
- return res;
- }
- var externalClasses = Ctor.options.mpOptions.externalClasses || [];
- var attrs = data.attrs;
- var props = data.props;
- if (isDef(attrs) || isDef(props)) {
- for (var key in propOptions) {
- var altKey = hyphenate(key);
- var result = checkProp(res, props, key, altKey, true) || checkProp(res, attrs, key, altKey, false); // externalClass
- if (result && res[key] && externalClasses.indexOf(altKey) !== -1 && context[camelize(res[key])]) {
- // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
- res[key] = context[camelize(res[key])];
- }
- }
- }
- return res;
- }
- function extractPropsFromVNodeData(data, Ctor, tag, context // fixed by xxxxxx
- ) {
- // we are only extracting raw values here.
- // validation and default values are handled in the child
- // component itself.
- var propOptions = Ctor.options.props;
- if (isUndef(propOptions)) {
- // fixed by xxxxxx
- return extractPropertiesFromVNodeData(data, Ctor, {}, context);
- }
- var res = {};
- var attrs = data.attrs;
- var props = data.props;
- if (isDef(attrs) || isDef(props)) {
- for (var key in propOptions) {
- var altKey = hyphenate(key);
- if (true) {
- var keyInLowerCase = key.toLowerCase();
- if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {
- 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 + "\".");
- }
- }
- checkProp(res, props, key, altKey, true) || checkProp(res, attrs, key, altKey, false);
- }
- } // fixed by xxxxxx
- return extractPropertiesFromVNodeData(data, Ctor, res, context);
- }
- function checkProp(res, hash, key, altKey, preserve) {
- if (isDef(hash)) {
- if (hasOwn(hash, key)) {
- res[key] = hash[key];
- if (!preserve) {
- delete hash[key];
- }
- return true;
- } else if (hasOwn(hash, altKey)) {
- res[key] = hash[altKey];
- if (!preserve) {
- delete hash[altKey];
- }
- return true;
- }
- }
- return false;
- }
- /* */
- // The template compiler attempts to minimize the need for normalization by
- // statically analyzing the template at compile time.
- //
- // For plain HTML markup, normalization can be completely skipped because the
- // generated render function is guaranteed to return Array<VNode>. There are
- // two cases where extra normalization is needed:
- // 1. When the children contains components - because a functional component
- // may return an Array instead of a single root. In this case, just a simple
- // normalization is needed - if any child is an Array, we flatten the whole
- // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
- // because functional components already normalize their own children.
- function simpleNormalizeChildren(children) {
- for (var i = 0; i < children.length; i++) {
- if (Array.isArray(children[i])) {
- return Array.prototype.concat.apply([], children);
- }
- }
- return children;
- } // 2. When the children contains constructs that always generated nested Arrays,
- // e.g. <template>, <slot>, v-for, or when the children is provided by user
- // with hand-written render functions / JSX. In such cases a full normalization
- // is needed to cater to all possible types of children values.
- function normalizeChildren(children) {
- return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;
- }
- function isTextNode(node) {
- return isDef(node) && isDef(node.text) && isFalse(node.isComment);
- }
- function normalizeArrayChildren(children, nestedIndex) {
- var res = [];
- var i, c, lastIndex, last;
- for (i = 0; i < children.length; i++) {
- c = children[i];
- if (isUndef(c) || typeof c === 'boolean') {
- continue;
- }
- lastIndex = res.length - 1;
- last = res[lastIndex]; // nested
- if (Array.isArray(c)) {
- if (c.length > 0) {
- c = normalizeArrayChildren(c, (nestedIndex || '') + "_" + i); // merge adjacent text nodes
- if (isTextNode(c[0]) && isTextNode(last)) {
- res[lastIndex] = createTextVNode(last.text + c[0].text);
- c.shift();
- }
- res.push.apply(res, c);
- }
- } else if (isPrimitive(c)) {
- if (isTextNode(last)) {
- // merge adjacent text nodes
- // this is necessary for SSR hydration because text nodes are
- // essentially merged when rendered to HTML strings
- res[lastIndex] = createTextVNode(last.text + c);
- } else if (c !== '') {
- // convert primitive to vnode
- res.push(createTextVNode(c));
- }
- } else {
- if (isTextNode(c) && isTextNode(last)) {
- // merge adjacent text nodes
- res[lastIndex] = createTextVNode(last.text + c.text);
- } else {
- // default key for nested array children (likely generated by v-for)
- if (isTrue(children._isVList) && isDef(c.tag) && isUndef(c.key) && isDef(nestedIndex)) {
- c.key = "__vlist" + nestedIndex + "_" + i + "__";
- }
- res.push(c);
- }
- }
- }
- return res;
- }
- /* */
- function initProvide(vm) {
- var provide = vm.$options.provide;
- if (provide) {
- vm._provided = typeof provide === 'function' ? provide.call(vm) : provide;
- }
- }
- function initInjections(vm) {
- var result = resolveInject(vm.$options.inject, vm);
- if (result) {
- toggleObserving(false);
- Object.keys(result).forEach(function (key) {
- /* istanbul ignore else */
- if (true) {
- defineReactive$$1(vm, key, result[key], function () {
- warn("Avoid mutating an injected value directly since the changes will be " + "overwritten whenever the provided component re-renders. " + "injection being mutated: \"" + key + "\"", vm);
- });
- } else {}
- });
- toggleObserving(true);
- }
- }
- function resolveInject(inject, vm) {
- if (inject) {
- // inject is :any because flow is not smart enough to figure out cached
- var result = Object.create(null);
- var keys = hasSymbol ? Reflect.ownKeys(inject) : Object.keys(inject);
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i]; // #6574 in case the inject object is observed...
- if (key === '__ob__') {
- continue;
- }
- var provideKey = inject[key].from;
- var source = vm;
- while (source) {
- if (source._provided && hasOwn(source._provided, provideKey)) {
- result[key] = source._provided[provideKey];
- break;
- }
- source = source.$parent;
- }
- if (!source) {
- if ('default' in inject[key]) {
- var provideDefault = inject[key].default;
- result[key] = typeof provideDefault === 'function' ? provideDefault.call(vm) : provideDefault;
- } else if (true) {
- warn("Injection \"" + key + "\" not found", vm);
- }
- }
- }
- return result;
- }
- }
- /* */
- /**
- * Runtime helper for resolving raw children VNodes into a slot object.
- */
- function resolveSlots(children, context) {
- if (!children || !children.length) {
- return {};
- }
- var slots = {};
- for (var i = 0, l = children.length; i < l; i++) {
- var child = children[i];
- var data = child.data; // remove slot attribute if the node is resolved as a Vue slot node
- if (data && data.attrs && data.attrs.slot) {
- delete data.attrs.slot;
- } // named slots should only be respected if the vnode was rendered in the
- // same context.
- if ((child.context === context || child.fnContext === context) && data && data.slot != null) {
- var name = data.slot;
- var slot = slots[name] || (slots[name] = []);
- if (child.tag === 'template') {
- slot.push.apply(slot, child.children || []);
- } else {
- slot.push(child);
- }
- } else {
- // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
- if (child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page') {
- (slots['page'] || (slots['page'] = [])).push(child);
- } else {
- (slots.default || (slots.default = [])).push(child);
- }
- }
- } // ignore slots that contains only whitespace
- for (var name$1 in slots) {
- if (slots[name$1].every(isWhitespace)) {
- delete slots[name$1];
- }
- }
- return slots;
- }
- function isWhitespace(node) {
- return node.isComment && !node.asyncFactory || node.text === ' ';
- }
- /* */
- function normalizeScopedSlots(slots, normalSlots, prevSlots) {
- var res;
- var hasNormalSlots = Object.keys(normalSlots).length > 0;
- var isStable = slots ? !!slots.$stable : !hasNormalSlots;
- var key = slots && slots.$key;
- if (!slots) {
- res = {};
- } else if (slots._normalized) {
- // fast path 1: child component re-render only, parent did not change
- return slots._normalized;
- } else if (isStable && prevSlots && prevSlots !== emptyObject && key === prevSlots.$key && !hasNormalSlots && !prevSlots.$hasNormal) {
- // fast path 2: stable scoped slots w/ no normal slots to proxy,
- // only need to normalize once
- return prevSlots;
- } else {
- res = {};
- for (var key$1 in slots) {
- if (slots[key$1] && key$1[0] !== '$') {
- res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
- }
- }
- } // expose normal slots on scopedSlots
- for (var key$2 in normalSlots) {
- if (!(key$2 in res)) {
- res[key$2] = proxyNormalSlot(normalSlots, key$2);
- }
- } // avoriaz seems to mock a non-extensible $scopedSlots object
- // and when that is passed down this would cause an error
- if (slots && Object.isExtensible(slots)) {
- slots._normalized = res;
- }
- def(res, '$stable', isStable);
- def(res, '$key', key);
- def(res, '$hasNormal', hasNormalSlots);
- return res;
- }
- function normalizeScopedSlot(normalSlots, key, fn) {
- var normalized = function normalized() {
- var res = arguments.length ? fn.apply(null, arguments) : fn({});
- res = res && _typeof(res) === 'object' && !Array.isArray(res) ? [res] // single vnode
- : normalizeChildren(res);
- return res && (res.length === 0 || res.length === 1 && res[0].isComment // #9658
- ) ? undefined : res;
- }; // this is a slot using the new v-slot syntax without scope. although it is
- // compiled as a scoped slot, render fn users would expect it to be present
- // on this.$slots because the usage is semantically a normal slot.
- if (fn.proxy) {
- Object.defineProperty(normalSlots, key, {
- get: normalized,
- enumerable: true,
- configurable: true
- });
- }
- return normalized;
- }
- function proxyNormalSlot(slots, key) {
- return function () {
- return slots[key];
- };
- }
- /* */
- /**
- * Runtime helper for rendering v-for lists.
- */
- function renderList(val, render) {
- var ret, i, l, keys, key;
- if (Array.isArray(val) || typeof val === 'string') {
- ret = new Array(val.length);
- for (i = 0, l = val.length; i < l; i++) {
- ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
- }
- } else if (typeof val === 'number') {
- ret = new Array(val);
- for (i = 0; i < val; i++) {
- ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
- }
- } else if (isObject(val)) {
- if (hasSymbol && val[Symbol.iterator]) {
- ret = [];
- var iterator = val[Symbol.iterator]();
- var result = iterator.next();
- while (!result.done) {
- ret.push(render(result.value, ret.length, i++, i)); // fixed by xxxxxx
- result = iterator.next();
- }
- } else {
- keys = Object.keys(val);
- ret = new Array(keys.length);
- for (i = 0, l = keys.length; i < l; i++) {
- key = keys[i];
- ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
- }
- }
- }
- if (!isDef(ret)) {
- ret = [];
- }
- ret._isVList = true;
- return ret;
- }
- /* */
- /**
- * Runtime helper for rendering <slot>
- */
- function renderSlot(name, fallback, props, bindObject) {
- var scopedSlotFn = this.$scopedSlots[name];
- var nodes;
- if (scopedSlotFn) {
- // scoped slot
- props = props || {};
- if (bindObject) {
- if ( true && !isObject(bindObject)) {
- warn('slot v-bind without argument expects an Object', this);
- }
- props = extend(extend({}, bindObject), props);
- } // fixed by xxxxxx app-plus scopedSlot
- nodes = scopedSlotFn(props, this, props._i) || fallback;
- } else {
- nodes = this.$slots[name] || fallback;
- }
- var target = props && props.slot;
- if (target) {
- return this.$createElement('template', {
- slot: target
- }, nodes);
- } else {
- return nodes;
- }
- }
- /* */
- /**
- * Runtime helper for resolving filters
- */
- function resolveFilter(id) {
- return resolveAsset(this.$options, 'filters', id, true) || identity;
- }
- /* */
- function isKeyNotMatch(expect, actual) {
- if (Array.isArray(expect)) {
- return expect.indexOf(actual) === -1;
- } else {
- return expect !== actual;
- }
- }
- /**
- * Runtime helper for checking keyCodes from config.
- * exposed as Vue.prototype._k
- * passing in eventKeyName as last argument separately for backwards compat
- */
- function checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {
- var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
- if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
- return isKeyNotMatch(builtInKeyName, eventKeyName);
- } else if (mappedKeyCode) {
- return isKeyNotMatch(mappedKeyCode, eventKeyCode);
- } else if (eventKeyName) {
- return hyphenate(eventKeyName) !== key;
- }
- }
- /* */
- /**
- * Runtime helper for merging v-bind="object" into a VNode's data.
- */
- function bindObjectProps(data, tag, value, asProp, isSync) {
- if (value) {
- if (!isObject(value)) {
- true && warn('v-bind without argument expects an Object or Array value', this);
- } else {
- if (Array.isArray(value)) {
- value = toObject(value);
- }
- var hash;
- var loop = function loop(key) {
- if (key === 'class' || key === 'style' || isReservedAttribute(key)) {
- hash = data;
- } else {
- var type = data.attrs && data.attrs.type;
- hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});
- }
- var camelizedKey = camelize(key);
- var hyphenatedKey = hyphenate(key);
- if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
- hash[key] = value[key];
- if (isSync) {
- var on = data.on || (data.on = {});
- on["update:" + key] = function ($event) {
- value[key] = $event;
- };
- }
- }
- };
- for (var key in value) {
- loop(key);
- }
- }
- }
- return data;
- }
- /* */
- /**
- * Runtime helper for rendering static trees.
- */
- function renderStatic(index, isInFor) {
- var cached = this._staticTrees || (this._staticTrees = []);
- var tree = cached[index]; // if has already-rendered static tree and not inside v-for,
- // we can reuse the same tree.
- if (tree && !isInFor) {
- return tree;
- } // otherwise, render a fresh tree.
- tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, null, this // for render fns generated for functional component templates
- );
- markStatic(tree, "__static__" + index, false);
- return tree;
- }
- /**
- * Runtime helper for v-once.
- * Effectively it means marking the node as static with a unique key.
- */
- function markOnce(tree, index, key) {
- markStatic(tree, "__once__" + index + (key ? "_" + key : ""), true);
- return tree;
- }
- function markStatic(tree, key, isOnce) {
- if (Array.isArray(tree)) {
- for (var i = 0; i < tree.length; i++) {
- if (tree[i] && typeof tree[i] !== 'string') {
- markStaticNode(tree[i], key + "_" + i, isOnce);
- }
- }
- } else {
- markStaticNode(tree, key, isOnce);
- }
- }
- function markStaticNode(node, key, isOnce) {
- node.isStatic = true;
- node.key = key;
- node.isOnce = isOnce;
- }
- /* */
- function bindObjectListeners(data, value) {
- if (value) {
- if (!isPlainObject(value)) {
- true && warn('v-on without argument expects an Object value', this);
- } else {
- var on = data.on = data.on ? extend({}, data.on) : {};
- for (var key in value) {
- var existing = on[key];
- var ours = value[key];
- on[key] = existing ? [].concat(existing, ours) : ours;
- }
- }
- }
- return data;
- }
- /* */
- function resolveScopedSlots(fns, // see flow/vnode
- res, // the following are added in 2.6
- hasDynamicKeys, contentHashKey) {
- res = res || {
- $stable: !hasDynamicKeys
- };
- for (var i = 0; i < fns.length; i++) {
- var slot = fns[i];
- if (Array.isArray(slot)) {
- resolveScopedSlots(slot, res, hasDynamicKeys);
- } else if (slot) {
- // marker for reverse proxying v-slot without scope on this.$slots
- if (slot.proxy) {
- slot.fn.proxy = true;
- }
- res[slot.key] = slot.fn;
- }
- }
- if (contentHashKey) {
- res.$key = contentHashKey;
- }
- return res;
- }
- /* */
- function bindDynamicKeys(baseObj, values) {
- for (var i = 0; i < values.length; i += 2) {
- var key = values[i];
- if (typeof key === 'string' && key) {
- baseObj[values[i]] = values[i + 1];
- } else if ( true && key !== '' && key !== null) {
- // null is a special value for explicitly removing a binding
- warn("Invalid value for dynamic directive argument (expected string or null): " + key, this);
- }
- }
- return baseObj;
- } // helper to dynamically append modifier runtime markers to event names.
- // ensure only append when value is already string, otherwise it will be cast
- // to string and cause the type check to miss.
- function prependModifier(value, symbol) {
- return typeof value === 'string' ? symbol + value : value;
- }
- /* */
- function installRenderHelpers(target) {
- target._o = markOnce;
- target._n = toNumber;
- target._s = toString;
- target._l = renderList;
- target._t = renderSlot;
- target._q = looseEqual;
- target._i = looseIndexOf;
- target._m = renderStatic;
- target._f = resolveFilter;
- target._k = checkKeyCodes;
- target._b = bindObjectProps;
- target._v = createTextVNode;
- target._e = createEmptyVNode;
- target._u = resolveScopedSlots;
- target._g = bindObjectListeners;
- target._d = bindDynamicKeys;
- target._p = prependModifier;
- }
- /* */
- function FunctionalRenderContext(data, props, children, parent, Ctor) {
- var this$1 = this;
- var options = Ctor.options; // ensure the createElement function in functional components
- // gets a unique context - this is necessary for correct named slot check
- var contextVm;
- if (hasOwn(parent, '_uid')) {
- contextVm = Object.create(parent); // $flow-disable-line
- contextVm._original = parent;
- } else {
- // the context vm passed in is a functional context as well.
- // in this case we want to make sure we are able to get a hold to the
- // real context instance.
- contextVm = parent; // $flow-disable-line
- parent = parent._original;
- }
- var isCompiled = isTrue(options._compiled);
- var needNormalization = !isCompiled;
- this.data = data;
- this.props = props;
- this.children = children;
- this.parent = parent;
- this.listeners = data.on || emptyObject;
- this.injections = resolveInject(options.inject, parent);
- this.slots = function () {
- if (!this$1.$slots) {
- normalizeScopedSlots(data.scopedSlots, this$1.$slots = resolveSlots(children, parent));
- }
- return this$1.$slots;
- };
- Object.defineProperty(this, 'scopedSlots', {
- enumerable: true,
- get: function get() {
- return normalizeScopedSlots(data.scopedSlots, this.slots());
- }
- }); // support for compiled functional template
- if (isCompiled) {
- // exposing $options for renderStatic()
- this.$options = options; // pre-resolve slots for renderSlot()
- this.$slots = this.slots();
- this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
- }
- if (options._scopeId) {
- this._c = function (a, b, c, d) {
- var vnode = createElement(contextVm, a, b, c, d, needNormalization);
- if (vnode && !Array.isArray(vnode)) {
- vnode.fnScopeId = options._scopeId;
- vnode.fnContext = parent;
- }
- return vnode;
- };
- } else {
- this._c = function (a, b, c, d) {
- return createElement(contextVm, a, b, c, d, needNormalization);
- };
- }
- }
- installRenderHelpers(FunctionalRenderContext.prototype);
- function createFunctionalComponent(Ctor, propsData, data, contextVm, children) {
- var options = Ctor.options;
- var props = {};
- var propOptions = options.props;
- if (isDef(propOptions)) {
- for (var key in propOptions) {
- props[key] = validateProp(key, propOptions, propsData || emptyObject);
- }
- } else {
- if (isDef(data.attrs)) {
- mergeProps(props, data.attrs);
- }
- if (isDef(data.props)) {
- mergeProps(props, data.props);
- }
- }
- var renderContext = new FunctionalRenderContext(data, props, children, contextVm, Ctor);
- var vnode = options.render.call(null, renderContext._c, renderContext);
- if (vnode instanceof VNode) {
- return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext);
- } else if (Array.isArray(vnode)) {
- var vnodes = normalizeChildren(vnode) || [];
- var res = new Array(vnodes.length);
- for (var i = 0; i < vnodes.length; i++) {
- res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
- }
- return res;
- }
- }
- function cloneAndMarkFunctionalResult(vnode, data, contextVm, options, renderContext) {
- // #7817 clone node before setting fnContext, otherwise if the node is reused
- // (e.g. it was from a cached normal slot) the fnContext causes named slots
- // that should not be matched to match.
- var clone = cloneVNode(vnode);
- clone.fnContext = contextVm;
- clone.fnOptions = options;
- if (true) {
- (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
- }
- if (data.slot) {
- (clone.data || (clone.data = {})).slot = data.slot;
- }
- return clone;
- }
- function mergeProps(to, from) {
- for (var key in from) {
- to[camelize(key)] = from[key];
- }
- }
- /* */
- /* */
- /* */
- /* */
- // inline hooks to be invoked on component VNodes during patch
- var componentVNodeHooks = {
- init: function init(vnode, hydrating) {
- if (vnode.componentInstance && !vnode.componentInstance._isDestroyed && vnode.data.keepAlive) {
- // kept-alive components, treat as a patch
- var mountedNode = vnode; // work around flow
- componentVNodeHooks.prepatch(mountedNode, mountedNode);
- } else {
- var child = vnode.componentInstance = createComponentInstanceForVnode(vnode, activeInstance);
- child.$mount(hydrating ? vnode.elm : undefined, hydrating);
- }
- },
- prepatch: function prepatch(oldVnode, vnode) {
- var options = vnode.componentOptions;
- var child = vnode.componentInstance = oldVnode.componentInstance;
- updateChildComponent(child, options.propsData, // updated props
- options.listeners, // updated listeners
- vnode, // new parent vnode
- options.children // new children
- );
- },
- insert: function insert(vnode) {
- var context = vnode.context;
- var componentInstance = vnode.componentInstance;
- if (!componentInstance._isMounted) {
- callHook(componentInstance, 'onServiceCreated');
- callHook(componentInstance, 'onServiceAttached');
- componentInstance._isMounted = true;
- callHook(componentInstance, 'mounted');
- }
- if (vnode.data.keepAlive) {
- if (context._isMounted) {
- // vue-router#1212
- // During updates, a kept-alive component's child components may
- // change, so directly walking the tree here may call activated hooks
- // on incorrect children. Instead we push them into a queue which will
- // be processed after the whole patch process ended.
- queueActivatedComponent(componentInstance);
- } else {
- activateChildComponent(componentInstance, true
- /* direct */
- );
- }
- }
- },
- destroy: function destroy(vnode) {
- var componentInstance = vnode.componentInstance;
- if (!componentInstance._isDestroyed) {
- if (!vnode.data.keepAlive) {
- componentInstance.$destroy();
- } else {
- deactivateChildComponent(componentInstance, true
- /* direct */
- );
- }
- }
- }
- };
- var hooksToMerge = Object.keys(componentVNodeHooks);
- function createComponent(Ctor, data, context, children, tag) {
- if (isUndef(Ctor)) {
- return;
- }
- var baseCtor = context.$options._base; // plain options object: turn it into a constructor
- if (isObject(Ctor)) {
- Ctor = baseCtor.extend(Ctor);
- } // if at this stage it's not a constructor or an async component factory,
- // reject.
- if (typeof Ctor !== 'function') {
- if (true) {
- warn("Invalid Component definition: " + String(Ctor), context);
- }
- return;
- } // async component
- var asyncFactory;
- if (isUndef(Ctor.cid)) {
- asyncFactory = Ctor;
- Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
- if (Ctor === undefined) {
- // return a placeholder node for async component, which is rendered
- // as a comment node but preserves all the raw information for the node.
- // the information will be used for async server-rendering and hydration.
- return createAsyncPlaceholder(asyncFactory, data, context, children, tag);
- }
- }
- data = data || {}; // resolve constructor options in case global mixins are applied after
- // component constructor creation
- resolveConstructorOptions(Ctor); // transform component v-model data into props & events
- if (isDef(data.model)) {
- transformModel(Ctor.options, data);
- } // extract props
- var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
- // functional component
- if (isTrue(Ctor.options.functional)) {
- return createFunctionalComponent(Ctor, propsData, data, context, children);
- } // extract listeners, since these needs to be treated as
- // child component listeners instead of DOM listeners
- var listeners = data.on; // replace with listeners with .native modifier
- // so it gets processed during parent component patch.
- data.on = data.nativeOn;
- if (isTrue(Ctor.options.abstract)) {
- // abstract components do not keep anything
- // other than props & listeners & slot
- // work around flow
- var slot = data.slot;
- data = {};
- if (slot) {
- data.slot = slot;
- }
- } // install component management hooks onto the placeholder node
- installComponentHooks(data); // return a placeholder vnode
- var name = Ctor.options.name || tag;
- var vnode = new VNode("vue-component-" + Ctor.cid + (name ? "-" + name : ''), data, undefined, undefined, undefined, context, {
- Ctor: Ctor,
- propsData: propsData,
- listeners: listeners,
- tag: tag,
- children: children
- }, asyncFactory);
- return vnode;
- }
- function createComponentInstanceForVnode(vnode, // we know it's MountedComponentVNode but flow doesn't
- parent // activeInstance in lifecycle state
- ) {
- var options = {
- _isComponent: true,
- _parentVnode: vnode,
- parent: parent
- }; // check inline-template render functions
- var inlineTemplate = vnode.data.inlineTemplate;
- if (isDef(inlineTemplate)) {
- options.render = inlineTemplate.render;
- options.staticRenderFns = inlineTemplate.staticRenderFns;
- }
- return new vnode.componentOptions.Ctor(options);
- }
- function installComponentHooks(data) {
- var hooks = data.hook || (data.hook = {});
- for (var i = 0; i < hooksToMerge.length; i++) {
- var key = hooksToMerge[i];
- var existing = hooks[key];
- var toMerge = componentVNodeHooks[key];
- if (existing !== toMerge && !(existing && existing._merged)) {
- hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
- }
- }
- }
- function mergeHook$1(f1, f2) {
- var merged = function merged(a, b) {
- // flow complains about extra args which is why we use any
- f1(a, b);
- f2(a, b);
- };
- merged._merged = true;
- return merged;
- } // transform component v-model info (value and callback) into
- // prop and event handler respectively.
- function transformModel(options, data) {
- var prop = options.model && options.model.prop || 'value';
- var event = options.model && options.model.event || 'input';
- (data.attrs || (data.attrs = {}))[prop] = data.model.value;
- var on = data.on || (data.on = {});
- var existing = on[event];
- var callback = data.model.callback;
- if (isDef(existing)) {
- if (Array.isArray(existing) ? existing.indexOf(callback) === -1 : existing !== callback) {
- on[event] = [callback].concat(existing);
- }
- } else {
- on[event] = callback;
- }
- }
- /* */
- var SIMPLE_NORMALIZE = 1;
- var ALWAYS_NORMALIZE = 2; // wrapper function for providing a more flexible interface
- // without getting yelled at by flow
- function createElement(context, tag, data, children, normalizationType, alwaysNormalize) {
- if (Array.isArray(data) || isPrimitive(data)) {
- normalizationType = children;
- children = data;
- data = undefined;
- }
- if (isTrue(alwaysNormalize)) {
- normalizationType = ALWAYS_NORMALIZE;
- }
- return _createElement(context, tag, data, children, normalizationType);
- }
- function _createElement(context, tag, data, children, normalizationType) {
- if (isDef(data) && isDef(data.__ob__)) {
- true && warn("Avoid using observed data object as vnode data: " + JSON.stringify(data) + "\n" + 'Always create fresh vnode data objects in each render!', context);
- return createEmptyVNode();
- } // object syntax in v-bind
- if (isDef(data) && isDef(data.is)) {
- tag = data.is;
- }
- if (!tag) {
- // in case of component :is set to falsy value
- return createEmptyVNode();
- } // warn against non-primitive key
- if ( true && isDef(data) && isDef(data.key) && !isPrimitive(data.key)) {
- {
- warn('Avoid using non-primitive value as key, ' + 'use string/number value instead.', context);
- }
- } // support single function children as default scoped slot
- if (Array.isArray(children) && typeof children[0] === 'function') {
- data = data || {};
- data.scopedSlots = {
- default: children[0]
- };
- children.length = 0;
- }
- if (normalizationType === ALWAYS_NORMALIZE) {
- children = normalizeChildren(children);
- } else if (normalizationType === SIMPLE_NORMALIZE) {
- children = simpleNormalizeChildren(children);
- }
- var vnode, ns;
- if (typeof tag === 'string') {
- var Ctor;
- ns = context.$vnode && context.$vnode.ns || config.getTagNamespace(tag);
- if (config.isReservedTag(tag)) {
- // platform built-in elements
- if ( true && isDef(data) && isDef(data.nativeOn)) {
- warn("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">.", context);
- }
- vnode = new VNode(config.parsePlatformTagName(tag), data, children, undefined, undefined, context);
- } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
- // component
- vnode = createComponent(Ctor, data, context, children, tag);
- } else {
- // unknown or unlisted namespaced elements
- // check at runtime because it may get assigned a namespace when its
- // parent normalizes children
- vnode = new VNode(tag, data, children, undefined, undefined, context);
- }
- } else {
- // direct component options / constructor
- vnode = createComponent(tag, data, context, children);
- }
- if (Array.isArray(vnode)) {
- return vnode;
- } else if (isDef(vnode)) {
- if (isDef(ns)) {
- applyNS(vnode, ns);
- }
- if (isDef(data)) {
- registerDeepBindings(data);
- }
- return vnode;
- } else {
- return createEmptyVNode();
- }
- }
- function applyNS(vnode, ns, force) {
- vnode.ns = ns;
- if (vnode.tag === 'foreignObject') {
- // use default namespace inside foreignObject
- ns = undefined;
- force = true;
- }
- if (isDef(vnode.children)) {
- for (var i = 0, l = vnode.children.length; i < l; i++) {
- var child = vnode.children[i];
- if (isDef(child.tag) && (isUndef(child.ns) || isTrue(force) && child.tag !== 'svg')) {
- applyNS(child, ns, force);
- }
- }
- }
- } // ref #5318
- // necessary to ensure parent re-render when deep bindings like :style and
- // :class are used on slot nodes
- function registerDeepBindings(data) {
- if (isObject(data.style)) {
- traverse(data.style);
- }
- if (isObject(data.class)) {
- traverse(data.class);
- }
- }
- /* */
- function initRender(vm) {
- vm._vnode = null; // the root of the child tree
- vm._staticTrees = null; // v-once cached trees
- var options = vm.$options;
- var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
- var renderContext = parentVnode && parentVnode.context;
- vm.$slots = resolveSlots(options._renderChildren, renderContext);
- vm.$scopedSlots = emptyObject; // bind the createElement fn to this instance
- // so that we get proper render context inside it.
- // args order: tag, data, children, normalizationType, alwaysNormalize
- // internal version is used by render functions compiled from templates
- vm._c = function (a, b, c, d) {
- return createElement(vm, a, b, c, d, false);
- }; // normalization is always applied for the public version, used in
- // user-written render functions.
- vm.$createElement = function (a, b, c, d) {
- return createElement(vm, a, b, c, d, true);
- }; // $attrs & $listeners are exposed for easier HOC creation.
- // they need to be reactive so that HOCs using them are always updated
- var parentData = parentVnode && parentVnode.data;
- /* istanbul ignore else */
- if (true) {
- defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
- !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
- }, true);
- defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
- !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
- }, true);
- } else {}
- }
- var currentRenderingInstance = null;
- function renderMixin(Vue) {
- // install runtime convenience helpers
- installRenderHelpers(Vue.prototype);
- Vue.prototype.$nextTick = function (fn) {
- return nextTick(fn, this);
- };
- Vue.prototype._render = function () {
- var vm = this;
- var ref = vm.$options;
- var render = ref.render;
- var _parentVnode = ref._parentVnode;
- if (_parentVnode) {
- vm.$scopedSlots = normalizeScopedSlots(_parentVnode.data.scopedSlots, vm.$slots, vm.$scopedSlots);
- } // set parent vnode. this allows render functions to have access
- // to the data on the placeholder node.
- vm.$vnode = _parentVnode; // render self
- var vnode;
- try {
- // There's no need to maintain a stack because all render fns are called
- // separately from one another. Nested component's render fns are called
- // when parent component is patched.
- currentRenderingInstance = vm;
- vnode = render.call(vm._renderProxy, vm.$createElement);
- } catch (e) {
- handleError(e, vm, "render"); // return error render result,
- // or previous vnode to prevent render error causing blank component
- /* istanbul ignore else */
- if ( true && vm.$options.renderError) {
- try {
- vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
- } catch (e) {
- handleError(e, vm, "renderError");
- vnode = vm._vnode;
- }
- } else {
- vnode = vm._vnode;
- }
- } finally {
- currentRenderingInstance = null;
- } // if the returned array contains only a single node, allow it
- if (Array.isArray(vnode) && vnode.length === 1) {
- vnode = vnode[0];
- } // return empty vnode in case the render function errored out
- if (!(vnode instanceof VNode)) {
- if ( true && Array.isArray(vnode)) {
- warn('Multiple root nodes returned from render function. Render function ' + 'should return a single root node.', vm);
- }
- vnode = createEmptyVNode();
- } // set parent
- vnode.parent = _parentVnode;
- return vnode;
- };
- }
- /* */
- function ensureCtor(comp, base) {
- if (comp.__esModule || hasSymbol && comp[Symbol.toStringTag] === 'Module') {
- comp = comp.default;
- }
- return isObject(comp) ? base.extend(comp) : comp;
- }
- function createAsyncPlaceholder(factory, data, context, children, tag) {
- var node = createEmptyVNode();
- node.asyncFactory = factory;
- node.asyncMeta = {
- data: data,
- context: context,
- children: children,
- tag: tag
- };
- return node;
- }
- function resolveAsyncComponent(factory, baseCtor) {
- if (isTrue(factory.error) && isDef(factory.errorComp)) {
- return factory.errorComp;
- }
- if (isDef(factory.resolved)) {
- return factory.resolved;
- }
- var owner = currentRenderingInstance;
- if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
- // already pending
- factory.owners.push(owner);
- }
- if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
- return factory.loadingComp;
- }
- if (owner && !isDef(factory.owners)) {
- var owners = factory.owners = [owner];
- var sync = true;
- var timerLoading = null;
- var timerTimeout = null;
- owner.$on('hook:destroyed', function () {
- return remove(owners, owner);
- });
- var forceRender = function forceRender(renderCompleted) {
- for (var i = 0, l = owners.length; i < l; i++) {
- owners[i].$forceUpdate();
- }
- if (renderCompleted) {
- owners.length = 0;
- if (timerLoading !== null) {
- clearTimeout(timerLoading);
- timerLoading = null;
- }
- if (timerTimeout !== null) {
- clearTimeout(timerTimeout);
- timerTimeout = null;
- }
- }
- };
- var resolve = once(function (res) {
- // cache resolved
- factory.resolved = ensureCtor(res, baseCtor); // invoke callbacks only if this is not a synchronous resolve
- // (async resolves are shimmed as synchronous during SSR)
- if (!sync) {
- forceRender(true);
- } else {
- owners.length = 0;
- }
- });
- var reject = once(function (reason) {
- true && warn("Failed to resolve async component: " + String(factory) + (reason ? "\nReason: " + reason : ''));
- if (isDef(factory.errorComp)) {
- factory.error = true;
- forceRender(true);
- }
- });
- var res = factory(resolve, reject);
- if (isObject(res)) {
- if (isPromise(res)) {
- // () => Promise
- if (isUndef(factory.resolved)) {
- res.then(resolve, reject);
- }
- } else if (isPromise(res.component)) {
- res.component.then(resolve, reject);
- if (isDef(res.error)) {
- factory.errorComp = ensureCtor(res.error, baseCtor);
- }
- if (isDef(res.loading)) {
- factory.loadingComp = ensureCtor(res.loading, baseCtor);
- if (res.delay === 0) {
- factory.loading = true;
- } else {
- timerLoading = setTimeout(function () {
- timerLoading = null;
- if (isUndef(factory.resolved) && isUndef(factory.error)) {
- factory.loading = true;
- forceRender(false);
- }
- }, res.delay || 200);
- }
- }
- if (isDef(res.timeout)) {
- timerTimeout = setTimeout(function () {
- timerTimeout = null;
- if (isUndef(factory.resolved)) {
- reject( true ? "timeout (" + res.timeout + "ms)" : undefined);
- }
- }, res.timeout);
- }
- }
- }
- sync = false; // return in case resolved synchronously
- return factory.loading ? factory.loadingComp : factory.resolved;
- }
- }
- /* */
- function isAsyncPlaceholder(node) {
- return node.isComment && node.asyncFactory;
- }
- /* */
- function getFirstComponentChild(children) {
- if (Array.isArray(children)) {
- for (var i = 0; i < children.length; i++) {
- var c = children[i];
- if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
- return c;
- }
- }
- }
- }
- /* */
- /* */
- function initEvents(vm) {
- vm._events = Object.create(null);
- vm._hasHookEvent = false; // init parent attached events
- var listeners = vm.$options._parentListeners;
- if (listeners) {
- updateComponentListeners(vm, listeners);
- }
- }
- var target;
- function add(event, fn) {
- target.$on(event, fn);
- }
- function remove$1(event, fn) {
- target.$off(event, fn);
- }
- function createOnceHandler(event, fn) {
- var _target = target;
- return function onceHandler() {
- var res = fn.apply(null, arguments);
- if (res !== null) {
- _target.$off(event, onceHandler);
- }
- };
- }
- function updateComponentListeners(vm, listeners, oldListeners) {
- target = vm;
- updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
- target = undefined;
- }
- function eventsMixin(Vue) {
- var hookRE = /^hook:/;
- Vue.prototype.$on = function (event, fn) {
- var vm = this;
- if (Array.isArray(event)) {
- for (var i = 0, l = event.length; i < l; i++) {
- vm.$on(event[i], fn);
- }
- } else {
- (vm._events[event] || (vm._events[event] = [])).push(fn); // optimize hook:event cost by using a boolean flag marked at registration
- // instead of a hash lookup
- if (hookRE.test(event)) {
- vm._hasHookEvent = true;
- }
- }
- return vm;
- };
- Vue.prototype.$once = function (event, fn) {
- var vm = this;
- function on() {
- vm.$off(event, on);
- fn.apply(vm, arguments);
- }
- on.fn = fn;
- vm.$on(event, on);
- return vm;
- };
- Vue.prototype.$off = function (event, fn) {
- var vm = this; // all
- if (!arguments.length) {
- vm._events = Object.create(null);
- return vm;
- } // array of events
- if (Array.isArray(event)) {
- for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
- vm.$off(event[i$1], fn);
- }
- return vm;
- } // specific event
- var cbs = vm._events[event];
- if (!cbs) {
- return vm;
- }
- if (!fn) {
- vm._events[event] = null;
- return vm;
- } // specific handler
- var cb;
- var i = cbs.length;
- while (i--) {
- cb = cbs[i];
- if (cb === fn || cb.fn === fn) {
- cbs.splice(i, 1);
- break;
- }
- }
- return vm;
- };
- Vue.prototype.$emit = function (event) {
- var vm = this;
- if (true) {
- var lowerCaseEvent = event.toLowerCase();
- if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
- 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 + "\".");
- }
- }
- var cbs = vm._events[event];
- if (cbs) {
- cbs = cbs.length > 1 ? toArray(cbs) : cbs;
- var args = toArray(arguments, 1);
- var info = "event handler for \"" + event + "\"";
- for (var i = 0, l = cbs.length; i < l; i++) {
- invokeWithErrorHandling(cbs[i], vm, args, vm, info);
- }
- }
- return vm;
- };
- }
- /* */
- var activeInstance = null;
- var isUpdatingChildComponent = false;
- function setActiveInstance(vm) {
- var prevActiveInstance = activeInstance;
- activeInstance = vm;
- return function () {
- activeInstance = prevActiveInstance;
- };
- }
- function initLifecycle(vm) {
- var options = vm.$options; // locate first non-abstract parent
- var parent = options.parent;
- if (parent && !options.abstract) {
- while (parent.$options.abstract && parent.$parent) {
- parent = parent.$parent;
- }
- parent.$children.push(vm);
- }
- vm.$parent = parent;
- vm.$root = parent ? parent.$root : vm;
- vm.$children = [];
- vm.$refs = {};
- vm._watcher = null;
- vm._inactive = null;
- vm._directInactive = false;
- vm._isMounted = false;
- vm._isDestroyed = false;
- vm._isBeingDestroyed = false;
- }
- function lifecycleMixin(Vue) {
- Vue.prototype._update = function (vnode, hydrating) {
- var vm = this;
- var prevEl = vm.$el;
- var prevVnode = vm._vnode;
- var restoreActiveInstance = setActiveInstance(vm);
- vm._vnode = vnode; // Vue.prototype.__patch__ is injected in entry points
- // based on the rendering backend used.
- if (!prevVnode) {
- // initial render
- vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false
- /* removeOnly */
- );
- } else {
- // updates
- vm.$el = vm.__patch__(prevVnode, vnode);
- }
- restoreActiveInstance(); // update __vue__ reference
- if (prevEl) {
- prevEl.__vue__ = null;
- }
- if (vm.$el) {
- vm.$el.__vue__ = vm;
- } // if parent is an HOC, update its $el as well
- if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
- vm.$parent.$el = vm.$el;
- } // updated hook is called by the scheduler to ensure that children are
- // updated in a parent's updated hook.
- };
- Vue.prototype.$forceUpdate = function () {
- var vm = this;
- if (vm._watcher) {
- vm._watcher.update();
- }
- };
- Vue.prototype.$destroy = function () {
- var vm = this;
- if (vm._isBeingDestroyed) {
- return;
- }
- callHook(vm, 'beforeDestroy');
- vm._isBeingDestroyed = true; // remove self from parent
- var parent = vm.$parent;
- if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
- remove(parent.$children, vm);
- } // teardown watchers
- if (vm._watcher) {
- vm._watcher.teardown();
- }
- var i = vm._watchers.length;
- while (i--) {
- vm._watchers[i].teardown();
- } // remove reference from data ob
- // frozen object may not have observer.
- if (vm._data.__ob__) {
- vm._data.__ob__.vmCount--;
- } // call the last hook...
- vm._isDestroyed = true; // invoke destroy hooks on current rendered tree
- vm.__patch__(vm._vnode, null); // fire destroyed hook
- callHook(vm, 'destroyed'); // turn off all instance listeners.
- vm.$off(); // remove __vue__ reference
- if (vm.$el) {
- vm.$el.__vue__ = null;
- } // release circular reference (#6759)
- if (vm.$vnode) {
- vm.$vnode.parent = null;
- }
- };
- }
- function mountComponent(vm, el, hydrating) {
- vm.$el = el;
- if (!vm.$options.render) {
- vm.$options.render = createEmptyVNode;
- if (true) {
- /* istanbul ignore if */
- if (vm.$options.template && vm.$options.template.charAt(0) !== '#' || vm.$options.el || el) {
- 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);
- } else {
- warn('Failed to mount component: template or render function not defined.', vm);
- }
- }
- }
- callHook(vm, 'beforeMount');
- var updateComponent;
- /* istanbul ignore if */
- if ( true && config.performance && mark) {
- updateComponent = function updateComponent() {
- var name = vm._name;
- var id = vm._uid;
- var startTag = "vue-perf-start:" + id;
- var endTag = "vue-perf-end:" + id;
- mark(startTag);
- var vnode = vm._render();
- mark(endTag);
- measure("vue " + name + " render", startTag, endTag);
- mark(startTag);
- vm._update(vnode, hydrating);
- mark(endTag);
- measure("vue " + name + " patch", startTag, endTag);
- };
- } else {
- updateComponent = function updateComponent() {
- vm._update(vm._render(), hydrating);
- };
- } // we set this to vm._watcher inside the watcher's constructor
- // since the watcher's initial patch may call $forceUpdate (e.g. inside child
- // component's mounted hook), which relies on vm._watcher being already defined
- new Watcher(vm, updateComponent, noop, {
- before: function before() {
- if (vm._isMounted && !vm._isDestroyed) {
- callHook(vm, 'beforeUpdate');
- }
- }
- }, true
- /* isRenderWatcher */
- );
- hydrating = false; // manually mounted instance, call mounted on self
- // mounted is called for render-created child components in its inserted hook
- if (vm.$vnode == null) {
- // fixed by xxxxxx
- callHook(vm, 'onServiceCreated');
- callHook(vm, 'onServiceAttached');
- vm._isMounted = true;
- callHook(vm, 'mounted');
- }
- return vm;
- }
- function updateChildComponent(vm, propsData, listeners, parentVnode, renderChildren) {
- if (true) {
- isUpdatingChildComponent = true;
- } // determine whether component has slot children
- // we need to do this before overwriting $options._renderChildren.
- // check if there are dynamic scopedSlots (hand-written or compiled but with
- // dynamic slot names). Static scoped slots compiled from template has the
- // "$stable" marker.
- var newScopedSlots = parentVnode.data.scopedSlots;
- var oldScopedSlots = vm.$scopedSlots;
- 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
- // update. Dynamic scoped slots may also have changed. In such cases, a forced
- // update is necessary to ensure correctness.
- var needsForceUpdate = !!(renderChildren || // has new static slots
- vm.$options._renderChildren || // has old static slots
- hasDynamicScopedSlot);
- vm.$options._parentVnode = parentVnode;
- vm.$vnode = parentVnode; // update vm's placeholder node without re-render
- if (vm._vnode) {
- // update child tree's parent
- vm._vnode.parent = parentVnode;
- }
- vm.$options._renderChildren = renderChildren; // update $attrs and $listeners hash
- // these are also reactive so they may trigger child update if the child
- // used them during render
- vm.$attrs = parentVnode.data.attrs || emptyObject;
- vm.$listeners = listeners || emptyObject; // update props
- if (propsData && vm.$options.props) {
- toggleObserving(false);
- var props = vm._props;
- var propKeys = vm.$options._propKeys || [];
- for (var i = 0; i < propKeys.length; i++) {
- var key = propKeys[i];
- var propOptions = vm.$options.props; // wtf flow?
- props[key] = validateProp(key, propOptions, propsData, vm);
- }
- toggleObserving(true); // keep a copy of raw propsData
- vm.$options.propsData = propsData;
- } // fixed by xxxxxx update properties(mp runtime)
- vm._$updateProperties && vm._$updateProperties(vm); // update listeners
- listeners = listeners || emptyObject;
- var oldListeners = vm.$options._parentListeners;
- vm.$options._parentListeners = listeners;
- updateComponentListeners(vm, listeners, oldListeners); // resolve slots + force update if has children
- if (needsForceUpdate) {
- vm.$slots = resolveSlots(renderChildren, parentVnode.context);
- vm.$forceUpdate();
- }
- if (true) {
- isUpdatingChildComponent = false;
- }
- }
- function isInInactiveTree(vm) {
- while (vm && (vm = vm.$parent)) {
- if (vm._inactive) {
- return true;
- }
- }
- return false;
- }
- function activateChildComponent(vm, direct) {
- if (direct) {
- vm._directInactive = false;
- if (isInInactiveTree(vm)) {
- return;
- }
- } else if (vm._directInactive) {
- return;
- }
- if (vm._inactive || vm._inactive === null) {
- vm._inactive = false;
- for (var i = 0; i < vm.$children.length; i++) {
- activateChildComponent(vm.$children[i]);
- }
- callHook(vm, 'activated');
- }
- }
- function deactivateChildComponent(vm, direct) {
- if (direct) {
- vm._directInactive = true;
- if (isInInactiveTree(vm)) {
- return;
- }
- }
- if (!vm._inactive) {
- vm._inactive = true;
- for (var i = 0; i < vm.$children.length; i++) {
- deactivateChildComponent(vm.$children[i]);
- }
- callHook(vm, 'deactivated');
- }
- }
- function callHook(vm, hook) {
- // #7573 disable dep collection when invoking lifecycle hooks
- pushTarget();
- var handlers = vm.$options[hook];
- var info = hook + " hook";
- if (handlers) {
- for (var i = 0, j = handlers.length; i < j; i++) {
- invokeWithErrorHandling(handlers[i], vm, null, vm, info);
- }
- }
- if (vm._hasHookEvent) {
- vm.$emit('hook:' + hook);
- }
- popTarget();
- }
- /* */
- var MAX_UPDATE_COUNT = 100;
- var queue = [];
- var activatedChildren = [];
- var has = {};
- var circular = {};
- var waiting = false;
- var flushing = false;
- var index = 0;
- /**
- * Reset the scheduler's state.
- */
- function resetSchedulerState() {
- index = queue.length = activatedChildren.length = 0;
- has = {};
- if (true) {
- circular = {};
- }
- waiting = flushing = false;
- } // Async edge case #6566 requires saving the timestamp when event listeners are
- // attached. However, calling performance.now() has a perf overhead especially
- // if the page has thousands of event listeners. Instead, we take a timestamp
- // every time the scheduler flushes and use that for all event listeners
- // attached during that flush.
- var currentFlushTimestamp = 0; // Async edge case fix requires storing an event listener's attach timestamp.
- var getNow = Date.now; // Determine what event timestamp the browser is using. Annoyingly, the
- // timestamp can either be hi-res (relative to page load) or low-res
- // (relative to UNIX epoch), so in order to compare time we have to use the
- // same timestamp type when saving the flush timestamp.
- // All IE versions use low-res event timestamps, and have problematic clock
- // implementations (#9632)
- if (inBrowser && !isIE) {
- var performance = window.performance;
- if (performance && typeof performance.now === 'function' && getNow() > document.createEvent('Event').timeStamp) {
- // if the event timestamp, although evaluated AFTER the Date.now(), is
- // smaller than it, it means the event is using a hi-res timestamp,
- // and we need to use the hi-res version for event listener timestamps as
- // well.
- getNow = function getNow() {
- return performance.now();
- };
- }
- }
- /**
- * Flush both queues and run the watchers.
- */
- function flushSchedulerQueue() {
- currentFlushTimestamp = getNow();
- flushing = true;
- var watcher, id; // Sort queue before flush.
- // This ensures that:
- // 1. Components are updated from parent to child. (because parent is always
- // created before the child)
- // 2. A component's user watchers are run before its render watcher (because
- // user watchers are created before the render watcher)
- // 3. If a component is destroyed during a parent component's watcher run,
- // its watchers can be skipped.
- queue.sort(function (a, b) {
- return a.id - b.id;
- }); // do not cache length because more watchers might be pushed
- // as we run existing watchers
- for (index = 0; index < queue.length; index++) {
- watcher = queue[index];
- if (watcher.before) {
- watcher.before();
- }
- id = watcher.id;
- has[id] = null;
- watcher.run(); // in dev build, check and stop circular updates.
- if ( true && has[id] != null) {
- circular[id] = (circular[id] || 0) + 1;
- if (circular[id] > MAX_UPDATE_COUNT) {
- warn('You may have an infinite update loop ' + (watcher.user ? "in watcher with expression \"" + watcher.expression + "\"" : "in a component render function."), watcher.vm);
- break;
- }
- }
- } // keep copies of post queues before resetting state
- var activatedQueue = activatedChildren.slice();
- var updatedQueue = queue.slice();
- resetSchedulerState(); // call component updated and activated hooks
- callActivatedHooks(activatedQueue);
- callUpdatedHooks(updatedQueue); // devtool hook
- /* istanbul ignore if */
- if (devtools && config.devtools) {
- devtools.emit('flush');
- }
- }
- function callUpdatedHooks(queue) {
- var i = queue.length;
- while (i--) {
- var watcher = queue[i];
- var vm = watcher.vm;
- if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
- callHook(vm, 'updated');
- }
- }
- }
- /**
- * Queue a kept-alive component that was activated during patch.
- * The queue will be processed after the entire tree has been patched.
- */
- function queueActivatedComponent(vm) {
- // setting _inactive to false here so that a render function can
- // rely on checking whether it's in an inactive tree (e.g. router-view)
- vm._inactive = false;
- activatedChildren.push(vm);
- }
- function callActivatedHooks(queue) {
- for (var i = 0; i < queue.length; i++) {
- queue[i]._inactive = true;
- activateChildComponent(queue[i], true
- /* true */
- );
- }
- }
- /**
- * Push a watcher into the watcher queue.
- * Jobs with duplicate IDs will be skipped unless it's
- * pushed when the queue is being flushed.
- */
- function queueWatcher(watcher) {
- var id = watcher.id;
- if (has[id] == null) {
- has[id] = true;
- if (!flushing) {
- queue.push(watcher);
- } else {
- // if already flushing, splice the watcher based on its id
- // if already past its id, it will be run next immediately.
- var i = queue.length - 1;
- while (i > index && queue[i].id > watcher.id) {
- i--;
- }
- queue.splice(i + 1, 0, watcher);
- } // queue the flush
- if (!waiting) {
- waiting = true;
- if ( true && !config.async) {
- flushSchedulerQueue();
- return;
- }
- nextTick(flushSchedulerQueue);
- }
- }
- }
- /* */
- var uid$2 = 0;
- /**
- * A watcher parses an expression, collects dependencies,
- * and fires callback when the expression value changes.
- * This is used for both the $watch() api and directives.
- */
- var Watcher = function Watcher(vm, expOrFn, cb, options, isRenderWatcher) {
- this.vm = vm;
- if (isRenderWatcher) {
- vm._watcher = this;
- }
- vm._watchers.push(this); // options
- if (options) {
- this.deep = !!options.deep;
- this.user = !!options.user;
- this.lazy = !!options.lazy;
- this.sync = !!options.sync;
- this.before = options.before;
- } else {
- this.deep = this.user = this.lazy = this.sync = false;
- }
- this.cb = cb;
- this.id = ++uid$2; // uid for batching
- this.active = true;
- this.dirty = this.lazy; // for lazy watchers
- this.deps = [];
- this.newDeps = [];
- this.depIds = new _Set();
- this.newDepIds = new _Set();
- this.expression = true ? expOrFn.toString() : undefined; // parse expression for getter
- if (typeof expOrFn === 'function') {
- this.getter = expOrFn;
- } else {
- this.getter = parsePath(expOrFn);
- if (!this.getter) {
- this.getter = noop;
- true && warn("Failed watching path: \"" + expOrFn + "\" " + 'Watcher only accepts simple dot-delimited paths. ' + 'For full control, use a function instead.', vm);
- }
- }
- this.value = this.lazy ? undefined : this.get();
- };
- /**
- * Evaluate the getter, and re-collect dependencies.
- */
- Watcher.prototype.get = function get() {
- pushTarget(this);
- var value;
- var vm = this.vm;
- try {
- value = this.getter.call(vm, vm);
- } catch (e) {
- if (this.user) {
- handleError(e, vm, "getter for watcher \"" + this.expression + "\"");
- } else {
- throw e;
- }
- } finally {
- // "touch" every property so they are all tracked as
- // dependencies for deep watching
- if (this.deep) {
- traverse(value);
- }
- popTarget();
- this.cleanupDeps();
- }
- return value;
- };
- /**
- * Add a dependency to this directive.
- */
- Watcher.prototype.addDep = function addDep(dep) {
- var id = dep.id;
- if (!this.newDepIds.has(id)) {
- this.newDepIds.add(id);
- this.newDeps.push(dep);
- if (!this.depIds.has(id)) {
- dep.addSub(this);
- }
- }
- };
- /**
- * Clean up for dependency collection.
- */
- Watcher.prototype.cleanupDeps = function cleanupDeps() {
- var i = this.deps.length;
- while (i--) {
- var dep = this.deps[i];
- if (!this.newDepIds.has(dep.id)) {
- dep.removeSub(this);
- }
- }
- var tmp = this.depIds;
- this.depIds = this.newDepIds;
- this.newDepIds = tmp;
- this.newDepIds.clear();
- tmp = this.deps;
- this.deps = this.newDeps;
- this.newDeps = tmp;
- this.newDeps.length = 0;
- };
- /**
- * Subscriber interface.
- * Will be called when a dependency changes.
- */
- Watcher.prototype.update = function update() {
- /* istanbul ignore else */
- if (this.lazy) {
- this.dirty = true;
- } else if (this.sync) {
- this.run();
- } else {
- queueWatcher(this);
- }
- };
- /**
- * Scheduler job interface.
- * Will be called by the scheduler.
- */
- Watcher.prototype.run = function run() {
- if (this.active) {
- var value = this.get();
- if (value !== this.value || // Deep watchers and watchers on Object/Arrays should fire even
- // when the value is the same, because the value may
- // have mutated.
- isObject(value) || this.deep) {
- // set new value
- var oldValue = this.value;
- this.value = value;
- if (this.user) {
- try {
- this.cb.call(this.vm, value, oldValue);
- } catch (e) {
- handleError(e, this.vm, "callback for watcher \"" + this.expression + "\"");
- }
- } else {
- this.cb.call(this.vm, value, oldValue);
- }
- }
- }
- };
- /**
- * Evaluate the value of the watcher.
- * This only gets called for lazy watchers.
- */
- Watcher.prototype.evaluate = function evaluate() {
- this.value = this.get();
- this.dirty = false;
- };
- /**
- * Depend on all deps collected by this watcher.
- */
- Watcher.prototype.depend = function depend() {
- var i = this.deps.length;
- while (i--) {
- this.deps[i].depend();
- }
- };
- /**
- * Remove self from all dependencies' subscriber list.
- */
- Watcher.prototype.teardown = function teardown() {
- if (this.active) {
- // remove self from vm's watcher list
- // this is a somewhat expensive operation so we skip it
- // if the vm is being destroyed.
- if (!this.vm._isBeingDestroyed) {
- remove(this.vm._watchers, this);
- }
- var i = this.deps.length;
- while (i--) {
- this.deps[i].removeSub(this);
- }
- this.active = false;
- }
- };
- /* */
- var sharedPropertyDefinition = {
- enumerable: true,
- configurable: true,
- get: noop,
- set: noop
- };
- function proxy(target, sourceKey, key) {
- sharedPropertyDefinition.get = function proxyGetter() {
- return this[sourceKey][key];
- };
- sharedPropertyDefinition.set = function proxySetter(val) {
- this[sourceKey][key] = val;
- };
- Object.defineProperty(target, key, sharedPropertyDefinition);
- }
- function initState(vm) {
- vm._watchers = [];
- var opts = vm.$options;
- if (opts.props) {
- initProps(vm, opts.props);
- }
- if (opts.methods) {
- initMethods(vm, opts.methods);
- }
- if (opts.data) {
- initData(vm);
- } else {
- observe(vm._data = {}, true
- /* asRootData */
- );
- }
- if (opts.computed) {
- initComputed(vm, opts.computed);
- }
- if (opts.watch && opts.watch !== nativeWatch) {
- initWatch(vm, opts.watch);
- }
- }
- function initProps(vm, propsOptions) {
- var propsData = vm.$options.propsData || {};
- var props = vm._props = {}; // cache prop keys so that future props updates can iterate using Array
- // instead of dynamic object key enumeration.
- var keys = vm.$options._propKeys = [];
- var isRoot = !vm.$parent; // root instance props should be converted
- if (!isRoot) {
- toggleObserving(false);
- }
- var loop = function loop(key) {
- keys.push(key);
- var value = validateProp(key, propsOptions, propsData, vm);
- /* istanbul ignore else */
- if (true) {
- var hyphenatedKey = hyphenate(key);
- if (isReservedAttribute(hyphenatedKey) || config.isReservedAttr(hyphenatedKey)) {
- warn("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop.", vm);
- }
- defineReactive$$1(props, key, value, function () {
- if (!isRoot && !isUpdatingChildComponent) {
- 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);
- }
- });
- } else {} // static props are already proxied on the component's prototype
- // during Vue.extend(). We only need to proxy props defined at
- // instantiation here.
- if (!(key in vm)) {
- proxy(vm, "_props", key);
- }
- };
- for (var key in propsOptions) {
- loop(key);
- }
- toggleObserving(true);
- }
- function initData(vm) {
- var data = vm.$options.data;
- data = vm._data = typeof data === 'function' ? getData(data, vm) : data || {};
- if (!isPlainObject(data)) {
- data = {};
- true && warn('data functions should return an object:\n' + 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', vm);
- } // proxy data on instance
- var keys = Object.keys(data);
- var props = vm.$options.props;
- var methods = vm.$options.methods;
- var i = keys.length;
- while (i--) {
- var key = keys[i];
- if (true) {
- if (methods && hasOwn(methods, key)) {
- warn("Method \"" + key + "\" has already been defined as a data property.", vm);
- }
- }
- if (props && hasOwn(props, key)) {
- true && warn("The data property \"" + key + "\" is already declared as a prop. " + "Use prop default value instead.", vm);
- } else if (!isReserved(key)) {
- proxy(vm, "_data", key);
- }
- } // observe data
- observe(data, true
- /* asRootData */
- );
- }
- function getData(data, vm) {
- // #7573 disable dep collection when invoking data getters
- pushTarget();
- try {
- return data.call(vm, vm);
- } catch (e) {
- handleError(e, vm, "data()");
- return {};
- } finally {
- popTarget();
- }
- }
- var computedWatcherOptions = {
- lazy: true
- };
- function initComputed(vm, computed) {
- // $flow-disable-line
- var watchers = vm._computedWatchers = Object.create(null); // computed properties are just getters during SSR
- var isSSR = isServerRendering();
- for (var key in computed) {
- var userDef = computed[key];
- var getter = typeof userDef === 'function' ? userDef : userDef.get;
- if ( true && getter == null) {
- warn("Getter is missing for computed property \"" + key + "\".", vm);
- }
- if (!isSSR) {
- // create internal watcher for the computed property.
- watchers[key] = new Watcher(vm, getter || noop, noop, computedWatcherOptions);
- } // component-defined computed properties are already defined on the
- // component prototype. We only need to define computed properties defined
- // at instantiation here.
- if (!(key in vm)) {
- defineComputed(vm, key, userDef);
- } else if (true) {
- if (key in vm.$data) {
- warn("The computed property \"" + key + "\" is already defined in data.", vm);
- } else if (vm.$options.props && key in vm.$options.props) {
- warn("The computed property \"" + key + "\" is already defined as a prop.", vm);
- }
- }
- }
- }
- function defineComputed(target, key, userDef) {
- var shouldCache = !isServerRendering();
- if (typeof userDef === 'function') {
- sharedPropertyDefinition.get = shouldCache ? createComputedGetter(key) : createGetterInvoker(userDef);
- sharedPropertyDefinition.set = noop;
- } else {
- sharedPropertyDefinition.get = userDef.get ? shouldCache && userDef.cache !== false ? createComputedGetter(key) : createGetterInvoker(userDef.get) : noop;
- sharedPropertyDefinition.set = userDef.set || noop;
- }
- if ( true && sharedPropertyDefinition.set === noop) {
- sharedPropertyDefinition.set = function () {
- warn("Computed property \"" + key + "\" was assigned to but it has no setter.", this);
- };
- }
- Object.defineProperty(target, key, sharedPropertyDefinition);
- }
- function createComputedGetter(key) {
- return function computedGetter() {
- var watcher = this._computedWatchers && this._computedWatchers[key];
- if (watcher) {
- if (watcher.dirty) {
- watcher.evaluate();
- }
- if (Dep.SharedObject.target) {
- // fixed by xxxxxx
- watcher.depend();
- }
- return watcher.value;
- }
- };
- }
- function createGetterInvoker(fn) {
- return function computedGetter() {
- return fn.call(this, this);
- };
- }
- function initMethods(vm, methods) {
- var props = vm.$options.props;
- for (var key in methods) {
- if (true) {
- if (typeof methods[key] !== 'function') {
- warn("Method \"" + key + "\" has type \"" + _typeof(methods[key]) + "\" in the component definition. " + "Did you reference the function correctly?", vm);
- }
- if (props && hasOwn(props, key)) {
- warn("Method \"" + key + "\" has already been defined as a prop.", vm);
- }
- if (key in vm && isReserved(key)) {
- warn("Method \"" + key + "\" conflicts with an existing Vue instance method. " + "Avoid defining component methods that start with _ or $.");
- }
- }
- vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
- }
- }
- function initWatch(vm, watch) {
- for (var key in watch) {
- var handler = watch[key];
- if (Array.isArray(handler)) {
- for (var i = 0; i < handler.length; i++) {
- createWatcher(vm, key, handler[i]);
- }
- } else {
- createWatcher(vm, key, handler);
- }
- }
- }
- function createWatcher(vm, expOrFn, handler, options) {
- if (isPlainObject(handler)) {
- options = handler;
- handler = handler.handler;
- }
- if (typeof handler === 'string') {
- handler = vm[handler];
- }
- return vm.$watch(expOrFn, handler, options);
- }
- function stateMixin(Vue) {
- // flow somehow has problems with directly declared definition object
- // when using Object.defineProperty, so we have to procedurally build up
- // the object here.
- var dataDef = {};
- dataDef.get = function () {
- return this._data;
- };
- var propsDef = {};
- propsDef.get = function () {
- return this._props;
- };
- if (true) {
- dataDef.set = function () {
- warn('Avoid replacing instance root $data. ' + 'Use nested data properties instead.', this);
- };
- propsDef.set = function () {
- warn("$props is readonly.", this);
- };
- }
- Object.defineProperty(Vue.prototype, '$data', dataDef);
- Object.defineProperty(Vue.prototype, '$props', propsDef);
- Vue.prototype.$set = set;
- Vue.prototype.$delete = del;
- Vue.prototype.$watch = function (expOrFn, cb, options) {
- var vm = this;
- if (isPlainObject(cb)) {
- return createWatcher(vm, expOrFn, cb, options);
- }
- options = options || {};
- options.user = true;
- var watcher = new Watcher(vm, expOrFn, cb, options);
- if (options.immediate) {
- try {
- cb.call(vm, watcher.value);
- } catch (error) {
- handleError(error, vm, "callback for immediate watcher \"" + watcher.expression + "\"");
- }
- }
- return function unwatchFn() {
- watcher.teardown();
- };
- };
- }
- /* */
- var uid$3 = 0;
- function initMixin(Vue) {
- Vue.prototype._init = function (options) {
- var vm = this; // a uid
- vm._uid = uid$3++;
- var startTag, endTag;
- /* istanbul ignore if */
- if ( true && config.performance && mark) {
- startTag = "vue-perf-start:" + vm._uid;
- endTag = "vue-perf-end:" + vm._uid;
- mark(startTag);
- } // a flag to avoid this being observed
- vm._isVue = true; // merge options
- if (options && options._isComponent) {
- // optimize internal component instantiation
- // since dynamic options merging is pretty slow, and none of the
- // internal component options needs special treatment.
- initInternalComponent(vm, options);
- } else {
- vm.$options = mergeOptions(resolveConstructorOptions(vm.constructor), options || {}, vm);
- }
- /* istanbul ignore else */
- if (true) {
- initProxy(vm);
- } else {} // expose real self
- vm._self = vm;
- initLifecycle(vm);
- initEvents(vm);
- initRender(vm);
- callHook(vm, 'beforeCreate');
- vm.mpHost !== 'mp-toutiao' && initInjections(vm); // resolve injections before data/props
- initState(vm);
- vm.mpHost !== 'mp-toutiao' && initProvide(vm); // resolve provide after data/props
- vm.mpHost !== 'mp-toutiao' && callHook(vm, 'created');
- /* istanbul ignore if */
- if ( true && config.performance && mark) {
- vm._name = formatComponentName(vm, false);
- mark(endTag);
- measure("vue " + vm._name + " init", startTag, endTag);
- }
- if (vm.$options.el) {
- vm.$mount(vm.$options.el);
- }
- };
- }
- function initInternalComponent(vm, options) {
- var opts = vm.$options = Object.create(vm.constructor.options); // doing this because it's faster than dynamic enumeration.
- var parentVnode = options._parentVnode;
- opts.parent = options.parent;
- opts._parentVnode = parentVnode;
- var vnodeComponentOptions = parentVnode.componentOptions;
- opts.propsData = vnodeComponentOptions.propsData;
- opts._parentListeners = vnodeComponentOptions.listeners;
- opts._renderChildren = vnodeComponentOptions.children;
- opts._componentTag = vnodeComponentOptions.tag;
- if (options.render) {
- opts.render = options.render;
- opts.staticRenderFns = options.staticRenderFns;
- }
- }
- function resolveConstructorOptions(Ctor) {
- var options = Ctor.options;
- if (Ctor.super) {
- var superOptions = resolveConstructorOptions(Ctor.super);
- var cachedSuperOptions = Ctor.superOptions;
- if (superOptions !== cachedSuperOptions) {
- // super option changed,
- // need to resolve new options.
- Ctor.superOptions = superOptions; // check if there are any late-modified/attached options (#4976)
- var modifiedOptions = resolveModifiedOptions(Ctor); // update base extend options
- if (modifiedOptions) {
- extend(Ctor.extendOptions, modifiedOptions);
- }
- options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
- if (options.name) {
- options.components[options.name] = Ctor;
- }
- }
- }
- return options;
- }
- function resolveModifiedOptions(Ctor) {
- var modified;
- var latest = Ctor.options;
- var sealed = Ctor.sealedOptions;
- for (var key in latest) {
- if (latest[key] !== sealed[key]) {
- if (!modified) {
- modified = {};
- }
- modified[key] = latest[key];
- }
- }
- return modified;
- }
- function Vue(options) {
- if ( true && !(this instanceof Vue)) {
- warn('Vue is a constructor and should be called with the `new` keyword');
- }
- this._init(options);
- }
- initMixin(Vue);
- stateMixin(Vue);
- eventsMixin(Vue);
- lifecycleMixin(Vue);
- renderMixin(Vue);
- /* */
- function initUse(Vue) {
- Vue.use = function (plugin) {
- var installedPlugins = this._installedPlugins || (this._installedPlugins = []);
- if (installedPlugins.indexOf(plugin) > -1) {
- return this;
- } // additional parameters
- var args = toArray(arguments, 1);
- args.unshift(this);
- if (typeof plugin.install === 'function') {
- plugin.install.apply(plugin, args);
- } else if (typeof plugin === 'function') {
- plugin.apply(null, args);
- }
- installedPlugins.push(plugin);
- return this;
- };
- }
- /* */
- function initMixin$1(Vue) {
- Vue.mixin = function (mixin) {
- this.options = mergeOptions(this.options, mixin);
- return this;
- };
- }
- /* */
- function initExtend(Vue) {
- /**
- * Each instance constructor, including Vue, has a unique
- * cid. This enables us to create wrapped "child
- * constructors" for prototypal inheritance and cache them.
- */
- Vue.cid = 0;
- var cid = 1;
- /**
- * Class inheritance
- */
- Vue.extend = function (extendOptions) {
- extendOptions = extendOptions || {};
- var Super = this;
- var SuperId = Super.cid;
- var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
- if (cachedCtors[SuperId]) {
- return cachedCtors[SuperId];
- }
- var name = extendOptions.name || Super.options.name;
- if ( true && name) {
- validateComponentName(name);
- }
- var Sub = function VueComponent(options) {
- this._init(options);
- };
- Sub.prototype = Object.create(Super.prototype);
- Sub.prototype.constructor = Sub;
- Sub.cid = cid++;
- Sub.options = mergeOptions(Super.options, extendOptions);
- Sub['super'] = Super; // For props and computed properties, we define the proxy getters on
- // the Vue instances at extension time, on the extended prototype. This
- // avoids Object.defineProperty calls for each instance created.
- if (Sub.options.props) {
- initProps$1(Sub);
- }
- if (Sub.options.computed) {
- initComputed$1(Sub);
- } // allow further extension/mixin/plugin usage
- Sub.extend = Super.extend;
- Sub.mixin = Super.mixin;
- Sub.use = Super.use; // create asset registers, so extended classes
- // can have their private assets too.
- ASSET_TYPES.forEach(function (type) {
- Sub[type] = Super[type];
- }); // enable recursive self-lookup
- if (name) {
- Sub.options.components[name] = Sub;
- } // keep a reference to the super options at extension time.
- // later at instantiation we can check if Super's options have
- // been updated.
- Sub.superOptions = Super.options;
- Sub.extendOptions = extendOptions;
- Sub.sealedOptions = extend({}, Sub.options); // cache constructor
- cachedCtors[SuperId] = Sub;
- return Sub;
- };
- }
- function initProps$1(Comp) {
- var props = Comp.options.props;
- for (var key in props) {
- proxy(Comp.prototype, "_props", key);
- }
- }
- function initComputed$1(Comp) {
- var computed = Comp.options.computed;
- for (var key in computed) {
- defineComputed(Comp.prototype, key, computed[key]);
- }
- }
- /* */
- function initAssetRegisters(Vue) {
- /**
- * Create asset registration methods.
- */
- ASSET_TYPES.forEach(function (type) {
- Vue[type] = function (id, definition) {
- if (!definition) {
- return this.options[type + 's'][id];
- } else {
- /* istanbul ignore if */
- if ( true && type === 'component') {
- validateComponentName(id);
- }
- if (type === 'component' && isPlainObject(definition)) {
- definition.name = definition.name || id;
- definition = this.options._base.extend(definition);
- }
- if (type === 'directive' && typeof definition === 'function') {
- definition = {
- bind: definition,
- update: definition
- };
- }
- this.options[type + 's'][id] = definition;
- return definition;
- }
- };
- });
- }
- /* */
- function getComponentName(opts) {
- return opts && (opts.Ctor.options.name || opts.tag);
- }
- function matches(pattern, name) {
- if (Array.isArray(pattern)) {
- return pattern.indexOf(name) > -1;
- } else if (typeof pattern === 'string') {
- return pattern.split(',').indexOf(name) > -1;
- } else if (isRegExp(pattern)) {
- return pattern.test(name);
- }
- /* istanbul ignore next */
- return false;
- }
- function pruneCache(keepAliveInstance, filter) {
- var cache = keepAliveInstance.cache;
- var keys = keepAliveInstance.keys;
- var _vnode = keepAliveInstance._vnode;
- for (var key in cache) {
- var cachedNode = cache[key];
- if (cachedNode) {
- var name = getComponentName(cachedNode.componentOptions);
- if (name && !filter(name)) {
- pruneCacheEntry(cache, key, keys, _vnode);
- }
- }
- }
- }
- function pruneCacheEntry(cache, key, keys, current) {
- var cached$$1 = cache[key];
- if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
- cached$$1.componentInstance.$destroy();
- }
- cache[key] = null;
- remove(keys, key);
- }
- var patternTypes = [String, RegExp, Array];
- var KeepAlive = {
- name: 'keep-alive',
- abstract: true,
- props: {
- include: patternTypes,
- exclude: patternTypes,
- max: [String, Number]
- },
- created: function created() {
- this.cache = Object.create(null);
- this.keys = [];
- },
- destroyed: function destroyed() {
- for (var key in this.cache) {
- pruneCacheEntry(this.cache, key, this.keys);
- }
- },
- mounted: function mounted() {
- var this$1 = this;
- this.$watch('include', function (val) {
- pruneCache(this$1, function (name) {
- return matches(val, name);
- });
- });
- this.$watch('exclude', function (val) {
- pruneCache(this$1, function (name) {
- return !matches(val, name);
- });
- });
- },
- render: function render() {
- var slot = this.$slots.default;
- var vnode = getFirstComponentChild(slot);
- var componentOptions = vnode && vnode.componentOptions;
- if (componentOptions) {
- // check pattern
- var name = getComponentName(componentOptions);
- var ref = this;
- var include = ref.include;
- var exclude = ref.exclude;
- if ( // not included
- include && (!name || !matches(include, name)) || // excluded
- exclude && name && matches(exclude, name)) {
- return vnode;
- }
- var ref$1 = this;
- var cache = ref$1.cache;
- var keys = ref$1.keys;
- var key = vnode.key == null // same constructor may get registered as different local components
- // so cid alone is not enough (#3269)
- ? componentOptions.Ctor.cid + (componentOptions.tag ? "::" + componentOptions.tag : '') : vnode.key;
- if (cache[key]) {
- vnode.componentInstance = cache[key].componentInstance; // make current key freshest
- remove(keys, key);
- keys.push(key);
- } else {
- cache[key] = vnode;
- keys.push(key); // prune oldest entry
- if (this.max && keys.length > parseInt(this.max)) {
- pruneCacheEntry(cache, keys[0], keys, this._vnode);
- }
- }
- vnode.data.keepAlive = true;
- }
- return vnode || slot && slot[0];
- }
- };
- var builtInComponents = {
- KeepAlive: KeepAlive
- };
- /* */
- function initGlobalAPI(Vue) {
- // config
- var configDef = {};
- configDef.get = function () {
- return config;
- };
- if (true) {
- configDef.set = function () {
- warn('Do not replace the Vue.config object, set individual fields instead.');
- };
- }
- Object.defineProperty(Vue, 'config', configDef); // exposed util methods.
- // NOTE: these are not considered part of the public API - avoid relying on
- // them unless you are aware of the risk.
- Vue.util = {
- warn: warn,
- extend: extend,
- mergeOptions: mergeOptions,
- defineReactive: defineReactive$$1
- };
- Vue.set = set;
- Vue.delete = del;
- Vue.nextTick = nextTick; // 2.6 explicit observable API
- Vue.observable = function (obj) {
- observe(obj);
- return obj;
- };
- Vue.options = Object.create(null);
- ASSET_TYPES.forEach(function (type) {
- Vue.options[type + 's'] = Object.create(null);
- }); // this is used to identify the "base" constructor to extend all plain-object
- // components with in Weex's multi-instance scenarios.
- Vue.options._base = Vue;
- extend(Vue.options.components, builtInComponents);
- initUse(Vue);
- initMixin$1(Vue);
- initExtend(Vue);
- initAssetRegisters(Vue);
- }
- initGlobalAPI(Vue);
- Object.defineProperty(Vue.prototype, '$isServer', {
- get: isServerRendering
- });
- Object.defineProperty(Vue.prototype, '$ssrContext', {
- get: function get() {
- /* istanbul ignore next */
- return this.$vnode && this.$vnode.ssrContext;
- }
- }); // expose FunctionalRenderContext for ssr runtime helper installation
- Object.defineProperty(Vue, 'FunctionalRenderContext', {
- value: FunctionalRenderContext
- });
- Vue.version = '2.6.11';
- /* */
- // these are reserved for web because they are directly compiled away
- // during template compilation
- var isReservedAttr = makeMap('style,class'); // attributes that should be using props for binding
- var acceptValue = makeMap('input,textarea,option,select,progress');
- var mustUseProp = function mustUseProp(tag, type, attr) {
- return attr === 'value' && acceptValue(tag) && type !== 'button' || attr === 'selected' && tag === 'option' || attr === 'checked' && tag === 'input' || attr === 'muted' && tag === 'video';
- };
- var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
- var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');
- var convertEnumeratedValue = function convertEnumeratedValue(key, value) {
- return isFalsyAttrValue(value) || value === 'false' ? 'false' // allow arbitrary string value for contenteditable
- : key === 'contenteditable' && isValidContentEditableValue(value) ? value : 'true';
- };
- 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');
- var xlinkNS = 'http://www.w3.org/1999/xlink';
- var isXlink = function isXlink(name) {
- return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink';
- };
- var getXlinkProp = function getXlinkProp(name) {
- return isXlink(name) ? name.slice(6, name.length) : '';
- };
- var isFalsyAttrValue = function isFalsyAttrValue(val) {
- return val == null || val === false;
- };
- /* */
- function genClassForVnode(vnode) {
- var data = vnode.data;
- var parentNode = vnode;
- var childNode = vnode;
- while (isDef(childNode.componentInstance)) {
- childNode = childNode.componentInstance._vnode;
- if (childNode && childNode.data) {
- data = mergeClassData(childNode.data, data);
- }
- }
- while (isDef(parentNode = parentNode.parent)) {
- if (parentNode && parentNode.data) {
- data = mergeClassData(data, parentNode.data);
- }
- }
- return renderClass(data.staticClass, data.class);
- }
- function mergeClassData(child, parent) {
- return {
- staticClass: concat(child.staticClass, parent.staticClass),
- class: isDef(child.class) ? [child.class, parent.class] : parent.class
- };
- }
- function renderClass(staticClass, dynamicClass) {
- if (isDef(staticClass) || isDef(dynamicClass)) {
- return concat(staticClass, stringifyClass(dynamicClass));
- }
- /* istanbul ignore next */
- return '';
- }
- function concat(a, b) {
- return a ? b ? a + ' ' + b : a : b || '';
- }
- function stringifyClass(value) {
- if (Array.isArray(value)) {
- return stringifyArray(value);
- }
- if (isObject(value)) {
- return stringifyObject(value);
- }
- if (typeof value === 'string') {
- return value;
- }
- /* istanbul ignore next */
- return '';
- }
- function stringifyArray(value) {
- var res = '';
- var stringified;
- for (var i = 0, l = value.length; i < l; i++) {
- if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
- if (res) {
- res += ' ';
- }
- res += stringified;
- }
- }
- return res;
- }
- function stringifyObject(value) {
- var res = '';
- for (var key in value) {
- if (value[key]) {
- if (res) {
- res += ' ';
- }
- res += key;
- }
- }
- return res;
- }
- /* */
- var namespaceMap = {
- svg: 'http://www.w3.org/2000/svg',
- math: 'http://www.w3.org/1998/Math/MathML'
- };
- 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
- // contain child elements.
- 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);
- var isReservedTag = function isReservedTag(tag) {
- return isHTMLTag(tag) || isSVG(tag);
- };
- function getTagNamespace(tag) {
- if (isSVG(tag)) {
- return 'svg';
- } // basic support for MathML
- // note it doesn't support other MathML elements being component roots
- if (tag === 'math') {
- return 'math';
- }
- }
- var unknownElementCache = Object.create(null);
- function isUnknownElement(tag) {
- /* istanbul ignore if */
- if (!inBrowser) {
- return true;
- }
- if (isReservedTag(tag)) {
- return false;
- }
- tag = tag.toLowerCase();
- /* istanbul ignore if */
- if (unknownElementCache[tag] != null) {
- return unknownElementCache[tag];
- }
- var el = document.createElement(tag);
- if (tag.indexOf('-') > -1) {
- // http://stackoverflow.com/a/28210364/1070244
- return unknownElementCache[tag] = el.constructor === window.HTMLUnknownElement || el.constructor === window.HTMLElement;
- } else {
- return unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString());
- }
- }
- var isTextInputType = makeMap('text,number,password,search,email,tel,url');
- /* */
- /**
- * Query an element selector if it's not an element already.
- */
- function query(el) {
- if (typeof el === 'string') {
- var selected = document.querySelector(el);
- if (!selected) {
- true && warn('Cannot find element: ' + el);
- return document.createElement('div');
- }
- return selected;
- } else {
- return el;
- }
- }
- /* */
- function createElement$1(tagName, vnode) {
- var elm = document.createElement(tagName);
- if (tagName !== 'select') {
- return elm;
- } // false or null will remove the attribute but undefined will not
- if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {
- elm.setAttribute('multiple', 'multiple');
- }
- return elm;
- }
- function createElementNS(namespace, tagName) {
- return document.createElementNS(namespaceMap[namespace], tagName);
- }
- function createTextNode(text) {
- return document.createTextNode(text);
- }
- function createComment(text) {
- return document.createComment(text);
- }
- function insertBefore(parentNode, newNode, referenceNode) {
- parentNode.insertBefore(newNode, referenceNode);
- }
- function removeChild(node, child) {
- node.removeChild(child);
- }
- function appendChild(node, child) {
- node.appendChild(child);
- }
- function parentNode(node) {
- return node.parentNode;
- }
- function nextSibling(node) {
- return node.nextSibling;
- }
- function tagName(node) {
- return node.tagName;
- }
- function setTextContent(node, text) {
- node.textContent = text;
- }
- function setStyleScope(node, scopeId) {
- node.setAttribute(scopeId, '');
- }
- var nodeOps = /*#__PURE__*/Object.freeze({
- createElement: createElement$1,
- createElementNS: createElementNS,
- createTextNode: createTextNode,
- createComment: createComment,
- insertBefore: insertBefore,
- removeChild: removeChild,
- appendChild: appendChild,
- parentNode: parentNode,
- nextSibling: nextSibling,
- tagName: tagName,
- setTextContent: setTextContent,
- setStyleScope: setStyleScope
- });
- /* */
- var ref = {
- create: function create(_, vnode) {
- registerRef(vnode);
- },
- update: function update(oldVnode, vnode) {
- if (oldVnode.data.ref !== vnode.data.ref) {
- registerRef(oldVnode, true);
- registerRef(vnode);
- }
- },
- destroy: function destroy(vnode) {
- registerRef(vnode, true);
- }
- };
- function registerRef(vnode, isRemoval) {
- var key = vnode.data.ref;
- if (!isDef(key)) {
- return;
- }
- var vm = vnode.context;
- var ref = vnode.componentInstance || vnode.elm;
- var refs = vm.$refs;
- if (isRemoval) {
- if (Array.isArray(refs[key])) {
- remove(refs[key], ref);
- } else if (refs[key] === ref) {
- refs[key] = undefined;
- }
- } else {
- if (vnode.data.refInFor) {
- if (!Array.isArray(refs[key])) {
- refs[key] = [ref];
- } else if (refs[key].indexOf(ref) < 0) {
- // $flow-disable-line
- refs[key].push(ref);
- }
- } else {
- refs[key] = ref;
- }
- }
- }
- /**
- * Virtual DOM patching algorithm based on Snabbdom by
- * Simon Friis Vindum (@paldepind)
- * Licensed under the MIT License
- * https://github.com/paldepind/snabbdom/blob/master/LICENSE
- *
- * modified by Evan You (@yyx990803)
- *
- * Not type-checking this because this file is perf-critical and the cost
- * of making flow understand it is not worth it.
- */
- var emptyNode = new VNode('', {}, []);
- var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
- function sameVnode(a, b) {
- 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));
- }
- function sameInputType(a, b) {
- if (a.tag !== 'input') {
- return true;
- }
- var i;
- var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;
- var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;
- return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB);
- }
- function createKeyToOldIdx(children, beginIdx, endIdx) {
- var i, key;
- var map = {};
- for (i = beginIdx; i <= endIdx; ++i) {
- key = children[i].key;
- if (isDef(key)) {
- map[key] = i;
- }
- }
- return map;
- }
- function createPatchFunction(backend) {
- var i, j;
- var cbs = {};
- var modules = backend.modules;
- var nodeOps = backend.nodeOps;
- for (i = 0; i < hooks.length; ++i) {
- cbs[hooks[i]] = [];
- for (j = 0; j < modules.length; ++j) {
- if (isDef(modules[j][hooks[i]])) {
- cbs[hooks[i]].push(modules[j][hooks[i]]);
- }
- }
- }
- function emptyNodeAt(elm) {
- return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm);
- }
- function createRmCb(childElm, listeners) {
- function remove$$1() {
- if (--remove$$1.listeners === 0) {
- removeNode(childElm);
- }
- }
- remove$$1.listeners = listeners;
- return remove$$1;
- }
- function removeNode(el) {
- var parent = nodeOps.parentNode(el); // element may have already been removed due to v-html / v-text
- if (isDef(parent)) {
- nodeOps.removeChild(parent, el);
- }
- }
- function isUnknownElement$$1(vnode, inVPre) {
- return !inVPre && !vnode.ns && !(config.ignoredElements.length && config.ignoredElements.some(function (ignore) {
- return isRegExp(ignore) ? ignore.test(vnode.tag) : ignore === vnode.tag;
- })) && config.isUnknownElement(vnode.tag);
- }
- var creatingElmInVPre = 0;
- function createElm(vnode, insertedVnodeQueue, parentElm, refElm, nested, ownerArray, index) {
- if (isDef(vnode.elm) && isDef(ownerArray)) {
- // This vnode was used in a previous render!
- // now it's used as a new node, overwriting its elm would cause
- // potential patch errors down the road when it's used as an insertion
- // reference node. Instead, we clone the node on-demand before creating
- // associated DOM element for it.
- vnode = ownerArray[index] = cloneVNode(vnode);
- }
- vnode.isRootInsert = !nested; // for transition enter check
- if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
- return;
- }
- var data = vnode.data;
- var children = vnode.children;
- var tag = vnode.tag;
- if (isDef(tag)) {
- if (true) {
- if (data && data.pre) {
- creatingElmInVPre++;
- }
- if (isUnknownElement$$1(vnode, creatingElmInVPre)) {
- warn('Unknown custom element: <' + tag + '> - did you ' + 'register the component correctly? For recursive components, ' + 'make sure to provide the "name" option.', vnode.context);
- }
- }
- vnode.elm = vnode.ns ? nodeOps.createElementNS(vnode.ns, tag) : nodeOps.createElement(tag, vnode);
- setScope(vnode);
- /* istanbul ignore if */
- {
- createChildren(vnode, children, insertedVnodeQueue);
- if (isDef(data)) {
- invokeCreateHooks(vnode, insertedVnodeQueue);
- }
- insert(parentElm, vnode.elm, refElm);
- }
- if ( true && data && data.pre) {
- creatingElmInVPre--;
- }
- } else if (isTrue(vnode.isComment)) {
- vnode.elm = nodeOps.createComment(vnode.text);
- insert(parentElm, vnode.elm, refElm);
- } else {
- vnode.elm = nodeOps.createTextNode(vnode.text);
- insert(parentElm, vnode.elm, refElm);
- }
- }
- function createComponent(vnode, insertedVnodeQueue, parentElm, refElm) {
- var i = vnode.data;
- if (isDef(i)) {
- var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;
- if (isDef(i = i.hook) && isDef(i = i.init)) {
- i(vnode, false
- /* hydrating */
- );
- } // after calling the init hook, if the vnode is a child component
- // it should've created a child instance and mounted it. the child
- // component also has set the placeholder vnode's elm.
- // in that case we can just return the element and be done.
- if (isDef(vnode.componentInstance)) {
- initComponent(vnode, insertedVnodeQueue);
- insert(parentElm, vnode.elm, refElm);
- if (isTrue(isReactivated)) {
- reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
- }
- return true;
- }
- }
- }
- function initComponent(vnode, insertedVnodeQueue) {
- if (isDef(vnode.data.pendingInsert)) {
- insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);
- vnode.data.pendingInsert = null;
- }
- vnode.elm = vnode.componentInstance.$el;
- if (isPatchable(vnode)) {
- invokeCreateHooks(vnode, insertedVnodeQueue);
- setScope(vnode);
- } else {
- // empty component root.
- // skip all element-related modules except for ref (#3455)
- registerRef(vnode); // make sure to invoke the insert hook
- insertedVnodeQueue.push(vnode);
- }
- }
- function reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm) {
- var i; // hack for #4339: a reactivated component with inner transition
- // does not trigger because the inner node's created hooks are not called
- // again. It's not ideal to involve module-specific logic in here but
- // there doesn't seem to be a better way to do it.
- var innerNode = vnode;
- while (innerNode.componentInstance) {
- innerNode = innerNode.componentInstance._vnode;
- if (isDef(i = innerNode.data) && isDef(i = i.transition)) {
- for (i = 0; i < cbs.activate.length; ++i) {
- cbs.activate[i](emptyNode, innerNode);
- }
- insertedVnodeQueue.push(innerNode);
- break;
- }
- } // unlike a newly created component,
- // a reactivated keep-alive component doesn't insert itself
- insert(parentElm, vnode.elm, refElm);
- }
- function insert(parent, elm, ref$$1) {
- if (isDef(parent)) {
- if (isDef(ref$$1)) {
- if (nodeOps.parentNode(ref$$1) === parent) {
- nodeOps.insertBefore(parent, elm, ref$$1);
- }
- } else {
- nodeOps.appendChild(parent, elm);
- }
- }
- }
- function createChildren(vnode, children, insertedVnodeQueue) {
- if (Array.isArray(children)) {
- if (true) {
- checkDuplicateKeys(children);
- }
- for (var i = 0; i < children.length; ++i) {
- createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i);
- }
- } else if (isPrimitive(vnode.text)) {
- nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));
- }
- }
- function isPatchable(vnode) {
- while (vnode.componentInstance) {
- vnode = vnode.componentInstance._vnode;
- }
- return isDef(vnode.tag);
- }
- function invokeCreateHooks(vnode, insertedVnodeQueue) {
- for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
- cbs.create[i$1](emptyNode, vnode);
- }
- i = vnode.data.hook; // Reuse variable
- if (isDef(i)) {
- if (isDef(i.create)) {
- i.create(emptyNode, vnode);
- }
- if (isDef(i.insert)) {
- insertedVnodeQueue.push(vnode);
- }
- }
- } // set scope id attribute for scoped CSS.
- // this is implemented as a special case to avoid the overhead
- // of going through the normal attribute patching process.
- function setScope(vnode) {
- var i;
- if (isDef(i = vnode.fnScopeId)) {
- nodeOps.setStyleScope(vnode.elm, i);
- } else {
- var ancestor = vnode;
- while (ancestor) {
- if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {
- nodeOps.setStyleScope(vnode.elm, i);
- }
- ancestor = ancestor.parent;
- }
- } // for slot content they should also get the scopeId from the host instance.
- if (isDef(i = activeInstance) && i !== vnode.context && i !== vnode.fnContext && isDef(i = i.$options._scopeId)) {
- nodeOps.setStyleScope(vnode.elm, i);
- }
- }
- function addVnodes(parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
- for (; startIdx <= endIdx; ++startIdx) {
- createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);
- }
- }
- function invokeDestroyHook(vnode) {
- var i, j;
- var data = vnode.data;
- if (isDef(data)) {
- if (isDef(i = data.hook) && isDef(i = i.destroy)) {
- i(vnode);
- }
- for (i = 0; i < cbs.destroy.length; ++i) {
- cbs.destroy[i](vnode);
- }
- }
- if (isDef(i = vnode.children)) {
- for (j = 0; j < vnode.children.length; ++j) {
- invokeDestroyHook(vnode.children[j]);
- }
- }
- }
- function removeVnodes(vnodes, startIdx, endIdx) {
- for (; startIdx <= endIdx; ++startIdx) {
- var ch = vnodes[startIdx];
- if (isDef(ch)) {
- if (isDef(ch.tag)) {
- removeAndInvokeRemoveHook(ch);
- invokeDestroyHook(ch);
- } else {
- // Text node
- removeNode(ch.elm);
- }
- }
- }
- }
- function removeAndInvokeRemoveHook(vnode, rm) {
- if (isDef(rm) || isDef(vnode.data)) {
- var i;
- var listeners = cbs.remove.length + 1;
- if (isDef(rm)) {
- // we have a recursively passed down rm callback
- // increase the listeners count
- rm.listeners += listeners;
- } else {
- // directly removing
- rm = createRmCb(vnode.elm, listeners);
- } // recursively invoke hooks on child component root node
- if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {
- removeAndInvokeRemoveHook(i, rm);
- }
- for (i = 0; i < cbs.remove.length; ++i) {
- cbs.remove[i](vnode, rm);
- }
- if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {
- i(vnode, rm);
- } else {
- rm();
- }
- } else {
- removeNode(vnode.elm);
- }
- }
- function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
- var oldStartIdx = 0;
- var newStartIdx = 0;
- var oldEndIdx = oldCh.length - 1;
- var oldStartVnode = oldCh[0];
- var oldEndVnode = oldCh[oldEndIdx];
- var newEndIdx = newCh.length - 1;
- var newStartVnode = newCh[0];
- var newEndVnode = newCh[newEndIdx];
- var oldKeyToIdx, idxInOld, vnodeToMove, refElm; // removeOnly is a special flag used only by <transition-group>
- // to ensure removed elements stay in correct relative positions
- // during leaving transitions
- var canMove = !removeOnly;
- if (true) {
- checkDuplicateKeys(newCh);
- }
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
- if (isUndef(oldStartVnode)) {
- oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left
- } else if (isUndef(oldEndVnode)) {
- oldEndVnode = oldCh[--oldEndIdx];
- } else if (sameVnode(oldStartVnode, newStartVnode)) {
- patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
- oldStartVnode = oldCh[++oldStartIdx];
- newStartVnode = newCh[++newStartIdx];
- } else if (sameVnode(oldEndVnode, newEndVnode)) {
- patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
- oldEndVnode = oldCh[--oldEndIdx];
- newEndVnode = newCh[--newEndIdx];
- } else if (sameVnode(oldStartVnode, newEndVnode)) {
- // Vnode moved right
- patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
- canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
- oldStartVnode = oldCh[++oldStartIdx];
- newEndVnode = newCh[--newEndIdx];
- } else if (sameVnode(oldEndVnode, newStartVnode)) {
- // Vnode moved left
- patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
- canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
- oldEndVnode = oldCh[--oldEndIdx];
- newStartVnode = newCh[++newStartIdx];
- } else {
- if (isUndef(oldKeyToIdx)) {
- oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);
- }
- idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);
- if (isUndef(idxInOld)) {
- // New element
- createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
- } else {
- vnodeToMove = oldCh[idxInOld];
- if (sameVnode(vnodeToMove, newStartVnode)) {
- patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
- oldCh[idxInOld] = undefined;
- canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);
- } else {
- // same key but different element. treat as new element
- createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
- }
- }
- newStartVnode = newCh[++newStartIdx];
- }
- }
- if (oldStartIdx > oldEndIdx) {
- refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
- addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
- } else if (newStartIdx > newEndIdx) {
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
- }
- }
- function checkDuplicateKeys(children) {
- var seenKeys = {};
- for (var i = 0; i < children.length; i++) {
- var vnode = children[i];
- var key = vnode.key;
- if (isDef(key)) {
- if (seenKeys[key]) {
- warn("Duplicate keys detected: '" + key + "'. This may cause an update error.", vnode.context);
- } else {
- seenKeys[key] = true;
- }
- }
- }
- }
- function findIdxInOld(node, oldCh, start, end) {
- for (var i = start; i < end; i++) {
- var c = oldCh[i];
- if (isDef(c) && sameVnode(node, c)) {
- return i;
- }
- }
- }
- function patchVnode(oldVnode, vnode, insertedVnodeQueue, ownerArray, index, removeOnly) {
- if (oldVnode === vnode) {
- return;
- }
- if (isDef(vnode.elm) && isDef(ownerArray)) {
- // clone reused vnode
- vnode = ownerArray[index] = cloneVNode(vnode);
- }
- var elm = vnode.elm = oldVnode.elm;
- if (isTrue(oldVnode.isAsyncPlaceholder)) {
- if (isDef(vnode.asyncFactory.resolved)) {
- hydrate(oldVnode.elm, vnode, insertedVnodeQueue);
- } else {
- vnode.isAsyncPlaceholder = true;
- }
- return;
- } // reuse element for static trees.
- // note we only do this if the vnode is cloned -
- // if the new node is not cloned it means the render functions have been
- // reset by the hot-reload-api and we need to do a proper re-render.
- if (isTrue(vnode.isStatic) && isTrue(oldVnode.isStatic) && vnode.key === oldVnode.key && (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {
- vnode.componentInstance = oldVnode.componentInstance;
- return;
- }
- var i;
- var data = vnode.data;
- if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {
- i(oldVnode, vnode);
- }
- var oldCh = oldVnode.children;
- var ch = vnode.children;
- if (isDef(data) && isPatchable(vnode)) {
- for (i = 0; i < cbs.update.length; ++i) {
- cbs.update[i](oldVnode, vnode);
- }
- if (isDef(i = data.hook) && isDef(i = i.update)) {
- i(oldVnode, vnode);
- }
- }
- if (isUndef(vnode.text)) {
- if (isDef(oldCh) && isDef(ch)) {
- if (oldCh !== ch) {
- updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly);
- }
- } else if (isDef(ch)) {
- if (true) {
- checkDuplicateKeys(ch);
- }
- if (isDef(oldVnode.text)) {
- nodeOps.setTextContent(elm, '');
- }
- addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
- } else if (isDef(oldCh)) {
- removeVnodes(oldCh, 0, oldCh.length - 1);
- } else if (isDef(oldVnode.text)) {
- nodeOps.setTextContent(elm, '');
- }
- } else if (oldVnode.text !== vnode.text) {
- nodeOps.setTextContent(elm, vnode.text);
- }
- if (isDef(data)) {
- if (isDef(i = data.hook) && isDef(i = i.postpatch)) {
- i(oldVnode, vnode);
- }
- }
- }
- function invokeInsertHook(vnode, queue, initial) {
- // delay insert hooks for component root nodes, invoke them after the
- // element is really inserted
- if (isTrue(initial) && isDef(vnode.parent)) {
- vnode.parent.data.pendingInsert = queue;
- } else {
- for (var i = 0; i < queue.length; ++i) {
- queue[i].data.hook.insert(queue[i]);
- }
- }
- }
- var hydrationBailed = false; // list of modules that can skip create hook during hydration because they
- // are already rendered on the client or has no need for initialization
- // Note: style is excluded because it relies on initial clone for future
- // deep updates (#7063).
- var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key'); // Note: this is a browser-only function so we can assume elms are DOM nodes.
- function hydrate(elm, vnode, insertedVnodeQueue, inVPre) {
- var i;
- var tag = vnode.tag;
- var data = vnode.data;
- var children = vnode.children;
- inVPre = inVPre || data && data.pre;
- vnode.elm = elm;
- if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {
- vnode.isAsyncPlaceholder = true;
- return true;
- } // assert node match
- if (true) {
- if (!assertNodeMatch(elm, vnode, inVPre)) {
- return false;
- }
- }
- if (isDef(data)) {
- if (isDef(i = data.hook) && isDef(i = i.init)) {
- i(vnode, true
- /* hydrating */
- );
- }
- if (isDef(i = vnode.componentInstance)) {
- // child component. it should have hydrated its own tree.
- initComponent(vnode, insertedVnodeQueue);
- return true;
- }
- }
- if (isDef(tag)) {
- if (isDef(children)) {
- // empty element, allow client to pick up and populate children
- if (!elm.hasChildNodes()) {
- createChildren(vnode, children, insertedVnodeQueue);
- } else {
- // v-html and domProps: innerHTML
- if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) {
- if (i !== elm.innerHTML) {
- /* istanbul ignore if */
- if ( true && typeof console !== 'undefined' && !hydrationBailed) {
- hydrationBailed = true;
- console.warn('Parent: ', elm);
- console.warn('server innerHTML: ', i);
- console.warn('client innerHTML: ', elm.innerHTML);
- }
- return false;
- }
- } else {
- // iterate and compare children lists
- var childrenMatch = true;
- var childNode = elm.firstChild;
- for (var i$1 = 0; i$1 < children.length; i$1++) {
- if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) {
- childrenMatch = false;
- break;
- }
- childNode = childNode.nextSibling;
- } // if childNode is not null, it means the actual childNodes list is
- // longer than the virtual children list.
- if (!childrenMatch || childNode) {
- /* istanbul ignore if */
- if ( true && typeof console !== 'undefined' && !hydrationBailed) {
- hydrationBailed = true;
- console.warn('Parent: ', elm);
- console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
- }
- return false;
- }
- }
- }
- }
- if (isDef(data)) {
- var fullInvoke = false;
- for (var key in data) {
- if (!isRenderedModule(key)) {
- fullInvoke = true;
- invokeCreateHooks(vnode, insertedVnodeQueue);
- break;
- }
- }
- if (!fullInvoke && data['class']) {
- // ensure collecting deps for deep class bindings for future updates
- traverse(data['class']);
- }
- }
- } else if (elm.data !== vnode.text) {
- elm.data = vnode.text;
- }
- return true;
- }
- function assertNodeMatch(node, vnode, inVPre) {
- if (isDef(vnode.tag)) {
- return vnode.tag.indexOf('vue-component') === 0 || !isUnknownElement$$1(vnode, inVPre) && vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase());
- } else {
- return node.nodeType === (vnode.isComment ? 8 : 3);
- }
- }
- return function patch(oldVnode, vnode, hydrating, removeOnly) {
- if (isUndef(vnode)) {
- if (isDef(oldVnode)) {
- invokeDestroyHook(oldVnode);
- }
- return;
- }
- var isInitialPatch = false;
- var insertedVnodeQueue = [];
- if (isUndef(oldVnode)) {
- // empty mount (likely as component), create new root element
- isInitialPatch = true;
- createElm(vnode, insertedVnodeQueue);
- } else {
- var isRealElement = isDef(oldVnode.nodeType);
- if (!isRealElement && sameVnode(oldVnode, vnode)) {
- // patch existing root node
- patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);
- } else {
- if (isRealElement) {
- // mounting to a real element
- // check if this is server-rendered content and if we can perform
- // a successful hydration.
- if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {
- oldVnode.removeAttribute(SSR_ATTR);
- hydrating = true;
- }
- if (isTrue(hydrating)) {
- if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
- invokeInsertHook(vnode, insertedVnodeQueue, true);
- return oldVnode;
- } else if (true) {
- 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.');
- }
- } // either not server-rendered, or hydration failed.
- // create an empty node and replace it
- oldVnode = emptyNodeAt(oldVnode);
- } // replacing existing element
- var oldElm = oldVnode.elm;
- var parentElm = nodeOps.parentNode(oldElm); // create new node
- createElm(vnode, insertedVnodeQueue, // extremely rare edge case: do not insert if old element is in a
- // leaving transition. Only happens when combining transition +
- // keep-alive + HOCs. (#4590)
- oldElm._leaveCb ? null : parentElm, nodeOps.nextSibling(oldElm)); // update parent placeholder node element, recursively
- if (isDef(vnode.parent)) {
- var ancestor = vnode.parent;
- var patchable = isPatchable(vnode);
- while (ancestor) {
- for (var i = 0; i < cbs.destroy.length; ++i) {
- cbs.destroy[i](ancestor);
- }
- ancestor.elm = vnode.elm;
- if (patchable) {
- for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
- cbs.create[i$1](emptyNode, ancestor);
- } // #6513
- // invoke insert hooks that may have been merged by create hooks.
- // e.g. for directives that uses the "inserted" hook.
- var insert = ancestor.data.hook.insert;
- if (insert.merged) {
- // start at index 1 to avoid re-invoking component mounted hook
- for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {
- insert.fns[i$2]();
- }
- }
- } else {
- registerRef(ancestor);
- }
- ancestor = ancestor.parent;
- }
- } // destroy old node
- if (isDef(parentElm)) {
- removeVnodes([oldVnode], 0, 0);
- } else if (isDef(oldVnode.tag)) {
- invokeDestroyHook(oldVnode);
- }
- }
- }
- invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
- return vnode.elm;
- };
- }
- /* */
- var directives = {
- create: updateDirectives,
- update: updateDirectives,
- destroy: function unbindDirectives(vnode) {
- updateDirectives(vnode, emptyNode);
- }
- };
- function updateDirectives(oldVnode, vnode) {
- if (oldVnode.data.directives || vnode.data.directives) {
- _update(oldVnode, vnode);
- }
- }
- function _update(oldVnode, vnode) {
- var isCreate = oldVnode === emptyNode;
- var isDestroy = vnode === emptyNode;
- var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);
- var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);
- var dirsWithInsert = [];
- var dirsWithPostpatch = [];
- var key, oldDir, dir;
- for (key in newDirs) {
- oldDir = oldDirs[key];
- dir = newDirs[key];
- if (!oldDir) {
- // new directive, bind
- callHook$1(dir, 'bind', vnode, oldVnode);
- if (dir.def && dir.def.inserted) {
- dirsWithInsert.push(dir);
- }
- } else {
- // existing directive, update
- dir.oldValue = oldDir.value;
- dir.oldArg = oldDir.arg;
- callHook$1(dir, 'update', vnode, oldVnode);
- if (dir.def && dir.def.componentUpdated) {
- dirsWithPostpatch.push(dir);
- }
- }
- }
- if (dirsWithInsert.length) {
- var callInsert = function callInsert() {
- for (var i = 0; i < dirsWithInsert.length; i++) {
- callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);
- }
- };
- if (isCreate) {
- mergeVNodeHook(vnode, 'insert', callInsert);
- } else {
- callInsert();
- }
- }
- if (dirsWithPostpatch.length) {
- mergeVNodeHook(vnode, 'postpatch', function () {
- for (var i = 0; i < dirsWithPostpatch.length; i++) {
- callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
- }
- });
- }
- if (!isCreate) {
- for (key in oldDirs) {
- if (!newDirs[key]) {
- // no longer present, unbind
- callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);
- }
- }
- }
- }
- var emptyModifiers = Object.create(null);
- function normalizeDirectives$1(dirs, vm) {
- var res = Object.create(null);
- if (!dirs) {
- // $flow-disable-line
- return res;
- }
- var i, dir;
- for (i = 0; i < dirs.length; i++) {
- dir = dirs[i];
- if (!dir.modifiers) {
- // $flow-disable-line
- dir.modifiers = emptyModifiers;
- }
- res[getRawDirName(dir)] = dir;
- dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);
- } // $flow-disable-line
- return res;
- }
- function getRawDirName(dir) {
- return dir.rawName || dir.name + "." + Object.keys(dir.modifiers || {}).join('.');
- }
- function callHook$1(dir, hook, vnode, oldVnode, isDestroy) {
- var fn = dir.def && dir.def[hook];
- if (fn) {
- try {
- fn(vnode.elm, dir, vnode, oldVnode, isDestroy);
- } catch (e) {
- handleError(e, vnode.context, "directive " + dir.name + " " + hook + " hook");
- }
- }
- }
- var baseModules = [ref, directives];
- /* */
- function findWxsProps(wxsProps, attrs) {
- var ret = {};
- Object.keys(wxsProps).forEach(function (name) {
- if (attrs[name]) {
- ret[wxsProps[name]] = attrs[name];
- delete attrs[name];
- }
- });
- return ret;
- }
- function updateWxsProps(oldVnode, vnode) {
- if (isUndef(oldVnode.data.wxsProps) && isUndef(vnode.data.wxsProps)) {
- return;
- }
- var oldWxsWatches = oldVnode.$wxsWatches;
- var wxsPropsKey = Object.keys(vnode.data.wxsProps);
- if (!oldWxsWatches && !wxsPropsKey.length) {
- return;
- }
- if (!oldWxsWatches) {
- oldWxsWatches = {};
- }
- var wxsProps = findWxsProps(vnode.data.wxsProps, vnode.data.attrs);
- var context = vnode.context;
- vnode.$wxsWatches = {};
- Object.keys(wxsProps).forEach(function (prop) {
- // app-plus view wxs
- var watchProp = prop;
- if (vnode.context.wxsProps) {
- watchProp = 'wxsProps.' + prop;
- }
- vnode.$wxsWatches[prop] = oldWxsWatches[prop] || vnode.context.$watch(watchProp, function (newVal, oldVal) {
- wxsProps[prop](newVal, oldVal, context.$getComponentDescriptor(context, true), vnode.elm.__vue__.$getComponentDescriptor(vnode.elm.__vue__, false));
- }, {
- deep: true
- });
- });
- Object.keys(oldWxsWatches).forEach(function (oldName) {
- if (!vnode.$wxsWatches[oldName]) {
- oldWxsWatches[oldName]();
- delete oldWxsWatches[oldName];
- }
- });
- }
- var wxs = {
- create: updateWxsProps,
- update: updateWxsProps
- };
- /* */
- function updateAttrs(oldVnode, vnode) {
- var opts = vnode.componentOptions;
- if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {
- return;
- }
- if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
- return;
- }
- var key, cur, old;
- var elm = vnode.elm;
- var oldAttrs = oldVnode.data.attrs || {};
- var attrs = vnode.data.attrs || {}; // clone observed objects, as the user probably wants to mutate it
- if (isDef(attrs.__ob__)) {
- attrs = vnode.data.attrs = extend({}, attrs);
- }
- for (key in attrs) {
- cur = attrs[key];
- old = oldAttrs[key];
- if (old !== cur) {
- setAttr(elm, key, cur);
- }
- } // #4391: in IE9, setting type can reset value for input[type=radio]
- // #6666: IE/Edge forces progress value down to 1 before setting a max
- /* istanbul ignore if */
- if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {
- setAttr(elm, 'value', attrs.value);
- }
- for (key in oldAttrs) {
- if (isUndef(attrs[key])) {
- if (isXlink(key)) {
- elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
- } else if (!isEnumeratedAttr(key)) {
- elm.removeAttribute(key);
- }
- }
- }
- }
- function setAttr(el, key, value) {
- if (el.tagName.indexOf('-') > -1) {
- baseSetAttr(el, key, value);
- } else if (isBooleanAttr(key)) {
- // set attribute for blank value
- // e.g. <option disabled>Select one</option>
- if (isFalsyAttrValue(value)) {
- el.removeAttribute(key);
- } else {
- // technically allowfullscreen is a boolean attribute for <iframe>,
- // but Flash expects a value of "true" when used on <embed> tag
- value = key === 'allowfullscreen' && el.tagName === 'EMBED' ? 'true' : key;
- el.setAttribute(key, value);
- }
- } else if (isEnumeratedAttr(key)) {
- el.setAttribute(key, convertEnumeratedValue(key, value));
- } else if (isXlink(key)) {
- if (isFalsyAttrValue(value)) {
- el.removeAttributeNS(xlinkNS, getXlinkProp(key));
- } else {
- el.setAttributeNS(xlinkNS, key, value);
- }
- } else {
- baseSetAttr(el, key, value);
- }
- }
- function baseSetAttr(el, key, value) {
- if (isFalsyAttrValue(value)) {
- el.removeAttribute(key);
- } else {
- // #7138: IE10 & 11 fires input event when setting placeholder on
- // <textarea>... block the first input event and remove the blocker
- // immediately.
- /* istanbul ignore if */
- if (isIE && !isIE9 && el.tagName === 'TEXTAREA' && key === 'placeholder' && value !== '' && !el.__ieph) {
- var blocker = function blocker(e) {
- e.stopImmediatePropagation();
- el.removeEventListener('input', blocker);
- };
- el.addEventListener('input', blocker); // $flow-disable-line
- el.__ieph = true;
- /* IE placeholder patched */
- }
- el.setAttribute(key, value);
- }
- }
- var attrs = {
- create: updateAttrs,
- update: updateAttrs
- };
- /* */
- function updateClass(oldVnode, vnode) {
- var el = vnode.elm;
- var data = vnode.data;
- var oldData = oldVnode.data;
- 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
- ) {
- return;
- }
- var cls = genClassForVnode(vnode); // handle transition classes
- var transitionClass = el._transitionClasses;
- if (isDef(transitionClass)) {
- cls = concat(cls, stringifyClass(transitionClass));
- } // fixed by xxxxxx __wxsClass
- if (Array.isArray(el.__wxsRemoveClass) && el.__wxsRemoveClass.length) {
- var clsArr = cls.split(/\s+/);
- el.__wxsRemoveClass.forEach(function (removeCls) {
- var clsIndex = clsArr.findIndex(function (cls) {
- return cls === removeCls;
- });
- if (clsIndex !== -1) {
- clsArr.splice(clsIndex, 1);
- }
- });
- cls = clsArr.join(' ');
- el.__wxsRemoveClass.length = 0;
- }
- if (el.__wxsAddClass) {
- // 去重
- var clsArr$1 = cls.split(/\s+/).concat(el.__wxsAddClass.split(/\s+/));
- var clsObj = Object.create(null);
- clsArr$1.forEach(function (cls) {
- cls && (clsObj[cls] = 1);
- });
- cls = Object.keys(clsObj).join(' ');
- } // fixed by xxxxxx (仅 h5 平台 extenalClasses)
- var context = vnode.context;
- var externalClasses = context.$options.mpOptions && context.$options.mpOptions.externalClasses;
- if (Array.isArray(externalClasses)) {
- externalClasses.forEach(function (externalClass) {
- // 简单替换 externalClass
- var externalClassValue = context[camelize(externalClass)];
- externalClassValue && (cls = cls.replace(externalClass, externalClassValue));
- });
- } // set the class
- if (cls !== el._prevClass) {
- el.setAttribute('class', cls);
- el._prevClass = cls;
- }
- }
- var klass = {
- create: updateClass,
- update: updateClass
- };
- /* */
- /* */
- /* */
- /* */
- // in some cases, the event used has to be determined at runtime
- // so we used some reserved tokens during compile.
- var RANGE_TOKEN = '__r';
- var CHECKBOX_RADIO_TOKEN = '__c';
- /* */
- // normalize v-model event tokens that can only be determined at runtime.
- // it's important to place the event as the first in the array because
- // the whole point is ensuring the v-model callback gets called before
- // user-attached handlers.
- function normalizeEvents(on) {
- /* istanbul ignore if */
- if (isDef(on[RANGE_TOKEN])) {
- // IE input[type=range] only supports `change` event
- var event = isIE ? 'change' : 'input';
- on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);
- delete on[RANGE_TOKEN];
- } // This was originally intended to fix #4521 but no longer necessary
- // after 2.5. Keeping it for backwards compat with generated code from < 2.4
- /* istanbul ignore if */
- if (isDef(on[CHECKBOX_RADIO_TOKEN])) {
- on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);
- delete on[CHECKBOX_RADIO_TOKEN];
- }
- }
- var target$1;
- function createOnceHandler$1(event, handler, capture) {
- var _target = target$1; // save current target element in closure
- return function onceHandler() {
- var res = handler.apply(null, arguments);
- if (res !== null) {
- remove$2(event, onceHandler, capture, _target);
- }
- };
- } // #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp
- // implementation and does not fire microtasks in between event propagation, so
- // safe to exclude.
- var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);
- function add$1(name, handler, capture, passive) {
- // async edge case #6566: inner click event triggers patch, event handler
- // attached to outer element during patch, and triggered again. This
- // happens because browsers fire microtask ticks between event propagation.
- // the solution is simple: we save the timestamp when a handler is attached,
- // and the handler would only fire if the event passed to it was fired
- // AFTER it was attached.
- if (useMicrotaskFix) {
- var attachedTimestamp = currentFlushTimestamp;
- var original = handler;
- handler = original._wrapper = function (e) {
- if ( // no bubbling, should always fire.
- // this is just a safety net in case event.timeStamp is unreliable in
- // certain weird environments...
- e.target === e.currentTarget || // event is fired after handler attachment
- e.timeStamp >= attachedTimestamp || // bail for environments that have buggy event.timeStamp implementations
- // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
- // #9681 QtWebEngine event.timeStamp is negative value
- e.timeStamp <= 0 || // #9448 bail if event is fired in another document in a multi-page
- // electron/nw.js app, since event.timeStamp will be using a different
- // starting reference
- e.target.ownerDocument !== document) {
- return original.apply(this, arguments);
- }
- };
- }
- target$1.addEventListener(name, handler, supportsPassive ? {
- capture: capture,
- passive: passive
- } : capture);
- }
- function remove$2(name, handler, capture, _target) {
- (_target || target$1).removeEventListener(name, handler._wrapper || handler, capture);
- }
- function updateDOMListeners(oldVnode, vnode) {
- if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
- return;
- }
- var on = vnode.data.on || {};
- var oldOn = oldVnode.data.on || {};
- target$1 = vnode.elm;
- normalizeEvents(on);
- updateListeners(on, oldOn, add$1, remove$2, createOnceHandler$1, vnode.context);
- target$1 = undefined;
- }
- var events = {
- create: updateDOMListeners,
- update: updateDOMListeners
- };
- /* */
- var svgContainer;
- function updateDOMProps(oldVnode, vnode) {
- if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
- return;
- }
- var key, cur;
- var elm = vnode.elm;
- var oldProps = oldVnode.data.domProps || {};
- var props = vnode.data.domProps || {}; // clone observed objects, as the user probably wants to mutate it
- if (isDef(props.__ob__)) {
- props = vnode.data.domProps = extend({}, props);
- }
- for (key in oldProps) {
- if (!(key in props)) {
- elm[key] = '';
- }
- }
- for (key in props) {
- cur = props[key]; // ignore children if the node has textContent or innerHTML,
- // as these will throw away existing DOM nodes and cause removal errors
- // on subsequent patches (#3360)
- if (key === 'textContent' || key === 'innerHTML') {
- if (vnode.children) {
- vnode.children.length = 0;
- }
- if (cur === oldProps[key]) {
- continue;
- } // #6601 work around Chrome version <= 55 bug where single textNode
- // replaced by innerHTML/textContent retains its parentNode property
- if (elm.childNodes.length === 1) {
- elm.removeChild(elm.childNodes[0]);
- }
- }
- if (key === 'value' && elm.tagName !== 'PROGRESS') {
- // store value as _value as well since
- // non-string values will be stringified
- elm._value = cur; // avoid resetting cursor position when value is the same
- var strCur = isUndef(cur) ? '' : String(cur);
- if (shouldUpdateValue(elm, strCur)) {
- elm.value = strCur;
- }
- } else if (key === 'innerHTML' && isSVG(elm.tagName) && isUndef(elm.innerHTML)) {
- // IE doesn't support innerHTML for SVG elements
- svgContainer = svgContainer || document.createElement('div');
- svgContainer.innerHTML = "<svg>" + cur + "</svg>";
- var svg = svgContainer.firstChild;
- while (elm.firstChild) {
- elm.removeChild(elm.firstChild);
- }
- while (svg.firstChild) {
- elm.appendChild(svg.firstChild);
- }
- } else if ( // skip the update if old and new VDOM state is the same.
- // `value` is handled separately because the DOM value may be temporarily
- // out of sync with VDOM state due to focus, composition and modifiers.
- // This #4521 by skipping the unnecesarry `checked` update.
- cur !== oldProps[key]) {
- // some property updates can throw
- // e.g. `value` on <progress> w/ non-finite value
- try {
- elm[key] = cur;
- } catch (e) {}
- }
- }
- } // check platforms/web/util/attrs.js acceptValue
- function shouldUpdateValue(elm, checkVal) {
- return !elm.composing && (elm.tagName === 'OPTION' || isNotInFocusAndDirty(elm, checkVal) || isDirtyWithModifiers(elm, checkVal));
- }
- function isNotInFocusAndDirty(elm, checkVal) {
- // return true when textbox (.number and .trim) loses focus and its value is
- // not equal to the updated value
- var notInFocus = true; // #6157
- // work around IE bug when accessing document.activeElement in an iframe
- try {
- notInFocus = document.activeElement !== elm;
- } catch (e) {}
- return notInFocus && elm.value !== checkVal;
- }
- function isDirtyWithModifiers(elm, newVal) {
- var value = elm.value;
- var modifiers = elm._vModifiers; // injected by v-model runtime
- if (isDef(modifiers)) {
- if (modifiers.number) {
- return toNumber(value) !== toNumber(newVal);
- }
- if (modifiers.trim) {
- return value.trim() !== newVal.trim();
- }
- }
- return value !== newVal;
- }
- var domProps = {
- create: updateDOMProps,
- update: updateDOMProps
- };
- /* */
- var parseStyleText = cached(function (cssText) {
- var res = {};
- var listDelimiter = /;(?![^(]*\))/g;
- var propertyDelimiter = /:(.+)/;
- cssText.split(listDelimiter).forEach(function (item) {
- if (item) {
- var tmp = item.split(propertyDelimiter);
- tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
- }
- });
- return res;
- }); // merge static and dynamic style data on the same vnode
- function normalizeStyleData(data) {
- var style = normalizeStyleBinding(data.style); // static style is pre-processed into an object during compilation
- // and is always a fresh object, so it's safe to merge into it
- return data.staticStyle ? extend(data.staticStyle, style) : style;
- } // normalize possible array / string values into Object
- function normalizeStyleBinding(bindingStyle) {
- if (Array.isArray(bindingStyle)) {
- return toObject(bindingStyle);
- }
- if (typeof bindingStyle === 'string') {
- return parseStyleText(bindingStyle);
- }
- return bindingStyle;
- }
- /**
- * parent component style should be after child's
- * so that parent component's style could override it
- */
- function getStyle(vnode, checkChild) {
- var res = {};
- var styleData;
- if (checkChild) {
- var childNode = vnode;
- while (childNode.componentInstance) {
- childNode = childNode.componentInstance._vnode;
- if (childNode && childNode.data && (styleData = normalizeStyleData(childNode.data))) {
- extend(res, styleData);
- }
- }
- }
- if (styleData = normalizeStyleData(vnode.data)) {
- extend(res, styleData);
- }
- var parentNode = vnode;
- while (parentNode = parentNode.parent) {
- if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
- extend(res, styleData);
- }
- }
- return res;
- }
- /* */
- var cssVarRE = /^--/;
- var importantRE = /\s*!important$/; // upx,rpx 正则匹配
- var unitRE = /([+-]?\d+(\.\d+)?)[r|u]px/g;
- var transformUnit = function transformUnit(val) {
- if (typeof val === 'string') {
- return val.replace(unitRE, function (a, b) {
- /* eslint-disable no-undef */
- return uni.upx2px(b) + 'px';
- });
- }
- return val;
- };
- var urlRE = /url\(\s*'?"?([a-zA-Z0-9\.\-\_\/]+\.(jpg|gif|png))"?'?\s*\)/;
- var transformUrl = function transformUrl(val, ctx) {
- if (typeof val === 'string' && val.indexOf('url(') !== -1) {
- var matches = val.match(urlRE);
- if (matches && matches.length === 3) {
- val = val.replace(matches[1], ctx._$getRealPath(matches[1]));
- }
- }
- return val;
- };
- var setProp = function setProp(el, name, val, ctx) {
- if (ctx && ctx._$getRealPath && val) {
- val = transformUrl(val, ctx);
- }
- /* istanbul ignore if */
- if (cssVarRE.test(name)) {
- el.style.setProperty(name, val);
- } else if (importantRE.test(val)) {
- el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');
- } else {
- var normalizedName = normalize(name);
- if (Array.isArray(val)) {
- // Support values array created by autoprefixer, e.g.
- // {display: ["-webkit-box", "-ms-flexbox", "flex"]}
- // Set them one by one, and the browser will only set those it can recognize
- for (var i = 0, len = val.length; i < len; i++) {
- el.style[normalizedName] = transformUnit(val[i]);
- }
- } else {
- el.style[normalizedName] = transformUnit(val);
- }
- }
- };
- var vendorNames = ['Webkit', 'Moz', 'ms'];
- var emptyStyle;
- var normalize = cached(function (prop) {
- emptyStyle = emptyStyle || document.createElement('div').style;
- prop = camelize(prop);
- if (prop !== 'filter' && prop in emptyStyle) {
- return prop;
- }
- var capName = prop.charAt(0).toUpperCase() + prop.slice(1);
- for (var i = 0; i < vendorNames.length; i++) {
- var name = vendorNames[i] + capName;
- if (name in emptyStyle) {
- return name;
- }
- }
- });
- function updateStyle(oldVnode, vnode) {
- var data = vnode.data;
- var oldData = oldVnode.data;
- var el = vnode.elm;
- if (isUndef(data.staticStyle) && isUndef(data.style) && isUndef(oldData.staticStyle) && isUndef(oldData.style) && isUndef(el.__wxsStyle) // fixed by xxxxxx __wxsStyle
- ) {
- return;
- }
- var cur, name;
- var oldStaticStyle = oldData.staticStyle;
- var oldStyleBinding = oldData.normalizedStyle || oldData.style || {}; // if static style exists, stylebinding already merged into it when doing normalizeStyleData
- var oldStyle = oldStaticStyle || oldStyleBinding;
- var style = normalizeStyleBinding(vnode.data.style) || {}; // store normalized style under a different key for next diff
- // make sure to clone it if it's reactive, since the user likely wants
- // to mutate it.
- vnode.data.normalizedStyle = isDef(style.__ob__) ? extend({}, style) : style;
- var newStyle = getStyle(vnode, true); // fixed by xxxxxx __wxsStyle
- if (el.__wxsStyle) {
- Object.assign(vnode.data.normalizedStyle, el.__wxsStyle);
- Object.assign(newStyle, el.__wxsStyle);
- }
- for (name in oldStyle) {
- if (isUndef(newStyle[name])) {
- setProp(el, name, '');
- }
- }
- for (name in newStyle) {
- cur = newStyle[name];
- if (cur !== oldStyle[name]) {
- // ie9 setting to null has no effect, must use empty string
- setProp(el, name, cur == null ? '' : cur, vnode.context);
- }
- }
- }
- var style = {
- create: updateStyle,
- update: updateStyle
- };
- /* */
- var whitespaceRE = /\s+/;
- /**
- * Add class with compatibility for SVG since classList is not supported on
- * SVG elements in IE
- */
- function addClass(el, cls) {
- /* istanbul ignore if */
- if (!cls || !(cls = cls.trim())) {
- return;
- }
- /* istanbul ignore else */
- if (el.classList) {
- if (cls.indexOf(' ') > -1) {
- cls.split(whitespaceRE).forEach(function (c) {
- return el.classList.add(c);
- });
- } else {
- el.classList.add(cls);
- }
- } else {
- var cur = " " + (el.getAttribute('class') || '') + " ";
- if (cur.indexOf(' ' + cls + ' ') < 0) {
- el.setAttribute('class', (cur + cls).trim());
- }
- }
- }
- /**
- * Remove class with compatibility for SVG since classList is not supported on
- * SVG elements in IE
- */
- function removeClass(el, cls) {
- /* istanbul ignore if */
- if (!cls || !(cls = cls.trim())) {
- return;
- }
- /* istanbul ignore else */
- if (el.classList) {
- if (cls.indexOf(' ') > -1) {
- cls.split(whitespaceRE).forEach(function (c) {
- return el.classList.remove(c);
- });
- } else {
- el.classList.remove(cls);
- }
- if (!el.classList.length) {
- el.removeAttribute('class');
- }
- } else {
- var cur = " " + (el.getAttribute('class') || '') + " ";
- var tar = ' ' + cls + ' ';
- while (cur.indexOf(tar) >= 0) {
- cur = cur.replace(tar, ' ');
- }
- cur = cur.trim();
- if (cur) {
- el.setAttribute('class', cur);
- } else {
- el.removeAttribute('class');
- }
- }
- }
- /* */
- function resolveTransition(def$$1) {
- if (!def$$1) {
- return;
- }
- /* istanbul ignore else */
- if (_typeof(def$$1) === 'object') {
- var res = {};
- if (def$$1.css !== false) {
- extend(res, autoCssTransition(def$$1.name || 'v'));
- }
- extend(res, def$$1);
- return res;
- } else if (typeof def$$1 === 'string') {
- return autoCssTransition(def$$1);
- }
- }
- var autoCssTransition = cached(function (name) {
- return {
- enterClass: name + "-enter",
- enterToClass: name + "-enter-to",
- enterActiveClass: name + "-enter-active",
- leaveClass: name + "-leave",
- leaveToClass: name + "-leave-to",
- leaveActiveClass: name + "-leave-active"
- };
- });
- var hasTransition = inBrowser && !isIE9;
- var TRANSITION = 'transition';
- var ANIMATION = 'animation'; // Transition property/event sniffing
- var transitionProp = 'transition';
- var transitionEndEvent = 'transitionend';
- var animationProp = 'animation';
- var animationEndEvent = 'animationend';
- if (hasTransition) {
- /* istanbul ignore if */
- if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) {
- transitionProp = 'WebkitTransition';
- transitionEndEvent = 'webkitTransitionEnd';
- }
- if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) {
- animationProp = 'WebkitAnimation';
- animationEndEvent = 'webkitAnimationEnd';
- }
- } // binding to window is necessary to make hot reload work in IE in strict mode
- var raf = inBrowser ? window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout :
- /* istanbul ignore next */
- function (fn) {
- return fn();
- };
- function nextFrame(fn) {
- raf(function () {
- raf(fn);
- });
- }
- function addTransitionClass(el, cls) {
- var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
- if (transitionClasses.indexOf(cls) < 0) {
- transitionClasses.push(cls);
- addClass(el, cls);
- }
- }
- function removeTransitionClass(el, cls) {
- if (el._transitionClasses) {
- remove(el._transitionClasses, cls);
- }
- removeClass(el, cls);
- }
- function whenTransitionEnds(el, expectedType, cb) {
- var ref = getTransitionInfo(el, expectedType);
- var type = ref.type;
- var timeout = ref.timeout;
- var propCount = ref.propCount;
- if (!type) {
- return cb();
- }
- var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
- var ended = 0;
- var end = function end() {
- el.removeEventListener(event, onEnd);
- cb();
- };
- var onEnd = function onEnd(e) {
- if (e.target === el) {
- if (++ended >= propCount) {
- end();
- }
- }
- };
- setTimeout(function () {
- if (ended < propCount) {
- end();
- }
- }, timeout + 1);
- el.addEventListener(event, onEnd);
- }
- var transformRE = /\b(transform|all)(,|$)/;
- function getTransitionInfo(el, expectedType) {
- var styles = window.getComputedStyle(el); // JSDOM may return undefined for transition properties
- var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');
- var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');
- var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
- var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');
- var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');
- var animationTimeout = getTimeout(animationDelays, animationDurations);
- var type;
- var timeout = 0;
- var propCount = 0;
- /* istanbul ignore if */
- if (expectedType === TRANSITION) {
- if (transitionTimeout > 0) {
- type = TRANSITION;
- timeout = transitionTimeout;
- propCount = transitionDurations.length;
- }
- } else if (expectedType === ANIMATION) {
- if (animationTimeout > 0) {
- type = ANIMATION;
- timeout = animationTimeout;
- propCount = animationDurations.length;
- }
- } else {
- timeout = Math.max(transitionTimeout, animationTimeout);
- type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
- propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
- }
- var hasTransform = type === TRANSITION && transformRE.test(styles[transitionProp + 'Property']);
- return {
- type: type,
- timeout: timeout,
- propCount: propCount,
- hasTransform: hasTransform
- };
- }
- function getTimeout(delays, durations) {
- /* istanbul ignore next */
- while (delays.length < durations.length) {
- delays = delays.concat(delays);
- }
- return Math.max.apply(null, durations.map(function (d, i) {
- return toMs(d) + toMs(delays[i]);
- }));
- } // Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers
- // in a locale-dependent way, using a comma instead of a dot.
- // If comma is not replaced with a dot, the input will be rounded down (i.e. acting
- // as a floor function) causing unexpected behaviors
- function toMs(s) {
- return Number(s.slice(0, -1).replace(',', '.')) * 1000;
- }
- /* */
- function enter(vnode, toggleDisplay) {
- var el = vnode.elm; // call leave callback now
- if (isDef(el._leaveCb)) {
- el._leaveCb.cancelled = true;
- el._leaveCb();
- }
- var data = resolveTransition(vnode.data.transition);
- if (isUndef(data)) {
- return;
- }
- /* istanbul ignore if */
- if (isDef(el._enterCb) || el.nodeType !== 1) {
- return;
- }
- var css = data.css;
- var type = data.type;
- var enterClass = data.enterClass;
- var enterToClass = data.enterToClass;
- var enterActiveClass = data.enterActiveClass;
- var appearClass = data.appearClass;
- var appearToClass = data.appearToClass;
- var appearActiveClass = data.appearActiveClass;
- var beforeEnter = data.beforeEnter;
- var enter = data.enter;
- var afterEnter = data.afterEnter;
- var enterCancelled = data.enterCancelled;
- var beforeAppear = data.beforeAppear;
- var appear = data.appear;
- var afterAppear = data.afterAppear;
- var appearCancelled = data.appearCancelled;
- var duration = data.duration; // activeInstance will always be the <transition> component managing this
- // transition. One edge case to check is when the <transition> is placed
- // as the root node of a child component. In that case we need to check
- // <transition>'s parent for appear check.
- var context = activeInstance;
- var transitionNode = activeInstance.$vnode;
- while (transitionNode && transitionNode.parent) {
- context = transitionNode.context;
- transitionNode = transitionNode.parent;
- }
- var isAppear = !context._isMounted || !vnode.isRootInsert;
- if (isAppear && !appear && appear !== '') {
- return;
- }
- var startClass = isAppear && appearClass ? appearClass : enterClass;
- var activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;
- var toClass = isAppear && appearToClass ? appearToClass : enterToClass;
- var beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;
- var enterHook = isAppear ? typeof appear === 'function' ? appear : enter : enter;
- var afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;
- var enterCancelledHook = isAppear ? appearCancelled || enterCancelled : enterCancelled;
- var explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);
- if ( true && explicitEnterDuration != null) {
- checkDuration(explicitEnterDuration, 'enter', vnode);
- }
- var expectsCSS = css !== false && !isIE9;
- var userWantsControl = getHookArgumentsLength(enterHook);
- var cb = el._enterCb = once(function () {
- if (expectsCSS) {
- removeTransitionClass(el, toClass);
- removeTransitionClass(el, activeClass);
- }
- if (cb.cancelled) {
- if (expectsCSS) {
- removeTransitionClass(el, startClass);
- }
- enterCancelledHook && enterCancelledHook(el);
- } else {
- afterEnterHook && afterEnterHook(el);
- }
- el._enterCb = null;
- });
- if (!vnode.data.show) {
- // remove pending leave element on enter by injecting an insert hook
- mergeVNodeHook(vnode, 'insert', function () {
- var parent = el.parentNode;
- var pendingNode = parent && parent._pending && parent._pending[vnode.key];
- if (pendingNode && pendingNode.tag === vnode.tag && pendingNode.elm._leaveCb) {
- pendingNode.elm._leaveCb();
- }
- enterHook && enterHook(el, cb);
- });
- } // start enter transition
- beforeEnterHook && beforeEnterHook(el);
- if (expectsCSS) {
- addTransitionClass(el, startClass);
- addTransitionClass(el, activeClass);
- nextFrame(function () {
- removeTransitionClass(el, startClass);
- if (!cb.cancelled) {
- addTransitionClass(el, toClass);
- if (!userWantsControl) {
- if (isValidDuration(explicitEnterDuration)) {
- setTimeout(cb, explicitEnterDuration);
- } else {
- whenTransitionEnds(el, type, cb);
- }
- }
- }
- });
- }
- if (vnode.data.show) {
- toggleDisplay && toggleDisplay();
- enterHook && enterHook(el, cb);
- }
- if (!expectsCSS && !userWantsControl) {
- cb();
- }
- }
- function leave(vnode, rm) {
- var el = vnode.elm; // call enter callback now
- if (isDef(el._enterCb)) {
- el._enterCb.cancelled = true;
- el._enterCb();
- }
- var data = resolveTransition(vnode.data.transition);
- if (isUndef(data) || el.nodeType !== 1) {
- return rm();
- }
- /* istanbul ignore if */
- if (isDef(el._leaveCb)) {
- return;
- }
- var css = data.css;
- var type = data.type;
- var leaveClass = data.leaveClass;
- var leaveToClass = data.leaveToClass;
- var leaveActiveClass = data.leaveActiveClass;
- var beforeLeave = data.beforeLeave;
- var leave = data.leave;
- var afterLeave = data.afterLeave;
- var leaveCancelled = data.leaveCancelled;
- var delayLeave = data.delayLeave;
- var duration = data.duration;
- var expectsCSS = css !== false && !isIE9;
- var userWantsControl = getHookArgumentsLength(leave);
- var explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);
- if ( true && isDef(explicitLeaveDuration)) {
- checkDuration(explicitLeaveDuration, 'leave', vnode);
- }
- var cb = el._leaveCb = once(function () {
- if (el.parentNode && el.parentNode._pending) {
- el.parentNode._pending[vnode.key] = null;
- }
- if (expectsCSS) {
- removeTransitionClass(el, leaveToClass);
- removeTransitionClass(el, leaveActiveClass);
- }
- if (cb.cancelled) {
- if (expectsCSS) {
- removeTransitionClass(el, leaveClass);
- }
- leaveCancelled && leaveCancelled(el);
- } else {
- rm();
- afterLeave && afterLeave(el);
- }
- el._leaveCb = null;
- });
- if (delayLeave) {
- delayLeave(performLeave);
- } else {
- performLeave();
- }
- function performLeave() {
- // the delayed leave may have already been cancelled
- if (cb.cancelled) {
- return;
- } // record leaving element
- if (!vnode.data.show && el.parentNode) {
- (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;
- }
- beforeLeave && beforeLeave(el);
- if (expectsCSS) {
- addTransitionClass(el, leaveClass);
- addTransitionClass(el, leaveActiveClass);
- nextFrame(function () {
- removeTransitionClass(el, leaveClass);
- if (!cb.cancelled) {
- addTransitionClass(el, leaveToClass);
- if (!userWantsControl) {
- if (isValidDuration(explicitLeaveDuration)) {
- setTimeout(cb, explicitLeaveDuration);
- } else {
- whenTransitionEnds(el, type, cb);
- }
- }
- }
- });
- }
- leave && leave(el, cb);
- if (!expectsCSS && !userWantsControl) {
- cb();
- }
- }
- } // only used in dev mode
- function checkDuration(val, name, vnode) {
- if (typeof val !== 'number') {
- warn("<transition> explicit " + name + " duration is not a valid number - " + "got " + JSON.stringify(val) + ".", vnode.context);
- } else if (isNaN(val)) {
- warn("<transition> explicit " + name + " duration is NaN - " + 'the duration expression might be incorrect.', vnode.context);
- }
- }
- function isValidDuration(val) {
- return typeof val === 'number' && !isNaN(val);
- }
- /**
- * Normalize a transition hook's argument length. The hook may be:
- * - a merged hook (invoker) with the original in .fns
- * - a wrapped component method (check ._length)
- * - a plain function (.length)
- */
- function getHookArgumentsLength(fn) {
- if (isUndef(fn)) {
- return false;
- }
- var invokerFns = fn.fns;
- if (isDef(invokerFns)) {
- // invoker
- return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);
- } else {
- return (fn._length || fn.length) > 1;
- }
- }
- function _enter(_, vnode) {
- if (vnode.data.show !== true) {
- enter(vnode);
- }
- }
- var transition = inBrowser ? {
- create: _enter,
- activate: _enter,
- remove: function remove$$1(vnode, rm) {
- /* istanbul ignore else */
- if (vnode.data.show !== true) {
- leave(vnode, rm);
- } else {
- rm();
- }
- }
- } : {};
- var platformModules = [wxs, // fixed by xxxxxx wxs props
- attrs, klass, events, domProps, style, transition];
- /* */
- // the directive module should be applied last, after all
- // built-in modules have been applied.
- var modules = platformModules.concat(baseModules);
- var patch = createPatchFunction({
- nodeOps: nodeOps,
- modules: modules
- });
- /**
- * Not type checking this file because flow doesn't like attaching
- * properties to Elements.
- */
- /* istanbul ignore if */
- if (isIE9) {
- // http://www.matts411.com/post/internet-explorer-9-oninput/
- document.addEventListener('selectionchange', function () {
- var el = document.activeElement;
- if (el && el.vmodel) {
- trigger(el, 'input');
- }
- });
- }
- var directive = {
- inserted: function inserted(el, binding, vnode, oldVnode) {
- if (vnode.tag === 'select') {
- // #6903
- if (oldVnode.elm && !oldVnode.elm._vOptions) {
- mergeVNodeHook(vnode, 'postpatch', function () {
- directive.componentUpdated(el, binding, vnode);
- });
- } else {
- setSelected(el, binding, vnode.context);
- }
- el._vOptions = [].map.call(el.options, getValue);
- } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
- el._vModifiers = binding.modifiers;
- if (!binding.modifiers.lazy) {
- el.addEventListener('compositionstart', onCompositionStart);
- el.addEventListener('compositionend', onCompositionEnd); // Safari < 10.2 & UIWebView doesn't fire compositionend when
- // switching focus before confirming composition choice
- // this also fixes the issue where some browsers e.g. iOS Chrome
- // fires "change" instead of "input" on autocomplete.
- el.addEventListener('change', onCompositionEnd);
- /* istanbul ignore if */
- if (isIE9) {
- el.vmodel = true;
- }
- }
- }
- },
- componentUpdated: function componentUpdated(el, binding, vnode) {
- if (vnode.tag === 'select') {
- setSelected(el, binding, vnode.context); // in case the options rendered by v-for have changed,
- // it's possible that the value is out-of-sync with the rendered options.
- // detect such cases and filter out values that no longer has a matching
- // option in the DOM.
- var prevOptions = el._vOptions;
- var curOptions = el._vOptions = [].map.call(el.options, getValue);
- if (curOptions.some(function (o, i) {
- return !looseEqual(o, prevOptions[i]);
- })) {
- // trigger change event if
- // no matching option found for at least one value
- var needReset = el.multiple ? binding.value.some(function (v) {
- return hasNoMatchingOption(v, curOptions);
- }) : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions);
- if (needReset) {
- trigger(el, 'change');
- }
- }
- }
- }
- };
- function setSelected(el, binding, vm) {
- actuallySetSelected(el, binding, vm);
- /* istanbul ignore if */
- if (isIE || isEdge) {
- setTimeout(function () {
- actuallySetSelected(el, binding, vm);
- }, 0);
- }
- }
- function actuallySetSelected(el, binding, vm) {
- var value = binding.value;
- var isMultiple = el.multiple;
- if (isMultiple && !Array.isArray(value)) {
- 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);
- return;
- }
- var selected, option;
- for (var i = 0, l = el.options.length; i < l; i++) {
- option = el.options[i];
- if (isMultiple) {
- selected = looseIndexOf(value, getValue(option)) > -1;
- if (option.selected !== selected) {
- option.selected = selected;
- }
- } else {
- if (looseEqual(getValue(option), value)) {
- if (el.selectedIndex !== i) {
- el.selectedIndex = i;
- }
- return;
- }
- }
- }
- if (!isMultiple) {
- el.selectedIndex = -1;
- }
- }
- function hasNoMatchingOption(value, options) {
- return options.every(function (o) {
- return !looseEqual(o, value);
- });
- }
- function getValue(option) {
- return '_value' in option ? option._value : option.value;
- }
- function onCompositionStart(e) {
- e.target.composing = true;
- }
- function onCompositionEnd(e) {
- // prevent triggering an input event for no reason
- if (!e.target.composing) {
- return;
- }
- e.target.composing = false;
- trigger(e.target, 'input');
- }
- function trigger(el, type) {
- var e = document.createEvent('HTMLEvents');
- e.initEvent(type, true, true);
- el.dispatchEvent(e);
- }
- /* */
- // recursively search for possible transition defined inside the component root
- function locateNode(vnode) {
- return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;
- }
- var show = {
- bind: function bind(el, ref, vnode) {
- var value = ref.value;
- vnode = locateNode(vnode);
- var transition$$1 = vnode.data && vnode.data.transition;
- var originalDisplay = el.__vOriginalDisplay = el.style.display === 'none' ? '' : el.style.display;
- if (value && transition$$1) {
- vnode.data.show = true;
- enter(vnode, function () {
- el.style.display = originalDisplay;
- });
- } else {
- el.style.display = value ? originalDisplay : 'none';
- }
- },
- update: function update(el, ref, vnode) {
- var value = ref.value;
- var oldValue = ref.oldValue;
- /* istanbul ignore if */
- if (!value === !oldValue) {
- return;
- }
- vnode = locateNode(vnode);
- var transition$$1 = vnode.data && vnode.data.transition;
- if (transition$$1) {
- vnode.data.show = true;
- if (value) {
- enter(vnode, function () {
- el.style.display = el.__vOriginalDisplay;
- });
- } else {
- leave(vnode, function () {
- el.style.display = 'none';
- });
- }
- } else {
- el.style.display = value ? el.__vOriginalDisplay : 'none';
- }
- },
- unbind: function unbind(el, binding, vnode, oldVnode, isDestroy) {
- if (!isDestroy) {
- el.style.display = el.__vOriginalDisplay;
- }
- }
- };
- var platformDirectives = {
- model: directive,
- show: show
- };
- /* */
- var transitionProps = {
- name: String,
- appear: Boolean,
- css: Boolean,
- mode: String,
- type: String,
- enterClass: String,
- leaveClass: String,
- enterToClass: String,
- leaveToClass: String,
- enterActiveClass: String,
- leaveActiveClass: String,
- appearClass: String,
- appearActiveClass: String,
- appearToClass: String,
- duration: [Number, String, Object]
- }; // in case the child is also an abstract component, e.g. <keep-alive>
- // we want to recursively retrieve the real component to be rendered
- function getRealChild(vnode) {
- var compOptions = vnode && vnode.componentOptions;
- if (compOptions && compOptions.Ctor.options.abstract) {
- return getRealChild(getFirstComponentChild(compOptions.children));
- } else {
- return vnode;
- }
- }
- function extractTransitionData(comp) {
- var data = {};
- var options = comp.$options; // props
- for (var key in options.propsData) {
- data[key] = comp[key];
- } // events.
- // extract listeners and pass them directly to the transition methods
- var listeners = options._parentListeners;
- for (var key$1 in listeners) {
- data[camelize(key$1)] = listeners[key$1];
- }
- return data;
- }
- function placeholder(h, rawChild) {
- if (/\d-keep-alive$/.test(rawChild.tag)) {
- return h('keep-alive', {
- props: rawChild.componentOptions.propsData
- });
- }
- }
- function hasParentTransition(vnode) {
- while (vnode = vnode.parent) {
- if (vnode.data.transition) {
- return true;
- }
- }
- }
- function isSameChild(child, oldChild) {
- return oldChild.key === child.key && oldChild.tag === child.tag;
- }
- var isNotTextNode = function isNotTextNode(c) {
- return c.tag || isAsyncPlaceholder(c);
- };
- var isVShowDirective = function isVShowDirective(d) {
- return d.name === 'show';
- };
- var Transition = {
- name: 'transition',
- props: transitionProps,
- abstract: true,
- render: function render(h) {
- var this$1 = this;
- var children = this.$slots.default;
- if (!children) {
- return;
- } // filter out text nodes (possible whitespaces)
- children = children.filter(isNotTextNode);
- /* istanbul ignore if */
- if (!children.length) {
- return;
- } // warn multiple elements
- if ( true && children.length > 1) {
- warn('<transition> can only be used on a single element. Use ' + '<transition-group> for lists.', this.$parent);
- }
- var mode = this.mode; // warn invalid mode
- if ( true && mode && mode !== 'in-out' && mode !== 'out-in') {
- warn('invalid <transition> mode: ' + mode, this.$parent);
- }
- var rawChild = children[0]; // if this is a component root node and the component's
- // parent container node also has transition, skip.
- if (hasParentTransition(this.$vnode)) {
- return rawChild;
- } // apply transition data to child
- // use getRealChild() to ignore abstract components e.g. keep-alive
- var child = getRealChild(rawChild);
- /* istanbul ignore if */
- if (!child) {
- return rawChild;
- }
- if (this._leaving) {
- return placeholder(h, rawChild);
- } // ensure a key that is unique to the vnode type and to this transition
- // component instance. This key will be used to remove pending leaving nodes
- // during entering.
- var id = "__transition-" + this._uid + "-";
- 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;
- var data = (child.data || (child.data = {})).transition = extractTransitionData(this);
- var oldRawChild = this._vnode;
- var oldChild = getRealChild(oldRawChild); // mark v-show
- // so that the transition module can hand over the control to the directive
- if (child.data.directives && child.data.directives.some(isVShowDirective)) {
- child.data.show = true;
- }
- if (oldChild && oldChild.data && !isSameChild(child, oldChild) && !isAsyncPlaceholder(oldChild) && // #6687 component root is a comment node
- !(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment)) {
- // replace old child transition data with fresh one
- // important for dynamic transitions!
- var oldData = oldChild.data.transition = extend({}, data); // handle transition mode
- if (mode === 'out-in') {
- // return placeholder node and queue update when leave finishes
- this._leaving = true;
- mergeVNodeHook(oldData, 'afterLeave', function () {
- this$1._leaving = false;
- this$1.$forceUpdate();
- });
- return placeholder(h, rawChild);
- } else if (mode === 'in-out') {
- if (isAsyncPlaceholder(child)) {
- return oldRawChild;
- }
- var delayedLeave;
- var performLeave = function performLeave() {
- delayedLeave();
- };
- mergeVNodeHook(data, 'afterEnter', performLeave);
- mergeVNodeHook(data, 'enterCancelled', performLeave);
- mergeVNodeHook(oldData, 'delayLeave', function (leave) {
- delayedLeave = leave;
- });
- }
- }
- return rawChild;
- }
- };
- /* */
- var props = extend({
- tag: String,
- moveClass: String
- }, transitionProps);
- delete props.mode;
- var TransitionGroup = {
- props: props,
- beforeMount: function beforeMount() {
- var this$1 = this;
- var update = this._update;
- this._update = function (vnode, hydrating) {
- var restoreActiveInstance = setActiveInstance(this$1); // force removing pass
- this$1.__patch__(this$1._vnode, this$1.kept, false, // hydrating
- true // removeOnly (!important, avoids unnecessary moves)
- );
- this$1._vnode = this$1.kept;
- restoreActiveInstance();
- update.call(this$1, vnode, hydrating);
- };
- },
- render: function render(h) {
- var tag = this.tag || this.$vnode.data.tag || 'span';
- var map = Object.create(null);
- var prevChildren = this.prevChildren = this.children;
- var rawChildren = this.$slots.default || [];
- var children = this.children = [];
- var transitionData = extractTransitionData(this);
- for (var i = 0; i < rawChildren.length; i++) {
- var c = rawChildren[i];
- if (c.tag) {
- if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
- children.push(c);
- map[c.key] = c;
- (c.data || (c.data = {})).transition = transitionData;
- } else if (true) {
- var opts = c.componentOptions;
- var name = opts ? opts.Ctor.options.name || opts.tag || '' : c.tag;
- warn("<transition-group> children must be keyed: <" + name + ">");
- }
- }
- }
- if (prevChildren) {
- var kept = [];
- var removed = [];
- for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {
- var c$1 = prevChildren[i$1];
- c$1.data.transition = transitionData;
- c$1.data.pos = c$1.elm.getBoundingClientRect();
- if (map[c$1.key]) {
- kept.push(c$1);
- } else {
- removed.push(c$1);
- }
- }
- this.kept = h(tag, null, kept);
- this.removed = removed;
- }
- return h(tag, null, children);
- },
- updated: function updated() {
- var children = this.prevChildren;
- var moveClass = this.moveClass || (this.name || 'v') + '-move';
- if (!children.length || !this.hasMove(children[0].elm, moveClass)) {
- return;
- } // we divide the work into three loops to avoid mixing DOM reads and writes
- // in each iteration - which helps prevent layout thrashing.
- children.forEach(callPendingCbs);
- children.forEach(recordPosition);
- children.forEach(applyTranslation); // force reflow to put everything in position
- // assign to this to avoid being removed in tree-shaking
- // $flow-disable-line
- this._reflow = document.body.offsetHeight;
- children.forEach(function (c) {
- if (c.data.moved) {
- var el = c.elm;
- var s = el.style;
- addTransitionClass(el, moveClass);
- s.transform = s.WebkitTransform = s.transitionDuration = '';
- el.addEventListener(transitionEndEvent, el._moveCb = function cb(e) {
- if (e && e.target !== el) {
- return;
- }
- if (!e || /transform$/.test(e.propertyName)) {
- el.removeEventListener(transitionEndEvent, cb);
- el._moveCb = null;
- removeTransitionClass(el, moveClass);
- }
- });
- }
- });
- },
- methods: {
- hasMove: function hasMove(el, moveClass) {
- /* istanbul ignore if */
- if (!hasTransition) {
- return false;
- }
- /* istanbul ignore if */
- if (this._hasMove) {
- return this._hasMove;
- } // Detect whether an element with the move class applied has
- // CSS transitions. Since the element may be inside an entering
- // transition at this very moment, we make a clone of it and remove
- // all other transition classes applied to ensure only the move class
- // is applied.
- var clone = el.cloneNode();
- if (el._transitionClasses) {
- el._transitionClasses.forEach(function (cls) {
- removeClass(clone, cls);
- });
- }
- addClass(clone, moveClass);
- clone.style.display = 'none';
- this.$el.appendChild(clone);
- var info = getTransitionInfo(clone);
- this.$el.removeChild(clone);
- return this._hasMove = info.hasTransform;
- }
- }
- };
- function callPendingCbs(c) {
- /* istanbul ignore if */
- if (c.elm._moveCb) {
- c.elm._moveCb();
- }
- /* istanbul ignore if */
- if (c.elm._enterCb) {
- c.elm._enterCb();
- }
- }
- function recordPosition(c) {
- c.data.newPos = c.elm.getBoundingClientRect();
- }
- function applyTranslation(c) {
- var oldPos = c.data.pos;
- var newPos = c.data.newPos;
- var dx = oldPos.left - newPos.left;
- var dy = oldPos.top - newPos.top;
- if (dx || dy) {
- c.data.moved = true;
- var s = c.elm.style;
- s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)";
- s.transitionDuration = '0s';
- }
- }
- var platformComponents = {
- Transition: Transition,
- TransitionGroup: TransitionGroup
- };
- /* */
- // install platform specific utils
- Vue.config.mustUseProp = mustUseProp;
- Vue.config.isReservedTag = isReservedTag;
- Vue.config.isReservedAttr = isReservedAttr;
- Vue.config.getTagNamespace = getTagNamespace;
- Vue.config.isUnknownElement = isUnknownElement; // install platform runtime directives & components
- extend(Vue.options.directives, platformDirectives);
- extend(Vue.options.components, platformComponents); // install platform patch function
- Vue.prototype.__patch__ = inBrowser ? patch : noop;
- Vue.prototype.__call_hook = function (hook, args) {
- var vm = this; // #7573 disable dep collection when invoking lifecycle hooks
- pushTarget();
- var handlers = vm.$options[hook];
- var info = hook + " hook";
- var ret;
- if (handlers) {
- for (var i = 0, j = handlers.length; i < j; i++) {
- ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
- }
- }
- if (vm._hasHookEvent) {
- vm.$emit('hook:' + hook, args);
- }
- popTarget();
- return ret;
- }; // public mount method
- Vue.prototype.$mount = function (el, hydrating) {
- el = el && inBrowser ? query(el) : undefined;
- return mountComponent(this, el, hydrating);
- }; // devtools global hook
- /* istanbul ignore next */
- if (inBrowser) {
- setTimeout(function () {
- if (config.devtools) {
- if (devtools) {
- devtools.emit('init', Vue);
- } else if (true) {
- console[console.info ? 'info' : 'log']('Download the Vue Devtools extension for a better development experience:\n' + 'https://github.com/vuejs/vue-devtools');
- }
- }
- if ( true && config.productionTip !== false && typeof console !== 'undefined') {
- 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");
- }
- }, 0);
- }
- /* */
- /* harmony default export */ __webpack_exports__["a"] = (Vue);
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(16)))
- /***/ }),
- /* 9 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var addListenerToElement = function addListenerToElement(element, type, callback, capture) {
- // 暂时忽略 capture
- element.addEventListener(type, function ($event) {
- if (typeof callback === 'function') {
- if (callback($event) === false) {
- $event.preventDefault();
- $event.stopPropagation();
- }
- }
- }, {
- passive: false
- });
- };
- /* harmony default export */ __webpack_exports__["a"] = ({
- beforeDestroy: function beforeDestroy() {
- document.removeEventListener('mousemove', this.__mouseMoveEventListener);
- document.removeEventListener('mouseup', this.__mouseUpEventListener);
- },
- methods: {
- touchtrack: function touchtrack(element, method, useCancel) {
- var self = this;
- var x0 = 0;
- var y0 = 0;
- var x1 = 0;
- var y1 = 0;
- var fn = function fn($event, state, x, y) {
- if (self[method]({
- target: $event.target,
- currentTarget: $event.currentTarget,
- preventDefault: $event.preventDefault.bind($event),
- stopPropagation: $event.stopPropagation.bind($event),
- touches: $event.touches,
- changedTouches: $event.changedTouches,
- detail: {
- state: state,
- x0: x,
- y0: y,
- dx: x - x0,
- dy: y - y0,
- ddx: x - x1,
- ddy: y - y1,
- timeStamp: $event.timeStamp
- }
- }) === false) {
- return false;
- }
- };
- var $eventOld = null;
- var hasTouchStart;
- var hasMouseDown;
- addListenerToElement(element, 'touchstart', function ($event) {
- hasTouchStart = true;
- if ($event.touches.length === 1 && !$eventOld) {
- $eventOld = $event;
- x0 = x1 = $event.touches[0].pageX;
- y0 = y1 = $event.touches[0].pageY;
- return fn($event, 'start', x0, y0);
- }
- });
- addListenerToElement(element, 'mousedown', function ($event) {
- hasMouseDown = true;
- if (!hasTouchStart && !$eventOld) {
- // TODO touches changedTouches
- $eventOld = $event;
- x0 = x1 = $event.pageX;
- y0 = y1 = $event.pageY;
- return fn($event, 'start', x0, y0);
- }
- });
- addListenerToElement(element, 'touchmove', function ($event) {
- if ($event.touches.length === 1 && $eventOld) {
- var res = fn($event, 'move', $event.touches[0].pageX, $event.touches[0].pageY);
- x1 = $event.touches[0].pageX;
- y1 = $event.touches[0].pageY;
- return res;
- }
- });
- var mouseMoveEventListener = this.__mouseMoveEventListener = function ($event) {
- if (!hasTouchStart && hasMouseDown && $eventOld) {
- // TODO target currentTarget touches changedTouches
- var res = fn($event, 'move', $event.pageX, $event.pageY);
- x1 = $event.pageX;
- y1 = $event.pageY;
- return res;
- }
- };
- document.addEventListener('mousemove', mouseMoveEventListener);
- addListenerToElement(element, 'touchend', function ($event) {
- if ($event.touches.length === 0 && $eventOld) {
- hasTouchStart = false;
- $eventOld = null;
- return fn($event, 'end', $event.changedTouches[0].pageX, $event.changedTouches[0].pageY);
- }
- });
- var mouseUpEventListener = this.__mouseUpEventListener = function ($event) {
- hasMouseDown = false;
- if (!hasTouchStart && $eventOld) {
- // TODO target currentTarget touches changedTouches
- $eventOld = null;
- return fn($event, 'end', $event.pageX, $event.pageY);
- }
- };
- document.addEventListener('mouseup', mouseUpEventListener);
- addListenerToElement(element, 'touchcancel', function ($event) {
- if ($eventOld) {
- hasTouchStart = false;
- var $eventTemp = $eventOld;
- $eventOld = null;
- return fn($event, useCancel ? 'cancel' : 'end', $eventTemp.touches[0].pageX, $eventTemp.touches[0].pageY);
- }
- });
- }
- }
- });
- /***/ }),
- /* 10 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getWindowOffset; });
- function getWindowOffset() {
- return {
- top: 0,
- bottom: 0
- };
- }
- /***/ }),
- /* 11 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // EXPORTS
- __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ processEvent; });
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ initEvents; });
- // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
- var shared = __webpack_require__(1);
- // EXTERNAL MODULE: ./src/core/helpers/index.js
- var helpers = __webpack_require__(6);
- // CONCATENATED MODULE: ./src/core/helpers/patch.js
- 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); }
- /**
- * mpvue event
- */
- function wrapperMPEvent(event) {
- return Object.assign({
- mp: event,
- _processed: true
- }, event);
- }
- /**
- * app-plus titleNView
- */
- function mergeTitleNView(navigationBar, titleNView) {
- if (Object(shared["e" /* isPlainObject */])(titleNView)) {
- if (Object(shared["c" /* hasOwn */])(titleNView, 'backgroundColor')) {
- navigationBar.backgroundColor = titleNView.backgroundColor;
- }
- if (Object(shared["c" /* hasOwn */])(titleNView, 'buttons')) {
- navigationBar.buttons = titleNView.buttons;
- }
- if (Object(shared["c" /* hasOwn */])(titleNView, 'titleColor')) {
- navigationBar.textColor = titleNView.titleColor;
- }
- if (Object(shared["c" /* hasOwn */])(titleNView, 'titleText')) {
- navigationBar.titleText = titleNView.titleText;
- }
- if (Object(shared["c" /* hasOwn */])(titleNView, 'titleSize')) {
- navigationBar.titleSize = titleNView.titleSize;
- }
- if (Object(shared["c" /* hasOwn */])(titleNView, 'type')) {
- navigationBar.type = titleNView.type;
- }
- if (Object(shared["c" /* hasOwn */])(titleNView, 'searchInput') && _typeof(titleNView.searchInput) === 'object') {
- navigationBar.searchInput = Object.assign({
- autoFocus: false,
- align: 'center',
- color: '#000000',
- backgroundColor: 'rgba(255,255,255,0.5)',
- borderRadius: '0px',
- placeholder: '',
- placeholderColor: '#CCCCCC',
- disabled: false
- }, titleNView.searchInput);
- }
- }
- return navigationBar;
- }
- // EXTERNAL MODULE: ./src/platforms/app-plus/helpers/get-window-offset.js
- var get_window_offset = __webpack_require__(10);
- // CONCATENATED MODULE: ./src/core/view/plugins/events.js
- function processTarget(target, detail) {
- var checkShadowRoot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- var res = {
- id: target.id,
- offsetLeft: target.offsetLeft,
- offsetTop: target.offsetTop,
- dataset: Object(helpers["c" /* normalizeDataset */])(target.dataset)
- };
- if (detail) {
- Object.assign(res, detail);
- }
- return res;
- }
- function processTouches(touches) {
- if (touches) {
- var res = [];
- var _getWindowOffset = Object(get_window_offset["a" /* default */])(),
- top = _getWindowOffset.top;
- for (var i = 0; i < touches.length; i++) {
- var touch = touches[i];
- res.push({
- identifier: touch.identifier,
- pageX: touch.pageX,
- pageY: touch.pageY - top,
- clientX: touch.clientX,
- clientY: touch.clientY - top,
- force: touch.force || 0
- });
- }
- return res;
- }
- return [];
- }
- function processEvent(name) {
- var $event = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var detail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- var target = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
- var currentTarget = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
- if ($event._processed) {
- $event.type = detail.type || name;
- return $event;
- } // fixed 针对小程序 click(tap)事件,补充事件详情
- if (name === 'click') {
- var _getWindowOffset2 = Object(get_window_offset["a" /* default */])(),
- top = _getWindowOffset2.top;
- detail = {
- x: $event.x,
- y: $event.y - top
- };
- $event.touches = $event.changedTouches = [{
- force: 1,
- identifier: 0,
- clientX: $event.clientX,
- clientY: $event.clientY,
- pageX: $event.pageX,
- pageY: $event.pageY
- }];
- } // fixed mp-vue
- var ret = wrapperMPEvent({
- type: detail.type || name,
- timeStamp: $event.timeStamp || 0,
- detail: detail,
- target: processTarget(target, detail),
- currentTarget: processTarget(currentTarget, false, true),
- // 只处理系统事件
- touches: $event instanceof Event || $event instanceof CustomEvent ? processTouches($event.touches) : $event.touches,
- changedTouches: $event instanceof Event || $event instanceof CustomEvent ? processTouches($event.changedTouches) : $event.changedTouches,
- preventDefault: function preventDefault() {},
- stopPropagation: function stopPropagation() {}
- });
- if (true) {
- var nid = currentTarget.getAttribute('_i');
- ret.options = {
- nid: nid
- }; // 保留原始 currentTarget 方便后续对比
- ret.$origCurrentTarget = currentTarget;
- }
- return ret;
- }
- var LONGPRESS_TIMEOUT = 350;
- var LONGPRESS_THRESHOLD = 10;
- var passiveOptions = shared["h" /* supportsPassive */] ? {
- passive: true
- } : false;
- var longPressTimer = false;
- function clearLongPressTimer() {
- if (longPressTimer) {
- clearTimeout(longPressTimer);
- longPressTimer = false;
- }
- }
- var startPageX = 0;
- var startPageY = 0;
- function touchstart(evt) {
- clearLongPressTimer();
- if (evt.touches.length !== 1) {
- return;
- }
- var _evt$touches$ = evt.touches[0],
- pageX = _evt$touches$.pageX,
- pageY = _evt$touches$.pageY;
- startPageX = pageX;
- startPageY = pageY;
- longPressTimer = setTimeout(function () {
- var customEvent = new CustomEvent('longpress', {
- bubbles: true,
- cancelable: true,
- target: evt.target,
- currentTarget: evt.currentTarget
- });
- customEvent.touches = evt.touches;
- customEvent.changedTouches = evt.changedTouches;
- evt.target.dispatchEvent(customEvent);
- }, LONGPRESS_TIMEOUT);
- }
- function touchmove(evt) {
- if (!longPressTimer) {
- return;
- }
- if (evt.touches.length !== 1) {
- return clearLongPressTimer();
- }
- var _evt$touches$2 = evt.touches[0],
- pageX = _evt$touches$2.pageX,
- pageY = _evt$touches$2.pageY;
- if (Math.abs(pageX - startPageX) > LONGPRESS_THRESHOLD || Math.abs(pageY - startPageY) > LONGPRESS_THRESHOLD) {
- return clearLongPressTimer();
- }
- }
- function initEvents() {
- window.addEventListener('touchstart', touchstart, passiveOptions);
- window.addEventListener('touchmove', touchmove, passiveOptions);
- window.addEventListener('touchend', clearLongPressTimer, passiveOptions);
- window.addEventListener('touchcancel', clearLongPressTimer, passiveOptions);
- }
- /***/ }),
- /* 12 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return publishHandler; });
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
- /* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
- function publishHandler(event) {
- var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- Object(uni_shared__WEBPACK_IMPORTED_MODULE_1__[/* plusReady */ "g"])(function () {
- var pageId = plus.webview.currentWebview().id;
- if (true) {
- console.log("[VIEW][".concat(Date.now(), "]:"), event, args, pageId);
- }
- plus.webview.postMessageToUniNView({
- type: 'subscribeHandler',
- args: {
- type: event,
- data: args,
- pageId: pageId
- }
- }, _constants__WEBPACK_IMPORTED_MODULE_0__[/* APP_SERVICE_ID */ "a"]);
- });
- }
- /***/ }),
- /* 13 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return disableScroll; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return pageScrollTo; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createScrollListener; });
- /* harmony import */ var uni_platform_view_bridge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
- function disableScroll(evt) {
- evt.preventDefault();
- }
- function pageScrollTo(_ref) {
- var scrollTop = _ref.scrollTop,
- duration = _ref.duration;
- var documentElement = document.documentElement;
- var clientHeight = documentElement.clientHeight,
- scrollHeight = documentElement.scrollHeight;
- scrollTop = Math.min(scrollTop, scrollHeight - clientHeight);
- if (duration === 0) {
- // 部分浏览器(比如微信)中 scrollTop 的值需要通过 document.body 来控制
- documentElement.scrollTop = document.body.scrollTop = scrollTop;
- return;
- }
- if (window.scrollY === scrollTop) {
- return;
- }
- function scrollTo(duration) {
- if (duration <= 0) {
- window.scrollTo(0, scrollTop);
- return;
- }
- var distaince = scrollTop - window.scrollY;
- requestAnimationFrame(function () {
- window.scrollTo(0, window.scrollY + distaince / duration * 10);
- scrollTo(duration - 10);
- });
- }
- scrollTo(duration); // TODO 暂不使用 transform 会导致 fixed 元素不可见
- // const body = document.body
- // const bodyStyle = body.style
- //
- // function webkitTransitionEnd() {
- // bodyStyle.webkitTransition = ''
- // bodyStyle.webkitTransform = ''
- // documentElement.scrollTop = scrollTop
- // body.removeEventListener('webkitTransitionEnd', webkitTransitionEnd)
- // }
- //
- // body.addEventListener('webkitTransitionEnd', webkitTransitionEnd)
- // bodyStyle.webkitTransition = `-webkit-transform ${duration}ms ease-out`
- // bodyStyle.webkitTransform = `translateY(${documentElement.scrollTop}px) translateZ(0)`
- }
- var testReachBottomTimer;
- var lastScrollHeight = 0;
- function createScrollListener(pageId, _ref2) {
- var enablePageScroll = _ref2.enablePageScroll,
- enablePageReachBottom = _ref2.enablePageReachBottom,
- onReachBottomDistance = _ref2.onReachBottomDistance,
- enableTransparentTitleNView = _ref2.enableTransparentTitleNView;
- var ticking = false;
- var hasReachBottom = false;
- var onReachBottom = true;
- function isReachBottom() {
- var scrollHeight = document.documentElement.scrollHeight; // 部分浏览器窗口高度变化后document.documentelement.clientheight不会变化,采用window.innerHeight
- var windowHeight = window.innerHeight;
- var scrollY = window.scrollY;
- var isBottom = scrollY > 0 && scrollHeight > windowHeight && scrollY + windowHeight + onReachBottomDistance >= scrollHeight; // 兼容部分浏览器滚动时scroll事件不触发
- var heightChanged = Math.abs(scrollHeight - lastScrollHeight) > onReachBottomDistance;
- if (isBottom && (!hasReachBottom || heightChanged)) {
- lastScrollHeight = scrollHeight;
- hasReachBottom = true;
- return true;
- }
- if (!isBottom && hasReachBottom) {
- hasReachBottom = false;
- }
- return false;
- }
- function trigger() {
- var pages = getCurrentPages();
- if (!pages.length || pages[pages.length - 1].$page.id !== pageId) {
- return;
- } // publish
- var scrollTop = window.pageYOffset;
- if (enablePageScroll) {
- // 向 Service 发送 onPageScroll 事件
- Object(uni_platform_view_bridge__WEBPACK_IMPORTED_MODULE_0__[/* publishHandler */ "a"])('onPageScroll', {
- scrollTop: scrollTop
- }, pageId);
- }
- if (enableTransparentTitleNView) {
- UniViewJSBridge.emit('onPageScroll', {
- scrollTop: scrollTop
- });
- }
- function testReachBottom() {
- if (isReachBottom()) {
- Object(uni_platform_view_bridge__WEBPACK_IMPORTED_MODULE_0__[/* publishHandler */ "a"])('onReachBottom', {}, pageId);
- onReachBottom = false;
- setTimeout(function () {
- onReachBottom = true;
- }, 350);
- return true;
- }
- }
- if (enablePageReachBottom && onReachBottom) {
- if (testReachBottom()) {} else {
- // 解决部分浏览器滚动中js获取窗口高度不准确导致的问题
- testReachBottomTimer = setTimeout(testReachBottom, 300);
- }
- }
- ticking = false;
- }
- return function onScroll() {
- clearTimeout(testReachBottomTimer);
- if (!ticking) {
- requestAnimationFrame(trigger);
- }
- ticking = true;
- };
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 14 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return vd; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return initData; });
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
- /* harmony import */ var _vdom_sync__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80);
- /* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59);
- /* harmony import */ var _page_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(58);
- var _handleData;
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
- function _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); }
- 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; }
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
- var vd;
- var PageVueComponent;
- var handleData = (_handleData = {}, _defineProperty(_handleData, _constants__WEBPACK_IMPORTED_MODULE_1__[/* PAGE_CREATE */ "d"], function onPageCreate(data) {
- var _data = _slicedToArray(data, 3),
- pageId = _data[0],
- pagePath = _data[1],
- pageOptions = _data[2];
- document.title = "".concat(pagePath, "[").concat(pageId, "]");
- updateRootFontSize(); // 设置当前页面伪对象,方便其他地方使用 getCurrentPages 获取当前页面 id,route
- Object(_page__WEBPACK_IMPORTED_MODULE_4__[/* setCurrentPage */ "b"])(pageId, pagePath); // 通知页面创建,根据当前页面配置信息,初始化部分事件
- UniViewJSBridge.subscribeHandler(_constants__WEBPACK_IMPORTED_MODULE_2__[/* ON_PAGE_CREATE */ "a"], pageOptions, pageId); // 初始化当前页面 VueComponent(生成页面样式代码)
- PageVueComponent = Object(_page_factory__WEBPACK_IMPORTED_MODULE_5__[/* getPageVueComponent */ "b"])(pagePath); // 生成当前页面 vd
- vd = new _vdom_sync__WEBPACK_IMPORTED_MODULE_3__[/* VDomSync */ "a"](pageId);
- }), _defineProperty(_handleData, _constants__WEBPACK_IMPORTED_MODULE_1__[/* MOUNTED_DATA */ "c"], function onMounted(data) {
- vd.addVData.apply(vd, data);
- }), _defineProperty(_handleData, _constants__WEBPACK_IMPORTED_MODULE_1__[/* UPDATED_DATA */ "g"], function onUpdated(data) {
- vd.updateVData.apply(vd, data);
- }), _defineProperty(_handleData, _constants__WEBPACK_IMPORTED_MODULE_1__[/* PAGE_CREATED */ "e"], function onPageCreated(data) {
- var _data2 = _slicedToArray(data, 2),
- pageId = _data2[0],
- pagePath = _data2[1];
- var page = getCurrentPages()[0];
- page.$vm = new PageVueComponent({
- mpType: 'page',
- pageId: pageId,
- pagePath: pagePath
- }).$mount('#app');
- }), _handleData);
- function broadcast(vm, componentName, eventName) {
- for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
- params[_key - 3] = arguments[_key];
- }
- vm.$children.forEach(function (child) {
- var name = child.$options.name && child.$options.name.replace(/^VUni/, '');
- if (~componentName.indexOf(name)) {
- child.$emit.apply(child, [eventName].concat(params));
- }
- broadcast.apply(void 0, [child, componentName, eventName].concat(params));
- });
- }
- var NATIVE_COMPONENTS = ['Camera', 'LivePlayer', 'LivePusher', 'Map', 'Video', 'CoverView', 'CoverImage', 'Ad'];
- function updateView() {
- var pages = getCurrentPages();
- var pageVm = pages[0] && pages[0].$vm;
- pageVm && broadcast(pageVm, NATIVE_COMPONENTS, 'uni-view-update');
- }
- function updateRootFontSize() {
- // 页面存在横竖屏切换时,预加载的 webview 的 fontSize 需要再次校正一下
- var oldFontSize = document.documentElement.style.fontSize;
- var newFontSize = document.documentElement.clientWidth / 20 + 'px';
- if (oldFontSize !== newFontSize) {
- document.documentElement.style.fontSize = newFontSize;
- }
- }
- window.addEventListener('resize', function () {
- // TODO 与之前逻辑保持一致,仅当前 webview 未被使用时,校准 fontSize,后续考虑动态旋转,调整rootfontSize
- if (!getCurrentPages().length) {
- updateRootFontSize();
- }
- updateView();
- });
- window.addEventListener('updateview', updateView);
- function vdSync(_ref) {
- var data = _ref.data,
- options = _ref.options;
- var isVdCallback = true;
- data.forEach(function (data) {
- if (data[0] === _constants__WEBPACK_IMPORTED_MODULE_1__[/* PAGE_CREATE */ "d"]) {
- // 页面创建无需触发 callback
- isVdCallback = false;
- }
- handleData[data[0]](data[1]);
- });
- vd.flush();
- vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].nextTick(function () {
- // 清空本次 addBatchData
- vd.clearAddBatchVData();
- updateView();
- isVdCallback && UniViewJSBridge.publishHandler(_constants__WEBPACK_IMPORTED_MODULE_1__[/* VD_SYNC_CALLBACK */ "i"]);
- });
- }
- function getData(id, name) {
- try {
- return this.$r[id][name];
- } catch (e) {
- console.error(this.$options.__file + ":[".concat(this._$id, "]$r[").concat(id, "][").concat(name, "] is undefined"));
- }
- }
- /**
- * wxs change:prop
- * @param {Object} id
- * @param {Object} name
- */
- function getChangeData(id, name) {
- try {
- var value = this.$r[id][name];
- var wxsPropName = name.replace('change:', '');
- this[wxsPropName] = value;
- this.$set(this.wxsProps, wxsPropName, value);
- return value;
- } catch (e) {
- console.error(this.$options.__file + ":[".concat(this._$id, "]$r[").concat(id, "][").concat(name, "] is undefined"));
- }
- }
- function initData(Vue) {
- Vue.prototype._$g = getData;
- Vue.prototype._$gc = getChangeData;
- UniViewJSBridge.subscribe(_constants__WEBPACK_IMPORTED_MODULE_1__[/* VD_SYNC */ "h"], vdSync);
- Object.defineProperty(Vue.prototype, '_$vd', {
- get: function get() {
- return !this.$options.isReserved && vd;
- }
- });
- Vue.mixin({
- beforeCreate: function beforeCreate() {
- if (this.$options.mpType) {
- this.mpType = this.$options.mpType;
- }
- if (this._$vd) {
- this._$vd.initVm(this);
- }
- }
- });
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 15 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return pixelRatio; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return wrapper; });
- /* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
- var pixelRatio = function () {
- var canvas = document.createElement('canvas');
- canvas.height = canvas.width = 0;
- var context = canvas.getContext('2d');
- var backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;
- return (window.devicePixelRatio || 1) / backingStore;
- }();
- var forEach = function forEach(obj, func) {
- for (var key in obj) {
- if (Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* hasOwn */ "c"])(obj, key)) {
- func(obj[key], key);
- }
- }
- };
- var ratioArgs = {
- fillRect: 'all',
- clearRect: 'all',
- strokeRect: 'all',
- moveTo: 'all',
- lineTo: 'all',
- arc: [0, 1, 2],
- arcTo: 'all',
- bezierCurveTo: 'all',
- isPointinPath: 'all',
- isPointinStroke: 'all',
- quadraticCurveTo: 'all',
- rect: 'all',
- translate: 'all',
- createRadialGradient: 'all',
- createLinearGradient: 'all',
- setTransform: [4, 5]
- };
- var proto = CanvasRenderingContext2D.prototype;
- proto.drawImageByCanvas = function (_super) {
- return function (canvas, srcx, srcy, srcw, srch, desx, desy, desw, desh, isScale) {
- if (!this.__hidpi__) {
- return _super.apply(this, arguments);
- }
- srcx *= pixelRatio;
- srcy *= pixelRatio;
- srcw *= pixelRatio;
- srch *= pixelRatio;
- desx *= pixelRatio;
- desy *= pixelRatio;
- desw = isScale ? desw * pixelRatio : desw;
- desh = isScale ? desh * pixelRatio : desh;
- _super.call(this, canvas, srcx, srcy, srcw, srch, desx, desy, desw, desh);
- };
- }(proto.drawImage);
- if (pixelRatio !== 1) {
- forEach(ratioArgs, function (value, key) {
- proto[key] = function (_super) {
- return function () {
- if (!this.__hidpi__) {
- return _super.apply(this, arguments);
- }
- var args = Array.prototype.slice.call(arguments);
- if (value === 'all') {
- args = args.map(function (a) {
- return a * pixelRatio;
- });
- } else if (Array.isArray(value)) {
- for (var i = 0; i < value.length; i++) {
- args[value[i]] *= pixelRatio;
- }
- }
- return _super.apply(this, args);
- };
- }(proto[key]);
- });
- proto.stroke = function (_super) {
- return function () {
- if (!this.__hidpi__) {
- return _super.apply(this, arguments);
- }
- this.lineWidth *= pixelRatio;
- _super.apply(this, arguments);
- this.lineWidth /= pixelRatio;
- };
- }(proto.stroke);
- proto.fillText = function (_super) {
- return function () {
- if (!this.__hidpi__) {
- return _super.apply(this, arguments);
- }
- var args = Array.prototype.slice.call(arguments);
- args[1] *= pixelRatio;
- args[2] *= pixelRatio;
- this.font = this.font.replace(/(\d+)(px|em|rem|pt)/g, function (w, m, u) {
- return m * pixelRatio + u;
- });
- _super.apply(this, args);
- this.font = this.font.replace(/(\d+)(px|em|rem|pt)/g, function (w, m, u) {
- return m / pixelRatio + u;
- });
- };
- }(proto.fillText);
- proto.strokeText = function (_super) {
- return function () {
- if (!this.__hidpi__) {
- return _super.apply(this, arguments);
- }
- var args = Array.prototype.slice.call(arguments);
- args[1] *= pixelRatio; // x
- args[2] *= pixelRatio; // y
- this.font = this.font.replace(/(\d+)(px|em|rem|pt)/g, function (w, m, u) {
- return m * pixelRatio + u;
- });
- _super.apply(this, args);
- this.font = this.font.replace(/(\d+)(px|em|rem|pt)/g, function (w, m, u) {
- return m / pixelRatio + u;
- });
- };
- }(proto.strokeText);
- proto.drawImage = function (_super) {
- return function () {
- if (!this.__hidpi__) {
- return _super.apply(this, arguments);
- }
- this.scale(pixelRatio, pixelRatio);
- _super.apply(this, arguments);
- this.scale(1 / pixelRatio, 1 / pixelRatio);
- };
- }(proto.drawImage);
- }
- function wrapper(canvas) {
- canvas.width = canvas.offsetWidth * pixelRatio;
- canvas.height = canvas.offsetHeight * pixelRatio;
- canvas.getContext('2d').__hidpi__ = true;
- }
- /***/ }),
- /* 16 */
- /***/ (function(module, exports) {
- var g;
- // This works in non-strict mode
- g = (function() {
- return this;
- })();
- try {
- // This works if eval is allowed (see CSP)
- g = g || new Function("return this")();
- } catch (e) {
- // This works if the window reference is available
- if (typeof window === "object") g = window;
- }
- // g can still be undefined, but nothing to do about it...
- // We return undefined, instead of nothing here, so it's
- // easier to handle this case. if(!global) { ...}
- module.exports = g;
- /***/ }),
- /* 17 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony default export */ __webpack_exports__["a"] = ({
- data: function data() {
- return {
- hovering: false
- };
- },
- props: {
- hoverClass: {
- type: String,
- default: 'none'
- },
- hoverStopPropagation: {
- type: Boolean,
- default: false
- },
- hoverStartTime: {
- type: [Number, String],
- default: 50
- },
- hoverStayTime: {
- type: [Number, String],
- default: 400
- }
- },
- methods: {
- _hoverTouchStart: function _hoverTouchStart(evt) {
- var _this = this;
- // TODO detect scrolling
- if (evt._hoverPropagationStopped) {
- return;
- }
- if (!this.hoverClass || this.hoverClass === 'none' || this.disabled) {
- return;
- }
- if (evt.touches.length > 1) {
- return;
- }
- if (this.hoverStopPropagation) {
- evt._hoverPropagationStopped = true;
- }
- this._hoverTouch = true;
- this._hoverStartTimer = setTimeout(function () {
- _this.hovering = true;
- if (!_this._hoverTouch) {
- // 防止在hoverStartTime时间内触发了 touchend 或 touchcancel
- _this._hoverReset();
- }
- }, this.hoverStartTime);
- },
- _hoverTouchEnd: function _hoverTouchEnd(evt) {
- this._hoverTouch = false;
- if (this.hovering) {
- this._hoverReset();
- }
- },
- _hoverReset: function _hoverReset() {
- var _this2 = this;
- requestAnimationFrame(function () {
- clearTimeout(_this2._hoverStayTimer);
- _this2._hoverStayTimer = setTimeout(function () {
- _this2.hovering = false;
- }, _this2.hoverStayTime);
- });
- },
- _hoverTouchCancel: function _hoverTouchCancel(evt) {
- this._hoverTouch = false;
- this.hovering = false;
- clearTimeout(this._hoverStartTimer);
- }
- }
- });
- /***/ }),
- /* 18 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 19 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_mixins__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
- /* harmony import */ var uni_helpers_hidpi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- function resolveColor(color) {
- color = color.slice(0);
- color[3] = color[3] / 255;
- return 'rgba(' + color.join(',') + ')';
- }
- function processTouches(target, touches) {
- return [].map.call(touches, function (touch) {
- var boundingClientRect = target.getBoundingClientRect();
- return {
- identifier: touch.identifier,
- x: touch.clientX - boundingClientRect.left,
- y: touch.clientY - boundingClientRect.top
- };
- });
- }
- var tempCanvas;
- function getTempCanvas() {
- var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
- var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
- if (!tempCanvas) {
- tempCanvas = document.createElement('canvas');
- }
- tempCanvas.width = width;
- tempCanvas.height = height;
- return tempCanvas;
- }
- /* harmony default export */ __webpack_exports__["a"] = ({
- name: 'Canvas',
- mixins: [uni_mixins__WEBPACK_IMPORTED_MODULE_0__[/* subscriber */ "e"]],
- props: {
- canvasId: {
- type: String,
- default: ''
- },
- disableScroll: {
- type: [Boolean, String],
- default: false
- }
- },
- data: function data() {
- return {
- actionsWaiting: false
- };
- },
- computed: {
- id: function id() {
- return this.canvasId;
- },
- _listeners: function _listeners() {
- var _this = this;
- var $listeners = Object.assign({}, this.$listeners);
- var events = ['touchstart', 'touchmove', 'touchend'];
- events.forEach(function (event) {
- var existing = $listeners[event];
- var eventHandler = [];
- if (existing) {
- eventHandler.push(function ($event) {
- _this.$trigger(event, Object.assign({}, $event, {
- touches: processTouches($event.currentTarget, $event.touches),
- changedTouches: processTouches($event.currentTarget, $event.changedTouches)
- }));
- });
- }
- if (_this.disableScroll && event === 'touchmove') {
- eventHandler.push(_this._touchmove);
- }
- $listeners[event] = eventHandler;
- });
- return $listeners;
- }
- },
- created: function created() {
- this._actionsDefer = [];
- this._images = {};
- },
- mounted: function mounted() {
- this._resize({
- width: this.$refs.sensor.$el.offsetWidth,
- height: this.$refs.sensor.$el.offsetHeight
- });
- },
- beforeDestroy: function beforeDestroy() {
- var canvas = this.$refs.canvas;
- canvas.height = canvas.width = 0;
- },
- methods: {
- _handleSubscribe: function _handleSubscribe(_ref) {
- var type = _ref.type,
- _ref$data = _ref.data,
- data = _ref$data === void 0 ? {} : _ref$data;
- var method = this[type];
- if (type.indexOf('_') !== 0 && typeof method === 'function') {
- method(data);
- }
- },
- _resize: function _resize() {
- var canvas = this.$refs.canvas;
- if (canvas.width > 0 && canvas.height > 0) {
- var context = canvas.getContext('2d');
- var imageData = context.getImageData(0, 0, canvas.width, canvas.height);
- Object(uni_helpers_hidpi__WEBPACK_IMPORTED_MODULE_1__[/* wrapper */ "b"])(this.$refs.canvas);
- context.putImageData(imageData, 0, 0);
- } else {
- Object(uni_helpers_hidpi__WEBPACK_IMPORTED_MODULE_1__[/* wrapper */ "b"])(this.$refs.canvas);
- }
- },
- _touchmove: function _touchmove(event) {
- event.preventDefault();
- },
- actionsChanged: function actionsChanged(_ref2) {
- var _this2 = this;
- var actions = _ref2.actions,
- reserve = _ref2.reserve,
- callbackId = _ref2.callbackId;
- var self = this;
- if (!actions) {
- return;
- }
- if (this.actionsWaiting) {
- this._actionsDefer.push([actions, reserve, callbackId]);
- return;
- }
- var canvas = this.$refs.canvas;
- var c2d = canvas.getContext('2d');
- if (!reserve) {
- c2d.fillStyle = '#000000';
- c2d.strokeStyle = '#000000';
- c2d.shadowColor = '#000000';
- c2d.shadowBlur = 0;
- c2d.shadowOffsetX = 0;
- c2d.shadowOffsetY = 0;
- c2d.setTransform(1, 0, 0, 1, 0, 0);
- c2d.clearRect(0, 0, canvas.width, canvas.height);
- }
- this.preloadImage(actions);
- var _loop2 = function _loop2(index) {
- var action = actions[index];
- var method = action.method;
- var data = action.data;
- if (/^set/.test(method) && method !== 'setTransform') {
- var method1 = method[3].toLowerCase() + method.slice(4);
- var color;
- if (method1 === 'fillStyle' || method1 === 'strokeStyle') {
- if (data[0] === 'normal') {
- color = resolveColor(data[1]);
- } else if (data[0] === 'linear') {
- var LinearGradient = c2d.createLinearGradient.apply(c2d, _toConsumableArray(data[1]));
- data[2].forEach(function (data2) {
- var offset = data2[0];
- var color = resolveColor(data2[1]);
- LinearGradient.addColorStop(offset, color);
- });
- color = LinearGradient;
- } else if (data[0] === 'radial') {
- var x = data[1][0];
- var y = data[1][1];
- var r = data[1][2];
- var _LinearGradient = c2d.createRadialGradient(x, y, 0, x, y, r);
- data[2].forEach(function (data2) {
- var offset = data2[0];
- var color = resolveColor(data2[1]);
- _LinearGradient.addColorStop(offset, color);
- });
- color = _LinearGradient;
- } else if (data[0] === 'pattern') {
- var loaded = _this2.checkImageLoaded(data[1], actions.slice(index + 1), callbackId, function (image) {
- if (image) {
- c2d[method1] = c2d.createPattern(image, data[2]);
- }
- });
- if (!loaded) {
- return "break";
- }
- return "continue";
- }
- c2d[method1] = color;
- } else if (method1 === 'globalAlpha') {
- c2d[method1] = data[0] / 255;
- } else if (method1 === 'shadow') {
- _ = ['shadowOffsetX', 'shadowOffsetY', 'shadowBlur', 'shadowColor'];
- data.forEach(function (color_, method_) {
- c2d[_[method_]] = _[method_] === 'shadowColor' ? resolveColor(color_) : color_;
- });
- } else {
- if (method1 === 'fontSize') {
- c2d.font = c2d.font.replace(/\d+\.?\d*px/, data[0] + 'px');
- } else {
- if (method1 === 'lineDash') {
- c2d.setLineDash(data[0]);
- c2d.lineDashOffset = data[1] || 0;
- } else {
- if (method1 === 'textBaseline') {
- if (data[0] === 'normal') {
- data[0] = 'alphabetic';
- }
- c2d[method1] = data[0];
- } else {
- c2d[method1] = data[0];
- }
- }
- }
- }
- } else if (method === 'fillPath' || method === 'strokePath') {
- method = method.replace(/Path/, '');
- c2d.beginPath();
- data.forEach(function (data_) {
- c2d[data_.method].apply(c2d, data_.data);
- });
- c2d[method]();
- } else if (method === 'fillText') {
- c2d.fillText.apply(c2d, data);
- } else if (method === 'drawImage') {
- A = function () {
- var dataArray = _toConsumableArray(data);
- var url = dataArray[0];
- var otherData = dataArray.slice(1);
- self._images = self._images || {};
- if (!self.checkImageLoaded(url, actions.slice(index + 1), callbackId, function (image) {
- if (image) {
- c2d.drawImage.apply(c2d, [image].concat(_toConsumableArray(otherData.slice(4, 8)), _toConsumableArray(otherData.slice(0, 4))));
- }
- })) return 'break';
- }();
- if (A === 'break') {
- return "break";
- }
- } else {
- if (method === 'clip') {
- data.forEach(function (data_) {
- c2d[data_.method].apply(c2d, data_.data);
- });
- c2d.clip();
- } else {
- c2d[method].apply(c2d, data);
- }
- }
- };
- _loop: for (var index = 0; index < actions.length; index++) {
- var _;
- var A;
- var _ret = _loop2(index);
- switch (_ret) {
- case "break":
- break _loop;
- case "continue":
- continue;
- }
- }
- if (!this.actionsWaiting && callbackId) {
- UniViewJSBridge.publishHandler('onDrawCanvas', {
- callbackId: callbackId,
- data: {
- errMsg: 'drawCanvas:ok'
- }
- }, this.$page.id);
- }
- },
- preloadImage: function preloadImage(actions) {
- var sefl = this;
- actions.forEach(function (action) {
- var method = action.method;
- var data = action.data;
- var src = '';
- if (method === 'drawImage') {
- src = data[0];
- src = sefl.$getRealPath(src);
- data[0] = src;
- } else if (method === 'setFillStyle' && data[0] === 'pattern') {
- src = data[1];
- src = sefl.$getRealPath(src);
- data[1] = src;
- }
- if (src && !sefl._images[src]) {
- loadImage();
- }
- /**
- * 加载图像
- */
- function loadImage() {
- sefl._images[src] = new Image();
- sefl._images[src].onload = function () {
- sefl._images[src].ready = true;
- };
- /**
- * 从Blob加载
- * @param {Blob} blob
- */
- function loadBlob(blob) {
- sefl._images[src].src = (window.URL || window.webkitURL).createObjectURL(blob);
- }
- /**
- * 从本地文件加载
- * @param {string} path 文件路径
- */
- function loadFile(path) {
- var bitmap = new plus.nativeObj.Bitmap('bitmap' + Date.now());
- bitmap.load(path, function () {
- sefl._images[src].src = bitmap.toBase64Data();
- bitmap.clear();
- }, function () {
- bitmap.clear();
- console.error('preloadImage error');
- });
- }
- /**
- * 从网络加载
- * @param {string} url 文件地址
- */
- function loadUrl(url) {
- function plusDownload() {
- plus.downloader.createDownload(url, {
- filename: '_doc/uniapp_temp/download/'
- }, function (d, status) {
- if (status === 200) {
- loadFile(d.filename);
- } else {
- sefl._images[src].src = src;
- }
- }).start();
- }
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url, true);
- xhr.responseType = 'blob';
- xhr.onload = function () {
- if (this.status === 200) {
- loadBlob(this.response);
- }
- };
- xhr.onerror = window.plus ? plusDownload : function () {
- sefl._images[src].src = src;
- };
- xhr.send();
- }
- if (window.plus && (!window.webkit || !window.webkit.messageHandlers)) {
- sefl._images[src].src = src;
- } else {
- // 解决 PLUS-APP(wkwebview)以及 H5 图像跨域问题(H5图像响应头需包含access-control-allow-origin)
- if (window.plus && src.indexOf('http://') !== 0 && src.indexOf('https://') !== 0) {
- loadFile(src);
- } else if (/^data:.*,.*/.test(src)) {
- sefl._images[src].src = src;
- } else {
- loadUrl(src);
- }
- }
- }
- });
- },
- checkImageLoaded: function checkImageLoaded(src, actions, callbackId, fn) {
- var self = this;
- var image = this._images[src];
- if (image.ready) {
- fn(image);
- return true;
- } else {
- this._actionsDefer.unshift([actions, true]);
- this.actionsWaiting = true;
- image.onload = function () {
- image.ready = true;
- fn(image);
- self.actionsWaiting = false;
- var actions = self._actionsDefer.slice(0);
- self._actionsDefer = [];
- for (var action = actions.shift(); action;) {
- self.actionsChanged({
- actions: action[0],
- reserve: action[1],
- callbackId: callbackId
- });
- action = actions.shift();
- }
- };
- return false;
- }
- },
- getImageData: function getImageData(_ref3) {
- var _ref3$x = _ref3.x,
- x = _ref3$x === void 0 ? 0 : _ref3$x,
- _ref3$y = _ref3.y,
- y = _ref3$y === void 0 ? 0 : _ref3$y,
- width = _ref3.width,
- height = _ref3.height,
- destWidth = _ref3.destWidth,
- destHeight = _ref3.destHeight,
- _ref3$hidpi = _ref3.hidpi,
- hidpi = _ref3$hidpi === void 0 ? true : _ref3$hidpi,
- callbackId = _ref3.callbackId;
- var imgData;
- var canvas = this.$refs.canvas;
- if (!width) {
- width = canvas.offsetWidth - x;
- }
- if (!height) {
- height = canvas.offsetHeight - y;
- }
- try {
- if (!hidpi) {
- if (!destWidth && !destHeight) {
- destWidth = Math.round(width * uni_helpers_hidpi__WEBPACK_IMPORTED_MODULE_1__[/* pixelRatio */ "a"]);
- destHeight = Math.round(height * uni_helpers_hidpi__WEBPACK_IMPORTED_MODULE_1__[/* pixelRatio */ "a"]);
- } else if (!destWidth) {
- destWidth = Math.round(width / height * destHeight);
- } else if (!destHeight) {
- destHeight = Math.round(height / width * destWidth);
- }
- } else {
- destWidth = width;
- destHeight = height;
- }
- var newCanvas = getTempCanvas(destWidth, destHeight);
- var context = newCanvas.getContext('2d');
- context.__hidpi__ = true;
- context.drawImageByCanvas(canvas, x, y, width, height, 0, 0, destWidth, destHeight, false);
- imgData = context.getImageData(0, 0, destWidth, destHeight);
- newCanvas.height = newCanvas.width = 0;
- context.__hidpi__ = false;
- } catch (error) {
- if (!callbackId) {
- return;
- }
- UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
- callbackId: callbackId,
- data: {
- errMsg: 'canvasGetImageData:fail'
- }
- }, this.$page.id);
- return;
- }
- if (!callbackId) {
- // fix [...]展开TypedArray在低版本手机报错的问题,使用Array.prototype.slice
- return {
- data: Array.prototype.slice.call(imgData.data),
- width: destWidth,
- height: destHeight
- };
- } else {
- UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
- callbackId: callbackId,
- data: {
- errMsg: 'canvasGetImageData:ok',
- data: _toConsumableArray(imgData.data),
- width: destWidth,
- height: destHeight
- }
- }, this.$page.id);
- }
- },
- putImageData: function putImageData(_ref4) {
- var data = _ref4.data,
- x = _ref4.x,
- y = _ref4.y,
- width = _ref4.width,
- height = _ref4.height,
- callbackId = _ref4.callbackId;
- try {
- if (!height) {
- height = Math.round(data.length / 4 / width);
- }
- var canvas = getTempCanvas(width, height);
- var context = canvas.getContext('2d');
- context.putImageData(new ImageData(new Uint8ClampedArray(data), width, height), 0, 0);
- this.$refs.canvas.getContext('2d').drawImage(canvas, x, y, width, height);
- canvas.height = canvas.width = 0;
- } catch (error) {
- UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
- callbackId: callbackId,
- data: {
- errMsg: 'canvasPutImageData:fail'
- }
- }, this.$page.id);
- return;
- }
- UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
- callbackId: callbackId,
- data: {
- errMsg: 'canvasPutImageData:ok'
- }
- }, this.$page.id);
- },
- getDataUrl: function getDataUrl(_ref5) {
- var _this3 = this;
- var _ref5$x = _ref5.x,
- x = _ref5$x === void 0 ? 0 : _ref5$x,
- _ref5$y = _ref5.y,
- y = _ref5$y === void 0 ? 0 : _ref5$y,
- width = _ref5.width,
- height = _ref5.height,
- destWidth = _ref5.destWidth,
- destHeight = _ref5.destHeight,
- _ref5$hidpi = _ref5.hidpi,
- hidpi = _ref5$hidpi === void 0 ? true : _ref5$hidpi,
- fileType = _ref5.fileType,
- qualit = _ref5.qualit,
- callbackId = _ref5.callbackId;
- var res = this.getImageData({
- x: x,
- y: y,
- width: width,
- height: height,
- destWidth: destWidth,
- destHeight: destHeight,
- hidpi: hidpi
- });
- if (!res.data || !res.data.length) {
- UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
- callbackId: callbackId,
- data: {
- errMsg: 'canvasGetDataUrl:fail'
- }
- }, this.$page.id);
- return;
- }
- var imgData;
- try {
- imgData = new ImageData(new Uint8ClampedArray(res.data), res.width, res.height);
- } catch (error) {
- UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
- callbackId: callbackId,
- data: {
- errMsg: 'canvasGetDataUrl:fail'
- }
- }, this.$page.id);
- return;
- }
- destWidth = res.width;
- destHeight = res.height;
- var canvas = getTempCanvas(destWidth, destHeight);
- var c2d = canvas.getContext('2d');
- c2d.putImageData(imgData, 0, 0);
- var base64 = canvas.toDataURL('image/png');
- canvas.height = canvas.width = 0;
- var img = new Image();
- img.onload = function () {
- var canvas = getTempCanvas(destWidth, destHeight);
- if (fileType === 'jpeg' || fileType === 'jpg') {
- fileType = 'jpeg';
- c2d.fillStyle = '#fff';
- c2d.fillRect(0, 0, destWidth, destHeight);
- }
- c2d.drawImage(img, 0, 0);
- base64 = canvas.toDataURL("image/".concat(fileType), qualit);
- canvas.height = canvas.width = 0;
- UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
- callbackId: callbackId,
- data: {
- errMsg: 'canvasGetDataUrl:ok',
- base64: base64
- }
- }, _this3.$page.id);
- };
- img.src = base64;
- }
- }
- });
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 20 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 21 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 22 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 23 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_mixins__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
- /* harmony import */ var uni_helpers_html_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60);
- /* harmony import */ var _formats__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(83);
- 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); }
- //
- //
- //
- //
- //
- //
- //
- //
- /* harmony default export */ __webpack_exports__["a"] = ({
- name: 'Editor',
- 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"]],
- props: {
- id: {
- type: String,
- default: ''
- },
- readOnly: {
- type: [Boolean, String],
- default: false
- },
- placeholder: {
- type: String,
- default: ''
- },
- showImgSize: {
- type: [Boolean, String],
- default: false
- },
- showImgToolbar: {
- type: [Boolean, String],
- default: false
- },
- showImgResize: {
- type: [Boolean, String],
- default: false
- }
- },
- data: function data() {
- return {
- quillReady: false
- };
- },
- computed: {},
- watch: {
- readOnly: function readOnly(value) {
- if (this.quillReady) {
- var quill = this.quill;
- quill.enable(!value);
- if (!value) {
- quill.blur();
- }
- }
- },
- placeholder: function placeholder(value) {
- if (this.quillReady) {
- this.quill.root.setAttribute('data-placeholder', value);
- }
- }
- },
- mounted: function mounted() {
- var _this = this;
- var imageResizeModules = [];
- if (this.showImgSize) {
- imageResizeModules.push('DisplaySize');
- }
- if (this.showImgToolbar) {
- imageResizeModules.push('Toolbar');
- }
- if (this.showImgResize) {
- imageResizeModules.push('Resize');
- }
- this.loadQuill(function () {
- if (imageResizeModules.length) {
- _this.loadImageResizeModule(function () {
- _this.initQuill(imageResizeModules);
- });
- } else {
- _this.initQuill(imageResizeModules);
- }
- });
- },
- methods: {
- _handleSubscribe: function _handleSubscribe(_ref) {
- var type = _ref.type,
- data = _ref.data;
- var options = data.options,
- callbackId = data.callbackId;
- var quill = this.quill;
- var Quill = window.Quill;
- var res;
- var range;
- var errMsg;
- if (this.quillReady) {
- switch (type) {
- case 'format':
- {
- var _options$name = options.name,
- name = _options$name === void 0 ? '' : _options$name,
- _options$value = options.value,
- value = _options$value === void 0 ? false : _options$value;
- range = quill.getSelection(true);
- var format = quill.getFormat(range)[name] || false;
- if (['bold', 'italic', 'underline', 'strike', 'ins'].includes(name)) {
- value = !format;
- } else if (name === 'direction') {
- value = value === 'rtl' && format ? false : value;
- var align = quill.getFormat(range).align;
- if (value === 'rtl' && !align) {
- quill.format('align', 'right', Quill.sources.USER);
- } else if (!value && align === 'right') {
- quill.format('align', false, Quill.sources.USER);
- }
- } else if (name === 'indent') {
- var rtl = quill.getFormat(range).direction === 'rtl';
- value = value === '+1';
- if (rtl) {
- value = !value;
- }
- value = value ? '+1' : '-1';
- } else {
- if (name === 'list') {
- value = value === 'check' ? 'unchecked' : value;
- format = format === 'checked' ? 'unchecked' : format;
- }
- value = format && format !== (value || false) || !format && value ? value : !format;
- }
- quill.format(name, value, Quill.sources.USER);
- }
- break;
- case 'insertDivider':
- range = quill.getSelection(true);
- quill.insertText(range.index, '\n', Quill.sources.USER);
- quill.insertEmbed(range.index + 1, 'divider', true, Quill.sources.USER);
- quill.setSelection(range.index + 2, Quill.sources.SILENT);
- break;
- case 'insertImage':
- {
- range = quill.getSelection(true);
- var _options$src = options.src,
- src = _options$src === void 0 ? '' : _options$src,
- _options$alt = options.alt,
- alt = _options$alt === void 0 ? '' : _options$alt,
- _options$data = options.data,
- _data = _options$data === void 0 ? {} : _options$data;
- quill.insertEmbed(range.index, 'image', this.$getRealPath(src), Quill.sources.USER);
- quill.formatText(range.index, 1, 'alt', alt);
- quill.formatText(range.index, 1, 'data-custom', Object.keys(_data).map(function (key) {
- return "".concat(key, "=").concat(_data[key]);
- }).join('&'));
- quill.setSelection(range.index + 1, Quill.sources.SILENT);
- }
- break;
- case 'insertText':
- {
- range = quill.getSelection(true);
- var _options$text = options.text,
- text = _options$text === void 0 ? '' : _options$text;
- quill.insertText(range.index, text, Quill.sources.USER);
- quill.setSelection(range.index + text.length, 0, Quill.sources.SILENT);
- }
- break;
- case 'setContents':
- {
- var delta = options.delta,
- html = options.html;
- if (_typeof(delta) === 'object') {
- quill.setContents(delta, Quill.sources.SILENT);
- } else if (typeof html === 'string') {
- quill.setContents(this.html2delta(html), Quill.sources.SILENT);
- } else {
- errMsg = 'contents is missing';
- }
- }
- break;
- case 'getContents':
- res = this.getContents();
- break;
- case 'clear':
- quill.setContents([]);
- break;
- case 'removeFormat':
- {
- range = quill.getSelection(true);
- var parchment = Quill.import('parchment');
- if (range.length) {
- quill.removeFormat(range, Quill.sources.USER);
- } else {
- Object.keys(quill.getFormat(range)).forEach(function (key) {
- if (parchment.query(key, parchment.Scope.INLINE)) {
- quill.format(key, false);
- }
- });
- }
- }
- break;
- case 'undo':
- quill.history.undo();
- break;
- case 'redo':
- quill.history.redo();
- break;
- default:
- break;
- }
- this.updateStatus(range);
- } else {
- errMsg = 'not ready';
- }
- if (callbackId) {
- UniViewJSBridge.publishHandler('onEditorMethodCallback', {
- callbackId: callbackId,
- data: Object.assign({}, res, {
- errMsg: "".concat(type, ":").concat(errMsg ? 'fail ' + errMsg : 'ok')
- })
- }, this.$page.id);
- }
- },
- loadQuill: function loadQuill(callback) {
- if (typeof window.Quill === 'function') {
- if (typeof callback === 'function') {
- callback();
- }
- return;
- }
- var script = document.createElement('script');
- script.src = window.plus ? './__uniappquill.js' : 'https://unpkg.com/quill@1.3.7/dist/quill.min.js';
- document.body.appendChild(script);
- script.onload = callback;
- },
- loadImageResizeModule: function loadImageResizeModule(callback) {
- if (typeof window.ImageResize === 'function') {
- if (typeof callback === 'function') {
- callback();
- }
- return;
- }
- var script = document.createElement('script');
- script.src = window.plus ? './__uniappquillimageresize.js' : 'https://unpkg.com/quill-image-resize-mp@3.0.1/image-resize.min.js';
- document.body.appendChild(script);
- script.onload = callback;
- },
- initQuill: function initQuill(imageResizeModules) {
- var _this2 = this;
- var Quill = window.Quill;
- _formats__WEBPACK_IMPORTED_MODULE_2__[/* register */ "a"](Quill);
- var options = {
- toolbar: false,
- readOnly: this.readOnly,
- placeholder: this.placeholder,
- modules: {}
- };
- if (imageResizeModules.length) {
- Quill.register('modules/ImageResize', window.ImageResize.default);
- options.modules.ImageResize = {
- modules: imageResizeModules
- };
- }
- var quill = this.quill = new Quill(this.$el, options);
- var $el = quill.root;
- var events = ['focus', 'blur', 'input'];
- events.forEach(function (name) {
- $el.addEventListener(name, function ($event) {
- if (name === 'input') {
- $event.stopPropagation();
- } else {
- _this2.$trigger(name, $event, _this2.getContents());
- }
- });
- });
- quill.on(Quill.events.TEXT_CHANGE, function () {
- _this2.$trigger('input', {}, _this2.getContents());
- });
- quill.on(Quill.events.SELECTION_CHANGE, this.updateStatus.bind(this));
- quill.on(Quill.events.SCROLL_OPTIMIZE, function () {
- var range = quill.selection.getRange()[0];
- _this2.updateStatus(range);
- });
- quill.clipboard.addMatcher(Node.ELEMENT_NODE, function (node, delta) {
- if (_this2.skipMatcher) {
- return delta;
- }
- return {
- ops: delta.ops.filter(function (_ref2) {
- var insert = _ref2.insert;
- return typeof insert === 'string';
- }).map(function (_ref3) {
- var insert = _ref3.insert;
- return {
- insert: insert
- };
- })
- };
- });
- this.initKeyboard($el);
- this.quillReady = true;
- this.$trigger('ready', event, {});
- },
- getContents: function getContents() {
- var quill = this.quill;
- var html = quill.root.innerHTML;
- var text = quill.getText();
- var delta = quill.getContents();
- return {
- html: html,
- text: text,
- delta: delta
- };
- },
- html2delta: function html2delta(html) {
- 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'];
- var content = '';
- var disable;
- Object(uni_helpers_html_parser__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(html, {
- start: function start(tag, attrs, unary) {
- if (!tags.includes(tag)) {
- disable = !unary;
- return;
- }
- disable = false;
- var arrts = attrs.map(function (_ref4) {
- var name = _ref4.name,
- value = _ref4.value;
- return "".concat(name, "=\"").concat(value, "\"");
- }).join(' ');
- var start = "<".concat(tag, " ").concat(arrts, " ").concat(unary ? '/' : '', ">");
- content += start;
- },
- end: function end(tag) {
- if (!disable) {
- content += "</".concat(tag, ">");
- }
- },
- chars: function chars(text) {
- if (!disable) {
- content += text;
- }
- }
- });
- this.skipMatcher = true;
- var delta = this.quill.clipboard.convert(content);
- this.skipMatcher = false;
- return delta;
- },
- updateStatus: function updateStatus(range) {
- var _this3 = this;
- var status = range ? this.quill.getFormat(range) : {};
- var keys = Object.keys(status);
- if (keys.length !== Object.keys(this.__status || {}).length || keys.find(function (key) {
- return status[key] !== _this3.__status[key];
- })) {
- this.__status = status;
- this.$trigger('statuschange', {}, status);
- }
- }
- }
- });
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 24 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 25 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 26 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 27 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 28 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_mixins__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
- //
- //
- //
- //
- //
- //
- //
- //
- //
- /* harmony default export */ __webpack_exports__["a"] = ({
- name: 'Label',
- mixins: [uni_mixins__WEBPACK_IMPORTED_MODULE_0__[/* emitter */ "a"]],
- props: {
- for: {
- type: String,
- default: ''
- }
- },
- computed: {
- pointer: function pointer() {
- return this.for || this.$slots.default && this.$slots.default.length;
- }
- },
- methods: {
- _onClick: function _onClick($event) {
- var stopPropagation = /^uni-(checkbox|radio|switch)-/.test($event.target.className);
- if (!stopPropagation) {
- stopPropagation = /^uni-(checkbox|radio|switch|button)$/i.test($event.target.tagName);
- }
- if (stopPropagation) {
- return;
- }
- if (this.for) {
- UniViewJSBridge.emit('uni-label-click-' + this.$page.id + '-' + this.for, $event, true);
- } else {
- this.$broadcast(['Checkbox', 'Radio', 'Switch', 'Button'], 'uni-label-click', $event, true);
- }
- }
- }
- });
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 29 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 30 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 31 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 32 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 33 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 34 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 35 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 36 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 37 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 38 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 39 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 40 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 41 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 42 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 43 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 44 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 45 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 46 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 47 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 48 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 49 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 50 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_mixins__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
- /* harmony import */ var _mixins_native__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var methods = ['getCenterLocation', 'moveToLocation', 'getRegion', 'getScale', '$getAppMap']; // const events = [
- // 'markertap',
- // 'callouttap',
- // 'controltap',
- // 'regionchange',
- // 'tap',
- // 'updated'
- // ]
- var _attrs = ['latitude', 'longitude', 'scale', 'markers', 'polyline', 'circles', 'controls', 'show-location'];
- var convertCoordinates = function convertCoordinates(lng, lat, callback) {
- // plus.maps.Map.convertCoordinates(new plus.maps.Point(lng, lat), {
- // coordType: 'gcj02'
- // }, callback)
- callback({
- coord: {
- latitude: lat,
- longitude: lng
- }
- });
- };
- function parseHex(color) {
- if (color.indexOf('#') !== 0) {
- return {
- color: color,
- opacity: 1
- };
- }
- var opacity = color.substr(7, 2);
- return {
- color: color.substr(0, 7),
- opacity: opacity ? Number('0x' + opacity) / 255 : 1
- };
- }
- /* harmony default export */ __webpack_exports__["a"] = ({
- name: 'Map',
- mixins: [uni_mixins__WEBPACK_IMPORTED_MODULE_0__[/* subscriber */ "e"], _mixins_native__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]],
- props: {
- id: {
- type: String,
- default: ''
- },
- latitude: {
- type: [Number, String],
- default: ''
- },
- longitude: {
- type: [Number, String],
- default: ''
- },
- scale: {
- type: [String, Number],
- default: 16
- },
- markers: {
- type: Array,
- default: function _default() {
- return [];
- }
- },
- polyline: {
- type: Array,
- default: function _default() {
- return [];
- }
- },
- circles: {
- type: Array,
- default: function _default() {
- return [];
- }
- },
- controls: {
- type: Array,
- default: function _default() {
- return [];
- }
- }
- },
- data: function data() {
- return {
- style: {
- top: '0px',
- left: '0px',
- width: '0px',
- height: '0px',
- position: 'static'
- },
- hidden: false
- };
- },
- computed: {
- attrs: function attrs() {
- var _this = this;
- var obj = {};
- _attrs.forEach(function (key) {
- var val = _this.$props[key];
- val = key === 'src' ? _this.$getRealPath(val) : val;
- obj[key.replace(/[A-Z]/g, function (str) {
- return '-' + str.toLowerCase();
- })] = val;
- });
- return obj;
- },
- mapControls: function mapControls() {
- var _this2 = this;
- var list = this.controls.map(function (control) {
- var position = {
- position: 'absolute'
- };
- ['top', 'left', 'width', 'height'].forEach(function (key) {
- if (control.position[key]) {
- position[key] = control.position[key] + 'px';
- }
- });
- return {
- id: control.id,
- iconPath: _this2.$getRealPath(control.iconPath),
- position: position
- };
- });
- return list;
- }
- },
- watch: {
- hidden: function hidden(val) {
- this.map && this.map[val ? 'hide' : 'show']();
- },
- scale: function scale(val) {
- this.map && this.map.setZoom(val);
- },
- latitude: function latitude(val) {
- this.map && this.map.setStyles({
- center: new plus.maps.Point(this.longitude, this.latitude)
- });
- },
- longitude: function longitude(val) {
- this.map && this.map.setStyles({
- center: new plus.maps.Point(this.longitude, this.latitude)
- });
- },
- markers: function markers(val) {
- this.map && this._addMarkers(val, true);
- },
- polyline: function polyline(val) {
- this.map && this._addMapLines(val);
- },
- circles: function circles(val) {
- this.map && this._addMapCircles(val);
- }
- },
- mounted: function mounted() {
- var _this3 = this;
- var mapStyle = Object.assign({}, this.attrs, this.position);
- if (this.latitude && this.longitude) {
- mapStyle.center = new plus.maps.Point(this.longitude, this.latitude);
- }
- var map = this.map = plus.maps.create(this.$page.id + '-map-' + (this.id || Date.now()), mapStyle);
- map.__markers__ = {};
- map.__lines__ = [];
- map.__circles__ = [];
- map.setZoom(this.scale);
- plus.webview.currentWebview().append(map);
- if (this.hidden) {
- map.hide();
- }
- this.$watch('position', function () {
- _this3.map && _this3.map.setStyles(_this3.position);
- }, {
- deep: true
- });
- map.onclick = function (e) {
- _this3.$trigger('click', {}, e);
- };
- map.onstatuschanged = function (e) {
- _this3.$trigger('regionchange', {}, e);
- };
- this._addMarkers(this.markers);
- this._addMapLines(this.polyline);
- this._addMapCircles(this.circles);
- },
- beforeDestroy: function beforeDestroy() {
- this.map && this.map.close();
- delete this.map;
- },
- methods: {
- _handleSubscribe: function _handleSubscribe(_ref) {
- var type = _ref.type,
- _ref$data = _ref.data,
- data = _ref$data === void 0 ? {} : _ref$data;
- if (!methods.includes(type)) {
- return;
- }
- this.map && this[type](data);
- },
- moveToLocation: function moveToLocation(_ref2) {
- var callbackId = _ref2.callbackId,
- longitude = _ref2.longitude,
- latitude = _ref2.latitude;
- this.map.setCenter(new plus.maps.Point(longitude || this.longitude, latitude || this.latitude));
- this._publishHandler(callbackId, {
- errMsg: 'moveToLocation:ok'
- });
- },
- getCenterLocation: function getCenterLocation(_ref3) {
- var callbackId = _ref3.callbackId;
- var center = this.map.getCenter();
- this._publishHandler(callbackId, {
- longitude: center.longitude,
- latitude: center.latitude,
- errMsg: 'getCenterLocation:ok'
- });
- },
- getRegion: function getRegion(_ref4) {
- var callbackId = _ref4.callbackId;
- var rect = this.map.getBounds();
- this._publishHandler(callbackId, {
- southwest: rect.southwest,
- northeast: rect.northeast || rect.northease,
- // 5plus API 名字写错了
- errMsg: 'getRegion:ok'
- });
- },
- getScale: function getScale(_ref5) {
- var callbackId = _ref5.callbackId;
- this._publishHandler(callbackId, {
- scale: this.map.getZoom(),
- errMsg: 'getScale:ok'
- });
- },
- controlclick: function controlclick(e) {
- this.$trigger('controltap', {}, {
- controlId: e.id
- });
- },
- _publishHandler: function _publishHandler(callbackId, data) {
- UniViewJSBridge.publishHandler('onMapMethodCallback', {
- callbackId: callbackId,
- data: data
- }, this.$page.id);
- },
- _addMarker: function _addMarker(nativeMap, marker) {
- var _this4 = this;
- var id = marker.id,
- latitude = marker.latitude,
- longitude = marker.longitude,
- iconPath = marker.iconPath,
- callout = marker.callout,
- label = marker.label;
- convertCoordinates(longitude, latitude, function (res) {
- var _res$coord = res.coord,
- latitude = _res$coord.latitude,
- longitude = _res$coord.longitude;
- var nativeMarker = new plus.maps.Marker(new plus.maps.Point(longitude, latitude));
- if (iconPath) {
- nativeMarker.setIcon(_this4.$getRealPath(iconPath));
- }
- if (label && label.content) {
- nativeMarker.setLabel(label.content);
- }
- var nativeBubble = false;
- if (callout && callout.content) {
- nativeBubble = new plus.maps.Bubble(callout.content);
- }
- if (nativeBubble) {
- nativeMarker.setBubble(nativeBubble);
- }
- if (id || id === 0) {
- nativeMarker.onclick = function (e) {
- _this4.$trigger('markertap', {}, {
- markerId: id
- });
- };
- if (nativeBubble) {
- nativeBubble.onclick = function () {
- _this4.$trigger('callouttap', {}, {
- markerId: id
- });
- };
- }
- }
- nativeMap.addOverlay(nativeMarker);
- nativeMap.__markers__[id + ''] = nativeMarker;
- });
- },
- _addMarkers: function _addMarkers(markers, clear) {
- var _this5 = this;
- if (this.map) {
- if (clear) {
- this.map.clearOverlays();
- this.map.__markers__ = {};
- }
- markers.forEach(function (marker) {
- _this5._addMarker(_this5.map, marker);
- });
- return {
- errMsg: 'addMapMarkers:ok'
- };
- }
- return {
- errMsg: 'addMapMarkers:fail:请先创建地图元素'
- };
- },
- _translateMapMarker: function _translateMapMarker(_ref6) {
- var autoRotate = _ref6.autoRotate,
- callbackId = _ref6.callbackId,
- destination = _ref6.destination,
- duration = _ref6.duration,
- markerId = _ref6.markerId;
- if (this.map) {
- var nativeMarker = this.map.__markers__[markerId + ''];
- if (nativeMarker) {
- nativeMarker.setPoint(new plus.maps.Point(destination.longitude, destination.latitude));
- }
- }
- return {
- errMsg: 'translateMapMarker:ok'
- };
- },
- _addMapLines: function _addMapLines(lines) {
- var nativeMap = this.map;
- if (!nativeMap) {
- return {
- errMsg: 'addMapLines:fail:请先创建地图元素'
- };
- }
- if (nativeMap.__lines__.length > 0) {
- nativeMap.__lines__.forEach(function (circle) {
- nativeMap.removeOverlay(circle);
- });
- nativeMap.__lines__ = [];
- }
- lines.forEach(function (line) {
- var color = line.color,
- width = line.width;
- var points = line.points.map(function (point) {
- return new plus.maps.Point(point.longitude, point.latitude);
- });
- var polyline = new plus.maps.Polyline(points);
- if (color) {
- var strokeStyle = parseHex(color);
- polyline.setStrokeColor(strokeStyle.color);
- polyline.setStrokeOpacity(strokeStyle.opacity);
- }
- if (width) {
- polyline.setLineWidth(width);
- }
- nativeMap.addOverlay(polyline);
- nativeMap.__lines__.push(polyline);
- });
- return {
- errMsg: 'addMapLines:ok'
- };
- },
- _addMapCircles: function _addMapCircles(circles) {
- var nativeMap = this.map;
- if (!nativeMap) {
- return {
- errMsg: 'addMapCircles:fail:请先创建地图元素'
- };
- }
- if (nativeMap.__circles__.length > 0) {
- nativeMap.__circles__.forEach(function (circle) {
- nativeMap.removeOverlay(circle);
- });
- nativeMap.__circles__ = [];
- }
- circles.forEach(function (circle) {
- var latitude = circle.latitude,
- longitude = circle.longitude,
- color = circle.color,
- fillColor = circle.fillColor,
- radius = circle.radius,
- strokeWidth = circle.strokeWidth;
- var nativeCircle = new plus.maps.Circle(new plus.maps.Point(longitude, latitude), radius);
- if (color) {
- var strokeStyle = parseHex(color);
- nativeCircle.setStrokeColor(strokeStyle.color);
- nativeCircle.setStrokeOpacity(strokeStyle.opacity);
- }
- if (fillColor) {
- var fillStyle = parseHex(fillColor);
- nativeCircle.setFillColor(fillStyle.color);
- nativeCircle.setFillOpacity(fillStyle.opacity);
- }
- if (strokeWidth) {
- nativeCircle.setLineWidth(strokeWidth);
- }
- nativeMap.addOverlay(nativeCircle);
- nativeMap.__circles__.push(nativeCircle);
- });
- return {
- errMsg: 'addMapCircles:ok'
- };
- }
- }
- });
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 51 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 52 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 53 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 54 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
- //
- //
- //
- var webview = false;
- var insertHTMLWebView = function insertHTMLWebView(_ref) {
- var htmlId = _ref.htmlId;
- var parentWebview = plus.webview.currentWebview(); // fixed by hxy web-view 组件所在的 webview 不注入 uni-app 框架
- var styles = {
- 'uni-app': 'none'
- };
- var parentTitleNView = parentWebview.getTitleNView();
- if (parentTitleNView) {
- if (plus.navigator.isImmersedStatusbar()) {
- styles.top = 44 + plus.navigator.getStatusbarHeight();
- } else {
- styles.top = 44;
- }
- styles.bottom = 0;
- }
- webview = plus.webview.create('', htmlId, styles);
- if (parentTitleNView) {
- webview.addEventListener('titleUpdate', function () {
- var title = webview.getTitle();
- parentWebview.setStyle({
- titleNView: {
- titleText: !title || title === 'null' ? '' : title
- }
- });
- });
- }
- plus.webview.currentWebview().append(webview);
- };
- var updateHTMLWebView = function updateHTMLWebView(_ref2) {
- var htmlId = _ref2.htmlId,
- src = _ref2.src,
- webviewStyles = _ref2.webviewStyles;
- // fixed by xxx 非空时才执行更新操作
- var realPath = src || '';
- if (!realPath) {
- return;
- }
- if (/^(http|https):\/\//.test(realPath) && webviewStyles.progress) {
- webview.setStyle({
- progress: {
- color: webviewStyles.progress.color
- }
- });
- }
- webview.loadURL(realPath);
- };
- var removeHTMLWebView = function removeHTMLWebView() {
- plus.webview.currentWebview().remove(webview);
- webview.close('none');
- webview = false;
- };
- /* harmony default export */ __webpack_exports__["a"] = ({
- name: 'WebView',
- props: {
- src: {
- type: String,
- default: ''
- },
- webviewStyles: {
- type: Object,
- default: function _default() {
- return {};
- }
- }
- },
- watch: {
- src: function src(val, oldVal) {
- webview && updateHTMLWebView({
- src: this.$getRealPath(val),
- webviewStyles: this.webviewStyles
- });
- }
- },
- mounted: function mounted() {
- this.htmlId = 'webviewId' + this.$page.id;
- insertHTMLWebView({
- htmlId: this.htmlId
- });
- updateHTMLWebView({
- src: this.$getRealPath(this.src),
- webviewStyles: this.webviewStyles
- });
- UniViewJSBridge.publishHandler(_constants__WEBPACK_IMPORTED_MODULE_0__[/* WEBVIEW_INSERTED */ "j"], {}, this.$page.id);
- },
- beforeDestroy: function beforeDestroy() {
- removeHTMLWebView();
- UniViewJSBridge.publishHandler(_constants__WEBPACK_IMPORTED_MODULE_0__[/* WEBVIEW_REMOVED */ "l"], {}, this.$page.id);
- }
- });
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 55 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 56 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return findElm; });
- function findVmById(id, vm) {
- if (id === vm._$id) {
- return vm;
- }
- var childVms = vm.$children;
- var len = childVms.length;
- for (var i = 0; i < len; i++) {
- var childVm = findVmById(id, childVms[i]);
- if (childVm) {
- return childVm;
- }
- }
- }
- function findElm(component, pageVm) {
- if (!pageVm) {
- return console.error('page is not ready');
- }
- if (!component) {
- return pageVm.$el;
- }
- if (true) {
- if (typeof component === 'string') {
- var componentVm = findVmById(component, pageVm);
- if (!componentVm) {
- throw new Error("Not Found\uFF1APage[".concat(pageVm.$page.id, "][").concat(component, "]"));
- }
- return componentVm.$el;
- }
- }
- return component.$el;
- }
- /***/ }),
- /* 57 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ON_PAGE_CREATE; });
- var ON_PAGE_CREATE = 'onPageCreate';
- /***/ }),
- /* 58 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return definePage; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getPageVueComponent; });
- /* unused harmony export createPage */
- /* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
- var pageFactory = Object.create(null);
- function definePage(name, createPageVueComponent) {
- pageFactory[name] = createPageVueComponent;
- }
- var getPageVueComponent = Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* cached */ "a"])(function (pagePath) {
- return pageFactory[pagePath]();
- });
- function createPage(pagePath, pageId, pageQuery, pageInstance) {
- if (!pageFactory[pagePath]) {
- console.error("".concat(pagePath, " not found"));
- }
- var startTime = Date.now();
- var pageVm = new (getPageVueComponent(pagePath))({
- mpType: 'page',
- pageId: pageId,
- pagePath: pagePath,
- pageQuery: pageQuery,
- pageInstance: pageInstance
- });
- if (true) {
- console.log("new ".concat(pagePath), Date.now() - startTime);
- }
- return pageVm;
- }
- /***/ }),
- /* 59 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getCurrentPages; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return setCurrentPage; });
- var pages = [];
- function getCurrentPages() {
- return pages;
- }
- function setCurrentPage(pageId, pagePath) {
- pages.length = 0;
- pages.push({
- $page: {
- id: pageId,
- route: pagePath
- }
- });
- }
- /***/ }),
- /* 60 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HTMLParser; });
- /*
- * HTML5 Parser By Sam Blowes
- *
- * Designed for HTML5 documents
- *
- * Original code by John Resig (ejohn.org)
- * http://ejohn.org/blog/pure-javascript-html-parser/
- * Original code by Erik Arvidsson, Mozilla Public License
- * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
- *
- * ----------------------------------------------------------------------------
- * License
- * ----------------------------------------------------------------------------
- *
- * This code is triple licensed using Apache Software License 2.0,
- * Mozilla Public License or GNU Public License
- *
- * ////////////////////////////////////////////////////////////////////////////
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
- *
- * ////////////////////////////////////////////////////////////////////////////
- *
- * The contents of this file are subject to the Mozilla Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * The Original Code is Simple HTML Parser.
- *
- * The Initial Developer of the Original Code is Erik Arvidsson.
- * Portions created by Erik Arvidssson are Copyright (C) 2004. All Rights
- * Reserved.
- *
- * ////////////////////////////////////////////////////////////////////////////
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * ----------------------------------------------------------------------------
- * Usage
- * ----------------------------------------------------------------------------
- *
- * // Use like so:
- * HTMLParser(htmlString, {
- * start: function(tag, attrs, unary) {},
- * end: function(tag) {},
- * chars: function(text) {},
- * comment: function(text) {}
- * });
- *
- * // or to get an XML string:
- * HTMLtoXML(htmlString);
- *
- * // or to get an XML DOM Document
- * HTMLtoDOM(htmlString);
- *
- * // or to inject into an existing document/DOM node
- * HTMLtoDOM(htmlString, document);
- * HTMLtoDOM(htmlString, document.body);
- *
- */
- // Regular Expressions for parsing tags and attributes
- var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
- var endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/;
- var attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; // Empty Elements - HTML 5
- 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
- // fixed by xxx 将 ins 标签从块级名单中移除
- 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
- 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
- // (and which close themselves)
- var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); // Attributes that have their values filled in disabled="disabled"
- var fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'); // Special Elements (can contain anything)
- var special = makeMap('script,style');
- function HTMLParser(html, handler) {
- var index;
- var chars;
- var match;
- var stack = [];
- var last = html;
- stack.last = function () {
- return this[this.length - 1];
- };
- while (html) {
- chars = true; // Make sure we're not in a script or style element
- if (!stack.last() || !special[stack.last()]) {
- // Comment
- if (html.indexOf('<!--') == 0) {
- index = html.indexOf('-->');
- if (index >= 0) {
- if (handler.comment) {
- handler.comment(html.substring(4, index));
- }
- html = html.substring(index + 3);
- chars = false;
- } // end tag
- } else if (html.indexOf('</') == 0) {
- match = html.match(endTag);
- if (match) {
- html = html.substring(match[0].length);
- match[0].replace(endTag, parseEndTag);
- chars = false;
- } // start tag
- } else if (html.indexOf('<') == 0) {
- match = html.match(startTag);
- if (match) {
- html = html.substring(match[0].length);
- match[0].replace(startTag, parseStartTag);
- chars = false;
- }
- }
- if (chars) {
- index = html.indexOf('<');
- var text = index < 0 ? html : html.substring(0, index);
- html = index < 0 ? '' : html.substring(index);
- if (handler.chars) {
- handler.chars(text);
- }
- }
- } else {
- html = html.replace(new RegExp('([\\s\\S]*?)<\/' + stack.last() + '[^>]*>'), function (all, text) {
- text = text.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, '$1$2');
- if (handler.chars) {
- handler.chars(text);
- }
- return '';
- });
- parseEndTag('', stack.last());
- }
- if (html == last) {
- throw 'Parse Error: ' + html;
- }
- last = html;
- } // Clean up any remaining tags
- parseEndTag();
- function parseStartTag(tag, tagName, rest, unary) {
- tagName = tagName.toLowerCase();
- if (block[tagName]) {
- while (stack.last() && inline[stack.last()]) {
- parseEndTag('', stack.last());
- }
- }
- if (closeSelf[tagName] && stack.last() == tagName) {
- parseEndTag('', tagName);
- }
- unary = empty[tagName] || !!unary;
- if (!unary) {
- stack.push(tagName);
- }
- if (handler.start) {
- var attrs = [];
- rest.replace(attr, function (match, name) {
- var value = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : fillAttrs[name] ? name : '';
- attrs.push({
- name: name,
- value: value,
- escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') // "
- });
- });
- if (handler.start) {
- handler.start(tagName, attrs, unary);
- }
- }
- }
- function parseEndTag(tag, tagName) {
- // If no tag name is provided, clean shop
- if (!tagName) {
- var pos = 0;
- } // Find the closest opened tag of the same type
- else {
- for (var pos = stack.length - 1; pos >= 0; pos--) {
- if (stack[pos] == tagName) {
- break;
- }
- }
- }
- if (pos >= 0) {
- // Close all the open elements, up the stack
- for (var i = stack.length - 1; i >= pos; i--) {
- if (handler.end) {
- handler.end(stack[i]);
- }
- } // Remove the open elements from the stack
- stack.length = pos;
- }
- }
- }
- ;
- function makeMap(str) {
- var obj = {};
- var items = str.split(',');
- for (var i = 0; i < items.length; i++) {
- obj[items[i]] = true;
- }
- return obj;
- }
- /***/ }),
- /* 61 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Friction; });
- function Friction(e) {
- this._drag = e;
- this._dragLog = Math.log(e);
- this._x = 0;
- this._v = 0;
- this._startTime = 0;
- }
- Friction.prototype.set = function (e, t) {
- this._x = e;
- this._v = t;
- this._startTime = new Date().getTime();
- };
- Friction.prototype.setVelocityByEnd = function (e) {
- this._v = (e - this._x) * this._dragLog / (Math.pow(this._drag, 100) - 1);
- };
- Friction.prototype.x = function (e) {
- if (e === undefined) {
- e = (new Date().getTime() - this._startTime) / 1e3;
- }
- var t;
- t = e === this._dt && this._powDragDt ? this._powDragDt : this._powDragDt = Math.pow(this._drag, e);
- this._dt = e;
- return this._x + this._v * t / this._dragLog - this._v / this._dragLog;
- };
- Friction.prototype.dx = function (e) {
- if (e === undefined) {
- e = (new Date().getTime() - this._startTime) / 1e3;
- }
- var t;
- t = e === this._dt && this._powDragDt ? this._powDragDt : this._powDragDt = Math.pow(this._drag, e);
- this._dt = e;
- return this._v * t;
- };
- Friction.prototype.done = function () {
- return Math.abs(this.dx()) < 3;
- };
- Friction.prototype.reconfigure = function (e) {
- var t = this.x();
- var n = this.dx();
- this._drag = e;
- this._dragLog = Math.log(e);
- this.set(t, n);
- };
- Friction.prototype.configuration = function () {
- var e = this;
- return [{
- label: 'Friction',
- read: function read() {
- return e._drag;
- },
- write: function write(t) {
- e.reconfigure(t);
- },
- min: 0.001,
- max: 0.1,
- step: 0.001
- }];
- };
- /***/ }),
- /* 62 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Spring; });
- function o(e, t, n) {
- return e > t - n && e < t + n;
- }
- function a(e, t) {
- return o(e, 0, t);
- }
- function Spring(e, t, n) {
- this._m = e;
- this._k = t;
- this._c = n;
- this._solution = null;
- this._endPosition = 0;
- this._startTime = 0;
- }
- Spring.prototype._solve = function (e, t) {
- var n = this._c;
- var i = this._m;
- var r = this._k;
- var o = n * n - 4 * i * r;
- if (o === 0) {
- var _a = -n / (2 * i);
- var _s = e;
- var _l = t / (_a * e);
- return {
- x: function x(e) {
- return (_s + _l * e) * Math.pow(Math.E, _a * e);
- },
- dx: function dx(e) {
- var t = Math.pow(Math.E, _a * e);
- return _a * (_s + _l * e) * t + _l * t;
- }
- };
- }
- if (o > 0) {
- var c = (-n - Math.sqrt(o)) / (2 * i);
- var u = (-n + Math.sqrt(o)) / (2 * i);
- var _l2 = (t - c * e) / (u - c);
- var _s2 = e - _l2;
- return {
- x: function x(e) {
- var t;
- var n;
- if (e === this._t) {
- t = this._powER1T;
- n = this._powER2T;
- }
- this._t = e;
- if (!t) {
- t = this._powER1T = Math.pow(Math.E, c * e);
- }
- if (!n) {
- n = this._powER2T = Math.pow(Math.E, u * e);
- }
- return _s2 * t + _l2 * n;
- },
- dx: function dx(e) {
- var t;
- var n;
- if (e === this._t) {
- t = this._powER1T;
- n = this._powER2T;
- }
- this._t = e;
- if (!t) {
- t = this._powER1T = Math.pow(Math.E, c * e);
- }
- if (!n) {
- n = this._powER2T = Math.pow(Math.E, u * e);
- }
- return _s2 * c * t + _l2 * u * n;
- }
- };
- }
- var d = Math.sqrt(4 * i * r - n * n) / (2 * i);
- var a = -n / 2 * i;
- var s = e;
- var l = (t - a * e) / d;
- return {
- x: function x(e) {
- return Math.pow(Math.E, a * e) * (s * Math.cos(d * e) + l * Math.sin(d * e));
- },
- dx: function dx(e) {
- var t = Math.pow(Math.E, a * e);
- var n = Math.cos(d * e);
- var i = Math.sin(d * e);
- return t * (l * d * n - s * d * i) + a * t * (l * i + s * n);
- }
- };
- };
- Spring.prototype.x = function (e) {
- if (e === undefined) {
- e = (new Date().getTime() - this._startTime) / 1e3;
- }
- return this._solution ? this._endPosition + this._solution.x(e) : 0;
- };
- Spring.prototype.dx = function (e) {
- if (e === undefined) {
- e = (new Date().getTime() - this._startTime) / 1e3;
- }
- return this._solution ? this._solution.dx(e) : 0;
- };
- Spring.prototype.setEnd = function (e, t, n) {
- if (!n) {
- n = new Date().getTime();
- }
- if (e !== this._endPosition || !a(t, 0.4)) {
- t = t || 0;
- var i = this._endPosition;
- if (this._solution) {
- if (a(t, 0.4)) {
- t = this._solution.dx((n - this._startTime) / 1e3);
- }
- i = this._solution.x((n - this._startTime) / 1e3);
- if (a(t, 0.4)) {
- t = 0;
- }
- if (a(i, 0.4)) {
- i = 0;
- }
- i += this._endPosition;
- }
- if (!(this._solution && a(i - e, 0.4) && a(t, 0.4))) {
- this._endPosition = e;
- this._solution = this._solve(i - this._endPosition, t);
- this._startTime = n;
- }
- }
- };
- Spring.prototype.snap = function (e) {
- this._startTime = new Date().getTime();
- this._endPosition = e;
- this._solution = {
- x: function x() {
- return 0;
- },
- dx: function dx() {
- return 0;
- }
- };
- };
- Spring.prototype.done = function (e) {
- if (!e) {
- e = new Date().getTime();
- }
- return o(this.x(), this._endPosition, 0.4) && a(this.dx(), 0.4);
- };
- Spring.prototype.reconfigure = function (e, t, n) {
- this._m = e;
- this._k = t;
- this._c = n;
- if (!this.done()) {
- this._solution = this._solve(this.x() - this._endPosition, this.dx());
- this._startTime = new Date().getTime();
- }
- };
- Spring.prototype.springConstant = function () {
- return this._k;
- };
- Spring.prototype.damping = function () {
- return this._c;
- };
- Spring.prototype.configuration = function () {
- function e(e, t) {
- e.reconfigure(1, t, e.damping());
- }
- function t(e, t) {
- e.reconfigure(1, e.springConstant(), t);
- }
- return [{
- label: 'Spring Constant',
- read: this.springConstant.bind(this),
- write: e.bind(this, this),
- min: 100,
- max: 1e3
- }, {
- label: 'Damping',
- read: this.damping.bind(this),
- write: t.bind(this, this),
- min: 1,
- max: 500
- }];
- };
- /***/ }),
- /* 63 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var base = ['borderRadius', 'borderColor', 'borderWidth', 'backgroundColor'];
- var text = ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'color', 'textAlign', 'lineHeight', 'fontSize', 'fontWeight', 'textOverflow', 'whiteSpace'];
- var image = [];
- var textAlign = {
- start: 'left',
- end: 'right'
- };
- var index = 0;
- /* harmony default export */ __webpack_exports__["a"] = ({
- name: 'Cover',
- data: function data() {
- return {
- style: {}
- };
- },
- computed: {
- viewPosition: function viewPosition() {
- var position = {};
- for (var key in this.position) {
- var val = this.position[key];
- var valNumber = parseFloat(val);
- var parentValNumber = parseFloat(this._nativeParent.position[key]);
- if (key === 'top' || key === 'left') {
- val = Math.max(valNumber, parentValNumber) + 'px';
- } else if (key === 'width' || key === 'height') {
- var _base = key === 'width' ? 'left' : 'left';
- var parentStart = parseFloat(this._nativeParent.position[_base]);
- var viewStart = parseFloat(this.position[_base]);
- var diff1 = Math.max(parentStart - viewStart, 0);
- var diff2 = Math.max(viewStart + valNumber - (parentStart + parentValNumber), 0);
- val = Math.max(valNumber - diff1 - diff2, 0) + 'px';
- }
- position[key] = val;
- }
- return position;
- },
- tags: function tags() {
- var position = this._getTagPosition();
- var style = this.style;
- var tags = [{
- tag: 'rect',
- position: position,
- rectStyles: {
- color: style.backgroundColor,
- radius: style.borderRadius,
- borderColor: style.borderColor,
- borderWidth: style.borderWidth
- }
- }];
- if (this.coverType === 'image') {
- tags.push({
- tag: 'img',
- position: position,
- src: this.coverContent
- });
- } else {
- var lineSpacing = parseFloat(style.lineHeight) - parseFloat(style.fontSize);
- var width = parseFloat(position.width) - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight);
- width = width < 0 ? 0 : width;
- var height = parseFloat(position.height) - parseFloat(style.paddingTop) - lineSpacing / 2 - parseFloat(style.paddingBottom);
- height = height < 0 ? 0 : height;
- tags.push({
- tag: 'font',
- position: {
- top: "".concat(parseFloat(position.top) + parseFloat(style.paddingTop) + lineSpacing / 2, "px"),
- left: "".concat(parseFloat(position.left) + parseFloat(style.paddingLeft), "px"),
- width: "".concat(width, "px"),
- height: "".concat(height, "px")
- },
- textStyles: {
- align: textAlign[style.textAlign] || style.textAlign,
- color: style.color,
- decoration: 'none',
- lineSpacing: "".concat(lineSpacing, "px"),
- margin: '0px',
- overflow: style.textOverflow,
- size: style.fontSize,
- verticalAlign: 'top',
- weight: style.fontWeight,
- whiteSpace: style.whiteSpace
- },
- text: this.coverContent
- });
- }
- return tags;
- }
- },
- created: function created() {
- var $parent = this.$parent;
- while (!$parent.isNative && $parent !== this.$root) {
- $parent = $parent.$parent;
- }
- this._nativeParent = $parent;
- },
- mounted: function mounted() {
- var _this = this;
- this._updateStyle();
- var $nativeParent = this._nativeParent;
- if ($nativeParent.isNative) {
- if ($nativeParent._isMounted) {
- this._onCanInsert();
- } else {
- $nativeParent.onCanInsertCallbacks.push(function () {
- _this._onCanInsert();
- });
- }
- this.$watch('hidden', function (val) {
- _this.cover && _this.cover[val ? 'hide' : 'show']();
- });
- this.$watch('viewPosition', function (val) {
- _this.cover && _this.cover.setStyle(val);
- }, {
- deep: true
- });
- this.$watch('tags', function () {
- var cover = _this.cover;
- if (cover) {
- cover.reset();
- cover.draw(_this.tags);
- }
- }, {
- deep: true
- });
- this.$on('uni-view-update', this._requestStyleUpdate);
- }
- },
- beforeDestroy: function beforeDestroy() {
- if (this._nativeParent.isNative) {
- this.cover && this.cover.close();
- delete this.cover;
- }
- },
- methods: {
- _onCanInsert: function _onCanInsert() {
- var _this2 = this;
- var cover = this.cover = new plus.nativeObj.View("cover-".concat(Date.now(), "-").concat(index++), this.viewPosition, this.tags);
- plus.webview.currentWebview().append(cover);
- if (this.hidden) {
- cover.hide();
- }
- cover.addEventListener('click', function () {
- _this2.$trigger('click', {}, {});
- });
- },
- _getTagPosition: function _getTagPosition() {
- var position = {};
- for (var key in this.position) {
- var val = this.position[key];
- if (key === 'top' || key === 'left') {
- val = Math.min(parseFloat(val) - parseFloat(this._nativeParent.position[key]), 0) + 'px';
- }
- position[key] = val;
- }
- return position;
- },
- _updateStyle: function _updateStyle() {
- var _this3 = this;
- var style = getComputedStyle(this.$el);
- base.concat(text, image).forEach(function (key) {
- _this3.style[key] = style[key];
- });
- },
- _requestStyleUpdate: function _requestStyleUpdate() {
- var _this4 = this;
- if (this._styleUpdateRequest) {
- cancelAnimationFrame(this._styleUpdateRequest);
- }
- this._styleUpdateRequest = requestAnimationFrame(function () {
- delete _this4._styleUpdateRequest;
- _this4._updateStyle();
- });
- }
- }
- });
- /***/ }),
- /* 64 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // EXTERNAL MODULE: ./src/core/view/mixins/scroller/Friction.js
- var Friction = __webpack_require__(61);
- // EXTERNAL MODULE: ./src/core/view/mixins/scroller/Spring.js
- var Spring = __webpack_require__(62);
- // CONCATENATED MODULE: ./src/core/view/mixins/scroller/Scroll.js
- function Scroll(extent, friction, spring) {
- this._extent = extent;
- this._friction = friction || new Friction["a" /* Friction */](0.01);
- this._spring = spring || new Spring["a" /* Spring */](1, 90, 20);
- this._startTime = 0;
- this._springing = false;
- this._springOffset = 0;
- }
- Scroll.prototype.snap = function (e, t) {
- this._springOffset = 0;
- this._springing = true;
- this._spring.snap(e);
- this._spring.setEnd(t);
- };
- Scroll.prototype.set = function (e, t) {
- this._friction.set(e, t);
- if (e > 0 && t >= 0) {
- this._springOffset = 0;
- this._springing = true;
- this._spring.snap(e);
- this._spring.setEnd(0);
- } else {
- if (e < -this._extent && t <= 0) {
- this._springOffset = 0;
- this._springing = true;
- this._spring.snap(e);
- this._spring.setEnd(-this._extent);
- } else {
- this._springing = false;
- }
- }
- this._startTime = new Date().getTime();
- };
- Scroll.prototype.x = function (e) {
- if (!this._startTime) {
- return 0;
- }
- if (!e) {
- e = (new Date().getTime() - this._startTime) / 1e3;
- }
- if (this._springing) {
- return this._spring.x() + this._springOffset;
- }
- var t = this._friction.x(e);
- var n = this.dx(e);
- if (t > 0 && n >= 0 || t < -this._extent && n <= 0) {
- this._springing = true;
- this._spring.setEnd(0, n);
- if (t < -this._extent) {
- this._springOffset = -this._extent;
- } else {
- this._springOffset = 0;
- }
- t = this._spring.x() + this._springOffset;
- }
- return t;
- };
- Scroll.prototype.dx = function (e) {
- var t = 0;
- t = this._lastTime === e ? this._lastDx : this._springing ? this._spring.dx(e) : this._friction.dx(e);
- this._lastTime = e;
- this._lastDx = t;
- return t;
- };
- Scroll.prototype.done = function () {
- return this._springing ? this._spring.done() : this._friction.done();
- };
- Scroll.prototype.setVelocityByEnd = function (e) {
- this._friction.setVelocityByEnd(e);
- };
- Scroll.prototype.configuration = function () {
- var e = this._friction.configuration();
- e.push.apply(e, this._spring.configuration());
- return e;
- };
- // CONCATENATED MODULE: ./src/core/view/mixins/scroller/Scroller.js
- function i(scroll, t, n) {
- function i(t, scroll, r, o) {
- if (!t || !t.cancelled) {
- r(scroll);
- var a = scroll.done();
- if (!a) {
- if (!t.cancelled) {
- t.id = requestAnimationFrame(i.bind(null, t, scroll, r, o));
- }
- }
- if (a && o) {
- o(scroll);
- }
- }
- }
- function r(scroll) {
- if (scroll && scroll.id) {
- cancelAnimationFrame(scroll.id);
- }
- if (scroll) {
- scroll.cancelled = true;
- }
- }
- var o = {
- id: 0,
- cancelled: false
- };
- i(o, scroll, t, n);
- return {
- cancel: r.bind(null, o),
- model: scroll
- };
- }
- function Scroller(element, options) {
- options = options || {};
- this._element = element;
- this._options = options;
- this._enableSnap = options.enableSnap || false;
- this._itemSize = options.itemSize || 0;
- this._enableX = options.enableX || false;
- this._enableY = options.enableY || false;
- this._shouldDispatchScrollEvent = !!options.onScroll;
- if (this._enableX) {
- this._extent = (options.scrollWidth || this._element.offsetWidth) - this._element.parentElement.offsetWidth;
- this._scrollWidth = options.scrollWidth;
- } else {
- this._extent = (options.scrollHeight || this._element.offsetHeight) - this._element.parentElement.offsetHeight;
- this._scrollHeight = options.scrollHeight;
- }
- this._position = 0;
- this._scroll = new Scroll(this._extent, options.friction, options.spring);
- this._onTransitionEnd = this.onTransitionEnd.bind(this);
- this.updatePosition();
- }
- Scroller.prototype.onTouchStart = function () {
- this._startPosition = this._position;
- this._lastChangePos = this._startPosition;
- if (this._startPosition > 0) {
- this._startPosition /= 0.5;
- } else {
- if (this._startPosition < -this._extent) {
- this._startPosition = (this._startPosition + this._extent) / 0.5 - this._extent;
- }
- }
- if (this._animation) {
- this._animation.cancel();
- this._scrolling = false;
- }
- this.updatePosition();
- };
- Scroller.prototype.onTouchMove = function (x, y) {
- var startPosition = this._startPosition;
- if (this._enableX) {
- startPosition += x;
- } else if (this._enableY) {
- startPosition += y;
- }
- if (startPosition > 0) {
- startPosition *= 0.5;
- } else if (startPosition < -this._extent) {
- startPosition = 0.5 * (startPosition + this._extent) - this._extent;
- }
- this._position = startPosition;
- this.updatePosition();
- this.dispatchScroll();
- };
- Scroller.prototype.onTouchEnd = function (e, r, o) {
- var _this = this;
- if (this._enableSnap && this._position > -this._extent && this._position < 0) {
- if (this._enableY && (Math.abs(r) < this._itemSize && Math.abs(o.y) < 300 || Math.abs(o.y) < 150)) {
- this.snap();
- return;
- }
- if (this._enableX && (Math.abs(e) < this._itemSize && Math.abs(o.x) < 300 || Math.abs(o.x) < 150)) {
- this.snap();
- return;
- }
- }
- if (this._enableX) {
- this._scroll.set(this._position, o.x);
- } else if (this._enableY) {
- this._scroll.set(this._position, o.y);
- }
- if (this._enableSnap) {
- var s = this._scroll._friction.x(100);
- var l = s % this._itemSize;
- var c = Math.abs(l) > this._itemSize / 2 ? s - (this._itemSize - Math.abs(l)) : s - l;
- if (c <= 0 && c >= -this._extent) {
- this._scroll.setVelocityByEnd(c);
- }
- }
- this._lastTime = Date.now();
- this._lastDelay = 0;
- this._scrolling = true;
- this._lastChangePos = this._position;
- this._lastIdx = Math.floor(Math.abs(this._position / this._itemSize));
- this._animation = i(this._scroll, function () {
- var e = Date.now();
- var i = (e - _this._scroll._startTime) / 1e3;
- var r = _this._scroll.x(i);
- _this._position = r;
- _this.updatePosition();
- var o = _this._scroll.dx(i);
- if (_this._shouldDispatchScrollEvent && e - _this._lastTime > _this._lastDelay) {
- _this.dispatchScroll();
- _this._lastDelay = Math.abs(2e3 / o);
- _this._lastTime = e;
- }
- }, function () {
- if (_this._enableSnap) {
- if (c <= 0 && c >= -_this._extent) {
- _this._position = c;
- _this.updatePosition();
- }
- if (typeof _this._options.onSnap === 'function') {
- _this._options.onSnap(Math.floor(Math.abs(_this._position) / _this._itemSize));
- }
- }
- if (_this._shouldDispatchScrollEvent) {
- _this.dispatchScroll();
- }
- _this._scrolling = false;
- });
- };
- Scroller.prototype.onTransitionEnd = function () {
- this._element.style.transition = '';
- this._element.style.webkitTransition = '';
- this._element.removeEventListener('transitionend', this._onTransitionEnd);
- this._element.removeEventListener('webkitTransitionEnd', this._onTransitionEnd);
- if (this._snapping) {
- this._snapping = false;
- }
- this.dispatchScroll();
- };
- Scroller.prototype.snap = function () {
- var e = this._itemSize;
- var t = this._position % e;
- var i = Math.abs(t) > this._itemSize / 2 ? this._position - (e - Math.abs(t)) : this._position - t;
- if (this._position !== i) {
- this._snapping = true;
- this.scrollTo(-i);
- if (typeof this._options.onSnap === 'function') {
- this._options.onSnap(Math.floor(Math.abs(this._position) / this._itemSize));
- }
- }
- };
- Scroller.prototype.scrollTo = function (e, t) {
- if (this._animation) {
- this._animation.cancel();
- this._scrolling = false;
- }
- if (typeof e === 'number') {
- this._position = -e;
- }
- if (this._position < -this._extent) {
- this._position = -this._extent;
- } else {
- if (this._position > 0) {
- this._position = 0;
- }
- }
- this._element.style.transition = 'transform ' + (t || 0.2) + 's ease-out';
- this._element.style.webkitTransition = '-webkit-transform ' + (t || 0.2) + 's ease-out';
- this.updatePosition();
- this._element.addEventListener('transitionend', this._onTransitionEnd);
- this._element.addEventListener('webkitTransitionEnd', this._onTransitionEnd);
- };
- Scroller.prototype.dispatchScroll = function () {
- if (typeof this._options.onScroll === 'function' && Math.round(this._lastPos) !== Math.round(this._position)) {
- this._lastPos = this._position;
- var e = {
- target: {
- scrollLeft: this._enableX ? -this._position : 0,
- scrollTop: this._enableY ? -this._position : 0,
- scrollHeight: this._scrollHeight || this._element.offsetHeight,
- scrollWidth: this._scrollWidth || this._element.offsetWidth,
- offsetHeight: this._element.parentElement.offsetHeight,
- offsetWidth: this._element.parentElement.offsetWidth
- }
- };
- this._options.onScroll(e);
- }
- };
- Scroller.prototype.update = function (e, t, n) {
- var i = 0;
- var r = this._position;
- if (this._enableX) {
- i = this._element.childNodes.length ? (t || this._element.offsetWidth) - this._element.parentElement.offsetWidth : 0;
- this._scrollWidth = t;
- } else {
- i = this._element.childNodes.length ? (t || this._element.offsetHeight) - this._element.parentElement.offsetHeight : 0;
- this._scrollHeight = t;
- }
- if (typeof e === 'number') {
- this._position = -e;
- }
- if (this._position < -i) {
- this._position = -i;
- } else {
- if (this._position > 0) {
- this._position = 0;
- }
- }
- this._itemSize = n || this._itemSize;
- this.updatePosition();
- if (r !== this._position) {
- this.dispatchScroll();
- if (typeof this._options.onSnap === 'function') {
- this._options.onSnap(Math.floor(Math.abs(this._position) / this._itemSize));
- }
- }
- this._extent = i;
- this._scroll._extent = i;
- };
- Scroller.prototype.updatePosition = function () {
- var transform = '';
- if (this._enableX) {
- transform = 'translateX(' + this._position + 'px) translateZ(0)';
- } else {
- if (this._enableY) {
- transform = 'translateY(' + this._position + 'px) translateZ(0)';
- }
- }
- this._element.style.webkitTransform = transform;
- this._element.style.transform = transform;
- };
- Scroller.prototype.isScrolling = function () {
- return this._scrolling || this._snapping;
- };
- // CONCATENATED MODULE: ./src/core/view/mixins/scroller/index.js
- /* harmony default export */ var scroller = __webpack_exports__["a"] = ({
- methods: {
- initScroller: function initScroller(element, options) {
- this._touchInfo = {
- trackingID: -1,
- maxDy: 0,
- maxDx: 0
- };
- this._scroller = new Scroller(element, options);
- this.__handleTouchStart = this._handleTouchStart.bind(this);
- this.__handleTouchMove = this._handleTouchMove.bind(this);
- this.__handleTouchEnd = this._handleTouchEnd.bind(this);
- this._initedScroller = true;
- },
- _findDelta: function _findDelta(event) {
- var touchInfo = this._touchInfo;
- return event.detail.state === 'move' || event.detail.state === 'end' ? {
- x: event.detail.dx,
- y: event.detail.dy
- } : {
- x: event.screenX - touchInfo.x,
- y: event.screenY - touchInfo.y
- };
- },
- _handleTouchStart: function _handleTouchStart(e) {
- var t = this._touchInfo;
- var n = this._scroller;
- if (n) {
- if (e.detail.state === 'start') {
- t.trackingID = 'touch';
- t.x = e.detail.x;
- t.y = e.detail.y;
- } else {
- t.trackingID = 'mouse';
- t.x = e.screenX;
- t.y = e.screenY;
- }
- t.maxDx = 0;
- t.maxDy = 0;
- t.historyX = [0];
- t.historyY = [0];
- t.historyTime = [e.detail.timeStamp];
- t.listener = n;
- if (n.onTouchStart) {
- n.onTouchStart();
- }
- event.preventDefault();
- }
- },
- _handleTouchMove: function _handleTouchMove(event) {
- var touchInfo = this._touchInfo;
- if (touchInfo.trackingID !== -1) {
- event.preventDefault();
- var delta = this._findDelta(event);
- if (delta) {
- 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;) {
- touchInfo.historyTime.shift();
- touchInfo.historyX.shift();
- touchInfo.historyY.shift();
- }
- if (touchInfo.listener && touchInfo.listener.onTouchMove) {
- touchInfo.listener.onTouchMove(delta.x, delta.y, event.detail.timeStamp);
- }
- }
- }
- },
- _handleTouchEnd: function _handleTouchEnd(event) {
- var touchInfo = this._touchInfo;
- if (touchInfo.trackingID !== -1) {
- event.preventDefault();
- var delta = this._findDelta(event);
- if (delta) {
- var listener = touchInfo.listener;
- touchInfo.trackingID = -1;
- touchInfo.listener = null;
- var r = touchInfo.historyTime.length;
- var o = {
- x: 0,
- y: 0
- };
- if (r > 2) {
- for (var a = touchInfo.historyTime.length - 1, s = touchInfo.historyTime[a], l = touchInfo.historyX[a], c = touchInfo.historyY[a]; a > 0;) {
- a--;
- var u = touchInfo.historyTime[a];
- var d = s - u;
- if (d > 30 && d < 50) {
- o.x = (l - touchInfo.historyX[a]) / (d / 1e3);
- o.y = (c - touchInfo.historyY[a]) / (d / 1e3);
- break;
- }
- }
- }
- touchInfo.historyTime = [];
- touchInfo.historyX = [];
- touchInfo.historyY = [];
- if (listener && listener.onTouchEnd) {
- listener.onTouchEnd(delta.x, delta.y, o);
- }
- }
- }
- }
- }
- });
- /***/ }),
- /* 65 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // EXPORTS
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ getRealPath; });
- // CONCATENATED MODULE: ./src/core/helpers/get-real-route.js
- function getRealRoute(fromRoute, toRoute) {
- if (!toRoute) {
- toRoute = fromRoute;
- if (toRoute.indexOf('/') === 0) {
- return toRoute;
- }
- var pages = getCurrentPages();
- if (pages.length) {
- fromRoute = pages[pages.length - 1].$page.route;
- } else {
- fromRoute = '';
- }
- } else {
- if (toRoute.indexOf('/') === 0) {
- return toRoute;
- }
- }
- if (toRoute.indexOf('./') === 0) {
- return getRealRoute(fromRoute, toRoute.substr(2));
- }
- var toRouteArray = toRoute.split('/');
- var toRouteLength = toRouteArray.length;
- var i = 0;
- for (; i < toRouteLength && toRouteArray[i] === '..'; i++) {// noop
- }
- toRouteArray.splice(0, i);
- toRoute = toRouteArray.join('/');
- var fromRouteArray = fromRoute.length > 0 ? fromRoute.split('/') : [];
- fromRouteArray.splice(fromRouteArray.length - i - 1, i + 1);
- return '/' + fromRouteArray.concat(toRouteArray).join('/');
- }
- // CONCATENATED MODULE: ./src/platforms/app-plus/helpers/get-real-path.js
- var SCHEME_RE = /^([a-z-]+:)?\/\//i;
- var DATA_RE = /^data:.*,.*/; // 处理 Android 平台解压与非解压模式下获取的路径不一致的情况
- function handleLocalPath(filePath) {
- return plus.io.convertLocalFileSystemURL(filePath).replace(/^\/?apps\//, '/android_asset/apps/').replace(/\/$/, '');
- }
- var wwwPath;
- function addBase(filePath) {
- if (!wwwPath) {
- // 需要时,初始化一次,外部直接初始化,需要等 plusready
- wwwPath = 'file://' + handleLocalPath('_www') + '/';
- }
- return wwwPath + filePath;
- }
- function getRealPath(filePath) {
- if (filePath.indexOf('/') === 0) {
- if (filePath.indexOf('//') === 0) {
- filePath = 'https:' + filePath;
- } else {
- return addBase(filePath.substr(1));
- }
- } // 网络资源或base64
- if (SCHEME_RE.test(filePath) || DATA_RE.test(filePath) || filePath.indexOf('blob:') === 0) {
- return filePath;
- } // _do=>_doc,_documents,_downloads
- if (filePath.indexOf('_www') === 0 || filePath.indexOf('_do') === 0) {
- return 'file://' + handleLocalPath(filePath);
- }
- var pages = getCurrentPages();
- if (pages.length) {
- return addBase(getRealRoute(pages[pages.length - 1].$page.route, filePath).substr(1));
- }
- return filePath;
- }
- /***/ }),
- /* 66 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return requestComponentObserver; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return destroyComponentObserver; });
- /* harmony import */ var intersection_observer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87);
- /* harmony import */ var intersection_observer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(intersection_observer__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var uni_helpers_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
- /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56);
- function getRect(rect) {
- return {
- bottom: rect.bottom,
- height: rect.height,
- left: rect.left,
- right: rect.right,
- top: rect.top,
- width: rect.width
- };
- }
- var intersectionObservers = {};
- function requestComponentObserver(_ref, pageId) {
- var reqId = _ref.reqId,
- component = _ref.component,
- options = _ref.options;
- var pages = getCurrentPages();
- var page = pages.find(function (page) {
- return page.$page.id === pageId;
- });
- if (!page) {
- throw new Error("Not Found\uFF1APage[".concat(pageId, "]"));
- }
- var pageVm = page.$vm;
- var $el = Object(_util__WEBPACK_IMPORTED_MODULE_2__[/* findElm */ "a"])(component, pageVm);
- var root = options.relativeToSelector ? $el.querySelector(options.relativeToSelector) : null;
- var intersectionObserver = intersectionObservers[reqId] = new IntersectionObserver(function (entries, observer) {
- entries.forEach(function (entrie) {
- UniViewJSBridge.publishHandler('onRequestComponentObserver', {
- reqId: reqId,
- res: {
- intersectionRatio: entrie.intersectionRatio,
- intersectionRect: getRect(entrie.intersectionRect),
- boundingClientRect: getRect(entrie.boundingClientRect),
- relativeRect: getRect(entrie.rootBounds),
- time: Date.now(),
- dataset: Object(uni_helpers_index__WEBPACK_IMPORTED_MODULE_1__[/* normalizeDataset */ "c"])(entrie.target.dataset || {}),
- id: entrie.target.id
- }
- }, pageVm.$page.id);
- });
- }, {
- root: root,
- rootMargin: options.rootMargin,
- threshold: options.thresholds
- });
- if (options.observeAll) {
- intersectionObserver.USE_MUTATION_OBSERVER = true;
- Array.prototype.map.call($el.querySelectorAll(options.selector), function (el) {
- intersectionObserver.observe(el);
- });
- } else {
- intersectionObserver.USE_MUTATION_OBSERVER = false;
- intersectionObserver.observe($el.querySelector(options.selector));
- }
- }
- function destroyComponentObserver(_ref2) {
- var reqId = _ref2.reqId;
- var intersectionObserver = intersectionObservers[reqId];
- if (intersectionObserver) {
- intersectionObserver.disconnect();
- UniViewJSBridge.publishHandler('onRequestComponentObserver', {
- reqId: reqId,
- reqEnd: true
- });
- }
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 67 */
- /***/ (function(module, exports) {
- 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'];
- /***/ }),
- /* 68 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge, global) {/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
- /* harmony import */ var uni_platform_view_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88);
- /* 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__);
- /* harmony import */ var uni_platform_page_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58);
- /* harmony import */ var uni_platform_view_framework_page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59);
- /* harmony import */ var uni_platform_view_framework_plugins_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84);
- /* harmony import */ var _view_api_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(74);
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["a"]; });
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["b"]; });
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["c"]; });
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "d", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["d"]; });
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "e", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["e"]; });
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "f", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["f"]; });
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "g", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["g"]; });
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "h", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["h"]; });
- global.UniViewJSBridge = {
- publishHandler: UniViewJSBridge.publishHandler,
- subscribeHandler: UniViewJSBridge.subscribeHandler
- };
- global.getCurrentPages = uni_platform_view_framework_page__WEBPACK_IMPORTED_MODULE_3__[/* getCurrentPages */ "a"];
- global.__definePage = uni_platform_page_factory__WEBPACK_IMPORTED_MODULE_2__[/* definePage */ "a"];
- global.Vue = vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"];
- vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].use(uni_platform_view_framework_plugins_index__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]);
- __webpack_require__(152);
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4), __webpack_require__(16)))
- /***/ }),
- /* 69 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
- /* harmony default export */ __webpack_exports__["a"] = ({
- props: {
- id: {
- type: String,
- default: ''
- }
- },
- created: function created() {
- var _this = this;
- this._addListeners(this.id); // 初始化监听
- this.$watch('id', function (newId, oldId) {
- // watch id
- _this._removeListeners(oldId, true);
- _this._addListeners(newId, true);
- });
- },
- beforeDestroy: function beforeDestroy() {
- // 销毁时移除
- this._removeListeners(this.id);
- },
- methods: {
- _addListeners: function _addListeners(id, watch) {
- var _this2 = this;
- if (watch && !id) {
- // id被置空
- return;
- }
- var listeners = this.$options.listeners;
- if (!Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* isPlainObject */ "e"])(listeners)) {
- return;
- }
- Object.keys(listeners).forEach(function (name) {
- if (watch) {
- // watch id
- if (name.indexOf('@') !== 0 && name.indexOf('uni-') !== 0) {
- /* eslint-disable standard/computed-property-even-spacing */
- UniViewJSBridge.on("uni-".concat(name, "-").concat(_this2.$page.id, "-").concat(id), _this2[listeners[name]]);
- }
- } else {
- if (name.indexOf('@') === 0) {
- /* eslint-disable standard/computed-property-even-spacing */
- _this2.$on("uni-".concat(name.substr(1)), _this2[listeners[name]]);
- } else if (name.indexOf('uni-') === 0) {
- // 完全限定
- /* eslint-disable standard/computed-property-even-spacing */
- UniViewJSBridge.on(name, _this2[listeners[name]]);
- } else if (id) {
- // scoped
- /* eslint-disable standard/computed-property-even-spacing */
- UniViewJSBridge.on("uni-".concat(name, "-").concat(_this2.$page.id, "-").concat(id), _this2[listeners[name]]);
- }
- }
- });
- },
- _removeListeners: function _removeListeners(id, watch) {
- var _this3 = this;
- if (watch && !id) {
- // id之前不存在
- return;
- }
- var listeners = this.$options.listeners;
- if (!Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* isPlainObject */ "e"])(listeners)) {
- return;
- }
- Object.keys(listeners).forEach(function (name) {
- if (watch) {
- // watch id
- if (name.indexOf('@') !== 0 && name.indexOf('uni-') !== 0) {
- /* eslint-disable standard/computed-property-even-spacing */
- UniViewJSBridge.off("uni-".concat(name, "-").concat(_this3.$page.id, "-").concat(id), _this3[listeners[name]]);
- }
- } else {
- if (name.indexOf('@') === 0) {
- /* eslint-disable standard/computed-property-even-spacing */
- _this3.$off("uni-".concat(name.substr(1)), _this3[listeners[name]]);
- } else if (name.indexOf('uni-') === 0) {
- // 完全限定
- /* eslint-disable standard/computed-property-even-spacing */
- UniViewJSBridge.off(name, _this3[listeners[name]]);
- } else if (id) {
- // scoped
- /* eslint-disable standard/computed-property-even-spacing */
- UniViewJSBridge.off("uni-".concat(name, "-").concat(_this3.$page.id, "-").concat(id), _this3[listeners[name]]);
- }
- }
- });
- }
- }
- });
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 70 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
- /* harmony default export */ __webpack_exports__["a"] = ({
- // 取消id的定义,某些组件(canvas)内不在props内定义id
- // props: {
- // id: {
- // type: String,
- // default: ''
- // }
- // },
- mounted: function mounted() {
- var _this = this;
- this._toggleListeners('subscribe', this.id); // 初始化监听
- this.$watch('id', function (newId, oldId) {
- // watch id
- _this._toggleListeners('unsubscribe', oldId, true);
- _this._toggleListeners('subscribe', newId, true);
- });
- },
- beforeDestroy: function beforeDestroy() {
- // 销毁时移除
- this._toggleListeners('unsubscribe', this.id);
- if (this._contextId) {
- this._toggleListeners('unsubscribe', this._contextId);
- }
- },
- methods: {
- _toggleListeners: function _toggleListeners(type, id, watch) {
- if (watch && !id) {
- // id被置空
- return;
- }
- if (!Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* isFn */ "d"])(this._handleSubscribe)) {
- return;
- } // 纠正VUniVideo等组件命名为Video
- UniViewJSBridge[type](this.$page.id + '-' + this.$options.name.replace(/VUni([A-Z])/, '$1').toLowerCase() + '-' + id, this._handleSubscribe);
- },
- _getContextInfo: function _getContextInfo() {
- var id = "context-".concat(this._uid);
- if (!this._contextId) {
- this._toggleListeners('subscribe', id);
- this._contextId = id;
- }
- return {
- name: this.$options.name.replace(/VUni([A-Z])/, '$1').toLowerCase(),
- id: id,
- page: this.$page.id
- };
- }
- }
- });
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 71 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
- function hideKeyboard() {
- document.activeElement.blur();
- }
- /**
- * 保证iOS点击输入框外隐藏键盘
- */
- function iosHideKeyboard() {}
- /* harmony default export */ __webpack_exports__["a"] = ({
- name: 'Keyboard',
- props: {
- cursorSpacing: {
- type: [Number, String],
- default: 0
- },
- showConfirmBar: {
- type: [Boolean, String],
- default: 'auto'
- },
- adjustPosition: {
- type: Boolean,
- default: true
- }
- },
- watch: {
- focus: function focus(val) {
- if (val) {
- this.showSoftKeybord();
- }
- }
- },
- mounted: function mounted() {
- if (this.autoFocus || this.focus) {
- this.showSoftKeybord();
- }
- },
- beforeDestroy: function beforeDestroy() {
- this.onKeyboardHide();
- },
- methods: {
- initKeyboard: function initKeyboard(el) {
- var _this = this;
- el.addEventListener('focus', function () {
- _this.hideKeyboardTemp = function () {
- hideKeyboard();
- };
- UniViewJSBridge.subscribe('hideKeyboard', _this.hideKeyboardTemp);
- document.addEventListener('click', iosHideKeyboard, false);
- _this.setSoftinputNavBar();
- _this.setSoftinputTemporary();
- });
- el.addEventListener('blur', this.onKeyboardHide.bind(this));
- },
- showSoftKeybord: function showSoftKeybord() {
- Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* plusReady */ "g"])(function () {
- plus.key.showSoftKeybord();
- });
- },
- setSoftinputTemporary: function setSoftinputTemporary() {
- var _this2 = this;
- Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* plusReady */ "g"])(function () {
- var currentWebview = plus.webview.currentWebview();
- var style = currentWebview.getStyle() || {};
- var rect = _this2.$el.getBoundingClientRect();
- currentWebview.setSoftinputTemporary && currentWebview.setSoftinputTemporary({
- mode: style.softinputMode === 'adjustResize' ? 'adjustResize' : _this2.adjustPosition ? 'adjustPan' : 'nothing',
- position: {
- top: rect.top,
- height: rect.height + (Number(_this2.cursorSpacing) || 0)
- }
- });
- });
- },
- setSoftinputNavBar: function setSoftinputNavBar() {
- var _this3 = this;
- if (this.showConfirmBar === 'auto') {
- delete this.__softinputNavBar;
- return;
- }
- Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* plusReady */ "g"])(function () {
- var currentWebview = plus.webview.currentWebview();
- var _ref = currentWebview.getStyle() || {},
- softinputNavBar = _ref.softinputNavBar;
- var showConfirmBar = softinputNavBar !== 'none';
- if (showConfirmBar !== _this3.showConfirmBar) {
- _this3.__softinputNavBar = softinputNavBar || 'auto';
- currentWebview.setStyle({
- softinputNavBar: _this3.showConfirmBar ? 'auto' : 'none'
- });
- } else {
- delete _this3.__softinputNavBar;
- }
- });
- },
- resetSoftinputNavBar: function resetSoftinputNavBar() {
- var softinputNavBar = this.__softinputNavBar;
- if (softinputNavBar) {
- Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* plusReady */ "g"])(function () {
- var currentWebview = plus.webview.currentWebview();
- currentWebview.setStyle({
- softinputNavBar: softinputNavBar
- });
- });
- }
- },
- onKeyboardHide: function onKeyboardHide() {
- UniViewJSBridge.unsubscribe('hideKeyboard', this.hideKeyboardTemp);
- document.removeEventListener('click', iosHideKeyboard, false);
- this.resetSoftinputNavBar();
- }
- }
- });
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 72 */
- /***/ (function(module, exports, __webpack_require__) {
- exports.nextTick = function nextTick(fn) {
- var args = Array.prototype.slice.call(arguments);
- args.shift();
- setTimeout(function () {
- fn.apply(null, args);
- }, 0);
- };
- exports.platform = exports.arch =
- exports.execPath = exports.title = 'browser';
- exports.pid = 1;
- exports.browser = true;
- exports.env = {};
- exports.argv = [];
- exports.binding = function (name) {
- throw new Error('No such module. (Possibly not yet loaded)')
- };
- (function () {
- var cwd = '/';
- var path;
- exports.cwd = function () { return cwd };
- exports.chdir = function (dir) {
- if (!path) path = __webpack_require__(121);
- cwd = path.resolve(dir, cwd);
- };
- })();
- exports.exit = exports.kill =
- exports.umask = exports.dlopen =
- exports.uptime = exports.memoryUsage =
- exports.uvCounters = function() {};
- exports.features = {};
- /***/ }),
- /* 73 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return navigateTo; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return navigateBack; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return reLaunch; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return redirectTo; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return switchTab; });
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
- function invokeApi(method) {
- var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- UniViewJSBridge.publishHandler(_constants__WEBPACK_IMPORTED_MODULE_0__[/* INVOKE_API */ "b"], {
- data: {
- method: method,
- args: args
- },
- options: {
- timestamp: Date.now()
- }
- });
- }
- function navigateTo(args) {
- invokeApi('navigateTo', args);
- }
- function navigateBack(args) {
- invokeApi('navigateBack', args);
- }
- function reLaunch(args) {
- invokeApi('reLaunch', args);
- }
- function redirectTo(args) {
- invokeApi('redirectTo', args);
- }
- function switchTab(args) {
- invokeApi('switchTab', args);
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 74 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // EXPORTS
- __webpack_require__.d(__webpack_exports__, "h", function() { return /* reexport */ upx2px; });
- __webpack_require__.d(__webpack_exports__, "d", function() { return /* reexport */ api["b" /* navigateTo */]; });
- __webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ api["a" /* navigateBack */]; });
- __webpack_require__.d(__webpack_exports__, "e", function() { return /* reexport */ api["c" /* reLaunch */]; });
- __webpack_require__.d(__webpack_exports__, "f", function() { return /* reexport */ api["d" /* redirectTo */]; });
- __webpack_require__.d(__webpack_exports__, "g", function() { return /* reexport */ api["e" /* switchTab */]; });
- __webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ getSystemInfoSync; });
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ canIUse; });
- // CONCATENATED MODULE: ./src/core/service/api/base/upx2px.js
- var EPS = 1e-4;
- var BASE_DEVICE_WIDTH = 750;
- var isIOS = false;
- var deviceWidth = 0;
- var deviceDPR = 0;
- function checkDeviceWidth() {
- var _uni$getSystemInfoSyn = uni.getSystemInfoSync(),
- platform = _uni$getSystemInfoSyn.platform,
- pixelRatio = _uni$getSystemInfoSyn.pixelRatio,
- windowWidth = _uni$getSystemInfoSyn.windowWidth;
- deviceWidth = windowWidth;
- deviceDPR = pixelRatio;
- isIOS = platform === 'ios';
- }
- function upx2px(number, newDeviceWidth) {
- if (deviceWidth === 0) {
- checkDeviceWidth();
- }
- number = Number(number);
- if (number === 0) {
- return 0;
- }
- var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
- if (result < 0) {
- result = -result;
- }
- result = Math.floor(result + EPS);
- if (result === 0) {
- if (deviceDPR === 1 || !isIOS) {
- return 1;
- } else {
- return 0.5;
- }
- }
- return number < 0 ? -result : result;
- }
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/api/index.js
- var api = __webpack_require__(73);
- // EXTERNAL MODULE: ./src/platforms/app-plus/helpers/get-window-offset.js
- var get_window_offset = __webpack_require__(10);
- // EXTERNAL MODULE: ./node_modules/safe-area-insets/out/index.js
- var out = __webpack_require__(5);
- var out_default = /*#__PURE__*/__webpack_require__.n(out);
- // CONCATENATED MODULE: ./src/platforms/h5/service/api/device/get-system-info.js
- var ua = navigator.userAgent;
- /**
- * 是否安卓设备
- */
- var isAndroid = /android/i.test(ua);
- /**
- * 是否iOS设备
- */
- var get_system_info_isIOS = /iphone|ipad|ipod/i.test(ua);
- /**
- * 获取系统信息-同步
- */
- function getSystemInfoSync() {
- var screen = window.screen;
- var pixelRatio = window.devicePixelRatio;
- var screenWidth = screen.width;
- var screenHeight = screen.height;
- var windowWidth = Math.min(window.innerWidth, document.documentElement.clientWidth, screenWidth);
- var windowHeight = window.innerHeight;
- var language = navigator.language;
- var statusBarHeight = out_default.a.top;
- var osname;
- var osversion;
- var model;
- if (get_system_info_isIOS) {
- osname = 'iOS';
- var osversionFind = ua.match(/OS\s([\w_]+)\slike/);
- if (osversionFind) {
- osversion = osversionFind[1].replace(/_/g, '.');
- }
- var modelFind = ua.match(/\(([a-zA-Z]+);/);
- if (modelFind) {
- model = modelFind[1];
- }
- } else if (isAndroid) {
- osname = 'Android'; // eslint-disable-next-line no-useless-escape
- var _osversionFind = ua.match(/Android[\s/]([\w\.]+)[;\s]/);
- if (_osversionFind) {
- osversion = _osversionFind[1];
- }
- var infoFind = ua.match(/\((.+?)\)/);
- var infos = infoFind ? infoFind[1].split(';') : ua.split(' '); // eslint-disable-next-line no-useless-escape
- 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];
- for (var i = 0; i < infos.length; i++) {
- var info = infos[i];
- if (info.indexOf('Build') > 0) {
- model = info.split('Build')[0].trim();
- break;
- }
- var other = void 0;
- for (var o = 0; o < otherInfo.length; o++) {
- if (otherInfo[o].test(info)) {
- other = true;
- break;
- }
- }
- if (!other) {
- model = info.trim();
- break;
- }
- }
- } else {
- osname = 'Other';
- osversion = '0';
- }
- var system = "".concat(osname, " ").concat(osversion);
- var platform = osname.toLocaleLowerCase();
- var safeArea = {
- left: out_default.a.left,
- right: windowWidth - out_default.a.right,
- top: out_default.a.top,
- bottom: windowHeight - out_default.a.bottom,
- width: windowWidth - out_default.a.left - out_default.a.right,
- height: windowHeight - out_default.a.top - out_default.a.bottom
- };
- var _getWindowOffset = Object(get_window_offset["a" /* default */])(),
- windowTop = _getWindowOffset.top,
- windowBottom = _getWindowOffset.bottom;
- windowHeight -= windowTop;
- windowHeight -= windowBottom;
- return {
- windowTop: windowTop,
- windowBottom: windowBottom,
- windowWidth: windowWidth,
- windowHeight: windowHeight,
- pixelRatio: pixelRatio,
- screenWidth: screenWidth,
- screenHeight: screenHeight,
- language: language,
- statusBarHeight: statusBarHeight,
- system: system,
- platform: platform,
- model: model,
- safeArea: safeArea,
- safeAreaInsets: {
- top: out_default.a.top,
- right: out_default.a.right,
- bottom: out_default.a.bottom,
- left: out_default.a.left
- }
- };
- }
- /**
- * 获取系统信息-异步
- */
- function getSystemInfo() {
- return getSystemInfoSync();
- }
- // CONCATENATED MODULE: ./lib/app-plus/view-api.js
- function canIUse(schema) {
- if (schema === 'css.var') {
- return window.CSS && window.CSS.supports && window.CSS.supports('--a:0');
- }
- return true;
- }
- /***/ }),
- /* 75 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return requestComponentInfo; });
- /* harmony import */ var uni_helpers_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
- /* harmony import */ var uni_platform_helpers_get_window_offset__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
- /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56);
- function getRootInfo(fields) {
- var info = {};
- if (fields.id) {
- info.id = '';
- }
- if (fields.dataset) {
- info.dataset = {};
- }
- if (fields.rect) {
- info.left = 0;
- info.right = 0;
- info.top = 0;
- info.bottom = 0;
- }
- if (fields.size) {
- info.width = document.documentElement.clientWidth;
- info.height = document.documentElement.clientHeight;
- }
- if (fields.scrollOffset) {
- info.scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft || 0;
- info.scrollTop = document.documentElement.scrollTop || document.body.scrollTop || 0;
- }
- return info;
- }
- function getNodeInfo(el, fields) {
- var info = {};
- var _getWindowOffset = Object(uni_platform_helpers_get_window_offset__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(),
- top = _getWindowOffset.top;
- if (fields.id) {
- info.id = el.id;
- }
- if (fields.dataset) {
- info.dataset = Object(uni_helpers_index__WEBPACK_IMPORTED_MODULE_0__[/* normalizeDataset */ "c"])(el.dataset || {});
- }
- if (fields.rect || fields.size) {
- var rect = el.getBoundingClientRect();
- if (fields.rect) {
- info.left = rect.left;
- info.right = rect.right;
- info.top = rect.top - top;
- info.bottom = rect.bottom - top;
- }
- if (fields.size) {
- info.width = rect.width;
- info.height = rect.height;
- }
- } // TODO 组件 props
- if (fields.properties) {
- fields.properties.forEach(function (prop) {
- prop = prop.replace(/-([a-z])/g, function (e, t) {
- return t.toUpperCase();
- }); // props
- });
- }
- if (fields.scrollOffset) {
- if (el.tagName === 'UNI-SCROLL-VIEW' && el.__vue__ && el.__vue__.getScrollPosition) {
- Object.assign(info, el.__vue__.getScrollPosition());
- } else {
- info.scrollLeft = 0;
- info.scrollTop = 0;
- }
- }
- if (fields.context) {
- if (el.__vue__ && el.__vue__._getContextInfo) {
- info.context = el.__vue__._getContextInfo();
- }
- }
- return info;
- }
- function getNodesInfo(pageVm, component, selector, single, fields) {
- var $el = Object(_util__WEBPACK_IMPORTED_MODULE_2__[/* findElm */ "a"])(component, pageVm);
- if (!$el || $el && $el.nodeType === 8) {
- // Comment
- return single ? null : [];
- }
- if (single) {
- var node = $el.matches(selector) ? $el : $el.querySelector(selector);
- if (node) {
- return getNodeInfo(node, fields);
- }
- return null;
- } else {
- var infos = [];
- var nodeList = $el.querySelectorAll(selector);
- if (nodeList && nodeList.length) {
- infos = [].map.call(nodeList, function (node) {
- return getNodeInfo(node, fields);
- });
- }
- if ($el.matches(selector)) {
- infos.unshift(getNodeInfo($el, fields));
- }
- return infos;
- }
- }
- function requestComponentInfo(_ref, pageId) {
- var reqId = _ref.reqId,
- reqs = _ref.reqs;
- var pages = getCurrentPages(); // 跨平台时,View 层也应该实现该方法,举例 App 上,View 层的 getCurrentPages 返回长度为1的当前页面数组
- var page = pages.find(function (page) {
- return page.$page.id === pageId;
- });
- if (!page) {
- throw new Error("Not Found\uFF1APage[".concat(pageId, "]"));
- }
- var pageVm = page.$vm;
- var result = [];
- reqs.forEach(function (_ref2) {
- var component = _ref2.component,
- selector = _ref2.selector,
- single = _ref2.single,
- fields = _ref2.fields;
- if (component === 0) {
- result.push(getRootInfo(fields));
- } else {
- result.push(getNodesInfo(pageVm, component, selector, single, fields));
- }
- });
- UniViewJSBridge.publishHandler('onRequestComponentInfo', {
- reqId: reqId,
- res: result
- }, pageVm.$page.id);
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 76 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return loadFontFace; });
- function loadFontFace(_ref) {
- var options = _ref.options,
- callbackId = _ref.callbackId;
- var family = options.family,
- source = options.source,
- _options$desc = options.desc,
- desc = _options$desc === void 0 ? {} : _options$desc;
- var fonts = document.fonts;
- if (fonts) {
- var fontFace = new FontFace(family, source, desc);
- fontFace.load().then(function () {
- fonts.add(fontFace);
- UniViewJSBridge.publishHandler('onLoadFontFaceCallback', {
- callbackId: callbackId,
- data: {
- errMsg: 'loadFontFace:ok'
- }
- });
- }).catch(function (error) {
- UniViewJSBridge.publishHandler('onLoadFontFaceCallback', {
- callbackId: callbackId,
- data: {
- errMsg: "loadFontFace:fail ".concat(error)
- }
- });
- });
- } else {
- var style = document.createElement('style');
- 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, ";}");
- document.head.appendChild(style);
- UniViewJSBridge.publishHandler('onLoadFontFaceCallback', {
- callbackId: callbackId,
- data: {
- errMsg: 'loadFontFace:ok'
- }
- });
- }
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 77 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global, UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return initSubscribe; });
- /* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
- /* harmony import */ var uni_core_view_bridge_subscribe_scroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
- var passiveOptions = uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* supportsPassive */ "h"] ? {
- passive: false
- } : false;
- function onCssVar(_ref) {
- var statusbarHeight = _ref.statusbarHeight,
- windowTop = _ref.windowTop,
- windowBottom = _ref.windowBottom;
- global.__WINDOW_TOP = windowTop;
- global.__WINDOW_BOTTOM = windowBottom;
- if (uni.canIUse('css.var')) {
- var style = document.documentElement.style;
- style.setProperty('--window-top', windowTop + 'px');
- style.setProperty('--window-bottom', windowBottom + 'px');
- style.setProperty('--status-bar-height', statusbarHeight + 'px');
- if (true) {
- console.log("--status-bar-height=".concat(statusbarHeight));
- console.log("--window-top=".concat(windowTop));
- console.log("--window-bottom=".concat(windowBottom));
- }
- }
- }
- function onPageCreate(_ref2, pageId) {
- var statusbarHeight = _ref2.statusbarHeight,
- windowTop = _ref2.windowTop,
- windowBottom = _ref2.windowBottom,
- disableScroll = _ref2.disableScroll,
- onPageScroll = _ref2.onPageScroll,
- onPageReachBottom = _ref2.onPageReachBottom,
- onReachBottomDistance = _ref2.onReachBottomDistance;
- onCssVar({
- statusbarHeight: statusbarHeight,
- windowTop: windowTop,
- windowBottom: windowBottom
- });
- if (disableScroll) {
- document.addEventListener('touchmove', uni_core_view_bridge_subscribe_scroll__WEBPACK_IMPORTED_MODULE_1__[/* disableScroll */ "b"], passiveOptions);
- } else if (onPageScroll || onPageReachBottom) {
- requestAnimationFrame(function () {
- // 避免监听太早,直接触发了 scroll
- document.addEventListener('scroll', Object(uni_core_view_bridge_subscribe_scroll__WEBPACK_IMPORTED_MODULE_1__[/* createScrollListener */ "a"])(pageId, {
- enablePageScroll: onPageScroll,
- enablePageReachBottom: onPageReachBottom,
- onReachBottomDistance: onReachBottomDistance
- }));
- });
- }
- }
- function onWebviewReady() {
- // service 主动发起检测
- UniViewJSBridge.publishHandler('webviewReady');
- }
- function initSubscribe(subscribe) {
- subscribe(_constants__WEBPACK_IMPORTED_MODULE_3__[/* WEBVIEW_READY */ "k"], onWebviewReady);
- subscribe(_constants__WEBPACK_IMPORTED_MODULE_2__[/* ON_PAGE_CREATE */ "a"], onPageCreate);
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(16), __webpack_require__(4)))
- /***/ }),
- /* 78 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_helpers_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
- /* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
- /* harmony import */ var _behaviors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85);
- /* harmony import */ var _wxs_component_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(79);
- function pageMounted() {
- // 通知 Service,View 层已 ready
- UniViewJSBridge.publishHandler('onPageReady', {}, this.$page.id);
- }
- /**
- * View 层 Vue 插件
- * 1.init events
- * 2.$trigger
- * 3.$handleProxy
- */
- /* harmony default export */ __webpack_exports__["a"] = ({
- install: function install(Vue) {
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
- routes = _ref.routes;
- Object(_events__WEBPACK_IMPORTED_MODULE_1__[/* initEvents */ "a"])();
- var findUniTarget = function findUniTarget($event, $el) {
- var target = $event.target;
- for (; target && target !== $el; target = target.parentNode) {
- if (target.tagName && target.tagName.indexOf('UNI-') === 0) {
- break;
- }
- }
- return target;
- };
- Vue.prototype.$handleEvent = function ($event) {
- if ($event instanceof Event) {
- // 未处理的 event 对象 需要对 target 校正及包装
- // 查找 uniTarget
- var target = findUniTarget($event, this.$el);
- $event = _events__WEBPACK_IMPORTED_MODULE_1__[/* processEvent */ "b"].call(this, $event.type, $event, {}, target || $event.target, $event.currentTarget);
- }
- return $event;
- };
- Vue.prototype.$getComponentDescriptor = function (vm, isOwnerInstance) {
- return Object(_wxs_component_descriptor__WEBPACK_IMPORTED_MODULE_3__[/* createComponentDescriptor */ "a"])(vm || this, isOwnerInstance);
- };
- Vue.prototype.$handleWxsEvent = function ($event) {
- if ($event instanceof Event) {
- // 未处理的 event 对象 需要对 target 校正及包装
- var currentTarget = $event.currentTarget;
- var instance = currentTarget && currentTarget.__vue__ && currentTarget.__vue__.$getComponentDescriptor(currentTarget.__vue__, false);
- $event = _events__WEBPACK_IMPORTED_MODULE_1__[/* processEvent */ "b"].call(this, $event.type, $event, {}, findUniTarget($event, this.$el) || $event.target, $event.currentTarget);
- $event.instance = instance;
- }
- return $event;
- };
- Vue.mixin({
- beforeCreate: function beforeCreate() {
- var _this = this;
- var options = this.$options;
- var wxs = options.wxs;
- if (wxs) {
- Object.keys(wxs).forEach(function (module) {
- _this[module] = wxs[module];
- });
- }
- if (options.behaviors && options.behaviors.length) {
- Object(_behaviors__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(options, this);
- }
- if (Object(uni_helpers_index__WEBPACK_IMPORTED_MODULE_0__[/* isPage */ "b"])(this)) {
- options.mounted = options.mounted ? [].concat(pageMounted, options.mounted) : [pageMounted];
- }
- }
- }); // TODO 跨平台时,View 层需要注入$page属性
- }
- });
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 79 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge, global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createComponentDescriptor; });
- /* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- 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); } }
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
- var CLASS_RE = /^\s+|\s+$/g;
- var WXS_CLASS_RE = /\s+/;
- function getWxsClsArr(clsArr, classList, isAdd) {
- var wxsClsArr = [];
- var _checkClassList = function checkClassList(cls) {
- if (isAdd) {
- _checkClassList = function checkClassList(cls) {
- return !classList.contains(cls);
- };
- } else {
- _checkClassList = function checkClassList(cls) {
- return classList.contains(cls);
- };
- }
- return _checkClassList(cls);
- };
- clsArr.forEach(function (cls) {
- cls = cls.replace(CLASS_RE, '');
- _checkClassList(cls) && wxsClsArr.push(cls);
- });
- return wxsClsArr;
- }
- function parseStyleText(cssText) {
- var res = {};
- var listDelimiter = /;(?![^(]*\))/g;
- var propertyDelimiter = /:(.+)/;
- cssText.split(listDelimiter).forEach(function (item) {
- if (item) {
- var tmp = item.split(propertyDelimiter);
- tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
- }
- });
- return res;
- }
- var ComponentDescriptor = /*#__PURE__*/function () {
- function ComponentDescriptor(vm) {
- _classCallCheck(this, ComponentDescriptor);
- this.$vm = vm;
- this.$el = vm.$el;
- }
- _createClass(ComponentDescriptor, [{
- key: "selectComponent",
- value: function selectComponent(selector) {
- if (!this.$el || !selector) {
- return;
- }
- var el = this.$el.querySelector(selector);
- return el && el.__vue__ && createComponentDescriptor(el.__vue__, false);
- }
- }, {
- key: "selectAllComponents",
- value: function selectAllComponents(selector) {
- if (!this.$el || !selector) {
- return [];
- }
- var descriptors = [];
- var els = this.$el.querySelectorAll(selector);
- for (var i = 0; i < els.length; i++) {
- var el = els[i];
- el.__vue__ && descriptors.push(createComponentDescriptor(el.__vue__, false));
- }
- return descriptors;
- }
- }, {
- key: "setStyle",
- value: function setStyle(style) {
- if (!this.$el || !style) {
- return this;
- }
- if (typeof style === 'string') {
- style = parseStyleText(style);
- }
- if (Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* isPlainObject */ "e"])(style)) {
- this.$el.__wxsStyle = style;
- this.$vm.$forceUpdate();
- }
- return this;
- }
- }, {
- key: "addClass",
- value: function addClass() {
- for (var _len = arguments.length, clsArr = new Array(_len), _key = 0; _key < _len; _key++) {
- clsArr[_key] = arguments[_key];
- }
- if (!this.$el || !clsArr.length) {
- return this;
- }
- var wxsClsArr = getWxsClsArr(clsArr, this.$el.classList, true);
- if (wxsClsArr.length) {
- var wxsClass = this.$el.__wxsAddClass || '';
- this.$el.__wxsAddClass = wxsClass + (wxsClass ? ' ' : '') + wxsClsArr.join(' ');
- this.$vm.$forceUpdate();
- }
- return this;
- }
- }, {
- key: "removeClass",
- value: function removeClass() {
- for (var _len2 = arguments.length, clsArr = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
- clsArr[_key2] = arguments[_key2];
- }
- if (!this.$el || !clsArr.length) {
- return this;
- }
- var classList = this.$el.classList;
- var addWxsClsArr = this.$el.__wxsAddClass ? this.$el.__wxsAddClass.split(WXS_CLASS_RE) : [];
- var wxsClsArr = getWxsClsArr(clsArr, classList, false);
- if (wxsClsArr.length) {
- var removeWxsClsArr = [];
- wxsClsArr.forEach(function (cls) {
- var clsIndex = addWxsClsArr.findIndex(function (oldCls) {
- return oldCls === cls;
- });
- if (clsIndex !== -1) {
- // 在 addWxsClass 中
- addWxsClsArr.splice(clsIndex, 1);
- }
- removeWxsClsArr.push(cls);
- });
- this.$el.__wxsRemoveClass = removeWxsClsArr;
- this.$el.__wxsAddClass = addWxsClsArr.join(' ');
- this.$vm.$forceUpdate();
- }
- return this;
- }
- }, {
- key: "hasClass",
- value: function hasClass(cls) {
- return this.$el && this.$el.classList.contains(cls);
- }
- }, {
- key: "getDataset",
- value: function getDataset() {
- return this.$el && this.$el.dataset;
- }
- }, {
- key: "callMethod",
- value: function callMethod(funcName) {
- var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- if (this.$vm[funcName]) {
- this.$vm[funcName](JSON.parse(JSON.stringify(args)));
- } else if (this.$vm._$id) {
- UniViewJSBridge.publishHandler('onWxsInvokeCallMethod', {
- cid: this.$vm._$id,
- method: funcName,
- args: args
- });
- }
- }
- }, {
- key: "requestAnimationFrame",
- value: function requestAnimationFrame(callback) {
- return global.requestAnimationFrame(callback), this;
- }
- }, {
- key: "getState",
- value: function getState() {
- return this.$el && (this.$el.__wxsState || (this.$el.__wxsState = {}));
- }
- }, {
- key: "triggerEvent",
- value: function triggerEvent(eventName) {
- var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- // TODO options
- return this.$vm.$emit(eventName, detail), this;
- }
- }]);
- return ComponentDescriptor;
- }();
- function createComponentDescriptor(vm) {
- var isOwnerInstance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
- if (isOwnerInstance && vm && vm.$options.name && vm.$options.name.indexOf('VUni') === 0) {
- // ownerInstance 内置组件需要使用父 vm
- vm = vm.$parent;
- }
- if (vm && vm.$el) {
- if (!vm.$el.__wxsComponentDescriptor) {
- vm.$el.__wxsComponentDescriptor = new ComponentDescriptor(vm);
- }
- return vm.$el.__wxsComponentDescriptor;
- }
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4), __webpack_require__(16)))
- /***/ }),
- /* 80 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VDomSync; });
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
- /* harmony import */ var _helpers_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81);
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
- function _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); }
- 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; }
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- 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); } }
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
- function findParent(vm) {
- var parent = vm.$parent;
- while (parent) {
- if (parent._$id) {
- return parent;
- }
- parent = parent.$parent;
- }
- }
- var VDomSync = /*#__PURE__*/function () {
- function VDomSync(pageId) {
- _classCallCheck(this, VDomSync);
- this.pageId = pageId;
- this.addBatchVData = Object.create(null);
- this.updateBatchVData = [];
- this.vms = Object.create(null);
- }
- _createClass(VDomSync, [{
- key: "addVData",
- value: function addVData(cid) {
- var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- this.addBatchVData[cid] = [data, options];
- }
- }, {
- key: "updateVData",
- value: function updateVData(cid) {
- var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- this.updateBatchVData.push([cid, data]);
- }
- }, {
- key: "initVm",
- value: function initVm(vm) {
- vm._$id = Object(_helpers_util__WEBPACK_IMPORTED_MODULE_1__[/* generateId */ "a"])(vm, findParent(vm));
- var vData = this.addBatchVData[vm._$id];
- if (!vData) {
- console.error('cid unmatched', vm);
- vData = {
- data: {},
- options: {}
- };
- } else {
- delete this.addBatchVData[vm._$id];
- }
- var _vData = vData,
- _vData2 = _slicedToArray(_vData, 2),
- data = _vData2[0],
- options = _vData2[1];
- Object.assign(vm.$options, options);
- vm.$r = data || Object.create(null);
- this.vms[vm._$id] = vm;
- }
- }, {
- key: "sendUIEvent",
- value: function sendUIEvent(cid, nid, event) {
- UniViewJSBridge.publishHandler(_constants__WEBPACK_IMPORTED_MODULE_0__[/* VD_SYNC */ "h"], {
- data: [[_constants__WEBPACK_IMPORTED_MODULE_0__[/* UI_EVENT */ "f"], [[cid, nid, event]]]],
- options: {
- timestamp: Date.now()
- }
- });
- }
- }, {
- key: "clearAddBatchVData",
- value: function clearAddBatchVData() {
- if (true) {
- if (Object.keys(this.addBatchVData).length) {
- console.error('this.addBatchVData...=' + JSON.stringify(this.addBatchVData));
- }
- }
- this.addBatchVData = Object.create(null);
- }
- }, {
- key: "flush",
- value: function flush() {
- var _this = this;
- this.updateBatchVData.forEach(function (_ref) {
- var _ref2 = _slicedToArray(_ref, 2),
- cid = _ref2[0],
- data = _ref2[1];
- var vm = _this.vms[cid];
- if (!vm) {
- return console.error("Not found ".concat(cid));
- }
- Object.keys(data).forEach(function (cid) {
- Object.assign(vm.$r[cid] || (vm.$r[cid] = Object.create(null)), data[cid]);
- });
- vm.$forceUpdate();
- });
- this.updateBatchVData.length = 0;
- }
- }]);
- return VDomSync;
- }();
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
- /***/ }),
- /* 81 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return generateId; });
- function generateId(vm, parent) {
- if (!vm.$parent) {
- return '-1';
- }
- var vnode = vm.$vnode;
- var context = vnode.context; // slot 内的组件,需要补充 context 的 id,否则可能与内部组件索引值一致,导致 id 冲突
- if (context && context !== parent && context._$id) {
- if (true) {
- console.log('generateId:' + context._$id + ';' + parent._$id + ',' + vnode.data.attrs._i);
- }
- return context._$id + ';' + parent._$id + ',' + vnode.data.attrs._i;
- }
- return parent._$id + ',' + vnode.data.attrs._i;
- }
- /***/ }),
- /* 82 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return showPage; });
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- 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); } }
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
- 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); }
- var plus_;
- var weex_;
- var BroadcastChannel_;
- function getRuntime() {
- return (typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object' && (typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) === 'object' && (typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object' ? 'webview' : 'v8';
- }
- function getPageId() {
- return plus_.webview.currentWebview().id;
- }
- var channel;
- var globalEvent;
- var callbacks = {};
- function onPlusMessage(res) {
- var message = res.data && res.data.__message;
- if (!message || !message.__page) {
- return;
- }
- var pageId = message.__page;
- var callback = callbacks[pageId];
- callback && callback(message);
- if (!message.keep) {
- delete callbacks[pageId];
- }
- }
- function addEventListener(pageId, callback) {
- if (getRuntime() === 'v8') {
- if (BroadcastChannel_) {
- channel && channel.close();
- channel = new BroadcastChannel_(getPageId());
- channel.onmessage = onPlusMessage;
- } else if (!globalEvent) {
- globalEvent = weex_.requireModule('globalEvent');
- globalEvent.addEventListener('plusMessage', onPlusMessage);
- }
- } else {
- window.__plusMessage = onPlusMessage;
- }
- callbacks[pageId] = callback;
- }
- var Page = /*#__PURE__*/function () {
- function Page(webview) {
- _classCallCheck(this, Page);
- this.webview = webview;
- }
- _createClass(Page, [{
- key: "sendMessage",
- value: function sendMessage(data) {
- var message = {
- __message: {
- data: data
- }
- };
- var id = this.webview.id;
- if (BroadcastChannel_) {
- var _channel = new BroadcastChannel_(id);
- _channel.postMessage(message);
- } else {
- plus_.webview.postMessageToUniNView(message, id);
- }
- }
- }, {
- key: "close",
- value: function close() {
- this.webview.close();
- }
- }]);
- return Page;
- }();
- function showPage(_ref) {
- var _ref$context = _ref.context,
- context = _ref$context === void 0 ? {} : _ref$context,
- url = _ref.url,
- _ref$data = _ref.data,
- data = _ref$data === void 0 ? {} : _ref$data,
- _ref$style = _ref.style,
- style = _ref$style === void 0 ? {} : _ref$style,
- onMessage = _ref.onMessage,
- onClose = _ref.onClose;
- // eslint-disable-next-line
- plus_ = context.plus || plus; // eslint-disable-next-line
- weex_ = context.weex || ((typeof weex === "undefined" ? "undefined" : _typeof(weex)) === 'object' ? weex : null); // eslint-disable-next-line
- BroadcastChannel_ = context.BroadcastChannel || ((typeof BroadcastChannel === "undefined" ? "undefined" : _typeof(BroadcastChannel)) === 'object' ? BroadcastChannel : null);
- var titleNView = {
- autoBackButton: true,
- titleSize: '17px'
- };
- var pageId = "page".concat(Date.now());
- style = Object.assign({}, style);
- if (style.titleNView !== false && style.titleNView !== 'none') {
- style.titleNView = Object.assign(titleNView, style.titleNView);
- }
- var defaultStyle = {
- top: 0,
- bottom: 0,
- usingComponents: {},
- popGesture: 'close',
- scrollIndicator: 'none',
- animationType: 'pop-in',
- animationDuration: 200,
- uniNView: {
- 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"),
- defaultFontSize: plus_.screen.resolutionWidth / 20,
- viewport: plus_.screen.resolutionWidth
- }
- };
- style = Object.assign(defaultStyle, style);
- var page = plus_.webview.create('', pageId, style, {
- extras: {
- from: getPageId(),
- runtime: getRuntime(),
- data: data,
- useGlobalEvent: !BroadcastChannel_
- }
- });
- page.addEventListener('close', onClose);
- addEventListener(pageId, function (message) {
- if (typeof onMessage === 'function') {
- onMessage(message.data);
- }
- if (!message.keep) {
- page.close('auto');
- }
- });
- page.show(style.animationType, style.animationDuration);
- return new Page(page);
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(72)))
- /***/ }),
- /* 83 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // EXPORTS
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ register; });
- // CONCATENATED MODULE: ./src/core/view/components/editor/formats/divider.js
- 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); }
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- 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); }
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
- 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); }; }
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
- 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; } }
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
- /* harmony default export */ var divider = (function (Quill) {
- var BlockEmbed = Quill.import('blots/block/embed');
- var Divider = /*#__PURE__*/function (_BlockEmbed) {
- _inherits(Divider, _BlockEmbed);
- var _super = _createSuper(Divider);
- function Divider() {
- _classCallCheck(this, Divider);
- return _super.apply(this, arguments);
- }
- return Divider;
- }(BlockEmbed);
- Divider.blotName = 'divider';
- Divider.tagName = 'HR';
- return {
- 'formats/divider': Divider
- };
- });
- // CONCATENATED MODULE: ./src/core/view/components/editor/formats/ins.js
- 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); }
- function ins_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- 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); }
- function ins_setPrototypeOf(o, p) { ins_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return ins_setPrototypeOf(o, p); }
- 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); }; }
- function ins_possibleConstructorReturn(self, call) { if (call && (ins_typeof(call) === "object" || typeof call === "function")) { return call; } return ins_assertThisInitialized(self); }
- function ins_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
- 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; } }
- function ins_getPrototypeOf(o) { ins_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return ins_getPrototypeOf(o); }
- /* harmony default export */ var ins = (function (Quill) {
- var Inline = Quill.import('blots/inline');
- var Ins = /*#__PURE__*/function (_Inline) {
- ins_inherits(Ins, _Inline);
- var _super = ins_createSuper(Ins);
- function Ins() {
- ins_classCallCheck(this, Ins);
- return _super.apply(this, arguments);
- }
- return Ins;
- }(Inline);
- Ins.blotName = 'ins';
- Ins.tagName = 'INS';
- return {
- 'formats/ins': Ins
- };
- });
- // CONCATENATED MODULE: ./src/core/view/components/editor/formats/align.js
- /* harmony default export */ var align = (function (Quill) {
- var _Quill$import = Quill.import('parchment'),
- Scope = _Quill$import.Scope,
- Attributor = _Quill$import.Attributor;
- var config = {
- scope: Scope.BLOCK,
- whitelist: ['left', 'right', 'center', 'justify']
- };
- var AlignStyle = new Attributor.Style('align', 'text-align', config);
- return {
- 'formats/align': AlignStyle
- };
- });
- // CONCATENATED MODULE: ./src/core/view/components/editor/formats/direction.js
- /* harmony default export */ var direction = (function (Quill) {
- var _Quill$import = Quill.import('parchment'),
- Scope = _Quill$import.Scope,
- Attributor = _Quill$import.Attributor;
- var config = {
- scope: Scope.BLOCK,
- whitelist: ['rtl']
- };
- var DirectionStyle = new Attributor.Style('direction', 'direction', config);
- return {
- 'formats/direction': DirectionStyle
- };
- });
- // CONCATENATED MODULE: ./src/core/view/components/editor/formats/list.js
- 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); }
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
- function list_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- 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); } }
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
- 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); }
- function list_setPrototypeOf(o, p) { list_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return list_setPrototypeOf(o, p); }
- 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); }; }
- function list_possibleConstructorReturn(self, call) { if (call && (list_typeof(call) === "object" || typeof call === "function")) { return call; } return list_assertThisInitialized(self); }
- function list_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
- 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; } }
- 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); }
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = list_getPrototypeOf(object); if (object === null) break; } return object; }
- function list_getPrototypeOf(o) { list_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return list_getPrototypeOf(o); }
- /* harmony default export */ var list = (function (Quill) {
- var Parchment = Quill.import('parchment');
- var Container = Quill.import('blots/container');
- var ListItem = Quill.import('formats/list/item');
- var List = /*#__PURE__*/function (_Container) {
- list_inherits(List, _Container);
- var _super = list_createSuper(List);
- _createClass(List, null, [{
- key: "create",
- value: function create(value) {
- var tagName = value === 'ordered' ? 'OL' : 'UL';
- var node = _get(list_getPrototypeOf(List), "create", this).call(this, tagName);
- if (value === 'checked' || value === 'unchecked') {
- node.setAttribute('data-checked', value === 'checked');
- }
- return node;
- }
- }, {
- key: "formats",
- value: function formats(domNode) {
- if (domNode.tagName === 'OL') return 'ordered';
- if (domNode.tagName === 'UL') {
- if (domNode.hasAttribute('data-checked')) {
- return domNode.getAttribute('data-checked') === 'true' ? 'checked' : 'unchecked';
- } else {
- return 'bullet';
- }
- }
- return undefined;
- }
- }]);
- function List(domNode) {
- var _this;
- list_classCallCheck(this, List);
- _this = _super.call(this, domNode);
- var listEventHandler = function listEventHandler(e) {
- if (e.target.parentNode !== domNode) return;
- var format = _this.statics.formats(domNode);
- var blot = Parchment.find(e.target);
- if (format === 'checked') {
- blot.format('list', 'unchecked');
- } else if (format === 'unchecked') {
- blot.format('list', 'checked');
- }
- };
- domNode.addEventListener('click', listEventHandler);
- return _this;
- }
- _createClass(List, [{
- key: "format",
- value: function format(name, value) {
- if (this.children.length > 0) {
- this.children.tail.format(name, value);
- }
- }
- }, {
- key: "formats",
- value: function formats() {
- // We don't inherit from FormatBlot
- return _defineProperty({}, this.statics.blotName, this.statics.formats(this.domNode));
- }
- }, {
- key: "insertBefore",
- value: function insertBefore(blot, ref) {
- if (blot instanceof ListItem) {
- _get(list_getPrototypeOf(List.prototype), "insertBefore", this).call(this, blot, ref);
- } else {
- var index = ref == null ? this.length() : ref.offset(this);
- var after = this.split(index);
- after.parent.insertBefore(blot, after);
- }
- }
- }, {
- key: "optimize",
- value: function optimize(context) {
- _get(list_getPrototypeOf(List.prototype), "optimize", this).call(this, context);
- var next = this.next;
- 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')) {
- next.moveChildren(this);
- next.remove();
- }
- }
- }, {
- key: "replace",
- value: function replace(target) {
- if (target.statics.blotName !== this.statics.blotName) {
- var item = Parchment.create(this.statics.defaultChild);
- target.moveChildren(item);
- this.appendChild(item);
- }
- _get(list_getPrototypeOf(List.prototype), "replace", this).call(this, target);
- }
- }]);
- return List;
- }(Container);
- List.blotName = 'list';
- List.scope = Parchment.Scope.BLOCK_BLOT;
- List.tagName = ['OL', 'UL'];
- List.defaultChild = 'list-item';
- List.allowedChildren = [ListItem];
- return {
- 'formats/list': List
- };
- });
- // CONCATENATED MODULE: ./src/core/view/components/editor/formats/background.js
- /* harmony default export */ var background = (function (Quill) {
- var _Quill$import = Quill.import('parchment'),
- Scope = _Quill$import.Scope;
- var BackgroundStyle = Quill.import('formats/background');
- var BackgroundColorStyle = new BackgroundStyle.constructor('backgroundColor', 'background-color', {
- scope: Scope.INLINE
- });
- return {
- 'formats/backgroundColor': BackgroundColorStyle
- };
- });
- // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
- var shared = __webpack_require__(1);
- // CONCATENATED MODULE: ./src/core/view/components/editor/formats/box.js
- /* harmony default export */ var box = (function (Quill) {
- var _Quill$import = Quill.import('parchment'),
- Scope = _Quill$import.Scope,
- Attributor = _Quill$import.Attributor;
- var config = {
- scope: Scope.BLOCK
- };
- var margin = ['margin', 'marginTop', 'marginBottom', 'marginLeft', 'marginRight'];
- var padding = ['padding', 'paddingTop', 'paddingBottom', 'paddingLeft', 'paddingRight'];
- var result = {};
- margin.concat(padding).forEach(function (name) {
- result["formats/".concat(name)] = new Attributor.Style(name, Object(shared["f" /* kebabCase */])(name), config);
- });
- return result;
- });
- // CONCATENATED MODULE: ./src/core/view/components/editor/formats/font.js
- /* harmony default export */ var formats_font = (function (Quill) {
- var _Quill$import = Quill.import('parchment'),
- Scope = _Quill$import.Scope,
- Attributor = _Quill$import.Attributor;
- var config = {
- scope: Scope.INLINE
- };
- var font = ['font', 'fontSize', 'fontStyle', 'fontVariant', 'fontWeight', 'fontFamily'];
- var result = {};
- font.forEach(function (name) {
- result["formats/".concat(name)] = new Attributor.Style(name, Object(shared["f" /* kebabCase */])(name), config);
- });
- return result;
- });
- // CONCATENATED MODULE: ./src/core/view/components/editor/formats/text.js
- /* harmony default export */ var formats_text = (function (Quill) {
- var _Quill$import = Quill.import('parchment'),
- Scope = _Quill$import.Scope,
- Attributor = _Quill$import.Attributor;
- var text = [{
- name: 'lineHeight',
- scope: Scope.BLOCK
- }, {
- name: 'letterSpacing',
- scope: Scope.INLINE
- }, {
- name: 'textDecoration',
- scope: Scope.INLINE
- }, {
- name: 'textIndent',
- scope: Scope.BLOCK
- }];
- var result = {};
- text.forEach(function (_ref) {
- var name = _ref.name,
- scope = _ref.scope;
- result["formats/".concat(name)] = new Attributor.Style(name, Object(shared["f" /* kebabCase */])(name), {
- scope: scope
- });
- });
- return result;
- });
- // CONCATENATED MODULE: ./src/core/view/components/editor/formats/image.js
- /* harmony default export */ var formats_image = (function (Quill) {
- var Image = Quill.import('formats/image');
- Image.sanitize = function (url) {
- return url;
- };
- });
- // CONCATENATED MODULE: ./src/core/view/components/editor/formats/index.js
- function register(Quill) {
- var formats = {
- divider: divider,
- ins: ins,
- align: align,
- direction: direction,
- list: list,
- background: background,
- box: box,
- font: formats_font,
- text: formats_text,
- image: formats_image
- };
- var options = {};
- Object.values(formats).forEach(function (value) {
- return Object.assign(options, value(Quill));
- });
- Quill.register(options, true);
- }
- /***/ }),
- /* 84 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // EXTERNAL MODULE: ./src/core/helpers/tags.js
- var tags = __webpack_require__(67);
- var tags_default = /*#__PURE__*/__webpack_require__.n(tags);
- // EXTERNAL MODULE: ./src/core/helpers/index.js
- var helpers = __webpack_require__(6);
- // CONCATENATED MODULE: ./src/core/vue.js
- // 使用白名单过滤(前期有一批自定义组件使用了 uni-)
- function initVue(Vue) {
- Vue.config.errorHandler = function (err) {
- var app = typeof getApp === 'function' && getApp();
- if (app && Object(helpers["a" /* hasLifecycleHook */])(app.$options, 'onError')) {
- app.__call_hook('onError', err);
- } else {
- console.error(err);
- }
- };
- var oldIsReservedTag = Vue.config.isReservedTag;
- Vue.config.isReservedTag = function (tag) {
- return tags_default.a.indexOf(tag) !== -1 || oldIsReservedTag(tag);
- };
- Vue.config.ignoredElements = tags_default.a;
- var oldGetTagNamespace = Vue.config.getTagNamespace;
- var conflictTags = ['switch', 'image', 'text', 'view'];
- Vue.config.getTagNamespace = function (tag) {
- if (~conflictTags.indexOf(tag)) {
- // svg 部分标签名称与 uni 标签冲突
- return false;
- }
- return oldGetTagNamespace(tag) || false;
- };
- }
- // EXTERNAL MODULE: ./src/core/view/plugins/index.js
- var plugins = __webpack_require__(78);
- // EXTERNAL MODULE: ./src/platforms/app-plus/helpers/get-real-path.js + 1 modules
- var get_real_path = __webpack_require__(65);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/framework/plugins/data.js
- var data = __webpack_require__(14);
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/framework/plugins/event.js
- function initEvent(Vue) {
- // 部分组件内部使用了$page
- Object.defineProperty(Vue.prototype, '$page', {
- get: function get() {
- return getCurrentPages()[0].$page;
- }
- });
- Vue.prototype.$handleVModelEvent = function (nid, value) {
- data["b" /* vd */].sendUIEvent(this._$id, nid, {
- type: 'input',
- target: {
- value: value
- }
- });
- };
- Vue.prototype.$handleViewEvent = function ($vueEvent) {
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- // const isCustomEvent = $vueEvent._processed // 自定义事件已提前处理过
- if (options.stop) {
- $vueEvent.stopPropagation();
- }
- if (options.prevent) {
- $vueEvent.preventDefault();
- }
- var $event = this.$handleEvent($vueEvent);
- var cid = this._$id;
- var currentTarget = $vueEvent.$origCurrentTarget || $vueEvent.currentTarget; // 当自定义组件根节点触发事件时,nid 补充前缀,避免与组件内部 nid 冲突(根组件page不需要)
- var nid = (currentTarget === this.$el && this.$options.mpType !== 'page' ? 'r-' : '') + $event.options.nid;
- if (typeof nid === 'undefined') {
- return console.error("[".concat(cid, "] nid not found"));
- } // 移除无用属性
- delete $event._processed;
- delete $event.mp;
- delete $event.preventDefault;
- delete $event.stopPropagation;
- delete $event.options;
- delete $event.$origCurrentTarget; // 实时发送,延迟的话,会导致 touch 类事件被合并,影响实际业务逻辑,比如 touchstart 中修改变量为 true,touchend 修改为 false
- data["b" /* vd */].sendUIEvent(cid, nid, $event);
- };
- }
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/framework/plugins/index.js
- /* harmony default export */ var framework_plugins = __webpack_exports__["a"] = ({
- install: function install(Vue, options) {
- if (true) {
- Vue.config.productionTip = false;
- Vue.config.performance = true;
- }
- Vue.prototype._$getRealPath = get_real_path["a" /* default */];
- initVue(Vue);
- plugins["a" /* default */].install(Vue, options);
- Object(data["a" /* initData */])(Vue);
- initEvent(Vue);
- }
- });
- /***/ }),
- /* 85 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // EXPORTS
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ initBehaviors; });
- // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
- var shared = __webpack_require__(1);
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // CONCATENATED MODULE: ./src/core/view/plugins/behaviors/form-field.js
- /**
- * uni://form-field
- */
- function created() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'add',
- vm: this
- });
- }
- function beforeDestroy() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'remove',
- vm: this
- });
- }
- /* harmony default export */ var form_field = ({
- name: 'uni://form-field',
- init: function init(options, vm) {
- if (!vm.constructor.options.props || !vm.constructor.options.props.name || !vm.constructor.options.props.value) {
- // 未初始化 props
- if (!vm.constructor.options.props) {
- vm.constructor.options.props = {};
- }
- if (!vm.constructor.options.props.name) {
- vm.constructor.options.props.name = options.props.name = {
- type: String
- };
- }
- if (!vm.constructor.options.props.value) {
- vm.constructor.options.props.value = options.props.value = {
- type: null
- };
- }
- }
- if (!options.propsData) {
- options.propsData = {};
- }
- var $vnode = vm.$vnode;
- if ($vnode && $vnode.data && $vnode.data.attrs) {
- if (Object(shared["c" /* hasOwn */])($vnode.data.attrs, 'name')) {
- options.propsData.name = $vnode.data.attrs.name;
- }
- if (Object(shared["c" /* hasOwn */])($vnode.data.attrs, 'value')) {
- options.propsData.value = $vnode.data.attrs.value;
- }
- }
- if (!vm.constructor.options.methods || !vm.constructor.options.methods._getFormData) {
- // 未初始化 methods
- if (!vm.constructor.options.methods) {
- vm.constructor.options.methods = {};
- }
- if (!options.methods) {
- options.methods = {};
- }
- var formMethods = {
- _getFormData: function _getFormData() {
- return this.name ? {
- key: this.name,
- value: this.value
- } : {};
- },
- _resetFormData: function _resetFormData() {
- this.value = '';
- }
- };
- Object.assign(vm.constructor.options.methods, formMethods);
- Object.assign(options.methods, formMethods); // add $dispatch
- Object.assign(vm.constructor.options.methods, mixins["a" /* emitter */].methods);
- Object.assign(options.methods, mixins["a" /* emitter */].methods);
- var createdHooks = options.created;
- vm.constructor.options.created = options.created = createdHooks ? [].concat(created, createdHooks) : [created];
- var beforeDestroyHooks = options.beforeDestroy;
- vm.constructor.options.beforeDestroy = options.beforeDestroy = beforeDestroyHooks ? [].concat(beforeDestroy, beforeDestroyHooks) : [beforeDestroy];
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/plugins/behaviors/index.js
- 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; }
- var behaviors = _defineProperty({}, form_field.name, form_field);
- function initBehaviors(options, vm) {
- options.behaviors.forEach(function (name) {
- var behavior = behaviors[name];
- behavior && behavior.init(options, vm);
- });
- }
- /***/ }),
- /* 86 */
- /***/ (function(module, exports, __webpack_require__) {
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
- // MIT license
- // source: https://github.com/amiller-gh/currentScript-polyfill
- // added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
- (function (root, factory) {
- if (true) {
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
- }(typeof self !== 'undefined' ? self : this, function () {
- function getCurrentScript () {
- if (document.currentScript) {
- return document.currentScript
- }
-
- // IE 8-10 support script readyState
- // IE 11+ & Firefox support stack trace
- try {
- throw new Error();
- }
- catch (err) {
- // Find the second match for the "at" string to get file src url from stack.
- var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
- ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
- stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
- scriptLocation = (stackDetails && stackDetails[1]) || false,
- line = (stackDetails && stackDetails[2]) || false,
- currentLocation = document.location.href.replace(document.location.hash, ''),
- pageSource,
- inlineScriptSourceRegExp,
- inlineScriptSource,
- scripts = document.getElementsByTagName('script'); // Live NodeList collection
-
- if (scriptLocation === currentLocation) {
- pageSource = document.documentElement.outerHTML;
- inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
- inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
- }
-
- for (var i = 0; i < scripts.length; i++) {
- // If ready state is interactive, return the script tag
- if (scripts[i].readyState === 'interactive') {
- return scripts[i];
- }
-
- // If src matches, return the script tag
- if (scripts[i].src === scriptLocation) {
- return scripts[i];
- }
-
- // If inline source matches, return the script tag
- if (
- scriptLocation === currentLocation &&
- scripts[i].innerHTML &&
- scripts[i].innerHTML.trim() === inlineScriptSource
- ) {
- return scripts[i];
- }
- }
-
- // If no match, return null
- return null;
- }
- };
- return getCurrentScript
- }));
- /***/ }),
- /* 87 */
- /***/ (function(module, exports) {
- /**
- * Copyright 2016 Google Inc. All Rights Reserved.
- *
- * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.
- *
- * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
- *
- */
- (function() {
- 'use strict';
- // Exit early if we're not running in a browser.
- if (typeof window !== 'object') {
- return;
- }
- // Exit early if all IntersectionObserver and IntersectionObserverEntry
- // features are natively supported.
- if ('IntersectionObserver' in window &&
- 'IntersectionObserverEntry' in window &&
- 'intersectionRatio' in window.IntersectionObserverEntry.prototype) {
- // Minimal polyfill for Edge 15's lack of `isIntersecting`
- // See: https://github.com/w3c/IntersectionObserver/issues/211
- if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {
- Object.defineProperty(window.IntersectionObserverEntry.prototype,
- 'isIntersecting', {
- get: function () {
- return this.intersectionRatio > 0;
- }
- });
- }
- return;
- }
- /**
- * A local reference to the document.
- */
- var document = window.document;
- /**
- * An IntersectionObserver registry. This registry exists to hold a strong
- * reference to IntersectionObserver instances currently observing a target
- * element. Without this registry, instances without another reference may be
- * garbage collected.
- */
- var registry = [];
- /**
- * Creates the global IntersectionObserverEntry constructor.
- * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry
- * @param {Object} entry A dictionary of instance properties.
- * @constructor
- */
- function IntersectionObserverEntry(entry) {
- this.time = entry.time;
- this.target = entry.target;
- this.rootBounds = entry.rootBounds;
- this.boundingClientRect = entry.boundingClientRect;
- this.intersectionRect = entry.intersectionRect || getEmptyRect();
- this.isIntersecting = !!entry.intersectionRect;
- // Calculates the intersection ratio.
- var targetRect = this.boundingClientRect;
- var targetArea = targetRect.width * targetRect.height;
- var intersectionRect = this.intersectionRect;
- var intersectionArea = intersectionRect.width * intersectionRect.height;
- // Sets intersection ratio.
- if (targetArea) {
- // Round the intersection ratio to avoid floating point math issues:
- // https://github.com/w3c/IntersectionObserver/issues/324
- this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4));
- } else {
- // If area is zero and is intersecting, sets to 1, otherwise to 0
- this.intersectionRatio = this.isIntersecting ? 1 : 0;
- }
- }
- /**
- * Creates the global IntersectionObserver constructor.
- * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface
- * @param {Function} callback The function to be invoked after intersection
- * changes have queued. The function is not invoked if the queue has
- * been emptied by calling the `takeRecords` method.
- * @param {Object=} opt_options Optional configuration options.
- * @constructor
- */
- function IntersectionObserver(callback, opt_options) {
- var options = opt_options || {};
- if (typeof callback != 'function') {
- throw new Error('callback must be a function');
- }
- if (options.root && options.root.nodeType != 1) {
- throw new Error('root must be an Element');
- }
- // Binds and throttles `this._checkForIntersections`.
- this._checkForIntersections = throttle(
- this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT);
- // Private properties.
- this._callback = callback;
- this._observationTargets = [];
- this._queuedEntries = [];
- this._rootMarginValues = this._parseRootMargin(options.rootMargin);
- // Public properties.
- this.thresholds = this._initThresholds(options.threshold);
- this.root = options.root || null;
- this.rootMargin = this._rootMarginValues.map(function(margin) {
- return margin.value + margin.unit;
- }).join(' ');
- }
- /**
- * The minimum interval within which the document will be checked for
- * intersection changes.
- */
- IntersectionObserver.prototype.THROTTLE_TIMEOUT = 100;
- /**
- * The frequency in which the polyfill polls for intersection changes.
- * this can be updated on a per instance basis and must be set prior to
- * calling `observe` on the first target.
- */
- IntersectionObserver.prototype.POLL_INTERVAL = null;
- /**
- * Use a mutation observer on the root element
- * to detect intersection changes.
- */
- IntersectionObserver.prototype.USE_MUTATION_OBSERVER = true;
- /**
- * Starts observing a target element for intersection changes based on
- * the thresholds values.
- * @param {Element} target The DOM element to observe.
- */
- IntersectionObserver.prototype.observe = function(target) {
- var isTargetAlreadyObserved = this._observationTargets.some(function(item) {
- return item.element == target;
- });
- if (isTargetAlreadyObserved) {
- return;
- }
- if (!(target && target.nodeType == 1)) {
- throw new Error('target must be an Element');
- }
- this._registerInstance();
- this._observationTargets.push({element: target, entry: null});
- this._monitorIntersections();
- this._checkForIntersections();
- };
- /**
- * Stops observing a target element for intersection changes.
- * @param {Element} target The DOM element to observe.
- */
- IntersectionObserver.prototype.unobserve = function(target) {
- this._observationTargets =
- this._observationTargets.filter(function(item) {
- return item.element != target;
- });
- if (!this._observationTargets.length) {
- this._unmonitorIntersections();
- this._unregisterInstance();
- }
- };
- /**
- * Stops observing all target elements for intersection changes.
- */
- IntersectionObserver.prototype.disconnect = function() {
- this._observationTargets = [];
- this._unmonitorIntersections();
- this._unregisterInstance();
- };
- /**
- * Returns any queue entries that have not yet been reported to the
- * callback and clears the queue. This can be used in conjunction with the
- * callback to obtain the absolute most up-to-date intersection information.
- * @return {Array} The currently queued entries.
- */
- IntersectionObserver.prototype.takeRecords = function() {
- var records = this._queuedEntries.slice();
- this._queuedEntries = [];
- return records;
- };
- /**
- * Accepts the threshold value from the user configuration object and
- * returns a sorted array of unique threshold values. If a value is not
- * between 0 and 1 and error is thrown.
- * @private
- * @param {Array|number=} opt_threshold An optional threshold value or
- * a list of threshold values, defaulting to [0].
- * @return {Array} A sorted list of unique and valid threshold values.
- */
- IntersectionObserver.prototype._initThresholds = function(opt_threshold) {
- var threshold = opt_threshold || [0];
- if (!Array.isArray(threshold)) threshold = [threshold];
- return threshold.sort().filter(function(t, i, a) {
- if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) {
- throw new Error('threshold must be a number between 0 and 1 inclusively');
- }
- return t !== a[i - 1];
- });
- };
- /**
- * Accepts the rootMargin value from the user configuration object
- * and returns an array of the four margin values as an object containing
- * the value and unit properties. If any of the values are not properly
- * formatted or use a unit other than px or %, and error is thrown.
- * @private
- * @param {string=} opt_rootMargin An optional rootMargin value,
- * defaulting to '0px'.
- * @return {Array<Object>} An array of margin objects with the keys
- * value and unit.
- */
- IntersectionObserver.prototype._parseRootMargin = function(opt_rootMargin) {
- var marginString = opt_rootMargin || '0px';
- var margins = marginString.split(/\s+/).map(function(margin) {
- var parts = /^(-?\d*\.?\d+)(px|%)$/.exec(margin);
- if (!parts) {
- throw new Error('rootMargin must be specified in pixels or percent');
- }
- return {value: parseFloat(parts[1]), unit: parts[2]};
- });
- // Handles shorthand.
- margins[1] = margins[1] || margins[0];
- margins[2] = margins[2] || margins[0];
- margins[3] = margins[3] || margins[1];
- return margins;
- };
- /**
- * Starts polling for intersection changes if the polling is not already
- * happening, and if the page's visibility state is visible.
- * @private
- */
- IntersectionObserver.prototype._monitorIntersections = function() {
- if (!this._monitoringIntersections) {
- this._monitoringIntersections = true;
- // If a poll interval is set, use polling instead of listening to
- // resize and scroll events or DOM mutations.
- if (this.POLL_INTERVAL) {
- this._monitoringInterval = setInterval(
- this._checkForIntersections, this.POLL_INTERVAL);
- }
- else {
- addEvent(window, 'resize', this._checkForIntersections, true);
- addEvent(document, 'scroll', this._checkForIntersections, true);
- if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in window) {
- this._domObserver = new MutationObserver(this._checkForIntersections);
- this._domObserver.observe(document, {
- attributes: true,
- childList: true,
- characterData: true,
- subtree: true
- });
- }
- }
- }
- };
- /**
- * Stops polling for intersection changes.
- * @private
- */
- IntersectionObserver.prototype._unmonitorIntersections = function() {
- if (this._monitoringIntersections) {
- this._monitoringIntersections = false;
- clearInterval(this._monitoringInterval);
- this._monitoringInterval = null;
- removeEvent(window, 'resize', this._checkForIntersections, true);
- removeEvent(document, 'scroll', this._checkForIntersections, true);
- if (this._domObserver) {
- this._domObserver.disconnect();
- this._domObserver = null;
- }
- }
- };
- /**
- * Scans each observation target for intersection changes and adds them
- * to the internal entries queue. If new entries are found, it
- * schedules the callback to be invoked.
- * @private
- */
- IntersectionObserver.prototype._checkForIntersections = function() {
- var rootIsInDom = this._rootIsInDom();
- var rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect();
- this._observationTargets.forEach(function(item) {
- var target = item.element;
- var targetRect = getBoundingClientRect(target);
- var rootContainsTarget = this._rootContainsTarget(target);
- var oldEntry = item.entry;
- var intersectionRect = rootIsInDom && rootContainsTarget &&
- this._computeTargetAndRootIntersection(target, rootRect);
- var newEntry = item.entry = new IntersectionObserverEntry({
- time: now(),
- target: target,
- boundingClientRect: targetRect,
- rootBounds: rootRect,
- intersectionRect: intersectionRect
- });
- if (!oldEntry) {
- this._queuedEntries.push(newEntry);
- } else if (rootIsInDom && rootContainsTarget) {
- // If the new entry intersection ratio has crossed any of the
- // thresholds, add a new entry.
- if (this._hasCrossedThreshold(oldEntry, newEntry)) {
- this._queuedEntries.push(newEntry);
- }
- } else {
- // If the root is not in the DOM or target is not contained within
- // root but the previous entry for this target had an intersection,
- // add a new record indicating removal.
- if (oldEntry && oldEntry.isIntersecting) {
- this._queuedEntries.push(newEntry);
- }
- }
- }, this);
- if (this._queuedEntries.length) {
- this._callback(this.takeRecords(), this);
- }
- };
- /**
- * Accepts a target and root rect computes the intersection between then
- * following the algorithm in the spec.
- * TODO(philipwalton): at this time clip-path is not considered.
- * https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo
- * @param {Element} target The target DOM element
- * @param {Object} rootRect The bounding rect of the root after being
- * expanded by the rootMargin value.
- * @return {?Object} The final intersection rect object or undefined if no
- * intersection is found.
- * @private
- */
- IntersectionObserver.prototype._computeTargetAndRootIntersection =
- function(target, rootRect) {
- // If the element isn't displayed, an intersection can't happen.
- if (window.getComputedStyle(target).display == 'none') return;
- var targetRect = getBoundingClientRect(target);
- var intersectionRect = targetRect;
- var parent = getParentNode(target);
- var atRoot = false;
- while (!atRoot) {
- var parentRect = null;
- var parentComputedStyle = parent.nodeType == 1 ?
- window.getComputedStyle(parent) : {};
- // If the parent isn't displayed, an intersection can't happen.
- if (parentComputedStyle.display == 'none') return;
- if (parent == this.root || parent == document) {
- atRoot = true;
- parentRect = rootRect;
- } else {
- // If the element has a non-visible overflow, and it's not the <body>
- // or <html> element, update the intersection rect.
- // Note: <body> and <html> cannot be clipped to a rect that's not also
- // the document rect, so no need to compute a new intersection.
- if (parent != document.body &&
- parent != document.documentElement &&
- parentComputedStyle.overflow != 'visible') {
- parentRect = getBoundingClientRect(parent);
- }
- }
- // If either of the above conditionals set a new parentRect,
- // calculate new intersection data.
- if (parentRect) {
- intersectionRect = computeRectIntersection(parentRect, intersectionRect);
- if (!intersectionRect) break;
- }
- parent = getParentNode(parent);
- }
- return intersectionRect;
- };
- /**
- * Returns the root rect after being expanded by the rootMargin value.
- * @return {Object} The expanded root rect.
- * @private
- */
- IntersectionObserver.prototype._getRootRect = function() {
- var rootRect;
- if (this.root) {
- rootRect = getBoundingClientRect(this.root);
- } else {
- // Use <html>/<body> instead of window since scroll bars affect size.
- var html = document.documentElement;
- var body = document.body;
- rootRect = {
- top: 0,
- left: 0,
- right: html.clientWidth || body.clientWidth,
- width: html.clientWidth || body.clientWidth,
- bottom: html.clientHeight || body.clientHeight,
- height: html.clientHeight || body.clientHeight
- };
- }
- return this._expandRectByRootMargin(rootRect);
- };
- /**
- * Accepts a rect and expands it by the rootMargin value.
- * @param {Object} rect The rect object to expand.
- * @return {Object} The expanded rect.
- * @private
- */
- IntersectionObserver.prototype._expandRectByRootMargin = function(rect) {
- var margins = this._rootMarginValues.map(function(margin, i) {
- return margin.unit == 'px' ? margin.value :
- margin.value * (i % 2 ? rect.width : rect.height) / 100;
- });
- var newRect = {
- top: rect.top - margins[0],
- right: rect.right + margins[1],
- bottom: rect.bottom + margins[2],
- left: rect.left - margins[3]
- };
- newRect.width = newRect.right - newRect.left;
- newRect.height = newRect.bottom - newRect.top;
- return newRect;
- };
- /**
- * Accepts an old and new entry and returns true if at least one of the
- * threshold values has been crossed.
- * @param {?IntersectionObserverEntry} oldEntry The previous entry for a
- * particular target element or null if no previous entry exists.
- * @param {IntersectionObserverEntry} newEntry The current entry for a
- * particular target element.
- * @return {boolean} Returns true if a any threshold has been crossed.
- * @private
- */
- IntersectionObserver.prototype._hasCrossedThreshold =
- function(oldEntry, newEntry) {
- // To make comparing easier, an entry that has a ratio of 0
- // but does not actually intersect is given a value of -1
- var oldRatio = oldEntry && oldEntry.isIntersecting ?
- oldEntry.intersectionRatio || 0 : -1;
- var newRatio = newEntry.isIntersecting ?
- newEntry.intersectionRatio || 0 : -1;
- // Ignore unchanged ratios
- if (oldRatio === newRatio) return;
- for (var i = 0; i < this.thresholds.length; i++) {
- var threshold = this.thresholds[i];
- // Return true if an entry matches a threshold or if the new ratio
- // and the old ratio are on the opposite sides of a threshold.
- if (threshold == oldRatio || threshold == newRatio ||
- threshold < oldRatio !== threshold < newRatio) {
- return true;
- }
- }
- };
- /**
- * Returns whether or not the root element is an element and is in the DOM.
- * @return {boolean} True if the root element is an element and is in the DOM.
- * @private
- */
- IntersectionObserver.prototype._rootIsInDom = function() {
- return !this.root || containsDeep(document, this.root);
- };
- /**
- * Returns whether or not the target element is a child of root.
- * @param {Element} target The target element to check.
- * @return {boolean} True if the target element is a child of root.
- * @private
- */
- IntersectionObserver.prototype._rootContainsTarget = function(target) {
- return containsDeep(this.root || document, target);
- };
- /**
- * Adds the instance to the global IntersectionObserver registry if it isn't
- * already present.
- * @private
- */
- IntersectionObserver.prototype._registerInstance = function() {
- if (registry.indexOf(this) < 0) {
- registry.push(this);
- }
- };
- /**
- * Removes the instance from the global IntersectionObserver registry.
- * @private
- */
- IntersectionObserver.prototype._unregisterInstance = function() {
- var index = registry.indexOf(this);
- if (index != -1) registry.splice(index, 1);
- };
- /**
- * Returns the result of the performance.now() method or null in browsers
- * that don't support the API.
- * @return {number} The elapsed time since the page was requested.
- */
- function now() {
- return window.performance && performance.now && performance.now();
- }
- /**
- * Throttles a function and delays its execution, so it's only called at most
- * once within a given time period.
- * @param {Function} fn The function to throttle.
- * @param {number} timeout The amount of time that must pass before the
- * function can be called again.
- * @return {Function} The throttled function.
- */
- function throttle(fn, timeout) {
- var timer = null;
- return function () {
- if (!timer) {
- timer = setTimeout(function() {
- fn();
- timer = null;
- }, timeout);
- }
- };
- }
- /**
- * Adds an event handler to a DOM node ensuring cross-browser compatibility.
- * @param {Node} node The DOM node to add the event handler to.
- * @param {string} event The event name.
- * @param {Function} fn The event handler to add.
- * @param {boolean} opt_useCapture Optionally adds the even to the capture
- * phase. Note: this only works in modern browsers.
- */
- function addEvent(node, event, fn, opt_useCapture) {
- if (typeof node.addEventListener == 'function') {
- node.addEventListener(event, fn, opt_useCapture || false);
- }
- else if (typeof node.attachEvent == 'function') {
- node.attachEvent('on' + event, fn);
- }
- }
- /**
- * Removes a previously added event handler from a DOM node.
- * @param {Node} node The DOM node to remove the event handler from.
- * @param {string} event The event name.
- * @param {Function} fn The event handler to remove.
- * @param {boolean} opt_useCapture If the event handler was added with this
- * flag set to true, it should be set to true here in order to remove it.
- */
- function removeEvent(node, event, fn, opt_useCapture) {
- if (typeof node.removeEventListener == 'function') {
- node.removeEventListener(event, fn, opt_useCapture || false);
- }
- else if (typeof node.detatchEvent == 'function') {
- node.detatchEvent('on' + event, fn);
- }
- }
- /**
- * Returns the intersection between two rect objects.
- * @param {Object} rect1 The first rect.
- * @param {Object} rect2 The second rect.
- * @return {?Object} The intersection rect or undefined if no intersection
- * is found.
- */
- function computeRectIntersection(rect1, rect2) {
- var top = Math.max(rect1.top, rect2.top);
- var bottom = Math.min(rect1.bottom, rect2.bottom);
- var left = Math.max(rect1.left, rect2.left);
- var right = Math.min(rect1.right, rect2.right);
- var width = right - left;
- var height = bottom - top;
- return (width >= 0 && height >= 0) && {
- top: top,
- bottom: bottom,
- left: left,
- right: right,
- width: width,
- height: height
- };
- }
- /**
- * Shims the native getBoundingClientRect for compatibility with older IE.
- * @param {Element} el The element whose bounding rect to get.
- * @return {Object} The (possibly shimmed) rect of the element.
- */
- function getBoundingClientRect(el) {
- var rect;
- try {
- rect = el.getBoundingClientRect();
- } catch (err) {
- // Ignore Windows 7 IE11 "Unspecified error"
- // https://github.com/w3c/IntersectionObserver/pull/205
- }
- if (!rect) return getEmptyRect();
- // Older IE
- if (!(rect.width && rect.height)) {
- rect = {
- top: rect.top,
- right: rect.right,
- bottom: rect.bottom,
- left: rect.left,
- width: rect.right - rect.left,
- height: rect.bottom - rect.top
- };
- }
- return rect;
- }
- /**
- * Returns an empty rect object. An empty rect is returned when an element
- * is not in the DOM.
- * @return {Object} The empty rect.
- */
- function getEmptyRect() {
- return {
- top: 0,
- bottom: 0,
- left: 0,
- right: 0,
- width: 0,
- height: 0
- };
- }
- /**
- * Checks to see if a parent element contains a child element (including inside
- * shadow DOM).
- * @param {Node} parent The parent element.
- * @param {Node} child The child element.
- * @return {boolean} True if the parent node contains the child node.
- */
- function containsDeep(parent, child) {
- var node = child;
- while (node) {
- if (node == parent) return true;
- node = getParentNode(node);
- }
- return false;
- }
- /**
- * Gets the parent node of an element or its host element if the parent node
- * is a shadow root.
- * @param {Node} node The node whose parent to get.
- * @return {Node|null} The parent node or null if no parent exists.
- */
- function getParentNode(node) {
- var parent = node.parentNode;
- if (parent && parent.nodeType == 11 && parent.host) {
- // If the parent is a shadow root, return the host element.
- return parent.host;
- }
- if (parent && parent.assignedSlot) {
- // If the parent is distributed in a <slot>, return the parent of a slot.
- return parent.assignedSlot.parentNode;
- }
- return parent;
- }
- // Exposes the constructors globally.
- window.IntersectionObserver = IntersectionObserver;
- window.IntersectionObserverEntry = IntersectionObserverEntry;
- }());
- /***/ }),
- /* 88 */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ }),
- /* 89 */
- /***/ (function(module, exports, __webpack_require__) {
- var map = {
- "./button/index.vue": 153,
- "./canvas/index.vue": 147,
- "./checkbox-group/index.vue": 128,
- "./checkbox/index.vue": 129,
- "./editor/index.vue": 148,
- "./form/index.vue": 130,
- "./icon/index.vue": 131,
- "./image/index.vue": 132,
- "./input/index.vue": 133,
- "./label/index.vue": 149,
- "./movable-area/index.vue": 154,
- "./movable-view/index.vue": 126,
- "./navigator/index.vue": 134,
- "./picker-view-column/index.vue": 155,
- "./picker-view/index.vue": 156,
- "./progress/index.vue": 135,
- "./radio-group/index.vue": 136,
- "./radio/index.vue": 137,
- "./resize-sensor/index.vue": 157,
- "./rich-text/index.vue": 125,
- "./scroll-view/index.vue": 138,
- "./slider/index.vue": 139,
- "./swiper-item/index.vue": 140,
- "./swiper/index.vue": 158,
- "./switch/index.vue": 141,
- "./text/index.vue": 159,
- "./textarea/index.vue": 142,
- "./view/index.vue": 143
- };
- function webpackContext(req) {
- var id = webpackContextResolve(req);
- return __webpack_require__(id);
- }
- function webpackContextResolve(req) {
- if(!__webpack_require__.o(map, req)) {
- var e = new Error("Cannot find module '" + req + "'");
- e.code = 'MODULE_NOT_FOUND';
- throw e;
- }
- return map[req];
- }
- webpackContext.keys = function webpackContextKeys() {
- return Object.keys(map);
- };
- webpackContext.resolve = webpackContextResolve;
- module.exports = webpackContext;
- webpackContext.id = 89;
- /***/ }),
- /* 90 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 91 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 92 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 93 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 94 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 95 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 96 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 97 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 98 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 99 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 100 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 101 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 102 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 103 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 104 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 105 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 106 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 107 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 108 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 109 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 110 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 111 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 112 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 113 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 114 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 115 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 116 */
- /***/ (function(module, exports, __webpack_require__) {
- var map = {
- "./ad/index.vue": 144,
- "./cover-image/index.vue": 127,
- "./cover-view/index.vue": 160,
- "./map/index.vue": 150,
- "./picker/index.vue": 145,
- "./video/index.vue": 146,
- "./web-view/index.vue": 151
- };
- function webpackContext(req) {
- var id = webpackContextResolve(req);
- return __webpack_require__(id);
- }
- function webpackContextResolve(req) {
- if(!__webpack_require__.o(map, req)) {
- var e = new Error("Cannot find module '" + req + "'");
- e.code = 'MODULE_NOT_FOUND';
- throw e;
- }
- return map[req];
- }
- webpackContext.keys = function webpackContextKeys() {
- return Object.keys(map);
- };
- webpackContext.resolve = webpackContextResolve;
- module.exports = webpackContext;
- webpackContext.id = 116;
- /***/ }),
- /* 117 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 118 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 119 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 120 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 121 */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
- // backported and transplited with Babel, with backwards-compat fixes
- // Copyright Joyent, Inc. and other Node contributors.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a
- // copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to permit
- // persons to whom the Software is furnished to do so, subject to the
- // following conditions:
- //
- // The above copyright notice and this permission notice shall be included
- // in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
- // resolves . and .. elements in a path array with directory names there
- // must be no slashes, empty elements, or device names (c:\) in the array
- // (so also no leading and trailing slashes - it does not distinguish
- // relative and absolute paths)
- function normalizeArray(parts, allowAboveRoot) {
- // if the path tries to go above the root, `up` ends up > 0
- var up = 0;
- for (var i = parts.length - 1; i >= 0; i--) {
- var last = parts[i];
- if (last === '.') {
- parts.splice(i, 1);
- } else if (last === '..') {
- parts.splice(i, 1);
- up++;
- } else if (up) {
- parts.splice(i, 1);
- up--;
- }
- }
- // if the path is allowed to go above the root, restore leading ..s
- if (allowAboveRoot) {
- for (; up--; up) {
- parts.unshift('..');
- }
- }
- return parts;
- }
- // path.resolve([from ...], to)
- // posix version
- exports.resolve = function() {
- var resolvedPath = '',
- resolvedAbsolute = false;
- for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
- var path = (i >= 0) ? arguments[i] : process.cwd();
- // Skip empty and invalid entries
- if (typeof path !== 'string') {
- throw new TypeError('Arguments to path.resolve must be strings');
- } else if (!path) {
- continue;
- }
- resolvedPath = path + '/' + resolvedPath;
- resolvedAbsolute = path.charAt(0) === '/';
- }
- // At this point the path should be resolved to a full absolute path, but
- // handle relative paths to be safe (might happen when process.cwd() fails)
- // Normalize the path
- resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
- return !!p;
- }), !resolvedAbsolute).join('/');
- return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
- };
- // path.normalize(path)
- // posix version
- exports.normalize = function(path) {
- var isAbsolute = exports.isAbsolute(path),
- trailingSlash = substr(path, -1) === '/';
- // Normalize the path
- path = normalizeArray(filter(path.split('/'), function(p) {
- return !!p;
- }), !isAbsolute).join('/');
- if (!path && !isAbsolute) {
- path = '.';
- }
- if (path && trailingSlash) {
- path += '/';
- }
- return (isAbsolute ? '/' : '') + path;
- };
- // posix version
- exports.isAbsolute = function(path) {
- return path.charAt(0) === '/';
- };
- // posix version
- exports.join = function() {
- var paths = Array.prototype.slice.call(arguments, 0);
- return exports.normalize(filter(paths, function(p, index) {
- if (typeof p !== 'string') {
- throw new TypeError('Arguments to path.join must be strings');
- }
- return p;
- }).join('/'));
- };
- // path.relative(from, to)
- // posix version
- exports.relative = function(from, to) {
- from = exports.resolve(from).substr(1);
- to = exports.resolve(to).substr(1);
- function trim(arr) {
- var start = 0;
- for (; start < arr.length; start++) {
- if (arr[start] !== '') break;
- }
- var end = arr.length - 1;
- for (; end >= 0; end--) {
- if (arr[end] !== '') break;
- }
- if (start > end) return [];
- return arr.slice(start, end - start + 1);
- }
- var fromParts = trim(from.split('/'));
- var toParts = trim(to.split('/'));
- var length = Math.min(fromParts.length, toParts.length);
- var samePartsLength = length;
- for (var i = 0; i < length; i++) {
- if (fromParts[i] !== toParts[i]) {
- samePartsLength = i;
- break;
- }
- }
- var outputParts = [];
- for (var i = samePartsLength; i < fromParts.length; i++) {
- outputParts.push('..');
- }
- outputParts = outputParts.concat(toParts.slice(samePartsLength));
- return outputParts.join('/');
- };
- exports.sep = '/';
- exports.delimiter = ':';
- exports.dirname = function (path) {
- if (typeof path !== 'string') path = path + '';
- if (path.length === 0) return '.';
- var code = path.charCodeAt(0);
- var hasRoot = code === 47 /*/*/;
- var end = -1;
- var matchedSlash = true;
- for (var i = path.length - 1; i >= 1; --i) {
- code = path.charCodeAt(i);
- if (code === 47 /*/*/) {
- if (!matchedSlash) {
- end = i;
- break;
- }
- } else {
- // We saw the first non-path separator
- matchedSlash = false;
- }
- }
- if (end === -1) return hasRoot ? '/' : '.';
- if (hasRoot && end === 1) {
- // return '//';
- // Backwards-compat fix:
- return '/';
- }
- return path.slice(0, end);
- };
- function basename(path) {
- if (typeof path !== 'string') path = path + '';
- var start = 0;
- var end = -1;
- var matchedSlash = true;
- var i;
- for (i = path.length - 1; i >= 0; --i) {
- if (path.charCodeAt(i) === 47 /*/*/) {
- // If we reached a path separator that was not part of a set of path
- // separators at the end of the string, stop now
- if (!matchedSlash) {
- start = i + 1;
- break;
- }
- } else if (end === -1) {
- // We saw the first non-path separator, mark this as the end of our
- // path component
- matchedSlash = false;
- end = i + 1;
- }
- }
- if (end === -1) return '';
- return path.slice(start, end);
- }
- // Uses a mixed approach for backwards-compatibility, as ext behavior changed
- // in new Node.js versions, so only basename() above is backported here
- exports.basename = function (path, ext) {
- var f = basename(path);
- if (ext && f.substr(-1 * ext.length) === ext) {
- f = f.substr(0, f.length - ext.length);
- }
- return f;
- };
- exports.extname = function (path) {
- if (typeof path !== 'string') path = path + '';
- var startDot = -1;
- var startPart = 0;
- var end = -1;
- var matchedSlash = true;
- // Track the state of characters (if any) we see before our first dot and
- // after any path separator we find
- var preDotState = 0;
- for (var i = path.length - 1; i >= 0; --i) {
- var code = path.charCodeAt(i);
- if (code === 47 /*/*/) {
- // If we reached a path separator that was not part of a set of path
- // separators at the end of the string, stop now
- if (!matchedSlash) {
- startPart = i + 1;
- break;
- }
- continue;
- }
- if (end === -1) {
- // We saw the first non-path separator, mark this as the end of our
- // extension
- matchedSlash = false;
- end = i + 1;
- }
- if (code === 46 /*.*/) {
- // If this is our first dot, mark it as the start of our extension
- if (startDot === -1)
- startDot = i;
- else if (preDotState !== 1)
- preDotState = 1;
- } else if (startDot !== -1) {
- // We saw a non-dot and non-path separator before our dot, so we should
- // have a good chance at having a non-empty extension
- preDotState = -1;
- }
- }
- if (startDot === -1 || end === -1 ||
- // We saw a non-dot character immediately before the dot
- preDotState === 0 ||
- // The (right-most) trimmed path component is exactly '..'
- preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
- return '';
- }
- return path.slice(startDot, end);
- };
- function filter (xs, f) {
- if (xs.filter) return xs.filter(f);
- var res = [];
- for (var i = 0; i < xs.length; i++) {
- if (f(xs[i], i, xs)) res.push(xs[i]);
- }
- return res;
- }
- // String.prototype.substr - negative index don't work in IE8
- var substr = 'ab'.substr(-1) === 'b'
- ? function (str, start, len) { return str.substr(start, len) }
- : function (str, start, len) {
- if (start < 0) start = str.length + start;
- return str.substr(start, len);
- }
- ;
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(72)))
- /***/ }),
- /* 122 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 123 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 124 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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);
- /* 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__);
- /* unused harmony reexport * */
- /* 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);
- /***/ }),
- /* 125 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c("uni-rich-text", _vm._g({}, _vm.$listeners), [_c("div")])
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/rich-text/index.vue?vue&type=template&id=1447b4ca&
- // EXTERNAL MODULE: ./src/core/helpers/html-parser.js
- var html_parser = __webpack_require__(60);
- // CONCATENATED MODULE: ./src/core/view/components/rich-text/html-parser.js
- function removeDOCTYPE(html) {
- return html.replace(/<\?xml.*\?>\n/, '').replace(/<!doctype.*>\n/, '').replace(/<!DOCTYPE.*>\n/, '');
- }
- function parseAttrs(attrs) {
- return attrs.reduce(function (pre, attr) {
- var value = attr.value;
- var name = attr.name;
- if (value.match(/ /) && name !== 'style') {
- value = value.split(' ');
- }
- if (pre[name]) {
- if (Array.isArray(pre[name])) {
- pre[name].push(value);
- } else {
- pre[name] = [pre[name], value];
- }
- } else {
- pre[name] = value;
- }
- return pre;
- }, {});
- }
- function parseHtml(html) {
- html = removeDOCTYPE(html);
- var stacks = [];
- var results = {
- node: 'root',
- children: []
- };
- Object(html_parser["a" /* default */])(html, {
- start: function start(tag, attrs, unary) {
- var node = {
- name: tag
- };
- if (attrs.length !== 0) {
- node.attrs = parseAttrs(attrs);
- }
- if (unary) {
- var parent = stacks[0] || results;
- if (!parent.children) {
- parent.children = [];
- }
- parent.children.push(node);
- } else {
- stacks.unshift(node);
- }
- },
- end: function end(tag) {
- var node = stacks.shift();
- if (node.name !== tag) console.error('invalid state: mismatch end tag');
- if (stacks.length === 0) {
- results.children.push(node);
- } else {
- var parent = stacks[0];
- if (!parent.children) {
- parent.children = [];
- }
- parent.children.push(node);
- }
- },
- chars: function chars(text) {
- var node = {
- type: 'text',
- text: text
- };
- if (stacks.length === 0) {
- results.children.push(node);
- } else {
- var parent = stacks[0];
- if (!parent.children) {
- parent.children = [];
- }
- parent.children.push(node);
- }
- },
- comment: function comment(text) {
- var node = {
- node: 'comment',
- text: text
- };
- var parent = stacks[0];
- if (!parent.children) {
- parent.children = [];
- }
- parent.children.push(node);
- }
- });
- return results.children;
- }
- // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
- var shared = __webpack_require__(1);
- // CONCATENATED MODULE: ./src/core/view/components/rich-text/nodes-parser.js
- var TAGS = {
- a: '',
- abbr: '',
- b: '',
- blockquote: '',
- br: '',
- code: '',
- col: ['span', 'width'],
- colgroup: ['span', 'width'],
- dd: '',
- del: '',
- div: '',
- dl: '',
- dt: '',
- em: '',
- fieldset: '',
- h1: '',
- h2: '',
- h3: '',
- h4: '',
- h5: '',
- h6: '',
- hr: '',
- i: '',
- img: ['alt', 'src', 'height', 'width'],
- ins: '',
- label: '',
- legend: '',
- li: '',
- ol: ['start', 'type'],
- p: '',
- q: '',
- span: '',
- strong: '',
- sub: '',
- sup: '',
- table: ['width'],
- tbody: '',
- td: ['colspan', 'rowspan', 'height', 'width'],
- tfoot: '',
- th: ['colspan', 'rowspan', 'height', 'width'],
- thead: '',
- tr: '',
- ul: ''
- };
- var CHARS = {
- amp: '&',
- gt: '>',
- lt: '<',
- nbsp: ' ',
- quot: '"',
- apos: "'"
- };
- function decodeEntities(htmlString) {
- return htmlString.replace(/&(([a-zA-Z]+)|(#x{0,1}[\da-zA-Z]+));/gi, function (match, stage) {
- if (Object(shared["c" /* hasOwn */])(CHARS, stage) && CHARS[stage]) {
- return CHARS[stage];
- }
- if (/^#[0-9]{1,4}$/.test(stage)) {
- return String.fromCharCode(stage.slice(1));
- }
- if (/^#x[0-9a-f]{1,4}$/i.test(stage)) {
- return String.fromCharCode('0' + stage.slice(1));
- }
- var wrap = document.createElement('div');
- wrap.innerHTML = match;
- return wrap.innerText || wrap.textContent;
- });
- }
- function parseNodes(nodes, parentNode) {
- nodes.forEach(function (node) {
- if (!Object(shared["e" /* isPlainObject */])(node)) {
- return;
- }
- if (!Object(shared["c" /* hasOwn */])(node, 'type') || node.type === 'node') {
- if (!(typeof node.name === 'string' && node.name)) {
- return;
- }
- var tagName = node.name.toLowerCase();
- if (!Object(shared["c" /* hasOwn */])(TAGS, tagName)) {
- return;
- }
- var elem = document.createElement(tagName);
- if (!elem) {
- return;
- }
- var attrs = node.attrs;
- if (Object(shared["e" /* isPlainObject */])(attrs)) {
- var tagAttrs = TAGS[tagName] || [];
- Object.keys(attrs).forEach(function (name) {
- var value = attrs[name];
- switch (name) {
- case 'class':
- /* eslint-disable no-fallthrough */
- Array.isArray(value) && (value = value.join(' '));
- case 'style':
- elem.setAttribute(name, value);
- break;
- default:
- if (tagAttrs.indexOf(name) !== -1) {
- elem.setAttribute(name, value);
- }
- }
- });
- }
- var children = node.children;
- if (Array.isArray(children) && children.length) {
- parseNodes(node.children, elem);
- }
- parentNode.appendChild(elem);
- } else {
- if (node.type === 'text' && typeof node.text === 'string' && node.text !== '') {
- parentNode.appendChild(document.createTextNode(decodeEntities(node.text)));
- }
- }
- });
- return parentNode;
- }
- // 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&
- //
- //
- //
- //
- //
- /* harmony default export */ var rich_textvue_type_script_lang_js_ = ({
- name: 'RichText',
- props: {
- nodes: {
- type: [Array, String],
- default: function _default() {
- return [];
- }
- }
- },
- watch: {
- nodes: function nodes(value) {
- this._renderNodes(value);
- }
- },
- mounted: function mounted() {
- this._renderNodes(this.nodes);
- },
- methods: {
- _renderNodes: function _renderNodes(nodes) {
- if (typeof nodes === 'string') {
- nodes = parseHtml(nodes);
- }
- var nodeList = parseNodes(nodes, document.createDocumentFragment());
- this.$el.firstChild.innerHTML = '';
- this.$el.firstChild.appendChild(nodeList);
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/rich-text/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_rich_textvue_type_script_lang_js_ = (rich_textvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/rich-text/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_rich_textvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/rich-text/index.vue"
- /* harmony default export */ var rich_text = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 126 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-movable-view",
- _vm._g({}, _vm.$listeners),
- [
- _c("v-uni-resize-sensor", { on: { resize: _vm.setParent } }),
- _vm._t("default")
- ],
- 2
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/movable-view/index.vue?vue&type=template&id=8de47606&
- // EXTERNAL MODULE: ./src/core/view/mixins/touchtrack.js
- var touchtrack = __webpack_require__(9);
- // CONCATENATED MODULE: ./src/core/view/components/movable-view/utils.js
- function e(e, t, n) {
- return e > t - n && e < t + n;
- }
- function t(t, n) {
- return e(t, 0, n);
- }
- function Decline() {}
- Decline.prototype.x = function (e) {
- return Math.sqrt(e);
- };
- function Friction(e, t) {
- this._m = e;
- this._f = 1e3 * t;
- this._startTime = 0;
- this._v = 0;
- }
- Friction.prototype.setV = function (x, y) {
- var n = Math.pow(Math.pow(x, 2) + Math.pow(y, 2), 0.5);
- this._x_v = x;
- this._y_v = y;
- this._x_a = -this._f * this._x_v / n;
- this._y_a = -this._f * this._y_v / n;
- this._t = Math.abs(x / this._x_a) || Math.abs(y / this._y_a);
- this._lastDt = null;
- this._startTime = new Date().getTime();
- };
- Friction.prototype.setS = function (x, y) {
- this._x_s = x;
- this._y_s = y;
- };
- Friction.prototype.s = function (t) {
- if (undefined === t) {
- t = (new Date().getTime() - this._startTime) / 1e3;
- }
- if (t > this._t) {
- t = this._t;
- this._lastDt = t;
- }
- var x = this._x_v * t + 0.5 * this._x_a * Math.pow(t, 2) + this._x_s;
- var y = this._y_v * t + 0.5 * this._y_a * Math.pow(t, 2) + this._y_s;
- if (this._x_a > 0 && x < this._endPositionX || this._x_a < 0 && x > this._endPositionX) {
- x = this._endPositionX;
- }
- if (this._y_a > 0 && y < this._endPositionY || this._y_a < 0 && y > this._endPositionY) {
- y = this._endPositionY;
- }
- return {
- x: x,
- y: y
- };
- };
- Friction.prototype.ds = function (t) {
- if (undefined === t) {
- t = (new Date().getTime() - this._startTime) / 1e3;
- }
- if (t > this._t) {
- t = this._t;
- }
- return {
- dx: this._x_v + this._x_a * t,
- dy: this._y_v + this._y_a * t
- };
- };
- Friction.prototype.delta = function () {
- return {
- x: -1.5 * Math.pow(this._x_v, 2) / this._x_a || 0,
- y: -1.5 * Math.pow(this._y_v, 2) / this._y_a || 0
- };
- };
- Friction.prototype.dt = function () {
- return -this._x_v / this._x_a;
- };
- Friction.prototype.done = function () {
- var t = e(this.s().x, this._endPositionX) || e(this.s().y, this._endPositionY) || this._lastDt === this._t;
- this._lastDt = null;
- return t;
- };
- Friction.prototype.setEnd = function (x, y) {
- this._endPositionX = x;
- this._endPositionY = y;
- };
- Friction.prototype.reconfigure = function (m, f) {
- this._m = m;
- this._f = 1e3 * f;
- };
- function Spring(m, k, c) {
- this._m = m;
- this._k = k;
- this._c = c;
- this._solution = null;
- this._endPosition = 0;
- this._startTime = 0;
- }
- Spring.prototype._solve = function (e, t) {
- var n = this._c;
- var i = this._m;
- var r = this._k;
- var o = n * n - 4 * i * r;
- if (o === 0) {
- var a = -n / (2 * i);
- var s = e;
- var l = t / (a * e);
- return {
- x: function x(e) {
- return (s + l * e) * Math.pow(Math.E, a * e);
- },
- dx: function dx(e) {
- var t = Math.pow(Math.E, a * e);
- return a * (s + l * e) * t + l * t;
- }
- };
- }
- if (o > 0) {
- var c = (-n - Math.sqrt(o)) / (2 * i);
- var u = (-n + Math.sqrt(o)) / (2 * i);
- var d = (t - c * e) / (u - c);
- var h = e - d;
- return {
- x: function x(e) {
- var t;
- var n;
- if (e === this._t) {
- t = this._powER1T;
- n = this._powER2T;
- }
- this._t = e;
- if (!t) {
- t = this._powER1T = Math.pow(Math.E, c * e);
- }
- if (!n) {
- n = this._powER2T = Math.pow(Math.E, u * e);
- }
- return h * t + d * n;
- },
- dx: function dx(e) {
- var t;
- var n;
- if (e === this._t) {
- t = this._powER1T;
- n = this._powER2T;
- }
- this._t = e;
- if (!t) {
- t = this._powER1T = Math.pow(Math.E, c * e);
- }
- if (!n) {
- n = this._powER2T = Math.pow(Math.E, u * e);
- }
- return h * c * t + d * u * n;
- }
- };
- }
- var p = Math.sqrt(4 * i * r - n * n) / (2 * i);
- var f = -n / 2 * i;
- var v = e;
- var g = (t - f * e) / p;
- return {
- x: function x(e) {
- return Math.pow(Math.E, f * e) * (v * Math.cos(p * e) + g * Math.sin(p * e));
- },
- dx: function dx(e) {
- var t = Math.pow(Math.E, f * e);
- var n = Math.cos(p * e);
- var i = Math.sin(p * e);
- return t * (g * p * n - v * p * i) + f * t * (g * i + v * n);
- }
- };
- };
- Spring.prototype.x = function (e) {
- if (undefined === e) {
- e = (new Date().getTime() - this._startTime) / 1e3;
- }
- return this._solution ? this._endPosition + this._solution.x(e) : 0;
- };
- Spring.prototype.dx = function (e) {
- if (undefined === e) {
- e = (new Date().getTime() - this._startTime) / 1e3;
- }
- return this._solution ? this._solution.dx(e) : 0;
- };
- Spring.prototype.setEnd = function (e, n, i) {
- if (!i) {
- i = new Date().getTime();
- }
- if (e !== this._endPosition || !t(n, 0.1)) {
- n = n || 0;
- var r = this._endPosition;
- if (this._solution) {
- if (t(n, 0.1)) {
- n = this._solution.dx((i - this._startTime) / 1e3);
- }
- r = this._solution.x((i - this._startTime) / 1e3);
- if (t(n, 0.1)) {
- n = 0;
- }
- if (t(r, 0.1)) {
- r = 0;
- }
- r += this._endPosition;
- }
- if (!(this._solution && t(r - e, 0.1) && t(n, 0.1))) {
- this._endPosition = e;
- this._solution = this._solve(r - this._endPosition, n);
- this._startTime = i;
- }
- }
- };
- Spring.prototype.snap = function (e) {
- this._startTime = new Date().getTime();
- this._endPosition = e;
- this._solution = {
- x: function x() {
- return 0;
- },
- dx: function dx() {
- return 0;
- }
- };
- };
- Spring.prototype.done = function (n) {
- if (!n) {
- n = new Date().getTime();
- }
- return e(this.x(), this._endPosition, 0.1) && t(this.dx(), 0.1);
- };
- Spring.prototype.reconfigure = function (m, t, c) {
- this._m = m;
- this._k = t;
- this._c = c;
- if (!this.done()) {
- this._solution = this._solve(this.x() - this._endPosition, this.dx());
- this._startTime = new Date().getTime();
- }
- };
- Spring.prototype.springConstant = function () {
- return this._k;
- };
- Spring.prototype.damping = function () {
- return this._c;
- };
- Spring.prototype.configuration = function () {
- function e(e, t) {
- e.reconfigure(1, t, e.damping());
- }
- function t(e, t) {
- e.reconfigure(1, e.springConstant(), t);
- }
- return [{
- label: 'Spring Constant',
- read: this.springConstant.bind(this),
- write: e.bind(this, this),
- min: 100,
- max: 1e3
- }, {
- label: 'Damping',
- read: this.damping.bind(this),
- write: t.bind(this, this),
- min: 1,
- max: 500
- }];
- };
- function STD(e, t, n) {
- this._springX = new Spring(e, t, n);
- this._springY = new Spring(e, t, n);
- this._springScale = new Spring(e, t, n);
- this._startTime = 0;
- }
- STD.prototype.setEnd = function (e, t, n, i) {
- var r = new Date().getTime();
- this._springX.setEnd(e, i, r);
- this._springY.setEnd(t, i, r);
- this._springScale.setEnd(n, i, r);
- this._startTime = r;
- };
- STD.prototype.x = function () {
- var e = (new Date().getTime() - this._startTime) / 1e3;
- return {
- x: this._springX.x(e),
- y: this._springY.x(e),
- scale: this._springScale.x(e)
- };
- };
- STD.prototype.done = function () {
- var e = new Date().getTime();
- return this._springX.done(e) && this._springY.done(e) && this._springScale.done(e);
- };
- STD.prototype.reconfigure = function (e, t, n) {
- this._springX.reconfigure(e, t, n);
- this._springY.reconfigure(e, t, n);
- this._springScale.reconfigure(e, t, n);
- };
- // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
- var shared = __webpack_require__(1);
- // 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&
- //
- //
- //
- //
- //
- //
- var requesting = false;
- function _requestAnimationFrame(e) {
- if (!requesting) {
- requesting = true;
- requestAnimationFrame(function () {
- e();
- requesting = false;
- });
- }
- }
- function p(t, n) {
- if (t === n) {
- return 0;
- }
- var i = t.offsetLeft;
- return t.offsetParent ? i += p(t.offsetParent, n) : 0;
- }
- function f(t, n) {
- if (t === n) {
- return 0;
- }
- var i = t.offsetTop;
- return t.offsetParent ? i += f(t.offsetParent, n) : 0;
- }
- function v(a, b) {
- return +((1000 * a - 1000 * b) / 1000).toFixed(1);
- }
- function g(e, t, n) {
- var i = function i(e) {
- if (e && e.id) {
- cancelAnimationFrame(e.id);
- }
- if (e) {
- e.cancelled = true;
- }
- };
- var r = {
- id: 0,
- cancelled: false
- };
- function fn(n, i, r, o) {
- if (!n || !n.cancelled) {
- r(i);
- var a = e.done();
- if (!a) {
- if (!n.cancelled) {
- n.id = requestAnimationFrame(fn.bind(null, n, i, r, o));
- }
- }
- if (a && o) {
- o(i);
- }
- }
- }
- fn(r, e, t, n);
- return {
- cancel: i.bind(null, r),
- model: e
- };
- }
- /* harmony default export */ var movable_viewvue_type_script_lang_js_ = ({
- name: 'MovableView',
- mixins: [touchtrack["a" /* default */]],
- props: {
- direction: {
- type: String,
- default: 'none'
- },
- inertia: {
- type: [Boolean, String],
- default: false
- },
- outOfBounds: {
- type: [Boolean, String],
- default: false
- },
- x: {
- type: [Number, String],
- default: 0
- },
- y: {
- type: [Number, String],
- default: 0
- },
- damping: {
- type: [Number, String],
- default: 20
- },
- friction: {
- type: [Number, String],
- default: 2
- },
- disabled: {
- type: [Boolean, String],
- default: false
- },
- scale: {
- type: [Boolean, String],
- default: false
- },
- scaleMin: {
- type: [Number, String],
- default: 0.5
- },
- scaleMax: {
- type: [Number, String],
- default: 10
- },
- scaleValue: {
- type: [Number, String],
- default: 1
- },
- animation: {
- type: [Boolean, String],
- default: true
- }
- },
- data: function data() {
- return {
- xSync: this._getPx(this.x),
- ySync: this._getPx(this.y),
- scaleValueSync: Number(this.scaleValue) || 1,
- width: 0,
- height: 0,
- minX: 0,
- minY: 0,
- maxX: 0,
- maxY: 0
- };
- },
- computed: {
- dampingNumber: function dampingNumber() {
- var val = Number(this.damping);
- return isNaN(val) ? 20 : val;
- },
- frictionNumber: function frictionNumber() {
- var val = Number(this.friction);
- return isNaN(val) || val <= 0 ? 2 : val;
- },
- scaleMinNumber: function scaleMinNumber() {
- var val = Number(this.scaleMin);
- return isNaN(val) ? 0.5 : val;
- },
- scaleMaxNumber: function scaleMaxNumber() {
- var val = Number(this.scaleMax);
- return isNaN(val) ? 10 : val;
- },
- xMove: function xMove() {
- return this.direction === 'all' || this.direction === 'horizontal';
- },
- yMove: function yMove() {
- return this.direction === 'all' || this.direction === 'vertical';
- }
- },
- watch: {
- x: function x(val) {
- this.xSync = this._getPx(val);
- },
- xSync: function xSync(val) {
- this._setX(val);
- },
- y: function y(val) {
- this.ySync = this._getPx(val);
- },
- ySync: function ySync(val) {
- this._setY(val);
- },
- scaleValue: function scaleValue(val) {
- this.scaleValueSync = Number(val) || 0;
- },
- scaleValueSync: function scaleValueSync(val) {
- this._setScaleValue(val);
- },
- scaleMinNumber: function scaleMinNumber() {
- this._setScaleMinOrMax();
- },
- scaleMaxNumber: function scaleMaxNumber() {
- this._setScaleMinOrMax();
- }
- },
- created: function created() {
- this._offset = {
- x: 0,
- y: 0
- };
- this._scaleOffset = {
- x: 0,
- y: 0
- };
- this._translateX = 0;
- this._translateY = 0;
- this._scale = 1;
- this._oldScale = 1;
- this._STD = new STD(1, 9 * Math.pow(this.dampingNumber, 2) / 40, this.dampingNumber);
- this._friction = new Friction(1, this.frictionNumber);
- this._declineX = new Decline();
- this._declineY = new Decline();
- this.__touchInfo = {
- historyX: [0, 0],
- historyY: [0, 0],
- historyT: [0, 0]
- };
- },
- mounted: function mounted() {
- this.touchtrack(this.$el, '_onTrack');
- this.setParent();
- this._friction.reconfigure(1, this.frictionNumber);
- this._STD.reconfigure(1, 9 * Math.pow(this.dampingNumber, 2) / 40, this.dampingNumber);
- this.$el.style.transformOrigin = 'center';
- },
- methods: {
- _getPx: function _getPx(val) {
- if (/\d+[ur]px$/i.test(val)) {
- return uni.upx2px(parseFloat(val));
- }
- return Number(val) || 0;
- },
- _setX: function _setX(val) {
- if (this.xMove) {
- if (val + this._scaleOffset.x === this._translateX) {
- return this._translateX;
- } else {
- if (this._SFA) {
- this._SFA.cancel();
- }
- this._animationTo(val + this._scaleOffset.x, this.ySync + this._scaleOffset.y, this._scale);
- }
- }
- return val;
- },
- _setY: function _setY(val) {
- if (this.yMove) {
- if (val + this._scaleOffset.y === this._translateY) {
- return this._translateY;
- } else {
- if (this._SFA) {
- this._SFA.cancel();
- }
- this._animationTo(this.xSync + this._scaleOffset.x, val + this._scaleOffset.y, this._scale);
- }
- }
- return val;
- },
- _setScaleMinOrMax: function _setScaleMinOrMax() {
- if (!this.scale) {
- return false;
- }
- this._updateScale(this._scale, true);
- this._updateOldScale(this._scale);
- },
- _setScaleValue: function _setScaleValue(scale) {
- if (!this.scale) {
- return false;
- }
- scale = this._adjustScale(scale);
- this._updateScale(scale, true);
- this._updateOldScale(scale);
- return scale;
- },
- __handleTouchStart: function __handleTouchStart() {
- if (!this._isScaling) {
- if (!this.disabled) {
- Object(shared["b" /* disableScrollBounce */])({
- disable: true
- });
- if (this._FA) {
- this._FA.cancel();
- }
- if (this._SFA) {
- this._SFA.cancel();
- }
- this.__touchInfo.historyX = [0, 0];
- this.__touchInfo.historyY = [0, 0];
- this.__touchInfo.historyT = [0, 0];
- if (this.xMove) {
- this.__baseX = this._translateX;
- }
- if (this.yMove) {
- this.__baseY = this._translateY;
- }
- this.$el.style.willChange = 'transform';
- this._checkCanMove = null;
- this._firstMoveDirection = null;
- this._isTouching = true;
- }
- }
- },
- __handleTouchMove: function __handleTouchMove(event) {
- var self = this;
- if (!this._isScaling && !this.disabled && this._isTouching) {
- var x = this._translateX;
- var y = this._translateY;
- if (this._firstMoveDirection === null) {
- this._firstMoveDirection = Math.abs(event.detail.dx / event.detail.dy) > 1 ? 'htouchmove' : 'vtouchmove';
- }
- if (this.xMove) {
- x = event.detail.dx + this.__baseX;
- this.__touchInfo.historyX.shift();
- this.__touchInfo.historyX.push(x);
- if (!this.yMove && this._checkCanMove === null) {
- this._checkCanMove = Math.abs(event.detail.dx / event.detail.dy) < 1;
- }
- }
- if (this.yMove) {
- y = event.detail.dy + this.__baseY;
- this.__touchInfo.historyY.shift();
- this.__touchInfo.historyY.push(y);
- if (!this.xMove && this._checkCanMove === null) {
- this._checkCanMove = Math.abs(event.detail.dy / event.detail.dx) < 1;
- }
- }
- this.__touchInfo.historyT.shift();
- this.__touchInfo.historyT.push(event.detail.timeStamp);
- if (!this._checkCanMove) {
- event.preventDefault();
- var source = 'touch';
- if (x < this.minX) {
- if (this.outOfBounds) {
- source = 'touch-out-of-bounds';
- x = this.minX - this._declineX.x(this.minX - x);
- } else {
- x = this.minX;
- }
- } else if (x > this.maxX) {
- if (this.outOfBounds) {
- source = 'touch-out-of-bounds';
- x = this.maxX + this._declineX.x(x - this.maxX);
- } else {
- x = this.maxX;
- }
- }
- if (y < this.minY) {
- if (this.outOfBounds) {
- source = 'touch-out-of-bounds';
- y = this.minY - this._declineY.x(this.minY - y);
- } else {
- y = this.minY;
- }
- } else {
- if (y > this.maxY) {
- if (this.outOfBounds) {
- source = 'touch-out-of-bounds';
- y = this.maxY + this._declineY.x(y - this.maxY);
- } else {
- y = this.maxY;
- }
- }
- }
- _requestAnimationFrame(function () {
- self._setTransform(x, y, self._scale, source);
- });
- }
- }
- },
- __handleTouchEnd: function __handleTouchEnd() {
- var self = this;
- if (!this._isScaling && !this.disabled && this._isTouching) {
- Object(shared["b" /* disableScrollBounce */])({
- disable: false
- });
- this.$el.style.willChange = 'auto';
- this._isTouching = false;
- if (!this._checkCanMove && !this._revise('out-of-bounds') && this.inertia) {
- var xv = 1000 * (this.__touchInfo.historyX[1] - this.__touchInfo.historyX[0]) / (this.__touchInfo.historyT[1] - this.__touchInfo.historyT[0]);
- var yv = 1000 * (this.__touchInfo.historyY[1] - this.__touchInfo.historyY[0]) / (this.__touchInfo.historyT[1] - this.__touchInfo.historyT[0]);
- this._friction.setV(xv, yv);
- this._friction.setS(this._translateX, this._translateY);
- var x0 = this._friction.delta().x;
- var y0 = this._friction.delta().y;
- var x = x0 + this._translateX;
- var y = y0 + this._translateY;
- if (x < this.minX) {
- x = this.minX;
- y = this._translateY + (this.minX - this._translateX) * y0 / x0;
- } else {
- if (x > this.maxX) {
- x = this.maxX;
- y = this._translateY + (this.maxX - this._translateX) * y0 / x0;
- }
- }
- if (y < this.minY) {
- y = this.minY;
- x = this._translateX + (this.minY - this._translateY) * x0 / y0;
- } else {
- if (y > this.maxY) {
- y = this.maxY;
- x = this._translateX + (this.maxY - this._translateY) * x0 / y0;
- }
- }
- this._friction.setEnd(x, y);
- this._FA = g(this._friction, function () {
- var t = self._friction.s();
- var x = t.x;
- var y = t.y;
- self._setTransform(x, y, self._scale, 'friction');
- }, function () {
- self._FA.cancel();
- });
- }
- }
- },
- _onTrack: function _onTrack(event) {
- switch (event.detail.state) {
- case 'start':
- this.__handleTouchStart();
- break;
- case 'move':
- this.__handleTouchMove(event);
- break;
- case 'end':
- this.__handleTouchEnd();
- }
- },
- _getLimitXY: function _getLimitXY(x, y) {
- var outOfBounds = false;
- if (x > this.maxX) {
- x = this.maxX;
- outOfBounds = true;
- } else {
- if (x < this.minX) {
- x = this.minX;
- outOfBounds = true;
- }
- }
- if (y > this.maxY) {
- y = this.maxY;
- outOfBounds = true;
- } else {
- if (y < this.minY) {
- y = this.minY;
- outOfBounds = true;
- }
- }
- return {
- x: x,
- y: y,
- outOfBounds: outOfBounds
- };
- },
- setParent: function setParent() {
- if (!this.$parent._isMounted) {
- return;
- }
- if (this._FA) {
- this._FA.cancel();
- }
- if (this._SFA) {
- this._SFA.cancel();
- }
- var scale = this.scale ? this.scaleValueSync : 1;
- this._updateOffset();
- this._updateWH(scale);
- this._updateBoundary();
- this._translateX = this.xSync + this._scaleOffset.x;
- this._translateY = this.ySync + this._scaleOffset.y;
- var limitXY = this._getLimitXY(this._translateX, this._translateY);
- var x = limitXY.x;
- var y = limitXY.y;
- this._setTransform(x, y, scale, '', true);
- this._updateOldScale(scale);
- },
- _updateOffset: function _updateOffset() {
- this._offset.x = p(this.$el, this.$parent.$el);
- this._offset.y = f(this.$el, this.$parent.$el);
- },
- _updateWH: function _updateWH(scale) {
- scale = scale || this._scale;
- scale = this._adjustScale(scale);
- var rect = this.$el.getBoundingClientRect();
- this.height = rect.height / this._scale;
- this.width = rect.width / this._scale;
- var height = this.height * scale;
- var width = this.width * scale;
- this._scaleOffset.x = (width - this.width) / 2;
- this._scaleOffset.y = (height - this.height) / 2;
- },
- _updateBoundary: function _updateBoundary() {
- var x = 0 - this._offset.x + this._scaleOffset.x;
- var width = this.$parent.width - this.width - this._offset.x - this._scaleOffset.x;
- this.minX = Math.min(x, width);
- this.maxX = Math.max(x, width);
- var y = 0 - this._offset.y + this._scaleOffset.y;
- var height = this.$parent.height - this.height - this._offset.y - this._scaleOffset.y;
- this.minY = Math.min(y, height);
- this.maxY = Math.max(y, height);
- },
- _beginScale: function _beginScale() {
- this._isScaling = true;
- },
- _endScale: function _endScale() {
- this._isScaling = false;
- this._updateOldScale(this._scale);
- },
- _setScale: function _setScale(scale) {
- if (this.scale) {
- scale = this._adjustScale(scale);
- scale = this._oldScale * scale;
- this._beginScale();
- this._updateScale(scale);
- }
- },
- _updateScale: function _updateScale(scale, animat) {
- var self = this;
- if (this.scale) {
- scale = this._adjustScale(scale);
- this._updateWH(scale);
- this._updateBoundary();
- var limitXY = this._getLimitXY(this._translateX, this._translateY);
- var x = limitXY.x;
- var y = limitXY.y;
- if (animat) {
- this._animationTo(x, y, scale, '', true, true);
- } else {
- _requestAnimationFrame(function () {
- self._setTransform(x, y, scale, '', true, true);
- });
- }
- }
- },
- _updateOldScale: function _updateOldScale(scale) {
- this._oldScale = scale;
- },
- _adjustScale: function _adjustScale(scale) {
- scale = Math.max(0.5, this.scaleMinNumber, scale);
- scale = Math.min(10, this.scaleMaxNumber, scale);
- return scale;
- },
- _animationTo: function _animationTo(x, y, scale, source, r, o) {
- var self = this;
- if (this._FA) {
- this._FA.cancel();
- }
- if (this._SFA) {
- this._SFA.cancel();
- }
- if (!this.xMove) {
- x = this._translateX;
- }
- if (!this.yMove) {
- y = this._translateY;
- }
- if (!this.scale) {
- scale = this._scale;
- }
- var limitXY = this._getLimitXY(x, y);
- x = limitXY.x;
- y = limitXY.y;
- if (!this.animation) {
- this._setTransform(x, y, scale, source, r, o);
- return;
- }
- this._STD._springX._solution = null;
- this._STD._springY._solution = null;
- this._STD._springScale._solution = null;
- this._STD._springX._endPosition = this._translateX;
- this._STD._springY._endPosition = this._translateY;
- this._STD._springScale._endPosition = this._scale;
- this._STD.setEnd(x, y, scale, 1);
- this._SFA = g(this._STD, function () {
- var data = self._STD.x();
- var x = data.x;
- var y = data.y;
- var scale = data.scale;
- self._setTransform(x, y, scale, source, r, o);
- }, function () {
- self._SFA.cancel();
- });
- },
- _revise: function _revise(source) {
- var limitXY = this._getLimitXY(this._translateX, this._translateY);
- var x = limitXY.x;
- var y = limitXY.y;
- var outOfBounds = limitXY.outOfBounds;
- if (outOfBounds) {
- this._animationTo(x, y, this._scale, source);
- }
- return outOfBounds;
- },
- _setTransform: function _setTransform(x, y, scale) {
- var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
- var r = arguments.length > 4 ? arguments[4] : undefined;
- var o = arguments.length > 5 ? arguments[5] : undefined;
- if (!(x !== null && x.toString() !== 'NaN' && typeof x === 'number')) {
- x = this._translateX || 0;
- }
- if (!(y !== null && y.toString() !== 'NaN' && typeof y === 'number')) {
- y = this._translateY || 0;
- }
- x = Number(x.toFixed(1));
- y = Number(y.toFixed(1));
- scale = Number(scale.toFixed(1));
- if (!(this._translateX === x && this._translateY === y)) {
- if (!r) {
- this.$trigger('change', {}, {
- x: v(x, this._scaleOffset.x),
- y: v(y, this._scaleOffset.y),
- source: source
- });
- }
- }
- if (!this.scale) {
- scale = this._scale;
- }
- scale = this._adjustScale(scale);
- scale = +scale.toFixed(3);
- if (o && scale !== this._scale) {
- this.$trigger('scale', {}, {
- x: x,
- y: y,
- scale: scale
- });
- }
- var transform = 'translateX(' + x + 'px) translateY(' + y + 'px) translateZ(0px) scale(' + scale + ')';
- this.$el.style.transform = transform;
- this.$el.style.webkitTransform = transform;
- this._translateX = x;
- this._translateY = y;
- this._scale = scale;
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/movable-view/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_movable_viewvue_type_script_lang_js_ = (movable_viewvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/movable-view/index.vue?vue&type=style&index=0&lang=css&
- var movable_viewvue_type_style_index_0_lang_css_ = __webpack_require__(100);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/movable-view/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_movable_viewvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/movable-view/index.vue"
- /* harmony default export */ var movable_view = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 127 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-cover-image",
- _vm._g({ style: _vm.imageInfo, attrs: { src: _vm.src } }, _vm.$listeners),
- [_c("div", { ref: "container", staticClass: "uni-cover-image" })]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/cover-image/index.vue?vue&type=template&id=221fdf58&
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/mixins/native.js
- var mixins_native = __webpack_require__(7);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/mixins/cover.js
- var cover = __webpack_require__(63);
- // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
- var shared = __webpack_require__(1);
- // CONCATENATED MODULE: ./src/platforms/app-plus/service/api/constants.js
- var DEVICE_FREQUENCY = 200;
- var NETWORK_TYPES = ['unknown', 'none', 'ethernet', 'wifi', '2g', '3g', '4g'];
- var MAP_ID = '__UNIAPP_MAP';
- var TEMP_PATH_BASE = '_doc/uniapp_temp';
- var TEMP_PATH = "".concat(TEMP_PATH_BASE, "_").concat(Date.now());
- // 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&
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- /* harmony default export */ var cover_imagevue_type_script_lang_js_ = ({
- name: 'CoverImage',
- mixins: [mixins_native["a" /* default */], cover["a" /* default */]],
- props: {
- src: {
- type: String,
- default: ''
- },
- autoSize: {
- type: [Boolean, String],
- default: false
- }
- },
- data: function data() {
- return {
- coverType: 'image',
- coverContent: '',
- imageInfo: {}
- };
- },
- watch: {
- src: function src() {
- this.loadImage();
- }
- },
- created: function created() {
- this.loadImage();
- },
- beforeDestroy: function beforeDestroy() {
- var downloaTask = this.downloaTask;
- if (downloaTask && downloaTask.state < 4) {
- downloaTask.abort();
- }
- },
- methods: {
- loadImage: function loadImage() {
- var _this = this;
- this.coverContent = '';
- this.imageInfo = this.autoSize ? {
- width: 0,
- height: 0
- } : {};
- var realPath = this.src ? this.$getRealPath(this.src) : '';
- if (realPath.indexOf('http://') === 0 || realPath.indexOf('https://') === 0) {
- Object(shared["g" /* plusReady */])(function () {
- _this.downloaTask = plus.downloader.createDownload(realPath, {
- filename: TEMP_PATH + '/download/'
- }, function (task, status) {
- if (status === 200) {
- _this.getImageInfo(task.filename);
- } else {
- _this.$trigger('error', {}, {
- errMsg: 'error'
- });
- }
- }).start();
- });
- } else if (realPath) {
- this.getImageInfo(realPath);
- }
- },
- getImageInfo: function getImageInfo(src) {
- var _this2 = this;
- this.coverContent = src;
- Object(shared["g" /* plusReady */])(function () {
- plus.io.getImageInfo({
- src: src,
- success: function success(_ref) {
- var width = _ref.width,
- height = _ref.height;
- if (_this2.autoSize) {
- _this2.imageInfo = {
- width: "".concat(width, "px"),
- height: "".concat(height, "px")
- };
- if (_this2._isMounted) {
- _this2._requestPositionUpdate();
- }
- }
- _this2.$trigger('load', {}, {
- width: width,
- height: height
- });
- },
- fail: function fail() {
- _this2.$trigger('error', {}, {
- errMsg: 'error'
- });
- }
- });
- });
- }
- }
- });
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/cover-image/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_cover_imagevue_type_script_lang_js_ = (cover_imagevue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/cover-image/index.vue?vue&type=style&index=0&lang=css&
- var cover_imagevue_type_style_index_0_lang_css_ = __webpack_require__(118);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/cover-image/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_cover_imagevue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/platforms/app-plus/view/components/cover-image/index.vue"
- /* harmony default export */ var cover_image = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 128 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-checkbox-group",
- _vm._g({}, _vm.$listeners),
- [_vm._t("default")],
- 2
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=template&id=37cde58e&
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // 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&
- //
- //
- //
- //
- //
- //
- /* harmony default export */ var checkbox_groupvue_type_script_lang_js_ = ({
- name: 'CheckboxGroup',
- mixins: [mixins["a" /* emitter */], mixins["d" /* listeners */]],
- props: {
- name: {
- type: String,
- default: ''
- }
- },
- data: function data() {
- return {
- checkboxList: []
- };
- },
- listeners: {
- '@checkbox-change': '_changeHandler',
- '@checkbox-group-update': '_checkboxGroupUpdateHandler'
- },
- created: function created() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'add',
- vm: this
- });
- },
- beforeDestroy: function beforeDestroy() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'remove',
- vm: this
- });
- },
- methods: {
- _changeHandler: function _changeHandler($event) {
- var value = [];
- this.checkboxList.forEach(function (vm) {
- if (vm.checkboxChecked) {
- value.push(vm.value);
- }
- });
- this.$trigger('change', $event, {
- value: value
- });
- },
- _checkboxGroupUpdateHandler: function _checkboxGroupUpdateHandler($event) {
- if ($event.type === 'add') {
- this.checkboxList.push($event.vm);
- } else {
- var index = this.checkboxList.indexOf($event.vm);
- this.checkboxList.splice(index, 1);
- }
- },
- _getFormData: function _getFormData() {
- var data = {};
- if (this.name !== '') {
- var value = [];
- this.checkboxList.forEach(function (vm) {
- if (vm.checkboxChecked) {
- value.push(vm.value);
- }
- });
- data.value = value;
- data.key = this.name;
- }
- return data;
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_checkbox_groupvue_type_script_lang_js_ = (checkbox_groupvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=style&index=0&lang=css&
- var checkbox_groupvue_type_style_index_0_lang_css_ = __webpack_require__(92);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_checkbox_groupvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/checkbox-group/index.vue"
- /* harmony default export */ var checkbox_group = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 129 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-checkbox",
- _vm._g(
- { attrs: { disabled: _vm.disabled }, on: { click: _vm._onClick } },
- _vm.$listeners
- ),
- [
- _c(
- "div",
- { staticClass: "uni-checkbox-wrapper" },
- [
- _c("div", {
- staticClass: "uni-checkbox-input",
- class: [_vm.checkboxChecked ? "uni-checkbox-input-checked" : ""],
- style: { color: _vm.color }
- }),
- _vm._t("default")
- ],
- 2
- )
- ]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/checkbox/index.vue?vue&type=template&id=a63c1348&
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // 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&
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- /* harmony default export */ var checkboxvue_type_script_lang_js_ = ({
- name: 'Checkbox',
- mixins: [mixins["a" /* emitter */], mixins["d" /* listeners */]],
- props: {
- checked: {
- type: [Boolean, String],
- default: false
- },
- id: {
- type: String,
- default: ''
- },
- disabled: {
- type: [Boolean, String],
- default: false
- },
- color: {
- type: String,
- default: '#007aff'
- },
- value: {
- type: String,
- default: ''
- }
- },
- data: function data() {
- return {
- checkboxChecked: this.checked,
- checkboxValue: this.value
- };
- },
- watch: {
- checked: function checked(val) {
- this.checkboxChecked = val;
- },
- value: function value(val) {
- this.checkboxValue = val;
- }
- },
- listeners: {
- 'label-click': '_onClick',
- '@label-click': '_onClick'
- },
- created: function created() {
- this.$dispatch('CheckboxGroup', 'uni-checkbox-group-update', {
- type: 'add',
- vm: this
- });
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'add',
- vm: this
- });
- },
- beforeDestroy: function beforeDestroy() {
- this.$dispatch('CheckboxGroup', 'uni-checkbox-group-update', {
- type: 'remove',
- vm: this
- });
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'remove',
- vm: this
- });
- },
- methods: {
- _onClick: function _onClick($event) {
- if (this.disabled) {
- return;
- }
- this.checkboxChecked = !this.checkboxChecked;
- this.$dispatch('CheckboxGroup', 'uni-checkbox-change', $event);
- },
- _resetFormData: function _resetFormData() {
- this.checkboxChecked = false;
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/checkbox/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_checkboxvue_type_script_lang_js_ = (checkboxvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/checkbox/index.vue?vue&type=style&index=0&lang=css&
- var checkboxvue_type_style_index_0_lang_css_ = __webpack_require__(93);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/checkbox/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_checkboxvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/checkbox/index.vue"
- /* harmony default export */ var components_checkbox = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 130 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c("uni-form", _vm._g({}, _vm.$listeners), [
- _c("span", [_vm._t("default")], 2)
- ])
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/form/index.vue?vue&type=template&id=7735a91d&
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // 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&
- //
- //
- //
- //
- //
- //
- //
- /* harmony default export */ var formvue_type_script_lang_js_ = ({
- name: 'Form',
- mixins: [mixins["d" /* listeners */]],
- data: function data() {
- return {
- childrenList: []
- };
- },
- listeners: {
- '@form-submit': '_onSubmit',
- '@form-reset': '_onReset',
- '@form-group-update': '_formGroupUpdateHandler'
- },
- methods: {
- _onSubmit: function _onSubmit($event) {
- var data = {};
- this.childrenList.forEach(function (vm) {
- if (vm._getFormData && vm._getFormData().key) {
- data[vm._getFormData().key] = vm._getFormData().value;
- }
- });
- this.$trigger('submit', $event, {
- value: data
- });
- },
- _onReset: function _onReset($event) {
- this.$trigger('reset', $event, {});
- this.childrenList.forEach(function (vm) {
- vm._resetFormData && vm._resetFormData();
- });
- },
- _formGroupUpdateHandler: function _formGroupUpdateHandler($event) {
- if ($event.type === 'add') {
- this.childrenList.push($event.vm);
- } else {
- var index = this.childrenList.indexOf($event.vm);
- this.childrenList.splice(index, 1);
- }
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/form/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_formvue_type_script_lang_js_ = (formvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/form/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_formvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/form/index.vue"
- /* harmony default export */ var components_form = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 131 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c("uni-icon", _vm._g({}, _vm.$listeners), [
- _c("i", {
- class: "uni-icon-" + _vm.type,
- style: { "font-size": _vm._converPx(_vm.size), color: _vm.color },
- attrs: { role: "img" }
- })
- ])
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/icon/index.vue?vue&type=template&id=6c7a7a92&
- // 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&
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- /* harmony default export */ var iconvue_type_script_lang_js_ = ({
- name: 'Icon',
- props: {
- type: {
- type: String,
- required: true,
- default: ''
- },
- size: {
- type: [String, Number],
- default: 23
- },
- color: {
- type: String,
- default: ''
- }
- },
- methods: {
- _converPx: function _converPx(value) {
- if (/\d+[ur]px$/i.test(value)) {
- value.replace(/\d+[ur]px$/i, function (text) {
- return "".concat(uni.upx2px(parseFloat(text)), "px");
- }); // eslint-disable-next-line no-useless-escape
- } else if (/^-?[\d\.]+$/.test(value)) {
- return "".concat(value, "px");
- }
- return value || '';
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/icon/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_iconvue_type_script_lang_js_ = (iconvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/icon/index.vue?vue&type=style&index=0&lang=css&
- var iconvue_type_style_index_0_lang_css_ = __webpack_require__(95);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/icon/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_iconvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/icon/index.vue"
- /* harmony default export */ var icon = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 132 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-image",
- _vm._g({}, _vm.$listeners),
- [
- _c("div", { ref: "content", style: _vm.modeStyle }),
- _c("img", { attrs: { src: _vm.realImagePath } }),
- _vm.mode === "widthFix"
- ? _c("v-uni-resize-sensor", {
- ref: "sensor",
- on: { resize: _vm._resize }
- })
- : _vm._e()
- ],
- 1
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/image/index.vue?vue&type=template&id=c7af6f90&
- // 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&
- 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); }
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- /* harmony default export */ var imagevue_type_script_lang_js_ = ({
- name: 'Image',
- props: {
- src: {
- type: String,
- default: ''
- },
- mode: {
- type: String,
- default: 'scaleToFill'
- },
- // TODO 懒加载
- lazyLoad: {
- type: [Boolean, String],
- default: false
- }
- },
- data: function data() {
- return {
- originalWidth: 0,
- originalHeight: 0,
- availHeight: '',
- sizeFixed: false
- };
- },
- computed: {
- ratio: function ratio() {
- return this.originalWidth && this.originalHeight ? this.originalWidth / this.originalHeight : 0;
- },
- realImagePath: function realImagePath() {
- return this.src && this.$getRealPath(this.src);
- },
- modeStyle: function modeStyle() {
- var size = 'auto';
- var position = '';
- var repeat = 'no-repeat';
- switch (this.mode) {
- case 'aspectFit':
- size = 'contain';
- position = 'center center';
- break;
- case 'aspectFill':
- size = 'cover';
- position = 'center center';
- break;
- case 'widthFix':
- size = '100% 100%';
- break;
- case 'top':
- position = 'center top';
- break;
- case 'bottom':
- position = 'center bottom';
- break;
- case 'center':
- position = 'center center';
- break;
- case 'left':
- position = 'left center';
- break;
- case 'right':
- position = 'right center';
- break;
- case 'top left':
- position = 'left top';
- break;
- case 'top right':
- position = 'right top';
- break;
- case 'bottom left':
- position = 'left bottom';
- break;
- case 'bottom right':
- position = 'right bottom';
- break;
- default:
- size = '100% 100%';
- position = '0% 0%';
- break;
- }
- return "background-position:".concat(position, ";background-size:").concat(size, ";background-repeat:").concat(repeat, ";");
- }
- },
- watch: {
- src: function src(newValue, oldValue) {
- this._setContentImage();
- this._loadImage();
- },
- mode: function mode(newValue, oldValue) {
- if (oldValue === 'widthFix') {
- this.$el.style.height = this.availHeight;
- this.sizeFixed = false;
- }
- if (newValue === 'widthFix' && this.ratio) {
- this._fixSize();
- }
- }
- },
- mounted: function mounted() {
- this.availHeight = this.$el.style.height || '';
- this._setContentImage();
- if (!this.realImagePath) {
- return;
- }
- this._loadImage();
- },
- methods: {
- _resize: function _resize() {
- if (this.mode === 'widthFix' && !this.sizeFixed) {
- this._fixSize();
- }
- },
- _fixSize: function _fixSize() {
- var elWidth = this._getWidth();
- if (elWidth) {
- var height = elWidth / this.ratio; // fix: 解决 Chrome 浏览器上某些情况下导致 1px 缝隙的问题
- if ((typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) && navigator.vendor === 'Google Inc.' && height > 10) {
- height = Math.round(height / 2) * 2;
- }
- this.$el.style.height = height + 'px';
- this.sizeFixed = true;
- }
- },
- _setContentImage: function _setContentImage() {
- this.$refs.content.style.backgroundImage = this.src ? "url(\"".concat(this.realImagePath, "\")") : 'none';
- },
- _loadImage: function _loadImage() {
- var _self = this;
- var img = new Image();
- img.onload = function ($event) {
- _self.originalWidth = this.width;
- _self.originalHeight = this.height;
- if (_self.mode === 'widthFix') {
- _self._fixSize();
- }
- _self.$trigger('load', $event, {
- width: this.width,
- height: this.height
- });
- };
- img.onerror = function ($event) {
- _self.$trigger('error', $event, {
- errMsg: "GET ".concat(_self.src, " 404 (Not Found)")
- });
- };
- img.src = this.realImagePath;
- },
- _getWidth: function _getWidth() {
- var computedStyle = window.getComputedStyle(this.$el);
- var borderWidth = (parseFloat(computedStyle.borderLeftWidth, 10) || 0) + (parseFloat(computedStyle.borderRightWidth, 10) || 0);
- var paddingWidth = (parseFloat(computedStyle.paddingLeft, 10) || 0) + (parseFloat(computedStyle.paddingRight, 10) || 0);
- return this.$el.offsetWidth - borderWidth - paddingWidth;
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/image/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_imagevue_type_script_lang_js_ = (imagevue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/image/index.vue?vue&type=style&index=0&lang=css&
- var imagevue_type_style_index_0_lang_css_ = __webpack_require__(96);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/image/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_imagevue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/image/index.vue"
- /* harmony default export */ var components_image = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 133 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-input",
- _vm._g(
- {
- on: {
- change: function($event) {
- $event.stopPropagation()
- }
- }
- },
- _vm.$listeners
- ),
- [
- _c("div", { ref: "wrapper", staticClass: "uni-input-wrapper" }, [
- _c(
- "div",
- {
- directives: [
- {
- name: "show",
- rawName: "v-show",
- value: !(_vm.composing || _vm.inputValue.length),
- expression: "!(composing || inputValue.length)"
- }
- ],
- ref: "placeholder",
- staticClass: "uni-input-placeholder",
- class: _vm.placeholderClass,
- style: _vm.placeholderStyle
- },
- [_vm._v(" " + _vm._s(_vm.placeholder) + " ")]
- ),
- _vm.inputType === "checkbox"
- ? _c("input", {
- directives: [
- {
- name: "model",
- rawName: "v-model",
- value: _vm.inputValue,
- expression: "inputValue"
- }
- ],
- ref: "input",
- staticClass: "uni-input-input",
- attrs: {
- disabled: _vm.disabled,
- maxlength: _vm.maxlength,
- step: _vm.step,
- autocomplete: "off",
- type: "checkbox"
- },
- domProps: {
- checked: Array.isArray(_vm.inputValue)
- ? _vm._i(_vm.inputValue, null) > -1
- : _vm.inputValue
- },
- on: {
- focus: _vm._onFocus,
- blur: _vm._onBlur,
- input: function($event) {
- $event.stopPropagation()
- return _vm._onInput($event)
- },
- compositionstart: _vm._onComposition,
- compositionend: _vm._onComposition,
- keyup: function($event) {
- $event.stopPropagation()
- return _vm._onKeyup($event)
- },
- change: function($event) {
- var $$a = _vm.inputValue,
- $$el = $event.target,
- $$c = $$el.checked ? true : false
- if (Array.isArray($$a)) {
- var $$v = null,
- $$i = _vm._i($$a, $$v)
- if ($$el.checked) {
- $$i < 0 && (_vm.inputValue = $$a.concat([$$v]))
- } else {
- $$i > -1 &&
- (_vm.inputValue = $$a
- .slice(0, $$i)
- .concat($$a.slice($$i + 1)))
- }
- } else {
- _vm.inputValue = $$c
- }
- }
- }
- })
- : _vm.inputType === "radio"
- ? _c("input", {
- directives: [
- {
- name: "model",
- rawName: "v-model",
- value: _vm.inputValue,
- expression: "inputValue"
- }
- ],
- ref: "input",
- staticClass: "uni-input-input",
- attrs: {
- disabled: _vm.disabled,
- maxlength: _vm.maxlength,
- step: _vm.step,
- autocomplete: "off",
- type: "radio"
- },
- domProps: { checked: _vm._q(_vm.inputValue, null) },
- on: {
- focus: _vm._onFocus,
- blur: _vm._onBlur,
- input: function($event) {
- $event.stopPropagation()
- return _vm._onInput($event)
- },
- compositionstart: _vm._onComposition,
- compositionend: _vm._onComposition,
- keyup: function($event) {
- $event.stopPropagation()
- return _vm._onKeyup($event)
- },
- change: function($event) {
- _vm.inputValue = null
- }
- }
- })
- : _c("input", {
- directives: [
- {
- name: "model",
- rawName: "v-model",
- value: _vm.inputValue,
- expression: "inputValue"
- }
- ],
- ref: "input",
- staticClass: "uni-input-input",
- attrs: {
- disabled: _vm.disabled,
- maxlength: _vm.maxlength,
- step: _vm.step,
- autocomplete: "off",
- type: _vm.inputType
- },
- domProps: { value: _vm.inputValue },
- on: {
- focus: _vm._onFocus,
- blur: _vm._onBlur,
- input: [
- function($event) {
- if ($event.target.composing) {
- return
- }
- _vm.inputValue = $event.target.value
- },
- function($event) {
- $event.stopPropagation()
- return _vm._onInput($event)
- }
- ],
- compositionstart: _vm._onComposition,
- compositionend: _vm._onComposition,
- keyup: function($event) {
- $event.stopPropagation()
- return _vm._onKeyup($event)
- }
- }
- })
- ])
- ]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/input/index.vue?vue&type=template&id=c65e1032&
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // 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&
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var INPUT_TYPES = ['text', 'number', 'idcard', 'digit', 'password'];
- var NUMBER_TYPES = ['number', 'digit'];
- /* harmony default export */ var inputvue_type_script_lang_js_ = ({
- name: 'Input',
- mixins: [mixins["a" /* emitter */], mixins["c" /* keyboard */]],
- model: {
- prop: 'value',
- event: 'update:value'
- },
- props: {
- name: {
- type: String,
- default: ''
- },
- value: {
- type: [String, Number],
- default: ''
- },
- type: {
- type: String,
- default: 'text'
- },
- password: {
- type: [Boolean, String],
- default: false
- },
- placeholder: {
- type: String,
- default: ''
- },
- placeholderStyle: {
- type: String,
- default: ''
- },
- placeholderClass: {
- type: String,
- default: 'input-placeholder'
- },
- disabled: {
- type: [Boolean, String],
- default: false
- },
- maxlength: {
- type: [Number, String],
- default: 140
- },
- focus: {
- type: [Boolean, String],
- default: false
- },
- confirmType: {
- type: String,
- default: 'done'
- }
- },
- data: function data() {
- return {
- inputValue: this.value + '',
- composing: false,
- wrapperHeight: 0,
- cachedValue: ''
- };
- },
- computed: {
- inputType: function inputType() {
- var type = '';
- switch (this.type) {
- case 'text':
- this.confirmType === 'search' && (type = 'search');
- break;
- case 'idcard':
- // TODO 可能要根据不同平台进行区分处理
- type = 'text';
- break;
- case 'digit':
- type = 'number';
- break;
- default:
- type = ~INPUT_TYPES.indexOf(this.type) ? this.type : 'text';
- break;
- }
- return this.password ? 'password' : type;
- },
- step: function step() {
- // 处理部分设备中无法输入小数点的问题
- return ~NUMBER_TYPES.indexOf(this.type) ? '0.000000000000000001' : '';
- }
- },
- watch: {
- focus: function focus(value) {
- value && this._focusInput();
- },
- value: function value(_value) {
- this.inputValue = _value + '';
- },
- inputValue: function inputValue(value) {
- this.$emit('update:value', value);
- },
- maxlength: function maxlength(value) {
- var realValue = this.inputValue.slice(0, parseInt(value, 10));
- realValue !== this.inputValue && (this.inputValue = realValue);
- }
- },
- created: function created() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'add',
- vm: this
- });
- },
- mounted: function mounted() {
- if (this.confirmType === 'search') {
- var formElem = document.createElement('form');
- formElem.action = '';
- formElem.onsubmit = function () {
- return false;
- };
- formElem.className = 'uni-input-form';
- formElem.appendChild(this.$refs.input);
- this.$refs.wrapper.appendChild(formElem);
- }
- var $vm = this;
- while ($vm) {
- var scopeId = $vm.$options._scopeId;
- if (scopeId) {
- this.$refs.placeholder.setAttribute(scopeId, '');
- }
- $vm = $vm.$parent;
- }
- this.initKeyboard(this.$refs.input);
- this.focus && this._focusInput();
- },
- beforeDestroy: function beforeDestroy() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'remove',
- vm: this
- });
- },
- methods: {
- _onKeyup: function _onKeyup($event) {
- if ($event.keyCode === 13) {
- this.$trigger('confirm', $event, {
- value: $event.target.value
- });
- }
- },
- _onInput: function _onInput($event) {
- if (this.composing) {
- return;
- } // 处理部分输入法可以输入其它字符的情况
- if (~NUMBER_TYPES.indexOf(this.type)) {
- if (this.$refs.input.validity && !this.$refs.input.validity.valid) {
- $event.target.value = this.cachedValue;
- this.inputValue = $event.target.value; // 输入非法字符不触发 input 事件
- return;
- } else {
- this.cachedValue = this.inputValue;
- }
- } // type="number" 不支持 maxlength 属性,因此需要主动限制长度。
- if (this.inputType === 'number') {
- var maxlength = parseInt(this.maxlength, 10);
- if (maxlength > 0 && $event.target.value.length > maxlength) {
- $event.target.value = $event.target.value.slice(0, maxlength);
- this.inputValue = $event.target.value; // 字符长度超出范围不触发 input 事件
- return;
- }
- }
- this.$trigger('input', $event, {
- value: this.inputValue
- });
- },
- _onFocus: function _onFocus($event) {
- this.$trigger('focus', $event, {
- value: $event.target.value
- });
- },
- _onBlur: function _onBlur($event) {
- this.$trigger('blur', $event, {
- value: $event.target.value
- });
- },
- _focusInput: function _focusInput() {
- var _this = this;
- setTimeout(function () {
- _this.$refs.input.focus();
- }, 350);
- },
- _blurInput: function _blurInput() {
- var _this2 = this;
- setTimeout(function () {
- _this2.$refs.input.blur();
- }, 350);
- },
- _onComposition: function _onComposition($event) {
- if ($event.type === 'compositionstart') {
- this.composing = true;
- } else {
- this.composing = false;
- }
- },
- _resetFormData: function _resetFormData() {
- this.inputValue = '';
- },
- _getFormData: function _getFormData() {
- return this.name ? {
- value: this.inputValue,
- key: this.name
- } : {};
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/input/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_inputvue_type_script_lang_js_ = (inputvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/input/index.vue?vue&type=style&index=0&lang=css&
- var inputvue_type_style_index_0_lang_css_ = __webpack_require__(97);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/input/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_inputvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/input/index.vue"
- /* harmony default export */ var input = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 134 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _vm.hoverClass && _vm.hoverClass !== "none"
- ? _c(
- "uni-navigator",
- _vm._g(
- {
- class: [_vm.hovering ? _vm.hoverClass : ""],
- on: {
- touchstart: _vm._hoverTouchStart,
- touchend: _vm._hoverTouchEnd,
- touchcancel: _vm._hoverTouchCancel,
- click: _vm._onClick
- }
- },
- _vm.$listeners
- ),
- [_vm._t("default")],
- 2
- )
- : _c(
- "uni-navigator",
- _vm._g({ on: { click: _vm._onClick } }, _vm.$listeners),
- [_vm._t("default")],
- 2
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue?vue&type=template&id=c893a598&
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // 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&
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var OPEN_TYPES = ['navigate', 'redirect', 'switchTab', 'reLaunch', 'navigateBack'];
- /* harmony default export */ var navigatorvue_type_script_lang_js_ = ({
- name: 'Navigator',
- mixins: [mixins["b" /* hover */]],
- props: {
- hoverClass: {
- type: String,
- default: 'navigator-hover'
- },
- url: {
- type: String,
- default: ''
- },
- openType: {
- type: String,
- default: 'navigate',
- validator: function validator(value) {
- return ~OPEN_TYPES.indexOf(value);
- }
- },
- delta: {
- type: Number,
- default: 1
- },
- hoverStartTime: {
- type: [Number, String],
- default: 20
- },
- hoverStayTime: {
- type: [Number, String],
- default: 600
- }
- },
- methods: {
- _onClick: function _onClick($event) {
- if (this.openType !== 'navigateBack' && !this.url) {
- console.error('<navigator/> should have url attribute when using navigateTo, redirectTo, reLaunch or switchTab');
- return;
- }
- switch (this.openType) {
- case 'navigate':
- uni.navigateTo({
- url: this.url
- });
- break;
- case 'redirect':
- uni.redirectTo({
- url: this.url
- });
- break;
- case 'switchTab':
- uni.switchTab({
- url: this.url
- });
- break;
- case 'reLaunch':
- uni.reLaunch({
- url: this.url
- });
- break;
- case 'navigateBack':
- uni.navigateBack({
- delta: this.delta
- });
- break;
- default:
- break;
- }
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_navigatorvue_type_script_lang_js_ = (navigatorvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/navigator/index.vue?vue&type=style&index=0&lang=css&
- var navigatorvue_type_style_index_0_lang_css_ = __webpack_require__(101);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_navigatorvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/navigator/index.vue"
- /* harmony default export */ var components_navigator = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 135 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-progress",
- _vm._g({ staticClass: "uni-progress" }, _vm.$listeners),
- [
- _c("div", { staticClass: "uni-progress-bar", style: _vm.outerBarStyle }, [
- _c("div", {
- staticClass: "uni-progress-inner-bar",
- style: _vm.innerBarStyle
- })
- ]),
- _vm.showInfo
- ? [
- _c("p", { staticClass: "uni-progress-info" }, [
- _vm._v(" " + _vm._s(_vm.currentPercent) + "% ")
- ])
- ]
- : _vm._e()
- ],
- 2
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/progress/index.vue?vue&type=template&id=34f62046&
- // 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&
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var VALUES = {
- activeColor: '#007AFF',
- backgroundColor: '#EBEBEB',
- activeMode: 'backwards'
- };
- /* harmony default export */ var progressvue_type_script_lang_js_ = ({
- name: 'Progress',
- props: {
- percent: {
- type: [Number, String],
- default: 0,
- validator: function validator(value) {
- return !isNaN(parseFloat(value, 10));
- }
- },
- showInfo: {
- type: [Boolean, String],
- default: false
- },
- strokeWidth: {
- type: [Number, String],
- default: 6,
- validator: function validator(value) {
- return !isNaN(parseFloat(value, 10));
- }
- },
- color: {
- type: String,
- default: VALUES.activeColor
- },
- activeColor: {
- type: String,
- default: VALUES.activeColor
- },
- backgroundColor: {
- type: String,
- default: VALUES.backgroundColor
- },
- active: {
- type: [Boolean, String],
- default: false
- },
- activeMode: {
- type: String,
- default: VALUES.activeMode
- }
- },
- data: function data() {
- return {
- currentPercent: 0,
- strokeTimer: 0,
- lastPercent: 0
- };
- },
- computed: {
- outerBarStyle: function outerBarStyle() {
- return "background-color: ".concat(this.backgroundColor, "; height: ").concat(this.strokeWidth, "px;");
- },
- innerBarStyle: function innerBarStyle() {
- // 兼容下不推荐的属性,activeColor 优先级高于 color。
- var backgroundColor = '';
- if (this.color !== VALUES.activeColor && this.activeColor === VALUES.activeColor) {
- backgroundColor = this.color;
- } else {
- backgroundColor = this.activeColor;
- }
- return "width: ".concat(this.currentPercent, "%;background-color: ").concat(backgroundColor);
- },
- realPercent: function realPercent() {
- // 确保最终计算时使用的是 Number 类型的值,并且在有效范围内。
- var realValue = parseFloat(this.percent, 10);
- realValue < 0 && (realValue = 0);
- realValue > 100 && (realValue = 100);
- return realValue;
- }
- },
- watch: {
- realPercent: function realPercent(newValue, oldValue) {
- this.strokeTimer && clearInterval(this.strokeTimer);
- this.lastPercent = oldValue || 0;
- this._activeAnimation();
- }
- },
- created: function created() {
- this._activeAnimation();
- },
- methods: {
- _activeAnimation: function _activeAnimation() {
- var _this = this;
- if (this.active) {
- this.currentPercent = this.activeMode === VALUES.activeMode ? 0 : this.lastPercent;
- this.strokeTimer = setInterval(function () {
- if (_this.currentPercent + 1 > _this.realPercent) {
- _this.currentPercent = _this.realPercent;
- _this.strokeTimer && clearInterval(_this.strokeTimer);
- } else {
- _this.currentPercent += 1;
- }
- }, 30);
- } else {
- this.currentPercent = this.realPercent;
- }
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/progress/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_progressvue_type_script_lang_js_ = (progressvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/progress/index.vue?vue&type=style&index=0&lang=css&
- var progressvue_type_style_index_0_lang_css_ = __webpack_require__(104);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/progress/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_progressvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/progress/index.vue"
- /* harmony default export */ var progress = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 136 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-radio-group",
- _vm._g({}, _vm.$listeners),
- [_vm._t("default")],
- 2
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/radio-group/index.vue?vue&type=template&id=17be8d0a&
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // 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&
- //
- //
- //
- //
- //
- //
- /* harmony default export */ var radio_groupvue_type_script_lang_js_ = ({
- name: 'RadioGroup',
- mixins: [mixins["a" /* emitter */], mixins["d" /* listeners */]],
- props: {
- name: {
- type: String,
- default: ''
- }
- },
- data: function data() {
- return {
- radioList: []
- };
- },
- listeners: {
- '@radio-change': '_changeHandler',
- '@radio-group-update': '_radioGroupUpdateHandler'
- },
- mounted: function mounted() {
- this._resetRadioGroupValue(this.radioList.length - 1);
- },
- created: function created() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'add',
- vm: this
- });
- },
- beforeDestroy: function beforeDestroy() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'remove',
- vm: this
- });
- },
- methods: {
- _changeHandler: function _changeHandler($event, vm) {
- var index = this.radioList.indexOf(vm);
- this._resetRadioGroupValue(index, true);
- this.$trigger('change', $event, {
- value: vm.radioValue
- });
- },
- _radioGroupUpdateHandler: function _radioGroupUpdateHandler($event) {
- if ($event.type === 'add') {
- this.radioList.push($event.vm);
- } else {
- var index = this.radioList.indexOf($event.vm);
- this.radioList.splice(index, 1);
- }
- },
- _resetRadioGroupValue: function _resetRadioGroupValue(key, change) {
- var _this = this;
- this.radioList.forEach(function (value, index) {
- if (index === key) {
- return;
- }
- if (change) {
- _this.radioList[index].radioChecked = false;
- } else {
- _this.radioList.forEach(function (v, i) {
- if (index >= i) {
- return;
- }
- if (_this.radioList[i].radioChecked) {
- _this.radioList[index].radioChecked = false;
- }
- });
- }
- });
- },
- _getFormData: function _getFormData() {
- var data = {};
- if (this.name !== '') {
- var value = '';
- this.radioList.forEach(function (vm) {
- if (vm.radioChecked) {
- value = vm.value;
- }
- });
- data.value = value;
- data.key = this.name;
- }
- return data;
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/radio-group/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_radio_groupvue_type_script_lang_js_ = (radio_groupvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/radio-group/index.vue?vue&type=style&index=0&lang=css&
- var radio_groupvue_type_style_index_0_lang_css_ = __webpack_require__(105);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/radio-group/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_radio_groupvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/radio-group/index.vue"
- /* harmony default export */ var radio_group = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 137 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-radio",
- _vm._g(
- { attrs: { disabled: _vm.disabled }, on: { click: _vm._onClick } },
- _vm.$listeners
- ),
- [
- _c(
- "div",
- { staticClass: "uni-radio-wrapper" },
- [
- _c("div", {
- staticClass: "uni-radio-input",
- class: _vm.radioChecked ? "uni-radio-input-checked" : "",
- style: _vm.radioChecked ? _vm.checkedStyle : ""
- }),
- _vm._t("default")
- ],
- 2
- )
- ]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/radio/index.vue?vue&type=template&id=4b562a50&
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // 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&
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- /* harmony default export */ var radiovue_type_script_lang_js_ = ({
- name: 'Radio',
- mixins: [mixins["a" /* emitter */], mixins["d" /* listeners */]],
- props: {
- checked: {
- type: [Boolean, String],
- default: false
- },
- id: {
- type: String,
- default: ''
- },
- disabled: {
- type: [Boolean, String],
- default: false
- },
- color: {
- type: String,
- default: '#007AFF'
- },
- value: {
- type: String,
- default: ''
- }
- },
- data: function data() {
- return {
- radioChecked: this.checked,
- radioValue: this.value
- };
- },
- computed: {
- checkedStyle: function checkedStyle() {
- return "background-color: ".concat(this.color, ";border-color: ").concat(this.color, ";");
- }
- },
- watch: {
- checked: function checked(val) {
- this.radioChecked = val;
- },
- value: function value(val) {
- this.radioValue = val;
- }
- },
- listeners: {
- 'label-click': '_onClick',
- '@label-click': '_onClick'
- },
- created: function created() {
- this.$dispatch('RadioGroup', 'uni-radio-group-update', {
- type: 'add',
- vm: this
- });
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'add',
- vm: this
- });
- },
- beforeDestroy: function beforeDestroy() {
- this.$dispatch('RadioGroup', 'uni-radio-group-update', {
- type: 'remove',
- vm: this
- });
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'remove',
- vm: this
- });
- },
- methods: {
- _onClick: function _onClick($event) {
- if (this.disabled || this.radioChecked) {
- return;
- }
- this.radioChecked = true;
- this.$dispatch('RadioGroup', 'uni-radio-change', $event, this);
- },
- _resetFormData: function _resetFormData() {
- this.radioChecked = this.min;
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/radio/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_radiovue_type_script_lang_js_ = (radiovue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/radio/index.vue?vue&type=style&index=0&lang=css&
- var radiovue_type_style_index_0_lang_css_ = __webpack_require__(106);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/radio/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_radiovue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/radio/index.vue"
- /* harmony default export */ var components_radio = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 138 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c("uni-scroll-view", _vm._g({}, _vm.$listeners), [
- _c("div", { ref: "wrap", staticClass: "uni-scroll-view" }, [
- _c(
- "div",
- {
- ref: "main",
- staticClass: "uni-scroll-view",
- style: {
- "overflow-x": _vm.scrollX ? "auto" : "hidden",
- "overflow-y": _vm.scrollY ? "auto" : "hidden"
- }
- },
- [
- _c(
- "div",
- { ref: "content" },
- [
- _vm.refresherEnabled
- ? _c(
- "div",
- {
- ref: "refresherinner",
- staticClass: "uni-scroll-view-refresher",
- style: {
- "background-color": _vm.refresherBackground,
- height: _vm.refresherHeight + "px"
- }
- },
- [
- _vm.refresherDefaultStyle !== "none"
- ? _c(
- "div",
- { staticClass: "uni-scroll-view-refresh" },
- [
- _c(
- "div",
- {
- staticClass: "uni-scroll-view-refresh-inner"
- },
- [
- _vm.refreshState == "pulling"
- ? _c(
- "svg",
- {
- staticClass:
- "uni-scroll-view-refresh__icon",
- style: {
- transform:
- "rotate(" +
- _vm.refreshRotate +
- "deg)"
- },
- attrs: {
- fill: "#2BD009",
- width: "24",
- height: "24",
- viewBox: "0 0 24 24"
- }
- },
- [
- _c("path", {
- attrs: {
- d:
- "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"
- }
- }),
- _c("path", {
- attrs: {
- d: "M0 0h24v24H0z",
- fill: "none"
- }
- })
- ]
- )
- : _vm._e(),
- _vm.refreshState == "refreshing"
- ? _c(
- "svg",
- {
- staticClass:
- "uni-scroll-view-refresh__spinner",
- attrs: {
- width: "24",
- height: "24",
- viewBox: "25 25 50 50"
- }
- },
- [
- _c("circle", {
- staticStyle: { color: "#2BD009" },
- attrs: {
- cx: "50",
- cy: "50",
- r: "20",
- fill: "none",
- "stroke-width": "3"
- }
- })
- ]
- )
- : _vm._e()
- ]
- )
- ]
- )
- : _vm._e(),
- _vm.refresherDefaultStyle == "none"
- ? _vm._t("refresher")
- : _vm._e()
- ],
- 2
- )
- : _vm._e(),
- _vm._t("default")
- ],
- 2
- )
- ]
- )
- ])
- ])
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/scroll-view/index.vue?vue&type=template&id=e9d562fc&
- // EXTERNAL MODULE: ./src/core/view/mixins/scroller/index.js + 2 modules
- var scroller = __webpack_require__(64);
- // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
- var shared = __webpack_require__(1);
- // 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&
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var passiveOptions = shared["h" /* supportsPassive */] ? {
- passive: true
- } : false; // const PULLING = 'pulling'
- // const REFRESHING = 'refreshing'
- /* harmony default export */ var scroll_viewvue_type_script_lang_js_ = ({
- name: 'ScrollView',
- mixins: [scroller["a" /* default */]],
- props: {
- scrollX: {
- type: [Boolean, String],
- default: false
- },
- scrollY: {
- type: [Boolean, String],
- default: false
- },
- upperThreshold: {
- type: [Number, String],
- default: 50
- },
- lowerThreshold: {
- type: [Number, String],
- default: 50
- },
- scrollTop: {
- type: [Number, String],
- default: 0
- },
- scrollLeft: {
- type: [Number, String],
- default: 0
- },
- scrollIntoView: {
- type: String,
- default: ''
- },
- scrollWithAnimation: {
- type: [Boolean, String],
- default: false
- },
- enableBackToTop: {
- type: [Boolean, String],
- default: false
- },
- refresherEnabled: {
- type: [Boolean, String],
- default: false
- },
- refresherThreshold: {
- type: Number,
- default: 45
- },
- refresherDefaultStyle: {
- type: String,
- default: 'back'
- },
- refresherBackground: {
- type: String,
- default: '#fff'
- },
- refresherTriggered: {
- type: [Boolean, String],
- default: false
- }
- },
- data: function data() {
- return {
- lastScrollTop: this.scrollTopNumber,
- lastScrollLeft: this.scrollLeftNumber,
- lastScrollToUpperTime: 0,
- lastScrollToLowerTime: 0,
- refresherHeight: 0,
- refreshRotate: 0,
- refreshState: ''
- };
- },
- computed: {
- upperThresholdNumber: function upperThresholdNumber() {
- var val = Number(this.upperThreshold);
- return isNaN(val) ? 50 : val;
- },
- lowerThresholdNumber: function lowerThresholdNumber() {
- var val = Number(this.lowerThreshold);
- return isNaN(val) ? 50 : val;
- },
- scrollTopNumber: function scrollTopNumber() {
- return Number(this.scrollTop) || 0;
- },
- scrollLeftNumber: function scrollLeftNumber() {
- return Number(this.scrollLeft) || 0;
- }
- },
- watch: {
- scrollTopNumber: function scrollTopNumber(val) {
- this._scrollTopChanged(val);
- },
- scrollLeftNumber: function scrollLeftNumber(val) {
- this._scrollLeftChanged(val);
- },
- scrollIntoView: function scrollIntoView(val) {
- this._scrollIntoViewChanged(val);
- },
- refresherTriggered: function refresherTriggered(val) {
- // TODO
- if (val === true) {
- this._setRefreshState('refreshing');
- } else if (val === false) {
- this._setRefreshState('restore');
- }
- }
- },
- mounted: function mounted() {
- var self = this;
- this._attached = true;
- this._scrollTopChanged(this.scrollTopNumber);
- this._scrollLeftChanged(this.scrollLeftNumber);
- this._scrollIntoViewChanged(this.scrollIntoView);
- this.__handleScroll = function (e) {
- event.preventDefault();
- event.stopPropagation();
- self._handleScroll.bind(self, event)();
- };
- var touchStart = null;
- var needStop = null;
- this.__handleTouchMove = function (event) {
- var x = event.touches[0].pageX;
- var y = event.touches[0].pageY;
- var main = self.$refs.main;
- if (needStop === null) {
- if (Math.abs(x - touchStart.x) > Math.abs(y - touchStart.y)) {
- // 横向滑动
- if (self.scrollX) {
- if (main.scrollLeft === 0 && x > touchStart.x) {
- needStop = false;
- return;
- } else if (main.scrollWidth === main.offsetWidth + main.scrollLeft && x < touchStart.x) {
- needStop = false;
- return;
- }
- needStop = true;
- } else {
- needStop = false;
- }
- } else {
- // 纵向滑动
- if (self.scrollY) {
- if (main.scrollTop === 0 && y > touchStart.y) {
- needStop = false;
- return;
- } else if (main.scrollHeight === main.offsetHeight + main.scrollTop && y < touchStart.y) {
- needStop = false;
- return;
- }
- needStop = true;
- } else {
- needStop = false;
- }
- }
- }
- if (needStop) {
- event.stopPropagation();
- }
- if (self.refresherEnabled && self.refreshState === 'pulling') {
- var dy = y - touchStart.y;
- self.refresherHeight = dy;
- var rotate = dy / self.refresherThreshold;
- if (rotate > 1) {
- rotate = 1;
- } else {
- rotate = rotate * 360;
- }
- self.refreshRotate = rotate;
- self.$trigger('refresherpulling', event, {
- deltaY: dy
- });
- }
- };
- this.__handleTouchStart = function (event) {
- if (event.touches.length === 1) {
- Object(shared["b" /* disableScrollBounce */])({
- disable: true
- });
- needStop = null;
- touchStart = {
- x: event.touches[0].pageX,
- y: event.touches[0].pageY
- };
- if (self.refresherEnabled && self.refreshState !== 'refreshing' && self.$refs.main.scrollTop === 0) {
- self.refreshState = 'pulling';
- }
- }
- };
- this.__handleTouchEnd = function (event) {
- touchStart = null;
- Object(shared["b" /* disableScrollBounce */])({
- disable: false
- });
- if (self.refresherHeight >= self.refresherThreshold) {
- self._setRefreshState('refreshing');
- } else {
- self.refresherHeight = 0;
- self.$trigger('refresherabort', event, {});
- }
- };
- this.$refs.main.addEventListener('touchstart', this.__handleTouchStart, passiveOptions);
- this.$refs.main.addEventListener('touchmove', this.__handleTouchMove, passiveOptions);
- this.$refs.main.addEventListener('scroll', this.__handleScroll, shared["h" /* supportsPassive */] ? {
- passive: false
- } : false);
- this.$refs.main.addEventListener('touchend', this.__handleTouchEnd, passiveOptions);
- },
- activated: function activated() {
- // 还原 scroll-view 滚动位置
- this.scrollY && (this.$refs.main.scrollTop = this.lastScrollTop);
- this.scrollX && (this.$refs.main.scrollLeft = this.lastScrollLeft);
- },
- beforeDestroy: function beforeDestroy() {
- this.$refs.main.removeEventListener('touchstart', this.__handleTouchStart, passiveOptions);
- this.$refs.main.removeEventListener('touchmove', this.__handleTouchMove, passiveOptions);
- this.$refs.main.removeEventListener('scroll', this.__handleScroll, shared["h" /* supportsPassive */] ? {
- passive: false
- } : false);
- this.$refs.main.removeEventListener('touchend', this.__handleTouchEnd, passiveOptions);
- },
- methods: {
- scrollTo: function scrollTo(t, n) {
- var i = this.$refs.main;
- 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);
- var r = 0;
- var o = '';
- n === 'x' ? r = i.scrollLeft - t : n === 'y' && (r = i.scrollTop - t);
- if (r !== 0) {
- this.$refs.content.style.transition = 'transform .3s ease-out';
- this.$refs.content.style.webkitTransition = '-webkit-transform .3s ease-out';
- if (n === 'x') {
- o = 'translateX(' + r + 'px) translateZ(0)';
- } else {
- n === 'y' && (o = 'translateY(' + r + 'px) translateZ(0)');
- }
- this.$refs.content.removeEventListener('transitionend', this.__transitionEnd);
- this.$refs.content.removeEventListener('webkitTransitionEnd', this.__transitionEnd);
- this.__transitionEnd = this._transitionEnd.bind(this, t, n);
- this.$refs.content.addEventListener('transitionend', this.__transitionEnd);
- this.$refs.content.addEventListener('webkitTransitionEnd', this.__transitionEnd);
- if (n === 'x') {
- // if (e !== 'ios') {
- i.style.overflowX = 'hidden'; // }
- } else if (n === 'y') {
- i.style.overflowY = 'hidden';
- }
- this.$refs.content.style.transform = o;
- this.$refs.content.style.webkitTransform = o;
- }
- },
- _handleTrack: function _handleTrack($event) {
- if ($event.detail.state === 'start') {
- this._x = $event.detail.x;
- this._y = $event.detail.y;
- this._noBubble = null;
- return;
- }
- if ($event.detail.state === 'end') {
- this._noBubble = false;
- }
- if (this._noBubble === null && this.scrollY) {
- if (Math.abs(this._y - $event.detail.y) / Math.abs(this._x - $event.detail.x) > 1) {
- this._noBubble = true;
- } else {
- this._noBubble = false;
- }
- }
- if (this._noBubble === null && this.scrollX) {
- if (Math.abs(this._x - $event.detail.x) / Math.abs(this._y - $event.detail.y) > 1) {
- this._noBubble = true;
- } else {
- this._noBubble = false;
- }
- }
- this._x = $event.detail.x;
- this._y = $event.detail.y;
- if (this._noBubble) {
- $event.stopPropagation();
- }
- },
- _handleScroll: function _handleScroll($event) {
- if (!($event.timeStamp - this._lastScrollTime < 20)) {
- this._lastScrollTime = $event.timeStamp;
- var target = $event.target;
- this.$trigger('scroll', $event, {
- scrollLeft: target.scrollLeft,
- scrollTop: target.scrollTop,
- scrollHeight: target.scrollHeight,
- scrollWidth: target.scrollWidth,
- deltaX: this.lastScrollLeft - target.scrollLeft,
- deltaY: this.lastScrollTop - target.scrollTop
- });
- if (this.scrollY) {
- if (target.scrollTop <= this.upperThresholdNumber && this.lastScrollTop - target.scrollTop > 0 && $event.timeStamp - this.lastScrollToUpperTime > 200) {
- this.$trigger('scrolltoupper', $event, {
- direction: 'top'
- });
- this.lastScrollToUpperTime = $event.timeStamp;
- }
- if (target.scrollTop + target.offsetHeight + this.lowerThresholdNumber >= target.scrollHeight && this.lastScrollTop - target.scrollTop < 0 && $event.timeStamp - this.lastScrollToLowerTime > 200) {
- this.$trigger('scrolltolower', $event, {
- direction: 'bottom'
- });
- this.lastScrollToLowerTime = $event.timeStamp;
- }
- }
- if (this.scrollX) {
- if (target.scrollLeft <= this.upperThresholdNumber && this.lastScrollLeft - target.scrollLeft > 0 && $event.timeStamp - this.lastScrollToUpperTime > 200) {
- this.$trigger('scrolltoupper', $event, {
- direction: 'left'
- });
- this.lastScrollToUpperTime = $event.timeStamp;
- }
- if (target.scrollLeft + target.offsetWidth + this.lowerThresholdNumber >= target.scrollWidth && this.lastScrollLeft - target.scrollLeft < 0 && $event.timeStamp - this.lastScrollToLowerTime > 200) {
- this.$trigger('scrolltolower', $event, {
- direction: 'right'
- });
- this.lastScrollToLowerTime = $event.timeStamp;
- }
- }
- this.lastScrollTop = target.scrollTop;
- this.lastScrollLeft = target.scrollLeft;
- }
- },
- _scrollTopChanged: function _scrollTopChanged(val) {
- if (this.scrollY) {
- if (this._innerSetScrollTop) {
- this._innerSetScrollTop = false;
- } else {
- if (this.scrollWithAnimation) {
- this.scrollTo(val, 'y');
- } else {
- this.$refs.main.scrollTop = val;
- }
- }
- }
- },
- _scrollLeftChanged: function _scrollLeftChanged(val) {
- if (this.scrollX) {
- if (this._innerSetScrollLeft) {
- this._innerSetScrollLeft = false;
- } else {
- if (this.scrollWithAnimation) {
- this.scrollTo(val, 'x');
- } else {
- this.$refs.main.scrollLeft = val;
- }
- }
- }
- },
- _scrollIntoViewChanged: function _scrollIntoViewChanged(val) {
- if (val) {
- if (!/^[_a-zA-Z][-_a-zA-Z0-9:]*$/.test(val)) {
- console.group('scroll-into-view="' + val + '" 有误');
- console.error('id 属性值格式错误。如不能以数字开头。');
- console.groupEnd();
- return;
- }
- var element = this.$el.querySelector('#' + val);
- if (element) {
- var mainRect = this.$refs.main.getBoundingClientRect();
- var elRect = element.getBoundingClientRect();
- if (this.scrollX) {
- var left = elRect.left - mainRect.left;
- var scrollLeft = this.$refs.main.scrollLeft;
- var x = scrollLeft + left;
- if (this.scrollWithAnimation) {
- this.scrollTo(x, 'x');
- } else {
- this.$refs.main.scrollLeft = x;
- }
- }
- if (this.scrollY) {
- var top = elRect.top - mainRect.top;
- var scrollTop = this.$refs.main.scrollTop;
- var y = scrollTop + top;
- if (this.scrollWithAnimation) {
- this.scrollTo(y, 'y');
- } else {
- this.$refs.main.scrollTop = y;
- }
- }
- }
- }
- },
- _transitionEnd: function _transitionEnd(val, type) {
- this.$refs.content.style.transition = '';
- this.$refs.content.style.webkitTransition = '';
- this.$refs.content.style.transform = '';
- this.$refs.content.style.webkitTransform = '';
- var main = this.$refs.main;
- if (type === 'x') {
- main.style.overflowX = this.scrollX ? 'auto' : 'hidden';
- main.scrollLeft = val;
- } else if (type === 'y') {
- main.style.overflowY = this.scrollY ? 'auto' : 'hidden';
- main.scrollTop = val;
- }
- this.$refs.content.removeEventListener('transitionend', this.__transitionEnd);
- this.$refs.content.removeEventListener('webkitTransitionEnd', this.__transitionEnd);
- },
- _setRefreshState: function _setRefreshState(state) {
- switch (state) {
- case 'refreshing':
- this.refresherHeight = this.refresherThreshold;
- this.$trigger('refresherrefresh', event, {});
- break;
- case 'restore':
- this.refresherHeight = 0;
- this.$trigger('refresherrestore', {}, {});
- break;
- }
- this.refreshState = state;
- },
- getScrollPosition: function getScrollPosition() {
- var main = this.$refs.main;
- return {
- scrollLeft: main.scrollLeft,
- scrollTop: main.scrollTop
- };
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/scroll-view/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_scroll_viewvue_type_script_lang_js_ = (scroll_viewvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/scroll-view/index.vue?vue&type=style&index=0&lang=css&
- var scroll_viewvue_type_style_index_0_lang_css_ = __webpack_require__(108);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/scroll-view/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_scroll_viewvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/scroll-view/index.vue"
- /* harmony default export */ var scroll_view = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 139 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-slider",
- _vm._g({ ref: "uni-slider", on: { click: _vm._onClick } }, _vm.$listeners),
- [
- _c("div", { staticClass: "uni-slider-wrapper" }, [
- _c("div", { staticClass: "uni-slider-tap-area" }, [
- _c(
- "div",
- { staticClass: "uni-slider-handle-wrapper", style: _vm.setBgColor },
- [
- _c("div", {
- ref: "uni-slider-handle",
- staticClass: "uni-slider-handle",
- style: _vm.setBlockBg
- }),
- _c("div", {
- staticClass: "uni-slider-thumb",
- style: _vm.setBlockStyle
- }),
- _c("div", {
- staticClass: "uni-slider-track",
- style: _vm.setActiveColor
- })
- ]
- )
- ]),
- _c(
- "span",
- {
- directives: [
- {
- name: "show",
- rawName: "v-show",
- value: _vm.showValue,
- expression: "showValue"
- }
- ],
- staticClass: "uni-slider-value"
- },
- [_vm._v(_vm._s(_vm.sliderValue))]
- )
- ]),
- _vm._t("default")
- ],
- 2
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/slider/index.vue?vue&type=template&id=1969bd7a&
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // EXTERNAL MODULE: ./src/core/view/mixins/touchtrack.js
- var touchtrack = __webpack_require__(9);
- // 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&
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- /* harmony default export */ var slidervue_type_script_lang_js_ = ({
- name: 'Slider',
- mixins: [mixins["a" /* emitter */], mixins["d" /* listeners */], touchtrack["a" /* default */]],
- props: {
- name: {
- type: String,
- default: ''
- },
- min: {
- type: [Number, String],
- default: 0
- },
- max: {
- type: [Number, String],
- default: 100
- },
- value: {
- type: [Number, String],
- default: 0
- },
- step: {
- type: [Number, String],
- default: 1
- },
- disabled: {
- type: [Boolean, String],
- default: false
- },
- color: {
- type: String,
- default: '#e9e9e9'
- },
- backgroundColor: {
- type: String,
- default: '#e9e9e9'
- },
- activeColor: {
- type: String,
- default: '#007aff'
- },
- selectedColor: {
- type: String,
- default: '#007aff'
- },
- blockColor: {
- type: String,
- default: '#ffffff'
- },
- blockSize: {
- type: [Number, String],
- default: 28
- },
- showValue: {
- type: [Boolean, String],
- default: false
- }
- },
- data: function data() {
- return {
- sliderValue: Number(this.value)
- };
- },
- computed: {
- setBlockStyle: function setBlockStyle() {
- return {
- width: this.blockSize + 'px',
- height: this.blockSize + 'px',
- marginLeft: -this.blockSize / 2 + 'px',
- marginTop: -this.blockSize / 2 + 'px',
- left: this._getValueWidth(),
- backgroundColor: this.blockColor
- };
- },
- setBgColor: function setBgColor() {
- return {
- backgroundColor: this._getBgColor()
- };
- },
- setBlockBg: function setBlockBg() {
- return {
- left: this._getValueWidth()
- };
- },
- setActiveColor: function setActiveColor() {
- // 有问题,设置最大值最小值是有问题
- return {
- backgroundColor: this._getActiveColor(),
- width: this._getValueWidth()
- };
- }
- },
- watch: {
- value: function value(val) {
- this.sliderValue = Number(val);
- }
- },
- mounted: function mounted() {
- this.touchtrack(this.$refs['uni-slider-handle'], '_onTrack');
- },
- created: function created() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'add',
- vm: this
- });
- },
- beforeDestroy: function beforeDestroy() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'remove',
- vm: this
- });
- },
- methods: {
- _onUserChangedValue: function _onUserChangedValue(e) {
- var slider = this.$refs['uni-slider'];
- var offsetWidth = slider.offsetWidth;
- var boxLeft = slider.getBoundingClientRect().left;
- var value = (e.x - boxLeft) * (this.max - this.min) / offsetWidth + Number(this.min);
- this.sliderValue = this._filterValue(value);
- },
- _filterValue: function _filterValue(e) {
- return e < this.min ? this.min : e > this.max ? this.max : Math.round((e - this.min) / this.step) * this.step + Number(this.min);
- },
- _getValueWidth: function _getValueWidth() {
- return 100 * (this.sliderValue - this.min) / (this.max - this.min) + '%';
- },
- _getBgColor: function _getBgColor() {
- return this.backgroundColor !== '#e9e9e9' ? this.backgroundColor : this.color !== '#007aff' ? this.color : '#007aff';
- },
- _getActiveColor: function _getActiveColor() {
- return this.activeColor !== '#007aff' ? this.activeColor : this.selectedColor !== '#e9e9e9' ? this.selectedColor : '#e9e9e9';
- },
- _onTrack: function _onTrack(e) {
- if (!this.disabled) {
- return e.detail.state === 'move' ? (this._onUserChangedValue({
- x: e.detail.x0
- }), this.$trigger('changing', e, {
- value: this.sliderValue
- }), !1) : e.detail.state === 'end' && this.$trigger('change', e, {
- value: this.sliderValue
- });
- }
- },
- _onClick: function _onClick($event) {
- if (this.disabled) {
- return;
- }
- this._onUserChangedValue($event);
- this.$trigger('change', $event, {
- value: this.sliderValue
- });
- },
- _resetFormData: function _resetFormData() {
- this.sliderValue = this.min;
- },
- _getFormData: function _getFormData() {
- var data = {};
- if (this.name !== '') {
- data.value = this.sliderValue;
- data.key = this.name;
- }
- return data;
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/slider/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_slidervue_type_script_lang_js_ = (slidervue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/slider/index.vue?vue&type=style&index=0&lang=css&
- var slidervue_type_style_index_0_lang_css_ = __webpack_require__(109);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/slider/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_slidervue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/slider/index.vue"
- /* harmony default export */ var slider = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 140 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-swiper-item",
- _vm._g({}, _vm.$listeners),
- [_vm._t("default")],
- 2
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/swiper-item/index.vue?vue&type=template&id=3883b065&
- // 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&
- //
- //
- //
- //
- //
- /* harmony default export */ var swiper_itemvue_type_script_lang_js_ = ({
- name: 'SwiperItem',
- props: {
- itemId: {
- type: String,
- default: ''
- }
- },
- mounted: function mounted() {
- var $el = this.$el;
- $el.style.position = 'absolute';
- $el.style.width = '100%';
- $el.style.height = '100%';
- var callbacks = this.$vnode._callbacks;
- if (callbacks) {
- callbacks.forEach(function (callback) {
- callback();
- });
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/swiper-item/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_swiper_itemvue_type_script_lang_js_ = (swiper_itemvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/swiper-item/index.vue?vue&type=style&index=0&lang=css&
- var swiper_itemvue_type_style_index_0_lang_css_ = __webpack_require__(110);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/swiper-item/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_swiper_itemvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/swiper-item/index.vue"
- /* harmony default export */ var swiper_item = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 141 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-switch",
- _vm._g(
- { attrs: { disabled: _vm.disabled }, on: { click: _vm._onClick } },
- _vm.$listeners
- ),
- [
- _c("div", { staticClass: "uni-switch-wrapper" }, [
- _c("div", {
- directives: [
- {
- name: "show",
- rawName: "v-show",
- value: _vm.type === "switch",
- expression: "type === 'switch'"
- }
- ],
- staticClass: "uni-switch-input",
- class: [_vm.switchChecked ? "uni-switch-input-checked" : ""],
- style: {
- backgroundColor: _vm.switchChecked ? _vm.color : "#DFDFDF",
- borderColor: _vm.switchChecked ? _vm.color : "#DFDFDF"
- }
- }),
- _c("div", {
- directives: [
- {
- name: "show",
- rawName: "v-show",
- value: _vm.type === "checkbox",
- expression: "type === 'checkbox'"
- }
- ],
- staticClass: "uni-checkbox-input",
- class: [_vm.switchChecked ? "uni-checkbox-input-checked" : ""],
- style: { color: _vm.color }
- })
- ])
- ]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/switch/index.vue?vue&type=template&id=04951fe6&
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // 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&
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- /* harmony default export */ var switchvue_type_script_lang_js_ = ({
- name: 'Switch',
- mixins: [mixins["a" /* emitter */], mixins["d" /* listeners */]],
- props: {
- name: {
- type: String,
- default: ''
- },
- checked: {
- type: [Boolean, String],
- default: false
- },
- type: {
- type: String,
- default: 'switch'
- },
- id: {
- type: String,
- default: ''
- },
- disabled: {
- type: [Boolean, String],
- default: false
- },
- color: {
- type: String,
- default: '#007aff'
- }
- },
- data: function data() {
- return {
- switchChecked: this.checked
- };
- },
- watch: {
- checked: function checked(val) {
- this.switchChecked = val;
- }
- },
- created: function created() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'add',
- vm: this
- });
- },
- beforeDestroy: function beforeDestroy() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'remove',
- vm: this
- });
- },
- listeners: {
- 'label-click': '_onClick',
- '@label-click': '_onClick'
- },
- methods: {
- _onClick: function _onClick($event) {
- if (this.disabled) {
- return;
- }
- this.switchChecked = !this.switchChecked;
- this.$trigger('change', $event, {
- value: this.switchChecked
- });
- },
- _resetFormData: function _resetFormData() {
- this.switchChecked = false;
- },
- _getFormData: function _getFormData() {
- var data = {};
- if (this.name !== '') {
- data.value = this.switchChecked;
- data.key = this.name;
- }
- return data;
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/switch/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_switchvue_type_script_lang_js_ = (switchvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/switch/index.vue?vue&type=style&index=0&lang=css&
- var switchvue_type_style_index_0_lang_css_ = __webpack_require__(112);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/switch/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_switchvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/switch/index.vue"
- /* harmony default export */ var components_switch = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 142 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-textarea",
- _vm._g(
- {
- on: {
- change: function($event) {
- $event.stopPropagation()
- }
- }
- },
- _vm.$listeners
- ),
- [
- _c("div", { staticClass: "uni-textarea-wrapper" }, [
- _c(
- "div",
- {
- directives: [
- {
- name: "show",
- rawName: "v-show",
- value: !(_vm.composition || _vm.valueSync.length),
- expression: "!(composition||valueSync.length)"
- }
- ],
- ref: "placeholder",
- staticClass: "uni-textarea-placeholder",
- class: _vm.placeholderClass,
- style: _vm.placeholderStyle
- },
- [_vm._v(" " + _vm._s(_vm.placeholder) + " ")]
- ),
- _c("div", { ref: "line", staticClass: "uni-textarea-line" }),
- _c(
- "div",
- { staticClass: "uni-textarea-compute" },
- [
- _vm._l(_vm.valueCompute, function(item, index) {
- return _c("div", { key: index }, [
- _vm._v(" " + _vm._s(item.trim() ? item : ".") + " ")
- ])
- }),
- _c("v-uni-resize-sensor", {
- ref: "sensor",
- on: { resize: _vm._resize }
- })
- ],
- 2
- ),
- _c("textarea", {
- directives: [
- {
- name: "model",
- rawName: "v-model",
- value: _vm.valueSync,
- expression: "valueSync"
- }
- ],
- ref: "textarea",
- staticClass: "uni-textarea-textarea",
- class: { "uni-textarea-textarea-fix-margin": _vm.fixMargin },
- style: { "overflow-y": _vm.autoHeight ? "hidden" : "auto" },
- attrs: {
- disabled: _vm.disabled,
- maxlength: _vm.maxlengthNumber,
- autofocus: _vm.autoFocus
- },
- domProps: { value: _vm.valueSync },
- on: {
- compositionstart: _vm._compositionstart,
- compositionend: _vm._compositionend,
- input: [
- function($event) {
- if ($event.target.composing) {
- return
- }
- _vm.valueSync = $event.target.value
- },
- function($event) {
- $event.stopPropagation()
- return _vm._input($event)
- }
- ],
- focus: _vm._focus,
- blur: _vm._blur,
- "&touchstart": function($event) {
- return _vm._touchstart($event)
- }
- }
- })
- ])
- ]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/textarea/index.vue?vue&type=template&id=33f82dda&
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // 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&
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var DARK_TEST_STRING = '(prefers-color-scheme: dark)';
- /* harmony default export */ var textareavue_type_script_lang_js_ = ({
- name: 'Textarea',
- mixins: [mixins["a" /* emitter */], mixins["c" /* keyboard */]],
- model: {
- prop: 'value',
- event: 'update:value'
- },
- props: {
- name: {
- type: String,
- default: ''
- },
- value: {
- type: [String, Number],
- default: ''
- },
- maxlength: {
- type: [Number, String],
- default: 140
- },
- placeholder: {
- type: String,
- default: ''
- },
- disabled: {
- type: [Boolean, String],
- default: false
- },
- focus: {
- type: [Boolean, String],
- default: false
- },
- autoFocus: {
- type: [Boolean, String],
- default: false
- },
- placeholderClass: {
- type: String,
- default: 'textarea-placeholder'
- },
- placeholderStyle: {
- type: String,
- default: ''
- },
- autoHeight: {
- type: [Boolean, String],
- default: false
- },
- cursor: {
- type: [Number, String],
- default: -1
- },
- selectionStart: {
- type: [Number, String],
- default: -1
- },
- selectionEnd: {
- type: [Number, String],
- default: -1
- }
- },
- data: function data() {
- return {
- valueSync: String(this.value),
- valueComposition: '',
- composition: false,
- focusSync: this.focus,
- height: 0,
- focusChangeSource: '',
- // iOS 13 以下版本需要修正边距
- fixMargin: String(navigator.platform).indexOf('iP') === 0 && String(navigator.vendor).indexOf('Apple') === 0 && window.matchMedia(DARK_TEST_STRING).media !== DARK_TEST_STRING
- };
- },
- computed: {
- maxlengthNumber: function maxlengthNumber() {
- var maxlength = Number(this.maxlength);
- return isNaN(maxlength) ? 140 : maxlength;
- },
- cursorNumber: function cursorNumber() {
- var cursor = Number(this.cursor);
- return isNaN(cursor) ? -1 : cursor;
- },
- selectionStartNumber: function selectionStartNumber() {
- var selectionStart = Number(this.selectionStart);
- return isNaN(selectionStart) ? -1 : selectionStart;
- },
- selectionEndNumber: function selectionEndNumber() {
- var selectionEnd = Number(this.selectionEnd);
- return isNaN(selectionEnd) ? -1 : selectionEnd;
- },
- valueCompute: function valueCompute() {
- return (this.composition ? this.valueComposition : this.valueSync).split('\n');
- }
- },
- watch: {
- value: function value(val) {
- this.valueSync = String(val);
- },
- valueSync: function valueSync(val) {
- if (val !== this._oldValue) {
- this._oldValue = val;
- this.$trigger('input', {}, {
- value: val,
- cursor: this.$refs.textarea.selectionEnd
- });
- this.$emit('update:value', val);
- }
- },
- focus: function focus(val) {
- if (val) {
- this.focusChangeSource = 'focus';
- if (this.$refs.textarea) {
- this.$refs.textarea.focus();
- }
- } else {
- if (this.$refs.textarea) {
- this.$refs.textarea.blur();
- }
- }
- },
- focusSync: function focusSync(val) {
- this.$emit('update:focus', val);
- this._checkSelection();
- this._checkCursor();
- },
- cursorNumber: function cursorNumber() {
- this._checkCursor();
- },
- selectionStartNumber: function selectionStartNumber() {
- this._checkSelection();
- },
- selectionEndNumber: function selectionEndNumber() {
- this._checkSelection();
- },
- height: function height(_height) {
- var lineHeight = parseFloat(getComputedStyle(this.$el).lineHeight);
- if (isNaN(lineHeight)) {
- lineHeight = this.$refs.line.offsetHeight;
- }
- var lineCount = Math.round(_height / lineHeight);
- this.$trigger('linechange', {}, {
- height: _height,
- heightRpx: 750 / window.innerWidth * _height,
- lineCount: lineCount
- });
- if (this.autoHeight) {
- this.$el.style.height = this.height + 'px';
- }
- }
- },
- created: function created() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'add',
- vm: this
- });
- },
- mounted: function mounted() {
- this._oldValue = this.$refs.textarea.value = this.valueSync;
- this._resize({
- height: this.$refs.sensor.$el.offsetHeight
- });
- var $vm = this;
- while ($vm) {
- var scopeId = $vm.$options._scopeId;
- if (scopeId) {
- this.$refs.placeholder.setAttribute(scopeId, '');
- }
- $vm = $vm.$parent;
- }
- this.initKeyboard(this.$refs.textarea);
- },
- beforeDestroy: function beforeDestroy() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'remove',
- vm: this
- });
- },
- methods: {
- _focus: function _focus($event) {
- this.focusSync = true;
- this.$trigger('focus', $event, {
- value: this.valueSync
- });
- },
- _checkSelection: function _checkSelection() {
- if (this.focusSync && !this.focusChangeSource && this.selectionStartNumber > -1 && this.selectionEndNumber > -1) {
- this.$refs.textarea.selectionStart = this.selectionStartNumber;
- this.$refs.textarea.selectionEnd = this.selectionEndNumber;
- }
- },
- _checkCursor: function _checkCursor() {
- if (this.focusSync && (this.focusChangeSource === 'focus' || !this.focusChangeSource && this.selectionStartNumber < 0 && this.selectionEndNumber < 0) && this.cursorNumber > -1) {
- this.$refs.textarea.selectionEnd = this.$refs.textarea.selectionStart = this.cursorNumber;
- }
- },
- _blur: function _blur($event) {
- this.focusSync = false;
- this.$trigger('blur', $event, {
- value: this.valueSync,
- cursor: this.$refs.textarea.selectionEnd
- });
- },
- _compositionstart: function _compositionstart($event) {
- this.composition = true;
- },
- _compositionend: function _compositionend($event) {
- this.composition = false;
- },
- // 暂无完成按钮,此功能未实现
- _confirm: function _confirm($event) {
- this.$trigger('confirm', $event, {
- value: this.valueSync
- });
- },
- _linechange: function _linechange($event) {
- this.$trigger('linechange', $event, {
- value: this.valueSync
- });
- },
- _touchstart: function _touchstart() {
- this.focusChangeSource = 'touch';
- },
- _resize: function _resize(_ref) {
- var height = _ref.height;
- this.height = height;
- },
- _input: function _input($event) {
- if (this.composition) {
- this.valueComposition = $event.target.value;
- }
- },
- _getFormData: function _getFormData() {
- return {
- value: this.valueSync,
- key: this.name
- };
- },
- _resetFormData: function _resetFormData() {
- this.valueSync = '';
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/textarea/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_textareavue_type_script_lang_js_ = (textareavue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/textarea/index.vue?vue&type=style&index=0&lang=css&
- var textareavue_type_style_index_0_lang_css_ = __webpack_require__(114);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/textarea/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_textareavue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/textarea/index.vue"
- /* harmony default export */ var components_textarea = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 143 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _vm.hoverClass && _vm.hoverClass !== "none"
- ? _c(
- "uni-view",
- _vm._g(
- {
- class: [_vm.hovering ? _vm.hoverClass : ""],
- on: {
- touchstart: _vm._hoverTouchStart,
- touchend: _vm._hoverTouchEnd,
- touchcancel: _vm._hoverTouchCancel
- }
- },
- _vm.$listeners
- ),
- [_vm._t("default")],
- 2
- )
- : _c("uni-view", _vm._g({}, _vm.$listeners), [_vm._t("default")], 2)
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/view/index.vue?vue&type=template&id=6ae9b1be&
- // EXTERNAL MODULE: ./src/core/view/mixins/hover.js
- var hover = __webpack_require__(17);
- // 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&
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- /* harmony default export */ var viewvue_type_script_lang_js_ = ({
- name: 'View',
- mixins: [hover["a" /* default */]],
- listeners: {
- 'label-click': 'clickHandler'
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/view/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_viewvue_type_script_lang_js_ = (viewvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/view/index.vue?vue&type=style&index=0&lang=css&
- var viewvue_type_style_index_0_lang_css_ = __webpack_require__(115);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/view/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_viewvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/view/index.vue"
- /* harmony default export */ var view = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 144 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-ad",
- _vm._g(_vm._b({}, "uni-ad", _vm.attrs, false), _vm.$listeners),
- [_c("div", { ref: "container", staticClass: "uni-ad-container" })]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/ad/index.vue?vue&type=template&id=4d0d75c6&
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/mixins/native.js
- var mixins_native = __webpack_require__(7);
- // 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&
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var _adDataCache = {};
- function getAdData(adpid, adWidth, onsuccess, onerror) {
- var key = adpid + '-' + adWidth;
- var adDataList = _adDataCache[key];
- if (adDataList && adDataList.length > 0) {
- onsuccess(adDataList.splice(0, 1)[0]);
- return;
- }
- plus.ad.getAds({
- adpid: adpid,
- count: 10,
- width: adWidth
- }, function (res) {
- var list = res.ads;
- onsuccess(list.splice(0, 1)[0]);
- _adDataCache[key] = adDataList ? adDataList.concat(list) : list;
- }, function (err) {
- onerror({
- errCode: err.code,
- errMsg: err.message
- });
- });
- }
- var methods = ['draw'];
- var _attrs = ['adpid', 'data'];
- /* harmony default export */ var advue_type_script_lang_js_ = ({
- name: 'Ad',
- mixins: [mixins["e" /* subscriber */], mixins_native["a" /* default */]],
- props: {
- adpid: {
- type: [Number, String],
- default: ''
- },
- data: {
- type: Object,
- default: null
- }
- },
- data: function data() {
- return {
- hidden: false
- };
- },
- computed: {
- attrs: function attrs() {
- var _this = this;
- var obj = {};
- _attrs.forEach(function (key) {
- var val = _this.$props[key];
- val = key === 'src' ? _this.$getRealPath(val) : val;
- obj[key.replace(/[A-Z]/g, function (str) {
- return '-' + str.toLowerCase();
- })] = val;
- });
- return obj;
- }
- },
- watch: {
- hidden: function hidden(val) {
- this.adView && this.adView[val ? 'hide' : 'show']();
- },
- adpid: function adpid(val) {
- if (val) {
- this._loadData(val);
- }
- },
- data: function data(val) {
- if (val) {
- this._fillData(val);
- }
- }
- },
- mounted: function mounted() {
- var _this2 = this;
- var adStyle = Object.assign({
- id: 'AdView' + Date.now()
- }, this.position);
- var adView = this.adView = plus.ad.createAdView(adStyle);
- adView.interceptTouchEvent(false);
- plus.webview.currentWebview().append(adView);
- if (this.hidden) {
- adView.hide();
- }
- this.$watch('attrs', function () {
- _this2._request();
- }, {
- deep: true
- });
- this.$watch('position', function () {
- _this2.adView && _this2.adView.setStyle(_this2.position);
- }, {
- deep: true
- }); // 模板渲染有效
- adView.setDislikeListener && adView.setDislikeListener(function (data) {
- _this2.adView && _this2.adView.close();
- _this2.$refs.container.style.height = '0px';
- _this2._updateView();
- _this2.$trigger('close', {}, data);
- });
- adView.setRenderingListener && adView.setRenderingListener(function (data) {
- if (data.result === 0) {
- _this2.$refs.container.style.height = data.height + 'px';
- _this2._updateView();
- } else {
- _this2.$trigger('error', {}, {
- errCode: data.result
- });
- }
- }); // 仅 Android 下载类广告
- adView.setDownloadListener && adView.setDownloadListener(function (data) {
- _this2.$trigger('downloadchange', {}, data);
- });
- this._request();
- },
- beforeDestroy: function beforeDestroy() {
- this.adView && this.adView.close();
- delete this.adView;
- },
- methods: {
- _handleSubscribe: function _handleSubscribe(_ref) {
- var type = _ref.type,
- _ref$data = _ref.data,
- data = _ref$data === void 0 ? {} : _ref$data;
- if (methods.includes(type)) {
- this.adView && this.adView[type](data);
- }
- },
- _request: function _request() {
- if (!this.adView) {
- return;
- }
- if (this.data) {
- this._fillData(this.data);
- } else if (this.adpid) {
- this._loadData();
- }
- },
- _loadData: function _loadData(adpid) {
- var _this3 = this;
- getAdData(adpid || this.adpid, this.position.width, function (data) {
- _this3._fillData(data);
- }, function (err) {
- _this3.$trigger('error', {}, err);
- });
- },
- _fillData: function _fillData(data) {
- this.adView.renderingBind(data); // const height = plus.ad.measureAdHeight(this.position.width.replace('px', ''), data)
- // this.$refs.container.style.height = height + 'px'
- this.$trigger('load', {}, {});
- },
- _updateView: function _updateView() {
- window.dispatchEvent(new CustomEvent('updateview'));
- }
- }
- });
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/ad/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_advue_type_script_lang_js_ = (advue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/ad/index.vue?vue&type=style&index=0&lang=css&
- var advue_type_style_index_0_lang_css_ = __webpack_require__(117);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/ad/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_advue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/platforms/app-plus/view/components/ad/index.vue"
- /* harmony default export */ var ad = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 145 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-picker",
- _vm._g(
- {
- on: {
- click: function($event) {
- $event.stopPropagation()
- return _vm._show($event)
- }
- }
- },
- _vm.$listeners
- ),
- [_vm._t("default")],
- 2
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/picker/index.vue?vue&type=template&id=0268771e&
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/picker/page.js
- var page = __webpack_require__(82);
- // 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&
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var mode = {
- SELECTOR: 'selector',
- MULTISELECTOR: 'multiSelector',
- TIME: 'time',
- DATE: 'date' // 暂不支持城市选择
- // REGION: 'region'
- };
- var fields = {
- YEAR: 'year',
- MONTH: 'month',
- DAY: 'day'
- };
- function padLeft(num) {
- return num > 9 ? num : "0".concat(num);
- }
- function getDate(str, mode_) {
- str = String(str || '');
- var date = new Date();
- if (mode_ === mode.TIME) {
- str = str.split(':');
- if (str.length === 2) {
- date.setHours(parseInt(str[0]), parseInt(str[1]));
- }
- } else {
- str = str.split('-');
- if (str.length === 3) {
- date.setFullYear(parseInt(str[0]), parseInt(str[1] - 1), parseInt(str[2]));
- }
- }
- return date;
- }
- function getDefaultStartValue() {
- if (this.mode === mode.TIME) {
- return '00:00';
- }
- if (this.mode === mode.DATE) {
- var year = new Date().getFullYear() - 100;
- switch (this.fields) {
- case fields.YEAR:
- return year;
- case fields.MONTH:
- return year + '-01';
- case fields.DAY:
- return year + '-01-01';
- }
- }
- return '';
- }
- function getDefaultEndValue() {
- if (this.mode === mode.TIME) {
- return '23:59';
- }
- if (this.mode === mode.DATE) {
- var year = new Date().getFullYear() + 100;
- switch (this.fields) {
- case fields.YEAR:
- return year;
- case fields.MONTH:
- return year + '-12';
- case fields.DAY:
- return year + '-12-31';
- }
- }
- return '';
- }
- /* harmony default export */ var pickervue_type_script_lang_js_ = ({
- name: 'Picker',
- mixins: [mixins["a" /* emitter */]],
- props: {
- name: {
- type: String,
- default: ''
- },
- range: {
- type: Array,
- default: function _default() {
- return [];
- }
- },
- rangeKey: {
- type: String,
- default: ''
- },
- value: {
- type: [Number, String, Array],
- default: 0
- },
- mode: {
- type: String,
- default: mode.SELECTOR,
- validator: function validator(val) {
- return Object.values(mode).indexOf(val) >= 0;
- }
- },
- fields: {
- type: String,
- default: ''
- },
- start: {
- type: String,
- default: getDefaultStartValue
- },
- end: {
- type: String,
- default: getDefaultEndValue
- },
- disabled: {
- type: [Boolean, String],
- default: false
- }
- },
- data: function data() {
- return {
- valueSync: null
- };
- },
- watch: {
- value: function value() {
- this._setValueSync();
- }
- },
- created: function created() {
- var _this = this;
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'add',
- vm: this
- });
- Object.keys(this.$props).forEach(function (key) {
- if (key !== 'name') {
- _this.$watch(key, function (val) {
- var data = {};
- data[key] = val;
- _this._updatePicker(data);
- });
- }
- });
- this._setValueSync();
- },
- beforeDestroy: function beforeDestroy() {
- this.$dispatch('Form', 'uni-form-group-update', {
- type: 'remove',
- vm: this
- });
- },
- methods: {
- _setValueSync: function _setValueSync() {
- var val = this.value;
- switch (this.mode) {
- case mode.MULTISELECTOR:
- {
- if (!Array.isArray(val)) {
- val = [];
- }
- if (!Array.isArray(this.valueSync)) {
- this.valueSync = [];
- }
- var length = this.valueSync.length = Math.max(val.length, this.range.length);
- for (var index = 0; index < length; index++) {
- var val0 = Number(val[index]);
- var val1 = Number(this.valueSync[index]);
- this.valueSync.splice(index, 1, isNaN(val0) ? isNaN(val1) ? 0 : val1 : val0);
- }
- }
- break;
- case mode.TIME:
- case mode.DATE:
- this.valueSync = String(val);
- break;
- default:
- this.valueSync = Number(val) || 0;
- break;
- }
- },
- _show: function _show() {
- if (this.disabled) {
- return;
- }
- this._showPicker(Object.assign({}, this.$props));
- },
- _showPicker: function _showPicker(data) {
- var _this2 = this;
- if ((data.mode === mode.TIME || data.mode === mode.DATE) && !data.fields) {
- plus.nativeUI[this.mode === mode.TIME ? 'pickTime' : 'pickDate'](function (res) {
- var date = res.date;
- _this2.$trigger('change', {}, {
- 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()))
- });
- }, function () {
- _this2.$trigger('cancel', {}, {});
- }, this.mode === mode.TIME ? {
- time: getDate(this.value, mode.TIME)
- } : {
- date: getDate(this.value, mode.DATE),
- minDate: getDate(this.start, mode.DATE),
- maxDate: getDate(this.end, mode.DATE)
- });
- } else {
- data.fields = Object.values(fields).includes(data.fields) ? data.fields : fields.DAY;
- var res = {
- event: 'cancel'
- };
- this.page = Object(page["a" /* showPage */])({
- url: '__uniapppicker',
- data: data,
- style: {
- titleNView: false,
- animationType: 'none',
- animationDuration: 0,
- background: 'rgba(0,0,0,0)',
- popGesture: 'none'
- },
- onMessage: function onMessage(message) {
- var event = message.event;
- if (event === 'created') {
- _this2._updatePicker(data);
- return;
- }
- if (event === 'columnchange') {
- delete message.event;
- _this2.$trigger(event, {}, message);
- return;
- }
- res = message;
- },
- onClose: function onClose() {
- _this2.page = null;
- var event = res.event;
- delete res.event;
- _this2.$trigger(event, {}, res);
- }
- });
- }
- },
- _getFormData: function _getFormData() {
- return {
- value: this.valueSync,
- key: this.name
- };
- },
- _resetFormData: function _resetFormData() {
- switch (this.mode) {
- case mode.SELECTOR:
- this.valueSync = -1;
- break;
- case mode.MULTISELECTOR:
- this.valueSync = this.value.map(function (val) {
- return 0;
- });
- break;
- case mode.DATE:
- case mode.TIME:
- this.valueSync = '';
- break;
- default:
- break;
- }
- },
- _updatePicker: function _updatePicker(data) {
- this.page && this.page.sendMessage(data);
- }
- }
- });
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/picker/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_pickervue_type_script_lang_js_ = (pickervue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/picker/index.vue?vue&type=style&index=0&lang=css&
- var pickervue_type_style_index_0_lang_css_ = __webpack_require__(122);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/picker/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_pickervue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/platforms/app-plus/view/components/picker/index.vue"
- /* harmony default export */ var picker = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 146 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c("uni-video", _vm._g({}, _vm.$listeners), [
- _c("div", { ref: "container", staticClass: "uni-video-container" }),
- _c("div", { staticClass: "uni-video-slot" }, [_vm._t("default")], 2)
- ])
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/video/index.vue?vue&type=template&id=0ba2468e&
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/mixins/native.js
- var mixins_native = __webpack_require__(7);
- // 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&
- 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); }
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
- function _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; }
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var methods = ['play', 'pause', 'seek', 'sendDanmu', 'playbackRate', 'requestFullScreen', 'exitFullScreen'];
- var events = ['play', 'pause', 'ended', 'timeupdate', 'fullscreenchange', 'fullscreenclick', 'waiting', 'error'];
- var _attrs = ['src', 'duration', 'controls', 'danmuList', 'danmuBtn', 'enableDanmu', 'autoplay', 'loop', 'muted', 'objectFit', 'poster', 'direction', 'showProgress', 'initialTime', 'showFullscreenBtn', 'pageGesture', 'enableProgressGesture', 'showPlayBtn', 'showCenterPlayBtn'];
- /* harmony default export */ var videovue_type_script_lang_js_ = ({
- name: 'Video',
- mixins: [mixins["e" /* subscriber */], mixins_native["a" /* default */]],
- props: {
- id: {
- type: String,
- default: ''
- },
- src: {
- type: String,
- default: ''
- },
- duration: {
- type: [Number, String],
- default: ''
- },
- controls: {
- type: [Boolean, String],
- default: true
- },
- danmuList: {
- type: Array,
- default: function _default() {
- return [];
- }
- },
- danmuBtn: {
- type: [Boolean, String],
- default: false
- },
- enableDanmu: {
- type: [Boolean, String],
- default: false
- },
- autoplay: {
- type: [Boolean, String],
- default: false
- },
- loop: {
- type: [Boolean, String],
- default: false
- },
- muted: {
- type: [Boolean, String],
- default: false
- },
- objectFit: {
- type: String,
- default: 'contain'
- },
- poster: {
- type: String,
- default: ''
- },
- direction: {
- type: [String, Number],
- default: ''
- },
- showProgress: {
- type: Boolean,
- default: true
- },
- initialTime: {
- type: [String, Number],
- default: 0
- },
- showFullscreenBtn: {
- type: [Boolean, String],
- default: true
- },
- pageGesture: {
- type: [Boolean, String],
- default: false
- },
- enableProgressGesture: {
- type: [Boolean, String],
- default: true
- },
- showPlayBtn: {
- type: [Boolean, String],
- default: true
- },
- showCenterPlayBtn: {
- type: [Boolean, String],
- default: true
- }
- },
- computed: {
- attrs: function attrs() {
- var _this = this;
- var obj = {};
- _attrs.forEach(function (key) {
- var val = _this.$props[key];
- val = key === 'src' ? _this.$getRealPath(val) : val;
- obj[key.replace(/[A-Z]/g, function (str) {
- return '-' + str.toLowerCase();
- })] = val;
- });
- return obj;
- }
- },
- mounted: function mounted() {
- var _this2 = this;
- var video = this.video = plus.video.createVideoPlayer('video' + Date.now(), Object.assign({}, this.attrs, this.position));
- plus.webview.currentWebview().append(video);
- if (this.hidden) {
- video.hide();
- }
- this.$watch('attrs', function () {
- _this2.video && _this2.video.setStyles(_this2.attrs);
- }, {
- deep: true
- });
- this.$watch('position', function () {
- _this2.video && _this2.video.setStyles(_this2.position);
- }, {
- deep: true
- });
- this.$watch('hidden', function (val) {
- var video = _this2.video;
- if (video) {
- video[val ? 'hide' : 'show'](); // iOS 隐藏状态设置 setStyles 不生效
- if (!val) {
- video.setStyles(_this2.position);
- }
- }
- });
- events.forEach(function (key) {
- video.addEventListener(key, function (e) {
- _this2.$trigger(key, {}, _objectSpread({}, e.detail));
- });
- });
- },
- beforeDestroy: function beforeDestroy() {
- this.video && this.video.close();
- delete this.video;
- },
- methods: {
- _handleSubscribe: function _handleSubscribe(_ref) {
- var type = _ref.type,
- _ref$data = _ref.data,
- data = _ref$data === void 0 ? {} : _ref$data;
- if (methods.includes(type)) {
- if (_typeof(data) === 'object') {
- switch (type) {
- case 'seek':
- data = data.position;
- break;
- case 'playbackRate':
- data = data.rate;
- break;
- case 'requestFullScreen':
- data = data.direction;
- break;
- }
- }
- this.video && this.video[type](data);
- }
- }
- }
- });
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/video/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_videovue_type_script_lang_js_ = (videovue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/video/index.vue?vue&type=style&index=0&lang=css&
- var videovue_type_style_index_0_lang_css_ = __webpack_require__(123);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/video/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_videovue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/platforms/app-plus/view/components/video/index.vue"
- /* harmony default export */ var video = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 147 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-canvas",
- _vm._g(
- {
- attrs: {
- "canvas-id": _vm.canvasId,
- "disable-scroll": _vm.disableScroll
- }
- },
- _vm._listeners
- ),
- [
- _c("canvas", { ref: "canvas", attrs: { width: "300", height: "150" } }),
- _c(
- "div",
- {
- staticStyle: {
- position: "absolute",
- top: "0",
- left: "0",
- width: "100%",
- height: "100%",
- overflow: "hidden"
- }
- },
- [_vm._t("default")],
- 2
- ),
- _c("v-uni-resize-sensor", { ref: "sensor", on: { resize: _vm._resize } })
- ],
- 1
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/canvas/index.vue?vue&type=template&id=6ef05d9e&
- // 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&
- var canvasvue_type_script_lang_js_ = __webpack_require__(19);
- // CONCATENATED MODULE: ./src/core/view/components/canvas/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_canvasvue_type_script_lang_js_ = (canvasvue_type_script_lang_js_["a" /* default */]);
- // EXTERNAL MODULE: ./src/core/view/components/canvas/index.vue?vue&type=style&index=0&lang=css&
- var canvasvue_type_style_index_0_lang_css_ = __webpack_require__(91);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/canvas/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_canvasvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/canvas/index.vue"
- /* harmony default export */ var canvas = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 148 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-editor",
- _vm._g(
- { staticClass: "ql-container", attrs: { id: _vm.id } },
- _vm.$listeners
- )
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/editor/index.vue?vue&type=template&id=29b52706&
- // 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&
- var editorvue_type_script_lang_js_ = __webpack_require__(23);
- // CONCATENATED MODULE: ./src/core/view/components/editor/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_editorvue_type_script_lang_js_ = (editorvue_type_script_lang_js_["a" /* default */]);
- // EXTERNAL MODULE: ./src/core/view/components/editor/editor.css?vue&type=style&index=0&lang=css&
- var editorvue_type_style_index_0_lang_css_ = __webpack_require__(94);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/editor/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_editorvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/editor/index.vue"
- /* harmony default export */ var editor = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 149 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-label",
- _vm._g(
- {
- class: { "uni-label-pointer": _vm.pointer },
- on: { click: _vm._onClick }
- },
- _vm.$listeners
- ),
- [_vm._t("default")],
- 2
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/core/view/components/label/index.vue?vue&type=template&id=04b5b291&
- // 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&
- var labelvue_type_script_lang_js_ = __webpack_require__(28);
- // CONCATENATED MODULE: ./src/core/view/components/label/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_labelvue_type_script_lang_js_ = (labelvue_type_script_lang_js_["a" /* default */]);
- // EXTERNAL MODULE: ./src/core/view/components/label/index.vue?vue&type=style&index=0&lang=css&
- var labelvue_type_style_index_0_lang_css_ = __webpack_require__(98);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/label/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_labelvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/label/index.vue"
- /* harmony default export */ var label = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 150 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "uni-map",
- _vm._g({}, _vm.$listeners),
- [
- _c("div", { ref: "container", staticClass: "uni-map-container" }),
- _vm._l(_vm.mapControls, function(control, index) {
- return _c("v-uni-cover-image", {
- key: index,
- style: control.position,
- attrs: { src: control.iconPath, "auto-size": "" },
- on: {
- click: function($event) {
- return _vm.controlclick(control)
- }
- }
- })
- }),
- _c("div", { staticClass: "uni-map-slot" }, [_vm._t("default")], 2)
- ],
- 2
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/map/index.vue?vue&type=template&id=8d987fa2&
- // 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&
- var mapvue_type_script_lang_js_ = __webpack_require__(50);
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/map/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_mapvue_type_script_lang_js_ = (mapvue_type_script_lang_js_["a" /* default */]);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/map/index.vue?vue&type=style&index=0&lang=css&
- var mapvue_type_style_index_0_lang_css_ = __webpack_require__(120);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/map/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_mapvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/platforms/app-plus/view/components/map/index.vue"
- /* harmony default export */ var map = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 151 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c("uni-web-view", _vm._g({}, _vm.$listeners))
- }
- var staticRenderFns = []
- render._withStripped = true
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/web-view/index.vue?vue&type=template&id=02a3393e&
- // 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&
- var web_viewvue_type_script_lang_js_ = __webpack_require__(54);
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/web-view/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_web_viewvue_type_script_lang_js_ = (web_viewvue_type_script_lang_js_["a" /* default */]);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/web-view/index.vue?vue&type=style&index=0&lang=css&
- var web_viewvue_type_style_index_0_lang_css_ = __webpack_require__(124);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/web-view/index.vue
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_web_viewvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/platforms/app-plus/view/components/web-view/index.vue"
- /* harmony default export */ var web_view = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 152 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // EXTERNAL MODULE: ./packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.esm.js
- var vue_runtime_esm = __webpack_require__(8);
- // EXTERNAL MODULE: ./src/platforms/app-plus/helpers/get-real-path.js + 1 modules
- var get_real_path = __webpack_require__(65);
- // EXTERNAL MODULE: ./src/core/view/plugins/events.js + 1 modules
- var events = __webpack_require__(11);
- // CONCATENATED MODULE: ./src/core/view/mixins/base.js
- /* harmony default export */ var base = ({
- methods: {
- $getRealPath: function $getRealPath(src) {
- return Object(get_real_path["a" /* default */])(src);
- },
- $trigger: function $trigger(name, $event, detail) {
- this.$emit(name, events["b" /* processEvent */].call(this, name, $event, detail, this.$el, this.$el));
- }
- }
- });
- // CONCATENATED MODULE: ./src/core/view/mixins/animation.js
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
- function converPx(value) {
- if (/\d+[ur]px$/i.test(value)) {
- value.replace(/\d+[ur]px$/i, function (text) {
- return "".concat(uni.upx2px(parseFloat(text)), "px");
- }); // eslint-disable-next-line no-useless-escape
- } else if (/^-?[\d\.]+$/.test(value)) {
- return "".concat(value, "px");
- }
- return value || '';
- }
- function converType(type) {
- return type.replace(/[A-Z]/g, function (text) {
- return "-".concat(text.toLowerCase());
- }).replace('webkit', '-webkit');
- }
- function getStyle(action) {
- var animateTypes1 = ['matrix', 'matrix3d', 'scale', 'scale3d', 'rotate3d', 'skew', 'translate', 'translate3d'];
- var animateTypes2 = ['scaleX', 'scaleY', 'scaleZ', 'rotate', 'rotateX', 'rotateY', 'rotateZ', 'skewX', 'skewY', 'translateX', 'translateY', 'translateZ'];
- var animateTypes3 = ['opacity', 'background-color'];
- var animateTypes4 = ['width', 'height', 'left', 'right', 'top', 'bottom'];
- var animates = action.animates;
- var option = action.option;
- var transition = option.transition;
- var style = {};
- var transform = [];
- animates.forEach(function (animate) {
- var type = animate.type;
- var args = _toConsumableArray(animate.args);
- if (animateTypes1.concat(animateTypes2).includes(type)) {
- if (type.startsWith('rotate') || type.startsWith('skew')) {
- args = args.map(function (value) {
- return parseFloat(value) + 'deg';
- });
- } else if (type.startsWith('translate')) {
- args = args.map(converPx);
- }
- if (animateTypes2.indexOf(type) >= 0) {
- args.length = 1;
- }
- transform.push("".concat(type, "(").concat(args.join(','), ")"));
- } else if (animateTypes3.concat(animateTypes4).includes(args[0])) {
- type = args[0];
- var value = args[1];
- style[type] = animateTypes4.includes(type) ? converPx(value) : value;
- }
- });
- style.transform = style.webkitTransform = transform.join(' ');
- style.transition = style.webkitTransition = Object.keys(style).map(function (type) {
- return "".concat(converType(type), " ").concat(transition.duration, "ms ").concat(transition.timingFunction, " ").concat(transition.delay, "ms");
- }).join(',');
- style.transformOrigin = style.webkitTransformOrigin = option.transformOrigin;
- return style;
- }
- function startAnimation(context) {
- var animation = context.animation;
- if (!animation || !animation.actions || !animation.actions.length) {
- return;
- }
- var index = 0;
- var actions = animation.actions;
- var length = animation.actions.length;
- function animate() {
- var action = actions[index];
- var transition = action.option.transition;
- var style = getStyle(action);
- Object.keys(style).forEach(function (key) {
- context.$el.style[key] = style[key];
- });
- index += 1;
- if (index < length) {
- setTimeout(animate, transition.duration + transition.delay);
- }
- }
- animate();
- }
- /* harmony default export */ var animation = ({
- props: ['animation'],
- watch: {
- animation: function animation() {
- startAnimation(this);
- }
- },
- mounted: function mounted() {
- startAnimation(this);
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/index.js
- var requireComponents = [// baseComponents
- __webpack_require__(89), __webpack_require__(116)];
- requireComponents.forEach(function (components, index) {
- components.keys().forEach(function (fileName) {
- // 获取组件配置
- var componentModule = components(fileName);
- var componentConfig = componentModule.default || componentModule;
- componentConfig.mixins = componentConfig.mixins ? [].concat(base, componentConfig.mixins) : [base];
- componentConfig.mixins.push(animation);
- componentConfig.name = 'VUni' + componentConfig.name;
- componentConfig.isReserved = true; // 全局注册组件
- vue_runtime_esm["a" /* default */].component(componentConfig.name, componentConfig);
- });
- });
- /***/ }),
- /* 153 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 2 modules
- var mixins = __webpack_require__(2);
- // 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&
- /* harmony default export */ var buttonvue_type_script_lang_js_ = ({
- name: 'Button',
- mixins: [mixins["b" /* hover */], mixins["a" /* emitter */], mixins["d" /* listeners */]],
- props: {
- hoverClass: {
- type: String,
- default: 'button-hover'
- },
- disabled: {
- type: [Boolean, String],
- default: false
- },
- id: {
- type: String,
- default: ''
- },
- hoverStopPropagation: {
- type: Boolean,
- default: false
- },
- hoverStartTime: {
- type: [Number, String],
- default: 20
- },
- hoverStayTime: {
- type: [Number, String],
- default: 70
- },
- formType: {
- type: String,
- default: '',
- validator: function validator(value) {
- // 只有这几个可取值,其它都是非法的。
- return ~['', 'submit', 'reset'].indexOf(value);
- }
- }
- },
- data: function data() {
- return {
- clickFunction: null
- };
- },
- methods: {
- _onClick: function _onClick($event, isLabelClick) {
- if (this.disabled) {
- return;
- }
- if (isLabelClick) {
- this.$el.click();
- } // TODO 通知父表单执行相应的行为
- if (this.formType) {
- this.$dispatch('Form', this.formType === 'submit' ? 'uni-form-submit' : 'uni-form-reset', {
- type: this.formType
- });
- }
- },
- _bindObjectListeners: function _bindObjectListeners(data, value) {
- if (value) {
- for (var key in value) {
- var existing = data.on[key];
- var ours = value[key];
- data.on[key] = existing ? [].concat(existing, ours) : ours;
- }
- }
- return data;
- }
- },
- render: function render(createElement) {
- var _this = this;
- var $listeners = Object.create(null);
- if (this.$listeners) {
- Object.keys(this.$listeners).forEach(function (e) {
- if (_this.disabled && (e === 'click' || e === 'tap')) {
- return;
- }
- $listeners[e] = _this.$listeners[e];
- });
- }
- if (this.hoverClass && this.hoverClass !== 'none') {
- return createElement('uni-button', this._bindObjectListeners({
- class: [this.hovering ? this.hoverClass : ''],
- attrs: {
- disabled: this.disabled
- },
- on: {
- touchstart: this._hoverTouchStart,
- touchend: this._hoverTouchEnd,
- touchcancel: this._hoverTouchCancel,
- click: this._onClick
- }
- }, $listeners), this.$slots.default);
- } else {
- return createElement('uni-button', this._bindObjectListeners({
- class: [this.hovering ? this.hoverClass : ''],
- attrs: {
- disabled: this.disabled
- },
- on: {
- click: this._onClick
- }
- }, $listeners), this.$slots.default);
- }
- },
- listeners: {
- 'label-click': '_onClick',
- '@label-click': '_onClick'
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/button/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_buttonvue_type_script_lang_js_ = (buttonvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/button/index.vue?vue&type=style&index=0&lang=css&
- var buttonvue_type_style_index_0_lang_css_ = __webpack_require__(90);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/button/index.vue
- var render, staticRenderFns
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_buttonvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/button/index.vue"
- /* harmony default export */ var components_button = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 154 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
- var shared = __webpack_require__(1);
- // 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&
- function calc(e) {
- return Math.sqrt(e.x * e.x + e.y * e.y);
- }
- /* harmony default export */ var movable_areavue_type_script_lang_js_ = ({
- name: 'MovableArea',
- props: {
- scaleArea: {
- type: Boolean,
- default: false
- }
- },
- data: function data() {
- return {
- width: 0,
- height: 0,
- items: []
- };
- },
- created: function created() {
- this.gapV = {
- x: null,
- y: null
- };
- this.pinchStartLen = null;
- },
- mounted: function mounted() {
- this._resize();
- },
- methods: {
- _resize: function _resize() {
- this._getWH();
- this.items.forEach(function (item, index) {
- item.componentInstance.setParent();
- });
- },
- _find: function _find(target) {
- var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.items;
- var root = this.$el;
- function get(node) {
- for (var i = 0; i < items.length; i++) {
- var item = items[i];
- if (node === item.componentInstance.$el) {
- return item;
- }
- }
- if (node === root || node === document.body || node === document) {
- return null;
- }
- return get(node.parentNode);
- }
- return get(target);
- },
- _touchstart: function _touchstart(t) {
- Object(shared["b" /* disableScrollBounce */])({
- disable: true
- });
- var i = t.touches;
- if (i) {
- if (i.length > 1) {
- var r = {
- x: i[1].pageX - i[0].pageX,
- y: i[1].pageY - i[0].pageY
- };
- this.pinchStartLen = calc(r);
- this.gapV = r;
- if (!this.scaleArea) {
- var touch0 = this._find(i[0].target);
- var touch1 = this._find(i[1].target);
- this._scaleMovableView = touch0 && touch0 === touch1 ? touch0 : null;
- }
- }
- }
- },
- _touchmove: function _touchmove(t) {
- var n = t.touches;
- if (n) {
- if (n.length > 1) {
- t.preventDefault();
- var i = {
- x: n[1].pageX - n[0].pageX,
- y: n[1].pageY - n[0].pageY
- };
- if (this.gapV.x !== null && this.pinchStartLen > 0) {
- var r = calc(i) / this.pinchStartLen;
- this._updateScale(r);
- }
- this.gapV = i;
- }
- }
- },
- _touchend: function _touchend(e) {
- Object(shared["b" /* disableScrollBounce */])({
- disable: false
- });
- var t = e.touches;
- if (!(t && t.length)) {
- if (e.changedTouches) {
- this.gapV.x = 0;
- this.gapV.y = 0;
- this.pinchStartLen = null;
- if (this.scaleArea) {
- this.items.forEach(function (item) {
- item.componentInstance._endScale();
- });
- } else {
- if (this._scaleMovableView) {
- this._scaleMovableView.componentInstance._endScale();
- }
- }
- }
- }
- },
- _updateScale: function _updateScale(e) {
- if (e && e !== 1) {
- if (this.scaleArea) {
- this.items.forEach(function (item) {
- item.componentInstance._setScale(e);
- });
- } else {
- if (this._scaleMovableView) {
- this._scaleMovableView.componentInstance._setScale(e);
- }
- }
- }
- },
- _getWH: function _getWH() {
- var style = window.getComputedStyle(this.$el);
- var rect = this.$el.getBoundingClientRect();
- this.width = rect.width - ['Left', 'Right'].reduce(function (all, item) {
- return all + parseFloat(style['border' + item + 'Width']) + parseFloat(style['padding' + item]);
- }, 0);
- this.height = rect.height - ['Top', 'Bottom'].reduce(function (all, item) {
- return all + parseFloat(style['border' + item + 'Width']) + parseFloat(style['padding' + item]);
- }, 0);
- }
- },
- render: function render(createElement) {
- var _this = this;
- var items = [];
- if (this.$slots.default) {
- this.$slots.default.forEach(function (vnode) {
- if (vnode.componentOptions && vnode.componentOptions.tag === 'v-uni-movable-view') {
- items.push(vnode);
- }
- });
- }
- this.items = items;
- var $listeners = Object.assign({}, this.$listeners);
- var events = ['touchstart', 'touchmove', 'touchend'];
- events.forEach(function (event) {
- var existing = $listeners[event];
- var ours = _this["_".concat(event)];
- $listeners[event] = existing ? [].concat(existing, ours) : ours;
- });
- return createElement('uni-movable-area', {
- on: $listeners
- }, [createElement('v-uni-resize-sensor', {
- on: {
- resize: this._resize
- }
- }), this.$slots.default]);
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/movable-area/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_movable_areavue_type_script_lang_js_ = (movable_areavue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/movable-area/index.vue?vue&type=style&index=0&lang=css&
- var movable_areavue_type_style_index_0_lang_css_ = __webpack_require__(99);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/movable-area/index.vue
- var render, staticRenderFns
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_movable_areavue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/movable-area/index.vue"
- /* harmony default export */ var movable_area = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 155 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // EXTERNAL MODULE: ./src/core/view/mixins/touchtrack.js
- var touchtrack = __webpack_require__(9);
- // EXTERNAL MODULE: ./src/core/view/mixins/scroller/index.js + 2 modules
- var scroller = __webpack_require__(64);
- // EXTERNAL MODULE: ./src/core/view/mixins/scroller/Friction.js
- var Friction = __webpack_require__(61);
- // EXTERNAL MODULE: ./src/core/view/mixins/scroller/Spring.js
- var Spring = __webpack_require__(62);
- // EXTERNAL MODULE: ./src/shared/index.js + 7 modules
- var shared = __webpack_require__(1);
- // 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&
- function initClick(dom) {
- var MAX_MOVE = 20;
- var x = 0;
- var y = 0;
- dom.addEventListener('touchstart', function (event) {
- var info = event.changedTouches[0];
- x = info.clientX;
- y = info.clientY;
- });
- dom.addEventListener('touchend', function (event) {
- var info = event.changedTouches[0];
- if (Math.abs(info.clientX - x) < MAX_MOVE && Math.abs(info.clientY - y) < MAX_MOVE) {
- var customEvent = new CustomEvent('click', {
- bubbles: true,
- cancelable: true,
- target: event.target,
- currentTarget: event.currentTarget
- });
- ['screenX', 'screenY', 'clientX', 'clientY', 'pageX', 'pageY'].forEach(function (key) {
- customEvent[key] = info[key];
- });
- event.target.dispatchEvent(customEvent);
- }
- });
- }
- /* harmony default export */ var picker_view_columnvue_type_script_lang_js_ = ({
- name: 'PickerViewColumn',
- mixins: [touchtrack["a" /* default */], scroller["a" /* default */]],
- data: function data() {
- return {
- scope: "picker-view-column-".concat(Date.now()),
- inited: false,
- indicatorStyle: '',
- indicatorClass: '',
- indicatorHeight: 34,
- maskStyle: '',
- maskClass: '',
- current: this.$parent.getItemValue(this),
- length: 0
- };
- },
- computed: {
- height: function height() {
- return this.$parent.height;
- },
- maskSize: function maskSize() {
- return (this.height - this.indicatorHeight) / 2;
- }
- },
- watch: {
- indicatorHeight: function indicatorHeight(val) {
- this._setItemHeight(val);
- if (this.inited) {
- this.update();
- }
- },
- current: function current(val) {
- this.$parent.setItemValue(this, val);
- },
- length: function length(val) {
- if (this.inited) {
- this.update(val);
- }
- }
- },
- created: function created() {
- var $parent = this.$parent;
- this.indicatorStyle = $parent.indicatorStyle;
- this.indicatorClass = $parent.indicatorClass;
- this.maskStyle = $parent.maskStyle;
- this.maskClass = $parent.maskClass;
- this.deltaY = 0;
- },
- mounted: function mounted() {
- var _this = this;
- this.touchtrack(this.$refs.main, '_handleTrack', true);
- this.setCurrent(this.current);
- this.$nextTick(function () {
- _this.init();
- _this.update();
- });
- initClick(this.$el);
- },
- methods: {
- _setItemHeight: function _setItemHeight(height) {
- var style = document.createElement('style');
- style.innerText = ".uni-picker-view-content.".concat(this.scope, ">*{height: ").concat(height, "px;overflow: hidden;}");
- document.head.appendChild(style);
- },
- _handleTrack: function _handleTrack(e) {
- if (this._scroller) {
- switch (e.detail.state) {
- case 'start':
- this._handleTouchStart(e);
- Object(shared["b" /* disableScrollBounce */])({
- disable: true
- });
- break;
- case 'move':
- this._handleTouchMove(e);
- break;
- case 'end':
- case 'cancel':
- this._handleTouchEnd(e);
- Object(shared["b" /* disableScrollBounce */])({
- disable: false
- });
- }
- }
- },
- _handleTap: function _handleTap(_ref) {
- var clientY = _ref.clientY;
- if (!this._scroller.isScrolling()) {
- var rect = this.$el.getBoundingClientRect();
- var r = clientY - rect.top - this.height / 2;
- var o = this.indicatorHeight / 2;
- if (!(Math.abs(r) <= o)) {
- var a = Math.ceil((Math.abs(r) - o) / this.indicatorHeight);
- var s = r < 0 ? -a : a;
- var current = Math.min(this.current + s, this.length - 1);
- this.current = current = Math.max(current, 0);
- this._scroller.scrollTo(current * this.indicatorHeight);
- }
- }
- },
- _handleWheel: function _handleWheel($event) {
- var deltaY = this.deltaY + $event.deltaY;
- if (Math.abs(deltaY) > 10) {
- this.deltaY = 0;
- var current = Math.min(this.current + (deltaY < 0 ? -1 : 1), this.length - 1);
- this.current = current = Math.max(current, 0);
- this._scroller.scrollTo(current * this.indicatorHeight);
- } else {
- this.deltaY = deltaY;
- }
- $event.preventDefault();
- },
- setCurrent: function setCurrent(current) {
- if (current !== this.current) {
- this.current = current;
- if (this.inited) {
- this.update();
- }
- }
- },
- init: function init() {
- var _this2 = this;
- this.initScroller(this.$refs.content, {
- enableY: true,
- enableX: false,
- enableSnap: true,
- itemSize: this.indicatorHeight,
- friction: new Friction["a" /* Friction */](0.0001),
- spring: new Spring["a" /* Spring */](2, 90, 20),
- onSnap: function onSnap(index) {
- if (!isNaN(index) && index !== _this2.current) {
- _this2.current = index;
- }
- }
- });
- this.inited = true;
- },
- update: function update() {
- var _this3 = this;
- this.$nextTick(function () {
- var current = Math.min(_this3.current, _this3.length - 1);
- current = Math.max(current, 0);
- _this3._scroller.update(current * _this3.indicatorHeight, undefined, _this3.indicatorHeight);
- });
- },
- _resize: function _resize(_ref2) {
- var height = _ref2.height;
- this.indicatorHeight = height;
- }
- },
- render: function render(createElement) {
- this.length = this.$slots.default && this.$slots.default.length || 0;
- return createElement('uni-picker-view-column', {
- on: {
- on: this.$listeners
- }
- }, [createElement('div', {
- ref: 'main',
- staticClass: 'uni-picker-view-group',
- on: {
- wheel: this._handleWheel,
- click: this._handleTap
- }
- }, [createElement('div', {
- ref: 'mask',
- staticClass: 'uni-picker-view-mask',
- class: this.maskClass,
- style: "background-size: 100% ".concat(this.maskSize, "px;").concat(this.maskStyle)
- }), createElement('div', {
- ref: 'indicator',
- staticClass: 'uni-picker-view-indicator',
- class: this.indicatorClass,
- style: this.indicatorStyle
- }, [createElement('v-uni-resize-sensor', {
- attrs: {
- initial: true
- },
- on: {
- resize: this._resize
- }
- })]), createElement('div', {
- ref: 'content',
- staticClass: 'uni-picker-view-content',
- class: this.scope,
- style: "padding: ".concat(this.maskSize, "px 0;")
- }, [this.$slots.default])])]);
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/picker-view-column/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_picker_view_columnvue_type_script_lang_js_ = (picker_view_columnvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/picker-view-column/index.vue?vue&type=style&index=0&lang=css&
- var picker_view_columnvue_type_style_index_0_lang_css_ = __webpack_require__(102);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/picker-view-column/index.vue
- var render, staticRenderFns
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_picker_view_columnvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/picker-view-column/index.vue"
- /* harmony default export */ var picker_view_column = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 156 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
- /* harmony default export */ var picker_viewvue_type_script_lang_js_ = ({
- name: 'PickerView',
- props: {
- value: {
- type: Array,
- default: function _default() {
- return [];
- },
- validator: function validator(val) {
- return Array.isArray(val) && val.filter(function (val) {
- return typeof val === 'number';
- }).length === val.length;
- }
- },
- indicatorStyle: {
- type: String,
- default: ''
- },
- indicatorClass: {
- type: String,
- default: ''
- },
- maskStyle: {
- type: String,
- default: ''
- },
- maskClass: {
- type: String,
- default: ''
- }
- },
- data: function data() {
- return {
- valueSync: _toConsumableArray(this.value),
- height: 34,
- items: [],
- changeSource: ''
- };
- },
- watch: {
- value: function value(val, oldVal) {
- var _this = this;
- if (val === oldVal || val.length !== oldVal.length || val.findIndex(function (item, index) {
- return item !== oldVal[index];
- }) >= 0) {
- this.valueSync.length = val.length;
- val.forEach(function (val, index) {
- if (val !== _this.valueSync[index]) {
- _this.$set(_this.valueSync, index, val);
- }
- });
- }
- },
- valueSync: {
- deep: true,
- handler: function handler(val, oldVal) {
- if (this.changeSource === '') {
- this._valueChanged(val);
- } else {
- this.changeSource = ''; // 避免外部直接对此值进行修改
- var value = val.map(function (val) {
- return val;
- });
- this.$emit('update:value', value);
- this.$trigger('change', {}, {
- value: value
- });
- }
- }
- }
- },
- methods: {
- getItemIndex: function getItemIndex(vnode) {
- return this.items.indexOf(vnode);
- },
- getItemValue: function getItemValue(vm) {
- return this.valueSync[this.getItemIndex(vm.$vnode)] || 0;
- },
- setItemValue: function setItemValue(vm, val) {
- var index = this.getItemIndex(vm.$vnode);
- var oldVal = this.valueSync[index];
- if (oldVal !== val) {
- this.changeSource = 'touch';
- this.$set(this.valueSync, index, val);
- }
- },
- _valueChanged: function _valueChanged(val) {
- this.items.forEach(function (item, index) {
- item.componentInstance.setCurrent(val[index] || 0);
- });
- },
- _resize: function _resize(_ref) {
- var height = _ref.height;
- this.height = height;
- }
- },
- render: function render(createElement) {
- var items = [];
- if (this.$slots.default) {
- this.$slots.default.forEach(function (vnode) {
- if (vnode.componentOptions && vnode.componentOptions.tag === 'v-uni-picker-view-column') {
- items.push(vnode);
- }
- });
- }
- this.items = items;
- return createElement('uni-picker-view', {
- on: this.$listeners
- }, [createElement('v-uni-resize-sensor', {
- attrs: {
- initial: true
- },
- on: {
- resize: this._resize
- }
- }), createElement('div', {
- ref: 'wrapper',
- class: 'uni-picker-view-wrapper'
- }, items)]);
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/picker-view/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_picker_viewvue_type_script_lang_js_ = (picker_viewvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/picker-view/index.vue?vue&type=style&index=0&lang=css&
- var picker_viewvue_type_style_index_0_lang_css_ = __webpack_require__(103);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/picker-view/index.vue
- var render, staticRenderFns
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_picker_viewvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/picker-view/index.vue"
- /* harmony default export */ var picker_view = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 157 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- /* harmony default export */ var resize_sensorvue_type_script_lang_js_ = ({
- name: 'ResizeSensor',
- props: {
- initial: {
- type: [Boolean, String],
- default: false
- }
- },
- data: function data() {
- return {
- size: {
- width: -1,
- height: -1
- }
- };
- },
- watch: {
- size: {
- deep: true,
- handler: function handler(size) {
- this.$emit('resize', Object.assign({}, size));
- }
- }
- },
- mounted: function mounted() {
- if (this.initial === true) {
- this.$nextTick(this.update);
- }
- if (this.$el.offsetParent !== this.$el.parentNode) {
- this.$el.parentNode.style.position = 'relative';
- }
- if (!('AnimationEvent' in window)) {
- this.reset();
- }
- },
- methods: {
- reset: function reset() {
- var expand = this.$el.firstChild;
- var shrink = this.$el.lastChild;
- expand.scrollLeft = 100000;
- expand.scrollTop = 100000;
- shrink.scrollLeft = 100000;
- shrink.scrollTop = 100000;
- },
- update: function update() {
- this.size.width = this.$el.offsetWidth;
- this.size.height = this.$el.offsetHeight;
- this.reset();
- }
- },
- render: function render(create) {
- return create('uni-resize-sensor', {
- on: {
- '~animationstart': this.update
- }
- }, [create('div', {
- on: {
- scroll: this.update
- }
- }, [create('div')]), create('div', {
- on: {
- scroll: this.update
- }
- }, [create('div')])]);
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/resize-sensor/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_resize_sensorvue_type_script_lang_js_ = (resize_sensorvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/resize-sensor/index.vue?vue&type=style&index=0&lang=css&
- var resize_sensorvue_type_style_index_0_lang_css_ = __webpack_require__(107);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/resize-sensor/index.vue
- var render, staticRenderFns
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_resize_sensorvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/resize-sensor/index.vue"
- /* harmony default export */ var resize_sensor = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 158 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // EXTERNAL MODULE: ./src/core/view/mixins/touchtrack.js
- var touchtrack = __webpack_require__(9);
- // 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&
- //
- function deepClone(vnodes, createElement) {
- function cloneVNode(vnode) {
- var clonedChildren = vnode.children && vnode.children.map(cloneVNode);
- var cloned = createElement(vnode.tag, vnode.data, clonedChildren);
- cloned.text = vnode.text;
- cloned.isComment = vnode.isComment;
- cloned.componentOptions = vnode.componentOptions;
- cloned.elm = vnode.elm;
- cloned.context = vnode.context;
- cloned.ns = vnode.ns;
- cloned.isStatic = vnode.isStatic;
- cloned.key = vnode.key;
- return cloned;
- }
- return vnodes.map(cloneVNode);
- }
- /* harmony default export */ var swipervue_type_script_lang_js_ = ({
- name: 'Swiper',
- mixins: [touchtrack["a" /* default */]],
- props: {
- indicatorDots: {
- type: [Boolean, String],
- default: false
- },
- vertical: {
- type: [Boolean, String],
- default: false
- },
- autoplay: {
- type: [Boolean, String],
- default: false
- },
- circular: {
- type: [Boolean, String],
- default: false
- },
- interval: {
- type: [Number, String],
- default: 5e3
- },
- duration: {
- type: [Number, String],
- default: 500
- },
- current: {
- type: [Number, String],
- default: 0
- },
- indicatorColor: {
- type: String,
- default: ''
- },
- indicatorActiveColor: {
- type: String,
- default: ''
- },
- previousMargin: {
- type: String,
- default: ''
- },
- nextMargin: {
- type: String,
- default: ''
- },
- currentItemId: {
- type: String,
- default: ''
- },
- skipHiddenItemLayout: {
- type: [Boolean, String],
- default: false
- },
- displayMultipleItems: {
- type: [Number, String],
- default: 1
- },
- disableTouch: {
- type: [Boolean, String],
- default: false
- }
- },
- data: function data() {
- return {
- currentSync: Math.round(this.current) || 0,
- currentItemIdSync: this.currentItemId || '',
- userTracking: false,
- currentChangeSource: '',
- items: []
- };
- },
- computed: {
- intervalNumber: function intervalNumber() {
- var interval = Number(this.interval);
- return isNaN(interval) ? 5e3 : interval;
- },
- durationNumber: function durationNumber() {
- var duration = Number(this.duration);
- return isNaN(duration) ? 500 : duration;
- },
- displayMultipleItemsNumber: function displayMultipleItemsNumber() {
- var displayMultipleItems = Math.round(this.displayMultipleItems);
- return isNaN(displayMultipleItems) ? 1 : displayMultipleItems;
- },
- slidesStyle: function slidesStyle() {
- var style = {};
- if (this.nextMargin || this.previousMargin) {
- style = this.vertical ? {
- left: 0,
- right: 0,
- top: this._upx2px(this.previousMargin),
- bottom: this._upx2px(this.nextMargin)
- } : {
- top: 0,
- bottom: 0,
- left: this._upx2px(this.previousMargin),
- right: this._upx2px(this.nextMargin)
- };
- }
- return style;
- },
- slideFrameStyle: function slideFrameStyle() {
- var value = Math.abs(100 / this.displayMultipleItemsNumber) + '%';
- return {
- width: this.vertical ? '100%' : value,
- height: !this.vertical ? '100%' : value
- };
- },
- circularEnabled: function circularEnabled() {
- return this.circular && this.items.length > this.displayMultipleItemsNumber;
- }
- },
- watch: {
- vertical: function vertical() {
- this._resetLayout();
- },
- circular: function circular() {
- this._resetLayout();
- },
- intervalNumber: function intervalNumber(val) {
- if (this._timer) {
- this._cancelSchedule();
- this._scheduleAutoplay();
- }
- },
- current: function current(val) {
- this._currentCheck();
- },
- currentSync: function currentSync(val) {
- this._currentChanged(val);
- this.$emit('update:current', val);
- },
- currentItemId: function currentItemId(val) {
- this._currentCheck();
- },
- currentItemIdSync: function currentItemIdSync(val) {
- this.$emit('update:currentItemId', val);
- },
- displayMultipleItemsNumber: function displayMultipleItemsNumber() {
- this._resetLayout();
- }
- },
- created: function created() {
- this._invalid = true;
- this._viewportPosition = 0;
- this._viewportMoveRatio = 1;
- this._animating = null;
- this._requestedAnimation = false;
- this._userDirectionChecked = false;
- this._contentTrackViewport = 0;
- this._contentTrackSpeed = 0;
- this._contentTrackT = 0;
- },
- mounted: function mounted() {
- var _this = this;
- this._currentCheck();
- this.touchtrack(this.$refs.slidesWrapper, '_handleContentTrack', true);
- this._resetLayout();
- this.$watch(function () {
- return _this.autoplay && !_this.userTracking;
- }, this._inintAutoplay);
- this._inintAutoplay(this.autoplay && !this.userTracking);
- this.$watch('items.length', this._resetLayout);
- },
- beforeDestroy: function beforeDestroy() {
- this._cancelSchedule();
- cancelAnimationFrame(this._animationFrame);
- },
- methods: {
- _inintAutoplay: function _inintAutoplay(enable) {
- if (enable) {
- this._scheduleAutoplay();
- } else {
- this._cancelSchedule();
- }
- },
- /**
- * 页面变更检查和同步
- */
- _currentCheck: function _currentCheck() {
- var current = -1;
- if (this.currentItemId) {
- for (var i = 0, items = this.items; i < items.length; i++) {
- var componentInstance = items[i].componentInstance;
- if (componentInstance && componentInstance.itemId === this.currentItemId) {
- current = i;
- break;
- }
- }
- }
- if (current < 0) {
- current = Math.round(this.current) || 0;
- }
- current = current < 0 ? 0 : current;
- if (this.currentSync !== current) {
- this.currentChangeSource = '';
- this.currentSync = current;
- }
- },
- _itemReady: function _itemReady(vnode, callback) {
- if (vnode.componentInstance && vnode.componentInstance._isMounted) {
- callback();
- } else {
- vnode._callbacks = vnode._callbacks || [];
- vnode._callbacks.push(callback);
- }
- },
- /**
- * 当前页面变更
- */
- _currentChanged: function _currentChanged(current) {
- var _this2 = this;
- var source = this.currentChangeSource;
- this.currentChangeSource = '';
- if (!source) {
- this._animateViewport(current, '', 0);
- }
- var item = this.items[current];
- if (item) {
- this._itemReady(item, function () {
- var currentItemId = _this2.currentItemIdSync = item.componentInstance.itemId || '';
- _this2.$trigger('change', {}, {
- current: _this2.currentSync,
- currentItemId: currentItemId,
- source: source
- });
- });
- }
- },
- /**
- * 自动播放
- */
- _scheduleAutoplay: function _scheduleAutoplay() {
- var self = this;
- this._cancelSchedule();
- function timer() {
- self._timer = null;
- self.currentChangeSource = 'autoplay';
- if (self.circularEnabled) {
- self.currentSync = self._normalizeCurrentValue(self.currentSync + 1);
- } else {
- self.currentSync = self.currentSync + self.displayMultipleItemsNumber < self.items.length ? self.currentSync + 1 : 0;
- }
- self._animateViewport(self.currentSync, 'autoplay', self.circularEnabled ? 1 : 0);
- self._timer = setTimeout(timer, self.intervalNumber);
- }
- if (!(!this._isMounted || this._invalid || this.items.length <= this.displayMultipleItemsNumber)) {
- this._timer = setTimeout(timer, this.intervalNumber);
- }
- },
- /**
- * 清除定时器
- */
- _cancelSchedule: function _cancelSchedule() {
- if (this._timer) {
- clearTimeout(this._timer);
- this._timer = null;
- }
- },
- /**
- * 检查当前页值
- */
- _normalizeCurrentValue: function _normalizeCurrentValue(current) {
- var length = this.items.length;
- if (!length) {
- return -1;
- }
- var index = (Math.round(current) % length + length) % length;
- if (this.circularEnabled) {
- if (length <= this.displayMultipleItemsNumber) {
- return 0;
- }
- } else if (index > length - this.displayMultipleItemsNumber) {
- return length - this.displayMultipleItemsNumber;
- }
- return index;
- },
- _upx2px: function _upx2px(val) {
- if (/\d+[ur]px$/i.test(val)) {
- val.replace(/\d+[ur]px$/i, function (text) {
- return "".concat(uni.upx2px(parseFloat(text)), "px");
- });
- }
- return val || '';
- },
- /**
- * 重新布局
- */
- _resetLayout: function _resetLayout() {
- if (this._isMounted) {
- this._cancelSchedule();
- this._endViewportAnimation();
- var items = this.items;
- for (var i = 0; i < items.length; i++) {
- this._updateItemPos(i, i);
- }
- this._viewportMoveRatio = 1;
- if (this.displayMultipleItemsNumber === 1 && items.length) {
- var itemRect = items[0].componentInstance.$el.getBoundingClientRect();
- var slideFrameRect = this.$refs.slideFrame.getBoundingClientRect();
- this._viewportMoveRatio = itemRect.width / slideFrameRect.width;
- if (!(this._viewportMoveRatio > 0 && this._viewportMoveRatio < 1)) {
- this._viewportMoveRatio = 1;
- }
- }
- var position = this._viewportPosition;
- this._viewportPosition = -2;
- var current = this.currentSync;
- if (current >= 0) {
- this._invalid = false;
- if (this.userTracking) {
- this._updateViewport(position + current - this._contentTrackViewport);
- this._contentTrackViewport = current;
- } else {
- this._updateViewport(current);
- if (this.autoplay) {
- this._scheduleAutoplay();
- }
- }
- } else {
- this._invalid = true;
- this._updateViewport(-this.displayMultipleItemsNumber - 1);
- }
- }
- },
- _checkCircularLayout: function _checkCircularLayout(e) {
- if (!this._invalid) {
- for (var items = this.items, n = items.length, i = e + this.displayMultipleItemsNumber, r = 0; r < n; r++) {
- var item = items[r];
- var _position = item._position;
- var s = Math.floor(e / n) * n + r;
- var l = s + n;
- var c = s - n;
- var u = Math.max(e - (s + 1), s - i, 0);
- var d = Math.max(e - (l + 1), l - i, 0);
- var h = Math.max(e - (c + 1), c - i, 0);
- var p = Math.min(u, d, h);
- var f = [s, l, c][[u, d, h].indexOf(p)];
- if (_position !== f) {
- this._updateItemPos(r, f);
- }
- }
- }
- },
- _updateItemPos: function _updateItemPos(current, position) {
- var x = this.vertical ? '0' : 100 * position + '%';
- var y = this.vertical ? 100 * position + '%' : '0';
- var transform = 'translate(' + x + ', ' + y + ') translateZ(0)';
- var item = this.items[current];
- this._itemReady(item, function () {
- var el = item.componentInstance.$el;
- el.style['-webkit-transform'] = transform;
- el.style.transform = transform;
- el._position = position;
- });
- },
- _updateViewport: function _updateViewport(index) {
- if (!(Math.floor(2 * this._viewportPosition) === Math.floor(2 * index) && Math.ceil(2 * this._viewportPosition) === Math.ceil(2 * index))) {
- if (this.circularEnabled) {
- this._checkCircularLayout(index);
- }
- }
- var x = this.vertical ? '0' : 100 * -index * this._viewportMoveRatio + '%';
- var y = this.vertical ? 100 * -index * this._viewportMoveRatio + '%' : '0';
- var transform = 'translate(' + x + ', ' + y + ') translateZ(0)';
- var slideFrame = this.$refs.slideFrame;
- if (slideFrame) {
- slideFrame.style['-webkit-transform'] = transform;
- slideFrame.style.transform = transform;
- }
- this._viewportPosition = index;
- if (!this._transitionStart) {
- if (index % 1 === 0) {
- return;
- }
- this._transitionStart = index;
- }
- index -= Math.floor(this._transitionStart);
- if (index <= -(this.items.length - 1)) {
- index += this.items.length;
- } else if (index >= this.items.length) {
- index -= this.items.length;
- }
- index = this._transitionStart % 1 > 0.5 || this._transitionStart < 0 ? index - 1 : index;
- this.$trigger('transition', {}, {
- dx: this.vertical ? 0 : index * slideFrame.offsetWidth,
- dy: this.vertical ? index * slideFrame.offsetHeight : 0
- });
- },
- _animateFrameFuncProto: function _animateFrameFuncProto() {
- var _this3 = this;
- if (!this._animating) {
- this._requestedAnimation = false;
- return;
- }
- var _animating = this._animating;
- var toPos = _animating.toPos;
- var acc = _animating.acc;
- var endTime = _animating.endTime;
- var source = _animating.source;
- var time = endTime - Date.now();
- if (time <= 0) {
- this._updateViewport(toPos);
- this._animating = null;
- this._requestedAnimation = false;
- this._transitionStart = null;
- var item = this.items[this.currentSync];
- if (item) {
- this._itemReady(item, function () {
- var currentItemId = item.componentInstance.itemId || '';
- _this3.$trigger('animationfinish', {}, {
- current: _this3.currentSync,
- currentItemId: currentItemId,
- source: source
- });
- });
- }
- return;
- }
- var s = acc * time * time / 2;
- var l = toPos + s;
- this._updateViewport(l);
- this._animationFrame = requestAnimationFrame(this._animateFrameFuncProto.bind(this));
- },
- _animateViewport: function _animateViewport(current, source, n) {
- this._cancelViewportAnimation();
- var duration = this.durationNumber;
- var length = this.items.length;
- var position = this._viewportPosition;
- if (this.circularEnabled) {
- if (n < 0) {
- for (; position < current;) {
- position += length;
- }
- for (; position - length > current;) {
- position -= length;
- }
- } else if (n > 0) {
- for (; position > current;) {
- position -= length;
- }
- for (; position + length < current;) {
- position += length;
- }
- } else {
- for (; position + length < current;) {
- position += length;
- }
- for (; position - length > current;) {
- position -= length;
- }
- if (position + length - current < current - position) {
- position += length;
- }
- }
- }
- this._animating = {
- toPos: current,
- acc: 2 * (position - current) / (duration * duration),
- endTime: Date.now() + duration,
- source: source
- };
- if (!this._requestedAnimation) {
- this._requestedAnimation = true;
- this._animationFrame = requestAnimationFrame(this._animateFrameFuncProto.bind(this));
- }
- },
- _cancelViewportAnimation: function _cancelViewportAnimation() {
- this._animating = null;
- },
- /**
- * 结束动画
- */
- _endViewportAnimation: function _endViewportAnimation() {
- if (this._animating) {
- this._updateViewport(this._animating.toPos);
- this._animating = null;
- }
- },
- _handleTrackStart: function _handleTrackStart() {
- this._cancelSchedule();
- this._contentTrackViewport = this._viewportPosition;
- this._contentTrackSpeed = 0;
- this._contentTrackT = Date.now();
- this._cancelViewportAnimation();
- },
- _handleTrackMove: function _handleTrackMove(data) {
- var self = this;
- var contentTrackT = this._contentTrackT;
- this._contentTrackT = Date.now();
- var length = this.items.length;
- var other = length - this.displayMultipleItemsNumber;
- function calc(val) {
- return 0.5 - 0.25 / (val + 0.5);
- }
- function move(oldVal, newVal) {
- var val = self._contentTrackViewport + oldVal;
- self._contentTrackSpeed = 0.6 * self._contentTrackSpeed + 0.4 * newVal;
- if (!self.circularEnabled) {
- if (val < 0 || val > other) {
- if (val < 0) {
- val = -calc(-val);
- } else {
- if (val > other) {
- val = other + calc(val - other);
- }
- }
- self._contentTrackSpeed = 0;
- }
- }
- self._updateViewport(val);
- }
- var time = this._contentTrackT - contentTrackT || 1;
- if (this.vertical) {
- move(-data.dy / this.$refs.slideFrame.offsetHeight, -data.ddy / time);
- } else {
- move(-data.dx / this.$refs.slideFrame.offsetWidth, -data.ddx / time);
- }
- },
- _handleTrackEnd: function _handleTrackEnd(isCancel) {
- this.userTracking = false;
- var t = this._contentTrackSpeed / Math.abs(this._contentTrackSpeed);
- var n = 0;
- if (!isCancel && Math.abs(this._contentTrackSpeed) > 0.2) {
- n = 0.5 * t;
- }
- var current = this._normalizeCurrentValue(this._viewportPosition + n);
- if (isCancel) {
- this._updateViewport(this._contentTrackViewport);
- } else {
- this.currentChangeSource = 'touch';
- this.currentSync = current;
- this._animateViewport(current, 'touch', n !== 0 ? n : current === 0 && this.circularEnabled && this._viewportPosition >= 1 ? 1 : 0);
- }
- },
- _handleContentTrack: function _handleContentTrack(e) {
- if (this.disableTouch) {
- return;
- }
- if (!this._invalid) {
- if (e.detail.state === 'start') {
- this.userTracking = true;
- this._userDirectionChecked = false;
- return this._handleTrackStart();
- } // fixed by xxxxxx
- if (e.detail.state === 'end') {
- return this._handleTrackEnd(false);
- }
- if (e.detail.state === 'cancel') {
- return this._handleTrackEnd(true);
- }
- if (this.userTracking) {
- if (!this._userDirectionChecked) {
- this._userDirectionChecked = true;
- var t = Math.abs(e.detail.dx);
- var n = Math.abs(e.detail.dy);
- if (t >= n && this.vertical) {
- this.userTracking = false;
- } else {
- if (t <= n && !this.vertical) {
- this.userTracking = false;
- }
- }
- if (!this.userTracking) {
- if (this.autoplay) {
- this._scheduleAutoplay();
- }
- return;
- }
- }
- this._handleTrackMove(e.detail);
- return false;
- }
- }
- }
- },
- render: function render(createElement) {
- var _this4 = this;
- var slidesDots = [];
- var swiperItems = [];
- if (this.$slots.default) {
- deepClone(this.$slots.default, createElement).forEach(function (vnode) {
- if (vnode.componentOptions && vnode.componentOptions.tag === 'v-uni-swiper-item') {
- swiperItems.push(vnode);
- }
- });
- }
- var _loop = function _loop(index, length) {
- var currentSync = _this4.currentSync;
- slidesDots.push(createElement('div', {
- on: {
- click: function click() {
- _this4._animateViewport(_this4.currentSync = index, _this4.currentChangeSource = 'click', _this4.circularEnabled ? 1 : 0);
- }
- },
- class: {
- 'uni-swiper-dot': true,
- 'uni-swiper-dot-active': index < currentSync + _this4.displayMultipleItemsNumber && index >= currentSync || index < currentSync + _this4.displayMultipleItemsNumber - length
- },
- style: {
- background: index === currentSync ? _this4.indicatorActiveColor : _this4.indicatorColor
- }
- }));
- };
- for (var index = 0, length = swiperItems.length; index < length; index++) {
- _loop(index, length);
- }
- this.items = swiperItems;
- var slidesWrapperChild = [createElement('div', {
- ref: 'slides',
- style: this.slidesStyle,
- class: 'uni-swiper-slides'
- }, [createElement('div', {
- ref: 'slideFrame',
- class: 'uni-swiper-slide-frame',
- style: this.slideFrameStyle
- }, swiperItems)])];
- if (this.indicatorDots) {
- slidesWrapperChild.push(createElement('div', {
- ref: 'slidesDots',
- class: ['uni-swiper-dots', this.vertical ? 'uni-swiper-dots-vertical' : 'uni-swiper-dots-horizontal']
- }, slidesDots));
- }
- return createElement('uni-swiper', {
- on: this.$listeners
- }, [createElement('div', {
- ref: 'slidesWrapper',
- class: 'uni-swiper-wrapper'
- }, slidesWrapperChild)]);
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/swiper/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_swipervue_type_script_lang_js_ = (swipervue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/swiper/index.vue?vue&type=style&index=0&lang=css&
- var swipervue_type_style_index_0_lang_css_ = __webpack_require__(111);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/swiper/index.vue
- var render, staticRenderFns
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_swipervue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/swiper/index.vue"
- /* harmony default export */ var swiper = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 159 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // 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&
- var SPACE_UNICODE = {
- ensp: "\u2002",
- emsp: "\u2003",
- nbsp: "\xA0"
- };
- /* harmony default export */ var textvue_type_script_lang_js_ = ({
- name: 'Text',
- props: {
- selectable: {
- type: [Boolean, String],
- default: false
- },
- space: {
- type: String,
- default: ''
- },
- decode: {
- type: [Boolean, String],
- default: false
- }
- },
- methods: {
- _decodeHtml: function _decodeHtml(htmlString) {
- if (this.space && SPACE_UNICODE[this.space]) {
- htmlString = htmlString.replace(/ /g, SPACE_UNICODE[this.space]);
- }
- if (this.decode) {
- htmlString = htmlString.replace(/ /g, SPACE_UNICODE.nbsp).replace(/ /g, SPACE_UNICODE.ensp).replace(/ /g, SPACE_UNICODE.emsp).replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, "'");
- }
- return htmlString;
- }
- },
- render: function render(createElement) {
- var _this = this;
- var nodeList = [];
- this.$slots.default && this.$slots.default.forEach(function (vnode) {
- if (vnode.text) {
- // 处理可能出现的多余的转义字符
- var nodeText = vnode.text.replace(/\\n/g, '\n');
- var texts = _this._decodeHtml(nodeText).trim().split('\n');
- texts.forEach(function (text, index) {
- nodeList.push(text);
- if (index !== texts.length - 1) {
- nodeList.push(createElement('br'));
- }
- });
- } else {
- if (vnode.componentOptions && vnode.componentOptions.tag !== 'v-uni-text') {
- console.warn('<text> 组件内只支持嵌套 <text>,不支持其它组件或自定义组件,否则会引发在不同平台的渲染差异。');
- }
- nodeList.push(vnode);
- }
- });
- return createElement('uni-text', {
- on: this.$listeners,
- attrs: {
- selectable: !!this.selectable
- }
- }, [createElement('span', {}, nodeList)]);
- }
- });
- // CONCATENATED MODULE: ./src/core/view/components/text/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_textvue_type_script_lang_js_ = (textvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/core/view/components/text/index.vue?vue&type=style&index=0&lang=css&
- var textvue_type_style_index_0_lang_css_ = __webpack_require__(113);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/core/view/components/text/index.vue
- var render, staticRenderFns
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_textvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/core/view/components/text/index.vue"
- /* harmony default export */ var components_text = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 160 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/mixins/native.js
- var mixins_native = __webpack_require__(7);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/mixins/cover.js
- var cover = __webpack_require__(63);
- // 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&
- /* harmony default export */ var cover_viewvue_type_script_lang_js_ = ({
- name: 'CoverView',
- mixins: [mixins_native["a" /* default */], cover["a" /* default */]],
- props: {},
- data: function data() {
- return {
- coverType: 'text',
- coverContent: ''
- };
- },
- render: function render(createElement) {
- var coverContent = '';
- var $slots = this.$slots.default || [];
- $slots.forEach(function (node) {
- if (!node.tag) {
- coverContent += node.text || '';
- }
- });
- this.coverContent = coverContent;
- return createElement('uni-cover-view', {
- on: {
- on: this.$listeners
- }
- }, [createElement('div', {
- ref: 'container',
- staticClass: 'uni-cover-view'
- }, [coverContent])]);
- }
- });
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/cover-view/index.vue?vue&type=script&lang=js&
- /* harmony default export */ var components_cover_viewvue_type_script_lang_js_ = (cover_viewvue_type_script_lang_js_);
- // EXTERNAL MODULE: ./src/platforms/app-plus/view/components/cover-view/index.vue?vue&type=style&index=0&lang=css&
- var cover_viewvue_type_style_index_0_lang_css_ = __webpack_require__(119);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(0);
- // CONCATENATED MODULE: ./src/platforms/app-plus/view/components/cover-view/index.vue
- var render, staticRenderFns
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_cover_viewvue_type_script_lang_js_,
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* hot reload */
- if (false) { var api; }
- component.options.__file = "src/platforms/app-plus/view/components/cover-view/index.vue"
- /* harmony default export */ var cover_view = __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /* 161 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // EXPORTS
- __webpack_require__.d(__webpack_exports__, "upx2px", function() { return /* reexport */ view["h" /* upx2px */]; });
- __webpack_require__.d(__webpack_exports__, "navigateTo", function() { return /* reexport */ view["d" /* navigateTo */]; });
- __webpack_require__.d(__webpack_exports__, "navigateBack", function() { return /* reexport */ view["c" /* navigateBack */]; });
- __webpack_require__.d(__webpack_exports__, "reLaunch", function() { return /* reexport */ view["e" /* reLaunch */]; });
- __webpack_require__.d(__webpack_exports__, "redirectTo", function() { return /* reexport */ view["f" /* redirectTo */]; });
- __webpack_require__.d(__webpack_exports__, "switchTab", function() { return /* reexport */ view["g" /* switchTab */]; });
- __webpack_require__.d(__webpack_exports__, "getSystemInfoSync", function() { return /* reexport */ view["b" /* getSystemInfoSync */]; });
- __webpack_require__.d(__webpack_exports__, "canIUse", function() { return /* reexport */ view["a" /* canIUse */]; });
- // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
- // This file is imported into lib/wc client bundles.
- if (typeof window !== 'undefined') {
- var currentScript = window.document.currentScript
- if (true) {
- var getCurrentScript = __webpack_require__(86)
- currentScript = getCurrentScript()
- // for backward compatibility, because previously we directly included the polyfill
- if (!('currentScript' in document)) {
- Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
- }
- }
- var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
- if (src) {
- __webpack_require__.p = src[1] // eslint-disable-line
- }
- }
- // Indicate to webpack that this file can be concatenated
- /* harmony default export */ var setPublicPath = (null);
- // EXTERNAL MODULE: ./lib/app-plus/view.js
- var view = __webpack_require__(68);
- // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js
- /***/ })
- /******/ ]);
- });
|